From 824009254877c1ac359b974ac1449506a98cf3a2 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Thu, 21 Mar 2019 16:57:34 -0600 Subject: [PATCH 001/167] Ported RRTMGP development from release repo. LW is working. --- physics/rrtmgp_lw_cloud_optics.F90 | 804 +++++++++++++++++++ physics/rrtmgp_lw_main.F90 | 1168 ++++++++++++++++++++++++++++ physics/rrtmgp_lw_post.F90 | 102 +++ physics/rrtmgp_lw_post.xml | 150 ++++ physics/rrtmgp_lw_pre.F90 | 67 ++ physics/rrtmgp_lw_pre.xml | 106 +++ physics/rte-rrtmgp | 1 + 7 files changed, 2398 insertions(+) create mode 100644 physics/rrtmgp_lw_cloud_optics.F90 create mode 100644 physics/rrtmgp_lw_main.F90 create mode 100644 physics/rrtmgp_lw_post.F90 create mode 100644 physics/rrtmgp_lw_post.xml create mode 100644 physics/rrtmgp_lw_pre.F90 create mode 100644 physics/rrtmgp_lw_pre.xml create mode 160000 physics/rte-rrtmgp diff --git a/physics/rrtmgp_lw_cloud_optics.F90 b/physics/rrtmgp_lw_cloud_optics.F90 new file mode 100644 index 000000000..449dacf16 --- /dev/null +++ b/physics/rrtmgp_lw_cloud_optics.F90 @@ -0,0 +1,804 @@ +module mo_rrtmgp_lw_cloud_optics + use machine, only: kind_phys + use physparam, only: ilwcliq, ilwcice, iovrlw + use mersenne_twister, only: random_setseed, random_number, random_stat + + implicit none + + ! Parameter used for RRTMG cloud-optics + integer,parameter :: & + nBandsLW_RRTMG = 16 + ! ipat is bands index for ebert & curry ice cloud (for iflagice=1) + integer,dimension(nBandsLW_RRTMG),parameter :: & + ipat = (/ 1, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 /) + real(kind_phys), parameter :: & + absrain = 0.33e-3, & ! Rain drop absorption coefficient \f$(m^{2}/g)\f$ . + abssnow0 = 1.5, & ! Snow flake absorption coefficient (micron), fu coeff + abssnow1 = 2.34e-3 ! Snow flake absorption coefficient \f$(m^{2}/g)\f$, ncar coef + real(kind_phys), parameter :: & + cldmin = 1e-20_kind_phys + + ! RRTMG LW cloud property coefficients + real(kind_phys) , dimension(58,nBandsLW_RRTMG),parameter :: & + absliq1 = reshape(source=(/ & + 1.64047e-03_kind_phys, 6.90533e-02_kind_phys, 7.72017e-02_kind_phys, 7.78054e-02_kind_phys, 7.69523e-02_kind_phys, & !1 + 7.58058e-02_kind_phys, 7.46400e-02_kind_phys, 7.35123e-02_kind_phys, 7.24162e-02_kind_phys, 7.13225e-02_kind_phys, & !1 + 6.99145e-02_kind_phys, 6.66409e-02_kind_phys, 6.36582e-02_kind_phys, 6.09425e-02_kind_phys, 5.84593e-02_kind_phys, & !1 + 5.61743e-02_kind_phys, 5.40571e-02_kind_phys, 5.20812e-02_kind_phys, 5.02245e-02_kind_phys, 4.84680e-02_kind_phys, & !1 + 4.67959e-02_kind_phys, 4.51944e-02_kind_phys, 4.36516e-02_kind_phys, 4.21570e-02_kind_phys, 4.07015e-02_kind_phys, & !1 + 3.92766e-02_kind_phys, 3.78747e-02_kind_phys, 3.64886e-02_kind_phys, 3.53632e-02_kind_phys, 3.41992e-02_kind_phys, & !1 + 3.31016e-02_kind_phys, 3.20643e-02_kind_phys, 3.10817e-02_kind_phys, 3.01490e-02_kind_phys, 2.92620e-02_kind_phys, & !1 + 2.84171e-02_kind_phys, 2.76108e-02_kind_phys, 2.68404e-02_kind_phys, 2.61031e-02_kind_phys, 2.53966e-02_kind_phys, & !1 + 2.47189e-02_kind_phys, 2.40678e-02_kind_phys, 2.34418e-02_kind_phys, 2.28392e-02_kind_phys, 2.22586e-02_kind_phys, & !1 + 2.16986e-02_kind_phys, 2.11580e-02_kind_phys, 2.06356e-02_kind_phys, 2.01305e-02_kind_phys, 1.96417e-02_kind_phys, & !1 + 1.91682e-02_kind_phys, 1.87094e-02_kind_phys, 1.82643e-02_kind_phys, 1.78324e-02_kind_phys, 1.74129e-02_kind_phys, & !1 + 1.70052e-02_kind_phys, 1.66088e-02_kind_phys, 1.62231e-02_kind_phys, & !1 + 2.19486e-01_kind_phys, 1.80687e-01_kind_phys, 1.59150e-01_kind_phys, 1.44731e-01_kind_phys, 1.33703e-01_kind_phys, & !2 + 1.24355e-01_kind_phys, 1.15756e-01_kind_phys, 1.07318e-01_kind_phys, 9.86119e-02_kind_phys, 8.92739e-02_kind_phys, & !2 + 8.34911e-02_kind_phys, 7.70773e-02_kind_phys, 7.15240e-02_kind_phys, 6.66615e-02_kind_phys, 6.23641e-02_kind_phys, & !2 + 5.85359e-02_kind_phys, 5.51020e-02_kind_phys, 5.20032e-02_kind_phys, 4.91916e-02_kind_phys, 4.66283e-02_kind_phys, & !2 + 4.42813e-02_kind_phys, 4.21236e-02_kind_phys, 4.01330e-02_kind_phys, 3.82905e-02_kind_phys, 3.65797e-02_kind_phys, & !2 + 3.49869e-02_kind_phys, 3.35002e-02_kind_phys, 3.21090e-02_kind_phys, 3.08957e-02_kind_phys, 2.97601e-02_kind_phys, & !2 + 2.86966e-02_kind_phys, 2.76984e-02_kind_phys, 2.67599e-02_kind_phys, 2.58758e-02_kind_phys, 2.50416e-02_kind_phys, & !2 + 2.42532e-02_kind_phys, 2.35070e-02_kind_phys, 2.27997e-02_kind_phys, 2.21284e-02_kind_phys, 2.14904e-02_kind_phys, & !2 + 2.08834e-02_kind_phys, 2.03051e-02_kind_phys, 1.97536e-02_kind_phys, 1.92271e-02_kind_phys, 1.87239e-02_kind_phys, & !2 + 1.82425e-02_kind_phys, 1.77816e-02_kind_phys, 1.73399e-02_kind_phys, 1.69162e-02_kind_phys, 1.65094e-02_kind_phys, & !2 + 1.61187e-02_kind_phys, 1.57430e-02_kind_phys, 1.53815e-02_kind_phys, 1.50334e-02_kind_phys, 1.46981e-02_kind_phys, & !2 + 1.43748e-02_kind_phys, 1.40628e-02_kind_phys, 1.37617e-02_kind_phys, & !2 + 2.95174e-01_kind_phys, 2.34765e-01_kind_phys, 1.98038e-01_kind_phys, 1.72114e-01_kind_phys, 1.52083e-01_kind_phys, & !3 + 1.35654e-01_kind_phys, 1.21613e-01_kind_phys, 1.09252e-01_kind_phys, 9.81263e-02_kind_phys, 8.79448e-02_kind_phys, & !3 + 8.12566e-02_kind_phys, 7.44563e-02_kind_phys, 6.86374e-02_kind_phys, 6.36042e-02_kind_phys, 5.92094e-02_kind_phys, & !3 + 5.53402e-02_kind_phys, 5.19087e-02_kind_phys, 4.88455e-02_kind_phys, 4.60951e-02_kind_phys, 4.36124e-02_kind_phys, & !3 + 4.13607e-02_kind_phys, 3.93096e-02_kind_phys, 3.74338e-02_kind_phys, 3.57119e-02_kind_phys, 3.41261e-02_kind_phys, & !3 + 3.26610e-02_kind_phys, 3.13036e-02_kind_phys, 3.00425e-02_kind_phys, 2.88497e-02_kind_phys, 2.78077e-02_kind_phys, & !3 + 2.68317e-02_kind_phys, 2.59158e-02_kind_phys, 2.50545e-02_kind_phys, 2.42430e-02_kind_phys, 2.34772e-02_kind_phys, & !3 + 2.27533e-02_kind_phys, 2.20679e-02_kind_phys, 2.14181e-02_kind_phys, 2.08011e-02_kind_phys, 2.02145e-02_kind_phys, & !3 + 1.96561e-02_kind_phys, 1.91239e-02_kind_phys, 1.86161e-02_kind_phys, 1.81311e-02_kind_phys, 1.76673e-02_kind_phys, & !3 + 1.72234e-02_kind_phys, 1.67981e-02_kind_phys, 1.63903e-02_kind_phys, 1.59989e-02_kind_phys, 1.56230e-02_kind_phys, & !3 + 1.52615e-02_kind_phys, 1.49138e-02_kind_phys, 1.45791e-02_kind_phys, 1.42565e-02_kind_phys, 1.39455e-02_kind_phys, & !3 + 1.36455e-02_kind_phys, 1.33559e-02_kind_phys, 1.30761e-02_kind_phys, & !3 + 3.00925e-01_kind_phys, 2.36949e-01_kind_phys, 1.96947e-01_kind_phys, 1.68692e-01_kind_phys, 1.47190e-01_kind_phys, & !4 + 1.29986e-01_kind_phys, 1.15719e-01_kind_phys, 1.03568e-01_kind_phys, 9.30028e-02_kind_phys, 8.36658e-02_kind_phys, & !4 + 7.71075e-02_kind_phys, 7.07002e-02_kind_phys, 6.52284e-02_kind_phys, 6.05024e-02_kind_phys, 5.63801e-02_kind_phys, & !4 + 5.27534e-02_kind_phys, 4.95384e-02_kind_phys, 4.66690e-02_kind_phys, 4.40925e-02_kind_phys, 4.17664e-02_kind_phys, & !4 + 3.96559e-02_kind_phys, 3.77326e-02_kind_phys, 3.59727e-02_kind_phys, 3.43561e-02_kind_phys, 3.28662e-02_kind_phys, & !4 + 3.14885e-02_kind_phys, 3.02110e-02_kind_phys, 2.90231e-02_kind_phys, 2.78948e-02_kind_phys, 2.69109e-02_kind_phys, & !4 + 2.59884e-02_kind_phys, 2.51217e-02_kind_phys, 2.43058e-02_kind_phys, 2.35364e-02_kind_phys, 2.28096e-02_kind_phys, & !4 + 2.21218e-02_kind_phys, 2.14700e-02_kind_phys, 2.08515e-02_kind_phys, 2.02636e-02_kind_phys, 1.97041e-02_kind_phys, & !4 + 1.91711e-02_kind_phys, 1.86625e-02_kind_phys, 1.81769e-02_kind_phys, 1.77126e-02_kind_phys, 1.72683e-02_kind_phys, & !4 + 1.68426e-02_kind_phys, 1.64344e-02_kind_phys, 1.60427e-02_kind_phys, 1.56664e-02_kind_phys, 1.53046e-02_kind_phys, & !4 + 1.49565e-02_kind_phys, 1.46214e-02_kind_phys, 1.42985e-02_kind_phys, 1.39871e-02_kind_phys, 1.36866e-02_kind_phys, & !4 + 1.33965e-02_kind_phys, 1.31162e-02_kind_phys, 1.28453e-02_kind_phys, & !4 + 2.64691e-01_kind_phys, 2.12018e-01_kind_phys, 1.78009e-01_kind_phys, 1.53539e-01_kind_phys, 1.34721e-01_kind_phys, & !5 + 1.19580e-01_kind_phys, 1.06996e-01_kind_phys, 9.62772e-02_kind_phys, 8.69710e-02_kind_phys, 7.87670e-02_kind_phys, & !5 + 7.29272e-02_kind_phys, 6.70920e-02_kind_phys, 6.20977e-02_kind_phys, 5.77732e-02_kind_phys, 5.39910e-02_kind_phys, & !5 + 5.06538e-02_kind_phys, 4.76866e-02_kind_phys, 4.50301e-02_kind_phys, 4.26374e-02_kind_phys, 4.04704e-02_kind_phys, & !5 + 3.84981e-02_kind_phys, 3.66948e-02_kind_phys, 3.50394e-02_kind_phys, 3.35141e-02_kind_phys, 3.21038e-02_kind_phys, & !5 + 3.07957e-02_kind_phys, 2.95788e-02_kind_phys, 2.84438e-02_kind_phys, 2.73790e-02_kind_phys, 2.64390e-02_kind_phys, & !5 + 2.55565e-02_kind_phys, 2.47263e-02_kind_phys, 2.39437e-02_kind_phys, 2.32047e-02_kind_phys, 2.25056e-02_kind_phys, & !5 + 2.18433e-02_kind_phys, 2.12149e-02_kind_phys, 2.06177e-02_kind_phys, 2.00495e-02_kind_phys, 1.95081e-02_kind_phys, & !5 + 1.89917e-02_kind_phys, 1.84984e-02_kind_phys, 1.80269e-02_kind_phys, 1.75755e-02_kind_phys, 1.71431e-02_kind_phys, & !5 + 1.67283e-02_kind_phys, 1.63303e-02_kind_phys, 1.59478e-02_kind_phys, 1.55801e-02_kind_phys, 1.52262e-02_kind_phys, & !5 + 1.48853e-02_kind_phys, 1.45568e-02_kind_phys, 1.42400e-02_kind_phys, 1.39342e-02_kind_phys, 1.36388e-02_kind_phys, & !5 + 1.33533e-02_kind_phys, 1.30773e-02_kind_phys, 1.28102e-02_kind_phys, & !5 + 8.81182e-02_kind_phys, 1.06745e-01_kind_phys, 9.79753e-02_kind_phys, 8.99625e-02_kind_phys, 8.35200e-02_kind_phys, & !6 + 7.81899e-02_kind_phys, 7.35939e-02_kind_phys, 6.94696e-02_kind_phys, 6.56266e-02_kind_phys, 6.19148e-02_kind_phys, & !6 + 5.83355e-02_kind_phys, 5.49306e-02_kind_phys, 5.19642e-02_kind_phys, 4.93325e-02_kind_phys, 4.69659e-02_kind_phys, & !6 + 4.48148e-02_kind_phys, 4.28431e-02_kind_phys, 4.10231e-02_kind_phys, 3.93332e-02_kind_phys, 3.77563e-02_kind_phys, & !6 + 3.62785e-02_kind_phys, 3.48882e-02_kind_phys, 3.35758e-02_kind_phys, 3.23333e-02_kind_phys, 3.11536e-02_kind_phys, & !6 + 3.00310e-02_kind_phys, 2.89601e-02_kind_phys, 2.79365e-02_kind_phys, 2.70502e-02_kind_phys, 2.62618e-02_kind_phys, & !6 + 2.55025e-02_kind_phys, 2.47728e-02_kind_phys, 2.40726e-02_kind_phys, 2.34013e-02_kind_phys, 2.27583e-02_kind_phys, & !6 + 2.21422e-02_kind_phys, 2.15522e-02_kind_phys, 2.09869e-02_kind_phys, 2.04453e-02_kind_phys, 1.99260e-02_kind_phys, & !6 + 1.94280e-02_kind_phys, 1.89501e-02_kind_phys, 1.84913e-02_kind_phys, 1.80506e-02_kind_phys, 1.76270e-02_kind_phys, & !6 + 1.72196e-02_kind_phys, 1.68276e-02_kind_phys, 1.64500e-02_kind_phys, 1.60863e-02_kind_phys, 1.57357e-02_kind_phys, & !6 + 1.53975e-02_kind_phys, 1.50710e-02_kind_phys, 1.47558e-02_kind_phys, 1.44511e-02_kind_phys, 1.41566e-02_kind_phys, & !6 + 1.38717e-02_kind_phys, 1.35960e-02_kind_phys, 1.33290e-02_kind_phys, & !6 + 4.32174e-02_kind_phys, 7.36078e-02_kind_phys, 6.98340e-02_kind_phys, 6.65231e-02_kind_phys, 6.41948e-02_kind_phys, & !7 + 6.23551e-02_kind_phys, 6.06638e-02_kind_phys, 5.88680e-02_kind_phys, 5.67124e-02_kind_phys, 5.38629e-02_kind_phys, & !7 + 4.99579e-02_kind_phys, 4.86289e-02_kind_phys, 4.70120e-02_kind_phys, 4.52854e-02_kind_phys, 4.35466e-02_kind_phys, & !7 + 4.18480e-02_kind_phys, 4.02169e-02_kind_phys, 3.86658e-02_kind_phys, 3.71992e-02_kind_phys, 3.58168e-02_kind_phys, & !7 + 3.45155e-02_kind_phys, 3.32912e-02_kind_phys, 3.21390e-02_kind_phys, 3.10538e-02_kind_phys, 3.00307e-02_kind_phys, & !7 + 2.90651e-02_kind_phys, 2.81524e-02_kind_phys, 2.72885e-02_kind_phys, 2.62821e-02_kind_phys, 2.55744e-02_kind_phys, & !7 + 2.48799e-02_kind_phys, 2.42029e-02_kind_phys, 2.35460e-02_kind_phys, 2.29108e-02_kind_phys, 2.22981e-02_kind_phys, & !7 + 2.17079e-02_kind_phys, 2.11402e-02_kind_phys, 2.05945e-02_kind_phys, 2.00701e-02_kind_phys, 1.95663e-02_kind_phys, & !7 + 1.90824e-02_kind_phys, 1.86174e-02_kind_phys, 1.81706e-02_kind_phys, 1.77411e-02_kind_phys, 1.73281e-02_kind_phys, & !7 + 1.69307e-02_kind_phys, 1.65483e-02_kind_phys, 1.61801e-02_kind_phys, 1.58254e-02_kind_phys, 1.54835e-02_kind_phys, & !7 + 1.51538e-02_kind_phys, 1.48358e-02_kind_phys, 1.45288e-02_kind_phys, 1.42322e-02_kind_phys, 1.39457e-02_kind_phys, & !7 + 1.36687e-02_kind_phys, 1.34008e-02_kind_phys, 1.31416e-02_kind_phys, & !7 + 1.41881e-01_kind_phys, 7.15419e-02_kind_phys, 6.30335e-02_kind_phys, 6.11132e-02_kind_phys, 6.01931e-02_kind_phys, & !8 + 5.92420e-02_kind_phys, 5.78968e-02_kind_phys, 5.58876e-02_kind_phys, 5.28923e-02_kind_phys, 4.84462e-02_kind_phys, & !8 + 4.60839e-02_kind_phys, 4.56013e-02_kind_phys, 4.45410e-02_kind_phys, 4.31866e-02_kind_phys, 4.17026e-02_kind_phys, & !8 + 4.01850e-02_kind_phys, 3.86892e-02_kind_phys, 3.72461e-02_kind_phys, 3.58722e-02_kind_phys, 3.45749e-02_kind_phys, & !8 + 3.33564e-02_kind_phys, 3.22155e-02_kind_phys, 3.11494e-02_kind_phys, 3.01541e-02_kind_phys, 2.92253e-02_kind_phys, & !8 + 2.83584e-02_kind_phys, 2.75488e-02_kind_phys, 2.67925e-02_kind_phys, 2.57692e-02_kind_phys, 2.50704e-02_kind_phys, & !8 + 2.43918e-02_kind_phys, 2.37350e-02_kind_phys, 2.31005e-02_kind_phys, 2.24888e-02_kind_phys, 2.18996e-02_kind_phys, & !8 + 2.13325e-02_kind_phys, 2.07870e-02_kind_phys, 2.02623e-02_kind_phys, 1.97577e-02_kind_phys, 1.92724e-02_kind_phys, & !8 + 1.88056e-02_kind_phys, 1.83564e-02_kind_phys, 1.79241e-02_kind_phys, 1.75079e-02_kind_phys, 1.71070e-02_kind_phys, & !8 + 1.67207e-02_kind_phys, 1.63482e-02_kind_phys, 1.59890e-02_kind_phys, 1.56424e-02_kind_phys, 1.53077e-02_kind_phys, & !8 + 1.49845e-02_kind_phys, 1.46722e-02_kind_phys, 1.43702e-02_kind_phys, 1.40782e-02_kind_phys, 1.37955e-02_kind_phys, & !8 + 1.35219e-02_kind_phys, 1.32569e-02_kind_phys, 1.30000e-02_kind_phys, & !8 + 6.72726e-02_kind_phys, 6.61013e-02_kind_phys, 6.47866e-02_kind_phys, 6.33780e-02_kind_phys, 6.18985e-02_kind_phys, & !9 + 6.03335e-02_kind_phys, 5.86136e-02_kind_phys, 5.65876e-02_kind_phys, 5.39839e-02_kind_phys, 5.03536e-02_kind_phys, & !9 + 4.71608e-02_kind_phys, 4.63630e-02_kind_phys, 4.50313e-02_kind_phys, 4.34526e-02_kind_phys, 4.17876e-02_kind_phys, & !9 + 4.01261e-02_kind_phys, 3.85171e-02_kind_phys, 3.69860e-02_kind_phys, 3.55442e-02_kind_phys, 3.41954e-02_kind_phys, & !9 + 3.29384e-02_kind_phys, 3.17693e-02_kind_phys, 3.06832e-02_kind_phys, 2.96745e-02_kind_phys, 2.87374e-02_kind_phys, & !9 + 2.78662e-02_kind_phys, 2.70557e-02_kind_phys, 2.63008e-02_kind_phys, 2.52450e-02_kind_phys, 2.45424e-02_kind_phys, & !9 + 2.38656e-02_kind_phys, 2.32144e-02_kind_phys, 2.25885e-02_kind_phys, 2.19873e-02_kind_phys, 2.14099e-02_kind_phys, & !9 + 2.08554e-02_kind_phys, 2.03230e-02_kind_phys, 1.98116e-02_kind_phys, 1.93203e-02_kind_phys, 1.88482e-02_kind_phys, & !9 + 1.83944e-02_kind_phys, 1.79578e-02_kind_phys, 1.75378e-02_kind_phys, 1.71335e-02_kind_phys, 1.67440e-02_kind_phys, & !9 + 1.63687e-02_kind_phys, 1.60069e-02_kind_phys, 1.56579e-02_kind_phys, 1.53210e-02_kind_phys, 1.49958e-02_kind_phys, & !9 + 1.46815e-02_kind_phys, 1.43778e-02_kind_phys, 1.40841e-02_kind_phys, 1.37999e-02_kind_phys, 1.35249e-02_kind_phys, & !9 + 1.32585e-02_kind_phys, 1.30004e-02_kind_phys, 1.27502e-02_kind_phys, & !9 + 7.97040e-02_kind_phys, 7.63844e-02_kind_phys, 7.36499e-02_kind_phys, 7.13525e-02_kind_phys, 6.93043e-02_kind_phys, & !10 + 6.72807e-02_kind_phys, 6.50227e-02_kind_phys, 6.22395e-02_kind_phys, 5.86093e-02_kind_phys, 5.37815e-02_kind_phys, & !10 + 5.14682e-02_kind_phys, 4.97214e-02_kind_phys, 4.77392e-02_kind_phys, 4.56961e-02_kind_phys, 4.36858e-02_kind_phys, & !10 + 4.17569e-02_kind_phys, 3.99328e-02_kind_phys, 3.82224e-02_kind_phys, 3.66265e-02_kind_phys, 3.51416e-02_kind_phys, & !10 + 3.37617e-02_kind_phys, 3.24798e-02_kind_phys, 3.12887e-02_kind_phys, 3.01812e-02_kind_phys, 2.91505e-02_kind_phys, & !10 + 2.81900e-02_kind_phys, 2.72939e-02_kind_phys, 2.64568e-02_kind_phys, 2.54165e-02_kind_phys, 2.46832e-02_kind_phys, & !10 + 2.39783e-02_kind_phys, 2.33017e-02_kind_phys, 2.26531e-02_kind_phys, 2.20314e-02_kind_phys, 2.14359e-02_kind_phys, & !10 + 2.08653e-02_kind_phys, 2.03187e-02_kind_phys, 1.97947e-02_kind_phys, 1.92924e-02_kind_phys, 1.88106e-02_kind_phys, & !10 + 1.83483e-02_kind_phys, 1.79043e-02_kind_phys, 1.74778e-02_kind_phys, 1.70678e-02_kind_phys, 1.66735e-02_kind_phys, & !10 + 1.62941e-02_kind_phys, 1.59286e-02_kind_phys, 1.55766e-02_kind_phys, 1.52371e-02_kind_phys, 1.49097e-02_kind_phys, & !10 + 1.45937e-02_kind_phys, 1.42885e-02_kind_phys, 1.39936e-02_kind_phys, 1.37085e-02_kind_phys, 1.34327e-02_kind_phys, & !10 + 1.31659e-02_kind_phys, 1.29075e-02_kind_phys, 1.26571e-02_kind_phys, & !10 + 1.49438e-01_kind_phys, 1.33535e-01_kind_phys, 1.21542e-01_kind_phys, 1.11743e-01_kind_phys, 1.03263e-01_kind_phys, & !11 + 9.55774e-02_kind_phys, 8.83382e-02_kind_phys, 8.12943e-02_kind_phys, 7.42533e-02_kind_phys, 6.70609e-02_kind_phys, & !11 + 6.38761e-02_kind_phys, 5.97788e-02_kind_phys, 5.59841e-02_kind_phys, 5.25318e-02_kind_phys, 4.94132e-02_kind_phys, & !11 + 4.66014e-02_kind_phys, 4.40644e-02_kind_phys, 4.17706e-02_kind_phys, 3.96910e-02_kind_phys, 3.77998e-02_kind_phys, & !11 + 3.60742e-02_kind_phys, 3.44947e-02_kind_phys, 3.30442e-02_kind_phys, 3.17079e-02_kind_phys, 3.04730e-02_kind_phys, & !11 + 2.93283e-02_kind_phys, 2.82642e-02_kind_phys, 2.72720e-02_kind_phys, 2.61789e-02_kind_phys, 2.53277e-02_kind_phys, & !11 + 2.45237e-02_kind_phys, 2.37635e-02_kind_phys, 2.30438e-02_kind_phys, 2.23615e-02_kind_phys, 2.17140e-02_kind_phys, & !11 + 2.10987e-02_kind_phys, 2.05133e-02_kind_phys, 1.99557e-02_kind_phys, 1.94241e-02_kind_phys, 1.89166e-02_kind_phys, & !11 + 1.84317e-02_kind_phys, 1.79679e-02_kind_phys, 1.75238e-02_kind_phys, 1.70983e-02_kind_phys, 1.66901e-02_kind_phys, & !11 + 1.62983e-02_kind_phys, 1.59219e-02_kind_phys, 1.55599e-02_kind_phys, 1.52115e-02_kind_phys, 1.48761e-02_kind_phys, & !11 + 1.45528e-02_kind_phys, 1.42411e-02_kind_phys, 1.39402e-02_kind_phys, 1.36497e-02_kind_phys, 1.33690e-02_kind_phys, & !11 + 1.30976e-02_kind_phys, 1.28351e-02_kind_phys, 1.25810e-02_kind_phys, & !11 + 3.71985e-02_kind_phys, 3.88586e-02_kind_phys, 3.99070e-02_kind_phys, 4.04351e-02_kind_phys, 4.04610e-02_kind_phys, & !12 + 3.99834e-02_kind_phys, 3.89953e-02_kind_phys, 3.74886e-02_kind_phys, 3.54551e-02_kind_phys, 3.28870e-02_kind_phys, & !12 + 3.32576e-02_kind_phys, 3.22444e-02_kind_phys, 3.12384e-02_kind_phys, 3.02584e-02_kind_phys, 2.93146e-02_kind_phys, & !12 + 2.84120e-02_kind_phys, 2.75525e-02_kind_phys, 2.67361e-02_kind_phys, 2.59618e-02_kind_phys, 2.52280e-02_kind_phys, & !12 + 2.45327e-02_kind_phys, 2.38736e-02_kind_phys, 2.32487e-02_kind_phys, 2.26558e-02_kind_phys, 2.20929e-02_kind_phys, & !12 + 2.15579e-02_kind_phys, 2.10491e-02_kind_phys, 2.05648e-02_kind_phys, 1.99749e-02_kind_phys, 1.95704e-02_kind_phys, & !12 + 1.91731e-02_kind_phys, 1.87839e-02_kind_phys, 1.84032e-02_kind_phys, 1.80315e-02_kind_phys, 1.76689e-02_kind_phys, & !12 + 1.73155e-02_kind_phys, 1.69712e-02_kind_phys, 1.66362e-02_kind_phys, 1.63101e-02_kind_phys, 1.59928e-02_kind_phys, & !12 + 1.56842e-02_kind_phys, 1.53840e-02_kind_phys, 1.50920e-02_kind_phys, 1.48080e-02_kind_phys, 1.45318e-02_kind_phys, & !12 + 1.42631e-02_kind_phys, 1.40016e-02_kind_phys, 1.37472e-02_kind_phys, 1.34996e-02_kind_phys, 1.32586e-02_kind_phys, & !12 + 1.30239e-02_kind_phys, 1.27954e-02_kind_phys, 1.25728e-02_kind_phys, 1.23559e-02_kind_phys, 1.21445e-02_kind_phys, & !12 + 1.19385e-02_kind_phys, 1.17376e-02_kind_phys, 1.15417e-02_kind_phys, & !12 + 3.11868e-02_kind_phys, 4.48357e-02_kind_phys, 4.90224e-02_kind_phys, 4.96406e-02_kind_phys, 4.86806e-02_kind_phys, & !13 + 4.69610e-02_kind_phys, 4.48630e-02_kind_phys, 4.25795e-02_kind_phys, 4.02138e-02_kind_phys, 3.78236e-02_kind_phys, & !13 + 3.74266e-02_kind_phys, 3.60384e-02_kind_phys, 3.47074e-02_kind_phys, 3.34434e-02_kind_phys, 3.22499e-02_kind_phys, & !13 + 3.11264e-02_kind_phys, 3.00704e-02_kind_phys, 2.90784e-02_kind_phys, 2.81463e-02_kind_phys, 2.72702e-02_kind_phys, & !13 + 2.64460e-02_kind_phys, 2.56698e-02_kind_phys, 2.49381e-02_kind_phys, 2.42475e-02_kind_phys, 2.35948e-02_kind_phys, & !13 + 2.29774e-02_kind_phys, 2.23925e-02_kind_phys, 2.18379e-02_kind_phys, 2.11793e-02_kind_phys, 2.07076e-02_kind_phys, & !13 + 2.02470e-02_kind_phys, 1.97981e-02_kind_phys, 1.93613e-02_kind_phys, 1.89367e-02_kind_phys, 1.85243e-02_kind_phys, & !13 + 1.81240e-02_kind_phys, 1.77356e-02_kind_phys, 1.73588e-02_kind_phys, 1.69935e-02_kind_phys, 1.66392e-02_kind_phys, & !13 + 1.62956e-02_kind_phys, 1.59624e-02_kind_phys, 1.56393e-02_kind_phys, 1.53259e-02_kind_phys, 1.50219e-02_kind_phys, & !13 + 1.47268e-02_kind_phys, 1.44404e-02_kind_phys, 1.41624e-02_kind_phys, 1.38925e-02_kind_phys, 1.36302e-02_kind_phys, & !13 + 1.33755e-02_kind_phys, 1.31278e-02_kind_phys, 1.28871e-02_kind_phys, 1.26530e-02_kind_phys, 1.24253e-02_kind_phys, & !13 + 1.22038e-02_kind_phys, 1.19881e-02_kind_phys, 1.17782e-02_kind_phys, & !13 + 1.58988e-02_kind_phys, 3.50652e-02_kind_phys, 4.00851e-02_kind_phys, 4.07270e-02_kind_phys, 3.98101e-02_kind_phys, & !14 + 3.83306e-02_kind_phys, 3.66829e-02_kind_phys, 3.50327e-02_kind_phys, 3.34497e-02_kind_phys, 3.19609e-02_kind_phys, & !14 + 3.13712e-02_kind_phys, 3.03348e-02_kind_phys, 2.93415e-02_kind_phys, 2.83973e-02_kind_phys, 2.75037e-02_kind_phys, & !14 + 2.66604e-02_kind_phys, 2.58654e-02_kind_phys, 2.51161e-02_kind_phys, 2.44100e-02_kind_phys, 2.37440e-02_kind_phys, & !14 + 2.31154e-02_kind_phys, 2.25215e-02_kind_phys, 2.19599e-02_kind_phys, 2.14282e-02_kind_phys, 2.09242e-02_kind_phys, & !14 + 2.04459e-02_kind_phys, 1.99915e-02_kind_phys, 1.95594e-02_kind_phys, 1.90254e-02_kind_phys, 1.86598e-02_kind_phys, & !14 + 1.82996e-02_kind_phys, 1.79455e-02_kind_phys, 1.75983e-02_kind_phys, 1.72584e-02_kind_phys, 1.69260e-02_kind_phys, & !14 + 1.66013e-02_kind_phys, 1.62843e-02_kind_phys, 1.59752e-02_kind_phys, 1.56737e-02_kind_phys, 1.53799e-02_kind_phys, & !14 + 1.50936e-02_kind_phys, 1.48146e-02_kind_phys, 1.45429e-02_kind_phys, 1.42782e-02_kind_phys, 1.40203e-02_kind_phys, & !14 + 1.37691e-02_kind_phys, 1.35243e-02_kind_phys, 1.32858e-02_kind_phys, 1.30534e-02_kind_phys, 1.28270e-02_kind_phys, & !14 + 1.26062e-02_kind_phys, 1.23909e-02_kind_phys, 1.21810e-02_kind_phys, 1.19763e-02_kind_phys, 1.17766e-02_kind_phys, & !14 + 1.15817e-02_kind_phys, 1.13915e-02_kind_phys, 1.12058e-02_kind_phys, & !14 + 5.02079e-03_kind_phys, 2.17615e-02_kind_phys, 2.55449e-02_kind_phys, 2.59484e-02_kind_phys, 2.53650e-02_kind_phys, & !15 + 2.45281e-02_kind_phys, 2.36843e-02_kind_phys, 2.29159e-02_kind_phys, 2.22451e-02_kind_phys, 2.16716e-02_kind_phys, & !15 + 2.11451e-02_kind_phys, 2.05817e-02_kind_phys, 2.00454e-02_kind_phys, 1.95372e-02_kind_phys, 1.90567e-02_kind_phys, & !15 + 1.86028e-02_kind_phys, 1.81742e-02_kind_phys, 1.77693e-02_kind_phys, 1.73866e-02_kind_phys, 1.70244e-02_kind_phys, & !15 + 1.66815e-02_kind_phys, 1.63563e-02_kind_phys, 1.60477e-02_kind_phys, 1.57544e-02_kind_phys, 1.54755e-02_kind_phys, & !15 + 1.52097e-02_kind_phys, 1.49564e-02_kind_phys, 1.47146e-02_kind_phys, 1.43684e-02_kind_phys, 1.41728e-02_kind_phys, & !15 + 1.39762e-02_kind_phys, 1.37797e-02_kind_phys, 1.35838e-02_kind_phys, 1.33891e-02_kind_phys, 1.31961e-02_kind_phys, & !15 + 1.30051e-02_kind_phys, 1.28164e-02_kind_phys, 1.26302e-02_kind_phys, 1.24466e-02_kind_phys, 1.22659e-02_kind_phys, & !15 + 1.20881e-02_kind_phys, 1.19131e-02_kind_phys, 1.17412e-02_kind_phys, 1.15723e-02_kind_phys, 1.14063e-02_kind_phys, & !15 + 1.12434e-02_kind_phys, 1.10834e-02_kind_phys, 1.09264e-02_kind_phys, 1.07722e-02_kind_phys, 1.06210e-02_kind_phys, & !15 + 1.04725e-02_kind_phys, 1.03269e-02_kind_phys, 1.01839e-02_kind_phys, 1.00436e-02_kind_phys, 9.90593e-03_kind_phys, & !15 + 9.77080e-03_kind_phys, 9.63818e-03_kind_phys, 9.50800e-03_kind_phys, & !15 + 5.64971e-02_kind_phys, 9.04736e-02_kind_phys, 8.11726e-02_kind_phys, 7.05450e-02_kind_phys, 6.20052e-02_kind_phys, & !16 + 5.54286e-02_kind_phys, 5.03503e-02_kind_phys, 4.63791e-02_kind_phys, 4.32290e-02_kind_phys, 4.06959e-02_kind_phys, & !16 + 3.74690e-02_kind_phys, 3.52964e-02_kind_phys, 3.33799e-02_kind_phys, 3.16774e-02_kind_phys, 3.01550e-02_kind_phys, & !16 + 2.87856e-02_kind_phys, 2.75474e-02_kind_phys, 2.64223e-02_kind_phys, 2.53953e-02_kind_phys, 2.44542e-02_kind_phys, & !16 + 2.35885e-02_kind_phys, 2.27894e-02_kind_phys, 2.20494e-02_kind_phys, 2.13622e-02_kind_phys, 2.07222e-02_kind_phys, & !16 + 2.01246e-02_kind_phys, 1.95654e-02_kind_phys, 1.90408e-02_kind_phys, 1.84398e-02_kind_phys, 1.80021e-02_kind_phys, & !16 + 1.75816e-02_kind_phys, 1.71775e-02_kind_phys, 1.67889e-02_kind_phys, 1.64152e-02_kind_phys, 1.60554e-02_kind_phys, & !16 + 1.57089e-02_kind_phys, 1.53751e-02_kind_phys, 1.50531e-02_kind_phys, 1.47426e-02_kind_phys, 1.44428e-02_kind_phys, & !16 + 1.41532e-02_kind_phys, 1.38734e-02_kind_phys, 1.36028e-02_kind_phys, 1.33410e-02_kind_phys, 1.30875e-02_kind_phys, & !16 + 1.28420e-02_kind_phys, 1.26041e-02_kind_phys, 1.23735e-02_kind_phys, 1.21497e-02_kind_phys, 1.19325e-02_kind_phys, & !16 + 1.17216e-02_kind_phys, 1.15168e-02_kind_phys, 1.13177e-02_kind_phys, 1.11241e-02_kind_phys, 1.09358e-02_kind_phys, & !16 + 1.07525e-02_kind_phys, 1.05741e-02_kind_phys, 1.04003e-02_kind_phys/), & !16 + shape=(/58,nBandsLW_RRTMG/)) + + real(kind_phys), dimension(2),parameter :: & + absice0 = (/0.005,1.0/) + + real(kind_phys), dimension(2,5),parameter :: & + absice1 = reshape(source=(/ & + 0.0036, 1.136, 0.0068, 0.600, 0.0003, 1.338, 0.0016, 1.166, 0.0020, 1.118 /),& + shape=(/2,5/)) + + real(kind_phys), dimension(43, nBandsLW_RRTMG),parameter :: & + absice2 = reshape(source=(/ & + 7.798999e-02_kind_phys, 6.340479e-02_kind_phys, 5.417973e-02_kind_phys, 4.766245e-02_kind_phys, 4.272663e-02_kind_phys, & !1 + 3.880939e-02_kind_phys, 3.559544e-02_kind_phys, 3.289241e-02_kind_phys, 3.057511e-02_kind_phys, 2.855800e-02_kind_phys, & !1 + 2.678022e-02_kind_phys, 2.519712e-02_kind_phys, 2.377505e-02_kind_phys, 2.248806e-02_kind_phys, 2.131578e-02_kind_phys, & !1 + 2.024194e-02_kind_phys, 1.925337e-02_kind_phys, 1.833926e-02_kind_phys, 1.749067e-02_kind_phys, 1.670007e-02_kind_phys, & !1 + 1.596113e-02_kind_phys, 1.526845e-02_kind_phys, 1.461739e-02_kind_phys, 1.400394e-02_kind_phys, 1.342462e-02_kind_phys, & !1 + 1.287639e-02_kind_phys, 1.235656e-02_kind_phys, 1.186279e-02_kind_phys, 1.139297e-02_kind_phys, 1.094524e-02_kind_phys, & !1 + 1.051794e-02_kind_phys, 1.010956e-02_kind_phys, 9.718755e-03_kind_phys, 9.344316e-03_kind_phys, 8.985139e-03_kind_phys, & !1 + 8.640223e-03_kind_phys, 8.308656e-03_kind_phys, 7.989606e-03_kind_phys, 7.682312e-03_kind_phys, 7.386076e-03_kind_phys, & !1 + 7.100255e-03_kind_phys, 6.824258e-03_kind_phys, 6.557540e-03_kind_phys, & !1 + 2.784879e-02_kind_phys, 2.709863e-02_kind_phys, 2.619165e-02_kind_phys, 2.529230e-02_kind_phys, 2.443225e-02_kind_phys, & !2 + 2.361575e-02_kind_phys, 2.284021e-02_kind_phys, 2.210150e-02_kind_phys, 2.139548e-02_kind_phys, 2.071840e-02_kind_phys, & !2 + 2.006702e-02_kind_phys, 1.943856e-02_kind_phys, 1.883064e-02_kind_phys, 1.824120e-02_kind_phys, 1.766849e-02_kind_phys, & !2 + 1.711099e-02_kind_phys, 1.656737e-02_kind_phys, 1.603647e-02_kind_phys, 1.551727e-02_kind_phys, 1.500886e-02_kind_phys, & !2 + 1.451045e-02_kind_phys, 1.402132e-02_kind_phys, 1.354084e-02_kind_phys, 1.306842e-02_kind_phys, 1.260355e-02_kind_phys, & !2 + 1.214575e-02_kind_phys, 1.169460e-02_kind_phys, 1.124971e-02_kind_phys, 1.081072e-02_kind_phys, 1.037731e-02_kind_phys, & !2 + 9.949167e-03_kind_phys, 9.526021e-03_kind_phys, 9.107615e-03_kind_phys, 8.693714e-03_kind_phys, 8.284096e-03_kind_phys, & !2 + 7.878558e-03_kind_phys, 7.476910e-03_kind_phys, 7.078974e-03_kind_phys, 6.684586e-03_kind_phys, 6.293589e-03_kind_phys, & !2 + 5.905839e-03_kind_phys, 5.521200e-03_kind_phys, 5.139543e-03_kind_phys, & !2 + 1.065397e-01_kind_phys, 8.005726e-02_kind_phys, 6.546428e-02_kind_phys, 5.589131e-02_kind_phys, 4.898681e-02_kind_phys, & !3 + 4.369932e-02_kind_phys, 3.947901e-02_kind_phys, 3.600676e-02_kind_phys, 3.308299e-02_kind_phys, 3.057561e-02_kind_phys, & !3 + 2.839325e-02_kind_phys, 2.647040e-02_kind_phys, 2.475872e-02_kind_phys, 2.322164e-02_kind_phys, 2.183091e-02_kind_phys, & !3 + 2.056430e-02_kind_phys, 1.940407e-02_kind_phys, 1.833586e-02_kind_phys, 1.734787e-02_kind_phys, 1.643034e-02_kind_phys, & !3 + 1.557512e-02_kind_phys, 1.477530e-02_kind_phys, 1.402501e-02_kind_phys, 1.331924e-02_kind_phys, 1.265364e-02_kind_phys, & !3 + 1.202445e-02_kind_phys, 1.142838e-02_kind_phys, 1.086257e-02_kind_phys, 1.032445e-02_kind_phys, 9.811791e-03_kind_phys, & !3 + 9.322587e-03_kind_phys, 8.855053e-03_kind_phys, 8.407591e-03_kind_phys, 7.978763e-03_kind_phys, 7.567273e-03_kind_phys, & !3 + 7.171949e-03_kind_phys, 6.791728e-03_kind_phys, 6.425642e-03_kind_phys, 6.072809e-03_kind_phys, 5.732424e-03_kind_phys, & !3 + 5.403748e-03_kind_phys, 5.086103e-03_kind_phys, 4.778865e-03_kind_phys, & !3 + 1.804566e-01_kind_phys, 1.168987e-01_kind_phys, 8.680442e-02_kind_phys, 6.910060e-02_kind_phys, 5.738174e-02_kind_phys, & !4 + 4.902332e-02_kind_phys, 4.274585e-02_kind_phys, 3.784923e-02_kind_phys, 3.391734e-02_kind_phys, 3.068690e-02_kind_phys, & !4 + 2.798301e-02_kind_phys, 2.568480e-02_kind_phys, 2.370600e-02_kind_phys, 2.198337e-02_kind_phys, 2.046940e-02_kind_phys, & !4 + 1.912777e-02_kind_phys, 1.793016e-02_kind_phys, 1.685420e-02_kind_phys, 1.588193e-02_kind_phys, 1.499882e-02_kind_phys, & !4 + 1.419293e-02_kind_phys, 1.345440e-02_kind_phys, 1.277496e-02_kind_phys, 1.214769e-02_kind_phys, 1.156669e-02_kind_phys, & !4 + 1.102694e-02_kind_phys, 1.052412e-02_kind_phys, 1.005451e-02_kind_phys, 9.614854e-03_kind_phys, 9.202335e-03_kind_phys, & !4 + 8.814470e-03_kind_phys, 8.449077e-03_kind_phys, 8.104223e-03_kind_phys, 7.778195e-03_kind_phys, 7.469466e-03_kind_phys, & !4 + 7.176671e-03_kind_phys, 6.898588e-03_kind_phys, 6.634117e-03_kind_phys, 6.382264e-03_kind_phys, 6.142134e-03_kind_phys, & !4 + 5.912913e-03_kind_phys, 5.693862e-03_kind_phys, 5.484308e-03_kind_phys, & !4 + 2.131806e-01_kind_phys, 1.311372e-01_kind_phys, 9.407171e-02_kind_phys, 7.299442e-02_kind_phys, 5.941273e-02_kind_phys, & !5 + 4.994043e-02_kind_phys, 4.296242e-02_kind_phys, 3.761113e-02_kind_phys, 3.337910e-02_kind_phys, 2.994978e-02_kind_phys, & !5 + 2.711556e-02_kind_phys, 2.473461e-02_kind_phys, 2.270681e-02_kind_phys, 2.095943e-02_kind_phys, 1.943839e-02_kind_phys, & !5 + 1.810267e-02_kind_phys, 1.692057e-02_kind_phys, 1.586719e-02_kind_phys, 1.492275e-02_kind_phys, 1.407132e-02_kind_phys, & !5 + 1.329989e-02_kind_phys, 1.259780e-02_kind_phys, 1.195618e-02_kind_phys, 1.136761e-02_kind_phys, 1.082583e-02_kind_phys, & !5 + 1.032552e-02_kind_phys, 9.862158e-03_kind_phys, 9.431827e-03_kind_phys, 9.031157e-03_kind_phys, 8.657217e-03_kind_phys, & !5 + 8.307449e-03_kind_phys, 7.979609e-03_kind_phys, 7.671724e-03_kind_phys, 7.382048e-03_kind_phys, 7.109032e-03_kind_phys, & !5 + 6.851298e-03_kind_phys, 6.607615e-03_kind_phys, 6.376881e-03_kind_phys, 6.158105e-03_kind_phys, 5.950394e-03_kind_phys, & !5 + 5.752942e-03_kind_phys, 5.565019e-03_kind_phys, 5.385963e-03_kind_phys, & !5 + 1.546177e-01_kind_phys, 1.039251e-01_kind_phys, 7.910347e-02_kind_phys, 6.412429e-02_kind_phys, 5.399997e-02_kind_phys, & !6 + 4.664937e-02_kind_phys, 4.104237e-02_kind_phys, 3.660781e-02_kind_phys, 3.300218e-02_kind_phys, 3.000586e-02_kind_phys, & !6 + 2.747148e-02_kind_phys, 2.529633e-02_kind_phys, 2.340647e-02_kind_phys, 2.174723e-02_kind_phys, 2.027731e-02_kind_phys, & !6 + 1.896487e-02_kind_phys, 1.778492e-02_kind_phys, 1.671761e-02_kind_phys, 1.574692e-02_kind_phys, 1.485978e-02_kind_phys, & !6 + 1.404543e-02_kind_phys, 1.329489e-02_kind_phys, 1.260066e-02_kind_phys, 1.195636e-02_kind_phys, 1.135657e-02_kind_phys, & !6 + 1.079664e-02_kind_phys, 1.027257e-02_kind_phys, 9.780871e-03_kind_phys, 9.318505e-03_kind_phys, 8.882815e-03_kind_phys, & !6 + 8.471458e-03_kind_phys, 8.082364e-03_kind_phys, 7.713696e-03_kind_phys, 7.363817e-03_kind_phys, 7.031264e-03_kind_phys, & !6 + 6.714725e-03_kind_phys, 6.413021e-03_kind_phys, 6.125086e-03_kind_phys, 5.849958e-03_kind_phys, 5.586764e-03_kind_phys, & !6 + 5.334707e-03_kind_phys, 5.093066e-03_kind_phys, 4.861179e-03_kind_phys, & !6 + 7.583404e-02_kind_phys, 6.181558e-02_kind_phys, 5.312027e-02_kind_phys, 4.696039e-02_kind_phys, 4.225986e-02_kind_phys, & !7 + 3.849735e-02_kind_phys, 3.538340e-02_kind_phys, 3.274182e-02_kind_phys, 3.045798e-02_kind_phys, 2.845343e-02_kind_phys, & !7 + 2.667231e-02_kind_phys, 2.507353e-02_kind_phys, 2.362606e-02_kind_phys, 2.230595e-02_kind_phys, 2.109435e-02_kind_phys, & !7 + 1.997617e-02_kind_phys, 1.893916e-02_kind_phys, 1.797328e-02_kind_phys, 1.707016e-02_kind_phys, 1.622279e-02_kind_phys, & !7 + 1.542523e-02_kind_phys, 1.467241e-02_kind_phys, 1.395997e-02_kind_phys, 1.328414e-02_kind_phys, 1.264164e-02_kind_phys, & !7 + 1.202958e-02_kind_phys, 1.144544e-02_kind_phys, 1.088697e-02_kind_phys, 1.035218e-02_kind_phys, 9.839297e-03_kind_phys, & !7 + 9.346733e-03_kind_phys, 8.873057e-03_kind_phys, 8.416980e-03_kind_phys, 7.977335e-03_kind_phys, 7.553066e-03_kind_phys, & !7 + 7.143210e-03_kind_phys, 6.746888e-03_kind_phys, 6.363297e-03_kind_phys, 5.991700e-03_kind_phys, 5.631422e-03_kind_phys, & !7 + 5.281840e-03_kind_phys, 4.942378e-03_kind_phys, 4.612505e-03_kind_phys, & !7 + 9.022185e-02_kind_phys, 6.922700e-02_kind_phys, 5.710674e-02_kind_phys, 4.898377e-02_kind_phys, 4.305946e-02_kind_phys, & !8 + 3.849553e-02_kind_phys, 3.484183e-02_kind_phys, 3.183220e-02_kind_phys, 2.929794e-02_kind_phys, 2.712627e-02_kind_phys, & !8 + 2.523856e-02_kind_phys, 2.357810e-02_kind_phys, 2.210286e-02_kind_phys, 2.078089e-02_kind_phys, 1.958747e-02_kind_phys, & !8 + 1.850310e-02_kind_phys, 1.751218e-02_kind_phys, 1.660205e-02_kind_phys, 1.576232e-02_kind_phys, 1.498440e-02_kind_phys, & !8 + 1.426107e-02_kind_phys, 1.358624e-02_kind_phys, 1.295474e-02_kind_phys, 1.236212e-02_kind_phys, 1.180456e-02_kind_phys, & !8 + 1.127874e-02_kind_phys, 1.078175e-02_kind_phys, 1.031106e-02_kind_phys, 9.864433e-03_kind_phys, 9.439878e-03_kind_phys, & !8 + 9.035637e-03_kind_phys, 8.650140e-03_kind_phys, 8.281981e-03_kind_phys, 7.929895e-03_kind_phys, 7.592746e-03_kind_phys, & !8 + 7.269505e-03_kind_phys, 6.959238e-03_kind_phys, 6.661100e-03_kind_phys, 6.374317e-03_kind_phys, 6.098185e-03_kind_phys, & !8 + 5.832059e-03_kind_phys, 5.575347e-03_kind_phys, 5.327504e-03_kind_phys, & !8 + 1.294087e-01_kind_phys, 8.788217e-02_kind_phys, 6.728288e-02_kind_phys, 5.479720e-02_kind_phys, 4.635049e-02_kind_phys, & !9 + 4.022253e-02_kind_phys, 3.555576e-02_kind_phys, 3.187259e-02_kind_phys, 2.888498e-02_kind_phys, 2.640843e-02_kind_phys, & !9 + 2.431904e-02_kind_phys, 2.253038e-02_kind_phys, 2.098024e-02_kind_phys, 1.962267e-02_kind_phys, 1.842293e-02_kind_phys, & !9 + 1.735426e-02_kind_phys, 1.639571e-02_kind_phys, 1.553060e-02_kind_phys, 1.474552e-02_kind_phys, 1.402953e-02_kind_phys, & !9 + 1.337363e-02_kind_phys, 1.277033e-02_kind_phys, 1.221336e-02_kind_phys, 1.169741e-02_kind_phys, 1.121797e-02_kind_phys, & !9 + 1.077117e-02_kind_phys, 1.035369e-02_kind_phys, 9.962643e-03_kind_phys, 9.595509e-03_kind_phys, 9.250088e-03_kind_phys, & !9 + 8.924447e-03_kind_phys, 8.616876e-03_kind_phys, 8.325862e-03_kind_phys, 8.050057e-03_kind_phys, 7.788258e-03_kind_phys, & !9 + 7.539388e-03_kind_phys, 7.302478e-03_kind_phys, 7.076656e-03_kind_phys, 6.861134e-03_kind_phys, 6.655197e-03_kind_phys, & !9 + 6.458197e-03_kind_phys, 6.269543e-03_kind_phys, 6.088697e-03_kind_phys, & !9 + 1.593628e-01_kind_phys, 1.014552e-01_kind_phys, 7.458955e-02_kind_phys, 5.903571e-02_kind_phys, 4.887582e-02_kind_phys, & !10 + 4.171159e-02_kind_phys, 3.638480e-02_kind_phys, 3.226692e-02_kind_phys, 2.898717e-02_kind_phys, 2.631256e-02_kind_phys, & !10 + 2.408925e-02_kind_phys, 2.221156e-02_kind_phys, 2.060448e-02_kind_phys, 1.921325e-02_kind_phys, 1.799699e-02_kind_phys, & !10 + 1.692456e-02_kind_phys, 1.597177e-02_kind_phys, 1.511961e-02_kind_phys, 1.435289e-02_kind_phys, 1.365933e-02_kind_phys, & !10 + 1.302890e-02_kind_phys, 1.245334e-02_kind_phys, 1.192576e-02_kind_phys, 1.144037e-02_kind_phys, 1.099230e-02_kind_phys, & !10 + 1.057739e-02_kind_phys, 1.019208e-02_kind_phys, 9.833302e-03_kind_phys, 9.498395e-03_kind_phys, 9.185047e-03_kind_phys, & !10 + 8.891237e-03_kind_phys, 8.615185e-03_kind_phys, 8.355325e-03_kind_phys, 8.110267e-03_kind_phys, 7.878778e-03_kind_phys, & !10 + 7.659759e-03_kind_phys, 7.452224e-03_kind_phys, 7.255291e-03_kind_phys, 7.068166e-03_kind_phys, 6.890130e-03_kind_phys, & !10 + 6.720536e-03_kind_phys, 6.558794e-03_kind_phys, 6.404371e-03_kind_phys, & !10 + 1.656227e-01_kind_phys, 1.032129e-01_kind_phys, 7.487359e-02_kind_phys, 5.871431e-02_kind_phys, 4.828355e-02_kind_phys, & !11 + 4.099989e-02_kind_phys, 3.562924e-02_kind_phys, 3.150755e-02_kind_phys, 2.824593e-02_kind_phys, 2.560156e-02_kind_phys, & !11 + 2.341503e-02_kind_phys, 2.157740e-02_kind_phys, 2.001169e-02_kind_phys, 1.866199e-02_kind_phys, 1.748669e-02_kind_phys, & !11 + 1.645421e-02_kind_phys, 1.554015e-02_kind_phys, 1.472535e-02_kind_phys, 1.399457e-02_kind_phys, 1.333553e-02_kind_phys, & !11 + 1.273821e-02_kind_phys, 1.219440e-02_kind_phys, 1.169725e-02_kind_phys, 1.124104e-02_kind_phys, 1.082096e-02_kind_phys, & !11 + 1.043290e-02_kind_phys, 1.007336e-02_kind_phys, 9.739338e-03_kind_phys, 9.428223e-03_kind_phys, 9.137756e-03_kind_phys, & !11 + 8.865964e-03_kind_phys, 8.611115e-03_kind_phys, 8.371686e-03_kind_phys, 8.146330e-03_kind_phys, 7.933852e-03_kind_phys, & !11 + 7.733187e-03_kind_phys, 7.543386e-03_kind_phys, 7.363597e-03_kind_phys, 7.193056e-03_kind_phys, 7.031072e-03_kind_phys, & !11 + 6.877024e-03_kind_phys, 6.730348e-03_kind_phys, 6.590531e-03_kind_phys, & !11 + 9.194591e-02_kind_phys, 6.446867e-02_kind_phys, 4.962034e-02_kind_phys, 4.042061e-02_kind_phys, 3.418456e-02_kind_phys, & !12 + 2.968856e-02_kind_phys, 2.629900e-02_kind_phys, 2.365572e-02_kind_phys, 2.153915e-02_kind_phys, 1.980791e-02_kind_phys, & !12 + 1.836689e-02_kind_phys, 1.714979e-02_kind_phys, 1.610900e-02_kind_phys, 1.520946e-02_kind_phys, 1.442476e-02_kind_phys, & !12 + 1.373468e-02_kind_phys, 1.312345e-02_kind_phys, 1.257858e-02_kind_phys, 1.209010e-02_kind_phys, 1.164990e-02_kind_phys, & !12 + 1.125136e-02_kind_phys, 1.088901e-02_kind_phys, 1.055827e-02_kind_phys, 1.025531e-02_kind_phys, 9.976896e-03_kind_phys, & !12 + 9.720255e-03_kind_phys, 9.483022e-03_kind_phys, 9.263160e-03_kind_phys, 9.058902e-03_kind_phys, 8.868710e-03_kind_phys, & !12 + 8.691240e-03_kind_phys, 8.525312e-03_kind_phys, 8.369886e-03_kind_phys, 8.224042e-03_kind_phys, 8.086961e-03_kind_phys, & !12 + 7.957917e-03_kind_phys, 7.836258e-03_kind_phys, 7.721400e-03_kind_phys, 7.612821e-03_kind_phys, 7.510045e-03_kind_phys, & !12 + 7.412648e-03_kind_phys, 7.320242e-03_kind_phys, 7.232476e-03_kind_phys, & !12 + 1.437021e-01_kind_phys, 8.872535e-02_kind_phys, 6.392420e-02_kind_phys, 4.991833e-02_kind_phys, 4.096790e-02_kind_phys, & !13 + 3.477881e-02_kind_phys, 3.025782e-02_kind_phys, 2.681909e-02_kind_phys, 2.412102e-02_kind_phys, 2.195132e-02_kind_phys, & !13 + 2.017124e-02_kind_phys, 1.868641e-02_kind_phys, 1.743044e-02_kind_phys, 1.635529e-02_kind_phys, 1.542540e-02_kind_phys, & !13 + 1.461388e-02_kind_phys, 1.390003e-02_kind_phys, 1.326766e-02_kind_phys, 1.270395e-02_kind_phys, 1.219860e-02_kind_phys, & !13 + 1.174326e-02_kind_phys, 1.133107e-02_kind_phys, 1.095637e-02_kind_phys, 1.061442e-02_kind_phys, 1.030126e-02_kind_phys, & !13 + 1.001352e-02_kind_phys, 9.748340e-03_kind_phys, 9.503256e-03_kind_phys, 9.276155e-03_kind_phys, 9.065205e-03_kind_phys, & !13 + 8.868808e-03_kind_phys, 8.685571e-03_kind_phys, 8.514268e-03_kind_phys, 8.353820e-03_kind_phys, 8.203272e-03_kind_phys, & !13 + 8.061776e-03_kind_phys, 7.928578e-03_kind_phys, 7.803001e-03_kind_phys, 7.684443e-03_kind_phys, 7.572358e-03_kind_phys, & !13 + 7.466258e-03_kind_phys, 7.365701e-03_kind_phys, 7.270286e-03_kind_phys, & !13 + 1.288870e-01_kind_phys, 8.160295e-02_kind_phys, 5.964745e-02_kind_phys, 4.703790e-02_kind_phys, 3.888637e-02_kind_phys, & !14 + 3.320115e-02_kind_phys, 2.902017e-02_kind_phys, 2.582259e-02_kind_phys, 2.330224e-02_kind_phys, 2.126754e-02_kind_phys, & !14 + 1.959258e-02_kind_phys, 1.819130e-02_kind_phys, 1.700289e-02_kind_phys, 1.598320e-02_kind_phys, 1.509942e-02_kind_phys, & !14 + 1.432666e-02_kind_phys, 1.364572e-02_kind_phys, 1.304156e-02_kind_phys, 1.250220e-02_kind_phys, 1.201803e-02_kind_phys, & !14 + 1.158123e-02_kind_phys, 1.118537e-02_kind_phys, 1.082513e-02_kind_phys, 1.049605e-02_kind_phys, 1.019440e-02_kind_phys, & !14 + 9.916989e-03_kind_phys, 9.661116e-03_kind_phys, 9.424457e-03_kind_phys, 9.205005e-03_kind_phys, 9.001022e-03_kind_phys, & !14 + 8.810992e-03_kind_phys, 8.633588e-03_kind_phys, 8.467646e-03_kind_phys, 8.312137e-03_kind_phys, 8.166151e-03_kind_phys, & !14 + 8.028878e-03_kind_phys, 7.899597e-03_kind_phys, 7.777663e-03_kind_phys, 7.662498e-03_kind_phys, 7.553581e-03_kind_phys, & !14 + 7.450444e-03_kind_phys, 7.352662e-03_kind_phys, 7.259851e-03_kind_phys, & !14 + 8.254229e-02_kind_phys, 5.808787e-02_kind_phys, 4.492166e-02_kind_phys, 3.675028e-02_kind_phys, 3.119623e-02_kind_phys, & !15 + 2.718045e-02_kind_phys, 2.414450e-02_kind_phys, 2.177073e-02_kind_phys, 1.986526e-02_kind_phys, 1.830306e-02_kind_phys, & !15 + 1.699991e-02_kind_phys, 1.589698e-02_kind_phys, 1.495199e-02_kind_phys, 1.413374e-02_kind_phys, 1.341870e-02_kind_phys, & !15 + 1.278883e-02_kind_phys, 1.223002e-02_kind_phys, 1.173114e-02_kind_phys, 1.128322e-02_kind_phys, 1.087900e-02_kind_phys, & !15 + 1.051254e-02_kind_phys, 1.017890e-02_kind_phys, 9.873991e-03_kind_phys, 9.594347e-03_kind_phys, 9.337044e-03_kind_phys, & !15 + 9.099589e-03_kind_phys, 8.879842e-03_kind_phys, 8.675960e-03_kind_phys, 8.486341e-03_kind_phys, 8.309594e-03_kind_phys, & !15 + 8.144500e-03_kind_phys, 7.989986e-03_kind_phys, 7.845109e-03_kind_phys, 7.709031e-03_kind_phys, 7.581007e-03_kind_phys, & !15 + 7.460376e-03_kind_phys, 7.346544e-03_kind_phys, 7.238978e-03_kind_phys, 7.137201e-03_kind_phys, 7.040780e-03_kind_phys, & !15 + 6.949325e-03_kind_phys, 6.862483e-03_kind_phys, 6.779931e-03_kind_phys, & !15 + 1.382062e-01_kind_phys, 8.643227e-02_kind_phys, 6.282935e-02_kind_phys, 4.934783e-02_kind_phys, 4.063891e-02_kind_phys, & !16 + 3.455591e-02_kind_phys, 3.007059e-02_kind_phys, 2.662897e-02_kind_phys, 2.390631e-02_kind_phys, 2.169972e-02_kind_phys, & !16 + 1.987596e-02_kind_phys, 1.834393e-02_kind_phys, 1.703924e-02_kind_phys, 1.591513e-02_kind_phys, 1.493679e-02_kind_phys, & !16 + 1.407780e-02_kind_phys, 1.331775e-02_kind_phys, 1.264061e-02_kind_phys, 1.203364e-02_kind_phys, 1.148655e-02_kind_phys, & !16 + 1.099099e-02_kind_phys, 1.054006e-02_kind_phys, 1.012807e-02_kind_phys, 9.750215e-03_kind_phys, 9.402477e-03_kind_phys, & !16 + 9.081428e-03_kind_phys, 8.784143e-03_kind_phys, 8.508107e-03_kind_phys, 8.251146e-03_kind_phys, 8.011373e-03_kind_phys, & !16 + 7.787140e-03_kind_phys, 7.577002e-03_kind_phys, 7.379687e-03_kind_phys, 7.194071e-03_kind_phys, 7.019158e-03_kind_phys, & !16 + 6.854061e-03_kind_phys, 6.697986e-03_kind_phys, 6.550224e-03_kind_phys, 6.410138e-03_kind_phys, 6.277153e-03_kind_phys, & !16 + 6.150751e-03_kind_phys, 6.030462e-03_kind_phys, 5.915860e-03_kind_phys/), & !16 + shape=(/43,nBandsLW_RRTMG/)) + + real(kind_phys) , dimension(46,nBandsLW_RRTMG),parameter :: & + absice3 = reshape(source=(/ & + 3.110649e-03_kind_phys, 4.666352e-02_kind_phys, 6.606447e-02_kind_phys, 6.531678e-02_kind_phys, 6.012598e-02_kind_phys, & !1 + 5.437494e-02_kind_phys, 4.906411e-02_kind_phys, 4.441146e-02_kind_phys, 4.040585e-02_kind_phys, 3.697334e-02_kind_phys, & !1 + 3.403027e-02_kind_phys, 3.149979e-02_kind_phys, 2.931596e-02_kind_phys, 2.742365e-02_kind_phys, 2.577721e-02_kind_phys, & !1 + 2.433888e-02_kind_phys, 2.307732e-02_kind_phys, 2.196644e-02_kind_phys, 2.098437e-02_kind_phys, 2.011264e-02_kind_phys, & !1 + 1.933561e-02_kind_phys, 1.863992e-02_kind_phys, 1.801407e-02_kind_phys, 1.744812e-02_kind_phys, 1.693346e-02_kind_phys, & !1 + 1.646252e-02_kind_phys, 1.602866e-02_kind_phys, 1.562600e-02_kind_phys, 1.524933e-02_kind_phys, 1.489399e-02_kind_phys, & !1 + 1.455580e-02_kind_phys, 1.423098e-02_kind_phys, 1.391612e-02_kind_phys, 1.360812e-02_kind_phys, 1.330413e-02_kind_phys, & !1 + 1.300156e-02_kind_phys, 1.269801e-02_kind_phys, 1.239127e-02_kind_phys, 1.207928e-02_kind_phys, 1.176014e-02_kind_phys, & !1 + 1.143204e-02_kind_phys, 1.109334e-02_kind_phys, 1.074243e-02_kind_phys, 1.037786e-02_kind_phys, 9.998198e-03_kind_phys, & !1 + 9.602126e-03_kind_phys, & !1 + 3.984966e-04_kind_phys, 1.681097e-02_kind_phys, 2.627680e-02_kind_phys, 2.767465e-02_kind_phys, 2.700722e-02_kind_phys, & !2 + 2.579180e-02_kind_phys, 2.448677e-02_kind_phys, 2.323890e-02_kind_phys, 2.209096e-02_kind_phys, 2.104882e-02_kind_phys, & !2 + 2.010547e-02_kind_phys, 1.925003e-02_kind_phys, 1.847128e-02_kind_phys, 1.775883e-02_kind_phys, 1.710358e-02_kind_phys, & !2 + 1.649769e-02_kind_phys, 1.593449e-02_kind_phys, 1.540829e-02_kind_phys, 1.491429e-02_kind_phys, 1.444837e-02_kind_phys, & !2 + 1.400704e-02_kind_phys, 1.358729e-02_kind_phys, 1.318654e-02_kind_phys, 1.280258e-02_kind_phys, 1.243346e-02_kind_phys, & !2 + 1.207750e-02_kind_phys, 1.173325e-02_kind_phys, 1.139941e-02_kind_phys, 1.107487e-02_kind_phys, 1.075861e-02_kind_phys, & !2 + 1.044975e-02_kind_phys, 1.014753e-02_kind_phys, 9.851229e-03_kind_phys, 9.560240e-03_kind_phys, 9.274003e-03_kind_phys, & !2 + 8.992020e-03_kind_phys, 8.713845e-03_kind_phys, 8.439074e-03_kind_phys, 8.167346e-03_kind_phys, 7.898331e-03_kind_phys, & !2 + 7.631734e-03_kind_phys, 7.367286e-03_kind_phys, 7.104742e-03_kind_phys, 6.843882e-03_kind_phys, 6.584504e-03_kind_phys, & !2 + 6.326424e-03_kind_phys, & !2 + 6.933163e-02_kind_phys, 8.540475e-02_kind_phys, 7.701816e-02_kind_phys, 6.771158e-02_kind_phys, 5.986953e-02_kind_phys, & !3 + 5.348120e-02_kind_phys, 4.824962e-02_kind_phys, 4.390563e-02_kind_phys, 4.024411e-02_kind_phys, 3.711404e-02_kind_phys, & !3 + 3.440426e-02_kind_phys, 3.203200e-02_kind_phys, 2.993478e-02_kind_phys, 2.806474e-02_kind_phys, 2.638464e-02_kind_phys, & !3 + 2.486516e-02_kind_phys, 2.348288e-02_kind_phys, 2.221890e-02_kind_phys, 2.105780e-02_kind_phys, 1.998687e-02_kind_phys, & !3 + 1.899552e-02_kind_phys, 1.807490e-02_kind_phys, 1.721750e-02_kind_phys, 1.641693e-02_kind_phys, 1.566773e-02_kind_phys, & !3 + 1.496515e-02_kind_phys, 1.430509e-02_kind_phys, 1.368398e-02_kind_phys, 1.309865e-02_kind_phys, 1.254634e-02_kind_phys, & !3 + 1.202456e-02_kind_phys, 1.153114e-02_kind_phys, 1.106409e-02_kind_phys, 1.062166e-02_kind_phys, 1.020224e-02_kind_phys, & !3 + 9.804381e-03_kind_phys, 9.426771e-03_kind_phys, 9.068205e-03_kind_phys, 8.727578e-03_kind_phys, 8.403876e-03_kind_phys, & !3 + 8.096160e-03_kind_phys, 7.803564e-03_kind_phys, 7.525281e-03_kind_phys, 7.260560e-03_kind_phys, 7.008697e-03_kind_phys, & !3 + 6.769036e-03_kind_phys, & !3 + 1.765735e-01_kind_phys, 1.382700e-01_kind_phys, 1.095129e-01_kind_phys, 8.987475e-02_kind_phys, 7.591185e-02_kind_phys, & !4 + 6.554169e-02_kind_phys, 5.755500e-02_kind_phys, 5.122083e-02_kind_phys, 4.607610e-02_kind_phys, 4.181475e-02_kind_phys, & !4 + 3.822697e-02_kind_phys, 3.516432e-02_kind_phys, 3.251897e-02_kind_phys, 3.021073e-02_kind_phys, 2.817876e-02_kind_phys, & !4 + 2.637607e-02_kind_phys, 2.476582e-02_kind_phys, 2.331871e-02_kind_phys, 2.201113e-02_kind_phys, 2.082388e-02_kind_phys, & !4 + 1.974115e-02_kind_phys, 1.874983e-02_kind_phys, 1.783894e-02_kind_phys, 1.699922e-02_kind_phys, 1.622280e-02_kind_phys, & !4 + 1.550296e-02_kind_phys, 1.483390e-02_kind_phys, 1.421064e-02_kind_phys, 1.362880e-02_kind_phys, 1.308460e-02_kind_phys, & !4 + 1.257468e-02_kind_phys, 1.209611e-02_kind_phys, 1.164628e-02_kind_phys, 1.122287e-02_kind_phys, 1.082381e-02_kind_phys, & !4 + 1.044725e-02_kind_phys, 1.009154e-02_kind_phys, 9.755166e-03_kind_phys, 9.436783e-03_kind_phys, 9.135163e-03_kind_phys, & !4 + 8.849193e-03_kind_phys, 8.577856e-03_kind_phys, 8.320225e-03_kind_phys, 8.075451e-03_kind_phys, 7.842755e-03_kind_phys, & !4 + 7.621418e-03_kind_phys, & !4 + 2.339673e-01_kind_phys, 1.692124e-01_kind_phys, 1.291656e-01_kind_phys, 1.033837e-01_kind_phys, 8.562949e-02_kind_phys, & !5 + 7.273526e-02_kind_phys, 6.298262e-02_kind_phys, 5.537015e-02_kind_phys, 4.927787e-02_kind_phys, 4.430246e-02_kind_phys, & !5 + 4.017061e-02_kind_phys, 3.669072e-02_kind_phys, 3.372455e-02_kind_phys, 3.116995e-02_kind_phys, 2.894977e-02_kind_phys, & !5 + 2.700471e-02_kind_phys, 2.528842e-02_kind_phys, 2.376420e-02_kind_phys, 2.240256e-02_kind_phys, 2.117959e-02_kind_phys, & !5 + 2.007567e-02_kind_phys, 1.907456e-02_kind_phys, 1.816271e-02_kind_phys, 1.732874e-02_kind_phys, 1.656300e-02_kind_phys, & !5 + 1.585725e-02_kind_phys, 1.520445e-02_kind_phys, 1.459852e-02_kind_phys, 1.403419e-02_kind_phys, 1.350689e-02_kind_phys, & !5 + 1.301260e-02_kind_phys, 1.254781e-02_kind_phys, 1.210941e-02_kind_phys, 1.169468e-02_kind_phys, 1.130118e-02_kind_phys, & !5 + 1.092675e-02_kind_phys, 1.056945e-02_kind_phys, 1.022757e-02_kind_phys, 9.899560e-03_kind_phys, 9.584021e-03_kind_phys, & !5 + 9.279705e-03_kind_phys, 8.985479e-03_kind_phys, 8.700322e-03_kind_phys, 8.423306e-03_kind_phys, 8.153590e-03_kind_phys, & !5 + 7.890412e-03_kind_phys, & !5 + 1.145369e-01_kind_phys, 1.174566e-01_kind_phys, 9.917866e-02_kind_phys, 8.332990e-02_kind_phys, 7.104263e-02_kind_phys, & !6 + 6.153370e-02_kind_phys, 5.405472e-02_kind_phys, 4.806281e-02_kind_phys, 4.317918e-02_kind_phys, 3.913795e-02_kind_phys, & !6 + 3.574916e-02_kind_phys, 3.287437e-02_kind_phys, 3.041067e-02_kind_phys, 2.828017e-02_kind_phys, 2.642292e-02_kind_phys, & !6 + 2.479206e-02_kind_phys, 2.335051e-02_kind_phys, 2.206851e-02_kind_phys, 2.092195e-02_kind_phys, 1.989108e-02_kind_phys, & !6 + 1.895958e-02_kind_phys, 1.811385e-02_kind_phys, 1.734245e-02_kind_phys, 1.663573e-02_kind_phys, 1.598545e-02_kind_phys, & !6 + 1.538456e-02_kind_phys, 1.482700e-02_kind_phys, 1.430750e-02_kind_phys, 1.382150e-02_kind_phys, 1.336499e-02_kind_phys, & !6 + 1.293447e-02_kind_phys, 1.252685e-02_kind_phys, 1.213939e-02_kind_phys, 1.176968e-02_kind_phys, 1.141555e-02_kind_phys, & !6 + 1.107508e-02_kind_phys, 1.074655e-02_kind_phys, 1.042839e-02_kind_phys, 1.011923e-02_kind_phys, 9.817799e-03_kind_phys, & !6 + 9.522962e-03_kind_phys, 9.233688e-03_kind_phys, 8.949041e-03_kind_phys, 8.668171e-03_kind_phys, 8.390301e-03_kind_phys, & !6 + 8.114723e-03_kind_phys, & !6 + 1.222345e-02_kind_phys, 5.344230e-02_kind_phys, 5.523465e-02_kind_phys, 5.128759e-02_kind_phys, 4.676925e-02_kind_phys, & !7 + 4.266150e-02_kind_phys, 3.910561e-02_kind_phys, 3.605479e-02_kind_phys, 3.342843e-02_kind_phys, 3.115052e-02_kind_phys, & !7 + 2.915776e-02_kind_phys, 2.739935e-02_kind_phys, 2.583499e-02_kind_phys, 2.443266e-02_kind_phys, 2.316681e-02_kind_phys, & !7 + 2.201687e-02_kind_phys, 2.096619e-02_kind_phys, 2.000112e-02_kind_phys, 1.911044e-02_kind_phys, 1.828481e-02_kind_phys, & !7 + 1.751641e-02_kind_phys, 1.679866e-02_kind_phys, 1.612598e-02_kind_phys, 1.549360e-02_kind_phys, 1.489742e-02_kind_phys, & !7 + 1.433392e-02_kind_phys, 1.380002e-02_kind_phys, 1.329305e-02_kind_phys, 1.281068e-02_kind_phys, 1.235084e-02_kind_phys, & !7 + 1.191172e-02_kind_phys, 1.149171e-02_kind_phys, 1.108936e-02_kind_phys, 1.070341e-02_kind_phys, 1.033271e-02_kind_phys, & !7 + 9.976220e-03_kind_phys, 9.633021e-03_kind_phys, 9.302273e-03_kind_phys, 8.983216e-03_kind_phys, 8.675161e-03_kind_phys, & !7 + 8.377478e-03_kind_phys, 8.089595e-03_kind_phys, 7.810986e-03_kind_phys, 7.541170e-03_kind_phys, 7.279706e-03_kind_phys, & !7 + 7.026186e-03_kind_phys, & !7 + 6.711058e-02_kind_phys, 6.918198e-02_kind_phys, 6.127484e-02_kind_phys, 5.411944e-02_kind_phys, 4.836902e-02_kind_phys, & !8 + 4.375293e-02_kind_phys, 3.998077e-02_kind_phys, 3.683587e-02_kind_phys, 3.416508e-02_kind_phys, 3.186003e-02_kind_phys, & !8 + 2.984290e-02_kind_phys, 2.805671e-02_kind_phys, 2.645895e-02_kind_phys, 2.501733e-02_kind_phys, 2.370689e-02_kind_phys, & !8 + 2.250808e-02_kind_phys, 2.140532e-02_kind_phys, 2.038609e-02_kind_phys, 1.944018e-02_kind_phys, 1.855918e-02_kind_phys, & !8 + 1.773609e-02_kind_phys, 1.696504e-02_kind_phys, 1.624106e-02_kind_phys, 1.555990e-02_kind_phys, 1.491793e-02_kind_phys, & !8 + 1.431197e-02_kind_phys, 1.373928e-02_kind_phys, 1.319743e-02_kind_phys, 1.268430e-02_kind_phys, 1.219799e-02_kind_phys, & !8 + 1.173682e-02_kind_phys, 1.129925e-02_kind_phys, 1.088393e-02_kind_phys, 1.048961e-02_kind_phys, 1.011516e-02_kind_phys, & !8 + 9.759543e-03_kind_phys, 9.421813e-03_kind_phys, 9.101089e-03_kind_phys, 8.796559e-03_kind_phys, 8.507464e-03_kind_phys, & !8 + 8.233098e-03_kind_phys, 7.972798e-03_kind_phys, 7.725942e-03_kind_phys, 7.491940e-03_kind_phys, 7.270238e-03_kind_phys, & !8 + 7.060305e-03_kind_phys, & !8 + 1.236780e-01_kind_phys, 9.222386e-02_kind_phys, 7.383997e-02_kind_phys, 6.204072e-02_kind_phys, 5.381029e-02_kind_phys, & !9 + 4.770678e-02_kind_phys, 4.296928e-02_kind_phys, 3.916131e-02_kind_phys, 3.601540e-02_kind_phys, 3.335878e-02_kind_phys, & !9 + 3.107493e-02_kind_phys, 2.908247e-02_kind_phys, 2.732282e-02_kind_phys, 2.575276e-02_kind_phys, 2.433968e-02_kind_phys, & !9 + 2.305852e-02_kind_phys, 2.188966e-02_kind_phys, 2.081757e-02_kind_phys, 1.982974e-02_kind_phys, 1.891599e-02_kind_phys, & !9 + 1.806794e-02_kind_phys, 1.727865e-02_kind_phys, 1.654227e-02_kind_phys, 1.585387e-02_kind_phys, 1.520924e-02_kind_phys, & !9 + 1.460476e-02_kind_phys, 1.403730e-02_kind_phys, 1.350416e-02_kind_phys, 1.300293e-02_kind_phys, 1.253153e-02_kind_phys, & !9 + 1.208808e-02_kind_phys, 1.167094e-02_kind_phys, 1.127862e-02_kind_phys, 1.090979e-02_kind_phys, 1.056323e-02_kind_phys, & !9 + 1.023786e-02_kind_phys, 9.932665e-03_kind_phys, 9.646744e-03_kind_phys, 9.379250e-03_kind_phys, 9.129409e-03_kind_phys, & !9 + 8.896500e-03_kind_phys, 8.679856e-03_kind_phys, 8.478852e-03_kind_phys, 8.292904e-03_kind_phys, 8.121463e-03_kind_phys, & !9 + 7.964013e-03_kind_phys, & !9 + 1.655966e-01_kind_phys, 1.134205e-01_kind_phys, 8.714344e-02_kind_phys, 7.129241e-02_kind_phys, 6.063739e-02_kind_phys, & !10 + 5.294203e-02_kind_phys, 4.709309e-02_kind_phys, 4.247476e-02_kind_phys, 3.871892e-02_kind_phys, 3.559206e-02_kind_phys, & !10 + 3.293893e-02_kind_phys, 3.065226e-02_kind_phys, 2.865558e-02_kind_phys, 2.689288e-02_kind_phys, 2.532221e-02_kind_phys, & !10 + 2.391150e-02_kind_phys, 2.263582e-02_kind_phys, 2.147549e-02_kind_phys, 2.041476e-02_kind_phys, 1.944089e-02_kind_phys, & !10 + 1.854342e-02_kind_phys, 1.771371e-02_kind_phys, 1.694456e-02_kind_phys, 1.622989e-02_kind_phys, 1.556456e-02_kind_phys, & !10 + 1.494415e-02_kind_phys, 1.436491e-02_kind_phys, 1.382354e-02_kind_phys, 1.331719e-02_kind_phys, 1.284339e-02_kind_phys, & !10 + 1.239992e-02_kind_phys, 1.198486e-02_kind_phys, 1.159647e-02_kind_phys, 1.123323e-02_kind_phys, 1.089375e-02_kind_phys, & !10 + 1.057679e-02_kind_phys, 1.028124e-02_kind_phys, 1.000607e-02_kind_phys, 9.750376e-03_kind_phys, 9.513303e-03_kind_phys, & !10 + 9.294082e-03_kind_phys, 9.092003e-03_kind_phys, 8.906412e-03_kind_phys, 8.736702e-03_kind_phys, 8.582314e-03_kind_phys, & !10 + 8.442725e-03_kind_phys, & !10 + 1.775615e-01_kind_phys, 1.180046e-01_kind_phys, 8.929607e-02_kind_phys, 7.233500e-02_kind_phys, 6.108333e-02_kind_phys, & !11 + 5.303642e-02_kind_phys, 4.696927e-02_kind_phys, 4.221206e-02_kind_phys, 3.836768e-02_kind_phys, 3.518576e-02_kind_phys, & !11 + 3.250063e-02_kind_phys, 3.019825e-02_kind_phys, 2.819758e-02_kind_phys, 2.643943e-02_kind_phys, 2.487953e-02_kind_phys, & !11 + 2.348414e-02_kind_phys, 2.222705e-02_kind_phys, 2.108762e-02_kind_phys, 2.004936e-02_kind_phys, 1.909892e-02_kind_phys, & !11 + 1.822539e-02_kind_phys, 1.741975e-02_kind_phys, 1.667449e-02_kind_phys, 1.598330e-02_kind_phys, 1.534084e-02_kind_phys, & !11 + 1.474253e-02_kind_phys, 1.418446e-02_kind_phys, 1.366325e-02_kind_phys, 1.317597e-02_kind_phys, 1.272004e-02_kind_phys, & !11 + 1.229321e-02_kind_phys, 1.189350e-02_kind_phys, 1.151915e-02_kind_phys, 1.116859e-02_kind_phys, 1.084042e-02_kind_phys, & !11 + 1.053338e-02_kind_phys, 1.024636e-02_kind_phys, 9.978326e-03_kind_phys, 9.728357e-03_kind_phys, 9.495613e-03_kind_phys, & !11 + 9.279327e-03_kind_phys, 9.078798e-03_kind_phys, 8.893383e-03_kind_phys, 8.722488e-03_kind_phys, 8.565568e-03_kind_phys, & !11 + 8.422115e-03_kind_phys, & !11 + 9.465447e-02_kind_phys, 6.432047e-02_kind_phys, 5.060973e-02_kind_phys, 4.267283e-02_kind_phys, 3.741843e-02_kind_phys, & !12 + 3.363096e-02_kind_phys, 3.073531e-02_kind_phys, 2.842405e-02_kind_phys, 2.651789e-02_kind_phys, 2.490518e-02_kind_phys, & !12 + 2.351273e-02_kind_phys, 2.229056e-02_kind_phys, 2.120335e-02_kind_phys, 2.022541e-02_kind_phys, 1.933763e-02_kind_phys, & !12 + 1.852546e-02_kind_phys, 1.777763e-02_kind_phys, 1.708528e-02_kind_phys, 1.644134e-02_kind_phys, 1.584009e-02_kind_phys, & !12 + 1.527684e-02_kind_phys, 1.474774e-02_kind_phys, 1.424955e-02_kind_phys, 1.377957e-02_kind_phys, 1.333549e-02_kind_phys, & !12 + 1.291534e-02_kind_phys, 1.251743e-02_kind_phys, 1.214029e-02_kind_phys, 1.178265e-02_kind_phys, 1.144337e-02_kind_phys, & !12 + 1.112148e-02_kind_phys, 1.081609e-02_kind_phys, 1.052642e-02_kind_phys, 1.025178e-02_kind_phys, 9.991540e-03_kind_phys, & !12 + 9.745130e-03_kind_phys, 9.512038e-03_kind_phys, 9.291797e-03_kind_phys, 9.083980e-03_kind_phys, 8.888195e-03_kind_phys, & !12 + 8.704081e-03_kind_phys, 8.531306e-03_kind_phys, 8.369560e-03_kind_phys, 8.218558e-03_kind_phys, 8.078032e-03_kind_phys, & !12 + 7.947730e-03_kind_phys, & !12 + 1.560311e-01_kind_phys, 9.961097e-02_kind_phys, 7.502949e-02_kind_phys, 6.115022e-02_kind_phys, 5.214952e-02_kind_phys, & !13 + 4.578149e-02_kind_phys, 4.099731e-02_kind_phys, 3.724174e-02_kind_phys, 3.419343e-02_kind_phys, 3.165356e-02_kind_phys, & !13 + 2.949251e-02_kind_phys, 2.762222e-02_kind_phys, 2.598073e-02_kind_phys, 2.452322e-02_kind_phys, 2.321642e-02_kind_phys, & !13 + 2.203516e-02_kind_phys, 2.096002e-02_kind_phys, 1.997579e-02_kind_phys, 1.907036e-02_kind_phys, 1.823401e-02_kind_phys, & !13 + 1.745879e-02_kind_phys, 1.673819e-02_kind_phys, 1.606678e-02_kind_phys, 1.544003e-02_kind_phys, 1.485411e-02_kind_phys, & !13 + 1.430574e-02_kind_phys, 1.379215e-02_kind_phys, 1.331092e-02_kind_phys, 1.285996e-02_kind_phys, 1.243746e-02_kind_phys, & !13 + 1.204183e-02_kind_phys, 1.167164e-02_kind_phys, 1.132567e-02_kind_phys, 1.100281e-02_kind_phys, 1.070207e-02_kind_phys, & !13 + 1.042258e-02_kind_phys, 1.016352e-02_kind_phys, 9.924197e-03_kind_phys, 9.703953e-03_kind_phys, 9.502199e-03_kind_phys, & !13 + 9.318400e-03_kind_phys, 9.152066e-03_kind_phys, 9.002749e-03_kind_phys, 8.870038e-03_kind_phys, 8.753555e-03_kind_phys, & !13 + 8.652951e-03_kind_phys, & !13 + 1.559547e-01_kind_phys, 9.896700e-02_kind_phys, 7.441231e-02_kind_phys, 6.061469e-02_kind_phys, 5.168730e-02_kind_phys, & !14 + 4.537821e-02_kind_phys, 4.064106e-02_kind_phys, 3.692367e-02_kind_phys, 3.390714e-02_kind_phys, 3.139438e-02_kind_phys, & !14 + 2.925702e-02_kind_phys, 2.740783e-02_kind_phys, 2.578547e-02_kind_phys, 2.434552e-02_kind_phys, 2.305506e-02_kind_phys, & !14 + 2.188910e-02_kind_phys, 2.082842e-02_kind_phys, 1.985789e-02_kind_phys, 1.896553e-02_kind_phys, 1.814165e-02_kind_phys, & !14 + 1.737839e-02_kind_phys, 1.666927e-02_kind_phys, 1.600891e-02_kind_phys, 1.539279e-02_kind_phys, 1.481712e-02_kind_phys, & !14 + 1.427865e-02_kind_phys, 1.377463e-02_kind_phys, 1.330266e-02_kind_phys, 1.286068e-02_kind_phys, 1.244689e-02_kind_phys, & !14 + 1.205973e-02_kind_phys, 1.169780e-02_kind_phys, 1.135989e-02_kind_phys, 1.104492e-02_kind_phys, 1.075192e-02_kind_phys, & !14 + 1.048004e-02_kind_phys, 1.022850e-02_kind_phys, 9.996611e-03_kind_phys, 9.783753e-03_kind_phys, 9.589361e-03_kind_phys, & !14 + 9.412924e-03_kind_phys, 9.253977e-03_kind_phys, 9.112098e-03_kind_phys, 8.986903e-03_kind_phys, 8.878039e-03_kind_phys, & !14 + 8.785184e-03_kind_phys, & !14 + 1.102926e-01_kind_phys, 7.176622e-02_kind_phys, 5.530316e-02_kind_phys, 4.606056e-02_kind_phys, 4.006116e-02_kind_phys, & !15 + 3.579628e-02_kind_phys, 3.256909e-02_kind_phys, 3.001360e-02_kind_phys, 2.791920e-02_kind_phys, 2.615617e-02_kind_phys, & !15 + 2.464023e-02_kind_phys, 2.331426e-02_kind_phys, 2.213817e-02_kind_phys, 2.108301e-02_kind_phys, 2.012733e-02_kind_phys, & !15 + 1.925493e-02_kind_phys, 1.845331e-02_kind_phys, 1.771269e-02_kind_phys, 1.702531e-02_kind_phys, 1.638493e-02_kind_phys, & !15 + 1.578648e-02_kind_phys, 1.522579e-02_kind_phys, 1.469940e-02_kind_phys, 1.420442e-02_kind_phys, 1.373841e-02_kind_phys, & !15 + 1.329931e-02_kind_phys, 1.288535e-02_kind_phys, 1.249502e-02_kind_phys, 1.212700e-02_kind_phys, 1.178015e-02_kind_phys, & !15 + 1.145348e-02_kind_phys, 1.114612e-02_kind_phys, 1.085730e-02_kind_phys, 1.058633e-02_kind_phys, 1.033263e-02_kind_phys, & !15 + 1.009564e-02_kind_phys, 9.874895e-03_kind_phys, 9.669960e-03_kind_phys, 9.480449e-03_kind_phys, 9.306014e-03_kind_phys, & !15 + 9.146339e-03_kind_phys, 9.001138e-03_kind_phys, 8.870154e-03_kind_phys, 8.753148e-03_kind_phys, 8.649907e-03_kind_phys, & !15 + 8.560232e-03_kind_phys, & !15 + 1.688344e-01_kind_phys, 1.077072e-01_kind_phys, 7.994467e-02_kind_phys, 6.403862e-02_kind_phys, 5.369850e-02_kind_phys, & !16 + 4.641582e-02_kind_phys, 4.099331e-02_kind_phys, 3.678724e-02_kind_phys, 3.342069e-02_kind_phys, 3.065831e-02_kind_phys, & !16 + 2.834557e-02_kind_phys, 2.637680e-02_kind_phys, 2.467733e-02_kind_phys, 2.319286e-02_kind_phys, 2.188299e-02_kind_phys, & !16 + 2.071701e-02_kind_phys, 1.967121e-02_kind_phys, 1.872692e-02_kind_phys, 1.786931e-02_kind_phys, 1.708641e-02_kind_phys, & !16 + 1.636846e-02_kind_phys, 1.570743e-02_kind_phys, 1.509665e-02_kind_phys, 1.453052e-02_kind_phys, 1.400433e-02_kind_phys, & !16 + 1.351407e-02_kind_phys, 1.305631e-02_kind_phys, 1.262810e-02_kind_phys, 1.222688e-02_kind_phys, 1.185044e-02_kind_phys, & !16 + 1.149683e-02_kind_phys, 1.116436e-02_kind_phys, 1.085153e-02_kind_phys, 1.055701e-02_kind_phys, 1.027961e-02_kind_phys, & !16 + 1.001831e-02_kind_phys, 9.772141e-03_kind_phys, 9.540280e-03_kind_phys, 9.321966e-03_kind_phys, 9.116517e-03_kind_phys, & !16 + 8.923315e-03_kind_phys, 8.741803e-03_kind_phys, 8.571472e-03_kind_phys, 8.411860e-03_kind_phys, 8.262543e-03_kind_phys, & !16 + 8.123136e-03_kind_phys/), & !16 + shape=(/46,nBandsLW_RRTMG/)) +contains + ! ####################################################################################### + ! subroutine rrtmgp_lw_cloud_optics + ! ####################################################################################### + subroutine rrtmgp_lw_cloud_optics(ncol, nlay, nBandsLW, cld_lwp, cld_ref_liq, cld_iwp, & + cld_ref_ice, cld_rwp, cld_ref_rain, cld_swp, cld_ref_snow, cld_frac, tau_cld) + ! Inputs + integer,intent(in) :: & + nBandsLW, & ! Number of spectral bands + ncol, & ! Number of horizontal gridpoints + nlay ! Number of vertical layers + real(kind_phys), dimension(ncol,nlay), intent(in) :: & + cld_frac, & ! Cloud-fraction (1) + cld_lwp, & ! Cloud liquid water path (g/m2) + cld_ref_liq, & ! Effective radius (liquid) (micron) + cld_iwp, & ! Cloud ice water path (g/m2) + cld_ref_ice, & ! Effective radius (ice) (micron) + cld_rwp, & ! Cloud rain water path (g/m2) + cld_ref_rain, & ! Effective radius (rain-drop) (micron) + cld_swp, & ! Cloud snow-water path (g/m2) + cld_ref_snow ! Effective radius (snow-flake) (micron) + + ! Outputs + real(kind_phys),dimension(nBandsLW,ncol,nlay),intent(out) :: & + tau_cld + + ! Local variables + integer :: ij,ik,ib,index,ia + real(kind_phys) :: factor,fint,cld_ref_iceTemp + real(kind_phys),dimension(ncol,nlay) :: tau_snow, tau_rain + real(kind_phys),dimension(nBandsLW,ncol,nlay) :: tau_liq, tau_ice + + if (ilwcliq .gt. 0) then + do ij=1,ncol + do ik=1,nlay + if (cld_frac(ij,ik) .gt. cldmin) then + ! Rain optical-depth (No band dependence) + tau_rain(ij,ik) = absrain*cld_rwp(ij,ik) + + ! Snow optical-depth (No band dependence) + if (cld_swp(ij,ik) .gt. 0._kind_phys .and. cld_ref_snow(ij,ik) .gt. 10._kind_phys) then + tau_snow(ij,ik) = abssnow0*1.05756*cld_swp(ij,ik)/cld_ref_snow(ij,ik) + else + tau_snow(ij,ik) = 0._kind_phys + endif + + ! Liquid water opitcal-depth + if (cld_lwp(ij,ik) .le. 0._kind_phys) then + tau_liq(:,ij,ik) = 0._kind_phys + else + if (ilwcliq .eq. 1) then + factor = cld_ref_liq(ij,ik) - 1.5_kind_phys + index = max( 1, min( 57, int( factor ) )) + fint = factor - float(index) + do ib=1,nBandsLW + tau_liq(ib,ij,ik) = max(0._kind_phys, cld_lwp(ij,ik)*(absliq1(index,ib) + & + fint*(absliq1(index+1,ib)-absliq1(index,ib)) )) + enddo + endif + endif + + ! Ice water optical-depth + if (cld_iwp(ij,ik) .le. 0._kind_phys) then + tau_ice(:,ij,ik) = 0._kind_phys + else + ! 1) Ebert and curry approach for all particle sizes. (bound between 13-130microns) + if (ilwcice .eq. 1) then + cld_ref_iceTemp = min(130._kind_phys, max(13._kind_phys,real(cld_ref_ice(ij,ik)))) + do ib=1,nBandsLW + ia = ipat(ib) ! eb_&_c band index for ice cloud coeff + tau_ice(ib,ij,ik) = max(0._kind_phys, cld_iwp(ij,ik)*(absice1(1,ia) + absice1(2,ia)/cld_ref_iceTemp) ) + enddo + + ! 2) Streamer approach for ice effective radius between 5.0 and 131.0 microns + ! and ebert and curry approach for ice eff radius greater than 131.0 microns. + ! no smoothing between the transition of the two methods + elseif (ilwcice .eq. 2) then + factor = (cld_ref_ice(ij,ik) - 2._kind_phys) / 3._kind_phys + index = max( 1, min( 42, int( factor ) )) + fint = factor - float(index) + do ib = 1, nBandsLW + tau_ice(ib,ij,ik) = max(0._kind_phys, cld_iwp(ij,ik)*(absice2(index,ib) + & + fint*(absice2(index+1,ib) - absice2(index,ib)) )) + enddo + ! 3) Fu's approach for ice effective radius between 4.8 and 135 microns + ! (generalized effective size from 5 to 140 microns) + elseif (ilwcice .eq. 3) then + cld_ref_iceTemp = max(5._kind_phys, 1.0315_kind_phys*cld_ref_ice(ij,ik)) ! v4.71 value + factor = (cld_ref_iceTemp - 2._kind_phys) / 3._kind_phys + index = max( 1, min( 45, int( factor ) )) + fint = factor - float(index) + do ib = 1, nBandsLW + tau_ice(ib,ij,ik) = max(0._kind_phys, cld_iwp(ij,ik)*(absice3(index,ib) + & + fint*(absice3(index+1,ib) - absice3(index,ib)) )) + enddo + endif + endif + else + tau_rain(ij,ik) = 0._kind_phys + tau_snow(ij,ik) = 0._kind_phys + tau_liq(:,ij,ik) = 0._kind_phys + tau_ice(:,ij,ik) = 0._kind_phys + endif + ! Cloud optical depth + do ib = 1, nBandsLW + tau_cld(ib,ij,ik) = tau_ice(ib,ij,ik) + tau_liq(ib,ij,ik) + tau_rain(ij,ik) + tau_snow(ij,ik) + enddo + end do + end do + endif + end subroutine rrtmgp_lw_cloud_optics + ! ####################################################################################### + ! SUBROUTINE mcica_subcol_lw + ! ####################################################################################### + subroutine mcica_subcol_lw(ncol, nlay, ngpts, cld_frac, icseed, dzlyr, de_lgth, cld_frac_mcica) + ! Inputs + integer,intent(in) :: & + ncol, & ! Number of horizontal gridpoints + nlay, & ! Number of vertical layers + ngpts ! Number of spectral g-points + integer,dimension(ncol),intent(in) :: & + icseed ! Permutation seed for each column. + real(kind_phys), dimension(ncol), intent(in) :: & + de_lgth ! Cloud decorrelation length (km) + real(kind_phys), dimension(ncol,nlay), intent(in) :: & + cld_frac, & ! Cloud-fraction + dzlyr ! Layer thinkness (km) + ! Outputs + real(kind_phys),dimension(ngpts,ncol,nlay),intent(out) :: & + cld_frac_mcica + ! Local variables + type(random_stat) :: stat + integer :: icol,n,k,k1 + real(kind_phys) :: tem1 + real(kind_phys),dimension(ngpts) :: rand1D + real(kind_phys),dimension(nlay*ngpts) :: rand2D + real(kind_phys),dimension(ngpts,nlay) :: cdfunc,cdfun2 + real(kind_phys),dimension(nlay) :: fac_lcf + logical,dimension(ngpts,nlay) :: lcloudy + + ! Loop over all columns + do icol=1,ncol + ! Call random_setseed() to advance random number generator by "icseed" values. + call random_setseed(icseed(icol),stat) + + ! ################################################################################### + ! Sub-column set up according to overlapping assumption: + ! - For random overlap, pick a random value at every level + ! - For max-random overlap, pick a random value at every level + ! - For maximum overlap, pick same random numebr at every level + ! ################################################################################### + select case ( iovrlw ) + ! ################################################################################### + ! 0) Random overlap + ! ################################################################################### + case( 0 ) + call random_number(rand2D,stat) + k1 = 0 + do n = 1, ngpts + do k = 1, nlay + k1 = k1 + 1 + cdfunc(n,k) = rand2d(k1) + enddo + enddo + + ! ################################################################################### + ! 1) Maximum-random overlap + ! ################################################################################### + case(1) + call random_number(rand2D,stat) + k1 = 0 + do n = 1, ngpts + do k = 1, nlay + k1 = k1 + 1 + cdfunc(n,k) = rand2d(k1) + enddo + enddo + + ! First pick a random number for bottom (or top) layer. + ! then walk up the column: (aer's code) + ! if layer below is cloudy, use the same rand num in the layer below + ! if layer below is clear, use a new random number + do k = 2, nlay + k1 = k - 1 + tem1 = 1._kind_phys - cld_frac(icol,k1) + do n = 1, ngpts + if ( cdfunc(n,k1) > tem1 ) then + cdfunc(n,k) = cdfunc(n,k1) + else + cdfunc(n,k) = cdfunc(n,k) * tem1 + endif + enddo + enddo + + ! ################################################################################### + ! 2) Maximum overlap + ! ################################################################################### + case(2) + call random_number(rand1d,stat) + do n = 1, ngpts + tem1 = rand1d(n) + do k = 1, nlay + cdfunc(n,k) = tem1 + enddo + enddo + + ! ################################################################################### + ! 3) Decorrelation length + ! ################################################################################### + case(3) + ! Compute overlapping factors based on layer midpoint distances and decorrelation + ! depths + do k = nlay, 2, -1 + fac_lcf(k) = exp( -0.5 * (dzlyr(iCol,k)+dzlyr(iCol,k-1)) / de_lgth(iCol) ) + enddo + + ! Setup 2 sets of random numbers + call random_number ( rand2d, stat ) + k1 = 0 + do k = 1, nlay + do n = 1, ngpts + k1 = k1 + 1 + cdfunc(n,k) = rand2d(k1) + enddo + enddo + ! + call random_number ( rand2d, stat ) + k1 = 0 + do k = 1, nlay + do n = 1, ngpts + k1 = k1 + 1 + cdfun2(n,k) = rand2d(k1) + enddo + enddo + + ! Then working from the top down: + ! if a random number (from an independent set -cdfun2) is smaller then the + ! scale factor: use the upper layer's number, otherwise use a new random + ! number (keep the original assigned one). + do k = nlay-1, 1, -1 + k1 = k + 1 + do n = 1, ngpts + if ( cdfun2(n,k) <= fac_lcf(k1) ) then + cdfunc(n,k) = cdfunc(n,k1) + endif + enddo + enddo + + end select + + ! ################################################################################### + ! Generate subcolumn cloud mask (0/1 for clear/cloudy) + ! ################################################################################### + do k = 1, nlay + tem1 = 1._kind_phys - cld_frac(icol,k) + do n = 1, ngpts + lcloudy(n,k) = cdfunc(n,k) >= tem1 + if (lcloudy(n,k)) then + cld_frac_mcica(n,icol,k) = 1._kind_phys + else + cld_frac_mcica(n,icol,k) = 0._kind_phys + endif + enddo + enddo + enddo ! END LOOP OVER COLUMNS + end subroutine mcica_subcol_lw + +end module mo_rrtmgp_lw_cloud_optics diff --git a/physics/rrtmgp_lw_main.F90 b/physics/rrtmgp_lw_main.F90 new file mode 100644 index 000000000..22d34d049 --- /dev/null +++ b/physics/rrtmgp_lw_main.F90 @@ -0,0 +1,1168 @@ +! ########################################################################################### +! ########################################################################################### +module rrtmgp_lw + use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp + use mo_gas_concentrations, only: ty_gas_concs + use mo_fluxes, only: ty_fluxes_broadband + use mo_optical_props, only: ty_optical_props_1scl,ty_optical_props_2str + use mo_source_functions, only: ty_source_func_lw + use mo_rte_lw, only: rte_lw + use mo_rte_kind, only: wl + use mo_heating_rates, only: compute_heating_rate + use mo_cloud_optics, only: ty_cloud_optics + use machine, only: kind_phys + use module_radlw_parameters, only: topflw_type, sfcflw_type, proflw_type + use physparam, only: ilwcliq,isubclw + use GFS_typedefs, only: GFS_control_type + use mo_rrtmgp_lw_cloud_optics + implicit none + + ! Parameters + integer,parameter :: nGases = 6 + real(kind_phys),parameter :: epsilon=1.0e-6 + character(len=3),parameter, dimension(nGases) :: & + active_gases = (/ 'h2o', 'co2', 'o3 ', 'n2o', 'ch4', 'o2 '/) + + ! Molecular weight ratios (for converting mmr to vmr) + real(kind_phys), parameter :: & + amdw = 1.607793_kind_phys, & ! Molecular weight of dry air / water vapor + amdo3 = 0.603428_kind_phys ! Molecular weight of dry air / ozone + + ! Logical flags for optional output fields in rrtmgp_lw_run(), default=.false. + logical :: & + l_AllSky_HR_byband = .false., & ! 2D [ncol,nlay] all-sky heating rates, in each band [ncol,nlay,nBandsLW]? + l_ClrSky_HR = .false., & ! 2D [ncol,nlay] clear-sky heating rate? + l_fluxes2D = .false. ! 2D [ncol,nlay] radiative fluxes? *Note* fluxes is a DDT w/ 4 fields. + + ! Module parameters (set during rrtmgp_lw_init()) + integer :: & + rrtmgp_lw_cld_phys, & ! RRTMGP cloud-physics (0-RRTMG, 1-RRTGMP(LUT), 2-RRTMGP(Pade)) + nGptsLW, & ! Number of LW spectral g-points + nBandsLW, & ! Number of LW bands + nrghice, & ! Number of ice roughness categories + ipsdlw0 ! Initial see for McICA + real(kind_phys) :: & + re_ice_min, & ! Minimum ice particle size allowed by RRTGMP + re_ice_max, & ! Maximum ice particle size allowed by RRTGMP + re_liq_min, & ! Minimum liquid particle size allowed by RRTGMP + re_liq_max ! Maximum liquid particle size allowed by RRTGMP + + integer,allocatable,dimension(:) :: & + ngb_LW ! Band index for each g-points + + ! Classes used by rte+rrtmgp + type(ty_gas_optics_rrtmgp) :: & + kdist_lw_clr + type(ty_cloud_optics) :: & + kdist_lw_cldy + type(ty_gas_concs) :: & + gas_concs_lw + + public rrtmgp_lw_init, rrtmgp_lw_run, rrtmgp_lw_finalize +contains + ! ######################################################################################### + ! rrtmgp_lw_init + ! ######################################################################################### +!! \section arg_table_rrtmgp_lw_init Argument Table +!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | +!! |-----------------|---------------------------|---------------------------------------------------------|-------|------|------------------|-----------|--------|----------| +!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | +!! | mpirank | mpi_rank | current MPI rank | index | 0 | integer | | in | F | +!! | mpiroot | mpi_root | master MPI rank | index | 0 | integer | | in | F | +!! | mpicomm | mpi_comm | MPI communicator | index | 0 | integer | | in | F | +!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | +!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! + ! ######################################################################################### + subroutine rrtmgp_lw_init(Model,mpicomm, mpirank, mpiroot, errmsg, errflg) + use netcdf + +#ifdef MPI + use mpi +#endif + + ! Inputs + type(GFS_control_type), intent(in) :: & + Model ! DDT containing model control parameters + integer,intent(in) :: & + mpicomm, & ! MPI communicator + mpirank, & ! Current MPI rank + mpiroot ! Master MPI rank + ! Outputs + character(len=*), intent(out) :: & + errmsg ! Error message + integer, intent(out) :: & + errflg ! Error code + + + ! Variables that will be passed to gas_optics%load() + integer, dimension(:), allocatable :: & + kminor_start_lower, & ! used by RRTGMP gas optics + kminor_start_upper ! used by RRTGMP gas optics + integer, dimension(:,:), allocatable :: & + band2gpt, & ! used by RRTGMP gas optics + minor_limits_gpt_lower, & ! used by RRTGMP gas optics + minor_limits_gpt_upper ! used by RRTGMP gas optics + integer, dimension(:,:,:), allocatable :: & + key_species ! used by RRTGMP gas optics + real(kind_phys) :: & + press_ref_trop, & ! used by RRTGMP gas optics + temp_ref_p, & ! used by RRTGMP gas optics + temp_ref_t, & ! used by RRTGMP gas optics + radliq_lwr, & ! used by RRTGMP cloud optics + radliq_upr, & ! used by RRTGMP cloud optics + radliq_fac, & ! used by RRTGMP cloud optics + radice_lwr, & ! used by RRTGMP cloud optics + radice_upr, & ! used by RRTGMP cloud optics + radice_fac ! used by RRTGMP cloud optics + real(kind_phys), dimension(:), allocatable :: & + press_ref, & ! used by RRTGMP gas optics + temp_ref, & ! used by RRTGMP gas optics + pade_sizereg_extliq, & ! used by RRTGMP cloud optics + pade_sizereg_ssaliq, & ! used by RRTGMP cloud optics + pade_sizereg_asyliq, & ! used by RRTGMP cloud optics + pade_sizereg_extice, & ! used by RRTGMP cloud optics + pade_sizereg_ssaice, & ! used by RRTGMP cloud optics + pade_sizereg_asyice ! used by RRTGMP cloud optics + real(kind_phys), dimension(:,:), allocatable :: & + band_lims, & ! used by RRTGMP gas optics + totplnk, & ! used by RRTGMP gas optics + lut_extliq, & ! used by RRTGMP cloud optics + lut_ssaliq, & ! used by RRTGMP cloud optics + lut_asyliq, & ! used by RRTGMP cloud optics + band_lims_cldy ! used by RRTGMP cloud optics + + real(kind_phys), dimension(:,:,:), allocatable :: & + vmr_ref, & ! used by RRTGMP gas optics + kminor_lower, & ! used by RRTGMP gas optics + kminor_upper, & ! used by RRTGMP gas optics + rayl_lower, & ! used by RRTGMP gas optics + rayl_upper, & ! used by RRTGMP gas optics + lut_extice, & ! used by RRTGMP cloud optics + lut_ssaice, & ! used by RRTGMP cloud optics + lut_asyice, & ! used by RRTGMP cloud optics + pade_extliq, & ! used by RRTGMP cloud optics + pade_ssaliq, & ! used by RRTGMP cloud optics + pade_asyliq ! used by RRTGMP cloud optics + real(kind_phys), dimension(:,:,:,:), allocatable :: & + kmajor, & ! used by RRTGMP gas optics + planck_frac, & ! used by RRTGMP gas optics + pade_extice, & ! used by RRTGMP cloud optics + pade_ssaice, & ! used by RRTGMP cloud optics + pade_asyice ! used by RRTGMP cloud optics + character(len=32), dimension(:), allocatable :: & + gas_names, & ! used by RRTGMP gas optics + gas_minor, & ! used by RRTGMP gas optics + identifier_minor, & ! used by RRTGMP gas optics + minor_gases_lower, & ! used by RRTGMP gas optics + minor_gases_upper, & ! used by RRTGMP gas optics + scaling_gas_lower, & ! used by RRTGMP gas optics + scaling_gas_upper ! used by RRTGMP gas optics + logical(wl), dimension(:), allocatable :: & + minor_scales_with_density_lower, & ! used by RRTGMP gas optics + minor_scales_with_density_upper, & ! used by RRTGMP gas optics + scale_by_complement_lower, & ! used by RRTGMP gas optics + scale_by_complement_upper ! used by RRTGMP gas optics + + ! Dimensions (to be broadcast across all processors) + integer :: & + ntemps, & ! used by RRTGMP gas optics + npress, & ! used by RRTGMP gas optics + nabsorbers, & ! used by RRTGMP gas optics + nextrabsorbers, & ! used by RRTGMP gas optics + nminorabsorbers, & ! used by RRTGMP gas optics + nmixingfracs, & ! used by RRTGMP gas optics + nlayers, & ! used by RRTGMP gas optics + nbnds, & ! used by RRTGMP gas optics + ngpts, & ! used by RRTGMP gas optics + npairs, & ! used by RRTGMP gas optics + ninternalSourcetemps, & ! used by RRTGMP gas optics + nminor_absorber_intervals_lower, & ! used by RRTGMP gas optics + nminor_absorber_intervals_upper, & ! used by RRTGMP gas optics + ncontributors_lower, & ! used by RRTGMP gas optics + ncontributors_upper, & ! used by RRTGMP gas optics + nbandLWcldy, & ! used by RRTGMP cloud optics + nsize_liq, & ! used by RRTGMP cloud optics + nsize_ice, & ! used by RRTGMP cloud optics + nsizereg, & ! used by RRTGMP cloud optics + ncoeff_ext, & ! used by RRTGMP cloud optics + ncoeff_ssa_g, & ! used by RRTGMP cloud optics + nbound, & ! used by RRTGMP cloud optics + npairsLWcldy ! used by RRTGMP cloud optics + + ! Local variables + integer :: ncid,dimID,varID,status,igpt,iGas,ij,ierr + integer,dimension(:),allocatable :: temp1,temp2,temp3,temp4,temp_log_array1,& + temp_log_array2, temp_log_array3, temp_log_array4 + character(len=264) :: kdist_file,kdist_cldy_file + integer,parameter :: max_strlen=256 + + ! How are we handling cloud-optics? + rrtmgp_lw_cld_phys = Model%rrtmgp_lw_cld_phys + + ! Filenames are set in the gfs_physics_nml (scm/src/GFS_typedefs.F90) + kdist_file = trim(Model%rrtmgp_root)//trim(Model%kdist_file_gas) + kdist_cldy_file = trim(Model%rrtmgp_root)//trim(Model%kdist_file_clouds) + + ! Read dimensions for k-distribution fields (only on master processor(0)) + if (mpirank .eq. mpiroot) then + if(nf90_open(trim(kdist_file), NF90_WRITE, ncid) == NF90_NOERR) then + status = nf90_inq_dimid(ncid, 'temperature', dimid) + status = nf90_inquire_dimension(ncid, dimid, len=ntemps) + status = nf90_inq_dimid(ncid, 'pressure', dimid) + status = nf90_inquire_dimension(ncid, dimid, len=npress) + status = nf90_inq_dimid(ncid, 'absorber', dimid) + status = nf90_inquire_dimension(ncid, dimid, len=nabsorbers) + status = nf90_inq_dimid(ncid, 'minor_absorber', dimid) + status = nf90_inquire_dimension(ncid, dimid, len=nminorabsorbers) + status = nf90_inq_dimid(ncid, 'absorber_ext', dimid) + status = nf90_inquire_dimension(ncid, dimid, len=nextrabsorbers) + status = nf90_inq_dimid(ncid, 'mixing_fraction', dimid) + status = nf90_inquire_dimension(ncid, dimid, len=nmixingfracs) + status = nf90_inq_dimid(ncid, 'atmos_layer', dimid) + status = nf90_inquire_dimension(ncid, dimid, len=nlayers) + status = nf90_inq_dimid(ncid, 'bnd', dimid) + status = nf90_inquire_dimension(ncid, dimid, len=nbnds) + status = nf90_inq_dimid(ncid, 'gpt', dimid) + status = nf90_inquire_dimension(ncid, dimid, len=ngpts) + status = nf90_inq_dimid(ncid, 'pair', dimid) + status = nf90_inquire_dimension(ncid, dimid, len=npairs) + status = nf90_inq_dimid(ncid, 'contributors_lower', dimid) + status = nf90_inquire_dimension(ncid, dimid, len=ncontributors_lower) + status = nf90_inq_dimid(ncid, 'contributors_upper', dimid) + status = nf90_inquire_dimension(ncid, dimid, len=ncontributors_upper) + status = nf90_inq_dimid(ncid, 'minor_absorber_intervals_lower', dimid) + status = nf90_inquire_dimension(ncid, dimid, len=nminor_absorber_intervals_lower) + status = nf90_inq_dimid(ncid, 'minor_absorber_intervals_upper', dimid) + status = nf90_inquire_dimension(ncid, dimid, len=nminor_absorber_intervals_upper) + status = nf90_inq_dimid(ncid, 'temperature_Planck', dimid) + status = nf90_inquire_dimension(ncid, dimid, len=ninternalSourcetemps) + status = nf90_close(ncid) + endif + endif + + ! Broadcast dimensions to all processors +#ifdef MPI + call MPI_BCAST(ntemps, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(npress, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nminorabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nextraabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nmixingfracs, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nlayers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nbnds, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(ngpts, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(npairs, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(ncontributors_lower, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(ncontributors_upper, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nminor_absorber_intervals_lower, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nminor_absorber_intervals_upper, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(ninternalSourcetemps, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +#endif + + ! On master processor, allocate space, read in fields, broadcast to all processors + if (mpirank .eq. mpiroot) then + ! Allocate space for arrays + allocate(gas_names(nabsorbers)) + allocate(scaling_gas_lower(nminor_absorber_intervals_lower)) + allocate(scaling_gas_upper(nminor_absorber_intervals_upper)) + allocate(gas_minor(nminorabsorbers)) + allocate(identifier_minor(nminorabsorbers)) + allocate(minor_gases_lower(nminor_absorber_intervals_lower)) + allocate(minor_gases_upper(nminor_absorber_intervals_upper)) + allocate(minor_limits_gpt_lower(npairs,nminor_absorber_intervals_lower)) + allocate(minor_limits_gpt_upper(npairs,nminor_absorber_intervals_upper)) + allocate(band2gpt(2,nbnds)) + allocate(key_species(2,nlayers,nbnds)) + allocate(band_lims(2,nbnds)) + allocate(press_ref(npress)) + allocate(temp_ref(ntemps)) + allocate(vmr_ref(nlayers, nextrabsorbers, ntemps)) + allocate(kminor_lower(ncontributors_lower, nmixingfracs, ntemps)) + allocate(kmajor(ngpts, nmixingfracs, npress+1, ntemps)) + allocate(kminor_start_lower(nminor_absorber_intervals_lower)) + allocate(kminor_upper(ncontributors_upper, nmixingfracs, ntemps)) + allocate(kminor_start_upper(nminor_absorber_intervals_upper)) + allocate(minor_scales_with_density_lower(nminor_absorber_intervals_lower)) + allocate(minor_scales_with_density_upper(nminor_absorber_intervals_upper)) + allocate(scale_by_complement_lower(nminor_absorber_intervals_lower)) + allocate(scale_by_complement_upper(nminor_absorber_intervals_upper)) + allocate(temp1(nminor_absorber_intervals_lower)) + allocate(temp2(nminor_absorber_intervals_upper)) + allocate(temp3(nminor_absorber_intervals_lower)) + allocate(temp4(nminor_absorber_intervals_upper)) + allocate(totplnk(ninternalSourcetemps, nbnds)) + allocate(planck_frac(ngpts, nmixingfracs, npress+1, ntemps)) + + ! Read in fields from file + if(nf90_open(trim(kdist_file), NF90_WRITE, ncid) == NF90_NOERR) then + status = nf90_inq_varid(ncid,'gas_names',varID) + status = nf90_get_var(ncid,varID,gas_names) + ! + status = nf90_inq_varid(ncid,'scaling_gas_lower',varID) + status = nf90_get_var(ncid,varID,scaling_gas_lower) + ! + status = nf90_inq_varid(ncid,'scaling_gas_upper',varID) + status = nf90_get_var(ncid,varID,scaling_gas_upper) + ! + status = nf90_inq_varid(ncid,'gas_minor',varID) + status = nf90_get_var(ncid,varID,gas_minor) + ! + status = nf90_inq_varid(ncid,'identifier_minor',varID) + status = nf90_get_var(ncid,varID,identifier_minor) + ! + status = nf90_inq_varid(ncid,'minor_gases_lower',varID) + status = nf90_get_var(ncid,varID,minor_gases_lower) + ! + status = nf90_inq_varid(ncid,'minor_gases_upper',varID) + status = nf90_get_var(ncid,varID,minor_gases_upper) + ! + status = nf90_inq_varid(ncid,'minor_limits_gpt_lower',varID) + status = nf90_get_var(ncid,varID,minor_limits_gpt_lower) + ! + status = nf90_inq_varid(ncid,'minor_limits_gpt_upper',varID) + status = nf90_get_var(ncid,varID,minor_limits_gpt_upper) + ! + status = nf90_inq_varid(ncid,'bnd_limits_gpt',varID) + status = nf90_get_var(ncid,varID,band2gpt) + ! + status = nf90_inq_varid(ncid,'key_species',varID) + status = nf90_get_var(ncid,varID,key_species) + ! + status = nf90_inq_varid(ncid,'bnd_limits_wavenumber',varID) + status = nf90_get_var(ncid,varID,band_lims) + ! + status = nf90_inq_varid(ncid,'press_ref',varID) + status = nf90_get_var(ncid,varID,press_ref) + ! + status = nf90_inq_varid(ncid,'temp_ref',varID) + status = nf90_get_var(ncid,varID,temp_ref) + ! + status = nf90_inq_varid(ncid,'absorption_coefficient_ref_P',varID) + status = nf90_get_var(ncid,varID,temp_ref_p) + ! + status = nf90_inq_varid(ncid,'absorption_coefficient_ref_T',varID) + status = nf90_get_var(ncid,varID,temp_ref_t) + ! + status = nf90_inq_varid(ncid,'press_ref_trop',varID) + status = nf90_get_var(ncid,varID,press_ref_trop) + ! + status = nf90_inq_varid(ncid,'kminor_lower',varID) + status = nf90_get_var(ncid,varID,kminor_lower) + ! + status = nf90_inq_varid(ncid,'kminor_upper',varID) + status = nf90_get_var(ncid,varID,kminor_upper) + ! + status = nf90_inq_varid(ncid,'vmr_ref',varID) + status = nf90_get_var(ncid,varID,vmr_ref) + ! + status = nf90_inq_varid(ncid,'kmajor',varID) + status = nf90_get_var(ncid,varID,kmajor) + ! + status = nf90_inq_varid(ncid,'kminor_start_lower',varID) + status = nf90_get_var(ncid,varID,kminor_start_lower) + ! + status = nf90_inq_varid(ncid,'kminor_start_upper',varID) + status = nf90_get_var(ncid,varID,kminor_start_upper) + ! + status = nf90_inq_varid(ncid,'totplnk',varID) + status = nf90_get_var(ncid,varID,totplnk) + ! + status = nf90_inq_varid(ncid,'plank_fraction',varID) + status = nf90_get_var(ncid,varID,planck_frac) + + ! Logical fields are read in as integers and then converted to logicals. + status = nf90_inq_varid(ncid,'minor_scales_with_density_lower',varID) + status = nf90_get_var(ncid,varID,temp1) + minor_scales_with_density_lower(:) = .false. + where(temp1 .eq. 1) minor_scales_with_density_lower(:) = .true. + ! + status = nf90_inq_varid(ncid,'minor_scales_with_density_upper',varID) + status = nf90_get_var(ncid,varID,temp2) + minor_scales_with_density_upper(:) = .false. + where(temp2 .eq. 1) minor_scales_with_density_upper(:) = .true. + ! + status = nf90_inq_varid(ncid,'scale_by_complement_lower',varID) + status = nf90_get_var(ncid,varID,temp3) + scale_by_complement_lower(:) = .false. + where(temp3 .eq. 1) scale_by_complement_lower(:) = .true. + ! + status = nf90_inq_varid(ncid,'scale_by_complement_upper',varID) + status = nf90_get_var(ncid,varID,temp4) + scale_by_complement_upper(:) = .false. + where(temp4 .eq. 1) scale_by_complement_upper(:) = .true. + + ! Close + status = nf90_close(ncid) + endif + endif + + ! Broadcast arrays to all processors +#ifdef MPI + call MPI_BCAST(minor_limits_gpt_upper, size(minor_limits_gpt_upper), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(minor_limits_gpt_lower, size(minor_limits_gpt_lower), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(kminor_start_upper, size(kminor_start_upper), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(kminor_start_lower, size(kminor_start_lower), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(key_species, size(key_species), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(band2gpt, size(band2gpt), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(band_lims, size(band_lims), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(press_ref, size(press_ref), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(temp_ref, size(temp_ref), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(kminor_lower, size(kminor_lower), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(kminor_upper, size(kminor_upper), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(scaling_gas_lower, size(scaling_gas_lower), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(scaling_gas_upper, size(scaling_gas_upper), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(vmr_ref, size(vmr_ref), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(kmajor, size(kmajor), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(temp_ref_p, 1, kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(temp_ref_t, 1, kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(press_ref_trop, 1, kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(totplnk, size(totplnk), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(planck_frac, size(planck_frac), kind_phys, mpiroot, mpicomm, ierr) + ! Character arrays + do ij=1,nabsorbers + call MPI_BCAST(gas_names(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) + enddo + do ij=1,nminorabsorbers + call MPI_BCAST(gas_minor(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) + call MPI_BCAST(identifier_minor(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) + enddo + do ij=1,nminor_absorber_intervals_lower + call MPI_BCAST(minor_gases_lower(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) + enddo + do ij=1,nminor_absorber_intervals_upper + call MPI_BCAST(minor_gases_upper(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) + enddo + ! Logical arrays (First convert to integer-array, then broadcast) + ! + allocate(temp_log_array1(nminor_absorber_intervals_lower)) + where(minor_scales_with_density_lower) + temp_log_array1 = 1 + elsewhere + temp_log_array1 = 0 + end where + call MPI_BCAST(temp_log_array1, size(temp_log_array1), MPI_INTEGER, mpiroot, mpicomm, ierr) + ! + allocate(temp_log_array2(nminor_absorber_intervals_lower)) + where(scale_by_complement_lower) + temp_log_array2 = 1 + elsewhere + temp_log_array2 = 0 + end where + call MPI_BCAST(temp_log_array2, size(temp_log_array2), MPI_INTEGER, mpiroot, mpicomm, ierr) + ! + allocate(temp_log_array3(nminor_absorber_intervals_upper)) + where(minor_scales_with_density_upper) + temp_log_array3 = 1 + elsewhere + temp_log_array3 = 0 + end where + call MPI_BCAST(temp_log_array3, size(temp_log_array3), MPI_INTEGER, mpiroot, mpicomm, ierr) + ! + allocate(temp_log_array4(nminor_absorber_intervals_upper)) + where(scale_by_complement_upper) + temp_log_array4 = 1 + elsewhere + temp_log_array4 = 0 + end where + call MPI_BCAST(temp_log_array4, size(temp_log_array4), MPI_INTEGER, mpiroot, mpicomm, ierr) +#endif + + ! Initialize gas concentrations and gas optics class with data + do iGas=1,nGases + call check_error_msg(gas_concs_lw%set_vmr(active_gases(iGas), 0._kind_phys)) + enddo + call check_error_msg(kdist_lw_clr%load(gas_concs_lw, gas_names, key_species, band2gpt, & + band_lims, press_ref, press_ref_trop, temp_ref, temp_ref_p, temp_ref_t, & + vmr_ref, kmajor, kminor_lower, kminor_upper, gas_minor,identifier_minor, & + minor_gases_lower, minor_gases_upper, minor_limits_gpt_lower, & + minor_limits_gpt_upper, minor_scales_with_density_lower, & + minor_scales_with_density_upper, scaling_gas_lower, & + scaling_gas_upper, scale_by_complement_lower, & + scale_by_complement_upper, kminor_start_lower, kminor_start_upper, & + totplnk, planck_frac, rayl_lower, rayl_upper)) + + ! Set band index by g-point array + nBandsLW = kdist_lw_clr%get_nband() + nGptsLW = kdist_lw_clr%get_ngpt() + ngb_LW = kdist_lw_clr%get_gpoint_bands() + + ! Set initial permutation seed for McICA, initially set to number of G-points + ipsdlw0 = kdist_lw_clr%get_ngpt() + + ! ####################################################################################### + ! If RRTMGP cloud-optics are requested, read tables and broadcast. + ! ####################################################################################### + ! Read dimensions for k-distribution fields (only on master processor(0)) + if (mpirank .eq. mpiroot) then + if(nf90_open(trim(kdist_cldy_file), NF90_WRITE, ncid) == NF90_NOERR) then + status = nf90_inq_dimid(ncid, 'nband', dimid) + status = nf90_inquire_dimension(ncid, dimid, len=nbandLWcldy) + status = nf90_inq_dimid(ncid, 'nrghice', dimid) + status = nf90_inquire_dimension(ncid, dimid, len=nrghice) + status = nf90_inq_dimid(ncid, 'nsize_liq', dimid) + status = nf90_inquire_dimension(ncid, dimid, len=nsize_liq) + status = nf90_inq_dimid(ncid, 'nsize_ice', dimid) + status = nf90_inquire_dimension(ncid, dimid, len=nsize_ice) + status = nf90_inq_dimid(ncid, 'nsizereg', dimid) + status = nf90_inquire_dimension(ncid, dimid, len=nsizereg) + status = nf90_inq_dimid(ncid, 'ncoeff_ext', dimid) + status = nf90_inquire_dimension(ncid, dimid, len=ncoeff_ext) + status = nf90_inq_dimid(ncid, 'ncoeff_ssa_g', dimid) + status = nf90_inquire_dimension(ncid, dimid, len=ncoeff_ssa_g) + status = nf90_inq_dimid(ncid, 'nbound', dimid) + status = nf90_inquire_dimension(ncid, dimid, len=nbound) + status = nf90_inq_dimid(ncid, 'pair', dimid) + status = nf90_inquire_dimension(ncid, dimid, len=npairsLWcldy) + status = nf90_close(ncid) + endif + endif + + ! Broadcast dimensions to all processors +#ifdef MPI + if (rrtmgp_lw_cld_phys .eq. 1 .or. rrtmgp_lw_cld_phys .eq. 2) then + call MPI_BCAST(nbandLWcldy, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nrghice, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nsize_liq, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nsize_ice, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nsizereg, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(ncoeff_ext, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(ncoeff_ssa_g, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nbound, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(npairsLWcldy, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + endif +#endif + + ! On master processor, allocate space, read in fields, broadcast to all processors + if (mpirank .eq. mpiroot) then + ! + if (rrtmgp_lw_cld_phys .eq. 1) then + allocate(lut_extliq(nsize_liq, nBandLWcldy)) + allocate(lut_ssaliq(nsize_liq, nBandLWcldy)) + allocate(lut_asyliq(nsize_liq, nBandLWcldy)) + allocate(lut_extice(nsize_ice, nBandLWcldy, nrghice)) + allocate(lut_ssaice(nsize_ice, nBandLWcldy, nrghice)) + allocate(lut_asyice(nsize_ice, nBandLWcldy, nrghice)) + allocate(band_lims_cldy(2, nBandLWcldy)) + ! + if(nf90_open(trim(kdist_cldy_file), NF90_WRITE, ncid) == NF90_NOERR) then + status = nf90_inq_varid(ncid,'radliq_lwr',varID) + status = nf90_get_var(ncid,varID,radliq_lwr) + status = nf90_inq_varid(ncid,'radliq_upr',varID) + status = nf90_get_var(ncid,varID,radliq_upr) + status = nf90_inq_varid(ncid,'radliq_fac',varID) + status = nf90_get_var(ncid,varID,radliq_fac) + status = nf90_inq_varid(ncid,'radice_lwr',varID) + status = nf90_get_var(ncid,varID,radice_lwr) + status = nf90_inq_varid(ncid,'radice_upr',varID) + status = nf90_get_var(ncid,varID,radice_upr) + status = nf90_inq_varid(ncid,'radice_fac',varID) + status = nf90_get_var(ncid,varID,radice_fac) + status = nf90_inq_varid(ncid,'lut_extliq',varID) + status = nf90_get_var(ncid,varID,lut_extliq) + status = nf90_inq_varid(ncid,'lut_ssaliq',varID) + status = nf90_get_var(ncid,varID,lut_ssaliq) + status = nf90_inq_varid(ncid,'lut_asyliq',varID) + status = nf90_get_var(ncid,varID,lut_asyliq) + status = nf90_inq_varid(ncid,'lut_extice',varID) + status = nf90_get_var(ncid,varID,lut_extice) + status = nf90_inq_varid(ncid,'lut_ssaice',varID) + status = nf90_get_var(ncid,varID,lut_ssaice) + status = nf90_inq_varid(ncid,'lut_asyice',varID) + status = nf90_get_var(ncid,varID,lut_asyice) + status = nf90_inq_varid(ncid,'bnd_limits_wavenumber',varID) + status = nf90_get_var(ncid,varID,band_lims_cldy) + endif + endif + ! + if (rrtmgp_lw_cld_phys .eq. 2) then + allocate(pade_extliq(nbandLWcldy, nsizereg, ncoeff_ext )) + allocate(pade_ssaliq(nbandLWcldy, nsizereg, ncoeff_ssa_g)) + allocate(pade_asyliq(nbandLWcldy, nsizereg, ncoeff_ssa_g)) + allocate(pade_extice(nbandLWcldy, nsizereg, ncoeff_ext, nrghice)) + allocate(pade_ssaice(nbandLWcldy, nsizereg, ncoeff_ssa_g, nrghice)) + allocate(pade_asyice(nbandLWcldy, nsizereg, ncoeff_ssa_g, nrghice)) + allocate(pade_sizereg_extliq(nbound)) + allocate(pade_sizereg_ssaliq(nbound)) + allocate(pade_sizereg_asyliq(nbound)) + allocate(pade_sizereg_extice(nbound)) + allocate(pade_sizereg_ssaice(nbound)) + allocate(pade_sizereg_asyice(nbound)) + allocate(band_lims_cldy(2,nbandLWcldy)) + ! + if(nf90_open(trim(kdist_cldy_file), NF90_WRITE, ncid) == NF90_NOERR) then + status = nf90_inq_varid(ncid,'radliq_lwr',varID) + status = nf90_get_var(ncid,varID,radliq_lwr) + status = nf90_inq_varid(ncid,'radliq_upr',varID) + status = nf90_get_var(ncid,varID,radliq_upr) + status = nf90_inq_varid(ncid,'radliq_fac',varID) + status = nf90_get_var(ncid,varID,radliq_fac) + status = nf90_inq_varid(ncid,'radice_lwr',varID) + status = nf90_get_var(ncid,varID,radice_lwr) + status = nf90_inq_varid(ncid,'radice_upr',varID) + status = nf90_get_var(ncid,varID,radice_upr) + status = nf90_inq_varid(ncid,'radice_fac',varID) + status = nf90_get_var(ncid,varID,radice_fac) + status = nf90_inq_varid(ncid,'pade_extliq',varID) + status = nf90_get_var(ncid,varID,pade_extliq) + status = nf90_inq_varid(ncid,'pade_ssaliq',varID) + status = nf90_get_var(ncid,varID,pade_ssaliq) + status = nf90_inq_varid(ncid,'pade_asyliq',varID) + status = nf90_get_var(ncid,varID,pade_asyliq) + status = nf90_inq_varid(ncid,'pade_extice',varID) + status = nf90_get_var(ncid,varID,pade_extice) + status = nf90_inq_varid(ncid,'pade_ssaice',varID) + status = nf90_get_var(ncid,varID,pade_ssaice) + status = nf90_inq_varid(ncid,'pade_asyice',varID) + status = nf90_get_var(ncid,varID,pade_asyice) + status = nf90_inq_varid(ncid,'pade_sizereg_extliq',varID) + status = nf90_get_var(ncid,varID,pade_sizereg_extliq) + status = nf90_inq_varid(ncid,'pade_sizereg_ssaliq',varID) + status = nf90_get_var(ncid,varID,pade_sizereg_ssaliq) + status = nf90_inq_varid(ncid,'pade_sizereg_asyliq',varID) + status = nf90_get_var(ncid,varID,pade_sizereg_asyliq) + status = nf90_inq_varid(ncid,'pade_sizereg_extice',varID) + status = nf90_get_var(ncid,varID,pade_sizereg_extice) + status = nf90_inq_varid(ncid,'pade_sizereg_ssaice',varID) + status = nf90_get_var(ncid,varID,pade_sizereg_ssaice) + status = nf90_inq_varid(ncid,'pade_sizereg_asyice',varID) + status = nf90_get_var(ncid,varID,pade_sizereg_asyice) + status = nf90_inq_varid(ncid,'bnd_limits_wavenumber',varID) + status = nf90_get_var(ncid,varID,band_lims_cldy) + endif + endif + endif + + ! Broadcast arrays to all processors +#ifdef MPI + if (rrtmgp_lw_cld_phys .eq. 1) then + call MPI_BCAST(radliq_lwr, size(radliq_lwr), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(radliq_upr, size(radliq_upr), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(radliq_fac, size(radliq_fac), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(radice_lwr, size(radice_lwr), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(radice_upr, size(radice_upr), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(radice_fac, size(radice_fac), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_extliq, size(lut_extliq), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_ssaliq, size(lut_ssaliq), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_asyliq, size(lut_asyliq), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_extice, size(lut_extice), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_ssaice, size(lut_ssaice), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_asyice, size(lut_asyice), kind_phys, mpiroot, mpicomm, ierr) + endif + if (rrtmgp_lw_cld_phys .eq. 2) then + call MPI_BCAST(pade_extliq, size(pade_extliq), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_ssaliq, size(pade_ssaliq), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_asyliq, size(pade_asyliq), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_extice, size(pade_extice), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_ssaice, size(pade_ssaice), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_asyice, size(pade_asyice), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_extliq), size(pade_sizereg_extliq), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_ssaliq), size(pade_sizereg_ssaliq), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_asyliq), size(pade_sizereg_asyliq), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_extice), size(pade_sizereg_extice), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_ssaice), size(pade_sizereg_ssaice), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_asyice), size(pade_sizereg_asyice), kind_phys, mpiroot, mpicomm, ierr) + endif + call MPI_BCAST(band_lims_cldy), size(band_lims_cldy), kind_phys, mpiroot, mpicomm, ierr) +#endif + + ! Load tables data for RRTGMP cloud-optics + if (rrtmgp_lw_cld_phys .eq. 1) then + print*,'RRTMGP_INIT: ',shape(lut_extice) + call check_error_msg(kdist_lw_cldy%load(band_lims_cldy, radliq_lwr, radliq_upr, & + radliq_fac, radice_lwr, radice_upr, radice_fac, lut_extliq, lut_ssaliq, & + lut_asyliq, lut_extice, lut_ssaice, lut_asyice)) + endif + if (rrtmgp_lw_cld_phys .eq. 2) then + call check_error_msg(kdist_lw_cldy%load(band_lims_cldy, radliq_lwr, radliq_upr, & + radliq_fac, radice_lwr, radice_upr, radice_fac, pade_extliq, & + pade_ssaliq, pade_asyliq, pade_extice, pade_ssaice, pade_asyice, & + pade_sizereg_extliq, pade_sizereg_ssaliq, pade_sizereg_asyliq, & + pade_sizereg_extice, pade_sizereg_ssaice, pade_sizereg_asyice)) + endif + + if ((rrtmgp_lw_cld_phys .gt. 0)) then + re_ice_min = radice_lwr + re_ice_max = radice_upr + re_liq_min = radliq_lwr + re_liq_max = radliq_upr + endif + + end subroutine rrtmgp_lw_init + + ! ######################################################################################### + ! rrtmg_lw_run + ! ######################################################################################### +!! \section arg_table_rrtmgp_lw_run Argument Table +!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | +!! |-----------------|-----------------------------------------------------------------------------------------------|-----------------------------------------------------------|---------|------|-------------|-----------|--------|----------| +!! | p_lay | air_pressure_at_layer_for_radiation_in_hPa | air pressure layer | hPa | 2 | real | kind_phys | in | F | +!! | p_lev | air_pressure_at_interface_for_radiation_in_hPa | air pressure level | hPa | 2 | real | kind_phys | in | F | +!! | t_lay | air_temperature_at_layer_for_radiation | air temperature layer | K | 2 | real | kind_phys | in | F | +!! | t_lev | air_temperature_at_interface_for_radiation | air temperature level | K | 2 | real | kind_phys | in | F | +!! | q_lay | water_vapor_specific_humidity_at_layer_for_radiation | specific humidity layer | kg kg-1 | 2 | real | kind_phys | in | F | +!! | o3_lay | ozone_concentration_at_layer_for_radiation | ozone concentration layer | kg kg-1 | 2 | real | kind_phys | in | F | +!! | vmr_co2 | volume_mixing_ratio_co2 | volume mixing ratio co2 | kg kg-1 | 2 | real | kind_phys | in | F | +!! | vmr_n2o | volume_mixing_ratio_n2o | volume mixing ratio no2 | kg kg-1 | 2 | real | kind_phys | in | F | +!! | vmr_ch4 | volume_mixing_ratio_ch4 | volume mixing ratio ch4 | kg kg-1 | 2 | real | kind_phys | in | F | +!! | vmr_o2 | volume_mixing_ratio_o2 | volume mixing ratio o2 | kg kg-1 | 2 | real | kind_phys | in | F | +!! | vmr_co | volume_mixing_ratio_co | volume mixing ratio co | kg kg-1 | 2 | real | kind_phys | in | F | +!! | vmr_cfc11 | volume_mixing_ratio_cfc11 | volume mixing ratio cfc11 | kg kg-1 | 2 | real | kind_phys | in | F | +!! | vmr_cfc12 | volume_mixing_ratio_cfc12 | volume mixing ratio cfc12 | kg kg-1 | 2 | real | kind_phys | in | F | +!! | vmr_cfc22 | volume_mixing_ratio_cfc22 | volume mixing ratio cfc22 | kg kg-1 | 2 | real | kind_phys | in | F | +!! | vmr_ccl4 | volume_mixing_ratio_ccl4 | volume mixing ratio ccl4 | kg kg-1 | 2 | real | kind_phys | in | F | +!! | icseed | seed_random_numbers_lw | seed for random number generation for longwave radiation | none | 1 | integer | | in | F | +!! | tau_aer | aerosol_optical_depth_for_longwave_bands_01-16 | aerosol optical depth for longwave bands 01-16 | none | 3 | real | kind_phys | in | F | +!! | ssa_aer | aerosol_single_scattering_albedo_for_longwave_bands_01-16 | aerosol single scattering albedo for longwave bands 01-16 | frac | 3 | real | kind_phys | in | F | +!! | sfc_emiss | surface_longwave_emissivity | surface emissivity | frac | 1 | real | kind_phys | in | F | +!! | skt | surface_ground_temperature_for_radiation | surface ground temperature for radiation | K | 1 | real | kind_phys | in | F | +!! | dzlyr | layer_thickness_for_radiation | layer thickness | km | 2 | real | kind_phys | in | F | +!! | delpin | layer_pressure_thickness_for_radiation | layer pressure thickness | hPa | 2 | real | kind_phys | in | F | +!! | de_lgth | cloud_decorrelation_length | cloud decorrelation length | km | 1 | real | kind_phys | in | F | +!! | ncol | horizontal_loop_extent | horizontal dimension | count | 0 | integer | | in | F | +!! | nlay | adjusted_vertical_layer_dimension_for_radiation | number of vertical layers for radiation | count | 0 | integer | | in | F | +!! | lprint | flag_print | flag to print | flag | 0 | logical | | in | F | +!! | cldfrac | total_cloud_fraction | total cloud fraction | frac | 2 | real | kind_phys | in | F | +!! | lslwr | flag_to_calc_lw | flag to calculate LW irradiances | flag | 0 | logical | | in | F | +!! | hlwc | tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_step | longwave total sky heating rate | K s-1 | 2 | real | kind_phys | out | F | +!! | topflx | lw_fluxes_top_atmosphere | longwave total sky fluxes at the top of the atm | W m-2 | 1 | topflw_type | | inout | F | +!! | sfcflx | lw_fluxes_sfc | longwave total sky fluxes at the Earth surface | W m-2 | 1 | sfcflw_type | | inout | F | +!! | cldtau | cloud_optical_depth_layers_at_10mu_band | approx 10mu band layer cloud optical depth | none | 2 | real | kind_phys | inout | F | +!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | +!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! | hlw0 | tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_time_step | longwave clear sky heating rate | K s-1 | 2 | real | kind_phys | inout | T | +!! | hlwb | lw_heating_rate_spectral | longwave total sky heating rate (spectral) | K s-1 | 3 | real | kind_phys | inout | T | +!! | flxprf | lw_fluxes | lw fluxes total sky / csk and up / down at levels | W m-2 | 2 | proflw_type | | inout | T | +!! | cld_lwp | cloud_liquid_water_path | cloud liquid water path | g m-2 | 2 | real | kind_phys | in | T | +!! | cld_ref_liq | mean_effective_radius_for_liquid_cloud | mean effective radius for liquid cloud | micron | 2 | real | kind_phys | in | T | +!! | cld_iwp | cloud_ice_water_path | cloud ice water path | g m-2 | 2 | real | kind_phys | in | T | +!! | cld_ref_ice | mean_effective_radius_for_ice_cloud | mean effective radius for ice cloud | micron | 2 | real | kind_phys | in | T | +!! | cld_rwp | cloud_rain_water_path | cloud ice water path | g m-2 | 2 | real | kind_phys | in | T | +!! | cld_ref_rain | mean_effective_radius_for_rain_drop | mean effective radius for rain drop | micron | 2 | real | kind_phys | in | T | +!! | cld_swp | cloud_snow_water_path | cloud snow water path | g m-2 | 2 | real | kind_phys | in | T | +!! | cld_ref_snow | mean_effective_radius_for_snow_flake | mean effective radius for snow flake | micron | 2 | real | kind_phys | in | T | +!! | cld_od | cloud_optical_depth | cloud optical depth | none | 2 | real | kind_phys | in | T | +!! + ! ######################################################################################### + subroutine rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr_n2o, & ! IN + vmr_ch4, vmr_o2, vmr_co, vmr_cfc11, vmr_cfc12, vmr_cfc22, vmr_ccl4, icseed, tau_aer, & ! IN + ssa_aer, sfc_emiss, skt, dzlyr, delpin, de_lgth, ncol, nlay, lprint, cldfrac, lslwr, & ! IN + hlwc, topflx, sfcflx, cldtau, errmsg, errflg, & ! OUT + hlw0, hlwb, flxprf, & ! OPT(out) + cld_lwp, cld_ref_liq, cld_iwp, cld_ref_ice, cld_rwp, cld_ref_rain, cld_swp, & ! OPT(in) + cld_ref_snow, cld_od) ! OPT(in) + + ! Inputs + integer,intent(in) :: & + ncol, & ! Number of horizontal grid-points + nlay ! Number of vertical layers + integer,intent(in),dimension(ncol) :: & + icseed ! auxiliary special cloud related array when module + ! variable isubclw=2, it provides permutation seed + ! for each column profile that are used for generating + ! random numbers. when isubclw /=2, it will not be used. + logical,intent(in) :: & + lprint, & ! Control flag for diagnostics + lslwr ! Flag to calculate RRTMGP LW? + real(kind_phys), dimension(ncol), intent(in) :: & + sfc_emiss, & ! Surface emissivity (1) + skt, & ! Surface(skin) temperature (K) + de_lgth ! Cloud decorrelation length (km) + real(kind_phys), dimension(ncol,nlay), intent(in) :: & + dzlyr, & ! layer thinkness (km) + delpin, & ! layer thickness (mb) + cldfrac, & ! Cloud-fraction (1) + p_lay, & ! Pressure @ model layer-centers (mb) + t_lay, & ! Temperature (K) + q_lay, & ! Specific humidity (kg/kg) + o3_lay, & ! O3 mass mixing-ratio (kg/kg) + vmr_co2, & ! Co2 volume-mixing ratio (kg/kg) + vmr_n2o, & ! N2o volume-mixing ratio (kg/kg) + vmr_ch4, & ! Ch4 volume-mixing ratio (kg/kg) + vmr_o2, & ! O2 volume-mixing ratio (kg/kg) + vmr_co, & ! Co volume-mixing ratio (kg/kg) + vmr_cfc11, & ! CFC11 volume-mixing ratio (kg/kg) + vmr_cfc12, & ! CFC12 volume-mixing ratio (kg/kg) + vmr_cfc22, & ! CFC22 volume-mixing ratio (kg/kg) + vmr_ccl4 ! CCl4 volume-mixing ratio (kg/kg) + real(kind_phys), dimension(ncol,nlay+1), intent(in) :: & + p_lev, & ! Pressure @ model layer-interfaces (mb) + t_lev ! Temperature (K) + real(kind_phys), dimension(ncol,nlay,nbandsLW),intent(in) :: & + tau_aer, & ! Aerosol optical depth (1) + ssa_aer ! Aerosol single-scattering albedo (1) + ! Inputs (optional) + real(kind_phys), dimension(ncol,nlay), intent(in), optional:: & + cld_lwp, & ! Cloud liquid water path (g/m2) + cld_ref_liq, & ! Effective radius (liquid) (micron) + cld_iwp, & ! Cloud ice water path (g/m2) + cld_ref_ice, & ! Effective radius (ice) (micron) + cld_rwp, & ! Cloud rain water path (g/m2) + cld_ref_rain, & ! Effective radius (rain-drop) (micron) + cld_swp, & ! Cloud snow-water path (g/m2) + cld_ref_snow, & ! Effective radius (snow-flake) (micron) + cld_od ! Cloud optical-depth (1) + + ! Outputs (mandatory) + character(len=*), intent(out) :: & + errmsg ! Error message + integer, intent(out) :: & + errflg ! Error code + real(kind_phys),dimension(ncol,nlay),intent(inout) :: & + hlwc, & ! All-sky heating-rate (K/sec) + cldtau ! ~10mu band layer tau (1) + type(topflw_type), dimension(ncol), intent(inout) :: & + topflx ! radiation fluxes at top, components: + ! upfxc - total sky upward flux at top (w/m2) + ! upfx0 - clear sky upward flux at top (w/m2) + type(sfcflw_type), dimension(ncol), intent(inout) :: & + sfcflx ! radiation fluxes at sfc, components: + ! upfxc - total sky upward flux at sfc (w/m2) + ! upfx0 - clear sky upward flux at sfc (w/m2) + ! dnfxc - total sky downward flux at sfc (w/m2) + ! dnfx0 - clear sky downward flux at sfc (w/m2) + ! Outputs (optional) + real(kind_phys), dimension(ncol,nlay,nbandsLW), optional, intent(inout) :: & + hlwb ! All-sky heating rate, in each band (K/sec) + real(kind_phys), dimension(ncol,nlay), optional, intent(inout) :: & + hlw0 ! Clear-sky heating rate (K/sec) + type(proflw_type), dimension(ncol,nlay+1), optional, intent(inout) :: & + flxprf ! 2D radiative fluxes, components: + ! upfxc - total sky upward flux (W/m2) + ! dnfxc - total sky dnward flux (W/m2) + ! upfx0 - clear sky upward flux (W/m2) + ! dnfx0 - clear sky dnward flux (W/m2) + + ! Local variables + integer :: iGpt,iCol,iLay,iBand + integer,dimension(ncol) :: ipseed + real(kind_phys), dimension(nBandsLW,ncol) :: & + semiss + real(kind_phys), dimension(ncol,nlay+1),target :: & + flux_up_allSky, flux_up_clrSky, flux_dn_allSky, flux_dn_clrSky, p_lev2 + real(kind_phys), dimension(ncol,nlay) :: & + vmr_o3, vmr_h2o, cldfrac2, thetaTendClrSky,thetaTendAllSky, cld_ref_liq2, & + cld_ref_ice2,tau_snow,tau_rain + logical,dimension(ncol,nlay) :: & + liqmask,icemask + real(kind_phys), dimension(nGptsLW,ncol,nlay) :: & + cldfracMCICA + real(kind_phys), dimension(:,:,:), allocatable :: & + tau_cld,tau_gpt + logical :: & + top_at_1=.false. + + ! RTE+RRTMGP classes + type(ty_optical_props_1scl) :: & + optical_props_clr, & ! Optical properties for gaseous atmosphere + optical_props_cldy, & ! Optical properties for clouds + optical_props_aer ! Optical properties for aerosols + !type(ty_optical_props_2str) :: & + ! optical_props_cldy ! Optical properties for clouds + + type(ty_source_func_lw) :: & + sources ! source function + type(ty_fluxes_broadband) :: & + fluxAllSky, & ! All-sky flux (W/m2) + fluxClrSky ! Clear-sky flux (W/m2) + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + if (.not. lslwr) return + + ! What is vertical ordering? + top_at_1 = (p_lay(1,1) .lt. p_lay(1,nlay)) + + ! Check for optional arguments. + l_ClrSky_HR = present(hlw0) + l_AllSky_HR_byband = present(hlwb) + l_fluxes2D = present(flxprf) + + ! Check for optional input arguments, depending on cloud method + if (ilwcliq > 0) then ! use prognostic cloud method + if (.not. present(cld_lwp) .or. .not. present(cld_ref_liq) .or. & + .not. present(cld_iwp) .or. .not. present(cld_ref_ice) .or. & + .not. present(cld_rwp) .or. .not. present(cld_ref_rain) .or. & + .not. present(cld_swp) .or. .not. present(cld_ref_snow)) then + write(errmsg,'(*(a))') & + 'Logic error: ilwcliq>0 requires the following', & + ' optional arguments to be present:', & + ' cld_lwp, cld_ref_liq, cld_iwp, cld_ref_ice,', & + ' cld_rwp, cld_ref_rain, cld_swp, cld_ref_snow' + errflg = 1 + return + end if + else ! use diagnostic cloud method + if (.not. present(cld_od) ) then + write(errmsg,'(*(a))') & + 'Logic error: ilwcliq<=0 requires the following', & + ' optional argument to be present: cld_od' + errflg = 1 + return + end if + end if + + ! Change random number seed value for each radiation invocation (isubclw =1 or 2). + if(isubclw == 1) then ! advance prescribed permutation seed + do iCol = 1, ncol + ipseed(iCol) = ipsdlw0 + iCol + enddo + elseif (isubclw == 2) then ! use input array of permutaion seeds + do iCol = 1, ncol + ipseed(iCol) = icseed(iCol) + enddo + endif + + ! Surface emissivity + semiss(:,:) = 1._kind_phys + do iBand=1,nBandsLW + where(sfc_emiss .gt. epsilon .and. sfc_emiss .le. 1) semiss(iBand,:) = sfc_emiss + enddo + + ! Compute volume mixing-ratios for ozone (mmr) and specific-humidity. + vmr_h2o = merge((q_lay/(1-q_lay))*amdw, 0._kind_phys, q_lay .ne. 1._kind_phys) + vmr_o3 = merge(o3_lay*amdo3, 0._kind_phys, o3_lay .gt. 0._kind_phys) + + ! Input model-level pressure @ the top-of-model is set to 1Pa, whereas RRTMGP minimum + ! pressure needs to be slightly greateer than that, ~1.00518Pa + p_lev2=p_lev + p_lev2(:,nlay+1) = kdist_lw_clr%get_press_min()/100._kind_phys + + ! Compute ice/liquid cloud masks, needed by rrtmgp_cloud_optics + liqmask = (cldfrac .gt. 0 .and. cld_lwp .gt. 0) + icemask = (cldfrac .gt. 0 .and. cld_iwp .gt. 0) + do iCol=1,nCol + do iLay=1,nLay + if (icemask(iCol,iLay)) then + print*,'ICEMASKTEST: ',iceMask(iCol,iLay),cld_iwp(iCol,iLay),cld_ref_ice(iCol,iLay) + end if + enddo + enddo + + ! RRTMGP cloud_optics expects particle size to be in a certain range. bound here + cld_ref_ice2 = cld_ref_ice + where(cld_ref_ice2 .gt. re_ice_max) cld_ref_ice2=re_ice_max + where(cld_ref_ice2 .lt. re_ice_min) cld_ref_ice2=re_ice_min + cld_ref_liq2 = cld_ref_liq + where(cld_ref_liq2 .gt. re_liq_max) cld_ref_liq2=re_liq_max + where(cld_ref_liq2 .lt. re_liq_min) cld_ref_liq2=re_liq_min + + allocate(tau_cld(nBandsLW, ncol, nlay)) + allocate(tau_gpt(ncol, nlay, nGptsLW)) + + ! ####################################################################################### + ! Call RRTMGP + ! ####################################################################################### + ! Allocate space for source functions and gas optical properties + call check_error_msg(sources%alloc( ncol, nlay, kdist_lw_clr)) + call check_error_msg(optical_props_clr%alloc_1scl( ncol, nlay, kdist_lw_clr)) + call check_error_msg(optical_props_cldy%alloc_1scl(ncol, nlay, kdist_lw_clr)) + call check_error_msg(optical_props_aer%alloc_1scl( ncol, nlay, kdist_lw_clr)) + + ! Initialize RRTMGP files + fluxAllSky%flux_up => flux_up_allSky + fluxAllsky%flux_dn => flux_dn_allSky + fluxClrSky%flux_up => flux_up_clrSky + fluxClrsky%flux_dn => flux_dn_clrSky + + ! ####################################################################################### + ! 1) Clear-sky fluxes (gaseous-atmosphere + aerosols) + ! ####################################################################################### + ! 1a) Set gas concentrations + print*,'Clear-Sky(LW): Set Gas Concentrations' + call gas_concs_lw%reset() + call check_error_msg(gas_concs_lw%set_vmr('o2', vmr_o2)) + call check_error_msg(gas_concs_lw%set_vmr('co2', vmr_co2)) + call check_error_msg(gas_concs_lw%set_vmr('ch4', vmr_ch4)) + call check_error_msg(gas_concs_lw%set_vmr('n2o', vmr_n2o)) + call check_error_msg(gas_concs_lw%set_vmr('h2o', vmr_h2o)) + call check_error_msg(gas_concs_lw%set_vmr('o3', vmr_o3)) + + ! 1b) Compute the optical properties of the atmosphere and the Planck source functions + ! from pressures, temperatures, and gas concentrations... + print*,'Clear-Sky(LW): Optics' + call check_error_msg(kdist_lw_clr%gas_optics( & + p_lay(1:ncol,1:nlay)*100._kind_phys, & + p_lev2(1:ncol,1:nlay+1)*100._kind_phys, & + t_lay(1:ncol,1:nlay), & + skt(1:ncol), & + gas_concs_lw, & + optical_props_clr, & + sources, & + tlev = t_lev(1:ncol,1:nlay+1))) + + ! 1c) Add contribution from aerosols. + print*,'Clear-Sky(LW): Increment Aerosol' + optical_props_aer%tau(1:ncol,1:nlay,1:nBandsLW) = tau_aer * (1._kind_phys - ssa_aer) + call check_error_msg(optical_props_aer%increment(optical_props_clr)) + + ! 1d) Compute the clear-sky broadband fluxes + print*,'Clear-Sky(LW): Fluxes' + call check_error_msg(rte_lw( & + optical_props_clr, & + top_at_1, & + sources, & + semiss, & + fluxClrSky)) + + ! 1e) Compute heating rates + print*,'Clear-Sky(LW): Heating-rates' + call check_error_msg(compute_heating_rate( & + fluxClrSky%flux_up, & + fluxClrSky%flux_dn, & + p_lev2(1:ncol,1:nlay+1)*100._kind_phys, & + thetaTendClrSky)) + + ! ####################################################################################### + ! 2) All-sky fluxes + ! ####################################################################################### + ! 2a) Compute in-cloud optics + print*,'All-Sky(LW): Optics ' + tau_cld(:,:,:) = 0._kind_phys + if (any(cldfrac .gt. 0)) then + ! If using RRTMG cloud-physics. Model can provide either cloud-optics (cld_od) or + ! cloud-properties by type (cloud LWP,snow effective radius, etc...) + if (rrtmgp_lw_cld_phys .eq. 0) then + print*,'Using RRTMG cloud-physics',rrtmgp_lw_cld_phys,shape(cldfrac) + ! Cloud-optical properties by type provided. + if (.not. present(cld_od)) then + print*,' Using all types too...' + call rrtmgp_lw_cloud_optics(ncol, nlay, nBandsLW, cld_lwp, cld_ref_liq, cld_iwp, & + cld_ref_ice, cld_rwp, cld_ref_rain, cld_swp, cld_ref_snow, cldfrac, tau_cld) + else + ! Cloud-optical depth provided. + do iCol=1,ncol + do iLay=1,nlay + if (cldfrac(iCol,iLay) .gt. cldmin) then + tau_cld(:,iCol,iLay) = cld_od(iCol,iLay) + else + tau_cld(:,iCol,iLay) = 0._kind_phys + endif + end do + end do + endif + endif + + ! If using RRTMGP cloud-physics + if (rrtmgp_lw_cld_phys .gt. 0) then + print*,'Using RRTMGP cloud-physics' + call check_error_msg(kdist_lw_cldy%cloud_optics(ncol, nlay, nBandsLW, nrghice, & + liqmask, icemask, cld_lwp, cld_iwp, cld_ref_liq2, cld_ref_ice2, optical_props_cldy)) + + ! Add in contributions from snow and rain + do iCol=1,ncol + do iLay=1,nlay + if (cldfrac(iCol,iLay) .gt. cldmin) then + ! Rain optical-depth + tau_rain(iCol,iLay) = absrain*cld_rwp(iCol,iLay) + ! Snow optical-depth + if (cld_swp(iCol,iLay) .gt. 0._kind_phys .and. cld_ref_snow(iCol,iLay) .gt. 10._kind_phys) then + tau_snow(iCol,iLay) = abssnow0*1.05756*cld_swp(iCol,iLay)/cld_ref_snow(iCol,iLay) + else + tau_snow(iCol,iLay) = 0._kind_phys + endif + endif + enddo + enddo + do iBand=1,nBandsLW + tau_cld(iBand,:,:) = optical_props_cldy%tau(iBand,:,:)+tau_snow+tau_rain + enddo + !tau_cld = optical_props_cldy%tau + end if + + endif + + ! 2b) Call McICA to generate subcolumns. + tau_gpt(:,:,:) = 0._kind_phys + if (isubclw .gt. 0) then + print*,'All-Sky(LW): McICA' + cldfrac2 = merge(cldfrac,0._kind_phys,cldfrac .gt. cldmin) + call mcica_subcol_lw(ncol, nlay, nGptsLW, cldfrac2, ipseed, dzlyr, de_lgth, cldfracMCICA) + + ! Map band optical depth to each g-point using McICA + do iCol=1,ncol + do iLay=1,nLay + do iGpt=1,nGptsLW + iBand = kdist_lw_clr%convert_gpt2band(iGpt) + if (cldfracMCICA(iBand,iCol,iLay) .gt. 0._kind_phys) then + tau_gpt(iCol,iLay,iGpt) = tau_cld(iband,iCol,iLay) + else + tau_gpt(iCol,iLay,iGpt) = 0._kind_phys + endif + enddo + enddo + enddo + endif + optical_props_cldy%tau = tau_gpt + + ! 2c) Add cloud contribution from the gaseous (clear-sky) atmosphere. + print*,'All-Sky(LW): Increment' + call check_error_msg(optical_props_clr%increment(optical_props_cldy)) + + ! 2d) Compute broadband fluxes + print*,'All-Sky(LW): Fluxes' + call check_error_msg(rte_lw( & + optical_props_cldy, & + top_at_1, & + sources, & + semiss, & + fluxAllSky)) + + ! 2e) Compute heating rates + print*,'All-Sky(LW): Heating-rates' + call check_error_msg(compute_heating_rate( & + fluxAllSky%flux_up, & + fluxAllSky%flux_dn, & + p_lev(1:ncol,1:nlay+1)*100._kind_phys, & + thetaTendAllSky)) + + ! ####################################################################################### + ! Copy fluxes from RRTGMP types into model radiation types. + ! ####################################################################################### + ! Mandatory outputs + topflx%upfxc = fluxAllSky%flux_up(:,nlay+1) + topflx%upfx0 = fluxClrSky%flux_up(:,nlay+1) + sfcflx%upfxc = fluxAllSky%flux_up(:,1) + sfcflx%upfx0 = fluxClrSky%flux_up(:,1) + sfcflx%dnfxc = fluxAllSky%flux_dn(:,1) + sfcflx%dnfx0 = fluxClrSky%flux_dn(:,1) + cldtau = tau_cld(7,:,:) + hlwc = thetaTendAllSky + + ! Optional output + if(l_fluxes2D) then + flxprf%upfxc = fluxAllSky%flux_up + flxprf%dnfxc = fluxAllSky%flux_dn + flxprf%upfx0 = fluxClrSky%flux_up + flxprf%dnfx0 = fluxClrSky%flux_dn + endif + if (l_AllSky_HR_byband) then + do iBand=1,nBandsLW + hlwb(:,:,iBand) = thetaTendAllSky + end do + endif + if (l_ClrSky_HR) then + hlw0 = thetaTendClrSky + endif + + end subroutine rrtmgp_lw_run + ! + subroutine rrtmgp_lw_finalize() + end subroutine rrtmgp_lw_finalize + + ! ######################################################################################### + ! Ancillary functions + ! ######################################################################################### + subroutine check_error_msg(error_msg) + character(len=*), intent(in) :: error_msg + + if(error_msg /= "") then + print*,"ERROR(rrtmgp_lw_main.F90): " + print*,trim(error_msg) + return + end if + end subroutine check_error_msg + + +end module rrtmgp_lw diff --git a/physics/rrtmgp_lw_post.F90 b/physics/rrtmgp_lw_post.F90 new file mode 100644 index 000000000..63a39e721 --- /dev/null +++ b/physics/rrtmgp_lw_post.F90 @@ -0,0 +1,102 @@ +!>\file rrtmgp_lw_post +!!This file contains + module rrtmgp_lw_post + contains + +!>\defgroup rrtmgp_lw_post GFS RRTMGP scheme post +!! @{ +!> \section arg_table_rrtmgp_lw_post_init Argument Table +!! + subroutine rrtmgp_lw_post_init() + end subroutine rrtmgp_lw_post_init + +! PGI compiler does not accept lines longer than 264 characters, remove during pre-processing +#ifndef __PGI +!> \section arg_table_rrtmgp_lw_post_run Argument Table +!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | +!! |-----------------|-----------------------------------------------------------------------------------------------|------------------------------------------------------------------------------|----------|------|-----------------------|-----------|-----------|----------| +!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | +!! | Grid | GFS_grid_type_instance | Fortran DDT containing FV3-GFS grid and interpolation related data | DDT | 0 | GFS_grid_type | | in | F | +!! | Radtend | GFS_radtend_type_instance | Fortran DDT containing FV3-GFS fields targetted for diagnostic output | DDT | 0 | GFS_radtend_type | | inout | F | +!! | Coupling | GFS_coupling_type_instance | Fortran DDT containing FV3-GFS fields to/from coupling with other components | DDT | 0 | GFS_coupling_type | | inout | F | +!! | im | horizontal_loop_extent | horizontal loop extent | count | 0 | integer | | in | F | +!! | ltp | extra_top_layer | extra top layers | none | 0 | integer | | in | F | +!! | lm | vertical_layer_dimension_for_radiation | number of vertical layers for radiation calculation | count | 0 | integer | | in | F | +!! | kd | vertical_index_difference_between_inout_and_local | vertical index difference between in/out and local | index | 0 | integer | | in | F | +!! | tsfa | surface_air_temperature_for_radiation | lowest model layer air temperature for radiation | K | 1 | real | kind_phys | in | F | +!! | htlwc | tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_step | total sky heating rate due to longwave radiation | K s-1 | 2 | real | kind_phys | in | F | +!! | htlw0 | tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_time_step | clear sky heating rate due to longwave radiation | K s-1 | 2 | real | kind_phys | in | F | +!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | +!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! +#endif + subroutine rrtmgp_lw_post_run (Model, Grid, Radtend, Coupling, & + im, ltp, lm, kd, tsfa, htlwc, htlw0, errmsg, errflg) + + use machine, only: kind_phys + use GFS_typedefs, only: GFS_coupling_type, & + GFS_control_type, & + GFS_grid_type, & + GFS_radtend_type + implicit none + type(GFS_control_type), intent(in) :: Model + type(GFS_coupling_type), intent(inout) :: Coupling + type(GFS_grid_type), intent(in) :: Grid + type(GFS_radtend_type), intent(inout) :: Radtend + integer, intent(in) :: im, ltp, LM, kd + real(kind=kind_phys), dimension(size(Grid%xlon,1), Model%levr+LTP), intent(in) :: htlwc + real(kind=kind_phys), dimension(size(Grid%xlon,1), Model%levr+LTP), intent(in) :: htlw0 + real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(in) :: tsfa + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + ! local variables + integer :: k1, k + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + + if (Model%lslwr) then +!> -# Save calculation results +!> - Save surface air temp for diurnal adjustment at model t-steps + + Radtend%tsflw (:) = tsfa(:) + + do k = 1, LM + k1 = k + kd + Radtend%htrlw(1:im,k) = htlwc(1:im,k1) + enddo + ! --- repopulate the points above levr + if (lm < Model%levs) then + do k = lm,Model%levs + Radtend%htrlw (1:im,k) = Radtend%htrlw (1:im,LM) + enddo + endif + + if (Model%lwhtr) then + do k = 1, lm + k1 = k + kd + Radtend%lwhc(1:im,k) = htlw0(1:im,k1) + enddo + ! --- repopulate the points above levr + if (lm < Model%levs) then + do k = lm,Model%levs + Radtend%lwhc(1:im,k) = Radtend%lwhc(1:im,LM) + enddo + endif + endif + +! --- radiation fluxes for other physics processes + Coupling%sfcdlw(:) = Radtend%sfcflw(:)%dnfxc + + endif ! end_if_lslwr + + end subroutine rrtmgp_lw_post_run + +!> \section arg_table_rrtmgp_lw_post_finalize Argument Table +!! + subroutine rrtmgp_lw_post_finalize () + end subroutine rrtmgp_lw_post_finalize + +!! @} + end module rrtmgp_lw_post diff --git a/physics/rrtmgp_lw_post.xml b/physics/rrtmgp_lw_post.xml new file mode 100644 index 000000000..be983ff27 --- /dev/null +++ b/physics/rrtmgp_lw_post.xml @@ -0,0 +1,150 @@ + + + + + + + GFS_control_type_instance + Fortran DDT containing FV3-GFS model control parameters + DDT + Model + GFS_control_type + + in + F + MODULE_rrtmgp_lw_post SCHEME_rrtmgp_lw_post SUBROUTINE_rrtmgp_lw_post_run + + + GFS_grid_type_instance + Fortran DDT containing FV3-GFS grid and interpolation related data + DDT + Grid + GFS_grid_type + + in + F + MODULE_rrtmgp_lw_post SCHEME_rrtmgp_lw_post SUBROUTINE_rrtmgp_lw_post_run + + + GFS_radtend_type_instance + Fortran DDT containing FV3-GFS fields targetted for diagnostic output + DDT + Radtend + GFS_radtend_type + + inout + F + MODULE_rrtmgp_lw_post SCHEME_rrtmgp_lw_post SUBROUTINE_rrtmgp_lw_post_run + + + GFS_coupling_type_instance + Fortran DDT containing FV3-GFS fields to/from coupling with other components + DDT + Coupling + GFS_coupling_type + + inout + F + MODULE_rrtmgp_lw_post SCHEME_rrtmgp_lw_post SUBROUTINE_rrtmgp_lw_post_run + + + horizontal_loop_extent + horizontal loop extent + count + im + integer + + in + F + MODULE_rrtmgp_lw_post SCHEME_rrtmgp_lw_post SUBROUTINE_rrtmgp_lw_post_run + + + extra_top_layer + extra top layers + none + ltp + integer + + in + F + MODULE_rrtmgp_lw_post SCHEME_rrtmgp_lw_post SUBROUTINE_rrtmgp_lw_post_run + + + vertical_layer_dimension_for_radiation + number of vertical layers for radiation calculation + count + lm + integer + + in + F + MODULE_rrtmgp_lw_post SCHEME_rrtmgp_lw_post SUBROUTINE_rrtmgp_lw_post_run + + + vertical_index_difference_between_inout_and_local + vertical index difference between in/out and local + index + kd + integer + + in + F + MODULE_rrtmgp_lw_post SCHEME_rrtmgp_lw_post SUBROUTINE_rrtmgp_lw_post_run + + + surface_air_temperature_for_radiation + lowest model layer air temperature for radiation + K + tsfa + real + (:) + in + F + MODULE_rrtmgp_lw_post SCHEME_rrtmgp_lw_post SUBROUTINE_rrtmgp_lw_post_run + + + tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_step + total sky heating rate due to longwave radiation + K s-1 + htlwc + real + (:,:) + in + F + MODULE_rrtmgp_lw_post SCHEME_rrtmgp_lw_post SUBROUTINE_rrtmgp_lw_post_run + + + tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_time_step + clear sky heating rate due to longwave radiation + K s-1 + htlw0 + real + (:,:) + in + F + MODULE_rrtmgp_lw_post SCHEME_rrtmgp_lw_post SUBROUTINE_rrtmgp_lw_post_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_rrtmgp_lw_post SCHEME_rrtmgp_lw_post SUBROUTINE_rrtmgp_lw_post_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_rrtmgp_lw_post SCHEME_rrtmgp_lw_post SUBROUTINE_rrtmgp_lw_post_run + + + diff --git a/physics/rrtmgp_lw_pre.F90 b/physics/rrtmgp_lw_pre.F90 new file mode 100644 index 000000000..50940595b --- /dev/null +++ b/physics/rrtmgp_lw_pre.F90 @@ -0,0 +1,67 @@ +!>\file rrtmgp_lw_pre.f90 +!! This file contains a call to module_radiation_surface::setemis() to +!! setup surface emissivity for LW radiation. + module rrtmgp_lw_pre + contains + +!>\defgroup rrtmgp_lw_pre GFS RRTMGP scheme pre +!! @{ +!> \section arg_table_rrtmgp_lw_pre_init Argument Table +!! + subroutine rrtmgp_lw_pre_init () + end subroutine rrtmgp_lw_pre_init + +!> \section arg_table_rrtmgp_lw_pre_run Argument Table +!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | +!! |----------------|-------------------------------------------|--------------------------------------------------------------------|----------|------|-----------------------|-----------|--------|----------| +!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | +!! | Grid | GFS_grid_type_instance | Fortran DDT containing FV3-GFS grid and interpolation related data | DDT | 0 | GFS_grid_type | | in | F | +!! | Sfcprop | GFS_sfcprop_type_instance | Fortran DDT containing FV3-GFS surface fields | DDT | 0 | GFS_sfcprop_type | | in | F | +!! | Radtend | GFS_radtend_type_instance | Fortran DDT containing FV3-GFS radiation tendencies | DDT | 0 | GFS_radtend_type | | inout | F | +!! | im | horizontal_loop_extent | horizontal loop extent | count | 0 | integer | | in | F | +!! | tsfg | surface_ground_temperature_for_radiation | surface ground temperature for radiation | K | 1 | real | kind_phys | in | F | +!! | tsfa | surface_air_temperature_for_radiation | lowest model layer air temperature for radiation | K | 1 | real | kind_phys | in | F | +!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | +!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! + subroutine rrtmgp_lw_pre_run (Model, Grid, Sfcprop, Radtend, im, tsfg, tsfa, errmsg, errflg) + + use machine, only: kind_phys + + use GFS_typedefs, only: GFS_control_type, & + GFS_grid_type, & + GFS_radtend_type, & + GFS_sfcprop_type + use module_radiation_surface, only: setemis + + implicit none + type(GFS_control_type), intent(in) :: Model + type(GFS_radtend_type), intent(inout) :: Radtend + type(GFS_sfcprop_type), intent(in) :: Sfcprop + type(GFS_grid_type), intent(in) :: Grid + integer, intent(in) :: im + real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(in) :: tsfa, tsfg + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + + if (Model%lslwr) then +!> - Call module_radiation_surface::setemis(),to setup surface +!! emissivity for LW radiation. + call setemis (Grid%xlon, Grid%xlat, Sfcprop%slmsk, & ! --- inputs + Sfcprop%snowd, Sfcprop%sncovr, Sfcprop%zorl, & + tsfg, tsfa, Sfcprop%hprim, IM, & + Radtend%semis) ! --- outputs + endif + + end subroutine rrtmgp_lw_pre_run + +!> \section arg_table_rrtmgp_lw_pre_finalize Argument Table +!! + subroutine rrtmgp_lw_pre_finalize () + end subroutine rrtmgp_lw_pre_finalize +!! @} + end module rrtmgp_lw_pre diff --git a/physics/rrtmgp_lw_pre.xml b/physics/rrtmgp_lw_pre.xml new file mode 100644 index 000000000..1972f8b60 --- /dev/null +++ b/physics/rrtmgp_lw_pre.xml @@ -0,0 +1,106 @@ + + + + + + + GFS_control_type_instance + Fortran DDT containing FV3-GFS model control parameters + DDT + Model + GFS_control_type + + in + F + MODULE_rrtmgp_lw_pre SCHEME_rrtmgp_lw_pre SUBROUTINE_rrtmgp_lw_pre_run + + + GFS_grid_type_instance + Fortran DDT containing FV3-GFS grid and interpolation related data + DDT + Grid + GFS_grid_type + + in + F + MODULE_rrtmgp_lw_pre SCHEME_rrtmgp_lw_pre SUBROUTINE_rrtmgp_lw_pre_run + + + GFS_sfcprop_type_instance + Fortran DDT containing FV3-GFS surface fields + DDT + Sfcprop + GFS_sfcprop_type + + in + F + MODULE_rrtmgp_lw_pre SCHEME_rrtmgp_lw_pre SUBROUTINE_rrtmgp_lw_pre_run + + + GFS_radtend_type_instance + Fortran DDT containing FV3-GFS radiation tendencies + DDT + Radtend + GFS_radtend_type + + inout + F + MODULE_rrtmgp_lw_pre SCHEME_rrtmgp_lw_pre SUBROUTINE_rrtmgp_lw_pre_run + + + horizontal_loop_extent + horizontal loop extent + count + im + integer + + in + F + MODULE_rrtmgp_lw_pre SCHEME_rrtmgp_lw_pre SUBROUTINE_rrtmgp_lw_pre_run + + + surface_ground_temperature_for_radiation + surface ground temperature for radiation + K + tsfg + real + (:) + in + F + MODULE_rrtmgp_lw_pre SCHEME_rrtmgp_lw_pre SUBROUTINE_rrtmgp_lw_pre_run + + + surface_air_temperature_for_radiation + lowest model layer air temperature for radiation + K + tsfa + real + (:) + in + F + MODULE_rrtmgp_lw_pre SCHEME_rrtmgp_lw_pre SUBROUTINE_rrtmgp_lw_pre_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_rrtmgp_lw_pre SCHEME_rrtmgp_lw_pre SUBROUTINE_rrtmgp_lw_pre_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_rrtmgp_lw_pre SCHEME_rrtmgp_lw_pre SUBROUTINE_rrtmgp_lw_pre_run + + + diff --git a/physics/rte-rrtmgp b/physics/rte-rrtmgp new file mode 160000 index 000000000..54440ad72 --- /dev/null +++ b/physics/rte-rrtmgp @@ -0,0 +1 @@ +Subproject commit 54440ad72cc65f8c368a0c6235157c38d30bd84e From 80e70c19a89ee4d9ddd6bd0d869f0cee80992fe6 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Fri, 22 Mar 2019 15:32:19 -0600 Subject: [PATCH 002/167] Added diffusivity angle correction to optical-depths. --- physics/rrtmgp_lw_cloud_optics.F90 | 18 ++++++++- physics/rrtmgp_lw_main.F90 | 62 +++++++++++++++++++++++------- 2 files changed, 65 insertions(+), 15 deletions(-) diff --git a/physics/rrtmgp_lw_cloud_optics.F90 b/physics/rrtmgp_lw_cloud_optics.F90 index 449dacf16..275e390d9 100644 --- a/physics/rrtmgp_lw_cloud_optics.F90 +++ b/physics/rrtmgp_lw_cloud_optics.F90 @@ -18,6 +18,22 @@ module mo_rrtmgp_lw_cloud_optics real(kind_phys), parameter :: & cldmin = 1e-20_kind_phys + ! Reset diffusivity angle for Bands 2-3 and 5-9 to vary (between 1.50 + ! and 1.80) as a function of total column water vapor. the function + ! has been defined to minimize flux and cooling rate errors in these bands + ! over a wide range of precipitable water values. + real (kind_phys), dimension(nbandsLW_RRTMG) :: & + a0 = (/ 1.66, 1.55, 1.58, 1.66, 1.54, 1.454, 1.89, 1.33, & + 1.668, 1.66, 1.66, 1.66, 1.66, 1.66, 1.66, 1.66 /), & + a1 = (/ 0.00, 0.25, 0.22, 0.00, 0.13, 0.446, -0.10, 0.40, & + -0.006, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 /), & + a2 = (/ 0.00, -12.0, -11.7, 0.00, -0.72,-0.243, 0.19,-0.062, & + 0.414, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 /) + real(kind_phys),parameter :: & + diffusivityLow = 1.50, & ! Minimum diffusivity angle for bands 2-3 and 5-9 + diffusivityHigh = 1.80, & ! Maximum diffusivity angle for bands 2-3 and 5-9 + diffusivityB1410 = 1.66 ! Diffusivity for bands 1, 4, and 10 + ! RRTMG LW cloud property coefficients real(kind_phys) , dimension(58,nBandsLW_RRTMG),parameter :: & absliq1 = reshape(source=(/ & @@ -569,7 +585,7 @@ subroutine rrtmgp_lw_cloud_optics(ncol, nlay, nBandsLW, cld_lwp, cld_ref_liq, cl if (ilwcliq .gt. 0) then do ij=1,ncol do ik=1,nlay - if (cld_frac(ij,ik) .gt. cldmin) then + if (cld_frac(ij,ik) .gt. 0._kind_phys) then ! Rain optical-depth (No band dependence) tau_rain(ij,ik) = absrain*cld_rwp(ij,ik) diff --git a/physics/rrtmgp_lw_main.F90 b/physics/rrtmgp_lw_main.F90 index 22d34d049..ba954b1e3 100644 --- a/physics/rrtmgp_lw_main.F90 +++ b/physics/rrtmgp_lw_main.F90 @@ -14,6 +14,7 @@ module rrtmgp_lw use module_radlw_parameters, only: topflw_type, sfcflw_type, proflw_type use physparam, only: ilwcliq,isubclw use GFS_typedefs, only: GFS_control_type + use mo_rrtmgp_constants, only: grav, avogad use mo_rrtmgp_lw_cloud_optics implicit none @@ -25,8 +26,11 @@ module rrtmgp_lw ! Molecular weight ratios (for converting mmr to vmr) real(kind_phys), parameter :: & - amdw = 1.607793_kind_phys, & ! Molecular weight of dry air / water vapor - amdo3 = 0.603428_kind_phys ! Molecular weight of dry air / ozone + amd = 28.9644_kind_phys, & ! Molecular weight of dry-air (g/mol) + amw = 18.0154_kind_phys, & ! Molecular weight of water vapor (g/mol) + amo3 = 47.9982_kind_phys, & ! Modelular weight of ozone (g/mol) + amdw = amd/amw, & ! Molecular weight of dry air / water vapor + amdo3 = amd/amo3 ! Molecular weight of dry air / ozone ! Logical flags for optional output fields in rrtmgp_lw_run(), default=.false. logical :: & @@ -674,8 +678,7 @@ subroutine rrtmgp_lw_init(Model,mpicomm, mpirank, mpiroot, errmsg, errflg) lut_asyliq, lut_extice, lut_ssaice, lut_asyice)) endif if (rrtmgp_lw_cld_phys .eq. 2) then - call check_error_msg(kdist_lw_cldy%load(band_lims_cldy, radliq_lwr, radliq_upr, & - radliq_fac, radice_lwr, radice_upr, radice_fac, pade_extliq, & + call check_error_msg(kdist_lw_cldy%load(band_lims_cldy, pade_extliq, & pade_ssaliq, pade_asyliq, pade_extice, pade_ssaice, pade_asyice, & pade_sizereg_extliq, pade_sizereg_ssaliq, pade_sizereg_asyliq, & pade_sizereg_extice, pade_sizereg_ssaice, pade_sizereg_asyice)) @@ -837,12 +840,16 @@ subroutine rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr integer :: iGpt,iCol,iLay,iBand integer,dimension(ncol) :: ipseed real(kind_phys), dimension(nBandsLW,ncol) :: & - semiss + semiss, secdiff + real(kind_phys) :: & + tem1,tem2 + real(kind_phys), dimension(ncol) :: & + precipitableH2o real(kind_phys), dimension(ncol,nlay+1),target :: & flux_up_allSky, flux_up_clrSky, flux_dn_allSky, flux_dn_clrSky, p_lev2 real(kind_phys), dimension(ncol,nlay) :: & vmr_o3, vmr_h2o, cldfrac2, thetaTendClrSky,thetaTendAllSky, cld_ref_liq2, & - cld_ref_ice2,tau_snow,tau_rain + cld_ref_ice2,tau_snow,tau_rain,coldry,tem0,colamt logical,dimension(ncol,nlay) :: & liqmask,icemask real(kind_phys), dimension(nGptsLW,ncol,nlay) :: & @@ -932,11 +939,33 @@ subroutine rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr ! Compute ice/liquid cloud masks, needed by rrtmgp_cloud_optics liqmask = (cldfrac .gt. 0 .and. cld_lwp .gt. 0) icemask = (cldfrac .gt. 0 .and. cld_iwp .gt. 0) + + ! Conpute diffusivity angle adjustments. + ! First need to compute precipitable water in each column + tem0 = (1._kind_phys - vmr_h2o)*amd + vmr_h2o*amw + coldry = ( 1.0e-20 * 1.0e3 *avogad)*delpin / (100.*grav*tem0*(1._kind_phys + vmr_h2o)) + colamt = max(0._kind_phys, coldry*vmr_h2o) + tem1 = 0._kind_phys + tem2 = 0._kind_phys do iCol=1,nCol do iLay=1,nLay - if (icemask(iCol,iLay)) then - print*,'ICEMASKTEST: ',iceMask(iCol,iLay),cld_iwp(iCol,iLay),cld_ref_ice(iCol,iLay) - end if + tem1 = tem1 + coldry(iCol,iLay)+colamt(iCol,iLay) + tem2 = tem2 + colamt(iCol,iLay) + enddo + precipitableH2o(iCol) = p_lev(iCol,1)*(10._kind_phys*tem2 / (amdw*tem1*grav)) + enddo + + ! Reset diffusivity angle for Bands 2-3 and 5-9 to vary (between 1.50 + ! and 1.80) as a function of total column water vapor. the function + ! has been defined to minimize flux and cooling rate errors in these bands + ! over a wide range of precipitable water values. + do iCol=1,nCol + do iBand = 1, nbandsLW + if (iBand==1 .or. iBand==4 .or. iBand==10) then + secdiff(iBand,iCol) = diffusivityB1410 + else + secdiff(iBand,iCol) = min( diffusivityHigh, max(diffusivityLow, a0(iBand)+a1(iBand)*exp(a2(iBand)*precipitableH2o(iCol)))) + endif enddo enddo @@ -997,6 +1026,13 @@ subroutine rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr optical_props_aer%tau(1:ncol,1:nlay,1:nBandsLW) = tau_aer * (1._kind_phys - ssa_aer) call check_error_msg(optical_props_aer%increment(optical_props_clr)) + ! 1c2) Apply diffusivity angle + do iCol=1,nCol + do iBand=1,nBandsLW + optical_props_clr%tau(iCol,1:nlay,iBand) = optical_props_clr%tau(iCol,1:nlay,iBand)*secdiff(iBand,iCol) + enddo + enddo + ! 1d) Compute the clear-sky broadband fluxes print*,'Clear-Sky(LW): Fluxes' call check_error_msg(rte_lw( & @@ -1024,7 +1060,7 @@ subroutine rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr ! If using RRTMG cloud-physics. Model can provide either cloud-optics (cld_od) or ! cloud-properties by type (cloud LWP,snow effective radius, etc...) if (rrtmgp_lw_cld_phys .eq. 0) then - print*,'Using RRTMG cloud-physics',rrtmgp_lw_cld_phys,shape(cldfrac) + print*,'Using RRTMG cloud-physics' ! Cloud-optical properties by type provided. if (.not. present(cld_od)) then print*,' Using all types too...' @@ -1035,7 +1071,7 @@ subroutine rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr do iCol=1,ncol do iLay=1,nlay if (cldfrac(iCol,iLay) .gt. cldmin) then - tau_cld(:,iCol,iLay) = cld_od(iCol,iLay) + tau_cld(:,iCol,iLay) = cld_od(iCol,iLay)*secdiff(:,iCol) else tau_cld(:,iCol,iLay) = 0._kind_phys endif @@ -1068,9 +1104,7 @@ subroutine rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr do iBand=1,nBandsLW tau_cld(iBand,:,:) = optical_props_cldy%tau(iBand,:,:)+tau_snow+tau_rain enddo - !tau_cld = optical_props_cldy%tau end if - endif ! 2b) Call McICA to generate subcolumns. @@ -1086,7 +1120,7 @@ subroutine rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr do iGpt=1,nGptsLW iBand = kdist_lw_clr%convert_gpt2band(iGpt) if (cldfracMCICA(iBand,iCol,iLay) .gt. 0._kind_phys) then - tau_gpt(iCol,iLay,iGpt) = tau_cld(iband,iCol,iLay) + tau_gpt(iCol,iLay,iGpt) = tau_cld(iband,iCol,iLay)*secdiff(iBand,iCol) else tau_gpt(iCol,iLay,iGpt) = 0._kind_phys endif From 9414a90790aa4669cef3b21a256595ce540661f6 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Tue, 16 Apr 2019 12:15:03 -0600 Subject: [PATCH 003/167] Added ability to provide cloudy profile to radiation (RRTMG and RRTMGP). --- physics/GFS_rrtmg_pre.F90 | 122 +++- physics/radlw_main.f | 22 +- physics/rrtmgp_lw_cloud_optics.F90 | 1043 ++++++++++++++-------------- physics/rrtmgp_lw_main.F90 | 516 +++++++------- 4 files changed, 918 insertions(+), 785 deletions(-) diff --git a/physics/GFS_rrtmg_pre.F90 b/physics/GFS_rrtmg_pre.F90 index 3796d68dc..9b8b4e82b 100644 --- a/physics/GFS_rrtmg_pre.F90 +++ b/physics/GFS_rrtmg_pre.F90 @@ -11,6 +11,7 @@ module GFS_rrtmg_pre !! \section arg_table_GFS_rrtmg_pre_init Argument Table !! subroutine GFS_rrtmg_pre_init () + open(58,file='GFS_rrtmg_aux_dump.txt',status='unknown') end subroutine GFS_rrtmg_pre_init !> \section arg_table_GFS_rrtmg_pre_run Argument Table @@ -205,6 +206,8 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input rhly, tvly,qstl, vvel, clw, ciw, prslk1, tem2da, & cldcov, deltaq, cnvc, cnvw, & effrl, effri, effrr, effrs + real (kind=kind_phys) :: clwmin, clwm, clwt, onemrh, value, tem1, tem2, tem3 + real (kind=kind_phys), parameter :: xrc3 = 100. real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP+1) :: tem2db ! real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP+1) :: hz @@ -640,31 +643,6 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input enddo endif ! - if (Model%uni_cld) then - if (Model%effr_in) then - do k=1,lm - k1 = k + kd - do i=1,im - cldcov(i,k1) = Tbd%phy_f3d(i,k,Model%indcld) - effrl(i,k1) = Tbd%phy_f3d(i,k,2) - effri(i,k1) = Tbd%phy_f3d(i,k,3) - effrr(i,k1) = Tbd%phy_f3d(i,k,4) - effrs(i,k1) = Tbd%phy_f3d(i,k,5) - enddo - enddo - else - do k=1,lm - k1 = k + kd - do i=1,im - cldcov(i,k1) = Tbd%phy_f3d(i,k,Model%indcld) - enddo - enddo - endif - elseif (Model%imp_physics == Model%imp_physics_gfdl) then ! GFDL MP - cldcov(1:IM,1+kd:LM+kd) = tracer1(1:IM,1:LM,Model%ntclamt) - else ! neither of the other two cases - cldcov = 0.0 - endif ! ! --- add suspended convective cloud water to grid-scale cloud water @@ -722,6 +700,90 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input ccnd(1:IM,1:LMK,1) = ccnd(1:IM,1:LMK,1) + cnvw(1:IM,1:LMK) endif + if (Model%imp_physics == 10) then + ccnd(1:IM,1:LMK,1) = ccnd(1:IM,1:LMK,1) + cnvw(1:IM,1:LMK) + ccnd(1:IM,1:LMK,2) + endif + +! DJS2019: START + ! Compute layer cloud fraction. + clwmin = 0.0 + if (.not. Model%lmfshal) then + do k = 1, LMK + do i = 1, IM + clwt = 1.0e-6 * (plyr(i,k)*0.001) + if (ccnd(i,k,1) > 0.) then + onemrh= max( 1.e-10, 1.0-rhly(i,k) ) + clwm = clwmin / max( 0.01, plyr(i,k)*0.001 ) + tem1 = min(max(sqrt(sqrt(onemrh*qstl(i,k))),0.0001),1.0) + tem1 = 2000.0 / tem1 + value = max( min( tem1*(ccnd(i,k,1)-clwm), 50.0 ), 0.0 ) + tem2 = sqrt( sqrt(rhly(i,k)) ) + cldcov(i,k) = max( tem2*(1.0-exp(-value)), 0.0 ) + endif + enddo + enddo + else + do k = 1, LMK + do i = 1, IM + clwt = 1.0e-6 * (plyr(i,k)*0.001) + if (ccnd(i,k,1) > 0.) then + onemrh= max( 1.e-10, 1.0-rhly(i,k) ) + clwm = clwmin / max( 0.01, plyr(i,k)*0.001 ) + tem1 = min(max((onemrh*qstl(i,k))**0.49,0.0001),1.0) !jhan + if (Model%lmfdeep2) then + tem1 = xrc3 / tem1 + else + tem1 = 100.0 / tem1 + endif + value = max( min( tem1*(ccnd(i,k,1)-clwm), 50.0 ), 0.0 ) + tem2 = sqrt( sqrt(rhly(i,k)) ) + cldcov(i,k) = max( tem2*(1.0-exp(-value)), 0.0 ) + endif + enddo + enddo + endif +! DJS2019: END + + if (Model%uni_cld) then + if (Model%effr_in) then + do k=1,lm + k1 = k + kd + do i=1,im + ! DJS2019: Tbd%phy_f3d(:,:,1) is mean layer temperature, not cloud amount + cldcov(i,k1) = Tbd%phy_f3d(i,k,Model%indcld) + cldcov(i,k1) = tracer1(i,k,Model%ntclamt) + effrl(i,k1) = Tbd%phy_f3d(i,k,2) + effri(i,k1) = Tbd%phy_f3d(i,k,3) + effrr(i,k1) = Tbd%phy_f3d(i,k,4) + effrs(i,k1) = Tbd%phy_f3d(i,k,5) + enddo + enddo + else + do k=1,lm + k1 = k + kd + do i=1,im + ! DJS2019: Tbd%phy_f3d(:,:,1) is mean layer temperature, not cloud amount + !cldcov(i,k1) = Tbd%phy_f3d(i,k,Model%indcld) + !if (tracer1(i,k,ntcw) .gt. 0 .or. tracer1(i,k,ntiw) .gt. 0) then + ! cldcov(i,k1) = 0.1 + !else + ! cldcov(i,k1) = 0.0 + !endif + enddo + enddo + endif + elseif (Model%imp_physics == Model%imp_physics_gfdl) then ! GFDL MP + cldcov(1:IM,1+kd:LM+kd) = tracer1(1:IM,1:LM,Model%ntclamt) + else ! neither of the other two cases + !cldcov = 0.0 + endif + + write(58,*) "Model%imp_physics: ",Model%imp_physics + write(58,*) "Model%uni_cld: ",Model%uni_cld + write(58,*) "Model%ncld: ",Model%ncld + write(58,*) "Model%lgfdlmprad: ",Model%lgfdlmprad + write(58,*) "Model%lmfshal: ",Model%lmfshal + write(58,*) "Model%lmfdeep2: ",Model%lmfdeep2 if (Model%imp_physics == 99 .or. Model%imp_physics == 10) then ! zhao/moorthi's prognostic cloud scheme ! or unified cloud and/or with MG microphysics @@ -736,6 +798,8 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input call progcld1 (plyr ,plvl, tlyr, tvly, qlyr, qstl, rhly, & ! --- inputs ccnd(1:IM,1:LMK,1), Grid%xlat,Grid%xlon, & Sfcprop%slmsk, dz, delp, IM, LMK, LMP, & +!DJS2019: Pass uni_cld=true to use prescribed cloud-cover amount +! .true., Model%lmfshal, & Model%uni_cld, Model%lmfshal, & Model%lmfdeep2, cldcov, & effrl, effri, effrr, effrs, Model%effr_in, & @@ -812,6 +876,13 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input enddo enddo + write(58,*) "#" + do k=1,Model%levr+LTP + write(58,"(5F10.3)") plyr(1,k),tlyr(1,k),clouds2(1,k), & + & clouds4(1,k), clouds1(1,k) + enddo + + ! mg, sfc-perts ! --- scale random patterns for surface perturbations with ! perturbation size @@ -831,6 +902,7 @@ end subroutine GFS_rrtmg_pre_run !> \section arg_table_GFS_rrtmg_pre_finalize Argument Table !! subroutine GFS_rrtmg_pre_finalize () + close(58) end subroutine GFS_rrtmg_pre_finalize !! @} diff --git a/physics/radlw_main.f b/physics/radlw_main.f index 00603e315..01a40b8ad 100644 --- a/physics/radlw_main.f +++ b/physics/radlw_main.f @@ -354,6 +354,9 @@ module rrtmg_lw ! ================ subroutine rrtmg_lw_init () + open(59,file='rrtmg_aux_dump.txt',status='unknown') + open(60,file='rrtmg_aux_tautot.txt',status='unknown') + open(61,file='rrtmg_aux_taucld.txt',status='unknown') end subroutine rrtmg_lw_init !> \defgroup module_radlw_main GFS radlw Main @@ -1286,14 +1289,28 @@ subroutine rrtmg_lw_run & endif endif ! if_ivflip - + write(59,*) "#" + write(60,*) "#" + do j=1,nLay + write(59,"(9F10.3)") plyr(1,j),tlyr(1,j),cld_lwp(1,j), & + & cld_iwp(1,j), cld_cf(1,j), sum(totuclfl(j-1:j))/2., & + & sum(totdclfl(j-1:j))/2., sum(totuflux(j-1:j))/2., & + & sum(totdflux(j-1:j))/2. + write(60,*) tautot(:,j) + write(61,*) taucld(:,j) + enddo enddo lab_do_iplon + + !................................... end subroutine rrtmg_lw_run !----------------------------------- !> @} subroutine rrtmg_lw_finalize () + close(59) + close(60) + close(61) end subroutine rrtmg_lw_finalize @@ -1725,6 +1742,7 @@ subroutine cldprop & do ib = 1, nbands tauliq(ib) = max(f_zero, cldliq*(absliq1(index,ib) & & + fint*(absliq1(index+1,ib)-absliq1(index,ib)) )) + enddo endif ! end if_ilwcliq_block endif ! end if_cldliq_block @@ -1784,7 +1802,7 @@ subroutine cldprop & endif ! end if_cldice_block do ib = 1, nbands - taucld(ib,k) = tauice(ib) + tauliq(ib) + tauran + tausnw + taucld(ib,k) = tauice(ib) + tauliq(ib) + tauran + tausnw enddo endif lab_if_cld diff --git a/physics/rrtmgp_lw_cloud_optics.F90 b/physics/rrtmgp_lw_cloud_optics.F90 index 275e390d9..d21a9221d 100644 --- a/physics/rrtmgp_lw_cloud_optics.F90 +++ b/physics/rrtmgp_lw_cloud_optics.F90 @@ -37,198 +37,198 @@ module mo_rrtmgp_lw_cloud_optics ! RRTMG LW cloud property coefficients real(kind_phys) , dimension(58,nBandsLW_RRTMG),parameter :: & absliq1 = reshape(source=(/ & - 1.64047e-03_kind_phys, 6.90533e-02_kind_phys, 7.72017e-02_kind_phys, 7.78054e-02_kind_phys, 7.69523e-02_kind_phys, & !1 - 7.58058e-02_kind_phys, 7.46400e-02_kind_phys, 7.35123e-02_kind_phys, 7.24162e-02_kind_phys, 7.13225e-02_kind_phys, & !1 - 6.99145e-02_kind_phys, 6.66409e-02_kind_phys, 6.36582e-02_kind_phys, 6.09425e-02_kind_phys, 5.84593e-02_kind_phys, & !1 - 5.61743e-02_kind_phys, 5.40571e-02_kind_phys, 5.20812e-02_kind_phys, 5.02245e-02_kind_phys, 4.84680e-02_kind_phys, & !1 - 4.67959e-02_kind_phys, 4.51944e-02_kind_phys, 4.36516e-02_kind_phys, 4.21570e-02_kind_phys, 4.07015e-02_kind_phys, & !1 - 3.92766e-02_kind_phys, 3.78747e-02_kind_phys, 3.64886e-02_kind_phys, 3.53632e-02_kind_phys, 3.41992e-02_kind_phys, & !1 - 3.31016e-02_kind_phys, 3.20643e-02_kind_phys, 3.10817e-02_kind_phys, 3.01490e-02_kind_phys, 2.92620e-02_kind_phys, & !1 - 2.84171e-02_kind_phys, 2.76108e-02_kind_phys, 2.68404e-02_kind_phys, 2.61031e-02_kind_phys, 2.53966e-02_kind_phys, & !1 - 2.47189e-02_kind_phys, 2.40678e-02_kind_phys, 2.34418e-02_kind_phys, 2.28392e-02_kind_phys, 2.22586e-02_kind_phys, & !1 - 2.16986e-02_kind_phys, 2.11580e-02_kind_phys, 2.06356e-02_kind_phys, 2.01305e-02_kind_phys, 1.96417e-02_kind_phys, & !1 - 1.91682e-02_kind_phys, 1.87094e-02_kind_phys, 1.82643e-02_kind_phys, 1.78324e-02_kind_phys, 1.74129e-02_kind_phys, & !1 - 1.70052e-02_kind_phys, 1.66088e-02_kind_phys, 1.62231e-02_kind_phys, & !1 - 2.19486e-01_kind_phys, 1.80687e-01_kind_phys, 1.59150e-01_kind_phys, 1.44731e-01_kind_phys, 1.33703e-01_kind_phys, & !2 - 1.24355e-01_kind_phys, 1.15756e-01_kind_phys, 1.07318e-01_kind_phys, 9.86119e-02_kind_phys, 8.92739e-02_kind_phys, & !2 - 8.34911e-02_kind_phys, 7.70773e-02_kind_phys, 7.15240e-02_kind_phys, 6.66615e-02_kind_phys, 6.23641e-02_kind_phys, & !2 - 5.85359e-02_kind_phys, 5.51020e-02_kind_phys, 5.20032e-02_kind_phys, 4.91916e-02_kind_phys, 4.66283e-02_kind_phys, & !2 - 4.42813e-02_kind_phys, 4.21236e-02_kind_phys, 4.01330e-02_kind_phys, 3.82905e-02_kind_phys, 3.65797e-02_kind_phys, & !2 - 3.49869e-02_kind_phys, 3.35002e-02_kind_phys, 3.21090e-02_kind_phys, 3.08957e-02_kind_phys, 2.97601e-02_kind_phys, & !2 - 2.86966e-02_kind_phys, 2.76984e-02_kind_phys, 2.67599e-02_kind_phys, 2.58758e-02_kind_phys, 2.50416e-02_kind_phys, & !2 - 2.42532e-02_kind_phys, 2.35070e-02_kind_phys, 2.27997e-02_kind_phys, 2.21284e-02_kind_phys, 2.14904e-02_kind_phys, & !2 - 2.08834e-02_kind_phys, 2.03051e-02_kind_phys, 1.97536e-02_kind_phys, 1.92271e-02_kind_phys, 1.87239e-02_kind_phys, & !2 - 1.82425e-02_kind_phys, 1.77816e-02_kind_phys, 1.73399e-02_kind_phys, 1.69162e-02_kind_phys, 1.65094e-02_kind_phys, & !2 - 1.61187e-02_kind_phys, 1.57430e-02_kind_phys, 1.53815e-02_kind_phys, 1.50334e-02_kind_phys, 1.46981e-02_kind_phys, & !2 - 1.43748e-02_kind_phys, 1.40628e-02_kind_phys, 1.37617e-02_kind_phys, & !2 - 2.95174e-01_kind_phys, 2.34765e-01_kind_phys, 1.98038e-01_kind_phys, 1.72114e-01_kind_phys, 1.52083e-01_kind_phys, & !3 - 1.35654e-01_kind_phys, 1.21613e-01_kind_phys, 1.09252e-01_kind_phys, 9.81263e-02_kind_phys, 8.79448e-02_kind_phys, & !3 - 8.12566e-02_kind_phys, 7.44563e-02_kind_phys, 6.86374e-02_kind_phys, 6.36042e-02_kind_phys, 5.92094e-02_kind_phys, & !3 - 5.53402e-02_kind_phys, 5.19087e-02_kind_phys, 4.88455e-02_kind_phys, 4.60951e-02_kind_phys, 4.36124e-02_kind_phys, & !3 - 4.13607e-02_kind_phys, 3.93096e-02_kind_phys, 3.74338e-02_kind_phys, 3.57119e-02_kind_phys, 3.41261e-02_kind_phys, & !3 - 3.26610e-02_kind_phys, 3.13036e-02_kind_phys, 3.00425e-02_kind_phys, 2.88497e-02_kind_phys, 2.78077e-02_kind_phys, & !3 - 2.68317e-02_kind_phys, 2.59158e-02_kind_phys, 2.50545e-02_kind_phys, 2.42430e-02_kind_phys, 2.34772e-02_kind_phys, & !3 - 2.27533e-02_kind_phys, 2.20679e-02_kind_phys, 2.14181e-02_kind_phys, 2.08011e-02_kind_phys, 2.02145e-02_kind_phys, & !3 - 1.96561e-02_kind_phys, 1.91239e-02_kind_phys, 1.86161e-02_kind_phys, 1.81311e-02_kind_phys, 1.76673e-02_kind_phys, & !3 - 1.72234e-02_kind_phys, 1.67981e-02_kind_phys, 1.63903e-02_kind_phys, 1.59989e-02_kind_phys, 1.56230e-02_kind_phys, & !3 - 1.52615e-02_kind_phys, 1.49138e-02_kind_phys, 1.45791e-02_kind_phys, 1.42565e-02_kind_phys, 1.39455e-02_kind_phys, & !3 - 1.36455e-02_kind_phys, 1.33559e-02_kind_phys, 1.30761e-02_kind_phys, & !3 - 3.00925e-01_kind_phys, 2.36949e-01_kind_phys, 1.96947e-01_kind_phys, 1.68692e-01_kind_phys, 1.47190e-01_kind_phys, & !4 - 1.29986e-01_kind_phys, 1.15719e-01_kind_phys, 1.03568e-01_kind_phys, 9.30028e-02_kind_phys, 8.36658e-02_kind_phys, & !4 - 7.71075e-02_kind_phys, 7.07002e-02_kind_phys, 6.52284e-02_kind_phys, 6.05024e-02_kind_phys, 5.63801e-02_kind_phys, & !4 - 5.27534e-02_kind_phys, 4.95384e-02_kind_phys, 4.66690e-02_kind_phys, 4.40925e-02_kind_phys, 4.17664e-02_kind_phys, & !4 - 3.96559e-02_kind_phys, 3.77326e-02_kind_phys, 3.59727e-02_kind_phys, 3.43561e-02_kind_phys, 3.28662e-02_kind_phys, & !4 - 3.14885e-02_kind_phys, 3.02110e-02_kind_phys, 2.90231e-02_kind_phys, 2.78948e-02_kind_phys, 2.69109e-02_kind_phys, & !4 - 2.59884e-02_kind_phys, 2.51217e-02_kind_phys, 2.43058e-02_kind_phys, 2.35364e-02_kind_phys, 2.28096e-02_kind_phys, & !4 - 2.21218e-02_kind_phys, 2.14700e-02_kind_phys, 2.08515e-02_kind_phys, 2.02636e-02_kind_phys, 1.97041e-02_kind_phys, & !4 - 1.91711e-02_kind_phys, 1.86625e-02_kind_phys, 1.81769e-02_kind_phys, 1.77126e-02_kind_phys, 1.72683e-02_kind_phys, & !4 - 1.68426e-02_kind_phys, 1.64344e-02_kind_phys, 1.60427e-02_kind_phys, 1.56664e-02_kind_phys, 1.53046e-02_kind_phys, & !4 - 1.49565e-02_kind_phys, 1.46214e-02_kind_phys, 1.42985e-02_kind_phys, 1.39871e-02_kind_phys, 1.36866e-02_kind_phys, & !4 - 1.33965e-02_kind_phys, 1.31162e-02_kind_phys, 1.28453e-02_kind_phys, & !4 - 2.64691e-01_kind_phys, 2.12018e-01_kind_phys, 1.78009e-01_kind_phys, 1.53539e-01_kind_phys, 1.34721e-01_kind_phys, & !5 - 1.19580e-01_kind_phys, 1.06996e-01_kind_phys, 9.62772e-02_kind_phys, 8.69710e-02_kind_phys, 7.87670e-02_kind_phys, & !5 - 7.29272e-02_kind_phys, 6.70920e-02_kind_phys, 6.20977e-02_kind_phys, 5.77732e-02_kind_phys, 5.39910e-02_kind_phys, & !5 - 5.06538e-02_kind_phys, 4.76866e-02_kind_phys, 4.50301e-02_kind_phys, 4.26374e-02_kind_phys, 4.04704e-02_kind_phys, & !5 - 3.84981e-02_kind_phys, 3.66948e-02_kind_phys, 3.50394e-02_kind_phys, 3.35141e-02_kind_phys, 3.21038e-02_kind_phys, & !5 - 3.07957e-02_kind_phys, 2.95788e-02_kind_phys, 2.84438e-02_kind_phys, 2.73790e-02_kind_phys, 2.64390e-02_kind_phys, & !5 - 2.55565e-02_kind_phys, 2.47263e-02_kind_phys, 2.39437e-02_kind_phys, 2.32047e-02_kind_phys, 2.25056e-02_kind_phys, & !5 - 2.18433e-02_kind_phys, 2.12149e-02_kind_phys, 2.06177e-02_kind_phys, 2.00495e-02_kind_phys, 1.95081e-02_kind_phys, & !5 - 1.89917e-02_kind_phys, 1.84984e-02_kind_phys, 1.80269e-02_kind_phys, 1.75755e-02_kind_phys, 1.71431e-02_kind_phys, & !5 - 1.67283e-02_kind_phys, 1.63303e-02_kind_phys, 1.59478e-02_kind_phys, 1.55801e-02_kind_phys, 1.52262e-02_kind_phys, & !5 - 1.48853e-02_kind_phys, 1.45568e-02_kind_phys, 1.42400e-02_kind_phys, 1.39342e-02_kind_phys, 1.36388e-02_kind_phys, & !5 - 1.33533e-02_kind_phys, 1.30773e-02_kind_phys, 1.28102e-02_kind_phys, & !5 - 8.81182e-02_kind_phys, 1.06745e-01_kind_phys, 9.79753e-02_kind_phys, 8.99625e-02_kind_phys, 8.35200e-02_kind_phys, & !6 - 7.81899e-02_kind_phys, 7.35939e-02_kind_phys, 6.94696e-02_kind_phys, 6.56266e-02_kind_phys, 6.19148e-02_kind_phys, & !6 - 5.83355e-02_kind_phys, 5.49306e-02_kind_phys, 5.19642e-02_kind_phys, 4.93325e-02_kind_phys, 4.69659e-02_kind_phys, & !6 - 4.48148e-02_kind_phys, 4.28431e-02_kind_phys, 4.10231e-02_kind_phys, 3.93332e-02_kind_phys, 3.77563e-02_kind_phys, & !6 - 3.62785e-02_kind_phys, 3.48882e-02_kind_phys, 3.35758e-02_kind_phys, 3.23333e-02_kind_phys, 3.11536e-02_kind_phys, & !6 - 3.00310e-02_kind_phys, 2.89601e-02_kind_phys, 2.79365e-02_kind_phys, 2.70502e-02_kind_phys, 2.62618e-02_kind_phys, & !6 - 2.55025e-02_kind_phys, 2.47728e-02_kind_phys, 2.40726e-02_kind_phys, 2.34013e-02_kind_phys, 2.27583e-02_kind_phys, & !6 - 2.21422e-02_kind_phys, 2.15522e-02_kind_phys, 2.09869e-02_kind_phys, 2.04453e-02_kind_phys, 1.99260e-02_kind_phys, & !6 - 1.94280e-02_kind_phys, 1.89501e-02_kind_phys, 1.84913e-02_kind_phys, 1.80506e-02_kind_phys, 1.76270e-02_kind_phys, & !6 - 1.72196e-02_kind_phys, 1.68276e-02_kind_phys, 1.64500e-02_kind_phys, 1.60863e-02_kind_phys, 1.57357e-02_kind_phys, & !6 - 1.53975e-02_kind_phys, 1.50710e-02_kind_phys, 1.47558e-02_kind_phys, 1.44511e-02_kind_phys, 1.41566e-02_kind_phys, & !6 - 1.38717e-02_kind_phys, 1.35960e-02_kind_phys, 1.33290e-02_kind_phys, & !6 - 4.32174e-02_kind_phys, 7.36078e-02_kind_phys, 6.98340e-02_kind_phys, 6.65231e-02_kind_phys, 6.41948e-02_kind_phys, & !7 - 6.23551e-02_kind_phys, 6.06638e-02_kind_phys, 5.88680e-02_kind_phys, 5.67124e-02_kind_phys, 5.38629e-02_kind_phys, & !7 - 4.99579e-02_kind_phys, 4.86289e-02_kind_phys, 4.70120e-02_kind_phys, 4.52854e-02_kind_phys, 4.35466e-02_kind_phys, & !7 - 4.18480e-02_kind_phys, 4.02169e-02_kind_phys, 3.86658e-02_kind_phys, 3.71992e-02_kind_phys, 3.58168e-02_kind_phys, & !7 - 3.45155e-02_kind_phys, 3.32912e-02_kind_phys, 3.21390e-02_kind_phys, 3.10538e-02_kind_phys, 3.00307e-02_kind_phys, & !7 - 2.90651e-02_kind_phys, 2.81524e-02_kind_phys, 2.72885e-02_kind_phys, 2.62821e-02_kind_phys, 2.55744e-02_kind_phys, & !7 - 2.48799e-02_kind_phys, 2.42029e-02_kind_phys, 2.35460e-02_kind_phys, 2.29108e-02_kind_phys, 2.22981e-02_kind_phys, & !7 - 2.17079e-02_kind_phys, 2.11402e-02_kind_phys, 2.05945e-02_kind_phys, 2.00701e-02_kind_phys, 1.95663e-02_kind_phys, & !7 - 1.90824e-02_kind_phys, 1.86174e-02_kind_phys, 1.81706e-02_kind_phys, 1.77411e-02_kind_phys, 1.73281e-02_kind_phys, & !7 - 1.69307e-02_kind_phys, 1.65483e-02_kind_phys, 1.61801e-02_kind_phys, 1.58254e-02_kind_phys, 1.54835e-02_kind_phys, & !7 - 1.51538e-02_kind_phys, 1.48358e-02_kind_phys, 1.45288e-02_kind_phys, 1.42322e-02_kind_phys, 1.39457e-02_kind_phys, & !7 - 1.36687e-02_kind_phys, 1.34008e-02_kind_phys, 1.31416e-02_kind_phys, & !7 - 1.41881e-01_kind_phys, 7.15419e-02_kind_phys, 6.30335e-02_kind_phys, 6.11132e-02_kind_phys, 6.01931e-02_kind_phys, & !8 - 5.92420e-02_kind_phys, 5.78968e-02_kind_phys, 5.58876e-02_kind_phys, 5.28923e-02_kind_phys, 4.84462e-02_kind_phys, & !8 - 4.60839e-02_kind_phys, 4.56013e-02_kind_phys, 4.45410e-02_kind_phys, 4.31866e-02_kind_phys, 4.17026e-02_kind_phys, & !8 - 4.01850e-02_kind_phys, 3.86892e-02_kind_phys, 3.72461e-02_kind_phys, 3.58722e-02_kind_phys, 3.45749e-02_kind_phys, & !8 - 3.33564e-02_kind_phys, 3.22155e-02_kind_phys, 3.11494e-02_kind_phys, 3.01541e-02_kind_phys, 2.92253e-02_kind_phys, & !8 - 2.83584e-02_kind_phys, 2.75488e-02_kind_phys, 2.67925e-02_kind_phys, 2.57692e-02_kind_phys, 2.50704e-02_kind_phys, & !8 - 2.43918e-02_kind_phys, 2.37350e-02_kind_phys, 2.31005e-02_kind_phys, 2.24888e-02_kind_phys, 2.18996e-02_kind_phys, & !8 - 2.13325e-02_kind_phys, 2.07870e-02_kind_phys, 2.02623e-02_kind_phys, 1.97577e-02_kind_phys, 1.92724e-02_kind_phys, & !8 - 1.88056e-02_kind_phys, 1.83564e-02_kind_phys, 1.79241e-02_kind_phys, 1.75079e-02_kind_phys, 1.71070e-02_kind_phys, & !8 - 1.67207e-02_kind_phys, 1.63482e-02_kind_phys, 1.59890e-02_kind_phys, 1.56424e-02_kind_phys, 1.53077e-02_kind_phys, & !8 - 1.49845e-02_kind_phys, 1.46722e-02_kind_phys, 1.43702e-02_kind_phys, 1.40782e-02_kind_phys, 1.37955e-02_kind_phys, & !8 - 1.35219e-02_kind_phys, 1.32569e-02_kind_phys, 1.30000e-02_kind_phys, & !8 - 6.72726e-02_kind_phys, 6.61013e-02_kind_phys, 6.47866e-02_kind_phys, 6.33780e-02_kind_phys, 6.18985e-02_kind_phys, & !9 - 6.03335e-02_kind_phys, 5.86136e-02_kind_phys, 5.65876e-02_kind_phys, 5.39839e-02_kind_phys, 5.03536e-02_kind_phys, & !9 - 4.71608e-02_kind_phys, 4.63630e-02_kind_phys, 4.50313e-02_kind_phys, 4.34526e-02_kind_phys, 4.17876e-02_kind_phys, & !9 - 4.01261e-02_kind_phys, 3.85171e-02_kind_phys, 3.69860e-02_kind_phys, 3.55442e-02_kind_phys, 3.41954e-02_kind_phys, & !9 - 3.29384e-02_kind_phys, 3.17693e-02_kind_phys, 3.06832e-02_kind_phys, 2.96745e-02_kind_phys, 2.87374e-02_kind_phys, & !9 - 2.78662e-02_kind_phys, 2.70557e-02_kind_phys, 2.63008e-02_kind_phys, 2.52450e-02_kind_phys, 2.45424e-02_kind_phys, & !9 - 2.38656e-02_kind_phys, 2.32144e-02_kind_phys, 2.25885e-02_kind_phys, 2.19873e-02_kind_phys, 2.14099e-02_kind_phys, & !9 - 2.08554e-02_kind_phys, 2.03230e-02_kind_phys, 1.98116e-02_kind_phys, 1.93203e-02_kind_phys, 1.88482e-02_kind_phys, & !9 - 1.83944e-02_kind_phys, 1.79578e-02_kind_phys, 1.75378e-02_kind_phys, 1.71335e-02_kind_phys, 1.67440e-02_kind_phys, & !9 - 1.63687e-02_kind_phys, 1.60069e-02_kind_phys, 1.56579e-02_kind_phys, 1.53210e-02_kind_phys, 1.49958e-02_kind_phys, & !9 - 1.46815e-02_kind_phys, 1.43778e-02_kind_phys, 1.40841e-02_kind_phys, 1.37999e-02_kind_phys, 1.35249e-02_kind_phys, & !9 - 1.32585e-02_kind_phys, 1.30004e-02_kind_phys, 1.27502e-02_kind_phys, & !9 - 7.97040e-02_kind_phys, 7.63844e-02_kind_phys, 7.36499e-02_kind_phys, 7.13525e-02_kind_phys, 6.93043e-02_kind_phys, & !10 - 6.72807e-02_kind_phys, 6.50227e-02_kind_phys, 6.22395e-02_kind_phys, 5.86093e-02_kind_phys, 5.37815e-02_kind_phys, & !10 - 5.14682e-02_kind_phys, 4.97214e-02_kind_phys, 4.77392e-02_kind_phys, 4.56961e-02_kind_phys, 4.36858e-02_kind_phys, & !10 - 4.17569e-02_kind_phys, 3.99328e-02_kind_phys, 3.82224e-02_kind_phys, 3.66265e-02_kind_phys, 3.51416e-02_kind_phys, & !10 - 3.37617e-02_kind_phys, 3.24798e-02_kind_phys, 3.12887e-02_kind_phys, 3.01812e-02_kind_phys, 2.91505e-02_kind_phys, & !10 - 2.81900e-02_kind_phys, 2.72939e-02_kind_phys, 2.64568e-02_kind_phys, 2.54165e-02_kind_phys, 2.46832e-02_kind_phys, & !10 - 2.39783e-02_kind_phys, 2.33017e-02_kind_phys, 2.26531e-02_kind_phys, 2.20314e-02_kind_phys, 2.14359e-02_kind_phys, & !10 - 2.08653e-02_kind_phys, 2.03187e-02_kind_phys, 1.97947e-02_kind_phys, 1.92924e-02_kind_phys, 1.88106e-02_kind_phys, & !10 - 1.83483e-02_kind_phys, 1.79043e-02_kind_phys, 1.74778e-02_kind_phys, 1.70678e-02_kind_phys, 1.66735e-02_kind_phys, & !10 - 1.62941e-02_kind_phys, 1.59286e-02_kind_phys, 1.55766e-02_kind_phys, 1.52371e-02_kind_phys, 1.49097e-02_kind_phys, & !10 - 1.45937e-02_kind_phys, 1.42885e-02_kind_phys, 1.39936e-02_kind_phys, 1.37085e-02_kind_phys, 1.34327e-02_kind_phys, & !10 - 1.31659e-02_kind_phys, 1.29075e-02_kind_phys, 1.26571e-02_kind_phys, & !10 - 1.49438e-01_kind_phys, 1.33535e-01_kind_phys, 1.21542e-01_kind_phys, 1.11743e-01_kind_phys, 1.03263e-01_kind_phys, & !11 - 9.55774e-02_kind_phys, 8.83382e-02_kind_phys, 8.12943e-02_kind_phys, 7.42533e-02_kind_phys, 6.70609e-02_kind_phys, & !11 - 6.38761e-02_kind_phys, 5.97788e-02_kind_phys, 5.59841e-02_kind_phys, 5.25318e-02_kind_phys, 4.94132e-02_kind_phys, & !11 - 4.66014e-02_kind_phys, 4.40644e-02_kind_phys, 4.17706e-02_kind_phys, 3.96910e-02_kind_phys, 3.77998e-02_kind_phys, & !11 - 3.60742e-02_kind_phys, 3.44947e-02_kind_phys, 3.30442e-02_kind_phys, 3.17079e-02_kind_phys, 3.04730e-02_kind_phys, & !11 - 2.93283e-02_kind_phys, 2.82642e-02_kind_phys, 2.72720e-02_kind_phys, 2.61789e-02_kind_phys, 2.53277e-02_kind_phys, & !11 - 2.45237e-02_kind_phys, 2.37635e-02_kind_phys, 2.30438e-02_kind_phys, 2.23615e-02_kind_phys, 2.17140e-02_kind_phys, & !11 - 2.10987e-02_kind_phys, 2.05133e-02_kind_phys, 1.99557e-02_kind_phys, 1.94241e-02_kind_phys, 1.89166e-02_kind_phys, & !11 - 1.84317e-02_kind_phys, 1.79679e-02_kind_phys, 1.75238e-02_kind_phys, 1.70983e-02_kind_phys, 1.66901e-02_kind_phys, & !11 - 1.62983e-02_kind_phys, 1.59219e-02_kind_phys, 1.55599e-02_kind_phys, 1.52115e-02_kind_phys, 1.48761e-02_kind_phys, & !11 - 1.45528e-02_kind_phys, 1.42411e-02_kind_phys, 1.39402e-02_kind_phys, 1.36497e-02_kind_phys, 1.33690e-02_kind_phys, & !11 - 1.30976e-02_kind_phys, 1.28351e-02_kind_phys, 1.25810e-02_kind_phys, & !11 - 3.71985e-02_kind_phys, 3.88586e-02_kind_phys, 3.99070e-02_kind_phys, 4.04351e-02_kind_phys, 4.04610e-02_kind_phys, & !12 - 3.99834e-02_kind_phys, 3.89953e-02_kind_phys, 3.74886e-02_kind_phys, 3.54551e-02_kind_phys, 3.28870e-02_kind_phys, & !12 - 3.32576e-02_kind_phys, 3.22444e-02_kind_phys, 3.12384e-02_kind_phys, 3.02584e-02_kind_phys, 2.93146e-02_kind_phys, & !12 - 2.84120e-02_kind_phys, 2.75525e-02_kind_phys, 2.67361e-02_kind_phys, 2.59618e-02_kind_phys, 2.52280e-02_kind_phys, & !12 - 2.45327e-02_kind_phys, 2.38736e-02_kind_phys, 2.32487e-02_kind_phys, 2.26558e-02_kind_phys, 2.20929e-02_kind_phys, & !12 - 2.15579e-02_kind_phys, 2.10491e-02_kind_phys, 2.05648e-02_kind_phys, 1.99749e-02_kind_phys, 1.95704e-02_kind_phys, & !12 - 1.91731e-02_kind_phys, 1.87839e-02_kind_phys, 1.84032e-02_kind_phys, 1.80315e-02_kind_phys, 1.76689e-02_kind_phys, & !12 - 1.73155e-02_kind_phys, 1.69712e-02_kind_phys, 1.66362e-02_kind_phys, 1.63101e-02_kind_phys, 1.59928e-02_kind_phys, & !12 - 1.56842e-02_kind_phys, 1.53840e-02_kind_phys, 1.50920e-02_kind_phys, 1.48080e-02_kind_phys, 1.45318e-02_kind_phys, & !12 - 1.42631e-02_kind_phys, 1.40016e-02_kind_phys, 1.37472e-02_kind_phys, 1.34996e-02_kind_phys, 1.32586e-02_kind_phys, & !12 - 1.30239e-02_kind_phys, 1.27954e-02_kind_phys, 1.25728e-02_kind_phys, 1.23559e-02_kind_phys, 1.21445e-02_kind_phys, & !12 - 1.19385e-02_kind_phys, 1.17376e-02_kind_phys, 1.15417e-02_kind_phys, & !12 - 3.11868e-02_kind_phys, 4.48357e-02_kind_phys, 4.90224e-02_kind_phys, 4.96406e-02_kind_phys, 4.86806e-02_kind_phys, & !13 - 4.69610e-02_kind_phys, 4.48630e-02_kind_phys, 4.25795e-02_kind_phys, 4.02138e-02_kind_phys, 3.78236e-02_kind_phys, & !13 - 3.74266e-02_kind_phys, 3.60384e-02_kind_phys, 3.47074e-02_kind_phys, 3.34434e-02_kind_phys, 3.22499e-02_kind_phys, & !13 - 3.11264e-02_kind_phys, 3.00704e-02_kind_phys, 2.90784e-02_kind_phys, 2.81463e-02_kind_phys, 2.72702e-02_kind_phys, & !13 - 2.64460e-02_kind_phys, 2.56698e-02_kind_phys, 2.49381e-02_kind_phys, 2.42475e-02_kind_phys, 2.35948e-02_kind_phys, & !13 - 2.29774e-02_kind_phys, 2.23925e-02_kind_phys, 2.18379e-02_kind_phys, 2.11793e-02_kind_phys, 2.07076e-02_kind_phys, & !13 - 2.02470e-02_kind_phys, 1.97981e-02_kind_phys, 1.93613e-02_kind_phys, 1.89367e-02_kind_phys, 1.85243e-02_kind_phys, & !13 - 1.81240e-02_kind_phys, 1.77356e-02_kind_phys, 1.73588e-02_kind_phys, 1.69935e-02_kind_phys, 1.66392e-02_kind_phys, & !13 - 1.62956e-02_kind_phys, 1.59624e-02_kind_phys, 1.56393e-02_kind_phys, 1.53259e-02_kind_phys, 1.50219e-02_kind_phys, & !13 - 1.47268e-02_kind_phys, 1.44404e-02_kind_phys, 1.41624e-02_kind_phys, 1.38925e-02_kind_phys, 1.36302e-02_kind_phys, & !13 - 1.33755e-02_kind_phys, 1.31278e-02_kind_phys, 1.28871e-02_kind_phys, 1.26530e-02_kind_phys, 1.24253e-02_kind_phys, & !13 - 1.22038e-02_kind_phys, 1.19881e-02_kind_phys, 1.17782e-02_kind_phys, & !13 - 1.58988e-02_kind_phys, 3.50652e-02_kind_phys, 4.00851e-02_kind_phys, 4.07270e-02_kind_phys, 3.98101e-02_kind_phys, & !14 - 3.83306e-02_kind_phys, 3.66829e-02_kind_phys, 3.50327e-02_kind_phys, 3.34497e-02_kind_phys, 3.19609e-02_kind_phys, & !14 - 3.13712e-02_kind_phys, 3.03348e-02_kind_phys, 2.93415e-02_kind_phys, 2.83973e-02_kind_phys, 2.75037e-02_kind_phys, & !14 - 2.66604e-02_kind_phys, 2.58654e-02_kind_phys, 2.51161e-02_kind_phys, 2.44100e-02_kind_phys, 2.37440e-02_kind_phys, & !14 - 2.31154e-02_kind_phys, 2.25215e-02_kind_phys, 2.19599e-02_kind_phys, 2.14282e-02_kind_phys, 2.09242e-02_kind_phys, & !14 - 2.04459e-02_kind_phys, 1.99915e-02_kind_phys, 1.95594e-02_kind_phys, 1.90254e-02_kind_phys, 1.86598e-02_kind_phys, & !14 - 1.82996e-02_kind_phys, 1.79455e-02_kind_phys, 1.75983e-02_kind_phys, 1.72584e-02_kind_phys, 1.69260e-02_kind_phys, & !14 - 1.66013e-02_kind_phys, 1.62843e-02_kind_phys, 1.59752e-02_kind_phys, 1.56737e-02_kind_phys, 1.53799e-02_kind_phys, & !14 - 1.50936e-02_kind_phys, 1.48146e-02_kind_phys, 1.45429e-02_kind_phys, 1.42782e-02_kind_phys, 1.40203e-02_kind_phys, & !14 - 1.37691e-02_kind_phys, 1.35243e-02_kind_phys, 1.32858e-02_kind_phys, 1.30534e-02_kind_phys, 1.28270e-02_kind_phys, & !14 - 1.26062e-02_kind_phys, 1.23909e-02_kind_phys, 1.21810e-02_kind_phys, 1.19763e-02_kind_phys, 1.17766e-02_kind_phys, & !14 - 1.15817e-02_kind_phys, 1.13915e-02_kind_phys, 1.12058e-02_kind_phys, & !14 - 5.02079e-03_kind_phys, 2.17615e-02_kind_phys, 2.55449e-02_kind_phys, 2.59484e-02_kind_phys, 2.53650e-02_kind_phys, & !15 - 2.45281e-02_kind_phys, 2.36843e-02_kind_phys, 2.29159e-02_kind_phys, 2.22451e-02_kind_phys, 2.16716e-02_kind_phys, & !15 - 2.11451e-02_kind_phys, 2.05817e-02_kind_phys, 2.00454e-02_kind_phys, 1.95372e-02_kind_phys, 1.90567e-02_kind_phys, & !15 - 1.86028e-02_kind_phys, 1.81742e-02_kind_phys, 1.77693e-02_kind_phys, 1.73866e-02_kind_phys, 1.70244e-02_kind_phys, & !15 - 1.66815e-02_kind_phys, 1.63563e-02_kind_phys, 1.60477e-02_kind_phys, 1.57544e-02_kind_phys, 1.54755e-02_kind_phys, & !15 - 1.52097e-02_kind_phys, 1.49564e-02_kind_phys, 1.47146e-02_kind_phys, 1.43684e-02_kind_phys, 1.41728e-02_kind_phys, & !15 - 1.39762e-02_kind_phys, 1.37797e-02_kind_phys, 1.35838e-02_kind_phys, 1.33891e-02_kind_phys, 1.31961e-02_kind_phys, & !15 - 1.30051e-02_kind_phys, 1.28164e-02_kind_phys, 1.26302e-02_kind_phys, 1.24466e-02_kind_phys, 1.22659e-02_kind_phys, & !15 - 1.20881e-02_kind_phys, 1.19131e-02_kind_phys, 1.17412e-02_kind_phys, 1.15723e-02_kind_phys, 1.14063e-02_kind_phys, & !15 - 1.12434e-02_kind_phys, 1.10834e-02_kind_phys, 1.09264e-02_kind_phys, 1.07722e-02_kind_phys, 1.06210e-02_kind_phys, & !15 - 1.04725e-02_kind_phys, 1.03269e-02_kind_phys, 1.01839e-02_kind_phys, 1.00436e-02_kind_phys, 9.90593e-03_kind_phys, & !15 - 9.77080e-03_kind_phys, 9.63818e-03_kind_phys, 9.50800e-03_kind_phys, & !15 - 5.64971e-02_kind_phys, 9.04736e-02_kind_phys, 8.11726e-02_kind_phys, 7.05450e-02_kind_phys, 6.20052e-02_kind_phys, & !16 - 5.54286e-02_kind_phys, 5.03503e-02_kind_phys, 4.63791e-02_kind_phys, 4.32290e-02_kind_phys, 4.06959e-02_kind_phys, & !16 - 3.74690e-02_kind_phys, 3.52964e-02_kind_phys, 3.33799e-02_kind_phys, 3.16774e-02_kind_phys, 3.01550e-02_kind_phys, & !16 - 2.87856e-02_kind_phys, 2.75474e-02_kind_phys, 2.64223e-02_kind_phys, 2.53953e-02_kind_phys, 2.44542e-02_kind_phys, & !16 - 2.35885e-02_kind_phys, 2.27894e-02_kind_phys, 2.20494e-02_kind_phys, 2.13622e-02_kind_phys, 2.07222e-02_kind_phys, & !16 - 2.01246e-02_kind_phys, 1.95654e-02_kind_phys, 1.90408e-02_kind_phys, 1.84398e-02_kind_phys, 1.80021e-02_kind_phys, & !16 - 1.75816e-02_kind_phys, 1.71775e-02_kind_phys, 1.67889e-02_kind_phys, 1.64152e-02_kind_phys, 1.60554e-02_kind_phys, & !16 - 1.57089e-02_kind_phys, 1.53751e-02_kind_phys, 1.50531e-02_kind_phys, 1.47426e-02_kind_phys, 1.44428e-02_kind_phys, & !16 - 1.41532e-02_kind_phys, 1.38734e-02_kind_phys, 1.36028e-02_kind_phys, 1.33410e-02_kind_phys, 1.30875e-02_kind_phys, & !16 - 1.28420e-02_kind_phys, 1.26041e-02_kind_phys, 1.23735e-02_kind_phys, 1.21497e-02_kind_phys, 1.19325e-02_kind_phys, & !16 - 1.17216e-02_kind_phys, 1.15168e-02_kind_phys, 1.13177e-02_kind_phys, 1.11241e-02_kind_phys, 1.09358e-02_kind_phys, & !16 - 1.07525e-02_kind_phys, 1.05741e-02_kind_phys, 1.04003e-02_kind_phys/), & !16 + 1.64047e-03, 6.90533e-02, 7.72017e-02, 7.78054e-02, 7.69523e-02, & !1 + 7.58058e-02, 7.46400e-02, 7.35123e-02, 7.24162e-02, 7.13225e-02, & !1 + 6.99145e-02, 6.66409e-02, 6.36582e-02, 6.09425e-02, 5.84593e-02, & !1 + 5.61743e-02, 5.40571e-02, 5.20812e-02, 5.02245e-02, 4.84680e-02, & !1 + 4.67959e-02, 4.51944e-02, 4.36516e-02, 4.21570e-02, 4.07015e-02, & !1 + 3.92766e-02, 3.78747e-02, 3.64886e-02, 3.53632e-02, 3.41992e-02, & !1 + 3.31016e-02, 3.20643e-02, 3.10817e-02, 3.01490e-02, 2.92620e-02, & !1 + 2.84171e-02, 2.76108e-02, 2.68404e-02, 2.61031e-02, 2.53966e-02, & !1 + 2.47189e-02, 2.40678e-02, 2.34418e-02, 2.28392e-02, 2.22586e-02, & !1 + 2.16986e-02, 2.11580e-02, 2.06356e-02, 2.01305e-02, 1.96417e-02, & !1 + 1.91682e-02, 1.87094e-02, 1.82643e-02, 1.78324e-02, 1.74129e-02, & !1 + 1.70052e-02, 1.66088e-02, 1.62231e-02, & !1 + 2.19486e-01, 1.80687e-01, 1.59150e-01, 1.44731e-01, 1.33703e-01, & !2 + 1.24355e-01, 1.15756e-01, 1.07318e-01, 9.86119e-02, 8.92739e-02, & !2 + 8.34911e-02, 7.70773e-02, 7.15240e-02, 6.66615e-02, 6.23641e-02, & !2 + 5.85359e-02, 5.51020e-02, 5.20032e-02, 4.91916e-02, 4.66283e-02, & !2 + 4.42813e-02, 4.21236e-02, 4.01330e-02, 3.82905e-02, 3.65797e-02, & !2 + 3.49869e-02, 3.35002e-02, 3.21090e-02, 3.08957e-02, 2.97601e-02, & !2 + 2.86966e-02, 2.76984e-02, 2.67599e-02, 2.58758e-02, 2.50416e-02, & !2 + 2.42532e-02, 2.35070e-02, 2.27997e-02, 2.21284e-02, 2.14904e-02, & !2 + 2.08834e-02, 2.03051e-02, 1.97536e-02, 1.92271e-02, 1.87239e-02, & !2 + 1.82425e-02, 1.77816e-02, 1.73399e-02, 1.69162e-02, 1.65094e-02, & !2 + 1.61187e-02, 1.57430e-02, 1.53815e-02, 1.50334e-02, 1.46981e-02, & !2 + 1.43748e-02, 1.40628e-02, 1.37617e-02, & !2 + 2.95174e-01, 2.34765e-01, 1.98038e-01, 1.72114e-01, 1.52083e-01, & !3 + 1.35654e-01, 1.21613e-01, 1.09252e-01, 9.81263e-02, 8.79448e-02, & !3 + 8.12566e-02, 7.44563e-02, 6.86374e-02, 6.36042e-02, 5.92094e-02, & !3 + 5.53402e-02, 5.19087e-02, 4.88455e-02, 4.60951e-02, 4.36124e-02, & !3 + 4.13607e-02, 3.93096e-02, 3.74338e-02, 3.57119e-02, 3.41261e-02, & !3 + 3.26610e-02, 3.13036e-02, 3.00425e-02, 2.88497e-02, 2.78077e-02, & !3 + 2.68317e-02, 2.59158e-02, 2.50545e-02, 2.42430e-02, 2.34772e-02, & !3 + 2.27533e-02, 2.20679e-02, 2.14181e-02, 2.08011e-02, 2.02145e-02, & !3 + 1.96561e-02, 1.91239e-02, 1.86161e-02, 1.81311e-02, 1.76673e-02, & !3 + 1.72234e-02, 1.67981e-02, 1.63903e-02, 1.59989e-02, 1.56230e-02, & !3 + 1.52615e-02, 1.49138e-02, 1.45791e-02, 1.42565e-02, 1.39455e-02, & !3 + 1.36455e-02, 1.33559e-02, 1.30761e-02, & !3 + 3.00925e-01, 2.36949e-01, 1.96947e-01, 1.68692e-01, 1.47190e-01, & !4 + 1.29986e-01, 1.15719e-01, 1.03568e-01, 9.30028e-02, 8.36658e-02, & !4 + 7.71075e-02, 7.07002e-02, 6.52284e-02, 6.05024e-02, 5.63801e-02, & !4 + 5.27534e-02, 4.95384e-02, 4.66690e-02, 4.40925e-02, 4.17664e-02, & !4 + 3.96559e-02, 3.77326e-02, 3.59727e-02, 3.43561e-02, 3.28662e-02, & !4 + 3.14885e-02, 3.02110e-02, 2.90231e-02, 2.78948e-02, 2.69109e-02, & !4 + 2.59884e-02, 2.51217e-02, 2.43058e-02, 2.35364e-02, 2.28096e-02, & !4 + 2.21218e-02, 2.14700e-02, 2.08515e-02, 2.02636e-02, 1.97041e-02, & !4 + 1.91711e-02, 1.86625e-02, 1.81769e-02, 1.77126e-02, 1.72683e-02, & !4 + 1.68426e-02, 1.64344e-02, 1.60427e-02, 1.56664e-02, 1.53046e-02, & !4 + 1.49565e-02, 1.46214e-02, 1.42985e-02, 1.39871e-02, 1.36866e-02, & !4 + 1.33965e-02, 1.31162e-02, 1.28453e-02, & !4 + 2.64691e-01, 2.12018e-01, 1.78009e-01, 1.53539e-01, 1.34721e-01, & !5 + 1.19580e-01, 1.06996e-01, 9.62772e-02, 8.69710e-02, 7.87670e-02, & !5 + 7.29272e-02, 6.70920e-02, 6.20977e-02, 5.77732e-02, 5.39910e-02, & !5 + 5.06538e-02, 4.76866e-02, 4.50301e-02, 4.26374e-02, 4.04704e-02, & !5 + 3.84981e-02, 3.66948e-02, 3.50394e-02, 3.35141e-02, 3.21038e-02, & !5 + 3.07957e-02, 2.95788e-02, 2.84438e-02, 2.73790e-02, 2.64390e-02, & !5 + 2.55565e-02, 2.47263e-02, 2.39437e-02, 2.32047e-02, 2.25056e-02, & !5 + 2.18433e-02, 2.12149e-02, 2.06177e-02, 2.00495e-02, 1.95081e-02, & !5 + 1.89917e-02, 1.84984e-02, 1.80269e-02, 1.75755e-02, 1.71431e-02, & !5 + 1.67283e-02, 1.63303e-02, 1.59478e-02, 1.55801e-02, 1.52262e-02, & !5 + 1.48853e-02, 1.45568e-02, 1.42400e-02, 1.39342e-02, 1.36388e-02, & !5 + 1.33533e-02, 1.30773e-02, 1.28102e-02, & !5 + 8.81182e-02, 1.06745e-01, 9.79753e-02, 8.99625e-02, 8.35200e-02, & !6 + 7.81899e-02, 7.35939e-02, 6.94696e-02, 6.56266e-02, 6.19148e-02, & !6 + 5.83355e-02, 5.49306e-02, 5.19642e-02, 4.93325e-02, 4.69659e-02, & !6 + 4.48148e-02, 4.28431e-02, 4.10231e-02, 3.93332e-02, 3.77563e-02, & !6 + 3.62785e-02, 3.48882e-02, 3.35758e-02, 3.23333e-02, 3.11536e-02, & !6 + 3.00310e-02, 2.89601e-02, 2.79365e-02, 2.70502e-02, 2.62618e-02, & !6 + 2.55025e-02, 2.47728e-02, 2.40726e-02, 2.34013e-02, 2.27583e-02, & !6 + 2.21422e-02, 2.15522e-02, 2.09869e-02, 2.04453e-02, 1.99260e-02, & !6 + 1.94280e-02, 1.89501e-02, 1.84913e-02, 1.80506e-02, 1.76270e-02, & !6 + 1.72196e-02, 1.68276e-02, 1.64500e-02, 1.60863e-02, 1.57357e-02, & !6 + 1.53975e-02, 1.50710e-02, 1.47558e-02, 1.44511e-02, 1.41566e-02, & !6 + 1.38717e-02, 1.35960e-02, 1.33290e-02, & !6 + 4.32174e-02, 7.36078e-02, 6.98340e-02, 6.65231e-02, 6.41948e-02, & !7 + 6.23551e-02, 6.06638e-02, 5.88680e-02, 5.67124e-02, 5.38629e-02, & !7 + 4.99579e-02, 4.86289e-02, 4.70120e-02, 4.52854e-02, 4.35466e-02, & !7 + 4.18480e-02, 4.02169e-02, 3.86658e-02, 3.71992e-02, 3.58168e-02, & !7 + 3.45155e-02, 3.32912e-02, 3.21390e-02, 3.10538e-02, 3.00307e-02, & !7 + 2.90651e-02, 2.81524e-02, 2.72885e-02, 2.62821e-02, 2.55744e-02, & !7 + 2.48799e-02, 2.42029e-02, 2.35460e-02, 2.29108e-02, 2.22981e-02, & !7 + 2.17079e-02, 2.11402e-02, 2.05945e-02, 2.00701e-02, 1.95663e-02, & !7 + 1.90824e-02, 1.86174e-02, 1.81706e-02, 1.77411e-02, 1.73281e-02, & !7 + 1.69307e-02, 1.65483e-02, 1.61801e-02, 1.58254e-02, 1.54835e-02, & !7 + 1.51538e-02, 1.48358e-02, 1.45288e-02, 1.42322e-02, 1.39457e-02, & !7 + 1.36687e-02, 1.34008e-02, 1.31416e-02, & !7 + 1.41881e-01, 7.15419e-02, 6.30335e-02, 6.11132e-02, 6.01931e-02, & !8 + 5.92420e-02, 5.78968e-02, 5.58876e-02, 5.28923e-02, 4.84462e-02, & !8 + 4.60839e-02, 4.56013e-02, 4.45410e-02, 4.31866e-02, 4.17026e-02, & !8 + 4.01850e-02, 3.86892e-02, 3.72461e-02, 3.58722e-02, 3.45749e-02, & !8 + 3.33564e-02, 3.22155e-02, 3.11494e-02, 3.01541e-02, 2.92253e-02, & !8 + 2.83584e-02, 2.75488e-02, 2.67925e-02, 2.57692e-02, 2.50704e-02, & !8 + 2.43918e-02, 2.37350e-02, 2.31005e-02, 2.24888e-02, 2.18996e-02, & !8 + 2.13325e-02, 2.07870e-02, 2.02623e-02, 1.97577e-02, 1.92724e-02, & !8 + 1.88056e-02, 1.83564e-02, 1.79241e-02, 1.75079e-02, 1.71070e-02, & !8 + 1.67207e-02, 1.63482e-02, 1.59890e-02, 1.56424e-02, 1.53077e-02, & !8 + 1.49845e-02, 1.46722e-02, 1.43702e-02, 1.40782e-02, 1.37955e-02, & !8 + 1.35219e-02, 1.32569e-02, 1.30000e-02, & !8 + 6.72726e-02, 6.61013e-02, 6.47866e-02, 6.33780e-02, 6.18985e-02, & !9 + 6.03335e-02, 5.86136e-02, 5.65876e-02, 5.39839e-02, 5.03536e-02, & !9 + 4.71608e-02, 4.63630e-02, 4.50313e-02, 4.34526e-02, 4.17876e-02, & !9 + 4.01261e-02, 3.85171e-02, 3.69860e-02, 3.55442e-02, 3.41954e-02, & !9 + 3.29384e-02, 3.17693e-02, 3.06832e-02, 2.96745e-02, 2.87374e-02, & !9 + 2.78662e-02, 2.70557e-02, 2.63008e-02, 2.52450e-02, 2.45424e-02, & !9 + 2.38656e-02, 2.32144e-02, 2.25885e-02, 2.19873e-02, 2.14099e-02, & !9 + 2.08554e-02, 2.03230e-02, 1.98116e-02, 1.93203e-02, 1.88482e-02, & !9 + 1.83944e-02, 1.79578e-02, 1.75378e-02, 1.71335e-02, 1.67440e-02, & !9 + 1.63687e-02, 1.60069e-02, 1.56579e-02, 1.53210e-02, 1.49958e-02, & !9 + 1.46815e-02, 1.43778e-02, 1.40841e-02, 1.37999e-02, 1.35249e-02, & !9 + 1.32585e-02, 1.30004e-02, 1.27502e-02, & !9 + 7.97040e-02, 7.63844e-02, 7.36499e-02, 7.13525e-02, 6.93043e-02, & !10 + 6.72807e-02, 6.50227e-02, 6.22395e-02, 5.86093e-02, 5.37815e-02, & !10 + 5.14682e-02, 4.97214e-02, 4.77392e-02, 4.56961e-02, 4.36858e-02, & !10 + 4.17569e-02, 3.99328e-02, 3.82224e-02, 3.66265e-02, 3.51416e-02, & !10 + 3.37617e-02, 3.24798e-02, 3.12887e-02, 3.01812e-02, 2.91505e-02, & !10 + 2.81900e-02, 2.72939e-02, 2.64568e-02, 2.54165e-02, 2.46832e-02, & !10 + 2.39783e-02, 2.33017e-02, 2.26531e-02, 2.20314e-02, 2.14359e-02, & !10 + 2.08653e-02, 2.03187e-02, 1.97947e-02, 1.92924e-02, 1.88106e-02, & !10 + 1.83483e-02, 1.79043e-02, 1.74778e-02, 1.70678e-02, 1.66735e-02, & !10 + 1.62941e-02, 1.59286e-02, 1.55766e-02, 1.52371e-02, 1.49097e-02, & !10 + 1.45937e-02, 1.42885e-02, 1.39936e-02, 1.37085e-02, 1.34327e-02, & !10 + 1.31659e-02, 1.29075e-02, 1.26571e-02, & !10 + 1.49438e-01, 1.33535e-01, 1.21542e-01, 1.11743e-01, 1.03263e-01, & !11 + 9.55774e-02, 8.83382e-02, 8.12943e-02, 7.42533e-02, 6.70609e-02, & !11 + 6.38761e-02, 5.97788e-02, 5.59841e-02, 5.25318e-02, 4.94132e-02, & !11 + 4.66014e-02, 4.40644e-02, 4.17706e-02, 3.96910e-02, 3.77998e-02, & !11 + 3.60742e-02, 3.44947e-02, 3.30442e-02, 3.17079e-02, 3.04730e-02, & !11 + 2.93283e-02, 2.82642e-02, 2.72720e-02, 2.61789e-02, 2.53277e-02, & !11 + 2.45237e-02, 2.37635e-02, 2.30438e-02, 2.23615e-02, 2.17140e-02, & !11 + 2.10987e-02, 2.05133e-02, 1.99557e-02, 1.94241e-02, 1.89166e-02, & !11 + 1.84317e-02, 1.79679e-02, 1.75238e-02, 1.70983e-02, 1.66901e-02, & !11 + 1.62983e-02, 1.59219e-02, 1.55599e-02, 1.52115e-02, 1.48761e-02, & !11 + 1.45528e-02, 1.42411e-02, 1.39402e-02, 1.36497e-02, 1.33690e-02, & !11 + 1.30976e-02, 1.28351e-02, 1.25810e-02, & !11 + 3.71985e-02, 3.88586e-02, 3.99070e-02, 4.04351e-02, 4.04610e-02, & !12 + 3.99834e-02, 3.89953e-02, 3.74886e-02, 3.54551e-02, 3.28870e-02, & !12 + 3.32576e-02, 3.22444e-02, 3.12384e-02, 3.02584e-02, 2.93146e-02, & !12 + 2.84120e-02, 2.75525e-02, 2.67361e-02, 2.59618e-02, 2.52280e-02, & !12 + 2.45327e-02, 2.38736e-02, 2.32487e-02, 2.26558e-02, 2.20929e-02, & !12 + 2.15579e-02, 2.10491e-02, 2.05648e-02, 1.99749e-02, 1.95704e-02, & !12 + 1.91731e-02, 1.87839e-02, 1.84032e-02, 1.80315e-02, 1.76689e-02, & !12 + 1.73155e-02, 1.69712e-02, 1.66362e-02, 1.63101e-02, 1.59928e-02, & !12 + 1.56842e-02, 1.53840e-02, 1.50920e-02, 1.48080e-02, 1.45318e-02, & !12 + 1.42631e-02, 1.40016e-02, 1.37472e-02, 1.34996e-02, 1.32586e-02, & !12 + 1.30239e-02, 1.27954e-02, 1.25728e-02, 1.23559e-02, 1.21445e-02, & !12 + 1.19385e-02, 1.17376e-02, 1.15417e-02, & !12 + 3.11868e-02, 4.48357e-02, 4.90224e-02, 4.96406e-02, 4.86806e-02, & !13 + 4.69610e-02, 4.48630e-02, 4.25795e-02, 4.02138e-02, 3.78236e-02, & !13 + 3.74266e-02, 3.60384e-02, 3.47074e-02, 3.34434e-02, 3.22499e-02, & !13 + 3.11264e-02, 3.00704e-02, 2.90784e-02, 2.81463e-02, 2.72702e-02, & !13 + 2.64460e-02, 2.56698e-02, 2.49381e-02, 2.42475e-02, 2.35948e-02, & !13 + 2.29774e-02, 2.23925e-02, 2.18379e-02, 2.11793e-02, 2.07076e-02, & !13 + 2.02470e-02, 1.97981e-02, 1.93613e-02, 1.89367e-02, 1.85243e-02, & !13 + 1.81240e-02, 1.77356e-02, 1.73588e-02, 1.69935e-02, 1.66392e-02, & !13 + 1.62956e-02, 1.59624e-02, 1.56393e-02, 1.53259e-02, 1.50219e-02, & !13 + 1.47268e-02, 1.44404e-02, 1.41624e-02, 1.38925e-02, 1.36302e-02, & !13 + 1.33755e-02, 1.31278e-02, 1.28871e-02, 1.26530e-02, 1.24253e-02, & !13 + 1.22038e-02, 1.19881e-02, 1.17782e-02, & !13 + 1.58988e-02, 3.50652e-02, 4.00851e-02, 4.07270e-02, 3.98101e-02, & !14 + 3.83306e-02, 3.66829e-02, 3.50327e-02, 3.34497e-02, 3.19609e-02, & !14 + 3.13712e-02, 3.03348e-02, 2.93415e-02, 2.83973e-02, 2.75037e-02, & !14 + 2.66604e-02, 2.58654e-02, 2.51161e-02, 2.44100e-02, 2.37440e-02, & !14 + 2.31154e-02, 2.25215e-02, 2.19599e-02, 2.14282e-02, 2.09242e-02, & !14 + 2.04459e-02, 1.99915e-02, 1.95594e-02, 1.90254e-02, 1.86598e-02, & !14 + 1.82996e-02, 1.79455e-02, 1.75983e-02, 1.72584e-02, 1.69260e-02, & !14 + 1.66013e-02, 1.62843e-02, 1.59752e-02, 1.56737e-02, 1.53799e-02, & !14 + 1.50936e-02, 1.48146e-02, 1.45429e-02, 1.42782e-02, 1.40203e-02, & !14 + 1.37691e-02, 1.35243e-02, 1.32858e-02, 1.30534e-02, 1.28270e-02, & !14 + 1.26062e-02, 1.23909e-02, 1.21810e-02, 1.19763e-02, 1.17766e-02, & !14 + 1.15817e-02, 1.13915e-02, 1.12058e-02, & !14 + 5.02079e-03, 2.17615e-02, 2.55449e-02, 2.59484e-02, 2.53650e-02, & !15 + 2.45281e-02, 2.36843e-02, 2.29159e-02, 2.22451e-02, 2.16716e-02, & !15 + 2.11451e-02, 2.05817e-02, 2.00454e-02, 1.95372e-02, 1.90567e-02, & !15 + 1.86028e-02, 1.81742e-02, 1.77693e-02, 1.73866e-02, 1.70244e-02, & !15 + 1.66815e-02, 1.63563e-02, 1.60477e-02, 1.57544e-02, 1.54755e-02, & !15 + 1.52097e-02, 1.49564e-02, 1.47146e-02, 1.43684e-02, 1.41728e-02, & !15 + 1.39762e-02, 1.37797e-02, 1.35838e-02, 1.33891e-02, 1.31961e-02, & !15 + 1.30051e-02, 1.28164e-02, 1.26302e-02, 1.24466e-02, 1.22659e-02, & !15 + 1.20881e-02, 1.19131e-02, 1.17412e-02, 1.15723e-02, 1.14063e-02, & !15 + 1.12434e-02, 1.10834e-02, 1.09264e-02, 1.07722e-02, 1.06210e-02, & !15 + 1.04725e-02, 1.03269e-02, 1.01839e-02, 1.00436e-02, 9.90593e-03, & !15 + 9.77080e-03, 9.63818e-03, 9.50800e-03, & !15 + 5.64971e-02, 9.04736e-02, 8.11726e-02, 7.05450e-02, 6.20052e-02, & !16 + 5.54286e-02, 5.03503e-02, 4.63791e-02, 4.32290e-02, 4.06959e-02, & !16 + 3.74690e-02, 3.52964e-02, 3.33799e-02, 3.16774e-02, 3.01550e-02, & !16 + 2.87856e-02, 2.75474e-02, 2.64223e-02, 2.53953e-02, 2.44542e-02, & !16 + 2.35885e-02, 2.27894e-02, 2.20494e-02, 2.13622e-02, 2.07222e-02, & !16 + 2.01246e-02, 1.95654e-02, 1.90408e-02, 1.84398e-02, 1.80021e-02, & !16 + 1.75816e-02, 1.71775e-02, 1.67889e-02, 1.64152e-02, 1.60554e-02, & !16 + 1.57089e-02, 1.53751e-02, 1.50531e-02, 1.47426e-02, 1.44428e-02, & !16 + 1.41532e-02, 1.38734e-02, 1.36028e-02, 1.33410e-02, 1.30875e-02, & !16 + 1.28420e-02, 1.26041e-02, 1.23735e-02, 1.21497e-02, 1.19325e-02, & !16 + 1.17216e-02, 1.15168e-02, 1.13177e-02, 1.11241e-02, 1.09358e-02, & !16 + 1.07525e-02, 1.05741e-02, 1.04003e-02/), & !16 shape=(/58,nBandsLW_RRTMG/)) real(kind_phys), dimension(2),parameter :: & @@ -241,314 +241,314 @@ module mo_rrtmgp_lw_cloud_optics real(kind_phys), dimension(43, nBandsLW_RRTMG),parameter :: & absice2 = reshape(source=(/ & - 7.798999e-02_kind_phys, 6.340479e-02_kind_phys, 5.417973e-02_kind_phys, 4.766245e-02_kind_phys, 4.272663e-02_kind_phys, & !1 - 3.880939e-02_kind_phys, 3.559544e-02_kind_phys, 3.289241e-02_kind_phys, 3.057511e-02_kind_phys, 2.855800e-02_kind_phys, & !1 - 2.678022e-02_kind_phys, 2.519712e-02_kind_phys, 2.377505e-02_kind_phys, 2.248806e-02_kind_phys, 2.131578e-02_kind_phys, & !1 - 2.024194e-02_kind_phys, 1.925337e-02_kind_phys, 1.833926e-02_kind_phys, 1.749067e-02_kind_phys, 1.670007e-02_kind_phys, & !1 - 1.596113e-02_kind_phys, 1.526845e-02_kind_phys, 1.461739e-02_kind_phys, 1.400394e-02_kind_phys, 1.342462e-02_kind_phys, & !1 - 1.287639e-02_kind_phys, 1.235656e-02_kind_phys, 1.186279e-02_kind_phys, 1.139297e-02_kind_phys, 1.094524e-02_kind_phys, & !1 - 1.051794e-02_kind_phys, 1.010956e-02_kind_phys, 9.718755e-03_kind_phys, 9.344316e-03_kind_phys, 8.985139e-03_kind_phys, & !1 - 8.640223e-03_kind_phys, 8.308656e-03_kind_phys, 7.989606e-03_kind_phys, 7.682312e-03_kind_phys, 7.386076e-03_kind_phys, & !1 - 7.100255e-03_kind_phys, 6.824258e-03_kind_phys, 6.557540e-03_kind_phys, & !1 - 2.784879e-02_kind_phys, 2.709863e-02_kind_phys, 2.619165e-02_kind_phys, 2.529230e-02_kind_phys, 2.443225e-02_kind_phys, & !2 - 2.361575e-02_kind_phys, 2.284021e-02_kind_phys, 2.210150e-02_kind_phys, 2.139548e-02_kind_phys, 2.071840e-02_kind_phys, & !2 - 2.006702e-02_kind_phys, 1.943856e-02_kind_phys, 1.883064e-02_kind_phys, 1.824120e-02_kind_phys, 1.766849e-02_kind_phys, & !2 - 1.711099e-02_kind_phys, 1.656737e-02_kind_phys, 1.603647e-02_kind_phys, 1.551727e-02_kind_phys, 1.500886e-02_kind_phys, & !2 - 1.451045e-02_kind_phys, 1.402132e-02_kind_phys, 1.354084e-02_kind_phys, 1.306842e-02_kind_phys, 1.260355e-02_kind_phys, & !2 - 1.214575e-02_kind_phys, 1.169460e-02_kind_phys, 1.124971e-02_kind_phys, 1.081072e-02_kind_phys, 1.037731e-02_kind_phys, & !2 - 9.949167e-03_kind_phys, 9.526021e-03_kind_phys, 9.107615e-03_kind_phys, 8.693714e-03_kind_phys, 8.284096e-03_kind_phys, & !2 - 7.878558e-03_kind_phys, 7.476910e-03_kind_phys, 7.078974e-03_kind_phys, 6.684586e-03_kind_phys, 6.293589e-03_kind_phys, & !2 - 5.905839e-03_kind_phys, 5.521200e-03_kind_phys, 5.139543e-03_kind_phys, & !2 - 1.065397e-01_kind_phys, 8.005726e-02_kind_phys, 6.546428e-02_kind_phys, 5.589131e-02_kind_phys, 4.898681e-02_kind_phys, & !3 - 4.369932e-02_kind_phys, 3.947901e-02_kind_phys, 3.600676e-02_kind_phys, 3.308299e-02_kind_phys, 3.057561e-02_kind_phys, & !3 - 2.839325e-02_kind_phys, 2.647040e-02_kind_phys, 2.475872e-02_kind_phys, 2.322164e-02_kind_phys, 2.183091e-02_kind_phys, & !3 - 2.056430e-02_kind_phys, 1.940407e-02_kind_phys, 1.833586e-02_kind_phys, 1.734787e-02_kind_phys, 1.643034e-02_kind_phys, & !3 - 1.557512e-02_kind_phys, 1.477530e-02_kind_phys, 1.402501e-02_kind_phys, 1.331924e-02_kind_phys, 1.265364e-02_kind_phys, & !3 - 1.202445e-02_kind_phys, 1.142838e-02_kind_phys, 1.086257e-02_kind_phys, 1.032445e-02_kind_phys, 9.811791e-03_kind_phys, & !3 - 9.322587e-03_kind_phys, 8.855053e-03_kind_phys, 8.407591e-03_kind_phys, 7.978763e-03_kind_phys, 7.567273e-03_kind_phys, & !3 - 7.171949e-03_kind_phys, 6.791728e-03_kind_phys, 6.425642e-03_kind_phys, 6.072809e-03_kind_phys, 5.732424e-03_kind_phys, & !3 - 5.403748e-03_kind_phys, 5.086103e-03_kind_phys, 4.778865e-03_kind_phys, & !3 - 1.804566e-01_kind_phys, 1.168987e-01_kind_phys, 8.680442e-02_kind_phys, 6.910060e-02_kind_phys, 5.738174e-02_kind_phys, & !4 - 4.902332e-02_kind_phys, 4.274585e-02_kind_phys, 3.784923e-02_kind_phys, 3.391734e-02_kind_phys, 3.068690e-02_kind_phys, & !4 - 2.798301e-02_kind_phys, 2.568480e-02_kind_phys, 2.370600e-02_kind_phys, 2.198337e-02_kind_phys, 2.046940e-02_kind_phys, & !4 - 1.912777e-02_kind_phys, 1.793016e-02_kind_phys, 1.685420e-02_kind_phys, 1.588193e-02_kind_phys, 1.499882e-02_kind_phys, & !4 - 1.419293e-02_kind_phys, 1.345440e-02_kind_phys, 1.277496e-02_kind_phys, 1.214769e-02_kind_phys, 1.156669e-02_kind_phys, & !4 - 1.102694e-02_kind_phys, 1.052412e-02_kind_phys, 1.005451e-02_kind_phys, 9.614854e-03_kind_phys, 9.202335e-03_kind_phys, & !4 - 8.814470e-03_kind_phys, 8.449077e-03_kind_phys, 8.104223e-03_kind_phys, 7.778195e-03_kind_phys, 7.469466e-03_kind_phys, & !4 - 7.176671e-03_kind_phys, 6.898588e-03_kind_phys, 6.634117e-03_kind_phys, 6.382264e-03_kind_phys, 6.142134e-03_kind_phys, & !4 - 5.912913e-03_kind_phys, 5.693862e-03_kind_phys, 5.484308e-03_kind_phys, & !4 - 2.131806e-01_kind_phys, 1.311372e-01_kind_phys, 9.407171e-02_kind_phys, 7.299442e-02_kind_phys, 5.941273e-02_kind_phys, & !5 - 4.994043e-02_kind_phys, 4.296242e-02_kind_phys, 3.761113e-02_kind_phys, 3.337910e-02_kind_phys, 2.994978e-02_kind_phys, & !5 - 2.711556e-02_kind_phys, 2.473461e-02_kind_phys, 2.270681e-02_kind_phys, 2.095943e-02_kind_phys, 1.943839e-02_kind_phys, & !5 - 1.810267e-02_kind_phys, 1.692057e-02_kind_phys, 1.586719e-02_kind_phys, 1.492275e-02_kind_phys, 1.407132e-02_kind_phys, & !5 - 1.329989e-02_kind_phys, 1.259780e-02_kind_phys, 1.195618e-02_kind_phys, 1.136761e-02_kind_phys, 1.082583e-02_kind_phys, & !5 - 1.032552e-02_kind_phys, 9.862158e-03_kind_phys, 9.431827e-03_kind_phys, 9.031157e-03_kind_phys, 8.657217e-03_kind_phys, & !5 - 8.307449e-03_kind_phys, 7.979609e-03_kind_phys, 7.671724e-03_kind_phys, 7.382048e-03_kind_phys, 7.109032e-03_kind_phys, & !5 - 6.851298e-03_kind_phys, 6.607615e-03_kind_phys, 6.376881e-03_kind_phys, 6.158105e-03_kind_phys, 5.950394e-03_kind_phys, & !5 - 5.752942e-03_kind_phys, 5.565019e-03_kind_phys, 5.385963e-03_kind_phys, & !5 - 1.546177e-01_kind_phys, 1.039251e-01_kind_phys, 7.910347e-02_kind_phys, 6.412429e-02_kind_phys, 5.399997e-02_kind_phys, & !6 - 4.664937e-02_kind_phys, 4.104237e-02_kind_phys, 3.660781e-02_kind_phys, 3.300218e-02_kind_phys, 3.000586e-02_kind_phys, & !6 - 2.747148e-02_kind_phys, 2.529633e-02_kind_phys, 2.340647e-02_kind_phys, 2.174723e-02_kind_phys, 2.027731e-02_kind_phys, & !6 - 1.896487e-02_kind_phys, 1.778492e-02_kind_phys, 1.671761e-02_kind_phys, 1.574692e-02_kind_phys, 1.485978e-02_kind_phys, & !6 - 1.404543e-02_kind_phys, 1.329489e-02_kind_phys, 1.260066e-02_kind_phys, 1.195636e-02_kind_phys, 1.135657e-02_kind_phys, & !6 - 1.079664e-02_kind_phys, 1.027257e-02_kind_phys, 9.780871e-03_kind_phys, 9.318505e-03_kind_phys, 8.882815e-03_kind_phys, & !6 - 8.471458e-03_kind_phys, 8.082364e-03_kind_phys, 7.713696e-03_kind_phys, 7.363817e-03_kind_phys, 7.031264e-03_kind_phys, & !6 - 6.714725e-03_kind_phys, 6.413021e-03_kind_phys, 6.125086e-03_kind_phys, 5.849958e-03_kind_phys, 5.586764e-03_kind_phys, & !6 - 5.334707e-03_kind_phys, 5.093066e-03_kind_phys, 4.861179e-03_kind_phys, & !6 - 7.583404e-02_kind_phys, 6.181558e-02_kind_phys, 5.312027e-02_kind_phys, 4.696039e-02_kind_phys, 4.225986e-02_kind_phys, & !7 - 3.849735e-02_kind_phys, 3.538340e-02_kind_phys, 3.274182e-02_kind_phys, 3.045798e-02_kind_phys, 2.845343e-02_kind_phys, & !7 - 2.667231e-02_kind_phys, 2.507353e-02_kind_phys, 2.362606e-02_kind_phys, 2.230595e-02_kind_phys, 2.109435e-02_kind_phys, & !7 - 1.997617e-02_kind_phys, 1.893916e-02_kind_phys, 1.797328e-02_kind_phys, 1.707016e-02_kind_phys, 1.622279e-02_kind_phys, & !7 - 1.542523e-02_kind_phys, 1.467241e-02_kind_phys, 1.395997e-02_kind_phys, 1.328414e-02_kind_phys, 1.264164e-02_kind_phys, & !7 - 1.202958e-02_kind_phys, 1.144544e-02_kind_phys, 1.088697e-02_kind_phys, 1.035218e-02_kind_phys, 9.839297e-03_kind_phys, & !7 - 9.346733e-03_kind_phys, 8.873057e-03_kind_phys, 8.416980e-03_kind_phys, 7.977335e-03_kind_phys, 7.553066e-03_kind_phys, & !7 - 7.143210e-03_kind_phys, 6.746888e-03_kind_phys, 6.363297e-03_kind_phys, 5.991700e-03_kind_phys, 5.631422e-03_kind_phys, & !7 - 5.281840e-03_kind_phys, 4.942378e-03_kind_phys, 4.612505e-03_kind_phys, & !7 - 9.022185e-02_kind_phys, 6.922700e-02_kind_phys, 5.710674e-02_kind_phys, 4.898377e-02_kind_phys, 4.305946e-02_kind_phys, & !8 - 3.849553e-02_kind_phys, 3.484183e-02_kind_phys, 3.183220e-02_kind_phys, 2.929794e-02_kind_phys, 2.712627e-02_kind_phys, & !8 - 2.523856e-02_kind_phys, 2.357810e-02_kind_phys, 2.210286e-02_kind_phys, 2.078089e-02_kind_phys, 1.958747e-02_kind_phys, & !8 - 1.850310e-02_kind_phys, 1.751218e-02_kind_phys, 1.660205e-02_kind_phys, 1.576232e-02_kind_phys, 1.498440e-02_kind_phys, & !8 - 1.426107e-02_kind_phys, 1.358624e-02_kind_phys, 1.295474e-02_kind_phys, 1.236212e-02_kind_phys, 1.180456e-02_kind_phys, & !8 - 1.127874e-02_kind_phys, 1.078175e-02_kind_phys, 1.031106e-02_kind_phys, 9.864433e-03_kind_phys, 9.439878e-03_kind_phys, & !8 - 9.035637e-03_kind_phys, 8.650140e-03_kind_phys, 8.281981e-03_kind_phys, 7.929895e-03_kind_phys, 7.592746e-03_kind_phys, & !8 - 7.269505e-03_kind_phys, 6.959238e-03_kind_phys, 6.661100e-03_kind_phys, 6.374317e-03_kind_phys, 6.098185e-03_kind_phys, & !8 - 5.832059e-03_kind_phys, 5.575347e-03_kind_phys, 5.327504e-03_kind_phys, & !8 - 1.294087e-01_kind_phys, 8.788217e-02_kind_phys, 6.728288e-02_kind_phys, 5.479720e-02_kind_phys, 4.635049e-02_kind_phys, & !9 - 4.022253e-02_kind_phys, 3.555576e-02_kind_phys, 3.187259e-02_kind_phys, 2.888498e-02_kind_phys, 2.640843e-02_kind_phys, & !9 - 2.431904e-02_kind_phys, 2.253038e-02_kind_phys, 2.098024e-02_kind_phys, 1.962267e-02_kind_phys, 1.842293e-02_kind_phys, & !9 - 1.735426e-02_kind_phys, 1.639571e-02_kind_phys, 1.553060e-02_kind_phys, 1.474552e-02_kind_phys, 1.402953e-02_kind_phys, & !9 - 1.337363e-02_kind_phys, 1.277033e-02_kind_phys, 1.221336e-02_kind_phys, 1.169741e-02_kind_phys, 1.121797e-02_kind_phys, & !9 - 1.077117e-02_kind_phys, 1.035369e-02_kind_phys, 9.962643e-03_kind_phys, 9.595509e-03_kind_phys, 9.250088e-03_kind_phys, & !9 - 8.924447e-03_kind_phys, 8.616876e-03_kind_phys, 8.325862e-03_kind_phys, 8.050057e-03_kind_phys, 7.788258e-03_kind_phys, & !9 - 7.539388e-03_kind_phys, 7.302478e-03_kind_phys, 7.076656e-03_kind_phys, 6.861134e-03_kind_phys, 6.655197e-03_kind_phys, & !9 - 6.458197e-03_kind_phys, 6.269543e-03_kind_phys, 6.088697e-03_kind_phys, & !9 - 1.593628e-01_kind_phys, 1.014552e-01_kind_phys, 7.458955e-02_kind_phys, 5.903571e-02_kind_phys, 4.887582e-02_kind_phys, & !10 - 4.171159e-02_kind_phys, 3.638480e-02_kind_phys, 3.226692e-02_kind_phys, 2.898717e-02_kind_phys, 2.631256e-02_kind_phys, & !10 - 2.408925e-02_kind_phys, 2.221156e-02_kind_phys, 2.060448e-02_kind_phys, 1.921325e-02_kind_phys, 1.799699e-02_kind_phys, & !10 - 1.692456e-02_kind_phys, 1.597177e-02_kind_phys, 1.511961e-02_kind_phys, 1.435289e-02_kind_phys, 1.365933e-02_kind_phys, & !10 - 1.302890e-02_kind_phys, 1.245334e-02_kind_phys, 1.192576e-02_kind_phys, 1.144037e-02_kind_phys, 1.099230e-02_kind_phys, & !10 - 1.057739e-02_kind_phys, 1.019208e-02_kind_phys, 9.833302e-03_kind_phys, 9.498395e-03_kind_phys, 9.185047e-03_kind_phys, & !10 - 8.891237e-03_kind_phys, 8.615185e-03_kind_phys, 8.355325e-03_kind_phys, 8.110267e-03_kind_phys, 7.878778e-03_kind_phys, & !10 - 7.659759e-03_kind_phys, 7.452224e-03_kind_phys, 7.255291e-03_kind_phys, 7.068166e-03_kind_phys, 6.890130e-03_kind_phys, & !10 - 6.720536e-03_kind_phys, 6.558794e-03_kind_phys, 6.404371e-03_kind_phys, & !10 - 1.656227e-01_kind_phys, 1.032129e-01_kind_phys, 7.487359e-02_kind_phys, 5.871431e-02_kind_phys, 4.828355e-02_kind_phys, & !11 - 4.099989e-02_kind_phys, 3.562924e-02_kind_phys, 3.150755e-02_kind_phys, 2.824593e-02_kind_phys, 2.560156e-02_kind_phys, & !11 - 2.341503e-02_kind_phys, 2.157740e-02_kind_phys, 2.001169e-02_kind_phys, 1.866199e-02_kind_phys, 1.748669e-02_kind_phys, & !11 - 1.645421e-02_kind_phys, 1.554015e-02_kind_phys, 1.472535e-02_kind_phys, 1.399457e-02_kind_phys, 1.333553e-02_kind_phys, & !11 - 1.273821e-02_kind_phys, 1.219440e-02_kind_phys, 1.169725e-02_kind_phys, 1.124104e-02_kind_phys, 1.082096e-02_kind_phys, & !11 - 1.043290e-02_kind_phys, 1.007336e-02_kind_phys, 9.739338e-03_kind_phys, 9.428223e-03_kind_phys, 9.137756e-03_kind_phys, & !11 - 8.865964e-03_kind_phys, 8.611115e-03_kind_phys, 8.371686e-03_kind_phys, 8.146330e-03_kind_phys, 7.933852e-03_kind_phys, & !11 - 7.733187e-03_kind_phys, 7.543386e-03_kind_phys, 7.363597e-03_kind_phys, 7.193056e-03_kind_phys, 7.031072e-03_kind_phys, & !11 - 6.877024e-03_kind_phys, 6.730348e-03_kind_phys, 6.590531e-03_kind_phys, & !11 - 9.194591e-02_kind_phys, 6.446867e-02_kind_phys, 4.962034e-02_kind_phys, 4.042061e-02_kind_phys, 3.418456e-02_kind_phys, & !12 - 2.968856e-02_kind_phys, 2.629900e-02_kind_phys, 2.365572e-02_kind_phys, 2.153915e-02_kind_phys, 1.980791e-02_kind_phys, & !12 - 1.836689e-02_kind_phys, 1.714979e-02_kind_phys, 1.610900e-02_kind_phys, 1.520946e-02_kind_phys, 1.442476e-02_kind_phys, & !12 - 1.373468e-02_kind_phys, 1.312345e-02_kind_phys, 1.257858e-02_kind_phys, 1.209010e-02_kind_phys, 1.164990e-02_kind_phys, & !12 - 1.125136e-02_kind_phys, 1.088901e-02_kind_phys, 1.055827e-02_kind_phys, 1.025531e-02_kind_phys, 9.976896e-03_kind_phys, & !12 - 9.720255e-03_kind_phys, 9.483022e-03_kind_phys, 9.263160e-03_kind_phys, 9.058902e-03_kind_phys, 8.868710e-03_kind_phys, & !12 - 8.691240e-03_kind_phys, 8.525312e-03_kind_phys, 8.369886e-03_kind_phys, 8.224042e-03_kind_phys, 8.086961e-03_kind_phys, & !12 - 7.957917e-03_kind_phys, 7.836258e-03_kind_phys, 7.721400e-03_kind_phys, 7.612821e-03_kind_phys, 7.510045e-03_kind_phys, & !12 - 7.412648e-03_kind_phys, 7.320242e-03_kind_phys, 7.232476e-03_kind_phys, & !12 - 1.437021e-01_kind_phys, 8.872535e-02_kind_phys, 6.392420e-02_kind_phys, 4.991833e-02_kind_phys, 4.096790e-02_kind_phys, & !13 - 3.477881e-02_kind_phys, 3.025782e-02_kind_phys, 2.681909e-02_kind_phys, 2.412102e-02_kind_phys, 2.195132e-02_kind_phys, & !13 - 2.017124e-02_kind_phys, 1.868641e-02_kind_phys, 1.743044e-02_kind_phys, 1.635529e-02_kind_phys, 1.542540e-02_kind_phys, & !13 - 1.461388e-02_kind_phys, 1.390003e-02_kind_phys, 1.326766e-02_kind_phys, 1.270395e-02_kind_phys, 1.219860e-02_kind_phys, & !13 - 1.174326e-02_kind_phys, 1.133107e-02_kind_phys, 1.095637e-02_kind_phys, 1.061442e-02_kind_phys, 1.030126e-02_kind_phys, & !13 - 1.001352e-02_kind_phys, 9.748340e-03_kind_phys, 9.503256e-03_kind_phys, 9.276155e-03_kind_phys, 9.065205e-03_kind_phys, & !13 - 8.868808e-03_kind_phys, 8.685571e-03_kind_phys, 8.514268e-03_kind_phys, 8.353820e-03_kind_phys, 8.203272e-03_kind_phys, & !13 - 8.061776e-03_kind_phys, 7.928578e-03_kind_phys, 7.803001e-03_kind_phys, 7.684443e-03_kind_phys, 7.572358e-03_kind_phys, & !13 - 7.466258e-03_kind_phys, 7.365701e-03_kind_phys, 7.270286e-03_kind_phys, & !13 - 1.288870e-01_kind_phys, 8.160295e-02_kind_phys, 5.964745e-02_kind_phys, 4.703790e-02_kind_phys, 3.888637e-02_kind_phys, & !14 - 3.320115e-02_kind_phys, 2.902017e-02_kind_phys, 2.582259e-02_kind_phys, 2.330224e-02_kind_phys, 2.126754e-02_kind_phys, & !14 - 1.959258e-02_kind_phys, 1.819130e-02_kind_phys, 1.700289e-02_kind_phys, 1.598320e-02_kind_phys, 1.509942e-02_kind_phys, & !14 - 1.432666e-02_kind_phys, 1.364572e-02_kind_phys, 1.304156e-02_kind_phys, 1.250220e-02_kind_phys, 1.201803e-02_kind_phys, & !14 - 1.158123e-02_kind_phys, 1.118537e-02_kind_phys, 1.082513e-02_kind_phys, 1.049605e-02_kind_phys, 1.019440e-02_kind_phys, & !14 - 9.916989e-03_kind_phys, 9.661116e-03_kind_phys, 9.424457e-03_kind_phys, 9.205005e-03_kind_phys, 9.001022e-03_kind_phys, & !14 - 8.810992e-03_kind_phys, 8.633588e-03_kind_phys, 8.467646e-03_kind_phys, 8.312137e-03_kind_phys, 8.166151e-03_kind_phys, & !14 - 8.028878e-03_kind_phys, 7.899597e-03_kind_phys, 7.777663e-03_kind_phys, 7.662498e-03_kind_phys, 7.553581e-03_kind_phys, & !14 - 7.450444e-03_kind_phys, 7.352662e-03_kind_phys, 7.259851e-03_kind_phys, & !14 - 8.254229e-02_kind_phys, 5.808787e-02_kind_phys, 4.492166e-02_kind_phys, 3.675028e-02_kind_phys, 3.119623e-02_kind_phys, & !15 - 2.718045e-02_kind_phys, 2.414450e-02_kind_phys, 2.177073e-02_kind_phys, 1.986526e-02_kind_phys, 1.830306e-02_kind_phys, & !15 - 1.699991e-02_kind_phys, 1.589698e-02_kind_phys, 1.495199e-02_kind_phys, 1.413374e-02_kind_phys, 1.341870e-02_kind_phys, & !15 - 1.278883e-02_kind_phys, 1.223002e-02_kind_phys, 1.173114e-02_kind_phys, 1.128322e-02_kind_phys, 1.087900e-02_kind_phys, & !15 - 1.051254e-02_kind_phys, 1.017890e-02_kind_phys, 9.873991e-03_kind_phys, 9.594347e-03_kind_phys, 9.337044e-03_kind_phys, & !15 - 9.099589e-03_kind_phys, 8.879842e-03_kind_phys, 8.675960e-03_kind_phys, 8.486341e-03_kind_phys, 8.309594e-03_kind_phys, & !15 - 8.144500e-03_kind_phys, 7.989986e-03_kind_phys, 7.845109e-03_kind_phys, 7.709031e-03_kind_phys, 7.581007e-03_kind_phys, & !15 - 7.460376e-03_kind_phys, 7.346544e-03_kind_phys, 7.238978e-03_kind_phys, 7.137201e-03_kind_phys, 7.040780e-03_kind_phys, & !15 - 6.949325e-03_kind_phys, 6.862483e-03_kind_phys, 6.779931e-03_kind_phys, & !15 - 1.382062e-01_kind_phys, 8.643227e-02_kind_phys, 6.282935e-02_kind_phys, 4.934783e-02_kind_phys, 4.063891e-02_kind_phys, & !16 - 3.455591e-02_kind_phys, 3.007059e-02_kind_phys, 2.662897e-02_kind_phys, 2.390631e-02_kind_phys, 2.169972e-02_kind_phys, & !16 - 1.987596e-02_kind_phys, 1.834393e-02_kind_phys, 1.703924e-02_kind_phys, 1.591513e-02_kind_phys, 1.493679e-02_kind_phys, & !16 - 1.407780e-02_kind_phys, 1.331775e-02_kind_phys, 1.264061e-02_kind_phys, 1.203364e-02_kind_phys, 1.148655e-02_kind_phys, & !16 - 1.099099e-02_kind_phys, 1.054006e-02_kind_phys, 1.012807e-02_kind_phys, 9.750215e-03_kind_phys, 9.402477e-03_kind_phys, & !16 - 9.081428e-03_kind_phys, 8.784143e-03_kind_phys, 8.508107e-03_kind_phys, 8.251146e-03_kind_phys, 8.011373e-03_kind_phys, & !16 - 7.787140e-03_kind_phys, 7.577002e-03_kind_phys, 7.379687e-03_kind_phys, 7.194071e-03_kind_phys, 7.019158e-03_kind_phys, & !16 - 6.854061e-03_kind_phys, 6.697986e-03_kind_phys, 6.550224e-03_kind_phys, 6.410138e-03_kind_phys, 6.277153e-03_kind_phys, & !16 - 6.150751e-03_kind_phys, 6.030462e-03_kind_phys, 5.915860e-03_kind_phys/), & !16 + 7.798999e-02, 6.340479e-02, 5.417973e-02, 4.766245e-02, 4.272663e-02, & !1 + 3.880939e-02, 3.559544e-02, 3.289241e-02, 3.057511e-02, 2.855800e-02, & !1 + 2.678022e-02, 2.519712e-02, 2.377505e-02, 2.248806e-02, 2.131578e-02, & !1 + 2.024194e-02, 1.925337e-02, 1.833926e-02, 1.749067e-02, 1.670007e-02, & !1 + 1.596113e-02, 1.526845e-02, 1.461739e-02, 1.400394e-02, 1.342462e-02, & !1 + 1.287639e-02, 1.235656e-02, 1.186279e-02, 1.139297e-02, 1.094524e-02, & !1 + 1.051794e-02, 1.010956e-02, 9.718755e-03, 9.344316e-03, 8.985139e-03, & !1 + 8.640223e-03, 8.308656e-03, 7.989606e-03, 7.682312e-03, 7.386076e-03, & !1 + 7.100255e-03, 6.824258e-03, 6.557540e-03, & !1 + 2.784879e-02, 2.709863e-02, 2.619165e-02, 2.529230e-02, 2.443225e-02, & !2 + 2.361575e-02, 2.284021e-02, 2.210150e-02, 2.139548e-02, 2.071840e-02, & !2 + 2.006702e-02, 1.943856e-02, 1.883064e-02, 1.824120e-02, 1.766849e-02, & !2 + 1.711099e-02, 1.656737e-02, 1.603647e-02, 1.551727e-02, 1.500886e-02, & !2 + 1.451045e-02, 1.402132e-02, 1.354084e-02, 1.306842e-02, 1.260355e-02, & !2 + 1.214575e-02, 1.169460e-02, 1.124971e-02, 1.081072e-02, 1.037731e-02, & !2 + 9.949167e-03, 9.526021e-03, 9.107615e-03, 8.693714e-03, 8.284096e-03, & !2 + 7.878558e-03, 7.476910e-03, 7.078974e-03, 6.684586e-03, 6.293589e-03, & !2 + 5.905839e-03, 5.521200e-03, 5.139543e-03, & !2 + 1.065397e-01, 8.005726e-02, 6.546428e-02, 5.589131e-02, 4.898681e-02, & !3 + 4.369932e-02, 3.947901e-02, 3.600676e-02, 3.308299e-02, 3.057561e-02, & !3 + 2.839325e-02, 2.647040e-02, 2.475872e-02, 2.322164e-02, 2.183091e-02, & !3 + 2.056430e-02, 1.940407e-02, 1.833586e-02, 1.734787e-02, 1.643034e-02, & !3 + 1.557512e-02, 1.477530e-02, 1.402501e-02, 1.331924e-02, 1.265364e-02, & !3 + 1.202445e-02, 1.142838e-02, 1.086257e-02, 1.032445e-02, 9.811791e-03, & !3 + 9.322587e-03, 8.855053e-03, 8.407591e-03, 7.978763e-03, 7.567273e-03, & !3 + 7.171949e-03, 6.791728e-03, 6.425642e-03, 6.072809e-03, 5.732424e-03, & !3 + 5.403748e-03, 5.086103e-03, 4.778865e-03, & !3 + 1.804566e-01, 1.168987e-01, 8.680442e-02, 6.910060e-02, 5.738174e-02, & !4 + 4.902332e-02, 4.274585e-02, 3.784923e-02, 3.391734e-02, 3.068690e-02, & !4 + 2.798301e-02, 2.568480e-02, 2.370600e-02, 2.198337e-02, 2.046940e-02, & !4 + 1.912777e-02, 1.793016e-02, 1.685420e-02, 1.588193e-02, 1.499882e-02, & !4 + 1.419293e-02, 1.345440e-02, 1.277496e-02, 1.214769e-02, 1.156669e-02, & !4 + 1.102694e-02, 1.052412e-02, 1.005451e-02, 9.614854e-03, 9.202335e-03, & !4 + 8.814470e-03, 8.449077e-03, 8.104223e-03, 7.778195e-03, 7.469466e-03, & !4 + 7.176671e-03, 6.898588e-03, 6.634117e-03, 6.382264e-03, 6.142134e-03, & !4 + 5.912913e-03, 5.693862e-03, 5.484308e-03, & !4 + 2.131806e-01, 1.311372e-01, 9.407171e-02, 7.299442e-02, 5.941273e-02, & !5 + 4.994043e-02, 4.296242e-02, 3.761113e-02, 3.337910e-02, 2.994978e-02, & !5 + 2.711556e-02, 2.473461e-02, 2.270681e-02, 2.095943e-02, 1.943839e-02, & !5 + 1.810267e-02, 1.692057e-02, 1.586719e-02, 1.492275e-02, 1.407132e-02, & !5 + 1.329989e-02, 1.259780e-02, 1.195618e-02, 1.136761e-02, 1.082583e-02, & !5 + 1.032552e-02, 9.862158e-03, 9.431827e-03, 9.031157e-03, 8.657217e-03, & !5 + 8.307449e-03, 7.979609e-03, 7.671724e-03, 7.382048e-03, 7.109032e-03, & !5 + 6.851298e-03, 6.607615e-03, 6.376881e-03, 6.158105e-03, 5.950394e-03, & !5 + 5.752942e-03, 5.565019e-03, 5.385963e-03, & !5 + 1.546177e-01, 1.039251e-01, 7.910347e-02, 6.412429e-02, 5.399997e-02, & !6 + 4.664937e-02, 4.104237e-02, 3.660781e-02, 3.300218e-02, 3.000586e-02, & !6 + 2.747148e-02, 2.529633e-02, 2.340647e-02, 2.174723e-02, 2.027731e-02, & !6 + 1.896487e-02, 1.778492e-02, 1.671761e-02, 1.574692e-02, 1.485978e-02, & !6 + 1.404543e-02, 1.329489e-02, 1.260066e-02, 1.195636e-02, 1.135657e-02, & !6 + 1.079664e-02, 1.027257e-02, 9.780871e-03, 9.318505e-03, 8.882815e-03, & !6 + 8.471458e-03, 8.082364e-03, 7.713696e-03, 7.363817e-03, 7.031264e-03, & !6 + 6.714725e-03, 6.413021e-03, 6.125086e-03, 5.849958e-03, 5.586764e-03, & !6 + 5.334707e-03, 5.093066e-03, 4.861179e-03, & !6 + 7.583404e-02, 6.181558e-02, 5.312027e-02, 4.696039e-02, 4.225986e-02, & !7 + 3.849735e-02, 3.538340e-02, 3.274182e-02, 3.045798e-02, 2.845343e-02, & !7 + 2.667231e-02, 2.507353e-02, 2.362606e-02, 2.230595e-02, 2.109435e-02, & !7 + 1.997617e-02, 1.893916e-02, 1.797328e-02, 1.707016e-02, 1.622279e-02, & !7 + 1.542523e-02, 1.467241e-02, 1.395997e-02, 1.328414e-02, 1.264164e-02, & !7 + 1.202958e-02, 1.144544e-02, 1.088697e-02, 1.035218e-02, 9.839297e-03, & !7 + 9.346733e-03, 8.873057e-03, 8.416980e-03, 7.977335e-03, 7.553066e-03, & !7 + 7.143210e-03, 6.746888e-03, 6.363297e-03, 5.991700e-03, 5.631422e-03, & !7 + 5.281840e-03, 4.942378e-03, 4.612505e-03, & !7 + 9.022185e-02, 6.922700e-02, 5.710674e-02, 4.898377e-02, 4.305946e-02, & !8 + 3.849553e-02, 3.484183e-02, 3.183220e-02, 2.929794e-02, 2.712627e-02, & !8 + 2.523856e-02, 2.357810e-02, 2.210286e-02, 2.078089e-02, 1.958747e-02, & !8 + 1.850310e-02, 1.751218e-02, 1.660205e-02, 1.576232e-02, 1.498440e-02, & !8 + 1.426107e-02, 1.358624e-02, 1.295474e-02, 1.236212e-02, 1.180456e-02, & !8 + 1.127874e-02, 1.078175e-02, 1.031106e-02, 9.864433e-03, 9.439878e-03, & !8 + 9.035637e-03, 8.650140e-03, 8.281981e-03, 7.929895e-03, 7.592746e-03, & !8 + 7.269505e-03, 6.959238e-03, 6.661100e-03, 6.374317e-03, 6.098185e-03, & !8 + 5.832059e-03, 5.575347e-03, 5.327504e-03, & !8 + 1.294087e-01, 8.788217e-02, 6.728288e-02, 5.479720e-02, 4.635049e-02, & !9 + 4.022253e-02, 3.555576e-02, 3.187259e-02, 2.888498e-02, 2.640843e-02, & !9 + 2.431904e-02, 2.253038e-02, 2.098024e-02, 1.962267e-02, 1.842293e-02, & !9 + 1.735426e-02, 1.639571e-02, 1.553060e-02, 1.474552e-02, 1.402953e-02, & !9 + 1.337363e-02, 1.277033e-02, 1.221336e-02, 1.169741e-02, 1.121797e-02, & !9 + 1.077117e-02, 1.035369e-02, 9.962643e-03, 9.595509e-03, 9.250088e-03, & !9 + 8.924447e-03, 8.616876e-03, 8.325862e-03, 8.050057e-03, 7.788258e-03, & !9 + 7.539388e-03, 7.302478e-03, 7.076656e-03, 6.861134e-03, 6.655197e-03, & !9 + 6.458197e-03, 6.269543e-03, 6.088697e-03, & !9 + 1.593628e-01, 1.014552e-01, 7.458955e-02, 5.903571e-02, 4.887582e-02, & !10 + 4.171159e-02, 3.638480e-02, 3.226692e-02, 2.898717e-02, 2.631256e-02, & !10 + 2.408925e-02, 2.221156e-02, 2.060448e-02, 1.921325e-02, 1.799699e-02, & !10 + 1.692456e-02, 1.597177e-02, 1.511961e-02, 1.435289e-02, 1.365933e-02, & !10 + 1.302890e-02, 1.245334e-02, 1.192576e-02, 1.144037e-02, 1.099230e-02, & !10 + 1.057739e-02, 1.019208e-02, 9.833302e-03, 9.498395e-03, 9.185047e-03, & !10 + 8.891237e-03, 8.615185e-03, 8.355325e-03, 8.110267e-03, 7.878778e-03, & !10 + 7.659759e-03, 7.452224e-03, 7.255291e-03, 7.068166e-03, 6.890130e-03, & !10 + 6.720536e-03, 6.558794e-03, 6.404371e-03, & !10 + 1.656227e-01, 1.032129e-01, 7.487359e-02, 5.871431e-02, 4.828355e-02, & !11 + 4.099989e-02, 3.562924e-02, 3.150755e-02, 2.824593e-02, 2.560156e-02, & !11 + 2.341503e-02, 2.157740e-02, 2.001169e-02, 1.866199e-02, 1.748669e-02, & !11 + 1.645421e-02, 1.554015e-02, 1.472535e-02, 1.399457e-02, 1.333553e-02, & !11 + 1.273821e-02, 1.219440e-02, 1.169725e-02, 1.124104e-02, 1.082096e-02, & !11 + 1.043290e-02, 1.007336e-02, 9.739338e-03, 9.428223e-03, 9.137756e-03, & !11 + 8.865964e-03, 8.611115e-03, 8.371686e-03, 8.146330e-03, 7.933852e-03, & !11 + 7.733187e-03, 7.543386e-03, 7.363597e-03, 7.193056e-03, 7.031072e-03, & !11 + 6.877024e-03, 6.730348e-03, 6.590531e-03, & !11 + 9.194591e-02, 6.446867e-02, 4.962034e-02, 4.042061e-02, 3.418456e-02, & !12 + 2.968856e-02, 2.629900e-02, 2.365572e-02, 2.153915e-02, 1.980791e-02, & !12 + 1.836689e-02, 1.714979e-02, 1.610900e-02, 1.520946e-02, 1.442476e-02, & !12 + 1.373468e-02, 1.312345e-02, 1.257858e-02, 1.209010e-02, 1.164990e-02, & !12 + 1.125136e-02, 1.088901e-02, 1.055827e-02, 1.025531e-02, 9.976896e-03, & !12 + 9.720255e-03, 9.483022e-03, 9.263160e-03, 9.058902e-03, 8.868710e-03, & !12 + 8.691240e-03, 8.525312e-03, 8.369886e-03, 8.224042e-03, 8.086961e-03, & !12 + 7.957917e-03, 7.836258e-03, 7.721400e-03, 7.612821e-03, 7.510045e-03, & !12 + 7.412648e-03, 7.320242e-03, 7.232476e-03, & !12 + 1.437021e-01, 8.872535e-02, 6.392420e-02, 4.991833e-02, 4.096790e-02, & !13 + 3.477881e-02, 3.025782e-02, 2.681909e-02, 2.412102e-02, 2.195132e-02, & !13 + 2.017124e-02, 1.868641e-02, 1.743044e-02, 1.635529e-02, 1.542540e-02, & !13 + 1.461388e-02, 1.390003e-02, 1.326766e-02, 1.270395e-02, 1.219860e-02, & !13 + 1.174326e-02, 1.133107e-02, 1.095637e-02, 1.061442e-02, 1.030126e-02, & !13 + 1.001352e-02, 9.748340e-03, 9.503256e-03, 9.276155e-03, 9.065205e-03, & !13 + 8.868808e-03, 8.685571e-03, 8.514268e-03, 8.353820e-03, 8.203272e-03, & !13 + 8.061776e-03, 7.928578e-03, 7.803001e-03, 7.684443e-03, 7.572358e-03, & !13 + 7.466258e-03, 7.365701e-03, 7.270286e-03, & !13 + 1.288870e-01, 8.160295e-02, 5.964745e-02, 4.703790e-02, 3.888637e-02, & !14 + 3.320115e-02, 2.902017e-02, 2.582259e-02, 2.330224e-02, 2.126754e-02, & !14 + 1.959258e-02, 1.819130e-02, 1.700289e-02, 1.598320e-02, 1.509942e-02, & !14 + 1.432666e-02, 1.364572e-02, 1.304156e-02, 1.250220e-02, 1.201803e-02, & !14 + 1.158123e-02, 1.118537e-02, 1.082513e-02, 1.049605e-02, 1.019440e-02, & !14 + 9.916989e-03, 9.661116e-03, 9.424457e-03, 9.205005e-03, 9.001022e-03, & !14 + 8.810992e-03, 8.633588e-03, 8.467646e-03, 8.312137e-03, 8.166151e-03, & !14 + 8.028878e-03, 7.899597e-03, 7.777663e-03, 7.662498e-03, 7.553581e-03, & !14 + 7.450444e-03, 7.352662e-03, 7.259851e-03, & !14 + 8.254229e-02, 5.808787e-02, 4.492166e-02, 3.675028e-02, 3.119623e-02, & !15 + 2.718045e-02, 2.414450e-02, 2.177073e-02, 1.986526e-02, 1.830306e-02, & !15 + 1.699991e-02, 1.589698e-02, 1.495199e-02, 1.413374e-02, 1.341870e-02, & !15 + 1.278883e-02, 1.223002e-02, 1.173114e-02, 1.128322e-02, 1.087900e-02, & !15 + 1.051254e-02, 1.017890e-02, 9.873991e-03, 9.594347e-03, 9.337044e-03, & !15 + 9.099589e-03, 8.879842e-03, 8.675960e-03, 8.486341e-03, 8.309594e-03, & !15 + 8.144500e-03, 7.989986e-03, 7.845109e-03, 7.709031e-03, 7.581007e-03, & !15 + 7.460376e-03, 7.346544e-03, 7.238978e-03, 7.137201e-03, 7.040780e-03, & !15 + 6.949325e-03, 6.862483e-03, 6.779931e-03, & !15 + 1.382062e-01, 8.643227e-02, 6.282935e-02, 4.934783e-02, 4.063891e-02, & !16 + 3.455591e-02, 3.007059e-02, 2.662897e-02, 2.390631e-02, 2.169972e-02, & !16 + 1.987596e-02, 1.834393e-02, 1.703924e-02, 1.591513e-02, 1.493679e-02, & !16 + 1.407780e-02, 1.331775e-02, 1.264061e-02, 1.203364e-02, 1.148655e-02, & !16 + 1.099099e-02, 1.054006e-02, 1.012807e-02, 9.750215e-03, 9.402477e-03, & !16 + 9.081428e-03, 8.784143e-03, 8.508107e-03, 8.251146e-03, 8.011373e-03, & !16 + 7.787140e-03, 7.577002e-03, 7.379687e-03, 7.194071e-03, 7.019158e-03, & !16 + 6.854061e-03, 6.697986e-03, 6.550224e-03, 6.410138e-03, 6.277153e-03, & !16 + 6.150751e-03, 6.030462e-03, 5.915860e-03/), & !16 shape=(/43,nBandsLW_RRTMG/)) real(kind_phys) , dimension(46,nBandsLW_RRTMG),parameter :: & absice3 = reshape(source=(/ & - 3.110649e-03_kind_phys, 4.666352e-02_kind_phys, 6.606447e-02_kind_phys, 6.531678e-02_kind_phys, 6.012598e-02_kind_phys, & !1 - 5.437494e-02_kind_phys, 4.906411e-02_kind_phys, 4.441146e-02_kind_phys, 4.040585e-02_kind_phys, 3.697334e-02_kind_phys, & !1 - 3.403027e-02_kind_phys, 3.149979e-02_kind_phys, 2.931596e-02_kind_phys, 2.742365e-02_kind_phys, 2.577721e-02_kind_phys, & !1 - 2.433888e-02_kind_phys, 2.307732e-02_kind_phys, 2.196644e-02_kind_phys, 2.098437e-02_kind_phys, 2.011264e-02_kind_phys, & !1 - 1.933561e-02_kind_phys, 1.863992e-02_kind_phys, 1.801407e-02_kind_phys, 1.744812e-02_kind_phys, 1.693346e-02_kind_phys, & !1 - 1.646252e-02_kind_phys, 1.602866e-02_kind_phys, 1.562600e-02_kind_phys, 1.524933e-02_kind_phys, 1.489399e-02_kind_phys, & !1 - 1.455580e-02_kind_phys, 1.423098e-02_kind_phys, 1.391612e-02_kind_phys, 1.360812e-02_kind_phys, 1.330413e-02_kind_phys, & !1 - 1.300156e-02_kind_phys, 1.269801e-02_kind_phys, 1.239127e-02_kind_phys, 1.207928e-02_kind_phys, 1.176014e-02_kind_phys, & !1 - 1.143204e-02_kind_phys, 1.109334e-02_kind_phys, 1.074243e-02_kind_phys, 1.037786e-02_kind_phys, 9.998198e-03_kind_phys, & !1 - 9.602126e-03_kind_phys, & !1 - 3.984966e-04_kind_phys, 1.681097e-02_kind_phys, 2.627680e-02_kind_phys, 2.767465e-02_kind_phys, 2.700722e-02_kind_phys, & !2 - 2.579180e-02_kind_phys, 2.448677e-02_kind_phys, 2.323890e-02_kind_phys, 2.209096e-02_kind_phys, 2.104882e-02_kind_phys, & !2 - 2.010547e-02_kind_phys, 1.925003e-02_kind_phys, 1.847128e-02_kind_phys, 1.775883e-02_kind_phys, 1.710358e-02_kind_phys, & !2 - 1.649769e-02_kind_phys, 1.593449e-02_kind_phys, 1.540829e-02_kind_phys, 1.491429e-02_kind_phys, 1.444837e-02_kind_phys, & !2 - 1.400704e-02_kind_phys, 1.358729e-02_kind_phys, 1.318654e-02_kind_phys, 1.280258e-02_kind_phys, 1.243346e-02_kind_phys, & !2 - 1.207750e-02_kind_phys, 1.173325e-02_kind_phys, 1.139941e-02_kind_phys, 1.107487e-02_kind_phys, 1.075861e-02_kind_phys, & !2 - 1.044975e-02_kind_phys, 1.014753e-02_kind_phys, 9.851229e-03_kind_phys, 9.560240e-03_kind_phys, 9.274003e-03_kind_phys, & !2 - 8.992020e-03_kind_phys, 8.713845e-03_kind_phys, 8.439074e-03_kind_phys, 8.167346e-03_kind_phys, 7.898331e-03_kind_phys, & !2 - 7.631734e-03_kind_phys, 7.367286e-03_kind_phys, 7.104742e-03_kind_phys, 6.843882e-03_kind_phys, 6.584504e-03_kind_phys, & !2 - 6.326424e-03_kind_phys, & !2 - 6.933163e-02_kind_phys, 8.540475e-02_kind_phys, 7.701816e-02_kind_phys, 6.771158e-02_kind_phys, 5.986953e-02_kind_phys, & !3 - 5.348120e-02_kind_phys, 4.824962e-02_kind_phys, 4.390563e-02_kind_phys, 4.024411e-02_kind_phys, 3.711404e-02_kind_phys, & !3 - 3.440426e-02_kind_phys, 3.203200e-02_kind_phys, 2.993478e-02_kind_phys, 2.806474e-02_kind_phys, 2.638464e-02_kind_phys, & !3 - 2.486516e-02_kind_phys, 2.348288e-02_kind_phys, 2.221890e-02_kind_phys, 2.105780e-02_kind_phys, 1.998687e-02_kind_phys, & !3 - 1.899552e-02_kind_phys, 1.807490e-02_kind_phys, 1.721750e-02_kind_phys, 1.641693e-02_kind_phys, 1.566773e-02_kind_phys, & !3 - 1.496515e-02_kind_phys, 1.430509e-02_kind_phys, 1.368398e-02_kind_phys, 1.309865e-02_kind_phys, 1.254634e-02_kind_phys, & !3 - 1.202456e-02_kind_phys, 1.153114e-02_kind_phys, 1.106409e-02_kind_phys, 1.062166e-02_kind_phys, 1.020224e-02_kind_phys, & !3 - 9.804381e-03_kind_phys, 9.426771e-03_kind_phys, 9.068205e-03_kind_phys, 8.727578e-03_kind_phys, 8.403876e-03_kind_phys, & !3 - 8.096160e-03_kind_phys, 7.803564e-03_kind_phys, 7.525281e-03_kind_phys, 7.260560e-03_kind_phys, 7.008697e-03_kind_phys, & !3 - 6.769036e-03_kind_phys, & !3 - 1.765735e-01_kind_phys, 1.382700e-01_kind_phys, 1.095129e-01_kind_phys, 8.987475e-02_kind_phys, 7.591185e-02_kind_phys, & !4 - 6.554169e-02_kind_phys, 5.755500e-02_kind_phys, 5.122083e-02_kind_phys, 4.607610e-02_kind_phys, 4.181475e-02_kind_phys, & !4 - 3.822697e-02_kind_phys, 3.516432e-02_kind_phys, 3.251897e-02_kind_phys, 3.021073e-02_kind_phys, 2.817876e-02_kind_phys, & !4 - 2.637607e-02_kind_phys, 2.476582e-02_kind_phys, 2.331871e-02_kind_phys, 2.201113e-02_kind_phys, 2.082388e-02_kind_phys, & !4 - 1.974115e-02_kind_phys, 1.874983e-02_kind_phys, 1.783894e-02_kind_phys, 1.699922e-02_kind_phys, 1.622280e-02_kind_phys, & !4 - 1.550296e-02_kind_phys, 1.483390e-02_kind_phys, 1.421064e-02_kind_phys, 1.362880e-02_kind_phys, 1.308460e-02_kind_phys, & !4 - 1.257468e-02_kind_phys, 1.209611e-02_kind_phys, 1.164628e-02_kind_phys, 1.122287e-02_kind_phys, 1.082381e-02_kind_phys, & !4 - 1.044725e-02_kind_phys, 1.009154e-02_kind_phys, 9.755166e-03_kind_phys, 9.436783e-03_kind_phys, 9.135163e-03_kind_phys, & !4 - 8.849193e-03_kind_phys, 8.577856e-03_kind_phys, 8.320225e-03_kind_phys, 8.075451e-03_kind_phys, 7.842755e-03_kind_phys, & !4 - 7.621418e-03_kind_phys, & !4 - 2.339673e-01_kind_phys, 1.692124e-01_kind_phys, 1.291656e-01_kind_phys, 1.033837e-01_kind_phys, 8.562949e-02_kind_phys, & !5 - 7.273526e-02_kind_phys, 6.298262e-02_kind_phys, 5.537015e-02_kind_phys, 4.927787e-02_kind_phys, 4.430246e-02_kind_phys, & !5 - 4.017061e-02_kind_phys, 3.669072e-02_kind_phys, 3.372455e-02_kind_phys, 3.116995e-02_kind_phys, 2.894977e-02_kind_phys, & !5 - 2.700471e-02_kind_phys, 2.528842e-02_kind_phys, 2.376420e-02_kind_phys, 2.240256e-02_kind_phys, 2.117959e-02_kind_phys, & !5 - 2.007567e-02_kind_phys, 1.907456e-02_kind_phys, 1.816271e-02_kind_phys, 1.732874e-02_kind_phys, 1.656300e-02_kind_phys, & !5 - 1.585725e-02_kind_phys, 1.520445e-02_kind_phys, 1.459852e-02_kind_phys, 1.403419e-02_kind_phys, 1.350689e-02_kind_phys, & !5 - 1.301260e-02_kind_phys, 1.254781e-02_kind_phys, 1.210941e-02_kind_phys, 1.169468e-02_kind_phys, 1.130118e-02_kind_phys, & !5 - 1.092675e-02_kind_phys, 1.056945e-02_kind_phys, 1.022757e-02_kind_phys, 9.899560e-03_kind_phys, 9.584021e-03_kind_phys, & !5 - 9.279705e-03_kind_phys, 8.985479e-03_kind_phys, 8.700322e-03_kind_phys, 8.423306e-03_kind_phys, 8.153590e-03_kind_phys, & !5 - 7.890412e-03_kind_phys, & !5 - 1.145369e-01_kind_phys, 1.174566e-01_kind_phys, 9.917866e-02_kind_phys, 8.332990e-02_kind_phys, 7.104263e-02_kind_phys, & !6 - 6.153370e-02_kind_phys, 5.405472e-02_kind_phys, 4.806281e-02_kind_phys, 4.317918e-02_kind_phys, 3.913795e-02_kind_phys, & !6 - 3.574916e-02_kind_phys, 3.287437e-02_kind_phys, 3.041067e-02_kind_phys, 2.828017e-02_kind_phys, 2.642292e-02_kind_phys, & !6 - 2.479206e-02_kind_phys, 2.335051e-02_kind_phys, 2.206851e-02_kind_phys, 2.092195e-02_kind_phys, 1.989108e-02_kind_phys, & !6 - 1.895958e-02_kind_phys, 1.811385e-02_kind_phys, 1.734245e-02_kind_phys, 1.663573e-02_kind_phys, 1.598545e-02_kind_phys, & !6 - 1.538456e-02_kind_phys, 1.482700e-02_kind_phys, 1.430750e-02_kind_phys, 1.382150e-02_kind_phys, 1.336499e-02_kind_phys, & !6 - 1.293447e-02_kind_phys, 1.252685e-02_kind_phys, 1.213939e-02_kind_phys, 1.176968e-02_kind_phys, 1.141555e-02_kind_phys, & !6 - 1.107508e-02_kind_phys, 1.074655e-02_kind_phys, 1.042839e-02_kind_phys, 1.011923e-02_kind_phys, 9.817799e-03_kind_phys, & !6 - 9.522962e-03_kind_phys, 9.233688e-03_kind_phys, 8.949041e-03_kind_phys, 8.668171e-03_kind_phys, 8.390301e-03_kind_phys, & !6 - 8.114723e-03_kind_phys, & !6 - 1.222345e-02_kind_phys, 5.344230e-02_kind_phys, 5.523465e-02_kind_phys, 5.128759e-02_kind_phys, 4.676925e-02_kind_phys, & !7 - 4.266150e-02_kind_phys, 3.910561e-02_kind_phys, 3.605479e-02_kind_phys, 3.342843e-02_kind_phys, 3.115052e-02_kind_phys, & !7 - 2.915776e-02_kind_phys, 2.739935e-02_kind_phys, 2.583499e-02_kind_phys, 2.443266e-02_kind_phys, 2.316681e-02_kind_phys, & !7 - 2.201687e-02_kind_phys, 2.096619e-02_kind_phys, 2.000112e-02_kind_phys, 1.911044e-02_kind_phys, 1.828481e-02_kind_phys, & !7 - 1.751641e-02_kind_phys, 1.679866e-02_kind_phys, 1.612598e-02_kind_phys, 1.549360e-02_kind_phys, 1.489742e-02_kind_phys, & !7 - 1.433392e-02_kind_phys, 1.380002e-02_kind_phys, 1.329305e-02_kind_phys, 1.281068e-02_kind_phys, 1.235084e-02_kind_phys, & !7 - 1.191172e-02_kind_phys, 1.149171e-02_kind_phys, 1.108936e-02_kind_phys, 1.070341e-02_kind_phys, 1.033271e-02_kind_phys, & !7 - 9.976220e-03_kind_phys, 9.633021e-03_kind_phys, 9.302273e-03_kind_phys, 8.983216e-03_kind_phys, 8.675161e-03_kind_phys, & !7 - 8.377478e-03_kind_phys, 8.089595e-03_kind_phys, 7.810986e-03_kind_phys, 7.541170e-03_kind_phys, 7.279706e-03_kind_phys, & !7 - 7.026186e-03_kind_phys, & !7 - 6.711058e-02_kind_phys, 6.918198e-02_kind_phys, 6.127484e-02_kind_phys, 5.411944e-02_kind_phys, 4.836902e-02_kind_phys, & !8 - 4.375293e-02_kind_phys, 3.998077e-02_kind_phys, 3.683587e-02_kind_phys, 3.416508e-02_kind_phys, 3.186003e-02_kind_phys, & !8 - 2.984290e-02_kind_phys, 2.805671e-02_kind_phys, 2.645895e-02_kind_phys, 2.501733e-02_kind_phys, 2.370689e-02_kind_phys, & !8 - 2.250808e-02_kind_phys, 2.140532e-02_kind_phys, 2.038609e-02_kind_phys, 1.944018e-02_kind_phys, 1.855918e-02_kind_phys, & !8 - 1.773609e-02_kind_phys, 1.696504e-02_kind_phys, 1.624106e-02_kind_phys, 1.555990e-02_kind_phys, 1.491793e-02_kind_phys, & !8 - 1.431197e-02_kind_phys, 1.373928e-02_kind_phys, 1.319743e-02_kind_phys, 1.268430e-02_kind_phys, 1.219799e-02_kind_phys, & !8 - 1.173682e-02_kind_phys, 1.129925e-02_kind_phys, 1.088393e-02_kind_phys, 1.048961e-02_kind_phys, 1.011516e-02_kind_phys, & !8 - 9.759543e-03_kind_phys, 9.421813e-03_kind_phys, 9.101089e-03_kind_phys, 8.796559e-03_kind_phys, 8.507464e-03_kind_phys, & !8 - 8.233098e-03_kind_phys, 7.972798e-03_kind_phys, 7.725942e-03_kind_phys, 7.491940e-03_kind_phys, 7.270238e-03_kind_phys, & !8 - 7.060305e-03_kind_phys, & !8 - 1.236780e-01_kind_phys, 9.222386e-02_kind_phys, 7.383997e-02_kind_phys, 6.204072e-02_kind_phys, 5.381029e-02_kind_phys, & !9 - 4.770678e-02_kind_phys, 4.296928e-02_kind_phys, 3.916131e-02_kind_phys, 3.601540e-02_kind_phys, 3.335878e-02_kind_phys, & !9 - 3.107493e-02_kind_phys, 2.908247e-02_kind_phys, 2.732282e-02_kind_phys, 2.575276e-02_kind_phys, 2.433968e-02_kind_phys, & !9 - 2.305852e-02_kind_phys, 2.188966e-02_kind_phys, 2.081757e-02_kind_phys, 1.982974e-02_kind_phys, 1.891599e-02_kind_phys, & !9 - 1.806794e-02_kind_phys, 1.727865e-02_kind_phys, 1.654227e-02_kind_phys, 1.585387e-02_kind_phys, 1.520924e-02_kind_phys, & !9 - 1.460476e-02_kind_phys, 1.403730e-02_kind_phys, 1.350416e-02_kind_phys, 1.300293e-02_kind_phys, 1.253153e-02_kind_phys, & !9 - 1.208808e-02_kind_phys, 1.167094e-02_kind_phys, 1.127862e-02_kind_phys, 1.090979e-02_kind_phys, 1.056323e-02_kind_phys, & !9 - 1.023786e-02_kind_phys, 9.932665e-03_kind_phys, 9.646744e-03_kind_phys, 9.379250e-03_kind_phys, 9.129409e-03_kind_phys, & !9 - 8.896500e-03_kind_phys, 8.679856e-03_kind_phys, 8.478852e-03_kind_phys, 8.292904e-03_kind_phys, 8.121463e-03_kind_phys, & !9 - 7.964013e-03_kind_phys, & !9 - 1.655966e-01_kind_phys, 1.134205e-01_kind_phys, 8.714344e-02_kind_phys, 7.129241e-02_kind_phys, 6.063739e-02_kind_phys, & !10 - 5.294203e-02_kind_phys, 4.709309e-02_kind_phys, 4.247476e-02_kind_phys, 3.871892e-02_kind_phys, 3.559206e-02_kind_phys, & !10 - 3.293893e-02_kind_phys, 3.065226e-02_kind_phys, 2.865558e-02_kind_phys, 2.689288e-02_kind_phys, 2.532221e-02_kind_phys, & !10 - 2.391150e-02_kind_phys, 2.263582e-02_kind_phys, 2.147549e-02_kind_phys, 2.041476e-02_kind_phys, 1.944089e-02_kind_phys, & !10 - 1.854342e-02_kind_phys, 1.771371e-02_kind_phys, 1.694456e-02_kind_phys, 1.622989e-02_kind_phys, 1.556456e-02_kind_phys, & !10 - 1.494415e-02_kind_phys, 1.436491e-02_kind_phys, 1.382354e-02_kind_phys, 1.331719e-02_kind_phys, 1.284339e-02_kind_phys, & !10 - 1.239992e-02_kind_phys, 1.198486e-02_kind_phys, 1.159647e-02_kind_phys, 1.123323e-02_kind_phys, 1.089375e-02_kind_phys, & !10 - 1.057679e-02_kind_phys, 1.028124e-02_kind_phys, 1.000607e-02_kind_phys, 9.750376e-03_kind_phys, 9.513303e-03_kind_phys, & !10 - 9.294082e-03_kind_phys, 9.092003e-03_kind_phys, 8.906412e-03_kind_phys, 8.736702e-03_kind_phys, 8.582314e-03_kind_phys, & !10 - 8.442725e-03_kind_phys, & !10 - 1.775615e-01_kind_phys, 1.180046e-01_kind_phys, 8.929607e-02_kind_phys, 7.233500e-02_kind_phys, 6.108333e-02_kind_phys, & !11 - 5.303642e-02_kind_phys, 4.696927e-02_kind_phys, 4.221206e-02_kind_phys, 3.836768e-02_kind_phys, 3.518576e-02_kind_phys, & !11 - 3.250063e-02_kind_phys, 3.019825e-02_kind_phys, 2.819758e-02_kind_phys, 2.643943e-02_kind_phys, 2.487953e-02_kind_phys, & !11 - 2.348414e-02_kind_phys, 2.222705e-02_kind_phys, 2.108762e-02_kind_phys, 2.004936e-02_kind_phys, 1.909892e-02_kind_phys, & !11 - 1.822539e-02_kind_phys, 1.741975e-02_kind_phys, 1.667449e-02_kind_phys, 1.598330e-02_kind_phys, 1.534084e-02_kind_phys, & !11 - 1.474253e-02_kind_phys, 1.418446e-02_kind_phys, 1.366325e-02_kind_phys, 1.317597e-02_kind_phys, 1.272004e-02_kind_phys, & !11 - 1.229321e-02_kind_phys, 1.189350e-02_kind_phys, 1.151915e-02_kind_phys, 1.116859e-02_kind_phys, 1.084042e-02_kind_phys, & !11 - 1.053338e-02_kind_phys, 1.024636e-02_kind_phys, 9.978326e-03_kind_phys, 9.728357e-03_kind_phys, 9.495613e-03_kind_phys, & !11 - 9.279327e-03_kind_phys, 9.078798e-03_kind_phys, 8.893383e-03_kind_phys, 8.722488e-03_kind_phys, 8.565568e-03_kind_phys, & !11 - 8.422115e-03_kind_phys, & !11 - 9.465447e-02_kind_phys, 6.432047e-02_kind_phys, 5.060973e-02_kind_phys, 4.267283e-02_kind_phys, 3.741843e-02_kind_phys, & !12 - 3.363096e-02_kind_phys, 3.073531e-02_kind_phys, 2.842405e-02_kind_phys, 2.651789e-02_kind_phys, 2.490518e-02_kind_phys, & !12 - 2.351273e-02_kind_phys, 2.229056e-02_kind_phys, 2.120335e-02_kind_phys, 2.022541e-02_kind_phys, 1.933763e-02_kind_phys, & !12 - 1.852546e-02_kind_phys, 1.777763e-02_kind_phys, 1.708528e-02_kind_phys, 1.644134e-02_kind_phys, 1.584009e-02_kind_phys, & !12 - 1.527684e-02_kind_phys, 1.474774e-02_kind_phys, 1.424955e-02_kind_phys, 1.377957e-02_kind_phys, 1.333549e-02_kind_phys, & !12 - 1.291534e-02_kind_phys, 1.251743e-02_kind_phys, 1.214029e-02_kind_phys, 1.178265e-02_kind_phys, 1.144337e-02_kind_phys, & !12 - 1.112148e-02_kind_phys, 1.081609e-02_kind_phys, 1.052642e-02_kind_phys, 1.025178e-02_kind_phys, 9.991540e-03_kind_phys, & !12 - 9.745130e-03_kind_phys, 9.512038e-03_kind_phys, 9.291797e-03_kind_phys, 9.083980e-03_kind_phys, 8.888195e-03_kind_phys, & !12 - 8.704081e-03_kind_phys, 8.531306e-03_kind_phys, 8.369560e-03_kind_phys, 8.218558e-03_kind_phys, 8.078032e-03_kind_phys, & !12 - 7.947730e-03_kind_phys, & !12 - 1.560311e-01_kind_phys, 9.961097e-02_kind_phys, 7.502949e-02_kind_phys, 6.115022e-02_kind_phys, 5.214952e-02_kind_phys, & !13 - 4.578149e-02_kind_phys, 4.099731e-02_kind_phys, 3.724174e-02_kind_phys, 3.419343e-02_kind_phys, 3.165356e-02_kind_phys, & !13 - 2.949251e-02_kind_phys, 2.762222e-02_kind_phys, 2.598073e-02_kind_phys, 2.452322e-02_kind_phys, 2.321642e-02_kind_phys, & !13 - 2.203516e-02_kind_phys, 2.096002e-02_kind_phys, 1.997579e-02_kind_phys, 1.907036e-02_kind_phys, 1.823401e-02_kind_phys, & !13 - 1.745879e-02_kind_phys, 1.673819e-02_kind_phys, 1.606678e-02_kind_phys, 1.544003e-02_kind_phys, 1.485411e-02_kind_phys, & !13 - 1.430574e-02_kind_phys, 1.379215e-02_kind_phys, 1.331092e-02_kind_phys, 1.285996e-02_kind_phys, 1.243746e-02_kind_phys, & !13 - 1.204183e-02_kind_phys, 1.167164e-02_kind_phys, 1.132567e-02_kind_phys, 1.100281e-02_kind_phys, 1.070207e-02_kind_phys, & !13 - 1.042258e-02_kind_phys, 1.016352e-02_kind_phys, 9.924197e-03_kind_phys, 9.703953e-03_kind_phys, 9.502199e-03_kind_phys, & !13 - 9.318400e-03_kind_phys, 9.152066e-03_kind_phys, 9.002749e-03_kind_phys, 8.870038e-03_kind_phys, 8.753555e-03_kind_phys, & !13 - 8.652951e-03_kind_phys, & !13 - 1.559547e-01_kind_phys, 9.896700e-02_kind_phys, 7.441231e-02_kind_phys, 6.061469e-02_kind_phys, 5.168730e-02_kind_phys, & !14 - 4.537821e-02_kind_phys, 4.064106e-02_kind_phys, 3.692367e-02_kind_phys, 3.390714e-02_kind_phys, 3.139438e-02_kind_phys, & !14 - 2.925702e-02_kind_phys, 2.740783e-02_kind_phys, 2.578547e-02_kind_phys, 2.434552e-02_kind_phys, 2.305506e-02_kind_phys, & !14 - 2.188910e-02_kind_phys, 2.082842e-02_kind_phys, 1.985789e-02_kind_phys, 1.896553e-02_kind_phys, 1.814165e-02_kind_phys, & !14 - 1.737839e-02_kind_phys, 1.666927e-02_kind_phys, 1.600891e-02_kind_phys, 1.539279e-02_kind_phys, 1.481712e-02_kind_phys, & !14 - 1.427865e-02_kind_phys, 1.377463e-02_kind_phys, 1.330266e-02_kind_phys, 1.286068e-02_kind_phys, 1.244689e-02_kind_phys, & !14 - 1.205973e-02_kind_phys, 1.169780e-02_kind_phys, 1.135989e-02_kind_phys, 1.104492e-02_kind_phys, 1.075192e-02_kind_phys, & !14 - 1.048004e-02_kind_phys, 1.022850e-02_kind_phys, 9.996611e-03_kind_phys, 9.783753e-03_kind_phys, 9.589361e-03_kind_phys, & !14 - 9.412924e-03_kind_phys, 9.253977e-03_kind_phys, 9.112098e-03_kind_phys, 8.986903e-03_kind_phys, 8.878039e-03_kind_phys, & !14 - 8.785184e-03_kind_phys, & !14 - 1.102926e-01_kind_phys, 7.176622e-02_kind_phys, 5.530316e-02_kind_phys, 4.606056e-02_kind_phys, 4.006116e-02_kind_phys, & !15 - 3.579628e-02_kind_phys, 3.256909e-02_kind_phys, 3.001360e-02_kind_phys, 2.791920e-02_kind_phys, 2.615617e-02_kind_phys, & !15 - 2.464023e-02_kind_phys, 2.331426e-02_kind_phys, 2.213817e-02_kind_phys, 2.108301e-02_kind_phys, 2.012733e-02_kind_phys, & !15 - 1.925493e-02_kind_phys, 1.845331e-02_kind_phys, 1.771269e-02_kind_phys, 1.702531e-02_kind_phys, 1.638493e-02_kind_phys, & !15 - 1.578648e-02_kind_phys, 1.522579e-02_kind_phys, 1.469940e-02_kind_phys, 1.420442e-02_kind_phys, 1.373841e-02_kind_phys, & !15 - 1.329931e-02_kind_phys, 1.288535e-02_kind_phys, 1.249502e-02_kind_phys, 1.212700e-02_kind_phys, 1.178015e-02_kind_phys, & !15 - 1.145348e-02_kind_phys, 1.114612e-02_kind_phys, 1.085730e-02_kind_phys, 1.058633e-02_kind_phys, 1.033263e-02_kind_phys, & !15 - 1.009564e-02_kind_phys, 9.874895e-03_kind_phys, 9.669960e-03_kind_phys, 9.480449e-03_kind_phys, 9.306014e-03_kind_phys, & !15 - 9.146339e-03_kind_phys, 9.001138e-03_kind_phys, 8.870154e-03_kind_phys, 8.753148e-03_kind_phys, 8.649907e-03_kind_phys, & !15 - 8.560232e-03_kind_phys, & !15 - 1.688344e-01_kind_phys, 1.077072e-01_kind_phys, 7.994467e-02_kind_phys, 6.403862e-02_kind_phys, 5.369850e-02_kind_phys, & !16 - 4.641582e-02_kind_phys, 4.099331e-02_kind_phys, 3.678724e-02_kind_phys, 3.342069e-02_kind_phys, 3.065831e-02_kind_phys, & !16 - 2.834557e-02_kind_phys, 2.637680e-02_kind_phys, 2.467733e-02_kind_phys, 2.319286e-02_kind_phys, 2.188299e-02_kind_phys, & !16 - 2.071701e-02_kind_phys, 1.967121e-02_kind_phys, 1.872692e-02_kind_phys, 1.786931e-02_kind_phys, 1.708641e-02_kind_phys, & !16 - 1.636846e-02_kind_phys, 1.570743e-02_kind_phys, 1.509665e-02_kind_phys, 1.453052e-02_kind_phys, 1.400433e-02_kind_phys, & !16 - 1.351407e-02_kind_phys, 1.305631e-02_kind_phys, 1.262810e-02_kind_phys, 1.222688e-02_kind_phys, 1.185044e-02_kind_phys, & !16 - 1.149683e-02_kind_phys, 1.116436e-02_kind_phys, 1.085153e-02_kind_phys, 1.055701e-02_kind_phys, 1.027961e-02_kind_phys, & !16 - 1.001831e-02_kind_phys, 9.772141e-03_kind_phys, 9.540280e-03_kind_phys, 9.321966e-03_kind_phys, 9.116517e-03_kind_phys, & !16 - 8.923315e-03_kind_phys, 8.741803e-03_kind_phys, 8.571472e-03_kind_phys, 8.411860e-03_kind_phys, 8.262543e-03_kind_phys, & !16 - 8.123136e-03_kind_phys/), & !16 + 3.110649e-03, 4.666352e-02, 6.606447e-02, 6.531678e-02, 6.012598e-02, & !1 + 5.437494e-02, 4.906411e-02, 4.441146e-02, 4.040585e-02, 3.697334e-02, & !1 + 3.403027e-02, 3.149979e-02, 2.931596e-02, 2.742365e-02, 2.577721e-02, & !1 + 2.433888e-02, 2.307732e-02, 2.196644e-02, 2.098437e-02, 2.011264e-02, & !1 + 1.933561e-02, 1.863992e-02, 1.801407e-02, 1.744812e-02, 1.693346e-02, & !1 + 1.646252e-02, 1.602866e-02, 1.562600e-02, 1.524933e-02, 1.489399e-02, & !1 + 1.455580e-02, 1.423098e-02, 1.391612e-02, 1.360812e-02, 1.330413e-02, & !1 + 1.300156e-02, 1.269801e-02, 1.239127e-02, 1.207928e-02, 1.176014e-02, & !1 + 1.143204e-02, 1.109334e-02, 1.074243e-02, 1.037786e-02, 9.998198e-03, & !1 + 9.602126e-03, & !1 + 3.984966e-04, 1.681097e-02, 2.627680e-02, 2.767465e-02, 2.700722e-02, & !2 + 2.579180e-02, 2.448677e-02, 2.323890e-02, 2.209096e-02, 2.104882e-02, & !2 + 2.010547e-02, 1.925003e-02, 1.847128e-02, 1.775883e-02, 1.710358e-02, & !2 + 1.649769e-02, 1.593449e-02, 1.540829e-02, 1.491429e-02, 1.444837e-02, & !2 + 1.400704e-02, 1.358729e-02, 1.318654e-02, 1.280258e-02, 1.243346e-02, & !2 + 1.207750e-02, 1.173325e-02, 1.139941e-02, 1.107487e-02, 1.075861e-02, & !2 + 1.044975e-02, 1.014753e-02, 9.851229e-03, 9.560240e-03, 9.274003e-03, & !2 + 8.992020e-03, 8.713845e-03, 8.439074e-03, 8.167346e-03, 7.898331e-03, & !2 + 7.631734e-03, 7.367286e-03, 7.104742e-03, 6.843882e-03, 6.584504e-03, & !2 + 6.326424e-03, & !2 + 6.933163e-02, 8.540475e-02, 7.701816e-02, 6.771158e-02, 5.986953e-02, & !3 + 5.348120e-02, 4.824962e-02, 4.390563e-02, 4.024411e-02, 3.711404e-02, & !3 + 3.440426e-02, 3.203200e-02, 2.993478e-02, 2.806474e-02, 2.638464e-02, & !3 + 2.486516e-02, 2.348288e-02, 2.221890e-02, 2.105780e-02, 1.998687e-02, & !3 + 1.899552e-02, 1.807490e-02, 1.721750e-02, 1.641693e-02, 1.566773e-02, & !3 + 1.496515e-02, 1.430509e-02, 1.368398e-02, 1.309865e-02, 1.254634e-02, & !3 + 1.202456e-02, 1.153114e-02, 1.106409e-02, 1.062166e-02, 1.020224e-02, & !3 + 9.804381e-03, 9.426771e-03, 9.068205e-03, 8.727578e-03, 8.403876e-03, & !3 + 8.096160e-03, 7.803564e-03, 7.525281e-03, 7.260560e-03, 7.008697e-03, & !3 + 6.769036e-03, & !3 + 1.765735e-01, 1.382700e-01, 1.095129e-01, 8.987475e-02, 7.591185e-02, & !4 + 6.554169e-02, 5.755500e-02, 5.122083e-02, 4.607610e-02, 4.181475e-02, & !4 + 3.822697e-02, 3.516432e-02, 3.251897e-02, 3.021073e-02, 2.817876e-02, & !4 + 2.637607e-02, 2.476582e-02, 2.331871e-02, 2.201113e-02, 2.082388e-02, & !4 + 1.974115e-02, 1.874983e-02, 1.783894e-02, 1.699922e-02, 1.622280e-02, & !4 + 1.550296e-02, 1.483390e-02, 1.421064e-02, 1.362880e-02, 1.308460e-02, & !4 + 1.257468e-02, 1.209611e-02, 1.164628e-02, 1.122287e-02, 1.082381e-02, & !4 + 1.044725e-02, 1.009154e-02, 9.755166e-03, 9.436783e-03, 9.135163e-03, & !4 + 8.849193e-03, 8.577856e-03, 8.320225e-03, 8.075451e-03, 7.842755e-03, & !4 + 7.621418e-03, & !4 + 2.339673e-01, 1.692124e-01, 1.291656e-01, 1.033837e-01, 8.562949e-02, & !5 + 7.273526e-02, 6.298262e-02, 5.537015e-02, 4.927787e-02, 4.430246e-02, & !5 + 4.017061e-02, 3.669072e-02, 3.372455e-02, 3.116995e-02, 2.894977e-02, & !5 + 2.700471e-02, 2.528842e-02, 2.376420e-02, 2.240256e-02, 2.117959e-02, & !5 + 2.007567e-02, 1.907456e-02, 1.816271e-02, 1.732874e-02, 1.656300e-02, & !5 + 1.585725e-02, 1.520445e-02, 1.459852e-02, 1.403419e-02, 1.350689e-02, & !5 + 1.301260e-02, 1.254781e-02, 1.210941e-02, 1.169468e-02, 1.130118e-02, & !5 + 1.092675e-02, 1.056945e-02, 1.022757e-02, 9.899560e-03, 9.584021e-03, & !5 + 9.279705e-03, 8.985479e-03, 8.700322e-03, 8.423306e-03, 8.153590e-03, & !5 + 7.890412e-03, & !5 + 1.145369e-01, 1.174566e-01, 9.917866e-02, 8.332990e-02, 7.104263e-02, & !6 + 6.153370e-02, 5.405472e-02, 4.806281e-02, 4.317918e-02, 3.913795e-02, & !6 + 3.574916e-02, 3.287437e-02, 3.041067e-02, 2.828017e-02, 2.642292e-02, & !6 + 2.479206e-02, 2.335051e-02, 2.206851e-02, 2.092195e-02, 1.989108e-02, & !6 + 1.895958e-02, 1.811385e-02, 1.734245e-02, 1.663573e-02, 1.598545e-02, & !6 + 1.538456e-02, 1.482700e-02, 1.430750e-02, 1.382150e-02, 1.336499e-02, & !6 + 1.293447e-02, 1.252685e-02, 1.213939e-02, 1.176968e-02, 1.141555e-02, & !6 + 1.107508e-02, 1.074655e-02, 1.042839e-02, 1.011923e-02, 9.817799e-03, & !6 + 9.522962e-03, 9.233688e-03, 8.949041e-03, 8.668171e-03, 8.390301e-03, & !6 + 8.114723e-03, & !6 + 1.222345e-02, 5.344230e-02, 5.523465e-02, 5.128759e-02, 4.676925e-02, & !7 + 4.266150e-02, 3.910561e-02, 3.605479e-02, 3.342843e-02, 3.115052e-02, & !7 + 2.915776e-02, 2.739935e-02, 2.583499e-02, 2.443266e-02, 2.316681e-02, & !7 + 2.201687e-02, 2.096619e-02, 2.000112e-02, 1.911044e-02, 1.828481e-02, & !7 + 1.751641e-02, 1.679866e-02, 1.612598e-02, 1.549360e-02, 1.489742e-02, & !7 + 1.433392e-02, 1.380002e-02, 1.329305e-02, 1.281068e-02, 1.235084e-02, & !7 + 1.191172e-02, 1.149171e-02, 1.108936e-02, 1.070341e-02, 1.033271e-02, & !7 + 9.976220e-03, 9.633021e-03, 9.302273e-03, 8.983216e-03, 8.675161e-03, & !7 + 8.377478e-03, 8.089595e-03, 7.810986e-03, 7.541170e-03, 7.279706e-03, & !7 + 7.026186e-03, & !7 + 6.711058e-02, 6.918198e-02, 6.127484e-02, 5.411944e-02, 4.836902e-02, & !8 + 4.375293e-02, 3.998077e-02, 3.683587e-02, 3.416508e-02, 3.186003e-02, & !8 + 2.984290e-02, 2.805671e-02, 2.645895e-02, 2.501733e-02, 2.370689e-02, & !8 + 2.250808e-02, 2.140532e-02, 2.038609e-02, 1.944018e-02, 1.855918e-02, & !8 + 1.773609e-02, 1.696504e-02, 1.624106e-02, 1.555990e-02, 1.491793e-02, & !8 + 1.431197e-02, 1.373928e-02, 1.319743e-02, 1.268430e-02, 1.219799e-02, & !8 + 1.173682e-02, 1.129925e-02, 1.088393e-02, 1.048961e-02, 1.011516e-02, & !8 + 9.759543e-03, 9.421813e-03, 9.101089e-03, 8.796559e-03, 8.507464e-03, & !8 + 8.233098e-03, 7.972798e-03, 7.725942e-03, 7.491940e-03, 7.270238e-03, & !8 + 7.060305e-03, & !8 + 1.236780e-01, 9.222386e-02, 7.383997e-02, 6.204072e-02, 5.381029e-02, & !9 + 4.770678e-02, 4.296928e-02, 3.916131e-02, 3.601540e-02, 3.335878e-02, & !9 + 3.107493e-02, 2.908247e-02, 2.732282e-02, 2.575276e-02, 2.433968e-02, & !9 + 2.305852e-02, 2.188966e-02, 2.081757e-02, 1.982974e-02, 1.891599e-02, & !9 + 1.806794e-02, 1.727865e-02, 1.654227e-02, 1.585387e-02, 1.520924e-02, & !9 + 1.460476e-02, 1.403730e-02, 1.350416e-02, 1.300293e-02, 1.253153e-02, & !9 + 1.208808e-02, 1.167094e-02, 1.127862e-02, 1.090979e-02, 1.056323e-02, & !9 + 1.023786e-02, 9.932665e-03, 9.646744e-03, 9.379250e-03, 9.129409e-03, & !9 + 8.896500e-03, 8.679856e-03, 8.478852e-03, 8.292904e-03, 8.121463e-03, & !9 + 7.964013e-03, & !9 + 1.655966e-01, 1.134205e-01, 8.714344e-02, 7.129241e-02, 6.063739e-02, & !10 + 5.294203e-02, 4.709309e-02, 4.247476e-02, 3.871892e-02, 3.559206e-02, & !10 + 3.293893e-02, 3.065226e-02, 2.865558e-02, 2.689288e-02, 2.532221e-02, & !10 + 2.391150e-02, 2.263582e-02, 2.147549e-02, 2.041476e-02, 1.944089e-02, & !10 + 1.854342e-02, 1.771371e-02, 1.694456e-02, 1.622989e-02, 1.556456e-02, & !10 + 1.494415e-02, 1.436491e-02, 1.382354e-02, 1.331719e-02, 1.284339e-02, & !10 + 1.239992e-02, 1.198486e-02, 1.159647e-02, 1.123323e-02, 1.089375e-02, & !10 + 1.057679e-02, 1.028124e-02, 1.000607e-02, 9.750376e-03, 9.513303e-03, & !10 + 9.294082e-03, 9.092003e-03, 8.906412e-03, 8.736702e-03, 8.582314e-03, & !10 + 8.442725e-03, & !10 + 1.775615e-01, 1.180046e-01, 8.929607e-02, 7.233500e-02, 6.108333e-02, & !11 + 5.303642e-02, 4.696927e-02, 4.221206e-02, 3.836768e-02, 3.518576e-02, & !11 + 3.250063e-02, 3.019825e-02, 2.819758e-02, 2.643943e-02, 2.487953e-02, & !11 + 2.348414e-02, 2.222705e-02, 2.108762e-02, 2.004936e-02, 1.909892e-02, & !11 + 1.822539e-02, 1.741975e-02, 1.667449e-02, 1.598330e-02, 1.534084e-02, & !11 + 1.474253e-02, 1.418446e-02, 1.366325e-02, 1.317597e-02, 1.272004e-02, & !11 + 1.229321e-02, 1.189350e-02, 1.151915e-02, 1.116859e-02, 1.084042e-02, & !11 + 1.053338e-02, 1.024636e-02, 9.978326e-03, 9.728357e-03, 9.495613e-03, & !11 + 9.279327e-03, 9.078798e-03, 8.893383e-03, 8.722488e-03, 8.565568e-03, & !11 + 8.422115e-03, & !11 + 9.465447e-02, 6.432047e-02, 5.060973e-02, 4.267283e-02, 3.741843e-02, & !12 + 3.363096e-02, 3.073531e-02, 2.842405e-02, 2.651789e-02, 2.490518e-02, & !12 + 2.351273e-02, 2.229056e-02, 2.120335e-02, 2.022541e-02, 1.933763e-02, & !12 + 1.852546e-02, 1.777763e-02, 1.708528e-02, 1.644134e-02, 1.584009e-02, & !12 + 1.527684e-02, 1.474774e-02, 1.424955e-02, 1.377957e-02, 1.333549e-02, & !12 + 1.291534e-02, 1.251743e-02, 1.214029e-02, 1.178265e-02, 1.144337e-02, & !12 + 1.112148e-02, 1.081609e-02, 1.052642e-02, 1.025178e-02, 9.991540e-03, & !12 + 9.745130e-03, 9.512038e-03, 9.291797e-03, 9.083980e-03, 8.888195e-03, & !12 + 8.704081e-03, 8.531306e-03, 8.369560e-03, 8.218558e-03, 8.078032e-03, & !12 + 7.947730e-03, & !12 + 1.560311e-01, 9.961097e-02, 7.502949e-02, 6.115022e-02, 5.214952e-02, & !13 + 4.578149e-02, 4.099731e-02, 3.724174e-02, 3.419343e-02, 3.165356e-02, & !13 + 2.949251e-02, 2.762222e-02, 2.598073e-02, 2.452322e-02, 2.321642e-02, & !13 + 2.203516e-02, 2.096002e-02, 1.997579e-02, 1.907036e-02, 1.823401e-02, & !13 + 1.745879e-02, 1.673819e-02, 1.606678e-02, 1.544003e-02, 1.485411e-02, & !13 + 1.430574e-02, 1.379215e-02, 1.331092e-02, 1.285996e-02, 1.243746e-02, & !13 + 1.204183e-02, 1.167164e-02, 1.132567e-02, 1.100281e-02, 1.070207e-02, & !13 + 1.042258e-02, 1.016352e-02, 9.924197e-03, 9.703953e-03, 9.502199e-03, & !13 + 9.318400e-03, 9.152066e-03, 9.002749e-03, 8.870038e-03, 8.753555e-03, & !13 + 8.652951e-03, & !13 + 1.559547e-01, 9.896700e-02, 7.441231e-02, 6.061469e-02, 5.168730e-02, & !14 + 4.537821e-02, 4.064106e-02, 3.692367e-02, 3.390714e-02, 3.139438e-02, & !14 + 2.925702e-02, 2.740783e-02, 2.578547e-02, 2.434552e-02, 2.305506e-02, & !14 + 2.188910e-02, 2.082842e-02, 1.985789e-02, 1.896553e-02, 1.814165e-02, & !14 + 1.737839e-02, 1.666927e-02, 1.600891e-02, 1.539279e-02, 1.481712e-02, & !14 + 1.427865e-02, 1.377463e-02, 1.330266e-02, 1.286068e-02, 1.244689e-02, & !14 + 1.205973e-02, 1.169780e-02, 1.135989e-02, 1.104492e-02, 1.075192e-02, & !14 + 1.048004e-02, 1.022850e-02, 9.996611e-03, 9.783753e-03, 9.589361e-03, & !14 + 9.412924e-03, 9.253977e-03, 9.112098e-03, 8.986903e-03, 8.878039e-03, & !14 + 8.785184e-03, & !14 + 1.102926e-01, 7.176622e-02, 5.530316e-02, 4.606056e-02, 4.006116e-02, & !15 + 3.579628e-02, 3.256909e-02, 3.001360e-02, 2.791920e-02, 2.615617e-02, & !15 + 2.464023e-02, 2.331426e-02, 2.213817e-02, 2.108301e-02, 2.012733e-02, & !15 + 1.925493e-02, 1.845331e-02, 1.771269e-02, 1.702531e-02, 1.638493e-02, & !15 + 1.578648e-02, 1.522579e-02, 1.469940e-02, 1.420442e-02, 1.373841e-02, & !15 + 1.329931e-02, 1.288535e-02, 1.249502e-02, 1.212700e-02, 1.178015e-02, & !15 + 1.145348e-02, 1.114612e-02, 1.085730e-02, 1.058633e-02, 1.033263e-02, & !15 + 1.009564e-02, 9.874895e-03, 9.669960e-03, 9.480449e-03, 9.306014e-03, & !15 + 9.146339e-03, 9.001138e-03, 8.870154e-03, 8.753148e-03, 8.649907e-03, & !15 + 8.560232e-03, & !15 + 1.688344e-01, 1.077072e-01, 7.994467e-02, 6.403862e-02, 5.369850e-02, & !16 + 4.641582e-02, 4.099331e-02, 3.678724e-02, 3.342069e-02, 3.065831e-02, & !16 + 2.834557e-02, 2.637680e-02, 2.467733e-02, 2.319286e-02, 2.188299e-02, & !16 + 2.071701e-02, 1.967121e-02, 1.872692e-02, 1.786931e-02, 1.708641e-02, & !16 + 1.636846e-02, 1.570743e-02, 1.509665e-02, 1.453052e-02, 1.400433e-02, & !16 + 1.351407e-02, 1.305631e-02, 1.262810e-02, 1.222688e-02, 1.185044e-02, & !16 + 1.149683e-02, 1.116436e-02, 1.085153e-02, 1.055701e-02, 1.027961e-02, & !16 + 1.001831e-02, 9.772141e-03, 9.540280e-03, 9.321966e-03, 9.116517e-03, & !16 + 8.923315e-03, 8.741803e-03, 8.571472e-03, 8.411860e-03, 8.262543e-03, & !16 + 8.123136e-03/), & !16 shape=(/46,nBandsLW_RRTMG/)) contains ! ####################################################################################### @@ -578,84 +578,83 @@ subroutine rrtmgp_lw_cloud_optics(ncol, nlay, nBandsLW, cld_lwp, cld_ref_liq, cl ! Local variables integer :: ij,ik,ib,index,ia - real(kind_phys) :: factor,fint,cld_ref_iceTemp - real(kind_phys),dimension(ncol,nlay) :: tau_snow, tau_rain - real(kind_phys),dimension(nBandsLW,ncol,nlay) :: tau_liq, tau_ice + real(kind_phys) :: factor,fint,cld_ref_iceTemp,tau_snow, tau_rain + real(kind_phys),dimension(nBandsLW) :: tau_liq, tau_ice if (ilwcliq .gt. 0) then do ij=1,ncol do ik=1,nlay - if (cld_frac(ij,ik) .gt. 0._kind_phys) then + if (cld_frac(ij,ik) .gt. 0.) then ! Rain optical-depth (No band dependence) - tau_rain(ij,ik) = absrain*cld_rwp(ij,ik) + tau_rain = absrain*cld_rwp(ij,ik) ! Snow optical-depth (No band dependence) - if (cld_swp(ij,ik) .gt. 0._kind_phys .and. cld_ref_snow(ij,ik) .gt. 10._kind_phys) then - tau_snow(ij,ik) = abssnow0*1.05756*cld_swp(ij,ik)/cld_ref_snow(ij,ik) + if (cld_swp(ij,ik) .gt. 0. .and. cld_ref_snow(ij,ik) .gt. 10._kind_phys) then + tau_snow = abssnow0*1.05756*cld_swp(ij,ik)/cld_ref_snow(ij,ik) else - tau_snow(ij,ik) = 0._kind_phys + tau_snow = 0. endif ! Liquid water opitcal-depth - if (cld_lwp(ij,ik) .le. 0._kind_phys) then - tau_liq(:,ij,ik) = 0._kind_phys + if (cld_lwp(ij,ik) .le. 0.) then + tau_liq(:) = 0. else if (ilwcliq .eq. 1) then - factor = cld_ref_liq(ij,ik) - 1.5_kind_phys + factor = cld_ref_liq(ij,ik) - 1.5 index = max( 1, min( 57, int( factor ) )) fint = factor - float(index) do ib=1,nBandsLW - tau_liq(ib,ij,ik) = max(0._kind_phys, cld_lwp(ij,ik)*(absliq1(index,ib) + & + tau_liq(ib) = max(0., cld_lwp(ij,ik)*(absliq1(index,ib) + & fint*(absliq1(index+1,ib)-absliq1(index,ib)) )) enddo endif endif ! Ice water optical-depth - if (cld_iwp(ij,ik) .le. 0._kind_phys) then - tau_ice(:,ij,ik) = 0._kind_phys + if (cld_iwp(ij,ik) .le. 0.) then + tau_ice(:) = 0. else ! 1) Ebert and curry approach for all particle sizes. (bound between 13-130microns) if (ilwcice .eq. 1) then - cld_ref_iceTemp = min(130._kind_phys, max(13._kind_phys,real(cld_ref_ice(ij,ik)))) + cld_ref_iceTemp = min(130., max(13.,real(cld_ref_ice(ij,ik)))) do ib=1,nBandsLW ia = ipat(ib) ! eb_&_c band index for ice cloud coeff - tau_ice(ib,ij,ik) = max(0._kind_phys, cld_iwp(ij,ik)*(absice1(1,ia) + absice1(2,ia)/cld_ref_iceTemp) ) + tau_ice(ib) = max(0., cld_iwp(ij,ik)*(absice1(1,ia) + absice1(2,ia)/cld_ref_iceTemp) ) enddo ! 2) Streamer approach for ice effective radius between 5.0 and 131.0 microns ! and ebert and curry approach for ice eff radius greater than 131.0 microns. ! no smoothing between the transition of the two methods elseif (ilwcice .eq. 2) then - factor = (cld_ref_ice(ij,ik) - 2._kind_phys) / 3._kind_phys + factor = (cld_ref_ice(ij,ik) - 2.) / 3. index = max( 1, min( 42, int( factor ) )) fint = factor - float(index) do ib = 1, nBandsLW - tau_ice(ib,ij,ik) = max(0._kind_phys, cld_iwp(ij,ik)*(absice2(index,ib) + & + tau_ice(ib) = max(0., cld_iwp(ij,ik)*(absice2(index,ib) + & fint*(absice2(index+1,ib) - absice2(index,ib)) )) enddo ! 3) Fu's approach for ice effective radius between 4.8 and 135 microns ! (generalized effective size from 5 to 140 microns) elseif (ilwcice .eq. 3) then - cld_ref_iceTemp = max(5._kind_phys, 1.0315_kind_phys*cld_ref_ice(ij,ik)) ! v4.71 value - factor = (cld_ref_iceTemp - 2._kind_phys) / 3._kind_phys + cld_ref_iceTemp = max(5., 1.0315*cld_ref_ice(ij,ik)) ! v4.71 value + factor = (cld_ref_iceTemp - 2.) / 3. index = max( 1, min( 45, int( factor ) )) fint = factor - float(index) do ib = 1, nBandsLW - tau_ice(ib,ij,ik) = max(0._kind_phys, cld_iwp(ij,ik)*(absice3(index,ib) + & + tau_ice(ib) = max(0., cld_iwp(ij,ik)*(absice3(index,ib) + & fint*(absice3(index+1,ib) - absice3(index,ib)) )) enddo endif endif else - tau_rain(ij,ik) = 0._kind_phys - tau_snow(ij,ik) = 0._kind_phys - tau_liq(:,ij,ik) = 0._kind_phys - tau_ice(:,ij,ik) = 0._kind_phys + tau_rain = 0. + tau_snow = 0. + tau_liq(:) = 0. + tau_ice(:) = 0. endif ! Cloud optical depth do ib = 1, nBandsLW - tau_cld(ib,ij,ik) = tau_ice(ib,ij,ik) + tau_liq(ib,ij,ik) + tau_rain(ij,ik) + tau_snow(ij,ik) + tau_cld(ib,ij,ik) = tau_ice(ib) + tau_liq(ib) + tau_rain + tau_snow enddo end do end do diff --git a/physics/rrtmgp_lw_main.F90 b/physics/rrtmgp_lw_main.F90 index ba954b1e3..691ddd74f 100644 --- a/physics/rrtmgp_lw_main.F90 +++ b/physics/rrtmgp_lw_main.F90 @@ -1,21 +1,22 @@ ! ########################################################################################### ! ########################################################################################### module rrtmgp_lw - use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp - use mo_gas_concentrations, only: ty_gas_concs - use mo_fluxes, only: ty_fluxes_broadband - use mo_optical_props, only: ty_optical_props_1scl,ty_optical_props_2str - use mo_source_functions, only: ty_source_func_lw - use mo_rte_lw, only: rte_lw - use mo_rte_kind, only: wl - use mo_heating_rates, only: compute_heating_rate - use mo_cloud_optics, only: ty_cloud_optics - use machine, only: kind_phys - use module_radlw_parameters, only: topflw_type, sfcflw_type, proflw_type - use physparam, only: ilwcliq,isubclw - use GFS_typedefs, only: GFS_control_type - use mo_rrtmgp_constants, only: grav, avogad - use mo_rrtmgp_lw_cloud_optics + use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp + use mo_gas_concentrations, only: ty_gas_concs + use mo_fluxes, only: ty_fluxes_broadband + use mo_optical_props, only: ty_optical_props_1scl,ty_optical_props_2str + use mo_source_functions, only: ty_source_func_lw + use mo_rte_lw, only: rte_lw + use mo_rte_kind, only: wl + use mo_heating_rates, only: compute_heating_rate + use mo_cloud_optics, only: ty_cloud_optics + use machine, only: kind_phys + use module_radlw_parameters, only: topflw_type, sfcflw_type, proflw_type + use physparam, only: ilwcliq,isubclw,iovrlw,ilwrgas,icldflg,ilwrate + use GFS_typedefs, only: GFS_control_type + use mo_rrtmgp_constants, only: grav, avogad + use mo_rrtmgp_lw_cloud_optics, only: rrtmgp_lw_cloud_optics, diffusivityB1410,diffusivityHigh, & + diffusivityLow, a0, a1, a2, cldmin, absrain, abssnow0, mcica_subcol_lw implicit none ! Parameters @@ -195,53 +196,82 @@ subroutine rrtmgp_lw_init(Model,mpicomm, mpirank, mpiroot, errmsg, errflg) npairsLWcldy ! used by RRTGMP cloud optics ! Local variables - integer :: ncid,dimID,varID,status,igpt,iGas,ij,ierr + integer :: ncid_lw,dimID,varID,status,igpt,iGas,ij,ierr,ncid_lw_clds integer,dimension(:),allocatable :: temp1,temp2,temp3,temp4,temp_log_array1,& temp_log_array2, temp_log_array3, temp_log_array4 character(len=264) :: kdist_file,kdist_cldy_file integer,parameter :: max_strlen=256 + open(59,file='rrtmgp_aux_dump.txt',status='unknown') + open(60,file='rrtmgp_aux_tautot.txt',status='unknown') + open(61,file='rrtmgp_aux_taucld.txt',status='unknown') + + ! Initialize + errmsg = '' + errflg = 0 + + ! Ensure that requested cloud overlap is reasonable. + if ( iovrlw .lt. 0 .or. iovrlw .gt. 3 ) then + print *,' *** Error in specification of cloud overlap flag', & + ' IOVRLW=',iovrlw,' in RLWINIT !!' + stop + elseif ( iovrlw .ge. 2 .and. isubclw .eq. 0 ) then + print *,' *** IOVRLW=',iovrlw,' is not available for', & + ' ISUBCLW=0 setting!!' + print *,' The program uses maximum/random overlap', & + ' instead.' + iovrlw = 1 + endif + + ! Check cloud flags for consistency. + if ((icldflg .eq. 0 .and. ilwcliq .ne. 0) .or. & + (icldflg .eq. 1 .and. ilwcliq .eq. 0)) then + print *,' *** Model cloud scheme inconsistent with LW', & + ' radiation cloud radiative property setup !!' + stop + endif + ! How are we handling cloud-optics? rrtmgp_lw_cld_phys = Model%rrtmgp_lw_cld_phys ! Filenames are set in the gfs_physics_nml (scm/src/GFS_typedefs.F90) - kdist_file = trim(Model%rrtmgp_root)//trim(Model%kdist_file_gas) - kdist_cldy_file = trim(Model%rrtmgp_root)//trim(Model%kdist_file_clouds) + kdist_file = trim(Model%rrtmgp_root)//trim(Model%kdist_lw_file_gas) + kdist_cldy_file = trim(Model%rrtmgp_root)//trim(Model%kdist_lw_file_clouds) ! Read dimensions for k-distribution fields (only on master processor(0)) if (mpirank .eq. mpiroot) then - if(nf90_open(trim(kdist_file), NF90_WRITE, ncid) == NF90_NOERR) then - status = nf90_inq_dimid(ncid, 'temperature', dimid) - status = nf90_inquire_dimension(ncid, dimid, len=ntemps) - status = nf90_inq_dimid(ncid, 'pressure', dimid) - status = nf90_inquire_dimension(ncid, dimid, len=npress) - status = nf90_inq_dimid(ncid, 'absorber', dimid) - status = nf90_inquire_dimension(ncid, dimid, len=nabsorbers) - status = nf90_inq_dimid(ncid, 'minor_absorber', dimid) - status = nf90_inquire_dimension(ncid, dimid, len=nminorabsorbers) - status = nf90_inq_dimid(ncid, 'absorber_ext', dimid) - status = nf90_inquire_dimension(ncid, dimid, len=nextrabsorbers) - status = nf90_inq_dimid(ncid, 'mixing_fraction', dimid) - status = nf90_inquire_dimension(ncid, dimid, len=nmixingfracs) - status = nf90_inq_dimid(ncid, 'atmos_layer', dimid) - status = nf90_inquire_dimension(ncid, dimid, len=nlayers) - status = nf90_inq_dimid(ncid, 'bnd', dimid) - status = nf90_inquire_dimension(ncid, dimid, len=nbnds) - status = nf90_inq_dimid(ncid, 'gpt', dimid) - status = nf90_inquire_dimension(ncid, dimid, len=ngpts) - status = nf90_inq_dimid(ncid, 'pair', dimid) - status = nf90_inquire_dimension(ncid, dimid, len=npairs) - status = nf90_inq_dimid(ncid, 'contributors_lower', dimid) - status = nf90_inquire_dimension(ncid, dimid, len=ncontributors_lower) - status = nf90_inq_dimid(ncid, 'contributors_upper', dimid) - status = nf90_inquire_dimension(ncid, dimid, len=ncontributors_upper) - status = nf90_inq_dimid(ncid, 'minor_absorber_intervals_lower', dimid) - status = nf90_inquire_dimension(ncid, dimid, len=nminor_absorber_intervals_lower) - status = nf90_inq_dimid(ncid, 'minor_absorber_intervals_upper', dimid) - status = nf90_inquire_dimension(ncid, dimid, len=nminor_absorber_intervals_upper) - status = nf90_inq_dimid(ncid, 'temperature_Planck', dimid) - status = nf90_inquire_dimension(ncid, dimid, len=ninternalSourcetemps) - status = nf90_close(ncid) + if(nf90_open(trim(kdist_file), NF90_WRITE, ncid_lw) .eq. NF90_NOERR) then + status = nf90_inq_dimid(ncid_lw, 'temperature', dimid) + status = nf90_inquire_dimension(ncid_lw, dimid, len=ntemps) + status = nf90_inq_dimid(ncid_lw, 'pressure', dimid) + status = nf90_inquire_dimension(ncid_lw, dimid, len=npress) + status = nf90_inq_dimid(ncid_lw, 'absorber', dimid) + status = nf90_inquire_dimension(ncid_lw, dimid, len=nabsorbers) + status = nf90_inq_dimid(ncid_lw, 'minor_absorber', dimid) + status = nf90_inquire_dimension(ncid_lw, dimid, len=nminorabsorbers) + status = nf90_inq_dimid(ncid_lw, 'absorber_ext', dimid) + status = nf90_inquire_dimension(ncid_lw, dimid, len=nextrabsorbers) + status = nf90_inq_dimid(ncid_lw, 'mixing_fraction', dimid) + status = nf90_inquire_dimension(ncid_lw, dimid, len=nmixingfracs) + status = nf90_inq_dimid(ncid_lw, 'atmos_layer', dimid) + status = nf90_inquire_dimension(ncid_lw, dimid, len=nlayers) + status = nf90_inq_dimid(ncid_lw, 'bnd', dimid) + status = nf90_inquire_dimension(ncid_lw, dimid, len=nbnds) + status = nf90_inq_dimid(ncid_lw, 'gpt', dimid) + status = nf90_inquire_dimension(ncid_lw, dimid, len=ngpts) + status = nf90_inq_dimid(ncid_lw, 'pair', dimid) + status = nf90_inquire_dimension(ncid_lw, dimid, len=npairs) + status = nf90_inq_dimid(ncid_lw, 'contributors_lower', dimid) + status = nf90_inquire_dimension(ncid_lw, dimid, len=ncontributors_lower) + status = nf90_inq_dimid(ncid_lw, 'contributors_upper', dimid) + status = nf90_inquire_dimension(ncid_lw, dimid, len=ncontributors_upper) + status = nf90_inq_dimid(ncid_lw, 'minor_absorber_intervals_lower', dimid) + status = nf90_inquire_dimension(ncid_lw, dimid, len=nminor_absorber_intervals_lower) + status = nf90_inq_dimid(ncid_lw, 'minor_absorber_intervals_upper', dimid) + status = nf90_inquire_dimension(ncid_lw, dimid, len=nminor_absorber_intervals_upper) + status = nf90_inq_dimid(ncid_lw, 'temperature_Planck', dimid) + status = nf90_inquire_dimension(ncid_lw, dimid, len=ninternalSourcetemps) + status = nf90_close(ncid_lw) endif endif @@ -299,105 +329,105 @@ subroutine rrtmgp_lw_init(Model,mpicomm, mpirank, mpiroot, errmsg, errflg) allocate(planck_frac(ngpts, nmixingfracs, npress+1, ntemps)) ! Read in fields from file - if(nf90_open(trim(kdist_file), NF90_WRITE, ncid) == NF90_NOERR) then - status = nf90_inq_varid(ncid,'gas_names',varID) - status = nf90_get_var(ncid,varID,gas_names) + if(nf90_open(trim(kdist_file), NF90_WRITE, ncid_lw) .eq. NF90_NOERR) then + status = nf90_inq_varid(ncid_lw,'gas_names',varID) + status = nf90_get_var(ncid_lw,varID,gas_names) ! - status = nf90_inq_varid(ncid,'scaling_gas_lower',varID) - status = nf90_get_var(ncid,varID,scaling_gas_lower) + status = nf90_inq_varid(ncid_lw,'scaling_gas_lower',varID) + status = nf90_get_var(ncid_lw,varID,scaling_gas_lower) ! - status = nf90_inq_varid(ncid,'scaling_gas_upper',varID) - status = nf90_get_var(ncid,varID,scaling_gas_upper) + status = nf90_inq_varid(ncid_lw,'scaling_gas_upper',varID) + status = nf90_get_var(ncid_lw,varID,scaling_gas_upper) ! - status = nf90_inq_varid(ncid,'gas_minor',varID) - status = nf90_get_var(ncid,varID,gas_minor) + status = nf90_inq_varid(ncid_lw,'gas_minor',varID) + status = nf90_get_var(ncid_lw,varID,gas_minor) ! - status = nf90_inq_varid(ncid,'identifier_minor',varID) - status = nf90_get_var(ncid,varID,identifier_minor) + status = nf90_inq_varid(ncid_lw,'identifier_minor',varID) + status = nf90_get_var(ncid_lw,varID,identifier_minor) ! - status = nf90_inq_varid(ncid,'minor_gases_lower',varID) - status = nf90_get_var(ncid,varID,minor_gases_lower) + status = nf90_inq_varid(ncid_lw,'minor_gases_lower',varID) + status = nf90_get_var(ncid_lw,varID,minor_gases_lower) ! - status = nf90_inq_varid(ncid,'minor_gases_upper',varID) - status = nf90_get_var(ncid,varID,minor_gases_upper) + status = nf90_inq_varid(ncid_lw,'minor_gases_upper',varID) + status = nf90_get_var(ncid_lw,varID,minor_gases_upper) ! - status = nf90_inq_varid(ncid,'minor_limits_gpt_lower',varID) - status = nf90_get_var(ncid,varID,minor_limits_gpt_lower) + status = nf90_inq_varid(ncid_lw,'minor_limits_gpt_lower',varID) + status = nf90_get_var(ncid_lw,varID,minor_limits_gpt_lower) ! - status = nf90_inq_varid(ncid,'minor_limits_gpt_upper',varID) - status = nf90_get_var(ncid,varID,minor_limits_gpt_upper) + status = nf90_inq_varid(ncid_lw,'minor_limits_gpt_upper',varID) + status = nf90_get_var(ncid_lw,varID,minor_limits_gpt_upper) ! - status = nf90_inq_varid(ncid,'bnd_limits_gpt',varID) - status = nf90_get_var(ncid,varID,band2gpt) + status = nf90_inq_varid(ncid_lw,'bnd_limits_gpt',varID) + status = nf90_get_var(ncid_lw,varID,band2gpt) ! - status = nf90_inq_varid(ncid,'key_species',varID) - status = nf90_get_var(ncid,varID,key_species) + status = nf90_inq_varid(ncid_lw,'key_species',varID) + status = nf90_get_var(ncid_lw,varID,key_species) ! - status = nf90_inq_varid(ncid,'bnd_limits_wavenumber',varID) - status = nf90_get_var(ncid,varID,band_lims) + status = nf90_inq_varid(ncid_lw,'bnd_limits_wavenumber',varID) + status = nf90_get_var(ncid_lw,varID,band_lims) ! - status = nf90_inq_varid(ncid,'press_ref',varID) - status = nf90_get_var(ncid,varID,press_ref) + status = nf90_inq_varid(ncid_lw,'press_ref',varID) + status = nf90_get_var(ncid_lw,varID,press_ref) ! - status = nf90_inq_varid(ncid,'temp_ref',varID) - status = nf90_get_var(ncid,varID,temp_ref) + status = nf90_inq_varid(ncid_lw,'temp_ref',varID) + status = nf90_get_var(ncid_lw,varID,temp_ref) ! - status = nf90_inq_varid(ncid,'absorption_coefficient_ref_P',varID) - status = nf90_get_var(ncid,varID,temp_ref_p) + status = nf90_inq_varid(ncid_lw,'absorption_coefficient_ref_P',varID) + status = nf90_get_var(ncid_lw,varID,temp_ref_p) ! - status = nf90_inq_varid(ncid,'absorption_coefficient_ref_T',varID) - status = nf90_get_var(ncid,varID,temp_ref_t) + status = nf90_inq_varid(ncid_lw,'absorption_coefficient_ref_T',varID) + status = nf90_get_var(ncid_lw,varID,temp_ref_t) ! - status = nf90_inq_varid(ncid,'press_ref_trop',varID) - status = nf90_get_var(ncid,varID,press_ref_trop) + status = nf90_inq_varid(ncid_lw,'press_ref_trop',varID) + status = nf90_get_var(ncid_lw,varID,press_ref_trop) ! - status = nf90_inq_varid(ncid,'kminor_lower',varID) - status = nf90_get_var(ncid,varID,kminor_lower) + status = nf90_inq_varid(ncid_lw,'kminor_lower',varID) + status = nf90_get_var(ncid_lw,varID,kminor_lower) ! - status = nf90_inq_varid(ncid,'kminor_upper',varID) - status = nf90_get_var(ncid,varID,kminor_upper) + status = nf90_inq_varid(ncid_lw,'kminor_upper',varID) + status = nf90_get_var(ncid_lw,varID,kminor_upper) ! - status = nf90_inq_varid(ncid,'vmr_ref',varID) - status = nf90_get_var(ncid,varID,vmr_ref) + status = nf90_inq_varid(ncid_lw,'vmr_ref',varID) + status = nf90_get_var(ncid_lw,varID,vmr_ref) ! - status = nf90_inq_varid(ncid,'kmajor',varID) - status = nf90_get_var(ncid,varID,kmajor) + status = nf90_inq_varid(ncid_lw,'kmajor',varID) + status = nf90_get_var(ncid_lw,varID,kmajor) ! - status = nf90_inq_varid(ncid,'kminor_start_lower',varID) - status = nf90_get_var(ncid,varID,kminor_start_lower) + status = nf90_inq_varid(ncid_lw,'kminor_start_lower',varID) + status = nf90_get_var(ncid_lw,varID,kminor_start_lower) ! - status = nf90_inq_varid(ncid,'kminor_start_upper',varID) - status = nf90_get_var(ncid,varID,kminor_start_upper) + status = nf90_inq_varid(ncid_lw,'kminor_start_upper',varID) + status = nf90_get_var(ncid_lw,varID,kminor_start_upper) ! - status = nf90_inq_varid(ncid,'totplnk',varID) - status = nf90_get_var(ncid,varID,totplnk) + status = nf90_inq_varid(ncid_lw,'totplnk',varID) + status = nf90_get_var(ncid_lw,varID,totplnk) ! - status = nf90_inq_varid(ncid,'plank_fraction',varID) - status = nf90_get_var(ncid,varID,planck_frac) + status = nf90_inq_varid(ncid_lw,'plank_fraction',varID) + status = nf90_get_var(ncid_lw,varID,planck_frac) ! Logical fields are read in as integers and then converted to logicals. - status = nf90_inq_varid(ncid,'minor_scales_with_density_lower',varID) - status = nf90_get_var(ncid,varID,temp1) + status = nf90_inq_varid(ncid_lw,'minor_scales_with_density_lower',varID) + status = nf90_get_var(ncid_lw,varID,temp1) minor_scales_with_density_lower(:) = .false. where(temp1 .eq. 1) minor_scales_with_density_lower(:) = .true. ! - status = nf90_inq_varid(ncid,'minor_scales_with_density_upper',varID) - status = nf90_get_var(ncid,varID,temp2) + status = nf90_inq_varid(ncid_lw,'minor_scales_with_density_upper',varID) + status = nf90_get_var(ncid_lw,varID,temp2) minor_scales_with_density_upper(:) = .false. where(temp2 .eq. 1) minor_scales_with_density_upper(:) = .true. ! - status = nf90_inq_varid(ncid,'scale_by_complement_lower',varID) - status = nf90_get_var(ncid,varID,temp3) + status = nf90_inq_varid(ncid_lw,'scale_by_complement_lower',varID) + status = nf90_get_var(ncid_lw,varID,temp3) scale_by_complement_lower(:) = .false. where(temp3 .eq. 1) scale_by_complement_lower(:) = .true. ! - status = nf90_inq_varid(ncid,'scale_by_complement_upper',varID) - status = nf90_get_var(ncid,varID,temp4) + status = nf90_inq_varid(ncid_lw,'scale_by_complement_upper',varID) + status = nf90_get_var(ncid_lw,varID,temp4) scale_by_complement_upper(:) = .false. where(temp4 .eq. 1) scale_by_complement_upper(:) = .true. ! Close - status = nf90_close(ncid) + status = nf90_close(ncid_lw) endif endif @@ -499,26 +529,26 @@ subroutine rrtmgp_lw_init(Model,mpicomm, mpirank, mpiroot, errmsg, errflg) ! ####################################################################################### ! Read dimensions for k-distribution fields (only on master processor(0)) if (mpirank .eq. mpiroot) then - if(nf90_open(trim(kdist_cldy_file), NF90_WRITE, ncid) == NF90_NOERR) then - status = nf90_inq_dimid(ncid, 'nband', dimid) - status = nf90_inquire_dimension(ncid, dimid, len=nbandLWcldy) - status = nf90_inq_dimid(ncid, 'nrghice', dimid) - status = nf90_inquire_dimension(ncid, dimid, len=nrghice) - status = nf90_inq_dimid(ncid, 'nsize_liq', dimid) - status = nf90_inquire_dimension(ncid, dimid, len=nsize_liq) - status = nf90_inq_dimid(ncid, 'nsize_ice', dimid) - status = nf90_inquire_dimension(ncid, dimid, len=nsize_ice) - status = nf90_inq_dimid(ncid, 'nsizereg', dimid) - status = nf90_inquire_dimension(ncid, dimid, len=nsizereg) - status = nf90_inq_dimid(ncid, 'ncoeff_ext', dimid) - status = nf90_inquire_dimension(ncid, dimid, len=ncoeff_ext) - status = nf90_inq_dimid(ncid, 'ncoeff_ssa_g', dimid) - status = nf90_inquire_dimension(ncid, dimid, len=ncoeff_ssa_g) - status = nf90_inq_dimid(ncid, 'nbound', dimid) - status = nf90_inquire_dimension(ncid, dimid, len=nbound) - status = nf90_inq_dimid(ncid, 'pair', dimid) - status = nf90_inquire_dimension(ncid, dimid, len=npairsLWcldy) - status = nf90_close(ncid) + if(nf90_open(trim(kdist_cldy_file), NF90_WRITE, ncid_lw_clds) == NF90_NOERR) then + status = nf90_inq_dimid(ncid_lw_clds, 'nband', dimid) + status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=nbandLWcldy) + status = nf90_inq_dimid(ncid_lw_clds, 'nrghice', dimid) + status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=nrghice) + status = nf90_inq_dimid(ncid_lw_clds, 'nsize_liq', dimid) + status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=nsize_liq) + status = nf90_inq_dimid(ncid_lw_clds, 'nsize_ice', dimid) + status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=nsize_ice) + status = nf90_inq_dimid(ncid_lw_clds, 'nsizereg', dimid) + status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=nsizereg) + status = nf90_inq_dimid(ncid_lw_clds, 'ncoeff_ext', dimid) + status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=ncoeff_ext) + status = nf90_inq_dimid(ncid_lw_clds, 'ncoeff_ssa_g', dimid) + status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=ncoeff_ssa_g) + status = nf90_inq_dimid(ncid_lw_clds, 'nbound', dimid) + status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=nbound) + status = nf90_inq_dimid(ncid_lw_clds, 'pair', dimid) + status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=npairsLWcldy) + status = nf90_close(ncid_lw_clds) endif endif @@ -549,33 +579,34 @@ subroutine rrtmgp_lw_init(Model,mpicomm, mpirank, mpiroot, errmsg, errflg) allocate(lut_asyice(nsize_ice, nBandLWcldy, nrghice)) allocate(band_lims_cldy(2, nBandLWcldy)) ! - if(nf90_open(trim(kdist_cldy_file), NF90_WRITE, ncid) == NF90_NOERR) then - status = nf90_inq_varid(ncid,'radliq_lwr',varID) - status = nf90_get_var(ncid,varID,radliq_lwr) - status = nf90_inq_varid(ncid,'radliq_upr',varID) - status = nf90_get_var(ncid,varID,radliq_upr) - status = nf90_inq_varid(ncid,'radliq_fac',varID) - status = nf90_get_var(ncid,varID,radliq_fac) - status = nf90_inq_varid(ncid,'radice_lwr',varID) - status = nf90_get_var(ncid,varID,radice_lwr) - status = nf90_inq_varid(ncid,'radice_upr',varID) - status = nf90_get_var(ncid,varID,radice_upr) - status = nf90_inq_varid(ncid,'radice_fac',varID) - status = nf90_get_var(ncid,varID,radice_fac) - status = nf90_inq_varid(ncid,'lut_extliq',varID) - status = nf90_get_var(ncid,varID,lut_extliq) - status = nf90_inq_varid(ncid,'lut_ssaliq',varID) - status = nf90_get_var(ncid,varID,lut_ssaliq) - status = nf90_inq_varid(ncid,'lut_asyliq',varID) - status = nf90_get_var(ncid,varID,lut_asyliq) - status = nf90_inq_varid(ncid,'lut_extice',varID) - status = nf90_get_var(ncid,varID,lut_extice) - status = nf90_inq_varid(ncid,'lut_ssaice',varID) - status = nf90_get_var(ncid,varID,lut_ssaice) - status = nf90_inq_varid(ncid,'lut_asyice',varID) - status = nf90_get_var(ncid,varID,lut_asyice) - status = nf90_inq_varid(ncid,'bnd_limits_wavenumber',varID) - status = nf90_get_var(ncid,varID,band_lims_cldy) + if(nf90_open(trim(kdist_cldy_file), NF90_WRITE, ncid_lw_clds) == NF90_NOERR) then + status = nf90_inq_varid(ncid_lw_clds,'radliq_lwr',varID) + status = nf90_get_var(ncid_lw_clds,varID,radliq_lwr) + status = nf90_inq_varid(ncid_lw_clds,'radliq_upr',varID) + status = nf90_get_var(ncid_lw_clds,varID,radliq_upr) + status = nf90_inq_varid(ncid_lw_clds,'radliq_fac',varID) + status = nf90_get_var(ncid_lw_clds,varID,radliq_fac) + status = nf90_inq_varid(ncid_lw_clds,'radice_lwr',varID) + status = nf90_get_var(ncid_lw_clds,varID,radice_lwr) + status = nf90_inq_varid(ncid_lw_clds,'radice_upr',varID) + status = nf90_get_var(ncid_lw_clds,varID,radice_upr) + status = nf90_inq_varid(ncid_lw_clds,'radice_fac',varID) + status = nf90_get_var(ncid_lw_clds,varID,radice_fac) + status = nf90_inq_varid(ncid_lw_clds,'lut_extliq',varID) + status = nf90_get_var(ncid_lw_clds,varID,lut_extliq) + status = nf90_inq_varid(ncid_lw_clds,'lut_ssaliq',varID) + status = nf90_get_var(ncid_lw_clds,varID,lut_ssaliq) + status = nf90_inq_varid(ncid_lw_clds,'lut_asyliq',varID) + status = nf90_get_var(ncid_lw_clds,varID,lut_asyliq) + status = nf90_inq_varid(ncid_lw_clds,'lut_extice',varID) + status = nf90_get_var(ncid_lw_clds,varID,lut_extice) + status = nf90_inq_varid(ncid_lw_clds,'lut_ssaice',varID) + status = nf90_get_var(ncid_lw_clds,varID,lut_ssaice) + status = nf90_inq_varid(ncid_lw_clds,'lut_asyice',varID) + status = nf90_get_var(ncid_lw_clds,varID,lut_asyice) + status = nf90_inq_varid(ncid_lw_clds,'bnd_limits_wavenumber',varID) + status = nf90_get_var(ncid_lw_clds,varID,band_lims_cldy) + status = nf90_close(ncid_lw_clds) endif endif ! @@ -594,45 +625,46 @@ subroutine rrtmgp_lw_init(Model,mpicomm, mpirank, mpiroot, errmsg, errflg) allocate(pade_sizereg_asyice(nbound)) allocate(band_lims_cldy(2,nbandLWcldy)) ! - if(nf90_open(trim(kdist_cldy_file), NF90_WRITE, ncid) == NF90_NOERR) then - status = nf90_inq_varid(ncid,'radliq_lwr',varID) - status = nf90_get_var(ncid,varID,radliq_lwr) - status = nf90_inq_varid(ncid,'radliq_upr',varID) - status = nf90_get_var(ncid,varID,radliq_upr) - status = nf90_inq_varid(ncid,'radliq_fac',varID) - status = nf90_get_var(ncid,varID,radliq_fac) - status = nf90_inq_varid(ncid,'radice_lwr',varID) - status = nf90_get_var(ncid,varID,radice_lwr) - status = nf90_inq_varid(ncid,'radice_upr',varID) - status = nf90_get_var(ncid,varID,radice_upr) - status = nf90_inq_varid(ncid,'radice_fac',varID) - status = nf90_get_var(ncid,varID,radice_fac) - status = nf90_inq_varid(ncid,'pade_extliq',varID) - status = nf90_get_var(ncid,varID,pade_extliq) - status = nf90_inq_varid(ncid,'pade_ssaliq',varID) - status = nf90_get_var(ncid,varID,pade_ssaliq) - status = nf90_inq_varid(ncid,'pade_asyliq',varID) - status = nf90_get_var(ncid,varID,pade_asyliq) - status = nf90_inq_varid(ncid,'pade_extice',varID) - status = nf90_get_var(ncid,varID,pade_extice) - status = nf90_inq_varid(ncid,'pade_ssaice',varID) - status = nf90_get_var(ncid,varID,pade_ssaice) - status = nf90_inq_varid(ncid,'pade_asyice',varID) - status = nf90_get_var(ncid,varID,pade_asyice) - status = nf90_inq_varid(ncid,'pade_sizereg_extliq',varID) - status = nf90_get_var(ncid,varID,pade_sizereg_extliq) - status = nf90_inq_varid(ncid,'pade_sizereg_ssaliq',varID) - status = nf90_get_var(ncid,varID,pade_sizereg_ssaliq) - status = nf90_inq_varid(ncid,'pade_sizereg_asyliq',varID) - status = nf90_get_var(ncid,varID,pade_sizereg_asyliq) - status = nf90_inq_varid(ncid,'pade_sizereg_extice',varID) - status = nf90_get_var(ncid,varID,pade_sizereg_extice) - status = nf90_inq_varid(ncid,'pade_sizereg_ssaice',varID) - status = nf90_get_var(ncid,varID,pade_sizereg_ssaice) - status = nf90_inq_varid(ncid,'pade_sizereg_asyice',varID) - status = nf90_get_var(ncid,varID,pade_sizereg_asyice) - status = nf90_inq_varid(ncid,'bnd_limits_wavenumber',varID) - status = nf90_get_var(ncid,varID,band_lims_cldy) + if(nf90_open(trim(kdist_cldy_file), NF90_WRITE, ncid_lw_clds) == NF90_NOERR) then + status = nf90_inq_varid(ncid_lw_clds,'radliq_lwr',varID) + status = nf90_get_var(ncid_lw_clds,varID,radliq_lwr) + status = nf90_inq_varid(ncid_lw_clds,'radliq_upr',varID) + status = nf90_get_var(ncid_lw_clds,varID,radliq_upr) + status = nf90_inq_varid(ncid_lw_clds,'radliq_fac',varID) + status = nf90_get_var(ncid_lw_clds,varID,radliq_fac) + status = nf90_inq_varid(ncid_lw_clds,'radice_lwr',varID) + status = nf90_get_var(ncid_lw_clds,varID,radice_lwr) + status = nf90_inq_varid(ncid_lw_clds,'radice_upr',varID) + status = nf90_get_var(ncid_lw_clds,varID,radice_upr) + status = nf90_inq_varid(ncid_lw_clds,'radice_fac',varID) + status = nf90_get_var(ncid_lw_clds,varID,radice_fac) + status = nf90_inq_varid(ncid_lw_clds,'pade_extliq',varID) + status = nf90_get_var(ncid_lw_clds,varID,pade_extliq) + status = nf90_inq_varid(ncid_lw_clds,'pade_ssaliq',varID) + status = nf90_get_var(ncid_lw_clds,varID,pade_ssaliq) + status = nf90_inq_varid(ncid_lw_clds,'pade_asyliq',varID) + status = nf90_get_var(ncid_lw_clds,varID,pade_asyliq) + status = nf90_inq_varid(ncid_lw_clds,'pade_extice',varID) + status = nf90_get_var(ncid_lw_clds,varID,pade_extice) + status = nf90_inq_varid(ncid_lw_clds,'pade_ssaice',varID) + status = nf90_get_var(ncid_lw_clds,varID,pade_ssaice) + status = nf90_inq_varid(ncid_lw_clds,'pade_asyice',varID) + status = nf90_get_var(ncid_lw_clds,varID,pade_asyice) + status = nf90_inq_varid(ncid_lw_clds,'pade_sizereg_extliq',varID) + status = nf90_get_var(ncid_lw_clds,varID,pade_sizereg_extliq) + status = nf90_inq_varid(ncid_lw_clds,'pade_sizereg_ssaliq',varID) + status = nf90_get_var(ncid_lw_clds,varID,pade_sizereg_ssaliq) + status = nf90_inq_varid(ncid_lw_clds,'pade_sizereg_asyliq',varID) + status = nf90_get_var(ncid_lw_clds,varID,pade_sizereg_asyliq) + status = nf90_inq_varid(ncid_lw_clds,'pade_sizereg_extice',varID) + status = nf90_get_var(ncid_lw_clds,varID,pade_sizereg_extice) + status = nf90_inq_varid(ncid_lw_clds,'pade_sizereg_ssaice',varID) + status = nf90_get_var(ncid_lw_clds,varID,pade_sizereg_ssaice) + status = nf90_inq_varid(ncid_lw_clds,'pade_sizereg_asyice',varID) + status = nf90_get_var(ncid_lw_clds,varID,pade_sizereg_asyice) + status = nf90_inq_varid(ncid_lw_clds,'bnd_limits_wavenumber',varID) + status = nf90_get_var(ncid_lw_clds,varID,band_lims_cldy) + status = nf90_close(ncid_lw_clds) endif endif endif @@ -731,8 +763,6 @@ end subroutine rrtmgp_lw_init !! | topflx | lw_fluxes_top_atmosphere | longwave total sky fluxes at the top of the atm | W m-2 | 1 | topflw_type | | inout | F | !! | sfcflx | lw_fluxes_sfc | longwave total sky fluxes at the Earth surface | W m-2 | 1 | sfcflw_type | | inout | F | !! | cldtau | cloud_optical_depth_layers_at_10mu_band | approx 10mu band layer cloud optical depth | none | 2 | real | kind_phys | inout | F | -!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | -!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | !! | hlw0 | tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_time_step | longwave clear sky heating rate | K s-1 | 2 | real | kind_phys | inout | T | !! | hlwb | lw_heating_rate_spectral | longwave total sky heating rate (spectral) | K s-1 | 3 | real | kind_phys | inout | T | !! | flxprf | lw_fluxes | lw fluxes total sky / csk and up / down at levels | W m-2 | 2 | proflw_type | | inout | T | @@ -745,15 +775,17 @@ end subroutine rrtmgp_lw_init !! | cld_swp | cloud_snow_water_path | cloud snow water path | g m-2 | 2 | real | kind_phys | in | T | !! | cld_ref_snow | mean_effective_radius_for_snow_flake | mean effective radius for snow flake | micron | 2 | real | kind_phys | in | T | !! | cld_od | cloud_optical_depth | cloud optical depth | none | 2 | real | kind_phys | in | T | +!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | +!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | !! ! ######################################################################################### subroutine rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr_n2o, & ! IN vmr_ch4, vmr_o2, vmr_co, vmr_cfc11, vmr_cfc12, vmr_cfc22, vmr_ccl4, icseed, tau_aer, & ! IN ssa_aer, sfc_emiss, skt, dzlyr, delpin, de_lgth, ncol, nlay, lprint, cldfrac, lslwr, & ! IN - hlwc, topflx, sfcflx, cldtau, errmsg, errflg, & ! OUT + hlwc, topflx, sfcflx, cldtau, & ! OUT hlw0, hlwb, flxprf, & ! OPT(out) cld_lwp, cld_ref_liq, cld_iwp, cld_ref_ice, cld_rwp, cld_ref_rain, cld_swp, & ! OPT(in) - cld_ref_snow, cld_od) ! OPT(in) + cld_ref_snow, cld_od, errmsg, errflg) ! OPT(in) ! Inputs integer,intent(in) :: & @@ -864,8 +896,6 @@ subroutine rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr optical_props_clr, & ! Optical properties for gaseous atmosphere optical_props_cldy, & ! Optical properties for clouds optical_props_aer ! Optical properties for aerosols - !type(ty_optical_props_2str) :: & - ! optical_props_cldy ! Optical properties for clouds type(ty_source_func_lw) :: & sources ! source function @@ -878,15 +908,14 @@ subroutine rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr errflg = 0 if (.not. lslwr) return - ! What is vertical ordering? - top_at_1 = (p_lay(1,1) .lt. p_lay(1,nlay)) + ! Some consistency checks... - ! Check for optional arguments. + ! Are any optional outputs requested? l_ClrSky_HR = present(hlw0) l_AllSky_HR_byband = present(hlwb) l_fluxes2D = present(flxprf) - ! Check for optional input arguments, depending on cloud method + ! Check for optional input arguments, this depends on cloud method if (ilwcliq > 0) then ! use prognostic cloud method if (.not. present(cld_lwp) .or. .not. present(cld_ref_liq) .or. & .not. present(cld_iwp) .or. .not. present(cld_ref_ice) .or. & @@ -910,6 +939,9 @@ subroutine rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr end if end if + ! What is vertical ordering? + top_at_1 = (p_lay(1,1) .lt. p_lay(1,nlay)) + ! Change random number seed value for each radiation invocation (isubclw =1 or 2). if(isubclw == 1) then ! advance prescribed permutation seed do iCol = 1, ncol @@ -922,19 +954,19 @@ subroutine rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr endif ! Surface emissivity - semiss(:,:) = 1._kind_phys + semiss(:,:) = 1. do iBand=1,nBandsLW where(sfc_emiss .gt. epsilon .and. sfc_emiss .le. 1) semiss(iBand,:) = sfc_emiss enddo ! Compute volume mixing-ratios for ozone (mmr) and specific-humidity. - vmr_h2o = merge((q_lay/(1-q_lay))*amdw, 0._kind_phys, q_lay .ne. 1._kind_phys) - vmr_o3 = merge(o3_lay*amdo3, 0._kind_phys, o3_lay .gt. 0._kind_phys) + vmr_h2o = merge((q_lay/(1-q_lay))*amdw, 0., q_lay .ne. 1.) + vmr_o3 = merge(o3_lay*amdo3, 0., o3_lay .gt. 0.) ! Input model-level pressure @ the top-of-model is set to 1Pa, whereas RRTMGP minimum - ! pressure needs to be slightly greateer than that, ~1.00518Pa + ! pressure needs to be slightly greater than that, ~1.00518Pa p_lev2=p_lev - p_lev2(:,nlay+1) = kdist_lw_clr%get_press_min()/100._kind_phys + p_lev2(:,nlay+1) = kdist_lw_clr%get_press_min()/100. ! Compute ice/liquid cloud masks, needed by rrtmgp_cloud_optics liqmask = (cldfrac .gt. 0 .and. cld_lwp .gt. 0) @@ -942,17 +974,17 @@ subroutine rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr ! Conpute diffusivity angle adjustments. ! First need to compute precipitable water in each column - tem0 = (1._kind_phys - vmr_h2o)*amd + vmr_h2o*amw - coldry = ( 1.0e-20 * 1.0e3 *avogad)*delpin / (100.*grav*tem0*(1._kind_phys + vmr_h2o)) - colamt = max(0._kind_phys, coldry*vmr_h2o) - tem1 = 0._kind_phys - tem2 = 0._kind_phys + tem0 = (1. - vmr_h2o)*amd + vmr_h2o*amw + coldry = ( 1.0e-20 * 1.0e3 *avogad)*delpin / (100.*grav*tem0*(1. + vmr_h2o)) + colamt = max(0., coldry*vmr_h2o) + tem1 = 0. + tem2 = 0. do iCol=1,nCol do iLay=1,nLay tem1 = tem1 + coldry(iCol,iLay)+colamt(iCol,iLay) tem2 = tem2 + colamt(iCol,iLay) enddo - precipitableH2o(iCol) = p_lev(iCol,1)*(10._kind_phys*tem2 / (amdw*tem1*grav)) + precipitableH2o(iCol) = p_lev(iCol,1)*(10.*tem2 / (amdw*tem1*grav)) enddo ! Reset diffusivity angle for Bands 2-3 and 5-9 to vary (between 1.50 @@ -1012,8 +1044,8 @@ subroutine rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr ! from pressures, temperatures, and gas concentrations... print*,'Clear-Sky(LW): Optics' call check_error_msg(kdist_lw_clr%gas_optics( & - p_lay(1:ncol,1:nlay)*100._kind_phys, & - p_lev2(1:ncol,1:nlay+1)*100._kind_phys, & + p_lay(1:ncol,1:nlay)*100., & + p_lev2(1:ncol,1:nlay+1)*100., & t_lay(1:ncol,1:nlay), & skt(1:ncol), & gas_concs_lw, & @@ -1021,17 +1053,15 @@ subroutine rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr sources, & tlev = t_lev(1:ncol,1:nlay+1))) - ! 1c) Add contribution from aerosols. + ! 1c) Add contribution from aerosols. Also, apply diffusivity angle print*,'Clear-Sky(LW): Increment Aerosol' - optical_props_aer%tau(1:ncol,1:nlay,1:nBandsLW) = tau_aer * (1._kind_phys - ssa_aer) - call check_error_msg(optical_props_aer%increment(optical_props_clr)) - - ! 1c2) Apply diffusivity angle do iCol=1,nCol - do iBand=1,nBandsLW - optical_props_clr%tau(iCol,1:nlay,iBand) = optical_props_clr%tau(iCol,1:nlay,iBand)*secdiff(iBand,iCol) + do iGpt=1,nGptsLW + iBand = kdist_lw_clr%convert_gpt2band(iGpt) + optical_props_aer%tau(iCol,1:nlay,iGpt) = tau_aer(iCol,1:nlay,iBand) * (1. - ssa_aer(iCol,1:nlay,iBand)) * secdiff(iBand,iCol) enddo enddo + call check_error_msg(optical_props_aer%increment(optical_props_clr)) ! 1d) Compute the clear-sky broadband fluxes print*,'Clear-Sky(LW): Fluxes' @@ -1047,7 +1077,7 @@ subroutine rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr call check_error_msg(compute_heating_rate( & fluxClrSky%flux_up, & fluxClrSky%flux_dn, & - p_lev2(1:ncol,1:nlay+1)*100._kind_phys, & + p_lev2(1:ncol,1:nlay+1)*100., & thetaTendClrSky)) ! ####################################################################################### @@ -1055,7 +1085,7 @@ subroutine rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr ! ####################################################################################### ! 2a) Compute in-cloud optics print*,'All-Sky(LW): Optics ' - tau_cld(:,:,:) = 0._kind_phys + tau_cld(:,:,:) = 0. if (any(cldfrac .gt. 0)) then ! If using RRTMG cloud-physics. Model can provide either cloud-optics (cld_od) or ! cloud-properties by type (cloud LWP,snow effective radius, etc...) @@ -1073,7 +1103,7 @@ subroutine rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr if (cldfrac(iCol,iLay) .gt. cldmin) then tau_cld(:,iCol,iLay) = cld_od(iCol,iLay)*secdiff(:,iCol) else - tau_cld(:,iCol,iLay) = 0._kind_phys + tau_cld(:,iCol,iLay) = 0. endif end do end do @@ -1093,10 +1123,10 @@ subroutine rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr ! Rain optical-depth tau_rain(iCol,iLay) = absrain*cld_rwp(iCol,iLay) ! Snow optical-depth - if (cld_swp(iCol,iLay) .gt. 0._kind_phys .and. cld_ref_snow(iCol,iLay) .gt. 10._kind_phys) then + if (cld_swp(iCol,iLay) .gt. 0. .and. cld_ref_snow(iCol,iLay) .gt. 10.) then tau_snow(iCol,iLay) = abssnow0*1.05756*cld_swp(iCol,iLay)/cld_ref_snow(iCol,iLay) else - tau_snow(iCol,iLay) = 0._kind_phys + tau_snow(iCol,iLay) = 0. endif endif enddo @@ -1108,10 +1138,10 @@ subroutine rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr endif ! 2b) Call McICA to generate subcolumns. - tau_gpt(:,:,:) = 0._kind_phys + tau_gpt(:,:,:) = 0. if (isubclw .gt. 0) then print*,'All-Sky(LW): McICA' - cldfrac2 = merge(cldfrac,0._kind_phys,cldfrac .gt. cldmin) + cldfrac2 = merge(cldfrac,0.,cldfrac .gt. cldmin) call mcica_subcol_lw(ncol, nlay, nGptsLW, cldfrac2, ipseed, dzlyr, de_lgth, cldfracMCICA) ! Map band optical depth to each g-point using McICA @@ -1119,10 +1149,10 @@ subroutine rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr do iLay=1,nLay do iGpt=1,nGptsLW iBand = kdist_lw_clr%convert_gpt2band(iGpt) - if (cldfracMCICA(iBand,iCol,iLay) .gt. 0._kind_phys) then + if (cldfracMCICA(iBand,iCol,iLay) .gt. 0.) then tau_gpt(iCol,iLay,iGpt) = tau_cld(iband,iCol,iLay)*secdiff(iBand,iCol) else - tau_gpt(iCol,iLay,iGpt) = 0._kind_phys + tau_gpt(iCol,iLay,iGpt) = 0. endif enddo enddo @@ -1148,9 +1178,20 @@ subroutine rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr call check_error_msg(compute_heating_rate( & fluxAllSky%flux_up, & fluxAllSky%flux_dn, & - p_lev(1:ncol,1:nlay+1)*100._kind_phys, & + p_lev(1:ncol,1:nlay+1)*100., & thetaTendAllSky)) + write(59,*) "#" + write(60,*) "#" + write(61,*) "#" + do iLay=1,nLay + write(59,"(9F10.3)") p_lay(1,iLay)*100.,t_lay(1,iLay),cld_lwp(1,iLay),cld_iwp(1,iLay),& + cldfrac(1,iLay),sum(fluxClrSky%flux_up(1,iLay:iLay+1))/2.,& + sum(fluxClrSky%flux_dn(1,iLay:iLay+1))/2.,sum(fluxAllSky%flux_up(1,iLay:iLay+1))/2.,& + sum(fluxAllSky%flux_dn(1,iLay:iLay+1))/2. + write(60,*) optical_props_clr%tau(1,iLay,:) + write(61,*) tau_cld(:,1,iLay)*secdiff(:,1) + enddo ! ####################################################################################### ! Copy fluxes from RRTGMP types into model radiation types. ! ####################################################################################### @@ -1183,6 +1224,9 @@ subroutine rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr end subroutine rrtmgp_lw_run ! subroutine rrtmgp_lw_finalize() + close(59) + close(60) + close(61) end subroutine rrtmgp_lw_finalize ! ######################################################################################### From 78ab01ec89f1b883105e12eb6684524219c021f2 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Tue, 16 Apr 2019 12:20:17 -0600 Subject: [PATCH 004/167] Added SW clear-sky calculation. --- physics/rrtmgp_sw_main.F90 | 868 +++++++++++++++++++++++++++++++++++++ physics/rrtmgp_sw_post.F90 | 154 +++++++ physics/rrtmgp_sw_post.xml | 216 +++++++++ physics/rrtmgp_sw_pre.F90 | 118 +++++ physics/rrtmgp_sw_pre.xml | 183 ++++++++ 5 files changed, 1539 insertions(+) create mode 100644 physics/rrtmgp_sw_main.F90 create mode 100644 physics/rrtmgp_sw_post.F90 create mode 100644 physics/rrtmgp_sw_post.xml create mode 100644 physics/rrtmgp_sw_pre.F90 create mode 100644 physics/rrtmgp_sw_pre.xml diff --git a/physics/rrtmgp_sw_main.F90 b/physics/rrtmgp_sw_main.F90 new file mode 100644 index 000000000..d7ad6a28a --- /dev/null +++ b/physics/rrtmgp_sw_main.F90 @@ -0,0 +1,868 @@ +! ########################################################################################### +! ########################################################################################### +module rrtmgp_sw + use GFS_typedefs, only: GFS_control_type + use physparam, only: iovrsw, icldflg, iswcliq, isubcsw + use machine, only: kind_phys + use mo_rte_kind, only: wl + use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp + use mo_gas_concentrations, only: ty_gas_concs + use mo_fluxes, only: ty_fluxes_broadband + use mo_optical_props, only: ty_optical_props_1scl,ty_optical_props_2str + use mo_rte_sw, only: rte_sw + use mo_heating_rates, only: compute_heating_rate + use mo_rrtmgp_constants, only: grav, avogad + use module_radsw_parameters, only: topfsw_type, sfcfsw_type, profsw_type, cmpfsw_type + + + implicit none + + ! Parameters + integer,parameter :: nGases = 6 + real(kind_phys),parameter :: epsilon=1.0e-6 + character(len=3),parameter, dimension(nGases) :: & + active_gases = (/ 'h2o', 'co2', 'o3 ', 'n2o', 'ch4', 'o2 '/) + + ! Molecular weight ratios (for converting mmr to vmr) + real(kind_phys), parameter :: & + amd = 28.9644_kind_phys, & ! Molecular weight of dry-air (g/mol) + amw = 18.0154_kind_phys, & ! Molecular weight of water vapor (g/mol) + amo3 = 47.9982_kind_phys, & ! Modelular weight of ozone (g/mol) + amdw = amd/amw, & ! Molecular weight of dry air / water vapor + amdo3 = amd/amo3 ! Molecular weight of dry air / ozone + ! + real (kind_phys), parameter :: & + s0 = 1368.22 ! Solar constant (W/m2) + + ! Logical flags for optional output fields in rrtmgp_sw_run(), default=.false. + logical :: & + l_AllSky_HR_byband = .false., & ! 2D [ncol,nlay] all-sky heating rates, in each band [ncol,nlay,nBandsSW]? + l_ClrSky_HR = .false., & ! 2D [ncol,nlay] clear-sky heating rate? + l_fluxes2D = .false., & ! 2D [ncol,nlay] radiative fluxes *Note* fluxes is a DDT w/ 4 fields. + l_sfcFluxes1D = .false. ! 1D [ncol] surface fluxes *Note* fluxes is a DDT w/ 6 fields. + + ! Module parameters (set during rrtmgp_sw_init()) + integer :: & + nGptsSW, & ! Number of SW spectral g-points + nBandsSW, & ! Number of SW bands + ipsdsw0 ! Initial seed for McICA + + ! Classes used by rte+rrtmgp + type(ty_gas_optics_rrtmgp) :: & + kdist_sw_clr + type(ty_gas_concs) :: & + gas_concs_sw + + public rrtmgp_sw_init, rrtmgp_sw_run, rrtmgp_sw_finalize +contains + ! ######################################################################################### + ! rrtmgp_sw_init + ! ######################################################################################### +!! \section arg_table_rrtmgp_sw_init Argument Table +!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | +!! |-----------------|---------------------------|---------------------------------------------------------|-------|------|------------------|-----------|--------|----------| +!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | +!! | mpirank | mpi_rank | current MPI rank | index | 0 | integer | | in | F | +!! | mpiroot | mpi_root | master MPI rank | index | 0 | integer | | in | F | +!! | mpicomm | mpi_comm | MPI communicator | index | 0 | integer | | in | F | +!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | +!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! + ! ######################################################################################### + subroutine rrtmgp_sw_init(Model,mpicomm, mpirank, mpiroot, errmsg, errflg) + use netcdf +#ifdef MPI + use mpi +#endif + ! Inputs + type(GFS_control_type), intent(in) :: & + Model ! DDT containing model control parameters + integer,intent(in) :: & + mpicomm, & ! MPI communicator + mpirank, & ! Current MPI rank + mpiroot ! Master MPI rank + ! Outputs + character(len=*), intent(out) :: & + errmsg ! Error message + integer, intent(out) :: & + errflg ! Error code + + ! Fields from the K-distribution files + ! Variables that will be passed to gas_optics%load() + integer, dimension(:), allocatable :: & + kminor_start_lower_sw, & ! used by RRTGMP gas optics + kminor_start_upper_sw ! used by RRTGMP gas optics + integer, dimension(:,:), allocatable :: & + band2gpt_sw, & ! used by RRTGMP gas optics + minor_limits_gpt_lower_sw, & ! used by RRTGMP gas optics + minor_limits_gpt_upper_sw ! used by RRTGMP gas optics + integer, dimension(:,:,:), allocatable :: & + key_species_sw ! used by RRTGMP gas optics + real(kind_phys) :: & + press_ref_trop_sw, & ! used by RRTGMP gas optics + temp_ref_p_sw, & ! used by RRTGMP gas optics + temp_ref_t_sw ! used by RRTGMP gas optics + real(kind_phys), dimension(:), allocatable :: & + press_ref_sw, & ! used by RRTGMP gas optics + temp_ref_sw, & ! used by RRTGMP gas optics + solar_source_sw ! used by RRTGMP gas optics + real(kind_phys), dimension(:,:), allocatable :: & + band_lims_sw ! used by RRTGMP gas optics + + real(kind_phys), dimension(:,:,:), allocatable :: & + vmr_ref_sw, & ! used by RRTGMP gas optics + kminor_lower_sw, & ! used by RRTGMP gas optics + kminor_upper_sw, & ! used by RRTGMP gas optics + rayl_lower_sw, & ! used by RRTGMP gas optics + rayl_upper_sw ! used by RRTGMP gas optics + real(kind_phys), dimension(:,:,:,:), allocatable :: & + kmajor_sw ! used by RRTGMP gas optics + character(len=32), dimension(:), allocatable :: & + gas_names_sw, & ! used by RRTGMP gas optics + gas_minor_sw, & ! used by RRTGMP gas optics + identifier_minor_sw, & ! used by RRTGMP gas optics + minor_gases_lower_sw, & ! used by RRTGMP gas optics + minor_gases_upper_sw, & ! used by RRTGMP gas optics + scaling_gas_lower_sw, & ! used by RRTGMP gas optics + scaling_gas_upper_sw ! used by RRTGMP gas optics + logical(wl), dimension(:), allocatable :: & + minor_scales_with_density_lower_sw, & ! used by RRTGMP gas optics + minor_scales_with_density_upper_sw, & ! used by RRTGMP gas optics + scale_by_complement_lower_sw, & ! used by RRTGMP gas optics + scale_by_complement_upper_sw ! used by RRTGMP gas optics + ! Dimensions (to be broadcast across all processors) + integer :: & + ntemps_sw, & ! used by RRTGMP gas optics + npress_sw, & ! used by RRTGMP gas optics + nabsorbers_sw, & ! used by RRTGMP gas optics + nextrabsorbers_sw, & ! used by RRTGMP gas optics + nminorabsorbers_sw, & ! used by RRTGMP gas optics + nmixingfracs_sw, & ! used by RRTGMP gas optics + nlayers_sw, & ! used by RRTGMP gas optics + nbnds_sw, & ! used by RRTGMP gas optics + ngpts_sw, & ! used by RRTGMP gas optics + npairs_sw, & ! used by RRTGMP gas optics + nminor_absorber_intervals_lower_sw, & ! used by RRTGMP gas optics + nminor_absorber_intervals_upper_sw, & ! used by RRTGMP gas optics + ncontributors_lower_sw, & ! used by RRTGMP gas optics + ncontributors_upper_sw ! used by RRTGMP gas optics + + ! Local variables + integer :: status,ncid_sw,dimid,varID,ij,iGas + character(len=264) :: kdist_file + integer,dimension(:),allocatable :: temp1,temp2,temp3,temp4,temp_log_array1,& + temp_log_array2, temp_log_array3, temp_log_array4 + + ! Initialize + errmsg = '' + errflg = 0 + + ! Ensure that requested cloud overlap is reasonable. + if ( iovrsw<0 .or. iovrsw>3 ) then + print *,' *** Error in specification of cloud overlap flag', & + ' IOVRSW=',iovrsw,' in RSWINIT !!' + stop + endif + + ! Check cloud flags for consistency. + if ((icldflg == 0 .and. iswcliq /= 0) .or. & + (icldflg == 1 .and. iswcliq == 0)) then + print *,' *** Model cloud scheme inconsistent with SW', & + ' radiation cloud radiative property setup !!' + stop + endif + if ( isubcsw==0 .and. iovrsw>2 ) then + print *,' *** IOVRSW=',iovrsw,' is not available for ISUBCSW=0 setting!!' + print *,' The program will use maximum/random overlap instead.' + iovrsw = 1 + endif + + ! Filenames are set in the gfs_physics_nml (scm/src/GFS_typedefs.F90) + kdist_file = trim(Model%rrtmgp_root)//trim(Model%kdist_sw_file_gas) + + ! Read dimensions for k-distribution fields (only on master processor(0)) + if (mpirank .eq. mpiroot) then + if(nf90_open(trim(kdist_file), NF90_WRITE, ncid_sw) .eq. NF90_NOERR) then + status = nf90_inq_dimid(ncid_sw, 'temperature', dimid) + status = nf90_inquire_dimension(ncid_sw, dimid, len=ntemps_sw) + status = nf90_inq_dimid(ncid_sw, 'pressure', dimid) + status = nf90_inquire_dimension(ncid_sw, dimid, len=npress_sw) + status = nf90_inq_dimid(ncid_sw, 'absorber', dimid) + status = nf90_inquire_dimension(ncid_sw, dimid, len=nabsorbers_sw) + status = nf90_inq_dimid(ncid_sw, 'minor_absorber', dimid) + status = nf90_inquire_dimension(ncid_sw, dimid, len=nminorabsorbers_sw) + status = nf90_inq_dimid(ncid_sw, 'absorber_ext', dimid) + status = nf90_inquire_dimension(ncid_sw, dimid, len=nextrabsorbers_sw) + status = nf90_inq_dimid(ncid_sw, 'mixing_fraction', dimid) + status = nf90_inquire_dimension(ncid_sw, dimid, len=nmixingfracs_sw) + status = nf90_inq_dimid(ncid_sw, 'atmos_layer', dimid) + status = nf90_inquire_dimension(ncid_sw, dimid, len=nlayers_sw) + status = nf90_inq_dimid(ncid_sw, 'bnd', dimid) + status = nf90_inquire_dimension(ncid_sw, dimid, len=nbnds_sw) + status = nf90_inq_dimid(ncid_sw, 'gpt', dimid) + status = nf90_inquire_dimension(ncid_sw, dimid, len=ngpts_sw) + status = nf90_inq_dimid(ncid_sw, 'pair', dimid) + status = nf90_inquire_dimension(ncid_sw, dimid, len=npairs_sw) + status = nf90_inq_dimid(ncid_sw, 'contributors_lower', dimid) + status = nf90_inquire_dimension(ncid_sw, dimid, len=ncontributors_lower_sw) + status = nf90_inq_dimid(ncid_sw, 'contributors_upper', dimid) + status = nf90_inquire_dimension(ncid_sw, dimid, len=ncontributors_upper_sw) + status = nf90_inq_dimid(ncid_sw, 'minor_absorber_intervals_lower', dimid) + status = nf90_inquire_dimension(ncid_sw, dimid, len=nminor_absorber_intervals_lower_sw) + status = nf90_inq_dimid(ncid_sw, 'minor_absorber_intervals_upper', dimid) + status = nf90_inquire_dimension(ncid_sw, dimid, len=nminor_absorber_intervals_upper_sw) + status = nf90_close(ncid_sw) + endif + endif + + ! Broadcast dimensions to all processors +#ifdef MPI + call MPI_BCAST(ntemps_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(npress_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nabsorbers_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nminorabsorbers_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nextraabsorbers_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nmixingfracs_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nlayers_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nbnds_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(ngpts_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(npairs_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(ncontributors_lower_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(ncontributors_upper_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nminor_absorber_intervals_lower_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nminor_absorber_intervals_upper_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +#endif + + ! On master processor, allocate space, read in fields, broadcast to all processors + if (mpirank .eq. mpiroot) then + ! Allocate space for arrays + allocate(gas_names_sw(nabsorbers_sw)) + allocate(scaling_gas_lower_sw(nminor_absorber_intervals_lower_sw)) + allocate(scaling_gas_upper_sw(nminor_absorber_intervals_upper_sw)) + allocate(gas_minor_sw(nminorabsorbers_sw)) + allocate(identifier_minor_sw(nminorabsorbers_sw)) + allocate(minor_gases_lower_sw(nminor_absorber_intervals_lower_sw)) + allocate(minor_gases_upper_sw(nminor_absorber_intervals_upper_sw)) + allocate(minor_limits_gpt_lower_sw(npairs_sw,nminor_absorber_intervals_lower_sw)) + allocate(minor_limits_gpt_upper_sw(npairs_sw,nminor_absorber_intervals_upper_sw)) + allocate(band2gpt_sw(2,nbnds_sw)) + allocate(key_species_sw(2,nlayers_sw,nbnds_sw)) + allocate(band_lims_sw(2,nbnds_sw)) + allocate(press_ref_sw(npress_sw)) + allocate(temp_ref_sw(ntemps_sw)) + allocate(vmr_ref_sw(nlayers_sw, nextrabsorbers_sw, ntemps_sw)) + allocate(kminor_lower_sw(ncontributors_lower_sw, nmixingfracs_sw, ntemps_sw)) + allocate(kmajor_sw(ngpts_sw, nmixingfracs_sw, npress_sw+1, ntemps_sw)) + allocate(kminor_start_lower_sw(nminor_absorber_intervals_lower_sw)) + allocate(kminor_upper_sw(ncontributors_upper_sw, nmixingfracs_sw, ntemps_sw)) + allocate(kminor_start_upper_sw(nminor_absorber_intervals_upper_sw)) + allocate(minor_scales_with_density_lower_sw(nminor_absorber_intervals_lower_sw)) + allocate(minor_scales_with_density_upper_sw(nminor_absorber_intervals_upper_sw)) + allocate(scale_by_complement_lower_sw(nminor_absorber_intervals_lower_sw)) + allocate(scale_by_complement_upper_sw(nminor_absorber_intervals_upper_sw)) + allocate(rayl_upper_sw(ngpts_sw, nmixingfracs_sw, ntemps_sw)) + allocate(rayl_lower_sw(ngpts_sw, nmixingfracs_sw, ntemps_sw)) + allocate(solar_source_sw(ngpts_sw)) + allocate(temp1(nminor_absorber_intervals_lower_sw)) + allocate(temp2(nminor_absorber_intervals_upper_sw)) + allocate(temp3(nminor_absorber_intervals_lower_sw)) + allocate(temp4(nminor_absorber_intervals_upper_sw)) + + ! Read in fields from file + if(nf90_open(trim(kdist_file), NF90_WRITE, ncid_sw) .eq. NF90_NOERR) then + status = nf90_inq_varid(ncid_sw,'gas_names',varID) + status = nf90_get_var(ncid_sw,varID,gas_names_sw) + ! + status = nf90_inq_varid(ncid_sw,'scaling_gas_lower',varID) + status = nf90_get_var(ncid_sw,varID,scaling_gas_lower_sw) + ! + status = nf90_inq_varid(ncid_sw,'scaling_gas_upper',varID) + status = nf90_get_var(ncid_sw,varID,scaling_gas_upper_sw) + ! + status = nf90_inq_varid(ncid_sw,'gas_minor',varID) + status = nf90_get_var(ncid_sw,varID,gas_minor_sw) + ! + status = nf90_inq_varid(ncid_sw,'identifier_minor',varID) + status = nf90_get_var(ncid_sw,varID,identifier_minor_sw) + ! + status = nf90_inq_varid(ncid_sw,'minor_gases_lower',varID) + status = nf90_get_var(ncid_sw,varID,minor_gases_lower_sw) + ! + status = nf90_inq_varid(ncid_sw,'minor_gases_upper',varID) + status = nf90_get_var(ncid_sw,varID,minor_gases_upper_sw) + ! + status = nf90_inq_varid(ncid_sw,'minor_limits_gpt_lower',varID) + status = nf90_get_var(ncid_sw,varID,minor_limits_gpt_lower_sw) + ! + status = nf90_inq_varid(ncid_sw,'minor_limits_gpt_upper',varID) + status = nf90_get_var(ncid_sw,varID,minor_limits_gpt_upper_sw) + ! + status = nf90_inq_varid(ncid_sw,'bnd_limits_gpt',varID) + status = nf90_get_var(ncid_sw,varID,band2gpt_sw) + ! + status = nf90_inq_varid(ncid_sw,'key_species',varID) + status = nf90_get_var(ncid_sw,varID,key_species_sw) + ! + status = nf90_inq_varid(ncid_sw,'bnd_limits_wavenumber',varID) + status = nf90_get_var(ncid_sw,varID,band_lims_sw) + ! + status = nf90_inq_varid(ncid_sw,'press_ref',varID) + status = nf90_get_var(ncid_sw,varID,press_ref_sw) + ! + status = nf90_inq_varid(ncid_sw,'temp_ref',varID) + status = nf90_get_var(ncid_sw,varID,temp_ref_sw) + ! + status = nf90_inq_varid(ncid_sw,'absorption_coefficient_ref_P',varID) + status = nf90_get_var(ncid_sw,varID,temp_ref_p_sw) + ! + status = nf90_inq_varid(ncid_sw,'absorption_coefficient_ref_T',varID) + status = nf90_get_var(ncid_sw,varID,temp_ref_t_sw) + ! + status = nf90_inq_varid(ncid_sw,'press_ref_trop',varID) + status = nf90_get_var(ncid_sw,varID,press_ref_trop_sw) + ! + status = nf90_inq_varid(ncid_sw,'kminor_lower',varID) + status = nf90_get_var(ncid_sw,varID,kminor_lower_sw) + ! + status = nf90_inq_varid(ncid_sw,'kminor_upper',varID) + status = nf90_get_var(ncid_sw,varID,kminor_upper_sw) + ! + status = nf90_inq_varid(ncid_sw,'vmr_ref',varID) + status = nf90_get_var(ncid_sw,varID,vmr_ref_sw) + ! + status = nf90_inq_varid(ncid_sw,'kmajor',varID) + status = nf90_get_var(ncid_sw,varID,kmajor_sw) + ! + status = nf90_inq_varid(ncid_sw,'kminor_start_lower',varID) + status = nf90_get_var(ncid_sw,varID,kminor_start_lower_sw) + ! + status = nf90_inq_varid(ncid_sw,'kminor_start_upper',varID) + status = nf90_get_var(ncid_sw,varID,kminor_start_upper_sw) + ! + status = nf90_inq_varid(ncid_sw,'solar_source',varID) + status = nf90_get_var(ncid_sw,varID,solar_source_sw) + ! + status = nf90_inq_varid(ncid_sw,'rayl_lower',varID) + status = nf90_get_var(ncid_sw,varID,rayl_lower_sw) + + status = nf90_inq_varid(ncid_sw,'rayl_upper',varID) + status = nf90_get_var(ncid_sw,varID,rayl_upper_sw) + + ! Logical fields are read in as integers and then converted to logicals. + status = nf90_inq_varid(ncid_sw,'minor_scales_with_density_lower',varID) + status = nf90_get_var(ncid_sw,varID,temp1) + minor_scales_with_density_lower_sw(:) = .false. + where(temp1 .eq. 1) minor_scales_with_density_lower_sw(:) = .true. + ! + status = nf90_inq_varid(ncid_sw,'minor_scales_with_density_upper',varID) + status = nf90_get_var(ncid_sw,varID,temp2) + minor_scales_with_density_upper_sw(:) = .false. + where(temp2 .eq. 1) minor_scales_with_density_upper_sw(:) = .true. + ! + status = nf90_inq_varid(ncid_sw,'scale_by_complement_lower',varID) + status = nf90_get_var(ncid_sw,varID,temp3) + scale_by_complement_lower_sw(:) = .false. + where(temp3 .eq. 1) scale_by_complement_lower_sw(:) = .true. + ! + status = nf90_inq_varid(ncid_sw,'scale_by_complement_upper',varID) + status = nf90_get_var(ncid_sw,varID,temp4) + scale_by_complement_upper_sw(:) = .false. + where(temp4 .eq. 1) scale_by_complement_upper_sw(:) = .true. + + ! Close + status = nf90_close(ncid_sw) + endif + endif + + ! Broadcast arrays to all processors +#ifdef MPI + call MPI_BCAST(minor_limits_gpt_upper_sw, size(minor_limits_gpt_upper_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(minor_limits_gpt_lower_sw, size(minor_limits_gpt_lower_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(kminor_start_upper_sw, size(kminor_start_upper_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(kminor_start_lower_sw, size(kminor_start_lower_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(key_species_sw, size(key_species_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(band2gpt_sw, size(band2gpt_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(band_lims_sw, size(band_lims_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(press_ref_sw, size(press_ref_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(temp_ref_sw, size(temp_ref_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(kminor_lower_sw, size(kminor_lower_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(kminor_upper_sw, size(kminor_upper_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(scaling_gas_lower_sw, size(scaling_gas_lower_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(scaling_gas_upper_sw, size(scaling_gas_upper_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(vmr_ref_sw, size(vmr_ref_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(kmajor_sw, size(kmajor_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(temp_ref_p_sw, 1, kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(temp_ref_t_sw, 1, kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(press_ref_trop_sw, 1, kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(solar_source_sw, size(solar_source_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(rayl_lower_sw, size(rayl_lower_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(rayl_upper_sw, size(rayl_upper_sw), kind_phys, mpiroot, mpicomm, ierr) + ! Character arrays + do ij=1,nabsorbers_sw + call MPI_BCAST(gas_names_sw(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) + enddo + do ij=1,nminorabsorbers_sw + call MPI_BCAST(gas_minor_sw(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) + call MPI_BCAST(identifier_minor_sw(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) + enddo + do ij=1,nminor_absorber_intervals_lower_sw + call MPI_BCAST(minor_gases_lower_sw(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) + enddo + do ij=1,nminor_absorber_intervals_upper_sw + call MPI_BCAST(minor_gases_upper_sw(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) + enddo + ! Logical arrays (First convert to integer-array, then broadcast) + ! + allocate(temp_log_array1(nminor_absorber_intervals_lower_sw)) + where(minor_scales_with_density_lower_sw) + temp_log_array1 = 1 + elsewhere + temp_log_array1 = 0 + end where + call MPI_BCAST(temp_log_array1, size(temp_log_array1), MPI_INTEGER, mpiroot, mpicomm, ierr) + ! + allocate(temp_log_array2(nminor_absorber_intervals_lower_sw)) + where(scale_by_complement_lower_sw) + temp_log_array2 = 1 + elsewhere + temp_log_array2 = 0 + end where + call MPI_BCAST(temp_log_array2, size(temp_log_array2), MPI_INTEGER, mpiroot, mpicomm, ierr) + ! + allocate(temp_log_array3(nminor_absorber_intervals_upper_sw)) + where(minor_scales_with_density_upper_sw) + temp_log_array3 = 1 + elsewhere + temp_log_array3 = 0 + end where + call MPI_BCAST(temp_log_array3, size(temp_log_array3), MPI_INTEGER, mpiroot, mpicomm, ierr) + ! + allocate(temp_log_array4(nminor_absorber_intervals_upper_sw)) + where(scale_by_complement_upper_sw) + temp_log_array4 = 1 + elsewhere + temp_log_array4 = 0 + end where + call MPI_BCAST(temp_log_array4, size(temp_log_array4), MPI_INTEGER, mpiroot, mpicomm, ierr) +#endif + + ! Initialize gas concentrations and gas optics class with data + do iGas=1,nGases + call check_error_msg(gas_concs_sw%set_vmr(active_gases(iGas), 0._kind_phys)) + enddo + call check_error_msg(kdist_sw_clr%load(gas_concs_sw, gas_names_sw, key_species_sw, band2gpt_sw, & + band_lims_sw, press_ref_sw, press_ref_trop_sw, temp_ref_sw, temp_ref_p_sw, temp_ref_t_sw, & + vmr_ref_sw, kmajor_sw, kminor_lower_sw, kminor_upper_sw, gas_minor_sw,identifier_minor_sw, & + minor_gases_lower_sw, minor_gases_upper_sw, minor_limits_gpt_lower_sw, & + minor_limits_gpt_upper_sw, minor_scales_with_density_lower_sw, & + minor_scales_with_density_upper_sw, scaling_gas_lower_sw, & + scaling_gas_upper_sw, scale_by_complement_lower_sw, & + scale_by_complement_upper_sw, kminor_start_lower_sw, kminor_start_upper_sw, & + solar_source_sw, rayl_lower_sw, rayl_upper_sw)) + + ! Set band index by g-point array + nBandsSW = kdist_sw_clr%get_nband() + nGptsSW = kdist_sw_clr%get_ngpt() + + ! Set initial permutation seed for McICA, initially set to number of G-points + ipsdsw0 = kdist_sw_clr%get_ngpt() + + end subroutine rrtmgp_sw_init + ! ######################################################################################### + ! RRTMGP_SW_RUN + ! ######################################################################################### +!! \section arg_table_rrtmgp_sw_run Argument Table +!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | +!! |-----------------|------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------|---------|------|-------------|-----------|--------|----------| +!! | p_lay | air_pressure_at_layer_for_radiation_in_hPa | air pressure layer | hPa | 2 | real | kind_phys | in | F | +!! | p_lev | air_pressure_at_interface_for_radiation_in_hPa | air pressure level | hPa | 2 | real | kind_phys | in | F | +!! | t_lay | air_temperature_at_layer_for_radiation | air temperature layer | K | 2 | real | kind_phys | in | F | +!! | t_lev | air_temperature_at_interface_for_radiation | air temperature level | K | 2 | real | kind_phys | in | F | +!! | q_lay | water_vapor_specific_humidity_at_layer_for_radiation | specific humidity layer | kg kg-1 | 2 | real | kind_phys | in | F | +!! | o3_lay | ozone_concentration_at_layer_for_radiation | ozone concentration layer | kg kg-1 | 2 | real | kind_phys | in | F | +!! | vmr_co2 | volume_mixing_ratio_co2 | volume mixing ratio co2 | kg kg-1 | 2 | real | kind_phys | in | F | +!! | vmr_n2o | volume_mixing_ratio_n2o | volume mixing ratio no2 | kg kg-1 | 2 | real | kind_phys | in | F | +!! | vmr_ch4 | volume_mixing_ratio_ch4 | volume mixing ratio ch4 | kg kg-1 | 2 | real | kind_phys | in | F | +!! | vmr_o2 | volume_mixing_ratio_o2 | volume mixing ratio o2 | kg kg-1 | 2 | real | kind_phys | in | F | +!! | vmr_co | volume_mixing_ratio_co | volume mixing ratio co | kg kg-1 | 2 | real | kind_phys | in | F | +!! | vmr_cfc11 | volume_mixing_ratio_cfc11 | volume mixing ratio cfc11 | kg kg-1 | 2 | real | kind_phys | in | F | +!! | vmr_cfc12 | volume_mixing_ratio_cfc12 | volume mixing ratio cfc12 | kg kg-1 | 2 | real | kind_phys | in | F | +!! | vmr_cfc22 | volume_mixing_ratio_cfc22 | volume mixing ratio cfc22 | kg kg-1 | 2 | real | kind_phys | in | F | +!! | vmr_ccl4 | volume_mixing_ratio_ccl4 | volume mixing ratio ccl4 | kg kg-1 | 2 | real | kind_phys | in | F | +!! | icseed | seed_random_numbers_sw | seed for random number generation for shortwave radiation | none | 1 | integer | | in | F | +!! | tau_aer | aerosol_optical_depth_for_longwave_bands_01-16 | aerosol optical depth for shortwave bands 01-16 | none | 3 | real | kind_phys | in | F | +!! | ssa_aer | aerosol_single_scattering_albedo_for_longwave_bands_01-16 | aerosol single scattering albedo for shortwave bands 01-16 | frac | 3 | real | kind_phys | in | F | +!! | asy_aer | aerosol_asymmetry_parameter_for_shortwave_bands_01-16 | aerosol asymmetry paramter for shortwave bands 01-16 | none | 3 | real | kind_phys | in | F | +!! | sfcalb_nir_dir | surface_albedo_due_to_near_IR_direct | surface albedo due to near IR direct beam | frac | 1 | real | kind_phys | in | F | +!! | sfcalb_nir_dif | surface_albedo_due_to_near_IR_diffused | surface albedo due to near IR diffused beam | frac | 1 | real | kind_phys | in | F | +!! | sfcalb_uvis_dir | surface_albedo_due_to_UV_and_VIS_direct | surface albedo due to UV+VIS direct beam | frac | 1 | real | kind_phys | in | F | +!! | sfcalb_uvis_dif | surface_albedo_due_to_UV_and_VIS_diffused | surface albedo due to UV+VIS diffused beam | frac | 1 | real | kind_phys | in | F | +!! | dzlyr | layer_thickness_for_radiation | layer thickness | km | 2 | real | kind_phys | in | F | +!! | delpin | layer_pressure_thickness_for_radiation | layer pressure thickness | hPa | 2 | real | kind_phys | in | F | +!! | de_lgth | cloud_decorrelation_length | cloud decorrelation length | km | 1 | real | kind_phys | in | F | +!! | cossza | cosine_of_zenith_angle | cosine of the solar zenit angle | none | 1 | real | kind_phys | in | F | +!! | solcon | solar_constant | solar constant | W m-2 | 0 | real | kind_phys | in | F | +!! | nday | daytime_points_dimension | daytime points dimension | count | 0 | integer | | in | F | +!! | idxday | daytime_points | daytime points | index | 1 | integer | | in | F | +!! | ncol | horizontal_loop_extent | horizontal dimension | count | 0 | integer | | in | F | +!! | nlay | adjusted_vertical_layer_dimension_for_radiation | number of vertical layers for radiation | count | 0 | integer | | in | F | +!! | lprint | flag_print | flag to print | flag | 0 | logical | | in | F | +!! | cldfrac | total_cloud_fraction | total cloud fraction | frac | 2 | real | kind_phys | in | F | +!! | lsswr | flag_to_calc_sw | flag to calculate SW irradiances | flag | 0 | logical | | in | F | +!! | hswc | tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step | shortwave total sky heating rate | K s-1 | 2 | real | kind_phys | inout | F | +!! | topflx | sw_fluxes_top_atmosphere | shortwave total sky fluxes at the top of the atm | W m-2 | 1 | topfsw_type | | inout | F | +!! | sfcflx | sw_fluxes_sfc | shortwave total sky fluxes at the Earth surface | W m-2 | 1 | sfcfsw_type | | inout | F | +!! | cldtau | cloud_optical_depth_layers_at_0.55mu_band | approx .55mu band layer cloud optical depth | none | 2 | real | kind_phys | inout | F | +!! | hsw0 | tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_time_step | shortwave clear sky heating rate | K s-1 | 2 | real | kind_phys | inout | T | +!! | hswb | sw_heating_rate_spectral | shortwave total sky heating rate (spectral) | K s-1 | 3 | real | kind_phys | inout | T | +!! | flxprf | sw_fluxes | sw fluxes total sky / csk and up / down at levels | W m-2 | 2 | profsw_type | | inout | T | +!! | fdncmp | components_of_surface_downward_shortwave_fluxes | derived type for special components of surface downward shortwave fluxes | W m-2 | 1 | cmpfsw_type | | inout | T | +!! | cld_lwp | cloud_liquid_water_path | cloud liquid water path | g m-2 | 2 | real | kind_phys | in | T | +!! | cld_ref_liq | mean_effective_radius_for_liquid_cloud | mean effective radius for liquid cloud | micron | 2 | real | kind_phys | in | T | +!! | cld_iwp | cloud_ice_water_path | cloud ice water path | g m-2 | 2 | real | kind_phys | in | T | +!! | cld_ref_ice | mean_effective_radius_for_ice_cloud | mean effective radius for ice cloud | micron | 2 | real | kind_phys | in | T | +!! | cld_rwp | cloud_rain_water_path | cloud rain water path | g m-2 | 2 | real | kind_phys | in | T | +!! | cld_ref_rain | mean_effective_radius_for_rain_drop | mean effective radius for rain drop | micron | 2 | real | kind_phys | in | T | +!! | cld_swp | cloud_snow_water_path | cloud snow water path | g m-2 | 2 | real | kind_phys | in | T | +!! | cld_ref_snow | mean_effective_radius_for_snow_flake | mean effective radius for snow flake | micron | 2 | real | kind_phys | in | T | +!! | cld_od | cloud_optical_depth | cloud optical depth | none | 2 | real | kind_phys | in | T | +!! | cld_ssa | cloud_single_scattering_albedo | cloud single scattering albedo | frac | 2 | real | kind_phys | in | T | +!! | cld_asy | cloud_asymmetry_parameter | cloud asymmetry parameter | none | 2 | real | kind_phys | in | T | +!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | +!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! + subroutine rrtmgp_sw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr_n2o, & ! IN + vmr_ch4, vmr_o2, vmr_co, vmr_cfc11, vmr_cfc12, vmr_cfc22, vmr_ccl4, icseed, tau_aer, & ! IN + ssa_aer, asy_aer, sfcalb_nir_dir, sfcalb_nir_dif, sfcalb_uvis_dir, sfcalb_uvis_dif, & ! IN + dzlyr, delpin, de_lgth, cossza, solcon, nday, idxday, ncol, nlay, lprint, cldfrac, & ! IN + lsswr, & ! IN + hswc, topflx, sfcflx, cldtau, & ! OUT + hsw0, hswB, flxprf, fdncmp, cld_lwp, cld_ref_liq, cld_iwp, cld_ref_ice, cld_rwp, & ! OUT(optional) + cld_ref_rain, cld_swp, cld_ref_snow, cld_od, cld_ssa, cld_asy, & ! OUT(optional) + errmsg, errflg) + + ! Inputs + integer, intent(in) :: & + ncol, & ! Number of horizontal grid-points + nlay, & ! Number of vertical layers + nday ! Number of daytime points + integer, intent(in), dimension(ncol) :: & + icseed ! auxiliary special cloud related array when module + ! variable isubcsw=2, it provides permutation seed + ! for each column profile that are used for generating + ! random numbers. when isubcsw /=2, it will not be used. + integer, intent(in), dimension(nday) :: & + idxday ! Index array for daytime points + logical, intent(in) :: & + lprint, & ! Control flag for diagnostics + lsswr ! Flag to calculate RRTMGP SW? + real(kind_phys), intent(in) :: & + solcon ! Solar constant (W/m2) + real(kind_phys), dimension(ncol), intent(in) :: & + sfcalb_nir_dir, & ! Surface albedo direct (near-IR) (1) + sfcalb_nir_dif, & ! Surface albedo diffuse (near-IR) (1) + sfcalb_uvis_dir, & ! Surface albedo direct (UV and Visible) (1) + sfcalb_uvis_dif, & ! Surface albedo diffuse (UV and Visible) (1) + de_lgth, & ! Cloud decorrelation length (km) + cossza ! Cosine of solar zenith angle (1) + real(kind_phys), dimension(ncol,nlay), intent(in) :: & + dzlyr, & ! layer thinkness (km) + delpin, & ! layer thickness (mb) + cldfrac, & ! Cloud-fraction (1) + p_lay, & ! Pressure @ model layer-centers (mb) + t_lay, & ! Temperature (K) + q_lay, & ! Specific humidity (kg/kg) + o3_lay, & ! O3 mass mixing-ratio (kg/kg) + vmr_co2, & ! Co2 volume-mixing ratio (kg/kg) + vmr_n2o, & ! N2o volume-mixing ratio (kg/kg) + vmr_ch4, & ! Ch4 volume-mixing ratio (kg/kg) + vmr_o2, & ! O2 volume-mixing ratio (kg/kg) + vmr_co, & ! Co volume-mixing ratio (kg/kg) + vmr_cfc11, & ! CFC11 volume-mixing ratio (kg/kg) + vmr_cfc12, & ! CFC12 volume-mixing ratio (kg/kg) + vmr_cfc22, & ! CFC22 volume-mixing ratio (kg/kg) + vmr_ccl4 ! CCl4 volume-mixing ratio (kg/kg) + real(kind_phys), dimension(ncol,nlay+1), intent(in) :: & + p_lev, & ! Pressure @ model layer-interfaces (mb) + t_lev ! Temperature (K) + real(kind_phys), dimension(ncol,nlay,nbandsSW), intent(in) :: & + tau_aer, & ! Aerosol optical depth (1) + ssa_aer, & ! Aerosol single-scattering albedo (1) + asy_aer ! Aerosol asymmetry parameter (1) + ! Inputs (optional) + real(kind_phys), dimension(ncol,nlay), intent(in), optional:: & + cld_lwp, & ! Cloud liquid water path (g/m2) + cld_ref_liq, & ! Effective radius (liquid) (micron) + cld_iwp, & ! Cloud ice water path (g/m2) + cld_ref_ice, & ! Effective radius (ice) (micron) + cld_rwp, & ! Cloud rain water path (g/m2) + cld_ref_rain, & ! Effective radius (rain-drop) (micron) + cld_swp, & ! Cloud snow-water path (g/m2) + cld_ref_snow, & ! Effective radius (snow-flake) (micron) + cld_od, & ! Cloud optical-depth (1) + cld_ssa, & ! Cloud single-scattering albedo (1) + cld_asy ! Cloud asymmetry parameter (1) + + ! Outputs (mandatory) + character(len=*), intent(out) :: & + errmsg ! Error message + integer, intent(out) :: & + errflg ! Error code + real(kind_phys),dimension(ncol,nlay), intent(inout) :: & + hswc, & ! All-sky heating-rate (K/sec) + cldtau ! ~0.55mu band layer tau (1) + type(topfsw_type), dimension(ncol), intent(inout) :: & + topflx ! radiation fluxes at top, components: + ! upfxc - total sky upward flux at top (w/m2) + ! upfx0 - clear sky upward flux at top (w/m2) + type(sfcfsw_type), dimension(ncol), intent(inout) :: & + sfcflx ! radiation fluxes at sfc, components: + ! upfxc - total sky upward flux at sfc (w/m2) + ! upfx0 - clear sky upward flux at sfc (w/m2) + ! dnfxc - total sky downward flux at sfc (w/m2) + ! dnfx0 - clear sky downward flux at sfc (w/m2) + ! Outputs (optional) + real(kind_phys), dimension(ncol,nlay), intent(inout), optional :: & + hsw0 ! Clear-sky heating-rate (K/sec) + real(kind_phys), dimension(ncol,nlay,nBandsSW), intent(inout), optional :: & + hswb ! All-sky heating rate, in each band (K/sec) + type(profsw_type), dimension(ncol,nlay+1), intent(inout), optional :: & + flxprf ! 2D radiative fluxes, components: + ! upfxc - total sky upward flux (W/m2) + ! dnfxc - total sky dnward flux (W/m2) + ! upfx0 - clear sky upward flux (W/m2) + ! dnfx0 - clear sky dnward flux (W/m2) + type(cmpfsw_type), dimension(ncol), intent(inout), optional :: & + fdncmp ! 2D surface fluxes, components: + ! uvbfc - total sky downward uv-b flux at (W/m2) + ! uvbf0 - clear sky downward uv-b flux at (W/m2) + ! nirbm - downward nir direct beam flux (W/m2) + ! nirdf - downward nir diffused flux (W/m2) + ! visbm - downward uv+vis direct beam flux(W/m2) + ! visdf - downward uv+vis diffused flux (W/m2) + + ! RTE+RRTMGP classes + type(ty_optical_props_2str) :: & + optical_props_clr ! Optical properties for gaseous atmosphere + type(ty_optical_props_2str) :: & + optical_props_aer ! Optical properties for aerosols + type(ty_fluxes_broadband) :: & + fluxAllSky, & ! All-sky flux (W/m2) + fluxClrSky ! Clear-sky flux (W/m2) + + ! Local variables + integer :: iCol, iBand, iGpt, iDay + integer,dimension(ncol) :: ipseed + real(kind_phys) :: solAdjFac + logical :: top_at_1=.false. + real(kind_phys), dimension(ncol,nlay) :: vmr_o3, vmr_h2o, thetaTendClrSky, & + thetaTendAllSky,coldry,tem0 + real(kind_phys), dimension(nday,nlay+1),target :: & + flux_up_allSky, flux_up_clrSky, flux_dn_allSky, flux_dn_clrSky, p_lev2 + real(kind_phys), dimension(nday,nGptsSW) :: toa_flux + + ! Initialize + errmsg = '' + errflg = 0 + if (.not. lsswr) return + if (nday <= 0) return + + ! Are any optional outputs requested? + l_ClrSky_HR = present(hsw0) + l_AllSky_HR_byband = present(hswb) + l_fluxes2D = present(flxprf) + l_sfcFluxes1D = present(fdncmp) + + ! Check for optional input arguments, this depends on cloud method + if (iswcliq > 0) then ! use prognostic cloud method + if ( .not.present(cld_lwp) .or. .not.present(cld_ref_liq) .or. & + .not.present(cld_iwp) .or. .not.present(cld_ref_ice) .or. & + .not.present(cld_rwp) .or. .not.present(cld_ref_rain) .or. & + .not.present(cld_swp) .or. .not.present(cld_ref_snow) )then + write(errmsg,'(*(a))') & + 'Logic error: iswcliq>0 requires the following', & + ' optional arguments to be present:', & + ' cld_lwp, cld_ref_liq, cld_iwp, cld_ref_ice,', & + ' cld_rwp, cld_ref_rain, cld_swp, cld_ref_snow' + errflg = 1 + return + end if + else ! use diagnostic cloud method + if ( .not.present(cld_od) .or. .not.present(cld_ssa) .or. & + .not.present(cld_asy)) then + write(errmsg,'(*(a))') & + 'Logic error: iswcliq<=0 requires the following', & + ' optional arguments to be present:', & + ' cld_od, cld_ssa, cld_asy' + errflg = 1 + return + end if + endif + + ! What is vertical ordering? + top_at_1 = (p_lay(1,1) .lt. p_lay(1,nlay)) + + ! Change random number seed value for each radiation invocation (isubcsw =1 or 2). + if(isubcsw == 1) then ! advance prescribed permutation seed + do iCol = 1, ncol + ipseed(iCol) = ipsdsw0 + iCol + enddo + elseif (isubcsw == 2) then ! use input array of permutaion seeds + do iCol = 1, ncol + ipseed(iCol) = icseed(iCol) + enddo + endif + + ! Compute volume mixing-ratios for ozone (mmr) and specific-humidity. + vmr_h2o = merge((q_lay/(1-q_lay))*amdw, 0., q_lay .ne. 1.) + vmr_o3 = merge(o3_lay*amdo3, 0., o3_lay .gt. 0.) + + ! Compute dry air column amount + tem0 = (1. - vmr_h2o)*amd + vmr_h2o*amw + coldry = ( 1.0e-20 * 1.0e3 *avogad)*delpin / (100.*grav*tem0*(1. + vmr_h2o)) + + ! Input model-level pressure @ the top-of-model is set to 1Pa, whereas RRTMGP minimum + ! pressure needs to be slightly greater than that, ~1.00518Pa + p_lev2=p_lev + p_lev2(:,nlay+1) = kdist_sw_clr%get_press_min()/100. + + ! Compute solar constant adjustment factor.. + solAdjFac = solcon / s0 + + ! Initialize outputs + hswc(:,:) = 0. + cldtau(:,:) = 0. + topflx = topfsw_type ( 0., 0., 0. ) + sfcflx = sfcfsw_type ( 0., 0., 0., 0. ) + if (l_ClrSky_HR) then + hsw0(:,:) = 0. + endif + if(l_AllSky_HR_byband) then + hswb(:,:,:) = 0. + endif + if (l_fluxes2D) then + flxprf = profsw_type ( 0., 0., 0., 0. ) + endif + if (l_sfcFluxes1D) then + fdncmp = cmpfsw_type (0.,0.,0.,0.,0.,0.) + endif + + ! ####################################################################################### + ! CALL RRTMGP (Only for daylit (idxday) points) + ! ####################################################################################### + if (nDay .gt. 0) then + + ! Allocate space for source functions and gas optical properties + call check_error_msg(optical_props_clr%alloc_2str(nday, nlay, kdist_sw_clr)) + call check_error_msg(optical_props_aer%alloc_2str(nday, nlay, kdist_sw_clr)) + + ! Initialize RRTMGP files + fluxAllSky%flux_up => flux_up_allSky + fluxAllsky%flux_dn => flux_dn_allSky + fluxClrSky%flux_up => flux_up_clrSky + fluxClrsky%flux_dn => flux_dn_clrSky + + ! ####################################################################################### + ! 1) Clear-sky fluxes (gaseous-atmosphere + aerosols) + ! ####################################################################################### + ! 1a) Set gas concentrations + print*,'Clear-Sky(SW): Set Gas Concentrations' + call gas_concs_sw%reset() + call check_error_msg(gas_concs_sw%set_vmr('o2', vmr_o2(idxday,1:nlay))) + call check_error_msg(gas_concs_sw%set_vmr('co2', vmr_co2(idxday,1:nlay))) + call check_error_msg(gas_concs_sw%set_vmr('ch4', vmr_ch4(idxday,1:nlay))) + call check_error_msg(gas_concs_sw%set_vmr('n2o', vmr_n2o(idxday,1:nlay))) + call check_error_msg(gas_concs_sw%set_vmr('h2o', vmr_h2o(idxday,1:nlay))) + call check_error_msg(gas_concs_sw%set_vmr('o3', vmr_o3(idxday,1:nlay))) + + ! 1b) Compute the optical properties of the atmosphere and the Planck source functions + ! from pressures, temperatures, and gas concentrations... + print*,'Clear-Sky(SW): Optics' + call check_error_msg(kdist_sw_clr%gas_optics( & + p_lay(idxday,1:nlay)*100., & + p_lev2(idxday,1:nlay+1)*100., & + t_lay(idxday,1:nlay), & + gas_concs_sw, & + optical_props_clr, & + toa_flux)) + + ! 1c) Add contribution from aerosols. Also, apply diffusivity angle + print*,'Clear-Sky(SW): Increment Aerosol' + do iDay=1,nDay + do iGpt=1,nGptsSW + iBand = kdist_sw_clr%convert_gpt2band(iGpt) + optical_props_aer%tau(iDay,1:nlay,iGpt) = tau_aer(idxday(iDay),1:nlay,iBand) + optical_props_aer%ssa(iDay,1:nlay,iGpt) = ssa_aer(idxday(iDay),1:nlay,iBand) + optical_props_aer%g(iDay,1:nlay,iGpt) = asy_aer(idxday(iDay),1:nlay,iBand) + enddo + enddo + call check_error_msg(optical_props_aer%increment(optical_props_clr)) + + ! 1c) Compute the clear-sky broadband fluxes + print*,'Clear-Sky(SW): Fluxes' + call check_error_msg(rte_sw(optical_props_clr, top_at_1, cossza(idxday), toa_flux,& + spread(sfcalb_nir_dir(idxday),1, ncopies = nBandsSW), & + spread(sfcalb_nir_dif(idxday),1, ncopies = nBandsSW), & + fluxClrSky)) + + ! 1d) Compute heating rates + print*,'Clear-Sky(SW): Heating-rates' + call check_error_msg(compute_heating_rate( & + fluxClrSky%flux_up, & + fluxClrSky%flux_dn, & + p_lev2(idxday,1:nlay+1)*100., & + thetaTendClrSky)) + thetaTendAllSky = thetaTendClrSky + + end if ! Daylit days + + ! ####################################################################################### + ! Copy fluxes from RRTGMP types into model radiation types. + ! ####################################################################################### + ! Mandatory outputs + topflx(idxday)%upfxc = fluxAllSky%flux_up(:,nlay+1) + topflx(idxday)%upfx0 = fluxClrSky%flux_up(:,nlay+1) + sfcflx(idxday)%upfxc = fluxAllSky%flux_up(:,1) + sfcflx(idxday)%upfx0 = fluxClrSky%flux_up(:,1) + sfcflx(idxday)%dnfxc = fluxAllSky%flux_dn(:,1) + sfcflx(idxday)%dnfx0 = fluxClrSky%flux_dn(:,1) + cldtau(idxday,:) = 0. + hswc(idxday,:) = thetaTendAllSky + + ! Optional output + if(l_fluxes2D) then + flxprf(idxday,:)%upfxc = fluxAllSky%flux_up + flxprf(idxday,:)%dnfxc = fluxAllSky%flux_dn + flxprf(idxday,:)%upfx0 = fluxClrSky%flux_up + flxprf(idxday,:)%dnfx0 = fluxClrSky%flux_dn + endif + if (l_AllSky_HR_byband) then + do iBand=1,nBandsSW + hswb(idxday,:,iBand) = thetaTendAllSky + end do + endif + if (l_ClrSky_HR) then + hsw0(idxday,:) = thetaTendClrSky + endif + + end subroutine rrtmgp_sw_run + ! ######################################################################################### + ! ######################################################################################### + subroutine rrtmgp_sw_finalize() + end subroutine rrtmgp_sw_finalize + + ! ######################################################################################### + ! Ancillary functions + ! ######################################################################################### + subroutine check_error_msg(error_msg) + character(len=*), intent(in) :: error_msg + + if(error_msg /= "") then + print*,"ERROR(rrtmgp_sw_main.F90): " + print*,trim(error_msg) + return + end if + end subroutine check_error_msg + ! ######################################################################################### + ! ######################################################################################### +end module rrtmgp_sw diff --git a/physics/rrtmgp_sw_post.F90 b/physics/rrtmgp_sw_post.F90 new file mode 100644 index 000000000..2d17a1226 --- /dev/null +++ b/physics/rrtmgp_sw_post.F90 @@ -0,0 +1,154 @@ +!>\file rrtmgp_sw_post +!! This file contains + module rrtmgp_sw_post + contains + +!>\defgroup rrtmgp_sw_post GFS RRTMGP scheme post +!! @{ +!> \section arg_table_rrtmgp_sw_post_init Argument Table +!! + subroutine rrtmgp_sw_post_init () + end subroutine rrtmgp_sw_post_init +! PGI compiler does not accept lines longer than 264 characters, remove during pre-processing +#ifndef __PGI +!> \section arg_table_rrtmgp_sw_post_run Argument Table +!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | +!! |----------------|------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------|----------|------|-----------------------|-----------|--------|----------| +!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | +!! | Grid | GFS_grid_type_instance | Fortran DDT containing FV3-GFS grid and interpolation related data | DDT | 0 | GFS_grid_type | | in | F | +!! | Diag | GFS_diag_type_instance | Fortran DDT containing FV3-GFS diagnotics data | DDT | 0 | GFS_diag_type | | inout | F | +!! | Radtend | GFS_radtend_type_instance | Fortran DDT containing FV3-GFS fields targetted for diagnostic output | DDT | 0 | GFS_radtend_type | | inout | F | +!! | Coupling | GFS_coupling_type_instance | Fortran DDT containing FV3-GFS fields to/from coupling with other components | DDT | 0 | GFS_coupling_type | | inout | F | +!! | im | horizontal_loop_extent | horizontal loop extent | count | 0 | integer | | in | F | +!! | ltp | extra_top_layer | extra top layers | none | 0 | integer | | in | F | +!! | nday | daytime_points_dimension | daytime points dimension | count | 0 | integer | | in | F | +!! | lm | vertical_layer_dimension_for_radiation | number of vertical layers for radiation calculation | count | 0 | integer | | in | F | +!! | kd | vertical_index_difference_between_inout_and_local | vertical index difference between in/out and local | index | 0 | integer | | in | F | +!! | htswc | tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step | total sky heating rate due to shortwave radiation | K s-1 | 2 | real | kind_phys | in | F | +!! | htsw0 | tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_time_step | clear sky heating rates due to shortwave radiation | K s-1 | 2 | real | kind_phys | in | F | +!! | sfcalb1 | surface_albedo_due_to_near_IR_direct | surface albedo due to near IR direct beam | frac | 1 | real | kind_phys | in | F | +!! | sfcalb2 | surface_albedo_due_to_near_IR_diffused | surface albedo due to near IR diffused beam | frac | 1 | real | kind_phys | in | F | +!! | sfcalb3 | surface_albedo_due_to_UV_and_VIS_direct | surface albedo due to UV+VIS direct beam | frac | 1 | real | kind_phys | in | F | +!! | sfcalb4 | surface_albedo_due_to_UV_and_VIS_diffused | surface albedo due to UV+VIS diffused beam | frac | 1 | real | kind_phys | in | F | +!! | scmpsw | components_of_surface_downward_shortwave_fluxes | derived type for special components of surface downward shortwave fluxes | W m-2 | 1 | cmpfsw_type | | inout | F | +!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | +!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! +#endif + subroutine rrtmgp_sw_post_run (Model, Grid, Diag, Radtend, Coupling, & + im, ltp, nday, lm, kd, htswc, htsw0, & + sfcalb1, sfcalb2, sfcalb3, sfcalb4, scmpsw, errmsg, errflg) + + use machine, only: kind_phys + use module_radsw_parameters, only: topfsw_type, sfcfsw_type, & + cmpfsw_type + use GFS_typedefs, only: GFS_coupling_type, & + GFS_control_type, & + GFS_grid_type, & + GFS_radtend_type, & + GFS_diag_type + + implicit none + type(GFS_control_type), intent(in) :: Model + type(GFS_coupling_type), intent(inout) :: Coupling + type(GFS_radtend_type), intent(inout) :: Radtend + type(GFS_grid_type), intent(in) :: Grid + type(GFS_diag_type), intent(inout) :: Diag + integer, intent(in) :: im, lm, kd, nday, ltp + type(cmpfsw_type), dimension(size(Grid%xlon,1)), intent(inout) :: scmpsw + real(kind=kind_phys), dimension(Size(Grid%xlon,1), Model%levr+LTP), intent(in) :: htswc, htsw0 + real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(in) :: sfcalb1, sfcalb2, sfcalb3, sfcalb4 + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + ! Local variables + integer :: i, k1, k + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + + if (Model%lsswr) then + if (nday > 0) then + do k = 1, LM + k1 = k + kd + Radtend%htrsw(1:im,k) = htswc(1:im,k1) + enddo + ! We are assuming that radiative tendencies are from bottom to top + ! --- repopulate the points above levr i.e. LM + if (lm < Model%levs) then + do k = lm,Model%levs + Radtend%htrsw (1:im,k) = Radtend%htrsw (1:im,LM) + enddo + endif + + if (Model%swhtr) then + do k = 1, lm + k1 = k + kd + Radtend%swhc(1:im,k) = htsw0(1:im,k1) + enddo + ! --- repopulate the points above levr i.e. LM + if (lm < Model%levs) then + do k = lm,Model%levs + Radtend%swhc(1:im,k) = Radtend%swhc(1:im,LM) + enddo + endif + endif + +! --- surface down and up spectral component fluxes +!> - Save two spectral bands' surface downward and upward fluxes for +!! output. + + do i=1,im + Coupling%nirbmdi(i) = scmpsw(i)%nirbm + Coupling%nirdfdi(i) = scmpsw(i)%nirdf + Coupling%visbmdi(i) = scmpsw(i)%visbm + Coupling%visdfdi(i) = scmpsw(i)%visdf + + Coupling%nirbmui(i) = scmpsw(i)%nirbm * sfcalb1(i) + Coupling%nirdfui(i) = scmpsw(i)%nirdf * sfcalb2(i) + Coupling%visbmui(i) = scmpsw(i)%visbm * sfcalb3(i) + Coupling%visdfui(i) = scmpsw(i)%visdf * sfcalb4(i) + enddo + + else ! if_nday_block + + Radtend%htrsw(:,:) = 0.0 + + Radtend%sfcfsw = sfcfsw_type( 0.0, 0.0, 0.0, 0.0 ) + Diag%topfsw = topfsw_type( 0.0, 0.0, 0.0 ) + scmpsw = cmpfsw_type( 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ) + + do i=1,im + Coupling%nirbmdi(i) = 0.0 + Coupling%nirdfdi(i) = 0.0 + Coupling%visbmdi(i) = 0.0 + Coupling%visdfdi(i) = 0.0 + + Coupling%nirbmui(i) = 0.0 + Coupling%nirdfui(i) = 0.0 + Coupling%visbmui(i) = 0.0 + Coupling%visdfui(i) = 0.0 + enddo + + if (Model%swhtr) then + Radtend%swhc(:,:) = 0 + endif + + endif ! end_if_nday + +! --- radiation fluxes for other physics processes + do i=1,im + Coupling%sfcnsw(i) = Radtend%sfcfsw(i)%dnfxc - Radtend%sfcfsw(i)%upfxc + Coupling%sfcdsw(i) = Radtend%sfcfsw(i)%dnfxc + enddo + + endif ! end_if_lsswr + + end subroutine rrtmgp_sw_post_run + +!> \section arg_table_rrtmgp_sw_post_finalize Argument Table +!! + subroutine rrtmgp_sw_post_finalize () + end subroutine rrtmgp_sw_post_finalize +!! @} + end module rrtmgp_sw_post diff --git a/physics/rrtmgp_sw_post.xml b/physics/rrtmgp_sw_post.xml new file mode 100644 index 000000000..bab6c6892 --- /dev/null +++ b/physics/rrtmgp_sw_post.xml @@ -0,0 +1,216 @@ + + + + + + + GFS_control_type_instance + Fortran DDT containing FV3-GFS model control parameters + DDT + Model + GFS_control_type + + in + F + MODULE_rrtmgp_sw_post SCHEME_rrtmgp_sw_post SUBROUTINE_rrtmgp_sw_post_run + + + GFS_grid_type_instance + Fortran DDT containing FV3-GFS grid and interpolation related data + DDT + Grid + GFS_grid_type + + in + F + MODULE_rrtmgp_sw_post SCHEME_rrtmgp_sw_post SUBROUTINE_rrtmgp_sw_post_run + + + GFS_diag_type_instance + Fortran DDT containing FV3-GFS diagnotics data + DDT + Diag + GFS_diag_type + + inout + F + MODULE_rrtmgp_sw_post SCHEME_rrtmgp_sw_post SUBROUTINE_rrtmgp_sw_post_run + + + GFS_radtend_type_instance + Fortran DDT containing FV3-GFS fields targetted for diagnostic output + DDT + Radtend + GFS_radtend_type + + inout + F + MODULE_rrtmgp_sw_post SCHEME_rrtmgp_sw_post SUBROUTINE_rrtmgp_sw_post_run + + + GFS_coupling_type_instance + Fortran DDT containing FV3-GFS fields to/from coupling with other components + DDT + Coupling + GFS_coupling_type + + inout + F + MODULE_rrtmgp_sw_post SCHEME_rrtmgp_sw_post SUBROUTINE_rrtmgp_sw_post_run + + + horizontal_loop_extent + horizontal loop extent + count + im + integer + + in + F + MODULE_rrtmgp_sw_post SCHEME_rrtmgp_sw_post SUBROUTINE_rrtmgp_sw_post_run + + + extra_top_layer + extra top layers + none + ltp + integer + + in + F + MODULE_rrtmgp_sw_post SCHEME_rrtmgp_sw_post SUBROUTINE_rrtmgp_sw_post_run + + + daytime_points_dimension + daytime points dimension + count + nday + integer + + in + F + MODULE_rrtmgp_sw_post SCHEME_rrtmgp_sw_post SUBROUTINE_rrtmgp_sw_post_run + + + vertical_layer_dimension_for_radiation + number of vertical layers for radiation calculation + count + lm + integer + + in + F + MODULE_rrtmgp_sw_post SCHEME_rrtmgp_sw_post SUBROUTINE_rrtmgp_sw_post_run + + + vertical_index_difference_between_inout_and_local + vertical index difference between in/out and local + index + kd + integer + + in + F + MODULE_rrtmgp_sw_post SCHEME_rrtmgp_sw_post SUBROUTINE_rrtmgp_sw_post_run + + + tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step + total sky heating rate due to shortwave radiation + K s-1 + htswc + real + (:,:) + in + F + MODULE_rrtmgp_sw_post SCHEME_rrtmgp_sw_post SUBROUTINE_rrtmgp_sw_post_run + + + tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_time_step + clear sky heating rates due to shortwave radiation + K s-1 + htsw0 + real + (:,:) + in + F + MODULE_rrtmgp_sw_post SCHEME_rrtmgp_sw_post SUBROUTINE_rrtmgp_sw_post_run + + + surface_albedo_due_to_near_IR_direct + surface albedo due to near IR direct beam + frac + sfcalb1 + real + (:) + in + F + MODULE_rrtmgp_sw_post SCHEME_rrtmgp_sw_post SUBROUTINE_rrtmgp_sw_post_run + + + surface_albedo_due_to_near_IR_diffused + surface albedo due to near IR diffused beam + frac + sfcalb2 + real + (:) + in + F + MODULE_rrtmgp_sw_post SCHEME_rrtmgp_sw_post SUBROUTINE_rrtmgp_sw_post_run + + + surface_albedo_due_to_UV_and_VIS_direct + surface albedo due to UV+VIS direct beam + frac + sfcalb3 + real + (:) + in + F + MODULE_rrtmgp_sw_post SCHEME_rrtmgp_sw_post SUBROUTINE_rrtmgp_sw_post_run + + + surface_albedo_due_to_UV_and_VIS_diffused + surface albedo due to UV+VIS diffused beam + frac + sfcalb4 + real + (:) + in + F + MODULE_rrtmgp_sw_post SCHEME_rrtmgp_sw_post SUBROUTINE_rrtmgp_sw_post_run + + + components_of_surface_downward_shortwave_fluxes + derived type for special components of surface downward shortwave fluxes + W m-2 + scmpsw + cmpfsw_type + (:) + inout + F + MODULE_rrtmgp_sw_post SCHEME_rrtmgp_sw_post SUBROUTINE_rrtmgp_sw_post_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_rrtmgp_sw_post SCHEME_rrtmgp_sw_post SUBROUTINE_rrtmgp_sw_post_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_rrtmgp_sw_post SCHEME_rrtmgp_sw_post SUBROUTINE_rrtmgp_sw_post_run + + + diff --git a/physics/rrtmgp_sw_pre.F90 b/physics/rrtmgp_sw_pre.F90 new file mode 100644 index 000000000..ba9b1d054 --- /dev/null +++ b/physics/rrtmgp_sw_pre.F90 @@ -0,0 +1,118 @@ +!>\file rrtmgp_sw_pre.f90 +!! This file contains a subroutine to module_radiation_surface::setalb() to +!! setup surface albedo for SW radiation. + module rrtmgp_sw_pre + contains + +!>\defgroup rrtmgp_sw_pre GFS RRTMGP scheme Pre +!! @{ +!> \section arg_table_rrtmgp_sw_pre_init Argument Table +!! + subroutine rrtmgp_sw_pre_init () + end subroutine rrtmgp_sw_pre_init + +!> \section arg_table_rrtmgp_sw_pre_run Argument Table +!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | +!! |----------------|-------------------------------------------|--------------------------------------------------------------------|----------|------|------------------|-----------|--------|----------| +!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | +!! | Grid | GFS_grid_type_instance | Fortran DDT containing FV3-GFS grid and interpolation related data | DDT | 0 | GFS_grid_type | | in | F | +!! | Sfcprop | GFS_sfcprop_type_instance | Fortran DDT containing FV3-GFS surface fields | DDT | 0 | GFS_sfcprop_type | | in | F | +!! | Radtend | GFS_radtend_type_instance | Fortran DDT containing FV3-GFS radiation tendencies | DDT | 0 | GFS_radtend_type | | inout | F | +!! | im | horizontal_loop_extent | horizontal loop extent | count | 0 | integer | | in | F | +!! | nday | daytime_points_dimension | daytime points dimension | count | 0 | integer | | out | F | +!! | idxday | daytime_points | daytime points | index | 1 | integer | | out | F | +!! | tsfg | surface_ground_temperature_for_radiation | surface ground temperature for radiation | K | 1 | real | kind_phys | in | F | +!! | tsfa | surface_air_temperature_for_radiation | lowest model layer air temperature for radiation | K | 1 | real | kind_phys | in | F | +!! | sfcalb1 | surface_albedo_due_to_near_IR_direct | surface albedo due to near IR direct beam | frac | 1 | real | kind_phys | out | F | +!! | sfcalb2 | surface_albedo_due_to_near_IR_diffused | surface albedo due to near IR diffused beam | frac | 1 | real | kind_phys | out | F | +!! | sfcalb3 | surface_albedo_due_to_UV_and_VIS_direct | surface albedo due to UV+VIS direct beam | frac | 1 | real | kind_phys | out | F | +!! | sfcalb4 | surface_albedo_due_to_UV_and_VIS_diffused | surface albedo due to UV+VIS diffused beam | frac | 1 | real | kind_phys | out | F | +!! | alb1d | surface_albedo_perturbation | surface albedo perturbation | frac | 1 | real | kind_phys | in | F | +!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | +!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! + subroutine rrtmgp_sw_pre_run (Model, Grid, Sfcprop, Radtend, im, & + nday, idxday, tsfg, tsfa, sfcalb1, sfcalb2, sfcalb3, sfcalb4, & + alb1d, errmsg, errflg) + + use machine, only: kind_phys + + use GFS_typedefs, only: GFS_control_type, & + GFS_grid_type, & + GFS_radtend_type, & + GFS_sfcprop_type + use module_radiation_surface, only: NF_ALBD, setalb + + implicit none + + type(GFS_control_type), intent(in) :: Model + type(GFS_radtend_type), intent(inout) :: Radtend + type(GFS_sfcprop_type), intent(in) :: Sfcprop + type(GFS_grid_type), intent(in) :: Grid + integer, intent(in) :: im + integer, intent(out) :: nday + integer, dimension(size(Grid%xlon,1)), intent(out) :: idxday + real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(in) :: tsfa, tsfg + real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(out) :: sfcalb1, sfcalb2, sfcalb3, sfcalb4 + real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(in) :: alb1d + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + ! Local variables + integer :: i + real(kind=kind_phys), dimension(size(Grid%xlon,1),NF_ALBD) :: sfcalb + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + +! --- ... start radiation calculations +! remember to set heating rate unit to k/sec! +!> -# Start SW radiation calculations + if (Model%lsswr) then + +!> - Check for daytime points for SW radiation. + nday = 0 + idxday = 0 + do i = 1, IM + if (Radtend%coszen(i) >= 0.0001) then + nday = nday + 1 + idxday(nday) = i + endif + enddo + +!> - Call module_radiation_surface::setalb() to setup surface albedo. +!! for SW radiation. + + call setalb (Sfcprop%slmsk, Sfcprop%snowd, Sfcprop%sncovr,& ! --- inputs: + Sfcprop%snoalb, Sfcprop%zorl, Radtend%coszen,& + tsfg, tsfa, Sfcprop%hprim, Sfcprop%alvsf, & + Sfcprop%alnsf, Sfcprop%alvwf, Sfcprop%alnwf, & + Sfcprop%facsf, Sfcprop%facwf, Sfcprop%fice, & + Sfcprop%tisfc, IM, & + alb1d, Model%pertalb, & ! mg, sfc-perts + sfcalb) ! --- outputs + +!> -# Approximate mean surface albedo from vis- and nir- diffuse values. + Radtend%sfalb(:) = max(0.01, 0.5 * (sfcalb(:,2) + sfcalb(:,4))) + else + nday = 0 + idxday = 0 + sfcalb = 0.0 + endif + + do i = 1, im + sfcalb1(i) = sfcalb(i,1) + sfcalb2(i) = sfcalb(i,2) + sfcalb3(i) = sfcalb(i,3) + sfcalb4(i) = sfcalb(i,4) + enddo + + end subroutine rrtmgp_sw_pre_run + +!> \section arg_table_rrtmgp_sw_pre_finalize Argument Table +!! + subroutine rrtmgp_sw_pre_finalize () + end subroutine rrtmgp_sw_pre_finalize + +!! @} + end module rrtmgp_sw_pre diff --git a/physics/rrtmgp_sw_pre.xml b/physics/rrtmgp_sw_pre.xml new file mode 100644 index 000000000..7bbb578d0 --- /dev/null +++ b/physics/rrtmgp_sw_pre.xml @@ -0,0 +1,183 @@ + + + + + + + GFS_control_type_instance + Fortran DDT containing FV3-GFS model control parameters + DDT + Model + GFS_control_type + + in + F + MODULE_rrtmgp_sw_pre SCHEME_rrtmgp_sw_pre SUBROUTINE_rrtmgp_sw_pre_run + + + GFS_grid_type_instance + Fortran DDT containing FV3-GFS grid and interpolation related data + DDT + Grid + GFS_grid_type + + in + F + MODULE_rrtmgp_sw_pre SCHEME_rrtmgp_sw_pre SUBROUTINE_rrtmgp_sw_pre_run + + + GFS_sfcprop_type_instance + Fortran DDT containing FV3-GFS surface fields + DDT + Sfcprop + GFS_sfcprop_type + + in + F + MODULE_rrtmgp_sw_pre SCHEME_rrtmgp_sw_pre SUBROUTINE_rrtmgp_sw_pre_run + + + GFS_radtend_type_instance + Fortran DDT containing FV3-GFS radiation tendencies + DDT + Radtend + GFS_radtend_type + + inout + F + MODULE_rrtmgp_sw_pre SCHEME_rrtmgp_sw_pre SUBROUTINE_rrtmgp_sw_pre_run + + + horizontal_loop_extent + horizontal loop extent + count + im + integer + + in + F + MODULE_rrtmgp_sw_pre SCHEME_rrtmgp_sw_pre SUBROUTINE_rrtmgp_sw_pre_run + + + daytime_points_dimension + daytime points dimension + count + nday + integer + + out + F + MODULE_rrtmgp_sw_pre SCHEME_rrtmgp_sw_pre SUBROUTINE_rrtmgp_sw_pre_run + + + daytime_points + daytime points + index + idxday + integer + (:) + out + F + MODULE_rrtmgp_sw_pre SCHEME_rrtmgp_sw_pre SUBROUTINE_rrtmgp_sw_pre_run + + + surface_ground_temperature_for_radiation + surface ground temperature for radiation + K + tsfg + real + (:) + in + F + MODULE_rrtmgp_sw_pre SCHEME_rrtmgp_sw_pre SUBROUTINE_rrtmgp_sw_pre_run + + + surface_air_temperature_for_radiation + lowest model layer air temperature for radiation + K + tsfa + real + (:) + in + F + MODULE_rrtmgp_sw_pre SCHEME_rrtmgp_sw_pre SUBROUTINE_rrtmgp_sw_pre_run + + + surface_albedo_due_to_near_IR_direct + surface albedo due to near IR direct beam + frac + sfcalb1 + real + (:) + out + F + MODULE_rrtmgp_sw_pre SCHEME_rrtmgp_sw_pre SUBROUTINE_rrtmgp_sw_pre_run + + + surface_albedo_due_to_near_IR_diffused + surface albedo due to near IR diffused beam + frac + sfcalb2 + real + (:) + out + F + MODULE_rrtmgp_sw_pre SCHEME_rrtmgp_sw_pre SUBROUTINE_rrtmgp_sw_pre_run + + + surface_albedo_due_to_UV_and_VIS_direct + surface albedo due to UV+VIS direct beam + frac + sfcalb3 + real + (:) + out + F + MODULE_rrtmgp_sw_pre SCHEME_rrtmgp_sw_pre SUBROUTINE_rrtmgp_sw_pre_run + + + surface_albedo_due_to_UV_and_VIS_diffused + surface albedo due to UV+VIS diffused beam + frac + sfcalb4 + real + (:) + out + F + MODULE_rrtmgp_sw_pre SCHEME_rrtmgp_sw_pre SUBROUTINE_rrtmgp_sw_pre_run + + + surface_albedo_perturbation + surface albedo perturbation + frac + alb1d + real + (:) + in + F + MODULE_rrtmgp_sw_pre SCHEME_rrtmgp_sw_pre SUBROUTINE_rrtmgp_sw_pre_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_rrtmgp_sw_pre SCHEME_rrtmgp_sw_pre SUBROUTINE_rrtmgp_sw_pre_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_rrtmgp_sw_pre SCHEME_rrtmgp_sw_pre SUBROUTINE_rrtmgp_sw_pre_run + + + From b4510ef93be07dd0d24b49b2a842799fbb588c87 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Tue, 16 Apr 2019 12:26:03 -0600 Subject: [PATCH 005/167] Added SW clear-sky calculation. --- physics/GFS_DCNV_generic_post.xml | 557 ++++++++ physics/GFS_DCNV_generic_pre.xml | 172 +++ physics/GFS_MP_generic_post.xml | 832 +++++++++++ physics/GFS_MP_generic_pre.xml | 150 ++ physics/GFS_PBL_generic_post.xml | 766 ++++++++++ physics/GFS_PBL_generic_pre.xml | 326 +++++ physics/GFS_SCNV_generic_post.xml | 194 +++ physics/GFS_SCNV_generic_pre.xml | 117 ++ physics/GFS_phys_time_vary.xml | 151 ++ physics/GFS_rad_time_vary.xml | 62 + physics/GFS_rrtmg_post.xml | 260 ++++ physics/GFS_rrtmg_pre.xml | 656 +++++++++ physics/GFS_rrtmg_setup.xml | 504 +++++++ physics/GFS_rrtmgp_post.F90 | 210 +++ physics/GFS_rrtmgp_post.xml | 260 ++++ physics/GFS_rrtmgp_pre.F90 | 906 ++++++++++++ physics/GFS_rrtmgp_pre.xml | 656 +++++++++ physics/GFS_rrtmgp_setup.F90 | 869 ++++++++++++ physics/GFS_rrtmgp_setup.xml | 504 +++++++ physics/GFS_suite_interstitial_1.xml | 304 ++++ physics/GFS_suite_interstitial_2.xml | 546 ++++++++ physics/GFS_suite_interstitial_3.xml | 491 +++++++ physics/GFS_suite_interstitial_4.xml | 359 +++++ physics/GFS_suite_interstitial_phys_reset.xml | 51 + physics/GFS_suite_interstitial_rad_reset.xml | 40 + physics/GFS_suite_stateout_reset.xml | 150 ++ physics/GFS_suite_stateout_update.xml | 205 +++ physics/GFS_surface_generic_post.xml | 942 +++++++++++++ physics/GFS_surface_generic_pre.xml | 502 +++++++ physics/GFS_surface_loop_control_part1.xml | 73 + physics/GFS_surface_loop_control_part2.xml | 106 ++ physics/GFS_time_vary_pre.xml | 86 ++ physics/cnvc90.xml | 183 +++ physics/cs_conv.xml | 590 ++++++++ physics/cs_conv_aw_adj.xml | 249 ++++ physics/cs_conv_post.xml | 84 ++ physics/cs_conv_pre.xml | 216 +++ physics/cu_gf_driver.xml | 470 +++++++ physics/cu_gf_driver_post.xml | 106 ++ physics/cu_gf_driver_pre.xml | 172 +++ physics/dcyc2t3.xml | 546 ++++++++ physics/dcyc2t3_post.xml | 73 + physics/get_phi_fv3.xml | 106 ++ physics/get_prs_fv3.xml | 117 ++ physics/gfdl_cloud_microphys.xml | 504 +++++++ physics/gmtb_scm_sfc_flux_spec.xml | 381 +++++ physics/gwdc.xml | 359 +++++ physics/gwdc_post.xml | 227 +++ physics/gwdc_pre.xml | 194 +++ physics/gwdps.xml | 469 +++++++ physics/gwdps_post.xml | 172 +++ physics/gwdps_pre.xml | 150 ++ physics/h2ophys.xml | 161 +++ physics/hedmf.xml | 612 ++++++++ physics/lsm_noah.xml | 856 ++++++++++++ physics/lsm_ruc.xml | 1230 +++++++++++++++++ physics/m_micro.xml | 1152 +++++++++++++++ physics/m_micro_post.xml | 205 +++ physics/m_micro_pre.xml | 381 +++++ physics/machine.xml | 36 + physics/moninshoc.xml | 634 +++++++++ physics/mp_thompson_hrrr.xml | 625 +++++++++ physics/mp_thompson_hrrr_post.xml | 207 +++ physics/mp_thompson_hrrr_pre.xml | 337 +++++ physics/mynnedmf_wrapper.xml | 1052 ++++++++++++++ physics/mynnrad_post.xml | 106 ++ physics/mynnrad_pre.xml | 216 +++ physics/mynnsfc_wrapper.xml | 700 ++++++++++ physics/ozphys.xml | 238 ++++ physics/ozphys_2015.xml | 238 ++++ physics/rayleigh_damp.xml | 205 +++ physics/rrtmg_lw.xml | 524 +++++++ physics/rrtmg_lw_post.xml | 150 ++ physics/rrtmg_lw_pre.xml | 106 ++ physics/rrtmg_sw.xml | 634 +++++++++ physics/rrtmg_sw_post.xml | 216 +++ physics/rrtmg_sw_pre.xml | 183 +++ physics/rrtmgp_lw.xml | 547 ++++++++ physics/rte-rrtmgp | 2 +- physics/samfdeepcnv.xml | 700 ++++++++++ physics/samfshalcnv.xml | 513 +++++++ physics/samfshalcnv_post.xml | 205 +++ physics/satmedmfvdif.xml | 667 +++++++++ physics/sfc_diag.xml | 282 ++++ physics/sfc_diag_post.xml | 227 +++ physics/sfc_ex_coef.xml | 392 ++++++ physics/sfc_nst.xml | 656 +++++++++ physics/sfc_nst_post.xml | 216 +++ physics/sfc_nst_pre.xml | 106 ++ physics/sfc_ocean.xml | 260 ++++ physics/sfc_sice.xml | 469 +++++++ physics/sfc_sice_post.xml | 95 ++ physics/shoc.xml | 645 +++++++++ physics/zhaocarr_gscond.xml | 260 ++++ physics/zhaocarr_precpd.xml | 249 ++++ 95 files changed, 34869 insertions(+), 1 deletion(-) create mode 100644 physics/GFS_DCNV_generic_post.xml create mode 100644 physics/GFS_DCNV_generic_pre.xml create mode 100644 physics/GFS_MP_generic_post.xml create mode 100644 physics/GFS_MP_generic_pre.xml create mode 100644 physics/GFS_PBL_generic_post.xml create mode 100644 physics/GFS_PBL_generic_pre.xml create mode 100644 physics/GFS_SCNV_generic_post.xml create mode 100644 physics/GFS_SCNV_generic_pre.xml create mode 100644 physics/GFS_phys_time_vary.xml create mode 100644 physics/GFS_rad_time_vary.xml create mode 100644 physics/GFS_rrtmg_post.xml create mode 100644 physics/GFS_rrtmg_pre.xml create mode 100644 physics/GFS_rrtmg_setup.xml create mode 100644 physics/GFS_rrtmgp_post.F90 create mode 100644 physics/GFS_rrtmgp_post.xml create mode 100644 physics/GFS_rrtmgp_pre.F90 create mode 100644 physics/GFS_rrtmgp_pre.xml create mode 100644 physics/GFS_rrtmgp_setup.F90 create mode 100644 physics/GFS_rrtmgp_setup.xml create mode 100644 physics/GFS_suite_interstitial_1.xml create mode 100644 physics/GFS_suite_interstitial_2.xml create mode 100644 physics/GFS_suite_interstitial_3.xml create mode 100644 physics/GFS_suite_interstitial_4.xml create mode 100644 physics/GFS_suite_interstitial_phys_reset.xml create mode 100644 physics/GFS_suite_interstitial_rad_reset.xml create mode 100644 physics/GFS_suite_stateout_reset.xml create mode 100644 physics/GFS_suite_stateout_update.xml create mode 100644 physics/GFS_surface_generic_post.xml create mode 100644 physics/GFS_surface_generic_pre.xml create mode 100644 physics/GFS_surface_loop_control_part1.xml create mode 100644 physics/GFS_surface_loop_control_part2.xml create mode 100644 physics/GFS_time_vary_pre.xml create mode 100644 physics/cnvc90.xml create mode 100644 physics/cs_conv.xml create mode 100644 physics/cs_conv_aw_adj.xml create mode 100644 physics/cs_conv_post.xml create mode 100644 physics/cs_conv_pre.xml create mode 100644 physics/cu_gf_driver.xml create mode 100644 physics/cu_gf_driver_post.xml create mode 100644 physics/cu_gf_driver_pre.xml create mode 100644 physics/dcyc2t3.xml create mode 100644 physics/dcyc2t3_post.xml create mode 100644 physics/get_phi_fv3.xml create mode 100644 physics/get_prs_fv3.xml create mode 100644 physics/gfdl_cloud_microphys.xml create mode 100644 physics/gmtb_scm_sfc_flux_spec.xml create mode 100644 physics/gwdc.xml create mode 100644 physics/gwdc_post.xml create mode 100644 physics/gwdc_pre.xml create mode 100644 physics/gwdps.xml create mode 100644 physics/gwdps_post.xml create mode 100644 physics/gwdps_pre.xml create mode 100644 physics/h2ophys.xml create mode 100644 physics/hedmf.xml create mode 100644 physics/lsm_noah.xml create mode 100644 physics/lsm_ruc.xml create mode 100644 physics/m_micro.xml create mode 100644 physics/m_micro_post.xml create mode 100644 physics/m_micro_pre.xml create mode 100644 physics/machine.xml create mode 100644 physics/moninshoc.xml create mode 100644 physics/mp_thompson_hrrr.xml create mode 100644 physics/mp_thompson_hrrr_post.xml create mode 100644 physics/mp_thompson_hrrr_pre.xml create mode 100644 physics/mynnedmf_wrapper.xml create mode 100644 physics/mynnrad_post.xml create mode 100644 physics/mynnrad_pre.xml create mode 100644 physics/mynnsfc_wrapper.xml create mode 100644 physics/ozphys.xml create mode 100644 physics/ozphys_2015.xml create mode 100644 physics/rayleigh_damp.xml create mode 100644 physics/rrtmg_lw.xml create mode 100644 physics/rrtmg_lw_post.xml create mode 100644 physics/rrtmg_lw_pre.xml create mode 100644 physics/rrtmg_sw.xml create mode 100644 physics/rrtmg_sw_post.xml create mode 100644 physics/rrtmg_sw_pre.xml create mode 100644 physics/rrtmgp_lw.xml create mode 100644 physics/samfdeepcnv.xml create mode 100644 physics/samfshalcnv.xml create mode 100644 physics/samfshalcnv_post.xml create mode 100644 physics/satmedmfvdif.xml create mode 100644 physics/sfc_diag.xml create mode 100644 physics/sfc_diag_post.xml create mode 100644 physics/sfc_ex_coef.xml create mode 100644 physics/sfc_nst.xml create mode 100644 physics/sfc_nst_post.xml create mode 100644 physics/sfc_nst_pre.xml create mode 100644 physics/sfc_ocean.xml create mode 100644 physics/sfc_sice.xml create mode 100644 physics/sfc_sice_post.xml create mode 100644 physics/shoc.xml create mode 100644 physics/zhaocarr_gscond.xml create mode 100644 physics/zhaocarr_precpd.xml diff --git a/physics/GFS_DCNV_generic_post.xml b/physics/GFS_DCNV_generic_post.xml new file mode 100644 index 000000000..5c2965b27 --- /dev/null +++ b/physics/GFS_DCNV_generic_post.xml @@ -0,0 +1,557 @@ + + + + + + horizontal_loop_extent + horizontal loop extent + count + im + integer + + in + F + MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run + + + vertical_dimension + vertical layer dimension + count + levs + integer + + in + F + MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run + + + flag_diagnostics + logical flag for storing diagnostics + flag + lssav + logical + + in + F + MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run + + + flag_diagnostics_3D + flag for 3d diagnostic fields + flag + ldiag3d + logical + + in + F + MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run + + + flag_gocart + flag for 3d diagnostic fields for gocart 1 + flag + lgocart + logical + + in + F + MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run + + + flag_for_ras_deep_convection + flag for ras convection scheme + flag + ras + logical + + in + F + MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run + + + flag_for_Chikira_Sugiyama_deep_convection + flag for Chikira-Sugiyama convection + flag + cscnv + logical + + in + F + MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run + + + dynamics_to_physics_timestep_ratio + ratio of dynamics timestep to physics timestep + none + frain + real + + in + F + MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run + + + lwe_thickness_of_deep_convective_precipitation_amount + deep convective rainfall amount on physics timestep + m + rain1 + real + (:) + in + F + MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run + + + time_step_for_dynamics + dynamics timestep + s + dtf + real + + in + F + MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run + + + cloud_work_function + cloud work function + m2 s-2 + cld1d + real + (:) + in + F + MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run + + + x_wind_save + x-wind before entering a physics scheme + m s-1 + save_u + real + (:,:) + in + F + MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run + + + y_wind_save + y-wind before entering a physics scheme + m s-1 + save_v + real + (:,:) + in + F + MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run + + + air_temperature_save + air temperature before entering a physics scheme + K + save_t + real + (:,:) + in + F + MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run + + + water_vapor_specific_humidity_save + water vapor specific humidity before entering a physics scheme + kg kg-1 + save_qv + real + (:,:) + in + F + MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run + + + x_wind_updated_by_physics + zonal wind updated by physics + m s-1 + gu0 + real + (:,:) + in + F + MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run + + + y_wind_updated_by_physics + meridional wind updated by physics + m s-1 + gv0 + real + (:,:) + in + F + MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run + + + air_temperature_updated_by_physics + temperature updated by physics + K + gt0 + real + (:,:) + in + F + MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run + + + water_vapor_specific_humidity_updated_by_physics + water vapor specific humidity updated by physics + kg kg-1 + gq0_water_vapor + real + (:,:) + in + F + MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run + + + instantaneous_atmosphere_updraft_convective_mass_flux + (updraft mass flux) * delt + kg m-2 + ud_mf + real + (:,:) + in + F + MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run + + + instantaneous_atmosphere_downdraft_convective_mass_flux + (downdraft mass flux) * delt + kg m-2 + dd_mf + real + (:,:) + in + F + MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run + + + instantaneous_atmosphere_detrainment_convective_mass_flux + (detrainment mass flux) * delt + kg m-2 + dt_mf + real + (:,:) + in + F + MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run + + + gravitational_acceleration + gravitational acceleration + m s-2 + con_g + real + + in + F + MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run + + + ice_water_mixing_ratio_convective_transport_tracer + moist (dry+vapor, no condensates) mixing ratio of ice water in the convectively transported tracer array + kg kg-1 + clw_ice + real + (:,:) + in + F + MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run + + + cloud_condensed_water_mixing_ratio_convective_transport_tracer + moist (dry+vapor, no condensates) mixing ratio of cloud water (condensate) in the convectively transported tracer array + kg kg-1 + clw_liquid + real + (:,:) + in + F + MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run + + + number_of_3d_arrays_associated_with_pdf-based_clouds + number of 3d arrays associated with pdf based clouds/mp + count + npdf3d + integer + + in + F + MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run + + + array_dimension_of_3d_arrays_for_microphysics + number of 3D arrays needed for microphysics + count + num_p3d + integer + + in + F + MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run + + + number_of_convective_3d_cloud_fields + number of convective 3d clouds fields + count + ncnvcld3d + integer + + in + F + MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run + + + lwe_thickness_of_convective_precipitation_amount_on_dynamics_timestep + convective rain at this time step + m + rainc + real + (:) + inout + F + MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run + + + cumulative_cloud_work_function + cumulative cloud work function (valid only with sas) + m2 s-1 + cldwrk + real + (:) + inout + F + MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run + + + cumulative_lwe_thickness_of_convective_precipitation_amount + cumulative convective precipitation + m + cnvprcp + real + (:) + inout + F + MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run + + + cumulative_lwe_thickness_of_convective_precipitation_amount_in_bucket + cumulative convective precipitation in bucket + m + cnvprcpb + real + (:) + inout + F + MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run + + + cumulative_change_in_temperature_due_to_deep_convection + cumulative change in temperature due to deep conv. + K + dt3dt + real + (:,:) + inout + F + MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run + + + cumulative_change_in_water_vapor_specific_humidity_due_to_deep_convection + cumulative change in water vapor specific humidity due to deep conv. + kg kg-1 + dq3dt + real + (:,:) + inout + F + MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run + + + cumulative_change_in_x_wind_due_to_deep_convection + cumulative change in x wind due to deep convection + m s-1 + du3dt + real + (:,:) + inout + F + MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run + + + cumulative_change_in_y_wind_due_to_deep_convection + cumulative change in y wind due to deep convection + m s-1 + dv3dt + real + (:,:) + inout + F + MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run + + + cumulative_atmosphere_updraft_convective_mass_flux + cumulative updraft mass flux + Pa + upd_mf + real + (:,:) + inout + F + MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run + + + cumulative_atmosphere_downdraft_convective_mass_flux + cumulative downdraft mass flux + Pa + dwn_mf + real + (:,:) + inout + F + MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run + + + cumulative_atmosphere_detrainment_convective_mass_flux + cumulative detrainment mass flux + Pa + det_mf + real + (:,:) + inout + F + MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run + + + instantaneous_water_vapor_specific_humidity_tendency_due_to_convection + instantaneous moisture tendency due to convection + kg kg-1 s-1 + dqdti + real + (:,:) + inout + F + MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run + + + instantaneous_deep_convective_cloud_condensate_mixing_ratio_on_dynamics_time_step + instantaneous total convective condensate mixing ratio + kg kg-1 + cnvqci + real + (:,:) + inout + F + MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run + + + instantaneous_atmosphere_updraft_convective_mass_flux_on_dynamics_timestep + (updraft mass flux) * delt + kg m-2 + upd_mfi + real + (:,:) + inout + F + MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run + + + instantaneous_atmosphere_downdraft_convective_mass_flux_on_dynamics_timestep + (downdraft mass flux) * delt + kg m-2 + dwn_mfi + real + (:,:) + inout + F + MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run + + + instantaneous_atmosphere_detrainment_convective_mass_flux_on_dynamics_timestep + (detrainment mass flux) * delt + kg m-2 + det_mfi + real + (:,:) + inout + F + MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run + + + convective_cloud_water_mixing_ratio + moist convective cloud water mixing ratio + kg kg-1 + cnvw + real + (:,:) + inout + F + MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run + + + convective_cloud_cover + convective cloud cover + frac + cnvc + real + (:,:) + inout + F + MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run + + + convective_cloud_water_mixing_ratio_in_phy_f3d + convective cloud water mixing ratio in the phy_f3d array + kg kg-1 + cnvw_phy_f3d + real + (:,:) + inout + F + MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run + + + convective_cloud_cover_in_phy_f3d + convective cloud cover in the phy_f3d array + frac + cnvc_phy_f3d + real + (:,:) + inout + F + MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run + + + + diff --git a/physics/GFS_DCNV_generic_pre.xml b/physics/GFS_DCNV_generic_pre.xml new file mode 100644 index 000000000..a8cbc0ee4 --- /dev/null +++ b/physics/GFS_DCNV_generic_pre.xml @@ -0,0 +1,172 @@ + + + + + horizontal_loop_extent + horizontal loop extent + count + im + integer + + in + F + MODULE_GFS_DCNV_generic_pre SCHEME_GFS_DCNV_generic_pre SUBROUTINE_GFS_DCNV_generic_pre_run + + + vertical_dimension + vertical layer dimension + count + levs + integer + + in + F + MODULE_GFS_DCNV_generic_pre SCHEME_GFS_DCNV_generic_pre SUBROUTINE_GFS_DCNV_generic_pre_run + + + flag_diagnostics_3D + flag for 3d diagnostic fields + flag + ldiag3d + logical + + in + F + MODULE_GFS_DCNV_generic_pre SCHEME_GFS_DCNV_generic_pre SUBROUTINE_GFS_DCNV_generic_pre_run + + + flag_convective_gravity_wave_drag + flag for conv gravity wave drag + flag + cnvgwd + logical + + in + F + MODULE_GFS_DCNV_generic_pre SCHEME_GFS_DCNV_generic_pre SUBROUTINE_GFS_DCNV_generic_pre_run + + + flag_gocart + flag for 3d diagnostic fields for gocart 1 + flag + lgocart + logical + + in + F + MODULE_GFS_DCNV_generic_pre SCHEME_GFS_DCNV_generic_pre SUBROUTINE_GFS_DCNV_generic_pre_run + + + x_wind_updated_by_physics + zonal wind updated by physics + m s-1 + gu0 + real + (:,:) + in + F + MODULE_GFS_DCNV_generic_pre SCHEME_GFS_DCNV_generic_pre SUBROUTINE_GFS_DCNV_generic_pre_run + + + y_wind_updated_by_physics + meridional wind updated by physics + m s-1 + gv0 + real + (:,:) + in + F + MODULE_GFS_DCNV_generic_pre SCHEME_GFS_DCNV_generic_pre SUBROUTINE_GFS_DCNV_generic_pre_run + + + air_temperature_updated_by_physics + temperature updated by physics + K + gt0 + real + (:,:) + in + F + MODULE_GFS_DCNV_generic_pre SCHEME_GFS_DCNV_generic_pre SUBROUTINE_GFS_DCNV_generic_pre_run + + + water_vapor_specific_humidity_updated_by_physics + water vapor specific humidity updated by physics + kg kg-1 + gq0_water_vapor + real + (:,:) + in + F + MODULE_GFS_DCNV_generic_pre SCHEME_GFS_DCNV_generic_pre SUBROUTINE_GFS_DCNV_generic_pre_run + + + x_wind_save + x-wind before entering a physics scheme + m s-1 + save_u + real + (:,:) + inout + F + MODULE_GFS_DCNV_generic_pre SCHEME_GFS_DCNV_generic_pre SUBROUTINE_GFS_DCNV_generic_pre_run + + + y_wind_save + y-wind before entering a physics scheme + m s-1 + save_v + real + (:,:) + inout + F + MODULE_GFS_DCNV_generic_pre SCHEME_GFS_DCNV_generic_pre SUBROUTINE_GFS_DCNV_generic_pre_run + + + air_temperature_save + air temperature before entering a physics scheme + K + save_t + real + (:,:) + inout + F + MODULE_GFS_DCNV_generic_pre SCHEME_GFS_DCNV_generic_pre SUBROUTINE_GFS_DCNV_generic_pre_run + + + water_vapor_specific_humidity_save + water vapor specific humidity before entering a physics scheme + kg kg-1 + save_qv + real + (:,:) + inout + F + MODULE_GFS_DCNV_generic_pre SCHEME_GFS_DCNV_generic_pre SUBROUTINE_GFS_DCNV_generic_pre_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_GFS_DCNV_generic_pre SCHEME_GFS_DCNV_generic_pre SUBROUTINE_GFS_DCNV_generic_pre_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_GFS_DCNV_generic_pre SCHEME_GFS_DCNV_generic_pre SUBROUTINE_GFS_DCNV_generic_pre_run + + + + + diff --git a/physics/GFS_MP_generic_post.xml b/physics/GFS_MP_generic_post.xml new file mode 100644 index 000000000..3f57fb308 --- /dev/null +++ b/physics/GFS_MP_generic_post.xml @@ -0,0 +1,832 @@ + + + + + + horizontal_loop_extent + horizontal loop extent + count + im + integer + + in + F + MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run + + + horizontal_dimension + horizontal dimension + count + ix + integer + + in + F + MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run + + + vertical_dimension + vertical layer dimension + count + levs + integer + + in + F + MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run + + + index_of_time_step + current time step index + index + kdt + integer + + in + F + MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run + + + array_dimension_of_random_number + second dimension of random number stream for RAS + count + nrcm + integer + + in + F + MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run + + + number_of_hydrometeors + choice of cloud scheme / number of hydrometeors + count + ncld + integer + + in + F + MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run + + + number_of_tracers_for_cloud_condensate + number of tracers for cloud condensate + count + nncl + integer + + in + F + MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run + + + index_for_liquid_cloud_condensate + tracer index for cloud condensate (or liquid water) + index + ntcw + integer + + in + F + MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run + + + number_of_tracers + number of tracers + count + ntrac + integer + + in + F + MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run + + + flag_for_microphysics_scheme + choice of microphysics scheme + flag + imp_physics + integer + + in + F + MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run + + + flag_for_gfdl_microphysics_scheme + choice of GFDL microphysics scheme + flag + imp_physics_gfdl + integer + + in + F + MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run + + + flag_for_thompson_microphysics_scheme + choice of Thompson microphysics scheme + flag + imp_physics_thompson + integer + + in + F + MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run + + + flag_for_precipitation_type_algorithm + flag controls precip type algorithm + flag + cal_pre + logical + + in + F + MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run + + + flag_diagnostics + logical flag for storing diagnostics + flag + lssav + logical + + in + F + MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run + + + flag_diagnostics_3D + flag for 3d diagnostic fields + flag + ldiag3d + logical + + in + F + MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run + + + flag_for_flux_coupling + flag controlling cplflx collection (default off) + flag + cplflx + logical + + in + F + MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run + + + flag_for_chemistry_coupling + flag controlling cplchm collection (default off) + flag + cplchm + logical + + in + F + MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run + + + gravitational_acceleration + gravitational acceleration + m s-2 + con_g + real + + in + F + MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run + + + time_step_for_dynamics + dynamics timestep + s + dtf + real + + in + F + MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run + + + dynamics_to_physics_timestep_ratio + ratio of dynamics timestep to physics timestep + none + frain + real + + in + F + MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run + + + lwe_thickness_of_convective_precipitation_amount_on_dynamics_timestep + convective rain at this time step + m + rainc + real + (:) + in + F + MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run + + + lwe_thickness_of_explicit_precipitation_amount + explicit rainfall amount on physics timestep + m + rain1 + real + (:) + in + F + MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run + + + random_number_array + random number array (0-1) + none + rann + real + (:,:) + in + F + MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run + + + latitude + latitude + radians + xlat + real + (:) + in + F + MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run + + + longitude + longitude + radians + xlon + real + (:) + in + F + MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run + + + air_temperature_updated_by_physics + temperature updated by physics + K + gt0 + real + (:,:) + in + F + MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run + + + tracer_concentration_updated_by_physics + tracer concentration updated by physics + kg kg-1 + gq0 + real + (:,:,:) + in + F + MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run + + + air_pressure + layer mean pressure + Pa + prsl + real + (:,:) + in + F + MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run + + + air_pressure_at_interface + pressure at layer interface + Pa + prsi + real + (:,:) + in + F + MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run + + + geopotential_at_interface + geopotential at model layer interfaces + m2 s-2 + phii + real + (:,:) + in + F + MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run + + + surface_skin_temperature + surface skin temperature + K + tsfc + real + (:) + in + F + MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run + + + lwe_thickness_of_ice_amount_on_dynamics_timestep + ice fall at this time step + m + ice + real + (:) + inout + F + MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run + + + lwe_thickness_of_snow_amount_on_dynamics_timestep + snow fall at this time step + m + snow + real + (:) + inout + F + MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run + + + lwe_thickness_of_graupel_amount_on_dynamics_timestep + graupel fall at this time step + m + graupel + real + (:) + inout + F + MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run + + + air_temperature_save + air temperature before entering a physics scheme + K + save_t + real + (:,:) + in + F + MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run + + + water_vapor_specific_humidity_save + water vapor specific humidity before entering a physics scheme + kg kg-1 + save_qv + real + (:,:) + in + F + MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run + + + lwe_thickness_of_ice_amount + ice fall on physics timestep + m + ice0 + real + (:) + in + F + MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run + + + lwe_thickness_of_snow_amount + snow fall on physics timestep + m + snow0 + real + (:) + in + F + MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run + + + lwe_thickness_of_graupel_amount + graupel fall on physics timestep + m + graupel0 + real + (:) + in + F + MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run + + + air_pressure_difference_between_midlayers + air pressure difference between midlayers + Pa + del + real + (:,:) + in + F + MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run + + + lwe_thickness_of_precipitation_amount_on_dynamics_timestep + total rain at this time step + m + rain + real + (:) + inout + F + MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run + + + dominant_rain_type + dominant rain type + none + domr_diag + real + (:) + inout + F + MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run + + + dominant_freezing_rain_type + dominant freezing rain type + none + domzr_diag + real + (:) + inout + F + MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run + + + dominant_sleet_type + dominant sleet type + none + domip_diag + real + (:) + inout + F + MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run + + + dominant_snow_type + dominant snow type + none + doms_diag + real + (:) + inout + F + MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run + + + nonnegative_lwe_thickness_of_precipitation_amount_on_dynamics_timestep + total precipitation amount in each time step + m + tprcp + real + (:) + inout + F + MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run + + + flag_for_precipitation_type + snow/rain flag for precipitation + flag + srflag + real + (:) + inout + F + MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run + + + accumulated_lwe_thickness_of_precipitation_amount + accumulated total precipitation + m + totprcp + real + (:) + inout + F + MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run + + + accumulated_lwe_thickness_of_ice_amount + accumulated ice precipitation + kg m-2 + totice + real + (:) + inout + F + MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run + + + accumulated_lwe_thickness_of_snow_amount + accumulated snow precipitation + kg m-2 + totsnw + real + (:) + inout + F + MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run + + + accumulated_lwe_thickness_of_graupel_amount + accumulated graupel precipitation + kg m-2 + totgrp + real + (:) + inout + F + MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run + + + accumulated_lwe_thickness_of_precipitation_amount_in_bucket + accumulated total precipitation in bucket + m + totprcpb + real + (:) + inout + F + MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run + + + accumulated_lwe_thickness_of_ice_amount_in_bucket + accumulated ice precipitation in bucket + kg m-2 + toticeb + real + (:) + inout + F + MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run + + + accumulated_lwe_thickness_of_snow_amount_in_bucket + accumulated snow precipitation in bucket + kg m-2 + totsnwb + real + (:) + inout + F + MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run + + + accumulated_lwe_thickness_of_graupel_amount_in_bucket + accumulated graupel precipitation in bucket + kg m-2 + totgrpb + real + (:) + inout + F + MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run + + + cumulative_change_in_temperature_due_to_microphysics + cumulative change in temperature due to microphysics + K + dt3dt + real + (:,:) + inout + F + MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run + + + cumulative_change_in_water_vapor_specific_humidity_due_to_microphysics + cumulative change in water vapor specific humidity due to microphysics + kg kg-1 + dq3dt + real + (:,:) + inout + F + MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run + + + lwe_thickness_of_precipitation_amount_for_coupling + total rain precipitation + m + rain_cpl + real + (:) + inout + F + MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run + + + lwe_thickness_of_convective_precipitation_amount_for_coupling + total convective precipitation + m + rainc_cpl + real + (:) + inout + F + MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run + + + lwe_thickness_of_snow_amount_for_coupling + total snow precipitation + m + snow_cpl + real + (:) + inout + F + MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run + + + column_precipitable_water + precipitable water + kg m-2 + pwat + real + (:) + inout + F + MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run + + + flag_for_stochastic_surface_physics_perturbations + flag for stochastic surface physics perturbations + flag + do_sppt + logical + + in + F + MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run + + + tendency_of_air_temperature_due_to_radiative_heating_on_physics_time_step + temp. change due to radiative heating per time step + K + dtdtr + real + (:,:) + inout + F + MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run + + + tendency_of_air_temperature_due_to_radiative_heating_assuming_clear_sky + clear sky radiative (shortwave + longwave) heating rate at current time + K s-1 + dtdtc + real + (:,:) + in + F + MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run + + + tendency_of_lwe_thickness_of_precipitation_amount_for_coupling + change in rain_cpl (coupling_type) + m + drain_cpl + real + (:) + inout + F + MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run + + + tendency_of_lwe_thickness_of_snow_amount_for_coupling + change in show_cpl (coupling_type) + m + dsnow_cpl + real + (:) + inout + F + MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run + + + flag_for_land_surface_scheme + flag for land surface model + flag + lsm + integer + + in + F + MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run + + + flag_for_ruc_land_surface_scheme + flag for RUC land surface model + flag + lsm_ruc + integer + + in + F + MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run + + + lwe_thickness_of_explicit_rainfall_amount_from_previous_timestep + explicit rainfall from previous timestep + m + raincprv + real + (:) + inout + F + MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run + + + lwe_thickness_of_convective_precipitation_amount_from_previous_timestep + convective_precipitation_amount from previous timestep + m + rainncprv + real + (:) + inout + F + MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run + + + lwe_thickness_of_ice_amount_from_previous_timestep + ice amount from previous timestep + m + iceprv + real + (:) + inout + F + MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run + + + lwe_thickness_of_snow_amount_from_previous_timestep + snow amount from previous timestep + m + snowprv + real + (:) + inout + F + MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run + + + lwe_thickness_of_graupel_amount_from_previous_timestep + graupel amount from previous timestep + m + graupelprv + real + (:) + inout + F + MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run + + + + diff --git a/physics/GFS_MP_generic_pre.xml b/physics/GFS_MP_generic_pre.xml new file mode 100644 index 000000000..4274552e6 --- /dev/null +++ b/physics/GFS_MP_generic_pre.xml @@ -0,0 +1,150 @@ + + + + + + + horizontal_loop_extent + horizontal loop extent + count + im + integer + + in + F + MODULE_GFS_MP_generic_pre SCHEME_GFS_MP_generic_pre SUBROUTINE_GFS_MP_generic_pre_run + + + vertical_dimension + vertical layer dimension + count + levs + integer + + in + F + MODULE_GFS_MP_generic_pre SCHEME_GFS_MP_generic_pre SUBROUTINE_GFS_MP_generic_pre_run + + + flag_diagnostics_3D + logical flag for 3D diagnostics + flag + ldiag3d + logical + + in + F + MODULE_GFS_MP_generic_pre SCHEME_GFS_MP_generic_pre SUBROUTINE_GFS_MP_generic_pre_run + + + flag_for_Arakawa_Wu_adjustment + flag for Arakawa Wu scale-aware adjustment + flag + do_aw + logical + + in + F + MODULE_GFS_MP_generic_pre SCHEME_GFS_MP_generic_pre SUBROUTINE_GFS_MP_generic_pre_run + + + index_for_liquid_cloud_condensate + tracer index for cloud condensate (or liquid water) + index + ntcw + integer + + in + F + MODULE_GFS_MP_generic_pre SCHEME_GFS_MP_generic_pre SUBROUTINE_GFS_MP_generic_pre_run + + + number_of_tracers_for_cloud_condensate + number of tracers for cloud condensate + count + nncl + integer + + in + F + MODULE_GFS_MP_generic_pre SCHEME_GFS_MP_generic_pre SUBROUTINE_GFS_MP_generic_pre_run + + + number_of_tracers + number of tracers + count + ntrac + integer + + in + F + MODULE_GFS_MP_generic_pre SCHEME_GFS_MP_generic_pre SUBROUTINE_GFS_MP_generic_pre_run + + + air_temperature_updated_by_physics + temperature updated by physics + K + gt0 + real + (:,:) + in + F + MODULE_GFS_MP_generic_pre SCHEME_GFS_MP_generic_pre SUBROUTINE_GFS_MP_generic_pre_run + + + tracer_concentration_updated_by_physics + tracer concentration updated by physics + kg kg-1 + gq0 + real + (:,:,:) + in + F + MODULE_GFS_MP_generic_pre SCHEME_GFS_MP_generic_pre SUBROUTINE_GFS_MP_generic_pre_run + + + air_temperature_save + air temperature before entering a physics scheme + K + save_t + real + (:,:) + inout + F + MODULE_GFS_MP_generic_pre SCHEME_GFS_MP_generic_pre SUBROUTINE_GFS_MP_generic_pre_run + + + tracer_concentration_save + tracer concentration before entering a physics scheme + kg kg-1 + save_q + real + (:,:,:) + inout + F + MODULE_GFS_MP_generic_pre SCHEME_GFS_MP_generic_pre SUBROUTINE_GFS_MP_generic_pre_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_GFS_MP_generic_pre SCHEME_GFS_MP_generic_pre SUBROUTINE_GFS_MP_generic_pre_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_GFS_MP_generic_pre SCHEME_GFS_MP_generic_pre SUBROUTINE_GFS_MP_generic_pre_run + + + diff --git a/physics/GFS_PBL_generic_post.xml b/physics/GFS_PBL_generic_post.xml new file mode 100644 index 000000000..41dbad048 --- /dev/null +++ b/physics/GFS_PBL_generic_post.xml @@ -0,0 +1,766 @@ + + + + + + + horizontal_loop_extent + horizontal loop extent + count + im + integer + + in + F + MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run + + + vertical_dimension + vertical layer dimension + count + levs + integer + + in + F + MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run + + + number_of_vertical_diffusion_tracers + number of tracers to diffuse vertically + count + nvdiff + integer + + in + F + MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run + + + number_of_tracers + number of tracers + count + ntrac + integer + + in + F + MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run + + + index_for_water_vapor + tracer index for water vapor (specific humidity) + index + ntqv + integer + + in + F + MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run + + + index_for_liquid_cloud_condensate + tracer index for cloud condensate (or liquid water) + index + ntcw + integer + + in + F + MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run + + + index_for_ice_cloud_condensate + tracer index for ice water + index + ntiw + integer + + in + F + MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run + + + index_for_rain_water + tracer index for rain water + index + ntrw + integer + + in + F + MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run + + + index_for_snow_water + tracer index for snow water + index + ntsw + integer + + in + F + MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run + + + index_for_liquid_cloud_number_concentration + tracer index for liquid number concentration + index + ntlnc + integer + + in + F + MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run + + + index_for_ice_cloud_number_concentration + tracer index for ice number concentration + index + ntinc + integer + + in + F + MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run + + + index_for_water_friendly_aerosols + tracer index for water friendly aerosol + index + ntwa + integer + + in + F + MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run + + + index_for_ice_friendly_aerosols + tracer index for ice friendly aerosol + index + ntia + integer + + in + F + MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run + + + index_for_graupel + tracer index for graupel + index + ntgl + integer + + in + F + MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run + + + index_for_ozone + tracer index for ozone mixing ratio + index + ntoz + integer + + in + F + MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run + + + index_for_turbulent_kinetic_energy + tracer index for turbulent kinetic energy + index + ntke + integer + + in + F + MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run + + + index_for_turbulent_kinetic_energy_vertical_diffusion_tracer + index for turbulent kinetic energy in the vertically diffused tracer array + index + ntkev + integer + + in + F + MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run + + + flag_for_microphysics_scheme + choice of microphysics scheme + flag + imp_physics + integer + + in + F + MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run + + + flag_for_gfdl_microphysics_scheme + choice of GFDL microphysics scheme + flag + imp_physics_gfdl + integer + + in + F + MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run + + + flag_for_thompson_microphysics_scheme + choice of Thompson microphysics scheme + flag + imp_physics_thompson + integer + + in + F + MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run + + + flag_for_wsm6_microphysics_scheme + choice of WSM6 microphysics scheme + flag + imp_physics_wsm6 + integer + + in + F + MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run + + + flag_for_aerosol_physics + flag for aerosol physics + flag + ltaerosol + logical + + in + F + MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run + + + flag_for_flux_coupling + flag controlling cplflx collection (default off) + flag + cplflx + logical + + in + F + MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run + + + flag_diagnostics + logical flag for storing diagnostics + flag + lssav + logical + + in + F + MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run + + + flag_diagnostics_3D + flag for 3d diagnostic fields + flag + ldiag3d + logical + + in + F + MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run + + + flag_idealized_physics + flag for idealized physics + flag + lsidea + logical + + in + F + MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run + + + flag_for_hedmf + flag for hybrid edmf pbl scheme (moninedmf) + flag + hybedmf + logical + + in + F + MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run + + + flag_for_shoc + flag for SHOC + flag + do_shoc + logical + + in + F + MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run + + + flag_for_scale_aware_TKE_moist_EDMF_PBL + flag for scale-aware TKE moist EDMF PBL scheme + flag + satmedmf + logical + + in + F + MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run + + + flag_for_scale_aware_Shinhong_PBL + flag for scale-aware Shinhong PBL scheme + flag + shinhong + logical + + in + F + MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run + + + flag_for_ysu + flag for YSU PBL scheme + flag + do_ysu + logical + + in + F + MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run + + + tendency_of_vertically_diffused_tracer_concentration + updated tendency of the tracers due to vertical diffusion in PBL scheme + kg kg-1 s-1 + dvdftra + real + (:,:,:) + in + F + MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run + + + instantaneous_surface_x_momentum_flux + surface momentum flux in the x-direction valid for current call + Pa + dusfc1 + real + (:) + in + F + MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run + + + instantaneous_surface_y_momentum_flux + surface momentum flux in the y-direction valid for current call + Pa + dvsfc1 + real + (:) + in + F + MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run + + + instantaneous_surface_upward_sensible_heat_flux + surface upward sensible heat flux valid for current call + W m-2 + dtsfc1 + real + (:) + in + F + MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run + + + instantaneous_surface_upward_latent_heat_flux + surface upward latent heat flux valid for current call + W m-2 + dqsfc1 + real + (:) + in + F + MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run + + + time_step_for_dynamics + dynamics timestep + s + dtf + real + + in + F + MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run + + + tendency_of_x_wind_due_to_model_physics + updated tendency of the x wind + m s-2 + dudt + real + (:,:) + in + F + MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run + + + tendency_of_y_wind_due_to_model_physics + updated tendency of the y wind + m s-2 + dvdt + real + (:,:) + in + F + MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run + + + tendency_of_air_temperature_due_to_model_physics + updated tendency of the temperature + K s-1 + dtdt + real + (:,:) + in + F + MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run + + + tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_timestep + total sky sw heating rate + K s-1 + htrsw + real + (:,:) + in + F + MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run + + + tendency_of_air_temperature_due_to_longwave_heating_on_radiation_timestep + total sky lw heating rate + K s-1 + htrlw + real + (:,:) + in + F + MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run + + + zenith_angle_temporal_adjustment_factor_for_shortwave_fluxes + zenith angle temporal adjustment factor for shortwave + none + xmu + real + (:) + in + F + MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run + + + tendency_of_tracers_due_to_model_physics + updated tendency of the tracers due to model physics + kg kg-1 s-1 + dqdt + real + (:,:,:) + inout + F + MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run + + + cumulative_surface_x_momentum_flux_for_coupling_multiplied_by_timestep + cumulative sfc u momentum flux multiplied by timestep + Pa s + dusfc_cpl + real + (:) + inout + F + MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run + + + cumulative_surface_y_momentum_flux_for_coupling_multiplied_by_timestep + cumulative sfc v momentum flux multiplied by timestep + Pa s + dvsfc_cpl + real + (:) + inout + F + MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run + + + cumulative_surface_upward_sensible_heat_flux_for_coupling_multiplied_by_timestep + cumulative sfc sensible heat flux multiplied by timestep + W m-2 s + dtsfc_cpl + real + (:) + inout + F + MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run + + + cumulative_surface_upward_latent_heat_flux_for_coupling_multiplied_by_timestep + cumulative sfc latent heat flux multiplied by timestep + W m-2 s + dqsfc_cpl + real + (:) + inout + F + MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run + + + instantaneous_surface_x_momentum_flux_for_coupling + instantaneous sfc u momentum flux + Pa + dusfci_cpl + real + (:) + inout + F + MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run + + + instantaneous_surface_y_momentum_flux_for_coupling + instantaneous sfc v momentum flux + Pa + dvsfci_cpl + real + (:) + inout + F + MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run + + + instantaneous_surface_upward_sensible_heat_flux_for_coupling + instantaneous sfc sensible heat flux + W m-2 + dtsfci_cpl + real + (:) + inout + F + MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run + + + instantaneous_surface_upward_latent_heat_flux_for_coupling + instantaneous sfc latent heat flux + W m-2 + dqsfci_cpl + real + (:) + inout + F + MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run + + + cumulative_surface_x_momentum_flux_for_diag_multiplied_by_timestep + cumulative sfc x momentum flux multiplied by timestep + Pa s + dusfc_diag + real + (:) + inout + F + MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run + + + cumulative_surface_y_momentum_flux_for_diag_multiplied_by_timestep + cumulative sfc y momentum flux multiplied by timestep + Pa s + dvsfc_diag + real + (:) + inout + F + MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run + + + cumulative_surface_upward_sensible_heat_flux_for_diag_multiplied_by_timestep + cumulative sfc sensible heat flux multiplied by timestep + W m-2 s + dtsfc_diag + real + (:) + inout + F + MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run + + + cumulative_surface_upward_latent_heat_flux_for_diag_multiplied_by_timestep + cumulative sfc latent heat flux multiplied by timestep + W m-2 s + dqsfc_diag + real + (:) + inout + F + MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run + + + instantaneous_surface_x_momentum_flux_for_diag + instantaneous sfc x momentum flux multiplied by timestep + Pa + dusfci_diag + real + (:) + inout + F + MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run + + + instantaneous_surface_y_momentum_flux_for_diag + instantaneous sfc y momentum flux multiplied by timestep + Pa + dvsfci_diag + real + (:) + inout + F + MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run + + + instantaneous_surface_upward_sensible_heat_flux_for_diag + instantaneous sfc sensible heat flux multiplied by timestep + W m-2 + dtsfci_diag + real + (:) + inout + F + MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run + + + instantaneous_surface_upward_latent_heat_flux_for_diag + instantaneous sfc latent heat flux multiplied by timestep + W m-2 + dqsfci_diag + real + (:) + inout + F + MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run + + + cumulative_change_in_temperature_due_to_PBL + cumulative change in temperature due to PBL + K + dt3dt + real + (:,:) + inout + F + MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run + + + cumulative_change_in_x_wind_due_to_PBL + cumulative change in x wind due to PBL + m s-1 + du3dt_PBL + real + (:,:) + inout + F + MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run + + + cumulative_change_in_x_wind_due_to_orographic_gravity_wave_drag + cumulative change in x wind due to orographic gravity wave drag + m s-1 + du3dt_OGWD + real + (:,:) + inout + F + MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run + + + cumulative_change_in_y_wind_due_to_PBL + cumulative change in y wind due to PBL + m s-1 + dv3dt_PBL + real + (:,:) + inout + F + MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run + + + cumulative_change_in_y_wind_due_to_orographic_gravity_wave_drag + cumulative change in y wind due to orographic gravity wave drag + m s-1 + dv3dt_OGWD + real + (:,:) + inout + F + MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run + + + cumulative_change_in_water_vapor_specific_humidity_due_to_PBL + cumulative change in water vapor specific humidity due to PBL + kg kg-1 + dq3dt + real + (:,:) + inout + F + MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run + + + cumulative_change_in_ozone_mixing_ratio_due_to_PBL + cumulative change in ozone mixing ratio due to PBL + kg kg-1 + dq3dt_ozone + real + (:,:) + inout + F + MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run + + + diff --git a/physics/GFS_PBL_generic_pre.xml b/physics/GFS_PBL_generic_pre.xml new file mode 100644 index 000000000..e4213e6ae --- /dev/null +++ b/physics/GFS_PBL_generic_pre.xml @@ -0,0 +1,326 @@ + + + + + horizontal_loop_extent + horizontal loop extent + count + im + integer + + in + F + MODULE_GFS_PBL_generic_pre SCHEME_GFS_PBL_generic_pre SUBROUTINE_GFS_PBL_generic_pre_run + + + vertical_dimension + vertical layer dimension + count + levs + integer + + in + F + MODULE_GFS_PBL_generic_pre SCHEME_GFS_PBL_generic_pre SUBROUTINE_GFS_PBL_generic_pre_run + + + number_of_vertical_diffusion_tracers + number of tracers to diffuse vertically + count + nvdiff + integer + + in + F + MODULE_GFS_PBL_generic_pre SCHEME_GFS_PBL_generic_pre SUBROUTINE_GFS_PBL_generic_pre_run + + + number_of_tracers + number of tracers + count + ntrac + integer + + in + F + MODULE_GFS_PBL_generic_pre SCHEME_GFS_PBL_generic_pre SUBROUTINE_GFS_PBL_generic_pre_run + + + index_for_water_vapor + tracer index for water vapor (specific humidity) + index + ntqv + integer + + in + F + MODULE_GFS_PBL_generic_pre SCHEME_GFS_PBL_generic_pre SUBROUTINE_GFS_PBL_generic_pre_run + + + index_for_liquid_cloud_condensate + tracer index for cloud condensate (or liquid water) + index + ntcw + integer + + in + F + MODULE_GFS_PBL_generic_pre SCHEME_GFS_PBL_generic_pre SUBROUTINE_GFS_PBL_generic_pre_run + + + index_for_ice_cloud_condensate + tracer index for ice water + index + ntiw + integer + + in + F + MODULE_GFS_PBL_generic_pre SCHEME_GFS_PBL_generic_pre SUBROUTINE_GFS_PBL_generic_pre_run + + + index_for_rain_water + tracer index for rain water + index + ntrw + integer + + in + F + MODULE_GFS_PBL_generic_pre SCHEME_GFS_PBL_generic_pre SUBROUTINE_GFS_PBL_generic_pre_run + + + index_for_snow_water + tracer index for snow water + index + ntsw + integer + + in + F + MODULE_GFS_PBL_generic_pre SCHEME_GFS_PBL_generic_pre SUBROUTINE_GFS_PBL_generic_pre_run + + + index_for_liquid_cloud_number_concentration + tracer index for liquid number concentration + index + ntlnc + integer + + in + F + MODULE_GFS_PBL_generic_pre SCHEME_GFS_PBL_generic_pre SUBROUTINE_GFS_PBL_generic_pre_run + + + index_for_ice_cloud_number_concentration + tracer index for ice number concentration + index + ntinc + integer + + in + F + MODULE_GFS_PBL_generic_pre SCHEME_GFS_PBL_generic_pre SUBROUTINE_GFS_PBL_generic_pre_run + + + index_for_water_friendly_aerosols + tracer index for water friendly aerosol + index + ntwa + integer + + in + F + MODULE_GFS_PBL_generic_pre SCHEME_GFS_PBL_generic_pre SUBROUTINE_GFS_PBL_generic_pre_run + + + index_for_ice_friendly_aerosols + tracer index for ice friendly aerosol + index + ntia + integer + + in + F + MODULE_GFS_PBL_generic_pre SCHEME_GFS_PBL_generic_pre SUBROUTINE_GFS_PBL_generic_pre_run + + + index_for_graupel + tracer index for graupel + index + ntgl + integer + + in + F + MODULE_GFS_PBL_generic_pre SCHEME_GFS_PBL_generic_pre SUBROUTINE_GFS_PBL_generic_pre_run + + + index_for_ozone + tracer index for ozone mixing ratio + index + ntoz + integer + + in + F + MODULE_GFS_PBL_generic_pre SCHEME_GFS_PBL_generic_pre SUBROUTINE_GFS_PBL_generic_pre_run + + + index_for_turbulent_kinetic_energy + tracer index for turbulent kinetic energy + index + ntke + integer + + in + F + MODULE_GFS_PBL_generic_pre SCHEME_GFS_PBL_generic_pre SUBROUTINE_GFS_PBL_generic_pre_run + + + index_for_turbulent_kinetic_energy_vertical_diffusion_tracer + index for turbulent kinetic energy in the vertically diffused tracer array + index + ntkev + integer + + in + F + MODULE_GFS_PBL_generic_pre SCHEME_GFS_PBL_generic_pre SUBROUTINE_GFS_PBL_generic_pre_run + + + flag_for_microphysics_scheme + choice of microphysics scheme + flag + imp_physics + integer + + in + F + MODULE_GFS_PBL_generic_pre SCHEME_GFS_PBL_generic_pre SUBROUTINE_GFS_PBL_generic_pre_run + + + flag_for_gfdl_microphysics_scheme + choice of GFDL microphysics scheme + flag + imp_physics_gfdl + integer + + in + F + MODULE_GFS_PBL_generic_pre SCHEME_GFS_PBL_generic_pre SUBROUTINE_GFS_PBL_generic_pre_run + + + flag_for_thompson_microphysics_scheme + choice of Thompson microphysics scheme + flag + imp_physics_thompson + integer + + in + F + MODULE_GFS_PBL_generic_pre SCHEME_GFS_PBL_generic_pre SUBROUTINE_GFS_PBL_generic_pre_run + + + flag_for_wsm6_microphysics_scheme + choice of WSM6 microphysics scheme + flag + imp_physics_wsm6 + integer + + in + F + MODULE_GFS_PBL_generic_pre SCHEME_GFS_PBL_generic_pre SUBROUTINE_GFS_PBL_generic_pre_run + + + flag_for_aerosol_physics + flag for aerosol physics + flag + ltaerosol + logical + + in + F + MODULE_GFS_PBL_generic_pre SCHEME_GFS_PBL_generic_pre SUBROUTINE_GFS_PBL_generic_pre_run + + + flag_for_hedmf + flag for hybrid edmf pbl scheme (moninedmf) + flag + hybedmf + logical + + in + F + MODULE_GFS_PBL_generic_pre SCHEME_GFS_PBL_generic_pre SUBROUTINE_GFS_PBL_generic_pre_run + + + flag_for_shoc + flag for SHOC + flag + do_shoc + logical + + in + F + MODULE_GFS_PBL_generic_pre SCHEME_GFS_PBL_generic_pre SUBROUTINE_GFS_PBL_generic_pre_run + + + flag_for_scale_aware_TKE_moist_EDMF_PBL + flag for scale-aware TKE moist EDMF PBL scheme + flag + satmedmf + logical + + in + F + MODULE_GFS_PBL_generic_pre SCHEME_GFS_PBL_generic_pre SUBROUTINE_GFS_PBL_generic_pre_run + + + tracer_concentration + model layer mean tracer concentration + kg kg-1 + qgrs + real + (:,:,:) + in + F + MODULE_GFS_PBL_generic_pre SCHEME_GFS_PBL_generic_pre SUBROUTINE_GFS_PBL_generic_pre_run + + + vertically_diffused_tracer_concentration + tracer concentration diffused by PBL scheme + kg kg-1 + vdftra + real + (:,:,:) + inout + F + MODULE_GFS_PBL_generic_pre SCHEME_GFS_PBL_generic_pre SUBROUTINE_GFS_PBL_generic_pre_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_GFS_PBL_generic_pre SCHEME_GFS_PBL_generic_pre SUBROUTINE_GFS_PBL_generic_pre_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_GFS_PBL_generic_pre SCHEME_GFS_PBL_generic_pre SUBROUTINE_GFS_PBL_generic_pre_run + + + + + diff --git a/physics/GFS_SCNV_generic_post.xml b/physics/GFS_SCNV_generic_post.xml new file mode 100644 index 000000000..230edf8c3 --- /dev/null +++ b/physics/GFS_SCNV_generic_post.xml @@ -0,0 +1,194 @@ + + + + + horizontal_loop_extent + horizontal loop extent + count + im + integer + + in + F + MODULE_GFS_SCNV_generic_post SCHEME_GFS_SCNV_generic_post SUBROUTINE_GFS_SCNV_generic_post_run + + + vertical_dimension + vertical layer dimension + count + levs + integer + + in + F + MODULE_GFS_SCNV_generic_post SCHEME_GFS_SCNV_generic_post SUBROUTINE_GFS_SCNV_generic_post_run + + + number_of_tracers_for_convective_transport + number of tracers for convective transport + count + nn + integer + + in + F + MODULE_GFS_SCNV_generic_post SCHEME_GFS_SCNV_generic_post SUBROUTINE_GFS_SCNV_generic_post_run + + + flag_diagnostics + logical flag for storing diagnostics + flag + lssav + logical + + in + F + MODULE_GFS_SCNV_generic_post SCHEME_GFS_SCNV_generic_post SUBROUTINE_GFS_SCNV_generic_post_run + + + flag_diagnostics_3D + flag for 3d diagnostic fields + flag + ldiag3d + logical + + in + F + MODULE_GFS_SCNV_generic_post SCHEME_GFS_SCNV_generic_post SUBROUTINE_GFS_SCNV_generic_post_run + + + flag_gocart + flag for 3d diagnostic fields for gocart 1 + flag + lgocart + logical + + in + F + MODULE_GFS_SCNV_generic_post SCHEME_GFS_SCNV_generic_post SUBROUTINE_GFS_SCNV_generic_post_run + + + dynamics_to_physics_timestep_ratio + ratio of dynamics timestep to physics timestep + none + frain + real + + in + F + MODULE_GFS_SCNV_generic_post SCHEME_GFS_SCNV_generic_post SUBROUTINE_GFS_SCNV_generic_post_run + + + air_temperature_updated_by_physics + temperature updated by physics + K + gt0 + real + (:,:) + in + F + MODULE_GFS_SCNV_generic_post SCHEME_GFS_SCNV_generic_post SUBROUTINE_GFS_SCNV_generic_post_run + + + water_vapor_specific_humidity_updated_by_physics + water vapor specific humidity updated by physics + kg kg-1 + gq0_water_vapor + real + (:,:) + in + F + MODULE_GFS_SCNV_generic_post SCHEME_GFS_SCNV_generic_post SUBROUTINE_GFS_SCNV_generic_post_run + + + air_temperature_save + air temperature before entering a physics scheme + K + save_t + real + (:,:) + in + F + MODULE_GFS_SCNV_generic_post SCHEME_GFS_SCNV_generic_post SUBROUTINE_GFS_SCNV_generic_post_run + + + water_vapor_specific_humidity_save + water vapor specific humidity before entering a physics scheme + kg kg-1 + save_qv + real + (:,:) + in + F + MODULE_GFS_SCNV_generic_post SCHEME_GFS_SCNV_generic_post SUBROUTINE_GFS_SCNV_generic_post_run + + + instantaneous_water_vapor_specific_humidity_tendency_due_to_convection + instantaneous moisture tendency due to convection + kg kg-1 s-1 + dqdti + real + (:,:) + inout + F + MODULE_GFS_SCNV_generic_post SCHEME_GFS_SCNV_generic_post SUBROUTINE_GFS_SCNV_generic_post_run + + + cumulative_change_in_temperature_due_to_shal_convection + cumulative change in temperature due to shal conv. + K + dt3dt + real + (:,:) + inout + F + MODULE_GFS_SCNV_generic_post SCHEME_GFS_SCNV_generic_post SUBROUTINE_GFS_SCNV_generic_post_run + + + cumulative_change_in_water_vapor_specific_humidity_due_to_shal_convection + cumulative change in water vapor specific humidity due to shal conv. + kg kg-1 + dq3dt + real + (:,:) + inout + F + MODULE_GFS_SCNV_generic_post SCHEME_GFS_SCNV_generic_post SUBROUTINE_GFS_SCNV_generic_post_run + + + convective_transportable_tracers + array to contain cloud water and other convective trans. tracers + kg kg-1 + clw + real + (:,:,:) + inout + F + MODULE_GFS_SCNV_generic_post SCHEME_GFS_SCNV_generic_post SUBROUTINE_GFS_SCNV_generic_post_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_GFS_SCNV_generic_post SCHEME_GFS_SCNV_generic_post SUBROUTINE_GFS_SCNV_generic_post_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_GFS_SCNV_generic_post SCHEME_GFS_SCNV_generic_post SUBROUTINE_GFS_SCNV_generic_post_run + + + + + diff --git a/physics/GFS_SCNV_generic_pre.xml b/physics/GFS_SCNV_generic_pre.xml new file mode 100644 index 000000000..1a69aa5af --- /dev/null +++ b/physics/GFS_SCNV_generic_pre.xml @@ -0,0 +1,117 @@ + + + + + + + horizontal_loop_extent + horizontal loop extent + count + im + integer + + in + F + MODULE_GFS_SCNV_generic_pre SCHEME_GFS_SCNV_generic_pre SUBROUTINE_GFS_SCNV_generic_pre_run + + + vertical_dimension + vertical layer dimension + count + levs + integer + + in + F + MODULE_GFS_SCNV_generic_pre SCHEME_GFS_SCNV_generic_pre SUBROUTINE_GFS_SCNV_generic_pre_run + + + flag_diagnostics_3D + flag for 3d diagnostic fields + flag + ldiag3d + logical + + in + F + MODULE_GFS_SCNV_generic_pre SCHEME_GFS_SCNV_generic_pre SUBROUTINE_GFS_SCNV_generic_pre_run + + + flag_gocart + flag for 3d diagnostic fields for gocart 1 + flag + lgocart + logical + + in + F + MODULE_GFS_SCNV_generic_pre SCHEME_GFS_SCNV_generic_pre SUBROUTINE_GFS_SCNV_generic_pre_run + + + air_temperature_updated_by_physics + temperature updated by physics + K + gt0 + real + (:,:) + in + F + MODULE_GFS_SCNV_generic_pre SCHEME_GFS_SCNV_generic_pre SUBROUTINE_GFS_SCNV_generic_pre_run + + + water_vapor_specific_humidity_updated_by_physics + water vapor specific humidity updated by physics + kg kg-1 + gq0_water_vapor + real + (:,:) + in + F + MODULE_GFS_SCNV_generic_pre SCHEME_GFS_SCNV_generic_pre SUBROUTINE_GFS_SCNV_generic_pre_run + + + air_temperature_save + air temperature before entering a physics scheme + K + save_t + real + (:,:) + inout + F + MODULE_GFS_SCNV_generic_pre SCHEME_GFS_SCNV_generic_pre SUBROUTINE_GFS_SCNV_generic_pre_run + + + water_vapor_specific_humidity_save + water vapor specific humidity before entering a physics scheme + kg kg-1 + save_qv + real + (:,:) + inout + F + MODULE_GFS_SCNV_generic_pre SCHEME_GFS_SCNV_generic_pre SUBROUTINE_GFS_SCNV_generic_pre_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_GFS_SCNV_generic_pre SCHEME_GFS_SCNV_generic_pre SUBROUTINE_GFS_SCNV_generic_pre_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_GFS_SCNV_generic_pre SCHEME_GFS_SCNV_generic_pre SUBROUTINE_GFS_SCNV_generic_pre_run + + + diff --git a/physics/GFS_phys_time_vary.xml b/physics/GFS_phys_time_vary.xml new file mode 100644 index 000000000..8f5a765ea --- /dev/null +++ b/physics/GFS_phys_time_vary.xml @@ -0,0 +1,151 @@ + + + + + + GFS_grid_type_instance + Fortran DDT containing FV3-GFS grid and interpolation related data + DDT + Grid + GFS_grid_type + + inout + F + MODULE_GFS_phys_time_vary SCHEME_GFS_phys_time_vary SUBROUTINE_GFS_phys_time_vary_init + + + GFS_control_type_instance + Fortran DDT containing FV3-GFS model control parameters + DDT + Model + GFS_control_type + + in + F + MODULE_GFS_phys_time_vary SCHEME_GFS_phys_time_vary SUBROUTINE_GFS_phys_time_vary_init + + + GFS_tbd_type_instance + Fortran DDT containing FV3-GFS miscellaneous data + DDT + Tbd + GFS_tbd_type + + in + F + MODULE_GFS_phys_time_vary SCHEME_GFS_phys_time_vary SUBROUTINE_GFS_phys_time_vary_init + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_GFS_phys_time_vary SCHEME_GFS_phys_time_vary SUBROUTINE_GFS_phys_time_vary_init + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_GFS_phys_time_vary SCHEME_GFS_phys_time_vary SUBROUTINE_GFS_phys_time_vary_init + + + + + GFS_grid_type_instance + Fortran DDT containing FV3-GFS grid and interpolation related data + DDT + Grid + GFS_grid_type + + in + F + MODULE_GFS_phys_time_vary SCHEME_GFS_phys_time_vary SUBROUTINE_GFS_phys_time_vary_run + + + GFS_control_type_instance + Fortran DDT containing FV3-GFS model control parameters + DDT + Model + GFS_control_type + + inout + F + MODULE_GFS_phys_time_vary SCHEME_GFS_phys_time_vary SUBROUTINE_GFS_phys_time_vary_run + + + GFS_tbd_type_instance + Fortran DDT containing FV3-GFS miscellaneous data + DDT + Tbd + GFS_tbd_type + + inout + F + MODULE_GFS_phys_time_vary SCHEME_GFS_phys_time_vary SUBROUTINE_GFS_phys_time_vary_run + + + GFS_sfcprop_type_instance + Fortran DDT containing FV3-GFS surface fields + DDT + Sfcprop + GFS_sfcprop_type + + inout + F + MODULE_GFS_phys_time_vary SCHEME_GFS_phys_time_vary SUBROUTINE_GFS_phys_time_vary_run + + + GFS_cldprop_type_instance + Fortran DDT containing FV3-GFS cloud fields + DDT + Cldprop + GFS_cldprop_type + + inout + F + MODULE_GFS_phys_time_vary SCHEME_GFS_phys_time_vary SUBROUTINE_GFS_phys_time_vary_run + + + GFS_diag_type_instance + Fortran DDT containing FV3-GFS fields targeted for diagnostic output + DDT + Diag + GFS_diag_type + + inout + F + MODULE_GFS_phys_time_vary SCHEME_GFS_phys_time_vary SUBROUTINE_GFS_phys_time_vary_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_GFS_phys_time_vary SCHEME_GFS_phys_time_vary SUBROUTINE_GFS_phys_time_vary_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_GFS_phys_time_vary SCHEME_GFS_phys_time_vary SUBROUTINE_GFS_phys_time_vary_run + + + diff --git a/physics/GFS_rad_time_vary.xml b/physics/GFS_rad_time_vary.xml new file mode 100644 index 000000000..e351dd54c --- /dev/null +++ b/physics/GFS_rad_time_vary.xml @@ -0,0 +1,62 @@ + + + + + + GFS_control_type_instance + Fortran DDT containing FV3-GFS model control parameters + DDT + Model + GFS_control_type + + inout + F + MODULE_GFS_rad_time_vary SCHEME_GFS_rad_time_vary SUBROUTINE_GFS_rad_time_vary_run + + + GFS_statein_type_instance + Fortran DDT containing FV3-GFS prognostic state data in from dycore + DDT + Statein + GFS_statein_type + + in + F + MODULE_GFS_rad_time_vary SCHEME_GFS_rad_time_vary SUBROUTINE_GFS_rad_time_vary_run + + + GFS_tbd_type_instance + Fortran DDT containing FV3-GFS data not yet assigned to a defined container + DDT + Tbd + GFS_tbd_type + + inout + F + MODULE_GFS_rad_time_vary SCHEME_GFS_rad_time_vary SUBROUTINE_GFS_rad_time_vary_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_GFS_rad_time_vary SCHEME_GFS_rad_time_vary SUBROUTINE_GFS_rad_time_vary_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_GFS_rad_time_vary SCHEME_GFS_rad_time_vary SUBROUTINE_GFS_rad_time_vary_run + + + + diff --git a/physics/GFS_rrtmg_post.xml b/physics/GFS_rrtmg_post.xml new file mode 100644 index 000000000..9529d2127 --- /dev/null +++ b/physics/GFS_rrtmg_post.xml @@ -0,0 +1,260 @@ + + + + + + GFS_control_type_instance + Fortran DDT containing FV3-GFS model control parameters + DDT + Model + GFS_control_type + + in + F + MODULE_GFS_rrtmg_post SCHEME_GFS_rrtmg_post SUBROUTINE_GFS_rrtmg_post_run + + + GFS_grid_type_instance + Fortran DDT containing FV3-GFS grid and interpolation related data + DDT + Grid + GFS_grid_type + + in + F + MODULE_GFS_rrtmg_post SCHEME_GFS_rrtmg_post SUBROUTINE_GFS_rrtmg_post_run + + + GFS_diag_type_instance + Fortran DDT containing FV3-GFS diagnotics data + DDT + Diag + GFS_diag_type + + inout + F + MODULE_GFS_rrtmg_post SCHEME_GFS_rrtmg_post SUBROUTINE_GFS_rrtmg_post_run + + + GFS_radtend_type_instance + Fortran DDT containing FV3-GFS radiation tendencies + DDT + Radtend + GFS_radtend_type + + in + F + MODULE_GFS_rrtmg_post SCHEME_GFS_rrtmg_post SUBROUTINE_GFS_rrtmg_post_run + + + GFS_statein_type_instance + Fortran DDT containing FV3-GFS prognostic state data in from dycore + DDT + Statein + GFS_statein_type + + in + F + MODULE_GFS_rrtmg_post SCHEME_GFS_rrtmg_post SUBROUTINE_GFS_rrtmg_post_run + + + GFS_coupling_type_instance + Fortran DDT containing FV3-GFS fields to/from coupling with other components + DDT + Coupling + GFS_coupling_type + + inout + F + MODULE_GFS_rrtmg_post SCHEME_GFS_rrtmg_post SUBROUTINE_GFS_rrtmg_post_run + + + components_of_surface_downward_shortwave_fluxes + derived type for special components of surface downward shortwave fluxes + W m-2 + scmpsw + cmpfsw_type + (:) + in + F + MODULE_GFS_rrtmg_post SCHEME_GFS_rrtmg_post SUBROUTINE_GFS_rrtmg_post_run + + + horizontal_loop_extent + horizontal loop extent + count + im + integer + + in + F + MODULE_GFS_rrtmg_post SCHEME_GFS_rrtmg_post SUBROUTINE_GFS_rrtmg_post_run + + + vertical_layer_dimension_for_radiation + number of vertical layers for radiation calculation + count + lm + integer + + in + F + MODULE_GFS_rrtmg_post SCHEME_GFS_rrtmg_post SUBROUTINE_GFS_rrtmg_post_run + + + extra_top_layer + extra top layers + none + ltp + integer + + in + F + MODULE_GFS_rrtmg_post SCHEME_GFS_rrtmg_post SUBROUTINE_GFS_rrtmg_post_run + + + vertical_index_difference_between_layer_and_upper_bound + vertical index difference between layer and upper bound + index + kt + integer + + in + F + MODULE_GFS_rrtmg_post SCHEME_GFS_rrtmg_post SUBROUTINE_GFS_rrtmg_post_run + + + vertical_index_difference_between_layer_and_lower_bound + vertical index difference between layer and lower bound + index + kb + integer + + in + F + MODULE_GFS_rrtmg_post SCHEME_GFS_rrtmg_post SUBROUTINE_GFS_rrtmg_post_run + + + vertical_index_difference_between_inout_and_local + vertical index difference between in/out and local + index + kd + integer + + in + F + MODULE_GFS_rrtmg_post SCHEME_GFS_rrtmg_post SUBROUTINE_GFS_rrtmg_post_run + + + time_step_for_radiation + radiation time step + s + raddt + real + + in + F + MODULE_GFS_rrtmg_post SCHEME_GFS_rrtmg_post SUBROUTINE_GFS_rrtmg_post_run + + + atmosphere_optical_thickness_due_to_ambient_aerosol_particles + vertical integrated optical depth for various aerosol species + none + aerodp + real + (:,:) + in + F + MODULE_GFS_rrtmg_post SCHEME_GFS_rrtmg_post SUBROUTINE_GFS_rrtmg_post_run + + + cloud_area_fraction_for_radiation + fraction of clouds for low, middle, high, total and BL + frac + cldsa + real + (:,:) + in + F + MODULE_GFS_rrtmg_post SCHEME_GFS_rrtmg_post SUBROUTINE_GFS_rrtmg_post_run + + + model_layer_number_at_cloud_top + vertical indices for low, middle and high cloud tops + index + mtopa + integer + (:,:) + in + F + MODULE_GFS_rrtmg_post SCHEME_GFS_rrtmg_post SUBROUTINE_GFS_rrtmg_post_run + + + model_layer_number_at_cloud_base + vertical indices for low, middle and high cloud bases + index + mbota + integer + (:,:) + in + F + MODULE_GFS_rrtmg_post SCHEME_GFS_rrtmg_post SUBROUTINE_GFS_rrtmg_post_run + + + total_cloud_fraction + layer total cloud fraction + frac + clouds1 + real + (:,:) + in + F + MODULE_GFS_rrtmg_post SCHEME_GFS_rrtmg_post SUBROUTINE_GFS_rrtmg_post_run + + + cloud_optical_depth_layers_at_10mu_band + approx 10mu band layer cloud optical depth + none + cldtaulw + real + (:,:) + in + F + MODULE_GFS_rrtmg_post SCHEME_GFS_rrtmg_post SUBROUTINE_GFS_rrtmg_post_run + + + cloud_optical_depth_layers_at_0.55mu_band + approx .55mu band layer cloud optical depth + none + cldtausw + real + (:,:) + in + F + MODULE_GFS_rrtmg_post SCHEME_GFS_rrtmg_post SUBROUTINE_GFS_rrtmg_post_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_GFS_rrtmg_post SCHEME_GFS_rrtmg_post SUBROUTINE_GFS_rrtmg_post_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_GFS_rrtmg_post SCHEME_GFS_rrtmg_post SUBROUTINE_GFS_rrtmg_post_run + + + + diff --git a/physics/GFS_rrtmg_pre.xml b/physics/GFS_rrtmg_pre.xml new file mode 100644 index 000000000..63f7d8d58 --- /dev/null +++ b/physics/GFS_rrtmg_pre.xml @@ -0,0 +1,656 @@ + + + + + + + GFS_control_type_instance + Fortran DDT containing FV3-GFS model control parameters + DDT + Model + GFS_control_type + + in + F + MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run + + + GFS_grid_type_instance + Fortran DDT containing FV3-GFS grid and interpolation related data + DDT + Grid + GFS_grid_type + + in + F + MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run + + + GFS_sfcprop_type_instance + Fortran DDT containing FV3-GFS surface fields + DDT + Sfcprop + GFS_sfcprop_type + + in + F + MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run + + + GFS_statein_type_instance + Fortran DDT containing FV3-GFS prognostic state data in from dycore + DDT + Statein + GFS_statein_type + + in + F + MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run + + + GFS_tbd_type_instance + Fortran DDT containing FV3-GFS data not yet assigned to a defined container + DDT + Tbd + GFS_tbd_type + + in + F + MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run + + + GFS_cldprop_type_instance + Fortran DDT containing FV3-GFS cloud fields needed by radiation from physics + DDT + Cldprop + GFS_cldprop_type + + in + F + MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run + + + GFS_coupling_type_instance + Fortran DDT containing FV3-GFS fields needed for coupling + DDT + Coupling + GFS_coupling_type + + in + F + MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run + + + GFS_radtend_type_instance + Fortran DDT containing FV3-GFS radiation tendencies + DDT + Radtend + GFS_radtend_type + + inout + F + MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run + + + vertical_layer_dimension_for_radiation + number of vertical layers for radiation calculation + count + lm + integer + + in + F + MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run + + + horizontal_loop_extent + horizontal loop extent + count + im + integer + + in + F + MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run + + + adjusted_vertical_layer_dimension_for_radiation + number of vertical layers for radiation + count + lmk + integer + + in + F + MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run + + + adjusted_vertical_level_dimension_for_radiation + number of vertical levels for radiation + count + lmp + integer + + in + F + MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run + + + vertical_index_difference_between_inout_and_local + vertical index difference between in/out and local + index + kd + integer + + out + F + MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run + + + vertical_index_difference_between_layer_and_upper_bound + vertical index difference between layer and upper bound + index + kt + integer + + out + F + MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run + + + vertical_index_difference_between_layer_and_lower_bound + vertical index difference between layer and lower bound + index + kb + integer + + out + F + MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run + + + time_step_for_radiation + radiation time step + s + raddt + real + + out + F + MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run + + + layer_pressure_thickness_for_radiation + layer pressure thickness on radiation levels + hPa + delp + real + (:,:) + out + F + MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run + + + layer_thickness_for_radiation + layer thickness on radiation levels + km + dz + real + (:,:) + out + F + MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run + + + air_pressure_at_interface_for_radiation_in_hPa + air pressure at vertical interface for radiation calculation + hPa + plvl + real + (:,:) + out + F + MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run + + + air_pressure_at_layer_for_radiation_in_hPa + air pressure at vertical layer for radiation calculation + hPa + plyr + real + (:,:) + out + F + MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run + + + air_temperature_at_interface_for_radiation + air temperature at vertical interface for radiation calculation + K + tlvl + real + (:,:) + out + F + MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run + + + air_temperature_at_layer_for_radiation + air temperature at vertical layer for radiation calculation + K + tlyr + real + (:,:) + out + F + MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run + + + surface_ground_temperature_for_radiation + surface ground temperature for radiation + K + tsfg + real + (:) + out + F + MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run + + + surface_air_temperature_for_radiation + lowest model layer air temperature for radiation + K + tsfa + real + (:) + out + F + MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run + + + water_vapor_specific_humidity_at_layer_for_radiation + water vapor specific humidity at vertical layer for radiation calculation + kg kg-1 + qlyr + real + (:,:) + out + F + MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run + + + ozone_concentration_at_layer_for_radiation + ozone concentration + kg kg-1 + olyr + real + (:,:) + out + F + MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run + + + volume_mixing_ratio_co2 + CO2 volume mixing ratio + kg kg-1 + gasvmr_co2 + real + (:,:) + out + F + MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run + + + volume_mixing_ratio_n2o + N2O volume mixing ratio + kg kg-1 + gasvmr_n2o + real + (:,:) + out + F + MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run + + + volume_mixing_ratio_ch4 + CH4 volume mixing ratio + kg kg-1 + gasvmr_ch4 + real + (:,:) + out + F + MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run + + + volume_mixing_ratio_o2 + O2 volume mixing ratio + kg kg-1 + gasvmr_o2 + real + (:,:) + out + F + MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run + + + volume_mixing_ratio_co + CO volume mixing ratio + kg kg-1 + gasvmr_co + real + (:,:) + out + F + MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run + + + volume_mixing_ratio_cfc11 + CFC11 volume mixing ratio + kg kg-1 + gasvmr_cfc11 + real + (:,:) + out + F + MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run + + + volume_mixing_ratio_cfc12 + CFC12 volume mixing ratio + kg kg-1 + gasvmr_cfc12 + real + (:,:) + out + F + MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run + + + volume_mixing_ratio_cfc22 + CFC22 volume mixing ratio + kg kg-1 + gasvmr_cfc22 + real + (:,:) + out + F + MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run + + + volume_mixing_ratio_ccl4 + CCL4 volume mixing ratio + kg kg-1 + gasvmr_ccl4 + real + (:,:) + out + F + MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run + + + volume_mixing_ratio_cfc113 + CFC113 volume mixing ratio + kg kg-1 + gasvmr_cfc113 + real + (:,:) + out + F + MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run + + + aerosol_optical_depth_for_shortwave_bands_01-16 + aerosol optical depth for shortwave bands 01-16 + none + faersw1 + real + (:,:,:) + out + F + MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run + + + aerosol_single_scattering_albedo_for_shortwave_bands_01-16 + aerosol single scattering albedo for shortwave bands 01-16 + frac + faersw2 + real + (:,:,:) + out + F + MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run + + + aerosol_asymmetry_parameter_for_shortwave_bands_01-16 + aerosol asymmetry parameter for shortwave bands 01-16 + none + faersw3 + real + (:,:,:) + out + F + MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run + + + aerosol_optical_depth_for_longwave_bands_01-16 + aerosol optical depth for longwave bands 01-16 + none + faerlw1 + real + (:,:,:) + out + F + MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run + + + aerosol_single_scattering_albedo_for_longwave_bands_01-16 + aerosol single scattering albedo for longwave bands 01-16 + frac + faerlw2 + real + (:,:,:) + out + F + MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run + + + aerosol_asymmetry_parameter_for_longwave_bands_01-16 + aerosol asymmetry parameter for longwave bands 01-16 + none + faerlw3 + real + (:,:,:) + out + F + MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run + + + atmosphere_optical_thickness_due_to_ambient_aerosol_particles + vertical integrated optical depth for various aerosol species + none + aerodp + real + (:,:) + out + F + MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run + + + total_cloud_fraction + layer total cloud fraction + frac + clouds1 + real + (:,:) + out + F + MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run + + + cloud_liquid_water_path + layer cloud liquid water path + g m-2 + clouds2 + real + (:,:) + out + F + MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run + + + mean_effective_radius_for_liquid_cloud + mean effective radius for liquid cloud + micron + clouds3 + real + (:,:) + out + F + MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run + + + cloud_ice_water_path + layer cloud ice water path + g m-2 + clouds4 + real + (:,:) + out + F + MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run + + + mean_effective_radius_for_ice_cloud + mean effective radius for ice cloud + micron + clouds5 + real + (:,:) + out + F + MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run + + + cloud_rain_water_path + cloud rain water path + g m-2 + clouds6 + real + (:,:) + out + F + MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run + + + mean_effective_radius_for_rain_drop + mean effective radius for rain drop + micron + clouds7 + real + (:,:) + out + F + MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run + + + cloud_snow_water_path + cloud snow water path + g m-2 + clouds8 + real + (:,:) + out + F + MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run + + + mean_effective_radius_for_snow_flake + mean effective radius for snow flake + micron + clouds9 + real + (:,:) + out + F + MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run + + + cloud_area_fraction_for_radiation + fraction of clouds for low, middle,high, total and BL + frac + cldsa + real + (:,:) + out + F + MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run + + + model_layer_number_at_cloud_top + vertical indices for low, middle and high cloud tops + index + mtopa + integer + (:,:) + out + F + MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run + + + model_layer_number_at_cloud_base + vertical indices for low, middle and high cloud bases + index + mbota + integer + (:,:) + out + F + MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run + + + cloud_decorrelation_length + cloud decorrelation length + km + de_lgth + real + (:) + out + F + MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run + + + surface_albedo_perturbation + surface albedo perturbation + frac + alb1d + real + (:) + out + F + MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run + + + diff --git a/physics/GFS_rrtmg_setup.xml b/physics/GFS_rrtmg_setup.xml new file mode 100644 index 000000000..9db0b1aba --- /dev/null +++ b/physics/GFS_rrtmg_setup.xml @@ -0,0 +1,504 @@ + + + + + date_and_time_at_model_initialization + initialization date and time + none + idate + integer + (:) + in + F + MODULE_GFS_rrtmg_setup SCHEME_GFS_rrtmg_setup SUBROUTINE_GFS_rrtmg_setup_run + + + forecast_date_and_time + current forecast date and time + none + jdate + integer + (:) + in + F + MODULE_GFS_rrtmg_setup SCHEME_GFS_rrtmg_setup SUBROUTINE_GFS_rrtmg_setup_run + + + frequency_for_shortwave_radiation + frequency for shortwave radiation + s + deltsw + real + + in + F + MODULE_GFS_rrtmg_setup SCHEME_GFS_rrtmg_setup SUBROUTINE_GFS_rrtmg_setup_run + + + time_step_for_dynamics + dynamics timestep + s + deltim + real + + in + F + MODULE_GFS_rrtmg_setup SCHEME_GFS_rrtmg_setup SUBROUTINE_GFS_rrtmg_setup_run + + + flag_to_calc_sw + logical flags for sw radiation calls + flag + lsswr + logical + + in + F + MODULE_GFS_rrtmg_setup SCHEME_GFS_rrtmg_setup SUBROUTINE_GFS_rrtmg_setup_run + + + mpi_rank + current MPI-rank + index + me + integer + + in + F + MODULE_GFS_rrtmg_setup SCHEME_GFS_rrtmg_setup SUBROUTINE_GFS_rrtmg_setup_run + + + equation_of_time + equation of time (radian) + radians + slag + real + + out + F + MODULE_GFS_rrtmg_setup SCHEME_GFS_rrtmg_setup SUBROUTINE_GFS_rrtmg_setup_run + + + sine_of_solar_declination_angle + sin of the solar declination angle + none + sdec + real + + out + F + MODULE_GFS_rrtmg_setup SCHEME_GFS_rrtmg_setup SUBROUTINE_GFS_rrtmg_setup_run + + + cosine_of_solar_declination_angle + cos of the solar declination angle + none + cdec + real + + out + F + MODULE_GFS_rrtmg_setup SCHEME_GFS_rrtmg_setup SUBROUTINE_GFS_rrtmg_setup_run + + + solar_constant + solar constant (sun-earth distant adjusted) + W m-2 + solcon + real + + out + F + MODULE_GFS_rrtmg_setup SCHEME_GFS_rrtmg_setup SUBROUTINE_GFS_rrtmg_setup_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_GFS_rrtmg_setup SCHEME_GFS_rrtmg_setup SUBROUTINE_GFS_rrtmg_setup_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_GFS_rrtmg_setup SCHEME_GFS_rrtmg_setup SUBROUTINE_GFS_rrtmg_setup_run + + + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_GFS_rrtmg_setup SCHEME_GFS_rrtmg_setup SUBROUTINE_GFS_rrtmg_setup_finalize + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_GFS_rrtmg_setup SCHEME_GFS_rrtmg_setup SUBROUTINE_GFS_rrtmg_setup_finalize + + + + + vertical_sigma_coordinate_for_radiation_initialization + vertical sigma coordinate for radiation initialization + none + si + real + (:) + in + F + MODULE_GFS_rrtmg_setup SCHEME_GFS_rrtmg_setup SUBROUTINE_GFS_rrtmg_setup_init + + + number_of_vertical_layers_for_radiation_calculations + number of vertical levels for radiation calculations + count + levr + integer + + in + F + MODULE_GFS_rrtmg_setup SCHEME_GFS_rrtmg_setup SUBROUTINE_GFS_rrtmg_setup_init + + + flag_for_initial_time-date_control + flag for initial conditions and forcing + flag + ictm + integer + + in + F + MODULE_GFS_rrtmg_setup SCHEME_GFS_rrtmg_setup SUBROUTINE_GFS_rrtmg_setup_init + + + flag_for_solar_constant + use prescribed solar constant + flag + isol + integer + + in + F + MODULE_GFS_rrtmg_setup SCHEME_GFS_rrtmg_setup SUBROUTINE_GFS_rrtmg_setup_init + + + flag_for_using_prescribed_global_mean_co2_value + prescribed global mean value (old opernl) + flag + ico2 + integer + + in + F + MODULE_GFS_rrtmg_setup SCHEME_GFS_rrtmg_setup SUBROUTINE_GFS_rrtmg_setup_init + + + flag_for_default_aerosol_effect_in_shortwave_radiation + default aerosol effect in sw only + flag + iaer + integer + + in + F + MODULE_GFS_rrtmg_setup SCHEME_GFS_rrtmg_setup SUBROUTINE_GFS_rrtmg_setup_init + + + flag_for_using_climatology_albedo + flag for using climatology alb, based on sfc type + flag + ialb + integer + + in + F + MODULE_GFS_rrtmg_setup SCHEME_GFS_rrtmg_setup SUBROUTINE_GFS_rrtmg_setup_init + + + flag_for_surface_emissivity_control + surface emissivity control flag, use fixed value of 1 + flag + iems + integer + + in + F + MODULE_GFS_rrtmg_setup SCHEME_GFS_rrtmg_setup SUBROUTINE_GFS_rrtmg_setup_init + + + index_for_liquid_cloud_condensate + tracer index for cloud condensate (or liquid water) + index + ntcw + integer + + in + F + MODULE_GFS_rrtmg_setup SCHEME_GFS_rrtmg_setup SUBROUTINE_GFS_rrtmg_setup_init + + + array_dimension_of_2d_arrays_for_microphysics + number of 2D arrays needed for microphysics + count + num_p2d + integer + + in + F + MODULE_GFS_rrtmg_setup SCHEME_GFS_rrtmg_setup SUBROUTINE_GFS_rrtmg_setup_init + + + array_dimension_of_3d_arrays_for_microphysics + number of 3D arrays needed for microphysics + count + num_p3d + integer + + in + F + MODULE_GFS_rrtmg_setup SCHEME_GFS_rrtmg_setup SUBROUTINE_GFS_rrtmg_setup_init + + + number_of_3d_arrays_associated_with_pdf-based_clouds + number of 3d arrays associated with pdf based clouds/mp + count + npdf3d + integer + + in + F + MODULE_GFS_rrtmg_setup SCHEME_GFS_rrtmg_setup SUBROUTINE_GFS_rrtmg_setup_init + + + index_for_ozone + tracer index for ozone mixing ratio + index + ntoz + integer + + in + F + MODULE_GFS_rrtmg_setup SCHEME_GFS_rrtmg_setup SUBROUTINE_GFS_rrtmg_setup_init + + + flag_for_max-random_overlap_clouds_for_shortwave_radiation + sw: max-random overlap clouds + flag + iovr_sw + integer + + in + F + MODULE_GFS_rrtmg_setup SCHEME_GFS_rrtmg_setup SUBROUTINE_GFS_rrtmg_setup_init + + + flag_for_max-random_overlap_clouds_for_longwave_radiation + lw: max-random overlap clouds + flag + iovr_lw + integer + + in + F + MODULE_GFS_rrtmg_setup SCHEME_GFS_rrtmg_setup SUBROUTINE_GFS_rrtmg_setup_init + + + flag_for_sw_clouds_without_sub-grid_approximation + flag for sw clouds without sub-grid approximation + flag + isubc_sw + integer + + in + F + MODULE_GFS_rrtmg_setup SCHEME_GFS_rrtmg_setup SUBROUTINE_GFS_rrtmg_setup_init + + + flag_for_lw_clouds_without_sub-grid_approximation + flag for lw clouds without sub-grid approximation + flag + isubc_lw + integer + + in + F + MODULE_GFS_rrtmg_setup SCHEME_GFS_rrtmg_setup SUBROUTINE_GFS_rrtmg_setup_init + + + flag_for_optical_property_for_liquid_clouds_for_shortwave_radiation + sw optical property for liquid clouds + flag + icliq_sw + integer + + in + F + MODULE_GFS_rrtmg_setup SCHEME_GFS_rrtmg_setup SUBROUTINE_GFS_rrtmg_setup_init + + + flag_for_CRICK-proof_cloud_water + flag for CRICK-Proof cloud water + flag + crick_proof + logical + + in + F + MODULE_GFS_rrtmg_setup SCHEME_GFS_rrtmg_setup SUBROUTINE_GFS_rrtmg_setup_init + + + flag_for_cloud_condensate_normalized_by_cloud_cover + flag for cloud condensate normalized by cloud cover + flag + ccnorm + logical + + in + F + MODULE_GFS_rrtmg_setup SCHEME_GFS_rrtmg_setup SUBROUTINE_GFS_rrtmg_setup_init + + + flag_for_microphysics_scheme + choice of microphysics scheme + flag + imp_physics + integer + + in + F + MODULE_GFS_rrtmg_setup SCHEME_GFS_rrtmg_setup SUBROUTINE_GFS_rrtmg_setup_init + + + flag_for_precipitation_effect_on_radiation + radiation precip flag for Ferrier/Moorthi + flag + norad_precip + logical + + in + F + MODULE_GFS_rrtmg_setup SCHEME_GFS_rrtmg_setup SUBROUTINE_GFS_rrtmg_setup_init + + + date_and_time_at_model_initialization_reordered + initialization date and time + none + idate + integer + (:) + in + F + MODULE_GFS_rrtmg_setup SCHEME_GFS_rrtmg_setup SUBROUTINE_GFS_rrtmg_setup_init + + + flag_for_vertical_index_direction_control + flag for vertical index direction control + flag + iflip + integer + + in + F + MODULE_GFS_rrtmg_setup SCHEME_GFS_rrtmg_setup SUBROUTINE_GFS_rrtmg_setup_init + + + horizontal_loop_extent + horizontal loop extent + count + im + integer + + in + F + MODULE_GFS_rrtmg_setup SCHEME_GFS_rrtmg_setup SUBROUTINE_GFS_rrtmg_setup_init + + + aerosol_optical_properties_for_longwave_bands_01-16 + optical properties for longwave bands 01-16 + various + faerlw + real + (:,:,:,:) + in + F + MODULE_GFS_rrtmg_setup SCHEME_GFS_rrtmg_setup SUBROUTINE_GFS_rrtmg_setup_init + + + aerosol_optical_properties_for_shortwave_bands_01-16 + aerosol optical properties for shortwave bands 01-16 + various + faersw + real + (:,:,:,:) + in + F + MODULE_GFS_rrtmg_setup SCHEME_GFS_rrtmg_setup SUBROUTINE_GFS_rrtmg_setup_init + + + atmosphere_optical_thickness_due_to_ambient_aerosol_particles + vertical integrated optical depth for various aerosol species + none + aerodp + real + (:,:) + in + F + MODULE_GFS_rrtmg_setup SCHEME_GFS_rrtmg_setup SUBROUTINE_GFS_rrtmg_setup_init + + + mpi_rank + current MPI-rank + index + me + integer + + in + F + MODULE_GFS_rrtmg_setup SCHEME_GFS_rrtmg_setup SUBROUTINE_GFS_rrtmg_setup_init + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_GFS_rrtmg_setup SCHEME_GFS_rrtmg_setup SUBROUTINE_GFS_rrtmg_setup_init + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_GFS_rrtmg_setup SCHEME_GFS_rrtmg_setup SUBROUTINE_GFS_rrtmg_setup_init + + + diff --git a/physics/GFS_rrtmgp_post.F90 b/physics/GFS_rrtmgp_post.F90 new file mode 100644 index 000000000..3f8d0c1d8 --- /dev/null +++ b/physics/GFS_rrtmgp_post.F90 @@ -0,0 +1,210 @@ +!>\file GFS_rrtmgp_post.f90 +!! This file contains + module GFS_rrtmgp_post + contains + +!>\defgroup GFS_rrtmgp_post GFS RRTMGP Scheme Post +!! @{ +!> \section arg_table_GFS_rrtmgp_post_init Argument Table +!! + subroutine GFS_rrtmgp_post_init () + end subroutine GFS_rrtmgp_post_init + +!> \section arg_table_GFS_rrtmgp_post_run Argument Table +!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | +!! |----------------|---------------------------------------------------------------|-------------------------------------------------------------------------------|----------|------|-------------------|-----------|--------|----------| +!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | +!! | Grid | GFS_grid_type_instance | Fortran DDT containing FV3-GFS grid and interpolation related data | DDT | 0 | GFS_grid_type | | in | F | +!! | Diag | GFS_diag_type_instance | Fortran DDT containing FV3-GFS diagnotics data | DDT | 0 | GFS_diag_type | | inout | F | +!! | Radtend | GFS_radtend_type_instance | Fortran DDT containing FV3-GFS radiation tendencies | DDT | 0 | GFS_radtend_type | | in | F | +!! | Statein | GFS_statein_type_instance | Fortran DDT containing FV3-GFS prognostic state data in from dycore | DDT | 0 | GFS_statein_type | | in | F | +!! | Coupling | GFS_coupling_type_instance | Fortran DDT containing FV3-GFS fields to/from coupling with other components | DDT | 0 | GFS_coupling_type | | inout | F | +!! | scmpsw | components_of_surface_downward_shortwave_fluxes | derived type for special components of surface downward shortwave fluxes | W m-2 | 1 | cmpfsw_type | | in | F | +!! | im | horizontal_loop_extent | horizontal loop extent | count | 0 | integer | | in | F | +!! | lm | vertical_layer_dimension_for_radiation | number of vertical layers for radiation calculation | count | 0 | integer | | in | F | +!! | ltp | extra_top_layer | extra top layers | none | 0 | integer | | in | F | +!! | kt | vertical_index_difference_between_layer_and_upper_bound | vertical index difference between layer and upper bound | index | 0 | integer | | in | F | +!! | kb | vertical_index_difference_between_layer_and_lower_bound | vertical index difference between layer and lower bound | index | 0 | integer | | in | F | +!! | kd | vertical_index_difference_between_inout_and_local | vertical index difference between in/out and local | index | 0 | integer | | in | F | +!! | raddt | time_step_for_radiation | radiation time step | s | 0 | real | kind_phys | in | F | +!! | aerodp | atmosphere_optical_thickness_due_to_ambient_aerosol_particles | vertical integrated optical depth for various aerosol species | none | 2 | real | kind_phys | in | F | +!! | cldsa | cloud_area_fraction_for_radiation | fraction of clouds for low, middle, high, total and BL | frac | 2 | real | kind_phys | in | F | +!! | mtopa | model_layer_number_at_cloud_top | vertical indices for low, middle and high cloud tops | index | 2 | integer | | in | F | +!! | mbota | model_layer_number_at_cloud_base | vertical indices for low, middle and high cloud bases | index | 2 | integer | | in | F | +!! | clouds1 | total_cloud_fraction | layer total cloud fraction | frac | 2 | real | kind_phys | in | F | +!! | cldtaulw | cloud_optical_depth_layers_at_10mu_band | approx 10mu band layer cloud optical depth | none | 2 | real | kind_phys | in | F | +!! | cldtausw | cloud_optical_depth_layers_at_0.55mu_band | approx .55mu band layer cloud optical depth | none | 2 | real | kind_phys | in | F | +!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | +!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! + subroutine GFS_rrtmgp_post_run (Model, Grid, Diag, Radtend, Statein, & + Coupling, scmpsw, im, lm, ltp, kt, kb, kd, raddt, aerodp, & + cldsa, mtopa, mbota, clouds1, cldtaulw, cldtausw, & + errmsg, errflg) + + use machine, only: kind_phys + use GFS_typedefs, only: GFS_statein_type, & + GFS_coupling_type, & + GFS_control_type, & + GFS_grid_type, & + GFS_radtend_type, & + GFS_diag_type + use module_radiation_aerosols, only: NSPC1 + use module_radsw_parameters, only: cmpfsw_type + use module_radlw_parameters, only: topflw_type, sfcflw_type + use module_radsw_parameters, only: topfsw_type, sfcfsw_type + + implicit none + + ! Interface variables + type(GFS_control_type), intent(in) :: Model + type(GFS_grid_type), intent(in) :: Grid + type(GFS_statein_type), intent(in) :: Statein + type(GFS_coupling_type), intent(inout) :: Coupling + type(GFS_radtend_type), intent(in) :: Radtend + type(GFS_diag_type), intent(inout) :: Diag + type(cmpfsw_type), dimension(size(Grid%xlon,1)), intent(in) :: scmpsw + + integer, intent(in) :: im, lm, ltp, kt, kb, kd + real(kind=kind_phys), intent(in) :: raddt + + real(kind=kind_phys), dimension(size(Grid%xlon,1),NSPC1), intent(in) :: aerodp + real(kind=kind_phys), dimension(size(Grid%xlon,1),5), intent(in) :: cldsa + integer, dimension(size(Grid%xlon,1),3), intent(in) :: mbota, mtopa + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(in) :: clouds1 + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(in) :: cldtausw + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(in) :: cldtaulw + + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + + ! Local variables + integer :: i, j, k, k1, itop, ibtc + real(kind=kind_phys) :: tem0d, tem1, tem2 + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + + if (.not. (Model%lsswr .or. Model%lslwr)) return + +!> - For time averaged output quantities (including total-sky and +!! clear-sky SW and LW fluxes at TOA and surface; conventional +!! 3-domain cloud amount, cloud top and base pressure, and cloud top +!! temperature; aerosols AOD, etc.), store computed results in +!! corresponding slots of array fluxr with appropriate time weights. + +! --- ... collect the fluxr data for wrtsfc + + if (Model%lssav) then + if (Model%lsswr) then + do i=1,im + Diag%fluxr(i,34) = Diag%fluxr(i,34) + Model%fhswr*aerodp(i,1) ! total aod at 550nm + Diag%fluxr(i,35) = Diag%fluxr(i,35) + Model%fhswr*aerodp(i,2) ! DU aod at 550nm + Diag%fluxr(i,36) = Diag%fluxr(i,36) + Model%fhswr*aerodp(i,3) ! BC aod at 550nm + Diag%fluxr(i,37) = Diag%fluxr(i,37) + Model%fhswr*aerodp(i,4) ! OC aod at 550nm + Diag%fluxr(i,38) = Diag%fluxr(i,38) + Model%fhswr*aerodp(i,5) ! SU aod at 550nm + Diag%fluxr(i,39) = Diag%fluxr(i,39) + Model%fhswr*aerodp(i,6) ! SS aod at 550nm + enddo + endif + +! --- save lw toa and sfc fluxes + if (Model%lslwr) then + do i=1,im +! --- lw total-sky fluxes + Diag%fluxr(i,1 ) = Diag%fluxr(i,1 ) + Model%fhlwr * Diag%topflw(i)%upfxc ! total sky top lw up + Diag%fluxr(i,19) = Diag%fluxr(i,19) + Model%fhlwr * Radtend%sfcflw(i)%dnfxc ! total sky sfc lw dn + Diag%fluxr(i,20) = Diag%fluxr(i,20) + Model%fhlwr * Radtend%sfcflw(i)%upfxc ! total sky sfc lw up +! --- lw clear-sky fluxes + Diag%fluxr(i,28) = Diag%fluxr(i,28) + Model%fhlwr * Diag%topflw(i)%upfx0 ! clear sky top lw up + Diag%fluxr(i,30) = Diag%fluxr(i,30) + Model%fhlwr * Radtend%sfcflw(i)%dnfx0 ! clear sky sfc lw dn + Diag%fluxr(i,33) = Diag%fluxr(i,33) + Model%fhlwr * Radtend%sfcflw(i)%upfx0 ! clear sky sfc lw up + enddo + endif + +! --- save sw toa and sfc fluxes with proper diurnal sw wgt. coszen=mean cosz over daylight +! part of sw calling interval, while coszdg= mean cosz over entire interval + if (Model%lsswr) then + do i = 1, IM + if (Radtend%coszen(i) > 0.) then +! --- sw total-sky fluxes +! ------------------- + tem0d = Model%fhswr * Radtend%coszdg(i) / Radtend%coszen(i) + Diag%fluxr(i,2 ) = Diag%fluxr(i,2) + Diag%topfsw(i)%upfxc * tem0d ! total sky top sw up + Diag%fluxr(i,3 ) = Diag%fluxr(i,3) + Radtend%sfcfsw(i)%upfxc * tem0d ! total sky sfc sw up + Diag%fluxr(i,4 ) = Diag%fluxr(i,4) + Radtend%sfcfsw(i)%dnfxc * tem0d ! total sky sfc sw dn +! --- sw uv-b fluxes +! -------------- + Diag%fluxr(i,21) = Diag%fluxr(i,21) + scmpsw(i)%uvbfc * tem0d ! total sky uv-b sw dn + Diag%fluxr(i,22) = Diag%fluxr(i,22) + scmpsw(i)%uvbf0 * tem0d ! clear sky uv-b sw dn +! --- sw toa incoming fluxes +! ---------------------- + Diag%fluxr(i,23) = Diag%fluxr(i,23) + Diag%topfsw(i)%dnfxc * tem0d ! top sw dn +! --- sw sfc flux components +! ---------------------- + Diag%fluxr(i,24) = Diag%fluxr(i,24) + scmpsw(i)%visbm * tem0d ! uv/vis beam sw dn + Diag%fluxr(i,25) = Diag%fluxr(i,25) + scmpsw(i)%visdf * tem0d ! uv/vis diff sw dn + Diag%fluxr(i,26) = Diag%fluxr(i,26) + scmpsw(i)%nirbm * tem0d ! nir beam sw dn + Diag%fluxr(i,27) = Diag%fluxr(i,27) + scmpsw(i)%nirdf * tem0d ! nir diff sw dn +! --- sw clear-sky fluxes +! ------------------- + Diag%fluxr(i,29) = Diag%fluxr(i,29) + Diag%topfsw(i)%upfx0 * tem0d ! clear sky top sw up + Diag%fluxr(i,31) = Diag%fluxr(i,31) + Radtend%sfcfsw(i)%upfx0 * tem0d ! clear sky sfc sw up + Diag%fluxr(i,32) = Diag%fluxr(i,32) + Radtend%sfcfsw(i)%dnfx0 * tem0d ! clear sky sfc sw dn + endif + enddo + endif + +! --- save total and boundary layer clouds + + if (Model%lsswr .or. Model%lslwr) then + do i=1,im + Diag%fluxr(i,17) = Diag%fluxr(i,17) + raddt * cldsa(i,4) + Diag%fluxr(i,18) = Diag%fluxr(i,18) + raddt * cldsa(i,5) + enddo + +! --- save cld frac,toplyr,botlyr and top temp, note that the order +! of h,m,l cloud is reversed for the fluxr output. +! --- save interface pressure (pa) of top/bot + + do j = 1, 3 + do i = 1, IM + tem0d = raddt * cldsa(i,j) + itop = mtopa(i,j) - kd + ibtc = mbota(i,j) - kd + Diag%fluxr(i, 8-j) = Diag%fluxr(i, 8-j) + tem0d + Diag%fluxr(i,11-j) = Diag%fluxr(i,11-j) + tem0d * Statein%prsi(i,itop+kt) + Diag%fluxr(i,14-j) = Diag%fluxr(i,14-j) + tem0d * Statein%prsi(i,ibtc+kb) + Diag%fluxr(i,17-j) = Diag%fluxr(i,17-j) + tem0d * Statein%tgrs(i,itop) + +! Anning adds optical depth and emissivity output + tem1 = 0. + tem2 = 0. + do k=ibtc,itop + tem1 = tem1 + cldtausw(i,k) ! approx .55 mu channel + tem2 = tem2 + cldtaulw(i,k) ! approx 10. mu channel + enddo + Diag%fluxr(i,43-j) = Diag%fluxr(i,43-j) + tem0d * tem1 + Diag%fluxr(i,46-j) = Diag%fluxr(i,46-j) + tem0d * (1.0-exp(-tem2)) + enddo + enddo + endif + +! if (.not. Model%uni_cld) then + if (Model%lgocart .or. Model%ldiag3d) then + do k = 1, LM + k1 = k + kd + Coupling%cldcovi(1:im,k) = clouds1(1:im,k1) + enddo + endif + endif ! end_if_lssav +! + end subroutine GFS_rrtmgp_post_run + +!> \section arg_table_GFS_rrtmgp_post_finalize Argument Table +!! + subroutine GFS_rrtmgp_post_finalize () + end subroutine GFS_rrtmgp_post_finalize + +!! @} + end module GFS_rrtmgp_post diff --git a/physics/GFS_rrtmgp_post.xml b/physics/GFS_rrtmgp_post.xml new file mode 100644 index 000000000..88bf0af99 --- /dev/null +++ b/physics/GFS_rrtmgp_post.xml @@ -0,0 +1,260 @@ + + + + + + GFS_control_type_instance + Fortran DDT containing FV3-GFS model control parameters + DDT + Model + GFS_control_type + + in + F + MODULE_GFS_rrtmgp_post SCHEME_GFS_rrtmgp_post SUBROUTINE_GFS_rrtmgp_post_run + + + GFS_grid_type_instance + Fortran DDT containing FV3-GFS grid and interpolation related data + DDT + Grid + GFS_grid_type + + in + F + MODULE_GFS_rrtmgp_post SCHEME_GFS_rrtmgp_post SUBROUTINE_GFS_rrtmgp_post_run + + + GFS_diag_type_instance + Fortran DDT containing FV3-GFS diagnotics data + DDT + Diag + GFS_diag_type + + inout + F + MODULE_GFS_rrtmgp_post SCHEME_GFS_rrtmgp_post SUBROUTINE_GFS_rrtmgp_post_run + + + GFS_radtend_type_instance + Fortran DDT containing FV3-GFS radiation tendencies + DDT + Radtend + GFS_radtend_type + + in + F + MODULE_GFS_rrtmgp_post SCHEME_GFS_rrtmgp_post SUBROUTINE_GFS_rrtmgp_post_run + + + GFS_statein_type_instance + Fortran DDT containing FV3-GFS prognostic state data in from dycore + DDT + Statein + GFS_statein_type + + in + F + MODULE_GFS_rrtmgp_post SCHEME_GFS_rrtmgp_post SUBROUTINE_GFS_rrtmgp_post_run + + + GFS_coupling_type_instance + Fortran DDT containing FV3-GFS fields to/from coupling with other components + DDT + Coupling + GFS_coupling_type + + inout + F + MODULE_GFS_rrtmgp_post SCHEME_GFS_rrtmgp_post SUBROUTINE_GFS_rrtmgp_post_run + + + components_of_surface_downward_shortwave_fluxes + derived type for special components of surface downward shortwave fluxes + W m-2 + scmpsw + cmpfsw_type + (:) + in + F + MODULE_GFS_rrtmgp_post SCHEME_GFS_rrtmgp_post SUBROUTINE_GFS_rrtmgp_post_run + + + horizontal_loop_extent + horizontal loop extent + count + im + integer + + in + F + MODULE_GFS_rrtmgp_post SCHEME_GFS_rrtmgp_post SUBROUTINE_GFS_rrtmgp_post_run + + + vertical_layer_dimension_for_radiation + number of vertical layers for radiation calculation + count + lm + integer + + in + F + MODULE_GFS_rrtmgp_post SCHEME_GFS_rrtmgp_post SUBROUTINE_GFS_rrtmgp_post_run + + + extra_top_layer + extra top layers + none + ltp + integer + + in + F + MODULE_GFS_rrtmgp_post SCHEME_GFS_rrtmgp_post SUBROUTINE_GFS_rrtmgp_post_run + + + vertical_index_difference_between_layer_and_upper_bound + vertical index difference between layer and upper bound + index + kt + integer + + in + F + MODULE_GFS_rrtmgp_post SCHEME_GFS_rrtmgp_post SUBROUTINE_GFS_rrtmgp_post_run + + + vertical_index_difference_between_layer_and_lower_bound + vertical index difference between layer and lower bound + index + kb + integer + + in + F + MODULE_GFS_rrtmgp_post SCHEME_GFS_rrtmgp_post SUBROUTINE_GFS_rrtmgp_post_run + + + vertical_index_difference_between_inout_and_local + vertical index difference between in/out and local + index + kd + integer + + in + F + MODULE_GFS_rrtmgp_post SCHEME_GFS_rrtmgp_post SUBROUTINE_GFS_rrtmgp_post_run + + + time_step_for_radiation + radiation time step + s + raddt + real + + in + F + MODULE_GFS_rrtmgp_post SCHEME_GFS_rrtmgp_post SUBROUTINE_GFS_rrtmgp_post_run + + + atmosphere_optical_thickness_due_to_ambient_aerosol_particles + vertical integrated optical depth for various aerosol species + none + aerodp + real + (:,:) + in + F + MODULE_GFS_rrtmgp_post SCHEME_GFS_rrtmgp_post SUBROUTINE_GFS_rrtmgp_post_run + + + cloud_area_fraction_for_radiation + fraction of clouds for low, middle, high, total and BL + frac + cldsa + real + (:,:) + in + F + MODULE_GFS_rrtmgp_post SCHEME_GFS_rrtmgp_post SUBROUTINE_GFS_rrtmgp_post_run + + + model_layer_number_at_cloud_top + vertical indices for low, middle and high cloud tops + index + mtopa + integer + (:,:) + in + F + MODULE_GFS_rrtmgp_post SCHEME_GFS_rrtmgp_post SUBROUTINE_GFS_rrtmgp_post_run + + + model_layer_number_at_cloud_base + vertical indices for low, middle and high cloud bases + index + mbota + integer + (:,:) + in + F + MODULE_GFS_rrtmgp_post SCHEME_GFS_rrtmgp_post SUBROUTINE_GFS_rrtmgp_post_run + + + total_cloud_fraction + layer total cloud fraction + frac + clouds1 + real + (:,:) + in + F + MODULE_GFS_rrtmgp_post SCHEME_GFS_rrtmgp_post SUBROUTINE_GFS_rrtmgp_post_run + + + cloud_optical_depth_layers_at_10mu_band + approx 10mu band layer cloud optical depth + none + cldtaulw + real + (:,:) + in + F + MODULE_GFS_rrtmgp_post SCHEME_GFS_rrtmgp_post SUBROUTINE_GFS_rrtmgp_post_run + + + cloud_optical_depth_layers_at_0.55mu_band + approx .55mu band layer cloud optical depth + none + cldtausw + real + (:,:) + in + F + MODULE_GFS_rrtmgp_post SCHEME_GFS_rrtmgp_post SUBROUTINE_GFS_rrtmgp_post_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_GFS_rrtmgp_post SCHEME_GFS_rrtmgp_post SUBROUTINE_GFS_rrtmgp_post_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_GFS_rrtmgp_post SCHEME_GFS_rrtmgp_post SUBROUTINE_GFS_rrtmgp_post_run + + + + diff --git a/physics/GFS_rrtmgp_pre.F90 b/physics/GFS_rrtmgp_pre.F90 new file mode 100644 index 000000000..a9669cf6d --- /dev/null +++ b/physics/GFS_rrtmgp_pre.F90 @@ -0,0 +1,906 @@ +!> \file GFS_rrtmgp_pre.f90 +!! This file contains + module GFS_rrtmgp_pre + + public GFS_rrtmgp_pre_run + + contains + +!> \defgroup GFS_rrtmgp_pre GFS RRTMGP Scheme Pre +!! @{ +!! \section arg_table_GFS_rrtmgp_pre_init Argument Table +!! + subroutine GFS_rrtmgp_pre_init () + open(58,file='GFS_rrtmgp_aux_dump.txt',status='unknown') + end subroutine GFS_rrtmgp_pre_init + +!> \section arg_table_GFS_rrtmgp_pre_run Argument Table +!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | +!! |-------------------|---------------------------------------------------------------|-------------------------------------------------------------------------------|----------|------|------------------|-----------|--------|----------| +!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | +!! | Grid | GFS_grid_type_instance | Fortran DDT containing FV3-GFS grid and interpolation related data | DDT | 0 | GFS_grid_type | | in | F | +!! | Sfcprop | GFS_sfcprop_type_instance | Fortran DDT containing FV3-GFS surface fields | DDT | 0 | GFS_sfcprop_type | | in | F | +!! | Statein | GFS_statein_type_instance | Fortran DDT containing FV3-GFS prognostic state data in from dycore | DDT | 0 | GFS_statein_type | | in | F | +!! | Tbd | GFS_tbd_type_instance | Fortran DDT containing FV3-GFS data not yet assigned to a defined container | DDT | 0 | GFS_tbd_type | | in | F | +!! | Cldprop | GFS_cldprop_type_instance | Fortran DDT containing FV3-GFS cloud fields needed by radiation from physics | DDT | 0 | GFS_cldprop_type | | in | F | +!! | Coupling | GFS_coupling_type_instance | Fortran DDT containing FV3-GFS fields needed for coupling | DDT | 0 | GFS_coupling_type| | in | F | +!! | Radtend | GFS_radtend_type_instance | Fortran DDT containing FV3-GFS radiation tendencies | DDT | 0 | GFS_radtend_type | | inout | F | +!! | lm | vertical_layer_dimension_for_radiation | number of vertical layers for radiation calculation | count | 0 | integer | | in | F | +!! | im | horizontal_loop_extent | horizontal loop extent | count | 0 | integer | | in | F | +!! | lmk | adjusted_vertical_layer_dimension_for_radiation | number of vertical layers for radiation | count | 0 | integer | | in | F | +!! | lmp | adjusted_vertical_level_dimension_for_radiation | number of vertical levels for radiation | count | 0 | integer | | in | F | +!! | kd | vertical_index_difference_between_inout_and_local | vertical index difference between in/out and local | index | 0 | integer | | out | F | +!! | kt | vertical_index_difference_between_layer_and_upper_bound | vertical index difference between layer and upper bound | index | 0 | integer | | out | F | +!! | kb | vertical_index_difference_between_layer_and_lower_bound | vertical index difference between layer and lower bound | index | 0 | integer | | out | F | +!! | raddt | time_step_for_radiation | radiation time step | s | 0 | real | kind_phys | out | F | +!! | delp | layer_pressure_thickness_for_radiation | layer pressure thickness on radiation levels | hPa | 2 | real | kind_phys | out | F | +!! | dz | layer_thickness_for_radiation | layer thickness on radiation levels | km | 2 | real | kind_phys | out | F | +!! | plvl | air_pressure_at_interface_for_radiation_in_hPa | air pressure at vertical interface for radiation calculation | hPa | 2 | real | kind_phys | out | F | +!! | plyr | air_pressure_at_layer_for_radiation_in_hPa | air pressure at vertical layer for radiation calculation | hPa | 2 | real | kind_phys | out | F | +!! | tlvl | air_temperature_at_interface_for_radiation | air temperature at vertical interface for radiation calculation | K | 2 | real | kind_phys | out | F | +!! | tlyr | air_temperature_at_layer_for_radiation | air temperature at vertical layer for radiation calculation | K | 2 | real | kind_phys | out | F | +!! | tsfg | surface_ground_temperature_for_radiation | surface ground temperature for radiation | K | 1 | real | kind_phys | out | F | +!! | tsfa | surface_air_temperature_for_radiation | lowest model layer air temperature for radiation | K | 1 | real | kind_phys | out | F | +!! | qlyr | water_vapor_specific_humidity_at_layer_for_radiation | water vapor specific humidity at vertical layer for radiation calculation | kg kg-1 | 2 | real | kind_phys | out | F | +!! | olyr | ozone_concentration_at_layer_for_radiation | ozone concentration | kg kg-1 | 2 | real | kind_phys | out | F | +!! | gasvmr_co2 | volume_mixing_ratio_co2 | CO2 volume mixing ratio | kg kg-1 | 2 | real | kind_phys | out | F | +!! | gasvmr_n2o | volume_mixing_ratio_n2o | N2O volume mixing ratio | kg kg-1 | 2 | real | kind_phys | out | F | +!! | gasvmr_ch4 | volume_mixing_ratio_ch4 | CH4 volume mixing ratio | kg kg-1 | 2 | real | kind_phys | out | F | +!! | gasvmr_o2 | volume_mixing_ratio_o2 | O2 volume mixing ratio | kg kg-1 | 2 | real | kind_phys | out | F | +!! | gasvmr_co | volume_mixing_ratio_co | CO volume mixing ratio | kg kg-1 | 2 | real | kind_phys | out | F | +!! | gasvmr_cfc11 | volume_mixing_ratio_cfc11 | CFC11 volume mixing ratio | kg kg-1 | 2 | real | kind_phys | out | F | +!! | gasvmr_cfc12 | volume_mixing_ratio_cfc12 | CFC12 volume mixing ratio | kg kg-1 | 2 | real | kind_phys | out | F | +!! | gasvmr_cfc22 | volume_mixing_ratio_cfc22 | CFC22 volume mixing ratio | kg kg-1 | 2 | real | kind_phys | out | F | +!! | gasvmr_ccl4 | volume_mixing_ratio_ccl4 | CCL4 volume mixing ratio | kg kg-1 | 2 | real | kind_phys | out | F | +!! | gasvmr_cfc113 | volume_mixing_ratio_cfc113 | CFC113 volume mixing ratio | kg kg-1 | 2 | real | kind_phys | out | F | +!! | faersw1 | aerosol_optical_depth_for_shortwave_bands_01-16 | aerosol optical depth for shortwave bands 01-16 | none | 3 | real | kind_phys | out | F | +!! | faersw2 | aerosol_single_scattering_albedo_for_shortwave_bands_01-16 | aerosol single scattering albedo for shortwave bands 01-16 | frac | 3 | real | kind_phys | out | F | +!! | faersw3 | aerosol_asymmetry_parameter_for_shortwave_bands_01-16 | aerosol asymmetry parameter for shortwave bands 01-16 | none | 3 | real | kind_phys | out | F | +!! | faerlw1 | aerosol_optical_depth_for_longwave_bands_01-16 | aerosol optical depth for longwave bands 01-16 | none | 3 | real | kind_phys | out | F | +!! | faerlw2 | aerosol_single_scattering_albedo_for_longwave_bands_01-16 | aerosol single scattering albedo for longwave bands 01-16 | frac | 3 | real | kind_phys | out | F | +!! | faerlw3 | aerosol_asymmetry_parameter_for_longwave_bands_01-16 | aerosol asymmetry parameter for longwave bands 01-16 | none | 3 | real | kind_phys | out | F | +!! | aerodp | atmosphere_optical_thickness_due_to_ambient_aerosol_particles | vertical integrated optical depth for various aerosol species | none | 2 | real | kind_phys | out | F | +!! | clouds1 | total_cloud_fraction | layer total cloud fraction | frac | 2 | real | kind_phys | out | F | +!! | clouds2 | cloud_liquid_water_path | layer cloud liquid water path | g m-2 | 2 | real | kind_phys | out | F | +!! | clouds3 | mean_effective_radius_for_liquid_cloud | mean effective radius for liquid cloud | micron | 2 | real | kind_phys | out | F | +!! | clouds4 | cloud_ice_water_path | layer cloud ice water path | g m-2 | 2 | real | kind_phys | out | F | +!! | clouds5 | mean_effective_radius_for_ice_cloud | mean effective radius for ice cloud | micron | 2 | real | kind_phys | out | F | +!! | clouds6 | cloud_rain_water_path | cloud rain water path | g m-2 | 2 | real | kind_phys | out | F | +!! | clouds7 | mean_effective_radius_for_rain_drop | mean effective radius for rain drop | micron | 2 | real | kind_phys | out | F | +!! | clouds8 | cloud_snow_water_path | cloud snow water path | g m-2 | 2 | real | kind_phys | out | F | +!! | clouds9 | mean_effective_radius_for_snow_flake | mean effective radius for snow flake | micron | 2 | real | kind_phys | out | F | +!! | cldsa | cloud_area_fraction_for_radiation | fraction of clouds for low, middle,high, total and BL | frac | 2 | real | kind_phys | out | F | +!! | mtopa | model_layer_number_at_cloud_top | vertical indices for low, middle and high cloud tops | index | 2 | integer | | out | F | +!! | mbota | model_layer_number_at_cloud_base | vertical indices for low, middle and high cloud bases | index | 2 | integer | | out | F | +!! | de_lgth | cloud_decorrelation_length | cloud decorrelation length | km | 1 | real | kind_phys | out | F | +!! | alb1d | surface_albedo_perturbation | surface albedo perturbation | frac | 1 | real | kind_phys | out | F | +!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | +!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! + ! Attention - the output arguments lm, im, lmk, lmp must not be set + ! in the CCPP version - they are defined in the interstitial_create routine + subroutine GFS_rrtmgp_pre_run (Model, Grid, Sfcprop, Statein, & ! input + Tbd, Cldprop, Coupling, & + Radtend, & ! input/output + lm, im, lmk, lmp, & ! input + kd, kt, kb, raddt, delp, dz, plvl, plyr, & ! output + tlvl, tlyr, tsfg, tsfa, qlyr, olyr, & + gasvmr_co2, gasvmr_n2o, gasvmr_ch4, gasvmr_o2, & + gasvmr_co, gasvmr_cfc11, gasvmr_cfc12, & + gasvmr_cfc22, gasvmr_ccl4, gasvmr_cfc113, & + faersw1, faersw2, faersw3, & + faerlw1, faerlw2, faerlw3, aerodp, & + clouds1, clouds2, clouds3, clouds4, clouds5, clouds6, & + clouds7, clouds8, clouds9, cldsa, & + mtopa, mbota, de_lgth, alb1d, errmsg, errflg) + + use machine, only: kind_phys + use GFS_typedefs, only: GFS_statein_type, & + GFS_stateout_type, & + GFS_sfcprop_type, & + GFS_coupling_type, & + GFS_control_type, & + GFS_grid_type, & + GFS_tbd_type, & + GFS_cldprop_type, & + GFS_radtend_type, & + GFS_diag_type + use physparam + use physcons, only: eps => con_eps, & + & epsm1 => con_epsm1, & + & fvirt => con_fvirt & + &, rog => con_rog & + &, rocp => con_rocp + use radcons, only: itsfc,ltp, lextop, qmin, & + qme5, qme6, epsq, prsmin + use funcphys, only: fpvs + + use module_radiation_astronomy,only: coszmn ! sol_init, sol_update + use module_radiation_gases, only: NF_VGAS, getgases, getozn ! gas_init, gas_update, + use module_radiation_aerosols, only: NF_AESW, NF_AELW, setaer, & ! aer_init, aer_update, + & NSPC1 + use module_radiation_clouds, only: NF_CLDS, & ! cld_init + & progcld1, progcld3, & + & progcld4, progcld5, & + & progclduni + use module_radsw_parameters, only: topfsw_type, sfcfsw_type, & + & profsw_type, NBDSW + use module_radlw_parameters, only: topflw_type, sfcflw_type, & + & proflw_type + use rrtmgp_lw, only: NBDLW => nBandsLW + use surface_perturbation, only: cdfnor + + implicit none + + type(GFS_control_type), intent(in) :: Model + type(GFS_grid_type), intent(in) :: Grid + type(GFS_sfcprop_type), intent(in) :: Sfcprop + type(GFS_statein_type), intent(in) :: Statein + type(GFS_radtend_type), intent(inout) :: Radtend + type(GFS_tbd_type), intent(in) :: Tbd + type(GFS_cldprop_type), intent(in) :: Cldprop + type(GFS_coupling_type), intent(in) :: Coupling + + integer, intent(in) :: im, lm, lmk, lmp + integer, intent(out) :: kd, kt, kb + real(kind=kind_phys), intent(out) :: raddt + + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: delp + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: dz + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+1+LTP), intent(out) :: plvl + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: plyr + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+1+LTP), intent(out) :: tlvl + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: tlyr + real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(out) :: tsfg + real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(out) :: tsfa + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: qlyr + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: olyr + + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: gasvmr_co2 + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: gasvmr_n2o + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: gasvmr_ch4 + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: gasvmr_o2 + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: gasvmr_co + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: gasvmr_cfc11 + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: gasvmr_cfc12 + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: gasvmr_cfc22 + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: gasvmr_ccl4 + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: gasvmr_cfc113 + + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,NBDSW), intent(out) :: faersw1 + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,NBDSW), intent(out) :: faersw2 + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,NBDSW), intent(out) :: faersw3 + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,NBDLW), intent(out) :: faerlw1 + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,NBDLW), intent(out) :: faerlw2 + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,NBDLW), intent(out) :: faerlw3 + + real(kind=kind_phys), dimension(size(Grid%xlon,1),NSPC1), intent(out) :: aerodp + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: clouds1 + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: clouds2 + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: clouds3 + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: clouds4 + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: clouds5 + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: clouds6 + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: clouds7 + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: clouds8 + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: clouds9 + real(kind=kind_phys), dimension(size(Grid%xlon,1),5), intent(out) :: cldsa + integer, dimension(size(Grid%xlon,1),3), intent(out) :: mbota + integer, dimension(size(Grid%xlon,1),3), intent(out) :: mtopa + real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(out) :: de_lgth + real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(out) :: alb1d + + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + + ! Local variables + integer :: me, nfxr, ntrac, ntcw, ntiw, ncld, ntrw, ntsw, ntgl + + integer :: i, j, k, k1, k2, lsk, lv, n, itop, ibtc, LP1, lla, llb, lya, lyb + + real(kind=kind_phys) :: es, qs, delt, tem0d + + real(kind=kind_phys), dimension(size(Grid%xlon,1)) :: cvt1, cvb1, tem1d, tskn + + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP) :: & + htswc, htlwc, gcice, grain, grime, htsw0, htlw0, & + rhly, tvly,qstl, vvel, clw, ciw, prslk1, tem2da, & + cldcov, deltaq, cnvc, cnvw, & + effrl, effri, effrr, effrs + real (kind=kind_phys) :: clwmin, clwm, clwt, onemrh, value, tem1, tem2, tem3 + real (kind=kind_phys), parameter :: xrc3 = 100. + + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP+1) :: tem2db +! real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP+1) :: hz + + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,Model%ncnd) :: ccnd + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,2:Model%ntrac) :: tracer1 + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,NF_CLDS) :: clouds + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,NF_VGAS) :: gasvmr + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,NBDSW,NF_AESW)::faersw + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,NBDLW,NF_AELW)::faerlw +! +!===> ... begin here +! + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + + if (.not. (Model%lsswr .or. Model%lslwr)) return + + !--- set commonly used integers + me = Model%me + NFXR = Model%nfxr + NTRAC = Model%ntrac ! tracers in grrad strip off sphum - start tracer1(2:NTRAC) + ntcw = Model%ntcw + ntiw = Model%ntiw + ncld = Model%ncld + ntrw = Model%ntrw + ntsw = Model%ntsw + ntgl = Model%ntgl + + LP1 = LM + 1 ! num of in/out levels + + +! --- ... set local /level/layer indexes corresponding to in/out +! variables + + if ( lextop ) then + if ( ivflip == 1 ) then ! vertical from sfc upward + kd = 0 ! index diff between in/out and local + kt = 1 ! index diff between lyr and upper bound + kb = 0 ! index diff between lyr and lower bound + lla = LMK ! local index at the 2nd level from top + llb = LMP ! local index at toa level + lya = LM ! local index for the 2nd layer from top + lyb = LP1 ! local index for the top layer + else ! vertical from toa downward + kd = 1 ! index diff between in/out and local + kt = 0 ! index diff between lyr and upper bound + kb = 1 ! index diff between lyr and lower bound + lla = 2 ! local index at the 2nd level from top + llb = 1 ! local index at toa level + lya = 2 ! local index for the 2nd layer from top + lyb = 1 ! local index for the top layer + endif ! end if_ivflip_block + else + kd = 0 + if ( ivflip == 1 ) then ! vertical from sfc upward + kt = 1 ! index diff between lyr and upper bound + kb = 0 ! index diff between lyr and lower bound + else ! vertical from toa downward + kt = 0 ! index diff between lyr and upper bound + kb = 1 ! index diff between lyr and lower bound + endif ! end if_ivflip_block + endif ! end if_lextop_block + + raddt = min(Model%fhswr, Model%fhlwr) +! print *,' in grrad : raddt=',raddt + + +!> -# Setup surface ground temperature and ground/air skin temperature +!! if required. + + if ( itsfc == 0 ) then ! use same sfc skin-air/ground temp + do i = 1, IM + tskn(i) = Sfcprop%tsfc(i) + tsfg(i) = Sfcprop%tsfc(i) + enddo + else ! use diff sfc skin-air/ground temp + do i = 1, IM + tskn(i) = Sfcprop%tsfc(i) + tsfg(i) = Sfcprop%tsfc(i) + enddo + endif + + +!> -# Prepare atmospheric profiles for radiation input. +! + + lsk = 0 + if (ivflip == 0 .and. lm < Model%levs) lsk = Model%levs - lm + +! convert pressure unit from pa to mb + do k = 1, LM + k1 = k + kd + k2 = k + lsk + do i = 1, IM + plvl(i,k1+kb) = Statein%prsi(i,k2+kb) * 0.01 ! pa to mb (hpa) + plyr(i,k1) = Statein%prsl(i,k2) * 0.01 ! pa to mb (hpa) + tlyr(i,k1) = Statein%tgrs(i,k2) + prslk1(i,k1) = Statein%prslk(i,k2) + +!> - Compute relative humidity. + es = min( Statein%prsl(i,k2), fpvs( Statein%tgrs(i,k2) ) ) ! fpvs and prsl in pa + qs = max( QMIN, eps * es / (Statein%prsl(i,k2) + epsm1*es) ) + rhly(i,k1) = max( 0.0, min( 1.0, max(QMIN, Statein%qgrs(i,k2,1))/qs ) ) + qstl(i,k1) = qs + enddo + enddo + + !--- recast remaining all tracers (except sphum) forcing them all to be positive + do j = 2, NTRAC + do k = 1, LM + k1 = k + kd + k2 = k + lsk + tracer1(:,k1,j) = max(0.0, Statein%qgrs(:,k2,j)) + enddo + enddo +! + if (ivflip == 0) then ! input data from toa to sfc + do i = 1, IM + plvl(i,1+kd) = 0.01 * Statein%prsi(i,1) ! pa to mb (hpa) + enddo + if (lsk /= 0) then + do i = 1, IM + plvl(i,1+kd) = 0.5 * (plvl(i,2+kd) + plvl(i,1+kd)) + enddo + endif + else ! input data from sfc to top + do i = 1, IM + plvl(i,LP1+kd) = 0.01 * Statein%prsi(i,LP1+lsk) ! pa to mb (hpa) + enddo + if (lsk /= 0) then + do i = 1, IM + plvl(i,LM+kd) = 0.5 * (plvl(i,LP1+kd) + plvl(i,LM+kd)) + enddo + endif + endif + + if ( lextop ) then ! values for extra top layer + do i = 1, IM + plvl(i,llb) = prsmin + if ( plvl(i,lla) <= prsmin ) plvl(i,lla) = 2.0*prsmin + plyr(i,lyb) = 0.5 * plvl(i,lla) + tlyr(i,lyb) = tlyr(i,lya) + prslk1(i,lyb) = (plyr(i,lyb)*0.00001) ** rocp ! plyr in Pa + rhly(i,lyb) = rhly(i,lya) + qstl(i,lyb) = qstl(i,lya) + enddo + +! --- note: may need to take care the top layer amount + tracer1(:,lyb,:) = tracer1(:,lya,:) + endif + + +!> - Get layer ozone mass mixing ratio (if use ozone climatology data, +!! call getozn()). + + if (Model%ntoz > 0) then ! interactive ozone generation + do k=1,lmk + do i=1,im + olyr(i,k) = max( QMIN, tracer1(i,k,Model%ntoz) ) + enddo + enddo + else ! climatological ozone + call getozn (prslk1, Grid%xlat, IM, LMK, & ! --- inputs + olyr) ! --- outputs + endif ! end_if_ntoz + +!> - Call coszmn(), to compute cosine of zenith angle (only when SW is called) + if (Model%lsswr) then + call coszmn (Grid%xlon,Grid%sinlat, & ! --- inputs + Grid%coslat,Model%solhr, IM, me, & + Radtend%coszen, Radtend%coszdg) ! --- outputs + endif + +!> - Call getgases(), to set up non-prognostic gas volume mixing +!! ratioes (gasvmr). +! - gasvmr(:,:,1) - co2 volume mixing ratio +! - gasvmr(:,:,2) - n2o volume mixing ratio +! - gasvmr(:,:,3) - ch4 volume mixing ratio +! - gasvmr(:,:,4) - o2 volume mixing ratio +! - gasvmr(:,:,5) - co volume mixing ratio +! - gasvmr(:,:,6) - cf11 volume mixing ratio +! - gasvmr(:,:,7) - cf12 volume mixing ratio +! - gasvmr(:,:,8) - cf22 volume mixing ratio +! - gasvmr(:,:,9) - ccl4 volume mixing ratio +! - gasvmr(:,:,10) - cfc113 volumne mixing ratio + +! --- ... set up non-prognostic gas volume mixing ratioes + + call getgases (plvl, Grid%xlon, Grid%xlat, IM, LMK, & ! --- inputs + gasvmr) ! --- outputs + +!CCPP: re-assign gasvmr(:,:,NF_VGAS) to gasvmr_X(:,:) + do k = 1, LMK + do i = 1, IM + gasvmr_co2 (i,k) = gasvmr(i,k,1) + gasvmr_n2o (i,k) = gasvmr(i,k,2) + gasvmr_ch4 (i,k) = gasvmr(i,k,3) + gasvmr_o2 (i,k) = gasvmr(i,k,4) + gasvmr_co (i,k) = gasvmr(i,k,5) + gasvmr_cfc11 (i,k) = gasvmr(i,k,6) + gasvmr_cfc12 (i,k) = gasvmr(i,k,7) + gasvmr_cfc22 (i,k) = gasvmr(i,k,8) + gasvmr_ccl4 (i,k) = gasvmr(i,k,9) + gasvmr_cfc113 (i,k) = gasvmr(i,k,10) + enddo + enddo + +!> - Get temperature at layer interface, and layer moisture. + do k = 2, LMK + do i = 1, IM + tem2da(i,k) = log( plyr(i,k) ) + tem2db(i,k) = log( plvl(i,k) ) + enddo + enddo + + if (ivflip == 0) then ! input data from toa to sfc + do i = 1, IM + tem1d (i) = QME6 + tem2da(i,1) = log( plyr(i,1) ) + tem2db(i,1) = log( max(prsmin, plvl(i,1)) ) + tem2db(i,LMP) = log( plvl(i,LMP) ) + tsfa (i) = tlyr(i,LMK) ! sfc layer air temp + tlvl(i,1) = tlyr(i,1) + tlvl(i,LMP) = tskn(i) + enddo + + do k = 1, LM + k1 = k + kd + do i = 1, IM + qlyr(i,k1) = max( tem1d(i), Statein%qgrs(i,k,1) ) + tem1d(i) = min( QME5, qlyr(i,k1) ) + tvly(i,k1) = Statein%tgrs(i,k) * (1.0 + fvirt*qlyr(i,k1)) ! virtual T (K) + delp(i,k1) = plvl(i,k1+1) - plvl(i,k1) + enddo + enddo + + if ( lextop ) then + do i = 1, IM + qlyr(i,lyb) = qlyr(i,lya) + tvly(i,lyb) = tvly(i,lya) + delp(i,lyb) = plvl(i,lla) - plvl(i,llb) + enddo + endif + + do k = 2, LMK + do i = 1, IM + tlvl(i,k) = tlyr(i,k) + (tlyr(i,k-1) - tlyr(i,k)) & + & * (tem2db(i,k) - tem2da(i,k)) & + & / (tem2da(i,k-1) - tem2da(i,k)) + enddo + enddo + +! --- ... level height and layer thickness (km) + + tem0d = 0.001 * rog + do i = 1, IM + do k = 1, LMK + dz(i,k) = tem0d * (tem2db(i,k+1) - tem2db(i,k)) * tvly(i,k) + enddo + +! hz(i,LMP) = 0.0 +! do k = LMK, 1, -1 +! hz(i,k) = hz(i,k+1) + dz(i,k) +! enddo + enddo + + else ! input data from sfc to toa + + do i = 1, IM + tem1d (i) = QME6 + tem2da(i,1) = log( plyr(i,1) ) + tem2db(i,1) = log( plvl(i,1) ) + tem2db(i,LMP) = log( max(prsmin, plvl(i,LMP)) ) + tsfa (i) = tlyr(i,1) ! sfc layer air temp + tlvl(i,1) = tskn(i) + tlvl(i,LMP) = tlyr(i,LMK) + enddo + + do k = LM, 1, -1 + do i = 1, IM + qlyr(i,k) = max( tem1d(i), Statein%qgrs(i,k,1) ) + tem1d(i) = min( QME5, qlyr(i,k) ) + tvly(i,k) = Statein%tgrs(i,k) * (1.0 + fvirt*qlyr(i,k)) ! virtual T (K) + delp(i,k) = plvl(i,k) - plvl(i,k+1) + enddo + enddo + + if ( lextop ) then + do i = 1, IM + qlyr(i,lyb) = qlyr(i,lya) + tvly(i,lyb) = tvly(i,lya) + delp(i,lyb) = plvl(i,lla) - plvl(i,llb) + enddo + endif + + do k = 1, LMK-1 + do i = 1, IM + tlvl(i,k+1) = tlyr(i,k) + (tlyr(i,k+1) - tlyr(i,k)) & + & * (tem2db(i,k+1) - tem2da(i,k)) & + & / (tem2da(i,k+1) - tem2da(i,k)) + enddo + enddo + +! --- ... level height and layer thickness (km) + + tem0d = 0.001 * rog + do i = 1, IM + do k = LMK, 1, -1 + dz(i,k) = tem0d * (tem2db(i,k) - tem2db(i,k+1)) * tvly(i,k) + enddo + +! hz(i,1) = 0.0 +! do k = 1, LMP +! hz(i,k+1) = hz(i,k) + dz(i,k) +! enddo + enddo + + endif ! end_if_ivflip + +!> - Call module_radiation_aerosols::setaer(),to setup aerosols +!! property profile for radiation. + +!check print *,' in grrad : calling setaer ' + + call setaer (plvl, plyr, prslk1, tvly, rhly, Sfcprop%slmsk, & ! --- inputs + tracer1, Grid%xlon, Grid%xlat, IM, LMK, LMP, & + Model%lsswr, Model%lslwr, & + faersw, faerlw, aerodp) ! --- outputs + +! CCPP + do j = 1,NBDSW + do k = 1, LMK + do i = 1, IM + ! NF_AESW = 3 + faersw1(i,k,j) = faersw(i,k,j,1) + faersw2(i,k,j) = faersw(i,k,j,2) + faersw3(i,k,j) = faersw(i,k,j,3) + enddo + enddo + enddo + + do j = 1,NBDLW + do k = 1, LMK + do i = 1, IM + ! NF_AELW = 3 + faerlw1(i,k,j) = faerlw(i,k,j,1) + faerlw2(i,k,j) = faerlw(i,k,j,2) + faerlw3(i,k,j) = faerlw(i,k,j,3) + enddo + enddo + enddo + +!> - Obtain cloud information for radiation calculations +!! (clouds,cldsa,mtopa,mbota) +!!\n for prognostic cloud: +!! - For Zhao/Moorthi's prognostic cloud scheme, +!! call module_radiation_clouds::progcld1() +!! - For Zhao/Moorthi's prognostic cloud+pdfcld, +!! call module_radiation_clouds::progcld3() +!! call module_radiation_clouds::progclduni() for unified cloud and ncld=2 + +! --- ... obtain cloud information for radiation calculations + + write(58,*) "NCND: ",Model%ncnd +! if (ntcw > 0) then ! prognostic cloud schemes + ccnd = 0.0_kind_phys + if (Model%ncnd == 1) then ! Zhao_Carr_Sundqvist + do k=1,LMK + do i=1,IM + ccnd(i,k,1) = tracer1(i,k,ntcw) ! liquid water/ice + enddo + enddo + elseif (Model%ncnd == 2) then ! MG + do k=1,LMK + do i=1,IM + ccnd(i,k,1) = tracer1(i,k,ntcw) ! liquid water + ccnd(i,k,2) = tracer1(i,k,ntiw) ! ice water + enddo + enddo + elseif (Model%ncnd == 4) then ! MG2 + do k=1,LMK + do i=1,IM + ccnd(i,k,1) = tracer1(i,k,ntcw) ! liquid water + ccnd(i,k,2) = tracer1(i,k,ntiw) ! ice water + ccnd(i,k,3) = tracer1(i,k,ntrw) ! rain water + ccnd(i,k,4) = tracer1(i,k,ntsw) ! snow water + enddo + enddo + elseif (Model%ncnd == 5) then ! GFDL MP, Thompson, MG3 + do k=1,LMK + do i=1,IM + ccnd(i,k,1) = tracer1(i,k,ntcw) ! liquid water + ccnd(i,k,2) = tracer1(i,k,ntiw) ! ice water + ccnd(i,k,3) = tracer1(i,k,ntrw) ! rain water + ccnd(i,k,4) = tracer1(i,k,ntsw) + tracer1(i,k,ntgl) ! snow + grapuel + enddo + enddo + endif + do n=1,Model%ncnd + do k=1,LMK + do i=1,IM + if (ccnd(i,k,n) < epsq) ccnd(i,k,n) = 0.0 + enddo + enddo + enddo + if (Model%imp_physics == 11 ) then + if (.not. Model%lgfdlmprad) then + + +! rsun the summation methods and order make the difference in calculation + +! clw(:,:) = clw(:,:) + tracer1(:,1:LMK,Model%ntcw) & +! + tracer1(:,1:LMK,Model%ntiw) & +! + tracer1(:,1:LMK,Model%ntrw) & +! + tracer1(:,1:LMK,Model%ntsw) & +! + tracer1(:,1:LMK,Model%ntgl) + ccnd(:,:,1) = tracer1(:,1:LMK,ntcw) + ccnd(:,:,1) = ccnd(:,:,1) + tracer1(:,1:LMK,ntrw) + ccnd(:,:,1) = ccnd(:,:,1) + tracer1(:,1:LMK,ntiw) + ccnd(:,:,1) = ccnd(:,:,1) + tracer1(:,1:LMK,ntsw) + ccnd(:,:,1) = ccnd(:,:,1) + tracer1(:,1:LMK,ntgl) + +! else +! do j=1,Model%ncld +! ccnd(:,:,1) = ccnd(:,:,1) + tracer1(:,1:LMK,ntcw+j-1) ! cloud condensate amount +! enddo + endif + do k=1,LMK + do i=1,IM + if (ccnd(i,k,1) < EPSQ ) ccnd(i,k,1) = 0.0 + enddo + enddo + endif +! + +! +! --- add suspended convective cloud water to grid-scale cloud water +! only for cloud fraction & radiation computation +! it is to enhance cloudiness due to suspended convec cloud water +! for zhao/moorthi's (imp_phys=99) & +! ferrier's (imp_phys=5) microphysics schemes + + if ((Model%num_p3d == 4) .and. (Model%npdf3d == 3)) then ! same as Model%imp_physics = 99 + do k=1,lm + k1 = k + kd + do i=1,im + deltaq(i,k1) = Tbd%phy_f3d(i,k,5) + cnvw (i,k1) = Tbd%phy_f3d(i,k,6) + cnvc (i,k1) = Tbd%phy_f3d(i,k,7) + enddo + enddo + elseif ((Model%npdf3d == 0) .and. (Model%ncnvcld3d == 1)) then ! same as MOdel%imp_physics=98 + do k=1,lm + k1 = k + kd + do i=1,im + deltaq(i,k1) = 0.0 + cnvw (i,k1) = Tbd%phy_f3d(i,k,Model%num_p3d+1) + cnvc (i,k1) = 0.0 + enddo + enddo + else ! all the rest + do k=1,lmk + do i=1,im + deltaq(i,k) = 0.0 + cnvw (i,k) = 0.0 + cnvc (i,k) = 0.0 + enddo + enddo + endif + + if (lextop) then + do i=1,im + cldcov(i,lyb) = cldcov(i,lya) + deltaq(i,lyb) = deltaq(i,lya) + cnvw (i,lyb) = cnvw (i,lya) + cnvc (i,lyb) = cnvc (i,lya) + enddo + if (Model%effr_in) then + do i=1,im + effrl(i,lyb) = effrl(i,lya) + effri(i,lyb) = effri(i,lya) + effrr(i,lyb) = effrr(i,lya) + effrs(i,lyb) = effrs(i,lya) + enddo + endif + endif + + if (Model%imp_physics == 99) then + ccnd(1:IM,1:LMK,1) = ccnd(1:IM,1:LMK,1) + cnvw(1:IM,1:LMK) + endif + + if (Model%imp_physics == 10) then + ccnd(1:IM,1:LMK,1) = ccnd(1:IM,1:LMK,1) + cnvw(1:IM,1:LMK) + ccnd(1:IM,1:LMK,2) + endif + +! DJS2019: START + ! Compute layer cloud fraction. + clwmin = 0.0 + if (.not. Model%lmfshal) then + do k = 1, LMK + do i = 1, IM + clwt = 1.0e-6 * (plyr(i,k)*0.001) + if (ccnd(i,k,1) > 0.) then + onemrh= max( 1.e-10, 1.0-rhly(i,k) ) + clwm = clwmin / max( 0.01, plyr(i,k)*0.001 ) + tem1 = min(max(sqrt(sqrt(onemrh*qstl(i,k))),0.0001),1.0) + tem1 = 2000.0 / tem1 + value = max( min( tem1*(ccnd(i,k,1)-clwm), 50.0 ), 0.0 ) + tem2 = sqrt( sqrt(rhly(i,k)) ) + cldcov(i,k) = max( tem2*(1.0-exp(-value)), 0.0 ) + endif + enddo + enddo + else + do k = 1, LMK + do i = 1, IM + clwt = 1.0e-6 * (plyr(i,k)*0.001) + if (ccnd(i,k,1) .gt. 0) then + onemrh= max( 1.e-10, 1.0-rhly(i,k) ) + clwm = clwmin / max( 0.01, plyr(i,k)*0.001 ) + tem1 = min(max((onemrh*qstl(i,k))**0.49,0.0001),1.0) !jhan + if (Model%lmfdeep2) then + tem1 = xrc3 / tem1 + else + tem1 = 100.0 / tem1 + endif + value = max( min( tem1*(ccnd(i,k,1)-clwm), 50.0 ), 0.0 ) + tem2 = sqrt( sqrt(rhly(i,k)) ) + cldcov(i,k) = max( tem2*(1.0-exp(-value)), 0.0 ) + endif + enddo + enddo + endif +! DJS2019: END + + if (Model%uni_cld) then + if (Model%effr_in) then + do k=1,lm + k1 = k + kd + do i=1,im + cldcov(i,k1) = Tbd%phy_f3d(i,k,Model%indcld) + effrl(i,k1) = Tbd%phy_f3d(i,k,2) + effri(i,k1) = Tbd%phy_f3d(i,k,3) + effrr(i,k1) = Tbd%phy_f3d(i,k,4) + effrs(i,k1) = Tbd%phy_f3d(i,k,5) + enddo + enddo + else + do k=1,lm + k1 = k + kd + do i=1,im + !cldcov(i,k1) = Tbd%phy_f3d(i,k,Model%indcld) + !if (tracer1(i,k,ntcw) .gt. 0 .or. tracer1(i,k,ntiw) .gt. 0) then + ! cldcov(i,k1) = 0.1 + !else + ! cldcov(i,k1) = 0.0 + !endif + enddo + enddo + endif + elseif (Model%imp_physics == Model%imp_physics_gfdl) then ! GFDL MP + cldcov(1:IM,1+kd:LM+kd) = tracer1(1:IM,1:LM,Model%ntclamt) + else ! neither of the other two cases + ! cldcov = 0.0 + endif + + write(58,*) "Model%imp_physics: ",Model%imp_physics + write(58,*) "Model%uni_cld: ",Model%uni_cld + write(58,*) "Model%ncld: ",Model%ncld + write(58,*) "Model%lgfdlmprad: ",Model%lgfdlmprad + write(58,*) "Model%lmfshal: ",Model%lmfshal + write(58,*) "Model%lmfdeep2: ",Model%lmfdeep2 + + if (Model%imp_physics == 99 .or. Model%imp_physics == 10) then ! zhao/moorthi's prognostic cloud scheme + ! or unified cloud and/or with MG microphysics + + if (Model%uni_cld .and. Model%ncld >= 2) then + call progclduni (plyr, plvl, tlyr, tvly, ccnd, Model%ncnd, & ! --- inputs + Grid%xlat, Grid%xlon, Sfcprop%slmsk,dz,delp, & + IM, LMK, LMP, cldcov, & + effrl, effri, effrr, effrs, Model%effr_in, & + clouds, cldsa, mtopa, mbota, de_lgth) ! --- outputs + else + call progcld1 (plyr ,plvl, tlyr, tvly, qlyr, qstl, rhly, & ! --- inputs + ccnd(1:IM,1:LMK,1), Grid%xlat,Grid%xlon, & + Sfcprop%slmsk, dz, delp, IM, LMK, LMP, & + Model%uni_cld, Model%lmfshal, & + Model%lmfdeep2, cldcov, & + effrl, effri, effrr, effrs, Model%effr_in, & + clouds, cldsa, mtopa, mbota, de_lgth) ! --- outputs + endif + + elseif(Model%imp_physics == 98) then ! zhao/moorthi's prognostic cloud+pdfcld + + call progcld3 (plyr, plvl, tlyr, tvly, qlyr, qstl, rhly, & ! --- inputs + ccnd(1:IM,1:LMK,1), & + cnvw, cnvc, Grid%xlat, Grid%xlon, & + Sfcprop%slmsk, dz, delp, im, lmk, lmp, deltaq, & + Model%sup, Model%kdt, me, & + clouds, cldsa, mtopa, mbota, de_lgth) ! --- outputs + + elseif (Model%imp_physics == 11) then ! GFDL cloud scheme + + if (.not.Model%lgfdlmprad) then + call progcld4 (plyr, plvl, tlyr, tvly, qlyr, qstl, rhly, & ! --- inputs + ccnd(1:IM,1:LMK,1), cnvw, cnvc, & + Grid%xlat, Grid%xlon, Sfcprop%slmsk, & + cldcov, dz, delp, im, lmk, lmp, & + clouds, cldsa, mtopa, mbota, de_lgth) ! --- outputs + else + + call progclduni (plyr, plvl, tlyr, tvly, ccnd, Model%ncnd, & ! --- inputs + Grid%xlat, Grid%xlon, Sfcprop%slmsk, dz,delp, & + IM, LMK, LMP, cldcov, & + effrl, effri, effrr, effrs, Model%effr_in, & + clouds, cldsa, mtopa, mbota, de_lgth) ! --- outputs +! call progcld4o (plyr, plvl, tlyr, tvly, qlyr, qstl, rhly, & ! --- inputs +! tracer1, Grid%xlat, Grid%xlon, Sfcprop%slmsk, & +! dz, delp, & +! ntrac-1, Model%ntcw-1,Model%ntiw-1,Model%ntrw-1,& +! Model%ntsw-1,Model%ntgl-1,Model%ntclamt-1, & +! im, lmk, lmp, & +! clouds, cldsa, mtopa, mbota, de_lgth) ! --- outputs + endif + + elseif(Model%imp_physics == 8 .or. Model%imp_physics == 6) then ! Thompson / WSM6 cloud micrphysics scheme + + if (Model%kdt == 1) then + Tbd%phy_f3d(:,:,1) = 10. + Tbd%phy_f3d(:,:,2) = 50. + Tbd%phy_f3d(:,:,3) = 250. + endif + + call progcld5 (plyr,plvl,tlyr,qlyr,qstl,rhly,tracer1, & ! --- inputs + Grid%xlat,Grid%xlon,Sfcprop%slmsk,dz,delp, & + ntrac-1, ntcw-1,ntiw-1,ntrw-1, & + ntsw-1,ntgl-1, & + im, lmk, lmp, Model%uni_cld, & + Model%lmfshal,Model%lmfdeep2, & + cldcov(:,1:LMK),Tbd%phy_f3d(:,:,1), & + Tbd%phy_f3d(:,:,2), Tbd%phy_f3d(:,:,3), & + clouds,cldsa,mtopa,mbota, de_lgth) ! --- outputs + + endif ! end if_imp_physics + +! endif ! end_if_ntcw + +! CCPP + do k = 1, LMK + do i = 1, IM + clouds1(i,k) = clouds(i,k,1) + clouds2(i,k) = clouds(i,k,2) + clouds3(i,k) = clouds(i,k,3) + clouds4(i,k) = clouds(i,k,4) + clouds5(i,k) = clouds(i,k,5) + clouds6(i,k) = clouds(i,k,6) + clouds7(i,k) = clouds(i,k,7) + clouds8(i,k) = clouds(i,k,8) + clouds9(i,k) = clouds(i,k,9) + enddo + enddo + + write(58,*) "#" + do k=1,Model%levr+LTP + write(58,"(5F15.8)") plyr(1,k),tlyr(1,k),clouds2(1,k), & + & clouds4(1,k), clouds1(1,k) + enddo + + +! mg, sfc-perts +! --- scale random patterns for surface perturbations with +! perturbation size +! --- turn vegetation fraction pattern into percentile pattern + alb1d(:) = 0. + if (Model%do_sfcperts) then + if (Model%pertalb(1) > 0.) then + do i=1,im + call cdfnor(Coupling%sfc_wts(i,5),alb1d(i)) + enddo + endif + endif +! mg, sfc-perts + + end subroutine GFS_rrtmgp_pre_run + +!> \section arg_table_GFS_rrtmgp_pre_finalize Argument Table +!! + subroutine GFS_rrtmgp_pre_finalize () + close(58) + end subroutine GFS_rrtmgp_pre_finalize + +!! @} + end module GFS_rrtmgp_pre diff --git a/physics/GFS_rrtmgp_pre.xml b/physics/GFS_rrtmgp_pre.xml new file mode 100644 index 000000000..a20630a25 --- /dev/null +++ b/physics/GFS_rrtmgp_pre.xml @@ -0,0 +1,656 @@ + + + + + + + GFS_control_type_instance + Fortran DDT containing FV3-GFS model control parameters + DDT + Model + GFS_control_type + + in + F + MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run + + + GFS_grid_type_instance + Fortran DDT containing FV3-GFS grid and interpolation related data + DDT + Grid + GFS_grid_type + + in + F + MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run + + + GFS_sfcprop_type_instance + Fortran DDT containing FV3-GFS surface fields + DDT + Sfcprop + GFS_sfcprop_type + + in + F + MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run + + + GFS_statein_type_instance + Fortran DDT containing FV3-GFS prognostic state data in from dycore + DDT + Statein + GFS_statein_type + + in + F + MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run + + + GFS_tbd_type_instance + Fortran DDT containing FV3-GFS data not yet assigned to a defined container + DDT + Tbd + GFS_tbd_type + + in + F + MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run + + + GFS_cldprop_type_instance + Fortran DDT containing FV3-GFS cloud fields needed by radiation from physics + DDT + Cldprop + GFS_cldprop_type + + in + F + MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run + + + GFS_coupling_type_instance + Fortran DDT containing FV3-GFS fields needed for coupling + DDT + Coupling + GFS_coupling_type + + in + F + MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run + + + GFS_radtend_type_instance + Fortran DDT containing FV3-GFS radiation tendencies + DDT + Radtend + GFS_radtend_type + + inout + F + MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run + + + vertical_layer_dimension_for_radiation + number of vertical layers for radiation calculation + count + lm + integer + + in + F + MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run + + + horizontal_loop_extent + horizontal loop extent + count + im + integer + + in + F + MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run + + + adjusted_vertical_layer_dimension_for_radiation + number of vertical layers for radiation + count + lmk + integer + + in + F + MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run + + + adjusted_vertical_level_dimension_for_radiation + number of vertical levels for radiation + count + lmp + integer + + in + F + MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run + + + vertical_index_difference_between_inout_and_local + vertical index difference between in/out and local + index + kd + integer + + out + F + MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run + + + vertical_index_difference_between_layer_and_upper_bound + vertical index difference between layer and upper bound + index + kt + integer + + out + F + MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run + + + vertical_index_difference_between_layer_and_lower_bound + vertical index difference between layer and lower bound + index + kb + integer + + out + F + MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run + + + time_step_for_radiation + radiation time step + s + raddt + real + + out + F + MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run + + + layer_pressure_thickness_for_radiation + layer pressure thickness on radiation levels + hPa + delp + real + (:,:) + out + F + MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run + + + layer_thickness_for_radiation + layer thickness on radiation levels + km + dz + real + (:,:) + out + F + MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run + + + air_pressure_at_interface_for_radiation_in_hPa + air pressure at vertical interface for radiation calculation + hPa + plvl + real + (:,:) + out + F + MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run + + + air_pressure_at_layer_for_radiation_in_hPa + air pressure at vertical layer for radiation calculation + hPa + plyr + real + (:,:) + out + F + MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run + + + air_temperature_at_interface_for_radiation + air temperature at vertical interface for radiation calculation + K + tlvl + real + (:,:) + out + F + MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run + + + air_temperature_at_layer_for_radiation + air temperature at vertical layer for radiation calculation + K + tlyr + real + (:,:) + out + F + MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run + + + surface_ground_temperature_for_radiation + surface ground temperature for radiation + K + tsfg + real + (:) + out + F + MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run + + + surface_air_temperature_for_radiation + lowest model layer air temperature for radiation + K + tsfa + real + (:) + out + F + MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run + + + water_vapor_specific_humidity_at_layer_for_radiation + water vapor specific humidity at vertical layer for radiation calculation + kg kg-1 + qlyr + real + (:,:) + out + F + MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run + + + ozone_concentration_at_layer_for_radiation + ozone concentration + kg kg-1 + olyr + real + (:,:) + out + F + MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run + + + volume_mixing_ratio_co2 + CO2 volume mixing ratio + kg kg-1 + gasvmr_co2 + real + (:,:) + out + F + MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run + + + volume_mixing_ratio_n2o + N2O volume mixing ratio + kg kg-1 + gasvmr_n2o + real + (:,:) + out + F + MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run + + + volume_mixing_ratio_ch4 + CH4 volume mixing ratio + kg kg-1 + gasvmr_ch4 + real + (:,:) + out + F + MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run + + + volume_mixing_ratio_o2 + O2 volume mixing ratio + kg kg-1 + gasvmr_o2 + real + (:,:) + out + F + MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run + + + volume_mixing_ratio_co + CO volume mixing ratio + kg kg-1 + gasvmr_co + real + (:,:) + out + F + MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run + + + volume_mixing_ratio_cfc11 + CFC11 volume mixing ratio + kg kg-1 + gasvmr_cfc11 + real + (:,:) + out + F + MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run + + + volume_mixing_ratio_cfc12 + CFC12 volume mixing ratio + kg kg-1 + gasvmr_cfc12 + real + (:,:) + out + F + MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run + + + volume_mixing_ratio_cfc22 + CFC22 volume mixing ratio + kg kg-1 + gasvmr_cfc22 + real + (:,:) + out + F + MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run + + + volume_mixing_ratio_ccl4 + CCL4 volume mixing ratio + kg kg-1 + gasvmr_ccl4 + real + (:,:) + out + F + MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run + + + volume_mixing_ratio_cfc113 + CFC113 volume mixing ratio + kg kg-1 + gasvmr_cfc113 + real + (:,:) + out + F + MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run + + + aerosol_optical_depth_for_shortwave_bands_01-16 + aerosol optical depth for shortwave bands 01-16 + none + faersw1 + real + (:,:,:) + out + F + MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run + + + aerosol_single_scattering_albedo_for_shortwave_bands_01-16 + aerosol single scattering albedo for shortwave bands 01-16 + frac + faersw2 + real + (:,:,:) + out + F + MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run + + + aerosol_asymmetry_parameter_for_shortwave_bands_01-16 + aerosol asymmetry parameter for shortwave bands 01-16 + none + faersw3 + real + (:,:,:) + out + F + MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run + + + aerosol_optical_depth_for_longwave_bands_01-16 + aerosol optical depth for longwave bands 01-16 + none + faerlw1 + real + (:,:,:) + out + F + MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run + + + aerosol_single_scattering_albedo_for_longwave_bands_01-16 + aerosol single scattering albedo for longwave bands 01-16 + frac + faerlw2 + real + (:,:,:) + out + F + MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run + + + aerosol_asymmetry_parameter_for_longwave_bands_01-16 + aerosol asymmetry parameter for longwave bands 01-16 + none + faerlw3 + real + (:,:,:) + out + F + MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run + + + atmosphere_optical_thickness_due_to_ambient_aerosol_particles + vertical integrated optical depth for various aerosol species + none + aerodp + real + (:,:) + out + F + MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run + + + total_cloud_fraction + layer total cloud fraction + frac + clouds1 + real + (:,:) + out + F + MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run + + + cloud_liquid_water_path + layer cloud liquid water path + g m-2 + clouds2 + real + (:,:) + out + F + MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run + + + mean_effective_radius_for_liquid_cloud + mean effective radius for liquid cloud + micron + clouds3 + real + (:,:) + out + F + MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run + + + cloud_ice_water_path + layer cloud ice water path + g m-2 + clouds4 + real + (:,:) + out + F + MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run + + + mean_effective_radius_for_ice_cloud + mean effective radius for ice cloud + micron + clouds5 + real + (:,:) + out + F + MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run + + + cloud_rain_water_path + cloud rain water path + g m-2 + clouds6 + real + (:,:) + out + F + MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run + + + mean_effective_radius_for_rain_drop + mean effective radius for rain drop + micron + clouds7 + real + (:,:) + out + F + MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run + + + cloud_snow_water_path + cloud snow water path + g m-2 + clouds8 + real + (:,:) + out + F + MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run + + + mean_effective_radius_for_snow_flake + mean effective radius for snow flake + micron + clouds9 + real + (:,:) + out + F + MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run + + + cloud_area_fraction_for_radiation + fraction of clouds for low, middle,high, total and BL + frac + cldsa + real + (:,:) + out + F + MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run + + + model_layer_number_at_cloud_top + vertical indices for low, middle and high cloud tops + index + mtopa + integer + (:,:) + out + F + MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run + + + model_layer_number_at_cloud_base + vertical indices for low, middle and high cloud bases + index + mbota + integer + (:,:) + out + F + MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run + + + cloud_decorrelation_length + cloud decorrelation length + km + de_lgth + real + (:) + out + F + MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run + + + surface_albedo_perturbation + surface albedo perturbation + frac + alb1d + real + (:) + out + F + MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run + + + diff --git a/physics/GFS_rrtmgp_setup.F90 b/physics/GFS_rrtmgp_setup.F90 new file mode 100644 index 000000000..9ae84063b --- /dev/null +++ b/physics/GFS_rrtmgp_setup.F90 @@ -0,0 +1,869 @@ +!> \file GFS_rrtmgp_setup.f90 +!! This file contains +module GFS_rrtmgp_setup + + use physparam, only : isolar , ictmflg, ico2flg, ioznflg, iaerflg,& +! & iaermdl, laswflg, lalwflg, lavoflg, icldflg, & + & iaermdl, icldflg, & + & iovrsw , iovrlw , lcrick , lcnorm , lnoprec, & + & ialbflg, iemsflg, isubcsw, isubclw, ivflip , ipsd0, & + & iswcliq, & + & kind_phys + + use radcons, only: ltp, lextop + + implicit none + + public GFS_rrtmgp_setup_init, GFS_rrtmgp_setup_run, GFS_rrtmgp_setup_finalize + + private + + logical :: is_initialized = .false. + + ! --- version tag and last revision date + character(40), parameter :: & + & VTAGRAD='NCEP-Radiation_driver v5.2 Jan 2013 ' + ! & VTAGRAD='NCEP-Radiation_driver v5.1 Nov 2012 ' + ! & VTAGRAD='NCEP-Radiation_driver v5.0 Aug 2012 ' + + !> new data input control variables (set/reset in subroutines radinit/radupdate): + integer :: month0 = 0 + integer :: iyear0 = 0 + integer :: monthd = 0 + + !> control flag for the first time of reading climatological ozone data + !! (set/reset in subroutines radinit/radupdate, it is used only if the + !! control parameter ioznflg=0) + logical :: loz1st = .true. + + contains + +!> \defgroup GFS_rrtmgp_setup GFS RRTMGP Scheme Setup +!! @{ +!! \section arg_table_GFS_rrtmgp_setup_init Argument Table +!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | +!! |--------------------------|-------------------------------------------------------------------------------|---------------------------------------------------------------|---------------|------|-----------|-----------|--------|----------| +!! | si | vertical_sigma_coordinate_for_radiation_initialization | vertical sigma coordinate for radiation initialization | none | 1 | real | kind_phys | in | F | +!! | levr | number_of_vertical_layers_for_radiation_calculations | number of vertical levels for radiation calculations | count | 0 | integer | | in | F | +!! | ictm | flag_for_initial_time-date_control | flag for initial conditions and forcing | flag | 0 | integer | | in | F | +!! | isol | flag_for_solar_constant | use prescribed solar constant | flag | 0 | integer | | in | F | +!! | ico2 | flag_for_using_prescribed_global_mean_co2_value | prescribed global mean value (old opernl) | flag | 0 | integer | | in | F | +!! | iaer | flag_for_default_aerosol_effect_in_shortwave_radiation | default aerosol effect in sw only | flag | 0 | integer | | in | F | +!! | ialb | flag_for_using_climatology_albedo | flag for using climatology alb, based on sfc type | flag | 0 | integer | | in | F | +!! | iems | flag_for_surface_emissivity_control | surface emissivity control flag, use fixed value of 1 | flag | 0 | integer | | in | F | +!! | ntcw | index_for_liquid_cloud_condensate | tracer index for cloud condensate (or liquid water) | index | 0 | integer | | in | F | +!! | num_p2d | array_dimension_of_2d_arrays_for_microphysics | number of 2D arrays needed for microphysics | count | 0 | integer | | in | F | +!! | num_p3d | array_dimension_of_3d_arrays_for_microphysics | number of 3D arrays needed for microphysics | count | 0 | integer | | in | F | +!! | npdf3d | number_of_3d_arrays_associated_with_pdf-based_clouds | number of 3d arrays associated with pdf based clouds/mp | count | 0 | integer | | in | F | +!! | ntoz | index_for_ozone | tracer index for ozone mixing ratio | index | 0 | integer | | in | F | +!! | iovr_sw | flag_for_max-random_overlap_clouds_for_shortwave_radiation | sw: max-random overlap clouds | flag | 0 | integer | | in | F | +!! | iovr_lw | flag_for_max-random_overlap_clouds_for_longwave_radiation | lw: max-random overlap clouds | flag | 0 | integer | | in | F | +!! | isubc_sw | flag_for_sw_clouds_without_sub-grid_approximation | flag for sw clouds without sub-grid approximation | flag | 0 | integer | | in | F | +!! | isubc_lw | flag_for_lw_clouds_without_sub-grid_approximation | flag for lw clouds without sub-grid approximation | flag | 0 | integer | | in | F | +!! | icliq_sw | flag_for_optical_property_for_liquid_clouds_for_shortwave_radiation | sw optical property for liquid clouds | flag | 0 | integer | | in | F | +!! | crick_proof | flag_for_CRICK-proof_cloud_water | flag for CRICK-Proof cloud water | flag | 0 | logical | | in | F | +!! | ccnorm | flag_for_cloud_condensate_normalized_by_cloud_cover | flag for cloud condensate normalized by cloud cover | flag | 0 | logical | | in | F | +!! | imp_physics | flag_for_microphysics_scheme | choice of microphysics scheme | flag | 0 | integer | | in | F | +!! | norad_precip | flag_for_precipitation_effect_on_radiation | radiation precip flag for Ferrier/Moorthi | flag | 0 | logical | | in | F | +!! | idate | date_and_time_at_model_initialization_reordered | initialization date and time | none | 1 | integer | | in | F | +!! | iflip | flag_for_vertical_index_direction_control | flag for vertical index direction control | flag | 0 | integer | | in | F | +!! | im | horizontal_loop_extent | horizontal loop extent | count | 0 | integer | | in | F | +!! | faerlw | aerosol_optical_properties_for_longwave_bands_01-16 | optical properties for longwave bands 01-16 | various | 4 | real | kind_phys | in | F | +!! | faersw | aerosol_optical_properties_for_shortwave_bands_01-16 | aerosol optical properties for shortwave bands 01-16 | various | 4 | real | kind_phys | in | F | +!! | aerodp | atmosphere_optical_thickness_due_to_ambient_aerosol_particles | vertical integrated optical depth for various aerosol species | none | 2 | real | kind_phys | in | F | +!! | me | mpi_rank | current MPI-rank | index | 0 | integer | | in | F | +!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | +!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! + subroutine GFS_rrtmgp_setup_init ( & + si, levr, ictm, isol, ico2, iaer, ialb, iems, ntcw, num_p2d, & + num_p3d, npdf3d, ntoz, iovr_sw, iovr_lw, isubc_sw, isubc_lw, & + icliq_sw, crick_proof, ccnorm, & + imp_physics, & + norad_precip, idate, iflip, & + im, faerlw, faersw, aerodp, & ! for consistency checks + me, errmsg, errflg) +! ================= subprogram documentation block ================ ! +! ! +! subprogram: GFS_rrtmgp_setup_init - a subprogram to initialize radiation ! +! ! +! usage: call GFS_rrtmgp_setup_init ! +! ! +! attributes: ! +! language: fortran 90 ! +! ! +! program history: ! +! mar 2012 - yu-tai hou create the program to initialize fixed ! +! control variables for radiaion processes. this ! +! subroutine is called at the start of model run. ! +! nov 2012 - yu-tai hou modified control parameter through ! +! module 'physparam'. ! +! mar 2014 - sarah lu iaermdl is determined from iaer ! +! jul 2014 - s moorthi add npdf3d for pdf clouds ! +! ! +! ==================== defination of variables ==================== ! +! ! +! input parameters: ! +! si : model vertical sigma interface or equivalence ! +! levr : number of model vertical layers ! +! ictm :=yyyy#, external data time/date control flag ! +! = -2: same as 0, but superimpose seasonal cycle ! +! from climatology data set. ! +! = -1: use user provided external data for the ! +! forecast time, no extrapolation. ! +! = 0: use data at initial cond time, if not ! +! available, use latest, no extrapolation. ! +! = 1: use data at the forecast time, if not ! +! available, use latest and extrapolation. ! +! =yyyy0: use yyyy data for the forecast time, ! +! no further data extrapolation. ! +! =yyyy1: use yyyy data for the fcst. if needed, do ! +! extrapolation to match the fcst time. ! +! isol := 0: use the old fixed solar constant in "physcon"! +! =10: use the new fixed solar constant in "physcon"! +! = 1: use noaa ann-mean tsi tbl abs-scale data tabl! +! = 2: use noaa ann-mean tsi tbl tim-scale data tabl! +! = 3: use cmip5 ann-mean tsi tbl tim-scale data tbl! +! = 4: use cmip5 mon-mean tsi tbl tim-scale data tbl! +! ico2 :=0: use prescribed global mean co2 (old oper) ! +! =1: use observed co2 annual mean value only ! +! =2: use obs co2 monthly data with 2-d variation ! +! iaer : 4-digit aerosol flag (dabc for aermdl,volc,lw,sw)! +! d: =0 or none, opac-climatology aerosol scheme ! +! =1 use gocart climatology aerosol scheme ! +! =2 use gocart progostic aerosol scheme ! +! a: =0 use background stratospheric aerosol ! +! =1 incl stratospheric vocanic aeros ! +! b: =0 no topospheric aerosol in lw radiation ! +! =1 include tropspheric aerosols for lw ! +! c: =0 no topospheric aerosol in sw radiation ! +! =1 include tropspheric aerosols for sw ! +! ialb : control flag for surface albedo schemes ! +! =0: climatology, based on surface veg types ! +! =1: modis retrieval based surface albedo scheme ! +! iems : ab 2-digit control flag ! +! a: =0 set sfc air/ground t same for lw radiation ! +! =1 set sfc air/ground t diff for lw radiation ! +! b: =0 use fixed sfc emissivity=1.0 (black-body) ! +! =1 use varying climtology sfc emiss (veg based)! +! =2 future development (not yet) ! +! ntcw :=0 no cloud condensate calculated ! +! >0 array index location for cloud condensate ! +! num_p3d :=3: ferrier's microphysics cloud scheme ! +! =4: zhao/carr/sundqvist microphysics cloud ! +! npdf3d =0 no pdf clouds ! +! =3 (when num_p3d=4) pdf clouds with zhao/carr/ ! +! sundqvist scheme ! +! ntoz : ozone data control flag ! +! =0: use climatological ozone profile ! +! >0: use interactive ozone profile ! +! icliq_sw : sw optical property for liquid clouds ! +! =0:input cld opt depth, ignoring iswcice setting ! +! =1:cloud optical property scheme based on Hu and ! +! Stamnes(1993) \cite hu_and_stamnes_1993 method ! +! =2:cloud optical property scheme based on Hu and ! +! Stamnes(1993) -updated ! +! iovr_sw/iovr_lw : control flag for cloud overlap (sw/lw rad) ! +! =0: random overlapping clouds ! +! =1: max/ran overlapping clouds ! +! =2: maximum overlap clouds (mcica only) ! +! =3: decorrelation-length overlap (mcica only) ! +! isubc_sw/isubc_lw: sub-column cloud approx control flag (sw/lw rad) ! +! =0: with out sub-column cloud approximation ! +! =1: mcica sub-col approx. prescribed random seed ! +! =2: mcica sub-col approx. provided random seed ! +! crick_proof : control flag for eliminating CRICK ! +! ccnorm : control flag for in-cloud condensate mixing ratio! +! norad_precip : control flag for not using precip in radiation ! +! idate(4) : ncep absolute date and time of initial condition ! +! (hour, month, day, year) ! +! iflip : control flag for direction of vertical index ! +! =0: index from toa to surface ! +! =1: index from surface to toa ! +! me : print control flag ! +! ! +! subroutines called: radinit ! +! ! +! =================================================================== ! +! + use module_radsw_parameters, only: NBDSW + use module_radlw_parameters, only: NBDLW + use module_radiation_aerosols,only: NF_AELW, NF_AESW, NSPC1 + use module_radiation_clouds, only: NF_CLDS + use module_radiation_gases, only: NF_VGAS + use module_radiation_surface, only: NF_ALBD + + implicit none + + ! interface variables + real (kind=kind_phys), intent(in) :: si(levr+1) + integer, intent(in) :: levr + integer, intent(in) :: ictm + integer, intent(in) :: isol + integer, intent(in) :: ico2 + integer, intent(in) :: iaer + integer, intent(in) :: ialb + integer, intent(in) :: iems + integer, intent(in) :: ntcw + integer, intent(in) :: num_p2d + integer, intent(in) :: num_p3d + integer, intent(in) :: npdf3d + integer, intent(in) :: ntoz + integer, intent(in) :: iovr_sw + integer, intent(in) :: iovr_lw + integer, intent(in) :: isubc_sw + integer, intent(in) :: isubc_lw + integer, intent(in) :: icliq_sw + logical, intent(in) :: crick_proof + logical, intent(in) :: ccnorm + integer, intent(in) :: imp_physics + logical, intent(in) :: norad_precip + integer, intent(in) :: idate(4) + integer, intent(in) :: iflip + ! For consistency checks + integer, intent(in) :: im + real(kind_phys), intent(in) :: faerlw(:,:,:,:) + real(kind_phys), intent(in) :: faersw(:,:,:,:) + real(kind_phys), intent(in) :: aerodp(:,:) + ! End for consistency checks + integer, intent(in) :: me + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + + ! For consistency checks + real(kind_phys), dimension(im,levr+ltp,NBDLW,NF_AELW) :: faerlw_check + real(kind_phys), dimension(im,levr+ltp,NBDSW,NF_AESW) :: faersw_check + real(kind_phys), dimension(im,NSPC1) :: aerodp_check + ! End for consistency checks + + ! Initialize the CCPP error handling variables + errmsg = '' + errflg = 0 + + if (is_initialized) return + + ! Consistency checks for dimensions of arrays, this is required + ! to detect differences in FV3's parameters that are used to + ! dimension certain arrays and the values in ccpp-physics + if (size(faerlw(1,:,:,:)).ne.size(faerlw_check(1,:,:,:))) then + write(errmsg,"(3a,4i4,a,4i4)") & + "Runtime error: dimension mismatch for faerlw,", & + " check definitions of levr, ltp, nbdlw, nf_aelw:", & + " expected shape ", shape(faerlw_check(:,:,:,:)), & + " but got ", shape(faerlw(:,:,:,:)) + errflg = 1 + return + end if + if (size(faersw(1,:,:,:)).ne.size(faersw_check(1,:,:,:))) then + write(errmsg,"(3a,4i4,a,4i4)") & + "Runtime error: dimension mismatch for faersw,", & + " check definitions of levr, ltp, nbdsw, nf_aesw:", & + " expected shape ", shape(faersw_check(:,:,:,:)), & + " but got ", shape(faersw(:,:,:,:)) + errflg = 1 + return + end if + if (size(aerodp(1,:)).ne.size(aerodp_check(1,:))) then + write(errmsg,"(3a,2i4,a,2i4)") & + "Runtime error: dimension mismatch for aerodp,", & + " check definitions of nspc1:", & + " expected shape ", shape(aerodp_check(:,:)), & + " but got ", shape(aerodp(:,:)) + errflg = 1 + return + end if + + ! End of consistency checks + + isolar = isol ! solar constant control flag + + ictmflg= ictm ! data ic time/date control flag + ico2flg= ico2 ! co2 data source control flag + ioznflg= ntoz ! ozone data source control flag + + if ( ictm==0 .or. ictm==-2 ) then + iaerflg = mod(iaer, 100) ! no volcanic aerosols for clim hindcast + else + iaerflg = mod(iaer, 1000) + endif + iaermdl = iaer/1000 ! control flag for aerosol scheme selection + if ( iaermdl < 0 .or. (iaermdl>2 .and. iaermdl/=5) ) then + print *, ' Error -- IAER flag is incorrect, Abort' + stop 7777 + endif + +! if ( ntcw > 0 ) then + icldflg = 1 ! prognostic cloud optical prop scheme +! else +! icldflg = 0 ! no support for diag cloud opt prop scheme +! endif + + iswcliq = icliq_sw ! optical property for liquid clouds for sw + + iovrsw = iovr_sw ! cloud overlapping control flag for sw + iovrlw = iovr_lw ! cloud overlapping control flag for lw + + lcrick = crick_proof ! control flag for eliminating CRICK + lcnorm = ccnorm ! control flag for in-cld condensate + lnoprec = norad_precip ! precip effect on radiation flag (ferrier microphysics) + isubcsw = isubc_sw ! sub-column cloud approx flag in sw radiation + isubclw = isubc_lw ! sub-column cloud approx flag in lw radiation + + ialbflg= ialb ! surface albedo control flag + iemsflg= iems ! surface emissivity control flag + + ivflip = iflip ! vertical index direction control flag + +! --- assign initial permutation seed for mcica cloud-radiation + if ( isubc_sw>0 .or. isubc_lw>0 ) then +! ipsd0 = 17*idate(1)+43*idate(2)+37*idate(3)+23*idate(4) + ipsd0 + ipsd0 = 17*idate(1)+43*idate(2)+37*idate(3)+23*idate(4) + endif + + if ( me == 0 ) then + print *,' In rad_initialize (GFS_rrtmgp_setup_init), before calling radinit' + print *,' si =',si + print *,' levr=',levr,' ictm=',ictm,' isol=',isol,' ico2=',ico2,& + & ' iaer=',iaer,' ialb=',ialb,' iems=',iems,' ntcw=',ntcw + print *,' np3d=',num_p3d,' ntoz=',ntoz,' iovr_sw=',iovr_sw, & + & ' iovr_lw=',iovr_lw,' isubc_sw=',isubc_sw, & + & ' isubc_lw=',isubc_lw,' icliq_sw=',icliq_sw, & + & ' iflip=',iflip,' me=',me + print *,' crick_proof=',crick_proof, & + & ' ccnorm=',ccnorm,' norad_precip=',norad_precip + endif + + call radinit & +! --- inputs: + & ( si, levr, imp_physics, me ) +! --- outputs: +! ( none ) + + if ( me == 0 ) then + print *,' Radiation sub-cloud initial seed =',ipsd0, & + & ' IC-idate =',idate + print *,' return from rad_initialize (GFS_rrtmgp_setup_init) - after calling radinit' + endif +! + is_initialized = .true. +! + return + + end subroutine GFS_rrtmgp_setup_init + +!> \section arg_table_GFS_rrtmgp_setup_run Argument Table +!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | +!! |--------------------------|-------------------------------------------------------------------------------|---------------------------------------------------------|---------------|------|-----------|-----------|--------|----------| +!! | idate | date_and_time_at_model_initialization | initialization date and time | none | 1 | integer | | in | F | +!! | jdate | forecast_date_and_time | current forecast date and time | none | 1 | integer | | in | F | +!! | deltsw | frequency_for_shortwave_radiation | frequency for shortwave radiation | s | 0 | real | kind_phys | in | F | +!! | deltim | time_step_for_dynamics | dynamics timestep | s | 0 | real | kind_phys | in | F | +!! | lsswr | flag_to_calc_sw | logical flags for sw radiation calls | flag | 0 | logical | | in | F | +!! | me | mpi_rank | current MPI-rank | index | 0 | integer | | in | F | +!! | slag | equation_of_time | equation of time (radian) | radians | 0 | real | kind_phys | out | F | +!! | sdec | sine_of_solar_declination_angle | sin of the solar declination angle | none | 0 | real | kind_phys | out | F | +!! | cdec | cosine_of_solar_declination_angle | cos of the solar declination angle | none | 0 | real | kind_phys | out | F | +!! | solcon | solar_constant | solar constant (sun-earth distant adjusted) | W m-2 | 0 | real | kind_phys | out | F | +!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | +!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! + subroutine GFS_rrtmgp_setup_run ( & + idate, jdate, deltsw, deltim, lsswr, me, & + slag, sdec, cdec, solcon, errmsg, errflg) + + implicit none + + ! interface variables + integer, intent(in) :: idate(:) + integer, intent(in) :: jdate(:) + real(kind=kind_phys), intent(in) :: deltsw + real(kind=kind_phys), intent(in) :: deltim + logical, intent(in) :: lsswr + integer, intent(in) :: me + real(kind=kind_phys), intent(out) :: slag + real(kind=kind_phys), intent(out) :: sdec + real(kind=kind_phys), intent(out) :: cdec + real(kind=kind_phys), intent(out) :: solcon + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + + ! Check initialization state + if (.not.is_initialized) then + write(errmsg, fmt='((a))') 'GFS_rrtmgp_setup_run called before GFS_rrtmgp_setup_init' + errflg = 1 + return + end if + + ! Initialize the CCPP error handling variables + errmsg = '' + errflg = 0 + + call radupdate(idate,jdate,deltsw,deltim,lsswr,me, & + slag,sdec,cdec,solcon) + + end subroutine GFS_rrtmgp_setup_run + +!> \section arg_table_GFS_rrtmgp_setup_finalize Argument Table +!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | +!! |--------------------------|-------------------------------------------------------------------------------|---------------------------------------------------------|---------------|------|-----------|-----------|--------|----------| +!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | +!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! + subroutine GFS_rrtmgp_setup_finalize (errmsg, errflg) + + implicit none + + character(len=*), intent( out) :: errmsg + integer, intent( out) :: errflg + + ! Initialize the CCPP error handling variables + errmsg = '' + errflg = 0 + + if (.not.is_initialized) return + + ! do finalization stuff if needed + + is_initialized = .false. + + end subroutine GFS_rrtmgp_setup_finalize + + +! Private functions + + + subroutine radinit( si, NLAY, imp_physics, me ) +!................................... + +! --- inputs: +! & ( si, NLAY, imp_physics, me ) +! --- outputs: +! ( none ) + +! ================= subprogram documentation block ================ ! +! ! +! subprogram: radinit initialization of radiation calculations ! +! ! +! usage: call radinit ! +! ! +! attributes: ! +! language: fortran 90 ! +! machine: wcoss ! +! ! +! ==================== definition of variables ==================== ! +! ! +! input parameters: ! +! si : model vertical sigma interface ! +! NLAY : number of model vertical layers ! +! imp_physics : MP identifier ! +! me : print control flag ! +! ! +! outputs: (none) ! +! ! +! external module variables: (in module physparam) ! +! isolar : solar constant cntrol flag ! +! = 0: use the old fixed solar constant in "physcon" ! +! =10: use the new fixed solar constant in "physcon" ! +! = 1: use noaa ann-mean tsi tbl abs-scale with cycle apprx! +! = 2: use noaa ann-mean tsi tbl tim-scale with cycle apprx! +! = 3: use cmip5 ann-mean tsi tbl tim-scale with cycl apprx! +! = 4: use cmip5 mon-mean tsi tbl tim-scale with cycl apprx! +! iaerflg : 3-digit aerosol flag (abc for volc, lw, sw) ! +! a:=0 use background stratospheric aerosol ! +! =1 include stratospheric vocanic aeros ! +! b:=0 no topospheric aerosol in lw radiation ! +! =1 compute tropspheric aero in 1 broad band for lw ! +! =2 compute tropspheric aero in multi bands for lw ! +! c:=0 no topospheric aerosol in sw radiation ! +! =1 include tropspheric aerosols for sw ! +! ico2flg : co2 data source control flag ! +! =0: use prescribed global mean co2 (old oper) ! +! =1: use observed co2 annual mean value only ! +! =2: use obs co2 monthly data with 2-d variation ! +! ictmflg : =yyyy#, external data ic time/date control flag ! +! = -2: same as 0, but superimpose seasonal cycle ! +! from climatology data set. ! +! = -1: use user provided external data for the ! +! forecast time, no extrapolation. ! +! = 0: use data at initial cond time, if not ! +! available, use latest, no extrapolation. ! +! = 1: use data at the forecast time, if not ! +! available, use latest and extrapolation. ! +! =yyyy0: use yyyy data for the forecast time, ! +! no further data extrapolation. ! +! =yyyy1: use yyyy data for the fcst. if needed, do ! +! extrapolation to match the fcst time. ! +! ioznflg : ozone data source control flag ! +! =0: use climatological ozone profile ! +! =1: use interactive ozone profile ! +! ialbflg : albedo scheme control flag ! +! =0: climatology, based on surface veg types ! +! =1: modis retrieval based surface albedo scheme ! +! iemsflg : emissivity scheme cntrl flag (ab 2-digit integer) ! +! a:=0 set sfc air/ground t same for lw radiation ! +! =1 set sfc air/ground t diff for lw radiation ! +! b:=0 use fixed sfc emissivity=1.0 (black-body) ! +! =1 use varying climtology sfc emiss (veg based) ! +! =2 future development (not yet) ! +! icldflg : cloud optical property scheme control flag ! +! =0: use diagnostic cloud scheme ! +! =1: use prognostic cloud scheme (default) ! +! imp_physics : cloud microphysics scheme control flag ! +! =99 zhao/carr/sundqvist microphysics scheme ! +! =98 zhao/carr/sundqvist microphysics+pdf cloud&cnvc,cnvw ! +! =11 GFDL cloud microphysics ! +! =8 Thompson microphysics scheme ! +! =6 WSM6 microphysics scheme ! +! =10 MG microphysics scheme ! +! iovrsw : control flag for cloud overlap in sw radiation ! +! iovrlw : control flag for cloud overlap in lw radiation ! +! =0: random overlapping clouds ! +! =1: max/ran overlapping clouds ! +! isubcsw : sub-column cloud approx control flag in sw radiation ! +! isubclw : sub-column cloud approx control flag in lw radiation ! +! =0: with out sub-column cloud approximation ! +! =1: mcica sub-col approx. prescribed random seed ! +! =2: mcica sub-col approx. provided random seed ! +! lcrick : control flag for eliminating CRICK ! +! =t: apply layer smoothing to eliminate CRICK ! +! =f: do not apply layer smoothing ! +! lcnorm : control flag for in-cld condensate ! +! =t: normalize cloud condensate ! +! =f: not normalize cloud condensate ! +! lnoprec : precip effect in radiation flag (ferrier microphysics) ! +! =t: snow/rain has no impact on radiation ! +! =f: snow/rain has impact on radiation ! +! ivflip : vertical index direction control flag ! +! =0: index from toa to surface ! +! =1: index from surface to toa ! +! ! +! subroutines called: sol_init, aer_init, gas_init, cld_init, ! +! sfc_init, rlwinit, rswinit ! +! ! +! usage: call radinit ! +! ! +! =================================================================== ! +! + + use module_radiation_astronomy, only : sol_init + use module_radiation_aerosols, only : aer_init + use module_radiation_gases, only : gas_init + use module_radiation_surface, only : sfc_init + use module_radiation_clouds, only : cld_init + ! DH* these should be called by rrtmgp_lw_init and rrtmgp_sw_init! + use rrtmg_sw, only : rswinit + + implicit none + +! --- inputs: + integer, intent(in) :: NLAY, me, imp_physics + + real (kind=kind_phys), intent(in) :: si(:) + +! --- outputs: (none, to module variables) + +! --- locals: + +! +!===> ... begin here +! +!> -# Set up control variables and external module variables in +!! module physparam +#if 0 + ! GFS_radiation_driver.F90 may in the future initialize air/ground + ! temperature differently; however, this is not used at the moment + ! and as such we avoid the difficulty of dealing with exchanging + ! itsfc between GFS_rrtmgp_setup and a yet-to-be-created/-used + ! interstitial routine (or GFS_radiation_driver.F90) + itsfc = iemsflg / 10 ! sfc air/ground temp control +#endif + loz1st = (ioznflg == 0) ! first-time clim ozone data read flag + month0 = 0 + iyear0 = 0 + monthd = 0 + + if (me == 0) then +! print *,' NEW RADIATION PROGRAM STRUCTURES -- SEP 01 2004' + print *,' NEW RADIATION PROGRAM STRUCTURES BECAME OPER. ', & + & ' May 01 2007' + print *, VTAGRAD !print out version tag + print *,' - Selected Control Flag settings: ICTMflg=',ictmflg, & + & ' ISOLar =',isolar, ' ICO2flg=',ico2flg,' IAERflg=',iaerflg, & + & ' IALBflg=',ialbflg,' IEMSflg=',iemsflg,' ICLDflg=',icldflg, & + & ' IMP_PHYSICS=',imp_physics,' IOZNflg=',ioznflg + print *,' IVFLIP=',ivflip,' IOVRSW=',iovrsw,' IOVRLW=',iovrlw, & + & ' ISUBCSW=',isubcsw,' ISUBCLW=',isubclw +! write(0,*)' IVFLIP=',ivflip,' IOVRSW=',iovrsw,' IOVRLW=',iovrlw,& +! & ' ISUBCSW=',isubcsw,' ISUBCLW=',isubclw + print *,' LCRICK=',lcrick,' LCNORM=',lcnorm,' LNOPREC=',lnoprec + print *,' LTP =',ltp,', add extra top layer =',lextop + + if ( ictmflg==0 .or. ictmflg==-2 ) then + print *,' Data usage is limited by initial condition!' + print *,' No volcanic aerosols' + endif + + if ( isubclw == 0 ) then + print *,' - ISUBCLW=',isubclw,' No McICA, use grid ', & + & 'averaged cloud in LW radiation' + elseif ( isubclw == 1 ) then + print *,' - ISUBCLW=',isubclw,' Use McICA with fixed ', & + & 'permutation seeds for LW random number generator' + elseif ( isubclw == 2 ) then + print *,' - ISUBCLW=',isubclw,' Use McICA with random ', & + & 'permutation seeds for LW random number generator' + else + print *,' - ERROR!!! ISUBCLW=',isubclw,' is not a ', & + & 'valid option ' + stop + endif + + if ( isubcsw == 0 ) then + print *,' - ISUBCSW=',isubcsw,' No McICA, use grid ', & + & 'averaged cloud in SW radiation' + elseif ( isubcsw == 1 ) then + print *,' - ISUBCSW=',isubcsw,' Use McICA with fixed ', & + & 'permutation seeds for SW random number generator' + elseif ( isubcsw == 2 ) then + print *,' - ISUBCSW=',isubcsw,' Use McICA with random ', & + & 'permutation seeds for SW random number generator' + else + print *,' - ERROR!!! ISUBCSW=',isubcsw,' is not a ', & + & 'valid option ' + stop + endif + + if ( isubcsw /= isubclw ) then + print *,' - *** Notice *** ISUBCSW /= ISUBCLW !!!', & + & isubcsw, isubclw + endif + endif + +!> -# Initialization +!! - astronomy initialization routine: +!! call module_radiation_astronomy::sol_init() +!! - aerosols initialization routine: +!! call module_radiation_aerosols::aer_init() +!! - CO2 and other gases intialization routine: +!! call module_radiation_gases::gas_init() +!! - surface intialization routine: +!! call module_radiation_surface::sfc_init() +!! - cloud initialization routine: +!! call module_radiation_clouds::cld_init() +!! - LW radiation initialization routine: +!! call module_radlw_main::rlwinit() +!! - SW radiation initialization routine: +!! call module_radsw_main::rswinit() +! Initialization + + call sol_init ( me ) ! --- ... astronomy initialization routine + + call aer_init ( NLAY, me ) ! --- ... aerosols initialization routine + + call gas_init ( me ) ! --- ... co2 and other gases initialization routine + + call sfc_init ( me ) ! --- ... surface initialization routine + + call cld_init ( si, NLAY, imp_physics, me) ! --- ... cloud initialization routine + + !call rlwinit ( me ) ! --- ... lw radiation initialization routine + + call rswinit ( me ) ! --- ... sw radiation initialization routine +! + return +!................................... + end subroutine radinit + !----------------------------------- + +!> This subroutine checks and updates time sensitive data used by +!! radiation computations. This subroutine needs to be placed inside +!! the time advancement loop but outside of the horizontal grid loop. +!! It is invoked at radiation calling frequncy but before any actual +!! radiative transfer computations. +!! \param idate NCEP absolute date and time of intial condition +!! (year,month,day,time-zone,hour,minute,second, +!! mil-second) +!! \param jdate NCEP absolute date and time at forecast time +!! (year,month,day,time-zone,hour,minute,second, +!! mil-second) +!! \param deltsw SW radiation calling time interval in seconds +!! \param deltim model advancing time-step duration in seconds +!! \param lsswr logical control flag for SW radiation calculations +!! \param me print control flag +!! \param slag equation of time in radians +!! \param sdec,cdec sine and cosine of the solar declination angle +!! \param solcon solar constant adjusted by sun-earth distance \f$(W/m^2)\f$ +!> \section gen_radupdate General Algorithm +!> @{ +!----------------------------------- + subroutine radupdate( idate,jdate,deltsw,deltim,lsswr, me, & + & slag,sdec,cdec,solcon) +!................................... + +! ================= subprogram documentation block ================ ! +! ! +! subprogram: radupdate calls many update subroutines to check and ! +! update radiation required but time varying data sets and module ! +! variables. ! +! ! +! usage: call radupdate ! +! ! +! attributes: ! +! language: fortran 90 ! +! machine: ibm sp ! +! ! +! ==================== definition of variables ==================== ! +! ! +! input parameters: ! +! idate(8) : ncep absolute date and time of initial condition ! +! (yr, mon, day, t-zone, hr, min, sec, mil-sec) ! +! jdate(8) : ncep absolute date and time at fcst time ! +! (yr, mon, day, t-zone, hr, min, sec, mil-sec) ! +! deltsw : sw radiation calling frequency in seconds ! +! deltim : model timestep in seconds ! +! lsswr : logical flags for sw radiation calculations ! +! me : print control flag ! +! ! +! outputs: ! +! slag : equation of time in radians ! +! sdec, cdec : sin and cos of the solar declination angle ! +! solcon : sun-earth distance adjusted solar constant (w/m2) ! +! ! +! external module variables: ! +! isolar : solar constant cntrl (in module physparam) ! +! = 0: use the old fixed solar constant in "physcon" ! +! =10: use the new fixed solar constant in "physcon" ! +! = 1: use noaa ann-mean tsi tbl abs-scale with cycle apprx! +! = 2: use noaa ann-mean tsi tbl tim-scale with cycle apprx! +! = 3: use cmip5 ann-mean tsi tbl tim-scale with cycl apprx! +! = 4: use cmip5 mon-mean tsi tbl tim-scale with cycl apprx! +! ictmflg : =yyyy#, external data ic time/date control flag ! +! = -2: same as 0, but superimpose seasonal cycle ! +! from climatology data set. ! +! = -1: use user provided external data for the ! +! forecast time, no extrapolation. ! +! = 0: use data at initial cond time, if not ! +! available, use latest, no extrapolation. ! +! = 1: use data at the forecast time, if not ! +! available, use latest and extrapolation. ! +! =yyyy0: use yyyy data for the forecast time, ! +! no further data extrapolation. ! +! =yyyy1: use yyyy data for the fcst. if needed, do ! +! extrapolation to match the fcst time. ! +! ! +! module variables: ! +! loz1st : first-time clim ozone data read flag ! +! ! +! subroutines called: sol_update, aer_update, gas_update ! +! ! +! =================================================================== ! +! + use module_radiation_astronomy, only : sol_update + use module_radiation_aerosols, only : aer_update + use module_radiation_gases, only : gas_update + + implicit none + +! --- inputs: + integer, intent(in) :: idate(:), jdate(:), me + logical, intent(in) :: lsswr + + real (kind=kind_phys), intent(in) :: deltsw, deltim + +! --- outputs: + real (kind=kind_phys), intent(out) :: slag, sdec, cdec, solcon + +! --- locals: + integer :: iyear, imon, iday, ihour + integer :: kyear, kmon, kday, khour + + logical :: lmon_chg ! month change flag + logical :: lco2_chg ! cntrl flag for updating co2 data + logical :: lsol_chg ! cntrl flag for updating solar constant +! +!===> ... begin here +! +!> -# Set up time stamp at fcst time and that for green house gases +!! (currently co2 only) +! --- ... time stamp at fcst time + + iyear = jdate(1) + imon = jdate(2) + iday = jdate(3) + ihour = jdate(5) + +! --- ... set up time stamp used for green house gases (** currently co2 only) + + if ( ictmflg==0 .or. ictmflg==-2 ) then ! get external data at initial condition time + kyear = idate(1) + kmon = idate(2) + kday = idate(3) + khour = idate(5) + else ! get external data at fcst or specified time + kyear = iyear + kmon = imon + kday = iday + khour = ihour + endif ! end if_ictmflg_block + + if ( month0 /= imon ) then + lmon_chg = .true. + month0 = imon + else + lmon_chg = .false. + endif + +!> -# Call module_radiation_astronomy::sol_update(), yearly update, no +!! time interpolation. + if (lsswr) then + + if ( isolar == 0 .or. isolar == 10 ) then + lsol_chg = .false. + elseif ( iyear0 /= iyear ) then + lsol_chg = .true. + else + lsol_chg = ( isolar==4 .and. lmon_chg ) + endif + iyear0 = iyear + + call sol_update & +! --- inputs: + & ( jdate,kyear,deltsw,deltim,lsol_chg, me, & +! --- outputs: + & slag,sdec,cdec,solcon & + & ) + + endif ! end_if_lsswr_block + +!> -# Call module_radiation_aerosols::aer_update(), monthly update, no +!! time interpolation + if ( lmon_chg ) then + call aer_update ( iyear, imon, me ) + endif + +!> -# Call co2 and other gases update routine: +!! module_radiation_gases::gas_update() + if ( monthd /= kmon ) then + monthd = kmon + lco2_chg = .true. + else + lco2_chg = .false. + endif + + call gas_update ( kyear,kmon,kday,khour,loz1st,lco2_chg, me ) + + if ( loz1st ) loz1st = .false. + +!> -# Call surface update routine (currently not needed) +! call sfc_update ( iyear, imon, me ) + +!> -# Call clouds update routine (currently not needed) +! call cld_update ( iyear, imon, me ) +! + return +!................................... + end subroutine radupdate +!----------------------------------- + +!! @} +end module GFS_rrtmgp_setup diff --git a/physics/GFS_rrtmgp_setup.xml b/physics/GFS_rrtmgp_setup.xml new file mode 100644 index 000000000..721534e4d --- /dev/null +++ b/physics/GFS_rrtmgp_setup.xml @@ -0,0 +1,504 @@ + + + + + date_and_time_at_model_initialization + initialization date and time + none + idate + integer + (:) + in + F + MODULE_GFS_rrtmgp_setup SCHEME_GFS_rrtmgp_setup SUBROUTINE_GFS_rrtmgp_setup_run + + + forecast_date_and_time + current forecast date and time + none + jdate + integer + (:) + in + F + MODULE_GFS_rrtmgp_setup SCHEME_GFS_rrtmgp_setup SUBROUTINE_GFS_rrtmgp_setup_run + + + frequency_for_shortwave_radiation + frequency for shortwave radiation + s + deltsw + real + + in + F + MODULE_GFS_rrtmgp_setup SCHEME_GFS_rrtmgp_setup SUBROUTINE_GFS_rrtmgp_setup_run + + + time_step_for_dynamics + dynamics timestep + s + deltim + real + + in + F + MODULE_GFS_rrtmgp_setup SCHEME_GFS_rrtmgp_setup SUBROUTINE_GFS_rrtmgp_setup_run + + + flag_to_calc_sw + logical flags for sw radiation calls + flag + lsswr + logical + + in + F + MODULE_GFS_rrtmgp_setup SCHEME_GFS_rrtmgp_setup SUBROUTINE_GFS_rrtmgp_setup_run + + + mpi_rank + current MPI-rank + index + me + integer + + in + F + MODULE_GFS_rrtmgp_setup SCHEME_GFS_rrtmgp_setup SUBROUTINE_GFS_rrtmgp_setup_run + + + equation_of_time + equation of time (radian) + radians + slag + real + + out + F + MODULE_GFS_rrtmgp_setup SCHEME_GFS_rrtmgp_setup SUBROUTINE_GFS_rrtmgp_setup_run + + + sine_of_solar_declination_angle + sin of the solar declination angle + none + sdec + real + + out + F + MODULE_GFS_rrtmgp_setup SCHEME_GFS_rrtmgp_setup SUBROUTINE_GFS_rrtmgp_setup_run + + + cosine_of_solar_declination_angle + cos of the solar declination angle + none + cdec + real + + out + F + MODULE_GFS_rrtmgp_setup SCHEME_GFS_rrtmgp_setup SUBROUTINE_GFS_rrtmgp_setup_run + + + solar_constant + solar constant (sun-earth distant adjusted) + W m-2 + solcon + real + + out + F + MODULE_GFS_rrtmgp_setup SCHEME_GFS_rrtmgp_setup SUBROUTINE_GFS_rrtmgp_setup_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_GFS_rrtmgp_setup SCHEME_GFS_rrtmgp_setup SUBROUTINE_GFS_rrtmgp_setup_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_GFS_rrtmgp_setup SCHEME_GFS_rrtmgp_setup SUBROUTINE_GFS_rrtmgp_setup_run + + + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_GFS_rrtmgp_setup SCHEME_GFS_rrtmgp_setup SUBROUTINE_GFS_rrtmgp_setup_finalize + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_GFS_rrtmgp_setup SCHEME_GFS_rrtmgp_setup SUBROUTINE_GFS_rrtmgp_setup_finalize + + + + + vertical_sigma_coordinate_for_radiation_initialization + vertical sigma coordinate for radiation initialization + none + si + real + (:) + in + F + MODULE_GFS_rrtmgp_setup SCHEME_GFS_rrtmgp_setup SUBROUTINE_GFS_rrtmgp_setup_init + + + number_of_vertical_layers_for_radiation_calculations + number of vertical levels for radiation calculations + count + levr + integer + + in + F + MODULE_GFS_rrtmgp_setup SCHEME_GFS_rrtmgp_setup SUBROUTINE_GFS_rrtmgp_setup_init + + + flag_for_initial_time-date_control + flag for initial conditions and forcing + flag + ictm + integer + + in + F + MODULE_GFS_rrtmgp_setup SCHEME_GFS_rrtmgp_setup SUBROUTINE_GFS_rrtmgp_setup_init + + + flag_for_solar_constant + use prescribed solar constant + flag + isol + integer + + in + F + MODULE_GFS_rrtmgp_setup SCHEME_GFS_rrtmgp_setup SUBROUTINE_GFS_rrtmgp_setup_init + + + flag_for_using_prescribed_global_mean_co2_value + prescribed global mean value (old opernl) + flag + ico2 + integer + + in + F + MODULE_GFS_rrtmgp_setup SCHEME_GFS_rrtmgp_setup SUBROUTINE_GFS_rrtmgp_setup_init + + + flag_for_default_aerosol_effect_in_shortwave_radiation + default aerosol effect in sw only + flag + iaer + integer + + in + F + MODULE_GFS_rrtmgp_setup SCHEME_GFS_rrtmgp_setup SUBROUTINE_GFS_rrtmgp_setup_init + + + flag_for_using_climatology_albedo + flag for using climatology alb, based on sfc type + flag + ialb + integer + + in + F + MODULE_GFS_rrtmgp_setup SCHEME_GFS_rrtmgp_setup SUBROUTINE_GFS_rrtmgp_setup_init + + + flag_for_surface_emissivity_control + surface emissivity control flag, use fixed value of 1 + flag + iems + integer + + in + F + MODULE_GFS_rrtmgp_setup SCHEME_GFS_rrtmgp_setup SUBROUTINE_GFS_rrtmgp_setup_init + + + index_for_liquid_cloud_condensate + tracer index for cloud condensate (or liquid water) + index + ntcw + integer + + in + F + MODULE_GFS_rrtmgp_setup SCHEME_GFS_rrtmgp_setup SUBROUTINE_GFS_rrtmgp_setup_init + + + array_dimension_of_2d_arrays_for_microphysics + number of 2D arrays needed for microphysics + count + num_p2d + integer + + in + F + MODULE_GFS_rrtmgp_setup SCHEME_GFS_rrtmgp_setup SUBROUTINE_GFS_rrtmgp_setup_init + + + array_dimension_of_3d_arrays_for_microphysics + number of 3D arrays needed for microphysics + count + num_p3d + integer + + in + F + MODULE_GFS_rrtmgp_setup SCHEME_GFS_rrtmgp_setup SUBROUTINE_GFS_rrtmgp_setup_init + + + number_of_3d_arrays_associated_with_pdf-based_clouds + number of 3d arrays associated with pdf based clouds/mp + count + npdf3d + integer + + in + F + MODULE_GFS_rrtmgp_setup SCHEME_GFS_rrtmgp_setup SUBROUTINE_GFS_rrtmgp_setup_init + + + index_for_ozone + tracer index for ozone mixing ratio + index + ntoz + integer + + in + F + MODULE_GFS_rrtmgp_setup SCHEME_GFS_rrtmgp_setup SUBROUTINE_GFS_rrtmgp_setup_init + + + flag_for_max-random_overlap_clouds_for_shortwave_radiation + sw: max-random overlap clouds + flag + iovr_sw + integer + + in + F + MODULE_GFS_rrtmgp_setup SCHEME_GFS_rrtmgp_setup SUBROUTINE_GFS_rrtmgp_setup_init + + + flag_for_max-random_overlap_clouds_for_longwave_radiation + lw: max-random overlap clouds + flag + iovr_lw + integer + + in + F + MODULE_GFS_rrtmgp_setup SCHEME_GFS_rrtmgp_setup SUBROUTINE_GFS_rrtmgp_setup_init + + + flag_for_sw_clouds_without_sub-grid_approximation + flag for sw clouds without sub-grid approximation + flag + isubc_sw + integer + + in + F + MODULE_GFS_rrtmgp_setup SCHEME_GFS_rrtmgp_setup SUBROUTINE_GFS_rrtmgp_setup_init + + + flag_for_lw_clouds_without_sub-grid_approximation + flag for lw clouds without sub-grid approximation + flag + isubc_lw + integer + + in + F + MODULE_GFS_rrtmgp_setup SCHEME_GFS_rrtmgp_setup SUBROUTINE_GFS_rrtmgp_setup_init + + + flag_for_optical_property_for_liquid_clouds_for_shortwave_radiation + sw optical property for liquid clouds + flag + icliq_sw + integer + + in + F + MODULE_GFS_rrtmgp_setup SCHEME_GFS_rrtmgp_setup SUBROUTINE_GFS_rrtmgp_setup_init + + + flag_for_CRICK-proof_cloud_water + flag for CRICK-Proof cloud water + flag + crick_proof + logical + + in + F + MODULE_GFS_rrtmgp_setup SCHEME_GFS_rrtmgp_setup SUBROUTINE_GFS_rrtmgp_setup_init + + + flag_for_cloud_condensate_normalized_by_cloud_cover + flag for cloud condensate normalized by cloud cover + flag + ccnorm + logical + + in + F + MODULE_GFS_rrtmgp_setup SCHEME_GFS_rrtmgp_setup SUBROUTINE_GFS_rrtmgp_setup_init + + + flag_for_microphysics_scheme + choice of microphysics scheme + flag + imp_physics + integer + + in + F + MODULE_GFS_rrtmgp_setup SCHEME_GFS_rrtmgp_setup SUBROUTINE_GFS_rrtmgp_setup_init + + + flag_for_precipitation_effect_on_radiation + radiation precip flag for Ferrier/Moorthi + flag + norad_precip + logical + + in + F + MODULE_GFS_rrtmgp_setup SCHEME_GFS_rrtmgp_setup SUBROUTINE_GFS_rrtmgp_setup_init + + + date_and_time_at_model_initialization_reordered + initialization date and time + none + idate + integer + (:) + in + F + MODULE_GFS_rrtmgp_setup SCHEME_GFS_rrtmgp_setup SUBROUTINE_GFS_rrtmgp_setup_init + + + flag_for_vertical_index_direction_control + flag for vertical index direction control + flag + iflip + integer + + in + F + MODULE_GFS_rrtmgp_setup SCHEME_GFS_rrtmgp_setup SUBROUTINE_GFS_rrtmgp_setup_init + + + horizontal_loop_extent + horizontal loop extent + count + im + integer + + in + F + MODULE_GFS_rrtmgp_setup SCHEME_GFS_rrtmgp_setup SUBROUTINE_GFS_rrtmgp_setup_init + + + aerosol_optical_properties_for_longwave_bands_01-16 + optical properties for longwave bands 01-16 + various + faerlw + real + (:,:,:,:) + in + F + MODULE_GFS_rrtmgp_setup SCHEME_GFS_rrtmgp_setup SUBROUTINE_GFS_rrtmgp_setup_init + + + aerosol_optical_properties_for_shortwave_bands_01-16 + aerosol optical properties for shortwave bands 01-16 + various + faersw + real + (:,:,:,:) + in + F + MODULE_GFS_rrtmgp_setup SCHEME_GFS_rrtmgp_setup SUBROUTINE_GFS_rrtmgp_setup_init + + + atmosphere_optical_thickness_due_to_ambient_aerosol_particles + vertical integrated optical depth for various aerosol species + none + aerodp + real + (:,:) + in + F + MODULE_GFS_rrtmgp_setup SCHEME_GFS_rrtmgp_setup SUBROUTINE_GFS_rrtmgp_setup_init + + + mpi_rank + current MPI-rank + index + me + integer + + in + F + MODULE_GFS_rrtmgp_setup SCHEME_GFS_rrtmgp_setup SUBROUTINE_GFS_rrtmgp_setup_init + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_GFS_rrtmgp_setup SCHEME_GFS_rrtmgp_setup SUBROUTINE_GFS_rrtmgp_setup_init + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_GFS_rrtmgp_setup SCHEME_GFS_rrtmgp_setup SUBROUTINE_GFS_rrtmgp_setup_init + + + diff --git a/physics/GFS_suite_interstitial_1.xml b/physics/GFS_suite_interstitial_1.xml new file mode 100644 index 000000000..75b62c906 --- /dev/null +++ b/physics/GFS_suite_interstitial_1.xml @@ -0,0 +1,304 @@ + + + + + + + horizontal_loop_extent + horizontal loop extent + count + im + integer + + in + F + MODULE_GFS_suite_interstitial_1 SCHEME_GFS_suite_interstitial_1 SUBROUTINE_GFS_suite_interstitial_1_run + + + vertical_dimension + vertical layer dimension + count + levs + integer + + in + F + MODULE_GFS_suite_interstitial_1 SCHEME_GFS_suite_interstitial_1 SUBROUTINE_GFS_suite_interstitial_1_run + + + number_of_tracers + number of tracers + count + ntrac + integer + + in + F + MODULE_GFS_suite_interstitial_1 SCHEME_GFS_suite_interstitial_1 SUBROUTINE_GFS_suite_interstitial_1_run + + + critical_relative_humidity_at_sfc_pbltop_toa + critical relative humidity at SFC, PBL top and TOA + frac + crtrh + real + (:) + in + F + MODULE_GFS_suite_interstitial_1 SCHEME_GFS_suite_interstitial_1 SUBROUTINE_GFS_suite_interstitial_1_run + + + time_step_for_dynamics + dynamics timestep + s + dtf + real + + in + F + MODULE_GFS_suite_interstitial_1 SCHEME_GFS_suite_interstitial_1 SUBROUTINE_GFS_suite_interstitial_1_run + + + time_step_for_physics + physics timestep + s + dtp + real + + in + F + MODULE_GFS_suite_interstitial_1 SCHEME_GFS_suite_interstitial_1 SUBROUTINE_GFS_suite_interstitial_1_run + + + sea_land_ice_mask_real + landmask: sea/land/ice=0/1/2 + flag + slmsk + real + (:) + in + F + MODULE_GFS_suite_interstitial_1 SCHEME_GFS_suite_interstitial_1 SUBROUTINE_GFS_suite_interstitial_1_run + + + cell_area + area of the grid cell + m2 + area + real + (:) + in + F + MODULE_GFS_suite_interstitial_1 SCHEME_GFS_suite_interstitial_1 SUBROUTINE_GFS_suite_interstitial_1_run + + + minimum_scaling_factor_for_critical_relative_humidity + minimum scaling factor for critical relative humidity + m2 rad-2 + dxmin + real + + in + F + MODULE_GFS_suite_interstitial_1 SCHEME_GFS_suite_interstitial_1 SUBROUTINE_GFS_suite_interstitial_1_run + + + inverse_scaling_factor_for_critical_relative_humidity + inverse scaling factor for critical relative humidity + rad2 m-2 + dxinv + real + + in + F + MODULE_GFS_suite_interstitial_1 SCHEME_GFS_suite_interstitial_1 SUBROUTINE_GFS_suite_interstitial_1_run + + + surface_air_pressure + surface pressure + Pa + pgr + real + (:) + in + F + MODULE_GFS_suite_interstitial_1 SCHEME_GFS_suite_interstitial_1 SUBROUTINE_GFS_suite_interstitial_1_run + + + critical_relative_humidity_at_surface + critical relative humidity at the surface + frac + rhbbot + real + + out + F + MODULE_GFS_suite_interstitial_1 SCHEME_GFS_suite_interstitial_1 SUBROUTINE_GFS_suite_interstitial_1_run + + + critical_relative_humidity_at_PBL_top + critical relative humidity at the PBL top + frac + rhpbl + real + + out + F + MODULE_GFS_suite_interstitial_1 SCHEME_GFS_suite_interstitial_1 SUBROUTINE_GFS_suite_interstitial_1_run + + + critical_relative_humidity_at_top_of_atmosphere + critical relative humidity at the top of atmosphere + frac + rhbtop + real + + out + F + MODULE_GFS_suite_interstitial_1 SCHEME_GFS_suite_interstitial_1 SUBROUTINE_GFS_suite_interstitial_1_run + + + dynamics_to_physics_timestep_ratio + ratio of dynamics timestep to physics timestep + none + frain + real + + out + F + MODULE_GFS_suite_interstitial_1 SCHEME_GFS_suite_interstitial_1 SUBROUTINE_GFS_suite_interstitial_1_run + + + sea_land_ice_mask + landmask: sea/land/ice=0/1/2 + flag + islmsk + integer + (:) + out + F + MODULE_GFS_suite_interstitial_1 SCHEME_GFS_suite_interstitial_1 SUBROUTINE_GFS_suite_interstitial_1_run + + + land_area_fraction + land area fraction + frac + frland + real + (:) + out + F + MODULE_GFS_suite_interstitial_1 SCHEME_GFS_suite_interstitial_1 SUBROUTINE_GFS_suite_interstitial_1_run + + + grid_size_related_coefficient_used_in_scale-sensitive_schemes + grid size related coefficient used in scale-sensitive schemes + none + work1 + real + (:) + out + F + MODULE_GFS_suite_interstitial_1 SCHEME_GFS_suite_interstitial_1 SUBROUTINE_GFS_suite_interstitial_1_run + + + grid_size_related_coefficient_used_in_scale-sensitive_schemes_complement + complement to work1 + none + work2 + real + (:) + out + F + MODULE_GFS_suite_interstitial_1 SCHEME_GFS_suite_interstitial_1 SUBROUTINE_GFS_suite_interstitial_1_run + + + surface_air_pressure_diag + surface air pressure diagnostic + Pa + psurf + real + (:) + out + F + MODULE_GFS_suite_interstitial_1 SCHEME_GFS_suite_interstitial_1 SUBROUTINE_GFS_suite_interstitial_1_run + + + tendency_of_x_wind_due_to_model_physics + updated tendency of the x wind + m s-2 + dudt + real + (:,:) + out + F + MODULE_GFS_suite_interstitial_1 SCHEME_GFS_suite_interstitial_1 SUBROUTINE_GFS_suite_interstitial_1_run + + + tendency_of_y_wind_due_to_model_physics + updated tendency of the y wind + m s-2 + dvdt + real + (:,:) + out + F + MODULE_GFS_suite_interstitial_1 SCHEME_GFS_suite_interstitial_1 SUBROUTINE_GFS_suite_interstitial_1_run + + + tendency_of_air_temperature_due_to_model_physics + updated tendency of the temperature + K s-1 + dtdt + real + (:,:) + out + F + MODULE_GFS_suite_interstitial_1 SCHEME_GFS_suite_interstitial_1 SUBROUTINE_GFS_suite_interstitial_1_run + + + tendency_of_air_temperature_due_to_radiative_heating_assuming_clear_sky + clear sky radiative (shortwave + longwave) heating rate at current time + K s-1 + dtdtc + real + (:,:) + out + F + MODULE_GFS_suite_interstitial_1 SCHEME_GFS_suite_interstitial_1 SUBROUTINE_GFS_suite_interstitial_1_run + + + tendency_of_tracers_due_to_model_physics + updated tendency of the tracers + kg kg-1 s-1 + dqdt + real + (:,:,:) + out + F + MODULE_GFS_suite_interstitial_1 SCHEME_GFS_suite_interstitial_1 SUBROUTINE_GFS_suite_interstitial_1_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_GFS_suite_interstitial_1 SCHEME_GFS_suite_interstitial_1 SUBROUTINE_GFS_suite_interstitial_1_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_GFS_suite_interstitial_1 SCHEME_GFS_suite_interstitial_1 SUBROUTINE_GFS_suite_interstitial_1_run + + + diff --git a/physics/GFS_suite_interstitial_2.xml b/physics/GFS_suite_interstitial_2.xml new file mode 100644 index 000000000..0ca462da8 --- /dev/null +++ b/physics/GFS_suite_interstitial_2.xml @@ -0,0 +1,546 @@ + + + + + + + horizontal_loop_extent + horizontal loop extent + count + im + integer + + in + F + MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run + + + vertical_dimension + vertical layer dimension + count + levs + integer + + in + F + MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run + + + flag_diagnostics + logical flag for storing diagnostics + flag + lssav + logical + + in + F + MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run + + + flag_diagnostics_3D + flag for 3d diagnostic fields + flag + ldiag3d + logical + + in + F + MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run + + + flag_idealized_physics + flag for idealized physics + flag + lsidea + logical + + in + F + MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run + + + flag_for_flux_coupling + flag controlling cplflx collection (default off) + flag + cplflx + logical + + in + F + MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run + + + flag_for_cice + flag for cice + flag + flag_cice + logical + (:) + in + F + MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run + + + flag_for_shallow_convection + flag for calling shallow convection + flag + shal_cnv + logical + + in + F + MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run + + + flag_for_old_PBL_scheme + flag for using old PBL schemes + flag + old_monin + logical + + in + F + MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run + + + flag_for_moorthi_stratus + flag for moorthi approach for stratus + flag + mstrat + logical + + in + F + MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run + + + flag_for_shoc + flag for SHOC + flag + do_shoc + logical + + in + F + MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run + + + flag_for_mass_flux_shallow_convection_scheme + flag for mass-flux shallow convection scheme + flag + imfshalcnv + integer + + in + F + MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run + + + time_step_for_dynamics + dynamics timestep + s + dtf + real + + in + F + MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run + + + instantaneous_cosine_of_zenith_angle + cosine of zenith angle at current time + none + xcosz + real + (:) + in + F + MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run + + + surface_downwelling_shortwave_flux + surface downwelling shortwave flux at current time + W m-2 + adjsfcdsw + real + (:) + in + F + MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run + + + surface_downwelling_longwave_flux + surface downwelling longwave flux at current time + W m-2 + adjsfcdlw + real + (:) + in + F + MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run + + + surface_air_pressure + surface pressure + Pa + pgr + real + (:) + in + F + MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run + + + surface_upwelling_longwave_flux_for_cice + surface upwelling longwave flux for cice + W m-2 + ulwsfc_cice + real + (:) + in + F + MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run + + + tendency_of_air_temperature_due_to_longwave_heating_for_idea + idea sky lw heating rates + K s-1 + lwhd + real + (:,:,:) + in + F + MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run + + + tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_timestep + total sky sw heating rate + K s-1 + htrsw + real + (:,:) + in + F + MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run + + + tendency_of_air_temperature_due_to_longwave_heating_on_radiation_timestep + total sky lw heating rate + K s-1 + htrlw + real + (:,:) + in + F + MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run + + + zenith_angle_temporal_adjustment_factor_for_shortwave_fluxes + zenith angle temporal adjustment factor for shortwave fluxes + none + xmu + real + (:) + in + F + MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run + + + critical_cloud_top_entrainment_instability_criteria + critical cloud top entrainment instability criteria + none + ctei_rm + real + (:) + in + F + MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run + + + grid_size_related_coefficient_used_in_scale-sensitive_schemes + grid size related coefficient used in scale-sensitive schemes + none + work1 + real + (:) + in + F + MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run + + + grid_size_related_coefficient_used_in_scale-sensitive_schemes_complement + complement to work1 + none + work2 + real + (:) + in + F + MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run + + + air_pressure_at_interface + air pressure at model layer interfaces + Pa + prsi + real + (:,:) + in + F + MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run + + + air_temperature + model layer mean temperature + K + tgrs + real + (:,:) + in + F + MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run + + + air_pressure + mean layer pressure + Pa + prsl + real + (:,:) + in + F + MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run + + + water_vapor_specific_humidity + water vapor specific humidity + kg kg-1 + qgrs_water_vapor + real + (:,:) + in + F + MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run + + + cloud_condensed_water_mixing_ratio + moist (dry+vapor, no condensates) mixing ratio of cloud water (condensate) + kg kg-1 + qgrs_cloud_water + real + (:,:) + in + F + MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run + + + specific_heat_of_dry_air_at_constant_pressure + specific heat of dry air at constant pressure + J kg-1 K-1 + cp + real + + in + F + MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run + + + latent_heat_of_vaporization_of_water_at_0C + latent heat of evaporation/sublimation + J kg-1 + hvap + real + + in + F + MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run + + + dimensionless_exner_function_at_model_layers + dimensionless Exner function at model layer centers + none + prslk + real + (:,:) + in + F + MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run + + + duration_of_sunshine + sunshine duration time + s + suntim + real + (:) + inout + F + MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run + + + surface_upwelling_longwave_flux + surface upwelling longwave flux at current time + W m-2 + adjsfculw + real + (:) + inout + F + MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run + + + cumulative_surface_downwelling_longwave_flux_multiplied_by_timestep + cumulative surface downwelling LW flux multiplied by timestep + W m-2 s + dlwsfc + real + (:) + inout + F + MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run + + + cumulative_surface_upwelling_longwave_flux_multiplied_by_timestep + cumulative surface upwelling LW flux multiplied by timestep + W m-2 s + ulwsfc + real + (:) + inout + F + MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run + + + cumulative_surface_pressure_multiplied_by_timestep + cumulative surface pressure multiplied by timestep + Pa s + psmean + real + (:) + inout + F + MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run + + + cumulative_change_in_temperature_due_to_longwave_radiation + cumulative change in temperature due to longwave radiation + K + dt3dt_lw + real + (:,:) + inout + F + MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run + + + cumulative_change_in_temperature_due_to_shortwave_radiation_and_orographic_gravity_wave_drag + cumulative change in temperature due to SW rad and oro. GWD + K + dt3dt_sw + real + (:,:) + inout + F + MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run + + + cumulative_change_in_temperature_due_to_PBL + cumulative change in temperature due to PBL + K + dt3dt_pbl + real + (:,:) + inout + F + MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run + + + cumulative_change_in_temperature_due_to_deep_convection + cumulative change in temperature due to deep conv. + K + dt3dt_dcnv + real + (:,:) + inout + F + MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run + + + cumulative_change_in_temperature_due_to_shal_convection + cumulative change in temperature due to shal conv. + K + dt3dt_scnv + real + (:,:) + inout + F + MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run + + + cumulative_change_in_temperature_due_to_microphysics + cumulative change in temperature due to microphysics + K + dt3dt_mp + real + (:,:) + inout + F + MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run + + + grid_sensitive_critical_cloud_top_entrainment_instability_criteria + grid sensitive critical cloud top entrainment instability criteria + none + ctei_rml + real + (:) + inout + F + MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run + + + cloud_top_entrainment_instability_value + cloud top entrainment instability value + none + ctei_r + real + (:) + inout + F + MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run + + + index_of_highest_temperature_inversion + index of highest temperature inversion + index + kinver + integer + (:) + inout + F + MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run + + + diff --git a/physics/GFS_suite_interstitial_3.xml b/physics/GFS_suite_interstitial_3.xml new file mode 100644 index 000000000..0d86c6ca9 --- /dev/null +++ b/physics/GFS_suite_interstitial_3.xml @@ -0,0 +1,491 @@ + + + + + horizontal_loop_extent + horizontal loop extent + count + im + integer + + in + F + MODULE_GFS_suite_interstitial_3 SCHEME_GFS_suite_interstitial_3 SUBROUTINE_GFS_suite_interstitial_3_run + + + vertical_dimension + vertical layer dimension + count + levs + integer + + in + F + MODULE_GFS_suite_interstitial_3 SCHEME_GFS_suite_interstitial_3 SUBROUTINE_GFS_suite_interstitial_3_run + + + number_of_tracers_for_convective_transport + number of tracers for convective transport + count + nn + integer + + in + F + MODULE_GFS_suite_interstitial_3 SCHEME_GFS_suite_interstitial_3 SUBROUTINE_GFS_suite_interstitial_3_run + + + flag_for_Chikira_Sugiyama_deep_convection + flag for Chikira-Sugiyama convection + flag + cscnv + logical + + in + F + MODULE_GFS_suite_interstitial_3 SCHEME_GFS_suite_interstitial_3 SUBROUTINE_GFS_suite_interstitial_3_run + + + flag_for_scale_aware_TKE_moist_EDMF_PBL + flag for scale-aware TKE moist EDMF PBL scheme + flag + satmedmf + logical + + in + F + MODULE_GFS_suite_interstitial_3 SCHEME_GFS_suite_interstitial_3 SUBROUTINE_GFS_suite_interstitial_3_run + + + flag_for_convective_transport_of_tracers + flag for convective transport of tracers + flag + trans_trac + logical + + in + F + MODULE_GFS_suite_interstitial_3 SCHEME_GFS_suite_interstitial_3 SUBROUTINE_GFS_suite_interstitial_3_run + + + flag_for_shoc + flag for SHOC + flag + do_shoc + logical + + in + F + MODULE_GFS_suite_interstitial_3 SCHEME_GFS_suite_interstitial_3 SUBROUTINE_GFS_suite_interstitial_3_run + + + flag_for_aerosol_physics + flag for aerosol physics + flag + ltaerosol + logical + + in + F + MODULE_GFS_suite_interstitial_3 SCHEME_GFS_suite_interstitial_3 SUBROUTINE_GFS_suite_interstitial_3_run + + + number_of_tracers + number of tracers + count + ntrac + integer + + in + F + MODULE_GFS_suite_interstitial_3 SCHEME_GFS_suite_interstitial_3 SUBROUTINE_GFS_suite_interstitial_3_run + + + index_for_liquid_cloud_condensate + tracer index for cloud condensate (or liquid water) + index + ntcw + integer + + in + F + MODULE_GFS_suite_interstitial_3 SCHEME_GFS_suite_interstitial_3 SUBROUTINE_GFS_suite_interstitial_3_run + + + index_for_ice_cloud_condensate + tracer index for ice water + index + ntiw + integer + + in + F + MODULE_GFS_suite_interstitial_3 SCHEME_GFS_suite_interstitial_3 SUBROUTINE_GFS_suite_interstitial_3_run + + + index_for_cloud_amount + tracer index for cloud amount integer + index + ntclamt + integer + + in + F + MODULE_GFS_suite_interstitial_3 SCHEME_GFS_suite_interstitial_3 SUBROUTINE_GFS_suite_interstitial_3_run + + + index_for_rain_water + tracer index for rain water + index + ntrw + integer + + in + F + MODULE_GFS_suite_interstitial_3 SCHEME_GFS_suite_interstitial_3 SUBROUTINE_GFS_suite_interstitial_3_run + + + index_for_snow_water + tracer index for snow water + index + ntsw + integer + + in + F + MODULE_GFS_suite_interstitial_3 SCHEME_GFS_suite_interstitial_3 SUBROUTINE_GFS_suite_interstitial_3_run + + + index_for_rain_number_concentration + tracer index for rain number concentration + index + ntrnc + integer + + in + F + MODULE_GFS_suite_interstitial_3 SCHEME_GFS_suite_interstitial_3 SUBROUTINE_GFS_suite_interstitial_3_run + + + index_for_snow_number_concentration + tracer index for snow number concentration + index + ntsnc + integer + + in + F + MODULE_GFS_suite_interstitial_3 SCHEME_GFS_suite_interstitial_3 SUBROUTINE_GFS_suite_interstitial_3_run + + + index_for_graupel + tracer index for graupel + index + ntgl + integer + + in + F + MODULE_GFS_suite_interstitial_3 SCHEME_GFS_suite_interstitial_3 SUBROUTINE_GFS_suite_interstitial_3_run + + + index_for_graupel_number_concentration + tracer index for graupel number concentration + index + ntgnc + integer + + in + F + MODULE_GFS_suite_interstitial_3 SCHEME_GFS_suite_interstitial_3 SUBROUTINE_GFS_suite_interstitial_3_run + + + latitude + latitude + radians + xlat + real + (:) + in + F + MODULE_GFS_suite_interstitial_3 SCHEME_GFS_suite_interstitial_3 SUBROUTINE_GFS_suite_interstitial_3_run + + + tracer_concentration_updated_by_physics + tracer concentration updated by physics + kg kg-1 + gq0 + real + (:,:,:) + in + F + MODULE_GFS_suite_interstitial_3 SCHEME_GFS_suite_interstitial_3 SUBROUTINE_GFS_suite_interstitial_3_run + + + flag_for_microphysics_scheme + choice of microphysics scheme + flag + imp_physics + integer + + in + F + MODULE_GFS_suite_interstitial_3 SCHEME_GFS_suite_interstitial_3 SUBROUTINE_GFS_suite_interstitial_3_run + + + flag_for_morrison_gettelman_microphysics_scheme + choice of Morrison-Gettelman rmicrophysics scheme + flag + imp_physics_mg + integer + + in + F + MODULE_GFS_suite_interstitial_3 SCHEME_GFS_suite_interstitial_3 SUBROUTINE_GFS_suite_interstitial_3_run + + + flag_for_zhao_carr_microphysics_scheme + choice of Zhao-Carr microphysics scheme + flag + imp_physics_zhao_carr + integer + + in + F + MODULE_GFS_suite_interstitial_3 SCHEME_GFS_suite_interstitial_3 SUBROUTINE_GFS_suite_interstitial_3_run + + + flag_for_zhao_carr_pdf_microphysics_scheme + choice of Zhao-Carr microphysics scheme with PDF clouds + flag + imp_physics_zhao_carr_pdf + integer + + in + F + MODULE_GFS_suite_interstitial_3 SCHEME_GFS_suite_interstitial_3 SUBROUTINE_GFS_suite_interstitial_3_run + + + flag_for_gfdl_microphysics_scheme + choice of GFDL microphysics scheme + flag + imp_physics_gfdl + integer + + in + F + MODULE_GFS_suite_interstitial_3 SCHEME_GFS_suite_interstitial_3 SUBROUTINE_GFS_suite_interstitial_3_run + + + flag_for_thompson_microphysics_scheme + choice of Thompson microphysics scheme + flag + imp_physics_thompson + integer + + in + F + MODULE_GFS_suite_interstitial_3 SCHEME_GFS_suite_interstitial_3 SUBROUTINE_GFS_suite_interstitial_3_run + + + flag_for_wsm6_microphysics_scheme + choice of WSM6 microphysics scheme + flag + imp_physics_wsm6 + integer + + in + F + MODULE_GFS_suite_interstitial_3 SCHEME_GFS_suite_interstitial_3 SUBROUTINE_GFS_suite_interstitial_3_run + + + air_pressure_at_interface + air pressure at model layer interfaces + Pa + prsi + real + (:,:) + in + F + MODULE_GFS_suite_interstitial_3 SCHEME_GFS_suite_interstitial_3 SUBROUTINE_GFS_suite_interstitial_3_run + + + air_pressure + mean layer pressure + Pa + prsl + real + (:,:) + in + F + MODULE_GFS_suite_interstitial_3 SCHEME_GFS_suite_interstitial_3 SUBROUTINE_GFS_suite_interstitial_3_run + + + dimensionless_exner_function_at_model_layers + dimensionless Exner function at model layer centers + none + prslk + real + (:,:) + in + F + MODULE_GFS_suite_interstitial_3 SCHEME_GFS_suite_interstitial_3 SUBROUTINE_GFS_suite_interstitial_3_run + + + critical_relative_humidity_at_surface + critical relative humidity at the surface + frac + rhcbot + real + + in + F + MODULE_GFS_suite_interstitial_3 SCHEME_GFS_suite_interstitial_3 SUBROUTINE_GFS_suite_interstitial_3_run + + + critical_relative_humidity_at_PBL_top + critical relative humidity at the PBL top + frac + rhcpbl + real + + in + F + MODULE_GFS_suite_interstitial_3 SCHEME_GFS_suite_interstitial_3 SUBROUTINE_GFS_suite_interstitial_3_run + + + critical_relative_humidity_at_top_of_atmosphere + critical relative humidity at the top of atmosphere + frac + rhctop + real + + in + F + MODULE_GFS_suite_interstitial_3 SCHEME_GFS_suite_interstitial_3 SUBROUTINE_GFS_suite_interstitial_3_run + + + maximum_critical_relative_humidity + maximum critical relative humidity + frac + rhcmax + real + + in + F + MODULE_GFS_suite_interstitial_3 SCHEME_GFS_suite_interstitial_3 SUBROUTINE_GFS_suite_interstitial_3_run + + + sea_land_ice_mask + sea/land/ice mask (=0/1/2) + flag + islmsk + integer + (:) + in + F + MODULE_GFS_suite_interstitial_3 SCHEME_GFS_suite_interstitial_3 SUBROUTINE_GFS_suite_interstitial_3_run + + + grid_size_related_coefficient_used_in_scale-sensitive_schemes + grid size related coefficient used in scale-sensitive schemes + none + work1 + real + (:) + in + F + MODULE_GFS_suite_interstitial_3 SCHEME_GFS_suite_interstitial_3 SUBROUTINE_GFS_suite_interstitial_3_run + + + grid_size_related_coefficient_used_in_scale-sensitive_schemes_complement + complement to work1 + none + work2 + real + (:) + in + F + MODULE_GFS_suite_interstitial_3 SCHEME_GFS_suite_interstitial_3 SUBROUTINE_GFS_suite_interstitial_3_run + + + vertical_index_at_top_of_atmosphere_boundary_layer + vertical index at top atmospheric boundary layer + index + kpbl + integer + (:) + in + F + MODULE_GFS_suite_interstitial_3 SCHEME_GFS_suite_interstitial_3 SUBROUTINE_GFS_suite_interstitial_3_run + + + convective_transportable_tracers + array to contain cloud water and other convective trans. tracers + kg kg-1 + clw + real + (:,:,:) + inout + F + MODULE_GFS_suite_interstitial_3 SCHEME_GFS_suite_interstitial_3 SUBROUTINE_GFS_suite_interstitial_3_run + + + critical_relative_humidity + critical relative humidity + frac + rhc + real + (:,:) + inout + F + MODULE_GFS_suite_interstitial_3 SCHEME_GFS_suite_interstitial_3 SUBROUTINE_GFS_suite_interstitial_3_run + + + cloud_condensed_water_mixing_ratio_save + moist (dry+vapor, no condensates) mixing ratio of cloud water (condensate) before entering a physics scheme + kg kg-1 + save_qc + real + (:,:) + inout + F + MODULE_GFS_suite_interstitial_3 SCHEME_GFS_suite_interstitial_3 SUBROUTINE_GFS_suite_interstitial_3_run + + + ice_water_mixing_ratio_save + cloud ice water mixing ratio before entering a physics scheme + kg kg-1 + save_qi + real + (:,:) + inout + F + MODULE_GFS_suite_interstitial_3 SCHEME_GFS_suite_interstitial_3 SUBROUTINE_GFS_suite_interstitial_3_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_GFS_suite_interstitial_3 SCHEME_GFS_suite_interstitial_3 SUBROUTINE_GFS_suite_interstitial_3_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_GFS_suite_interstitial_3 SCHEME_GFS_suite_interstitial_3 SUBROUTINE_GFS_suite_interstitial_3_run + + + + + diff --git a/physics/GFS_suite_interstitial_4.xml b/physics/GFS_suite_interstitial_4.xml new file mode 100644 index 000000000..55f20f091 --- /dev/null +++ b/physics/GFS_suite_interstitial_4.xml @@ -0,0 +1,359 @@ + + + + + + horizontal_loop_extent + horizontal loop extent + count + im + integer + + in + F + MODULE_GFS_suite_interstitial_4 SCHEME_GFS_suite_interstitial_4 SUBROUTINE_GFS_suite_interstitial_4_run + + + vertical_dimension + vertical layer dimension + count + levs + integer + + in + F + MODULE_GFS_suite_interstitial_4 SCHEME_GFS_suite_interstitial_4 SUBROUTINE_GFS_suite_interstitial_4_run + + + flag_for_aerosol_physics + flag for aerosol physics + flag + ltaerosol + logical + + in + F + MODULE_GFS_suite_interstitial_4 SCHEME_GFS_suite_interstitial_4 SUBROUTINE_GFS_suite_interstitial_4_run + + + flag_gocart + flag for 3d diagnostic fields for gocart 1 + flag + lgocart + logical + + in + F + MODULE_GFS_suite_interstitial_4 SCHEME_GFS_suite_interstitial_4 SUBROUTINE_GFS_suite_interstitial_4_run + + + number_of_total_tracers + total number of tracers + count + tracers_total + integer + + in + F + MODULE_GFS_suite_interstitial_4 SCHEME_GFS_suite_interstitial_4 SUBROUTINE_GFS_suite_interstitial_4_run + + + number_of_tracers + number of tracers + count + ntrac + integer + + in + F + MODULE_GFS_suite_interstitial_4 SCHEME_GFS_suite_interstitial_4 SUBROUTINE_GFS_suite_interstitial_4_run + + + index_for_liquid_cloud_condensate + tracer index for cloud condensate (or liquid water) + index + ntcw + integer + + in + F + MODULE_GFS_suite_interstitial_4 SCHEME_GFS_suite_interstitial_4 SUBROUTINE_GFS_suite_interstitial_4_run + + + index_for_ice_cloud_condensate + tracer index for ice water + index + ntiw + integer + + in + F + MODULE_GFS_suite_interstitial_4 SCHEME_GFS_suite_interstitial_4 SUBROUTINE_GFS_suite_interstitial_4_run + + + index_for_cloud_amount + tracer index for cloud amount integer + index + ntclamt + integer + + in + F + MODULE_GFS_suite_interstitial_4 SCHEME_GFS_suite_interstitial_4 SUBROUTINE_GFS_suite_interstitial_4_run + + + index_for_rain_water + tracer index for rain water + index + ntrw + integer + + in + F + MODULE_GFS_suite_interstitial_4 SCHEME_GFS_suite_interstitial_4 SUBROUTINE_GFS_suite_interstitial_4_run + + + index_for_snow_water + tracer index for snow water + index + ntsw + integer + + in + F + MODULE_GFS_suite_interstitial_4 SCHEME_GFS_suite_interstitial_4 SUBROUTINE_GFS_suite_interstitial_4_run + + + index_for_rain_number_concentration + tracer index for rain number concentration + index + ntrnc + integer + + in + F + MODULE_GFS_suite_interstitial_4 SCHEME_GFS_suite_interstitial_4 SUBROUTINE_GFS_suite_interstitial_4_run + + + index_for_snow_number_concentration + tracer index for snow number concentration + index + ntsnc + integer + + in + F + MODULE_GFS_suite_interstitial_4 SCHEME_GFS_suite_interstitial_4 SUBROUTINE_GFS_suite_interstitial_4_run + + + index_for_graupel + tracer index for graupel + index + ntgl + integer + + in + F + MODULE_GFS_suite_interstitial_4 SCHEME_GFS_suite_interstitial_4 SUBROUTINE_GFS_suite_interstitial_4_run + + + index_for_graupel_number_concentration + tracer index for graupel number concentration + index + ntgnc + integer + + in + F + MODULE_GFS_suite_interstitial_4 SCHEME_GFS_suite_interstitial_4 SUBROUTINE_GFS_suite_interstitial_4_run + + + index_for_liquid_cloud_number_concentration + tracer index for liquid number concentration + index + ntlnc + integer + + in + F + MODULE_GFS_suite_interstitial_4 SCHEME_GFS_suite_interstitial_4 SUBROUTINE_GFS_suite_interstitial_4_run + + + index_for_ice_cloud_number_concentration + tracer index for ice number concentration + index + ntinc + integer + + in + F + MODULE_GFS_suite_interstitial_4 SCHEME_GFS_suite_interstitial_4 SUBROUTINE_GFS_suite_interstitial_4_run + + + number_of_tracers_for_convective_transport + number of tracers for convective transport + count + nn + integer + + in + F + MODULE_GFS_suite_interstitial_4 SCHEME_GFS_suite_interstitial_4 SUBROUTINE_GFS_suite_interstitial_4_run + + + flag_for_microphysics_scheme + choice of microphysics scheme + flag + imp_physics + integer + + in + F + MODULE_GFS_suite_interstitial_4 SCHEME_GFS_suite_interstitial_4 SUBROUTINE_GFS_suite_interstitial_4_run + + + flag_for_gfdl_microphysics_scheme + choice of GFDL microphysics scheme + flag + imp_physics_gfdl + integer + + in + F + MODULE_GFS_suite_interstitial_4 SCHEME_GFS_suite_interstitial_4 SUBROUTINE_GFS_suite_interstitial_4_run + + + flag_for_thompson_microphysics_scheme + choice of Thompson microphysics scheme + flag + imp_physics_thompson + integer + + in + F + MODULE_GFS_suite_interstitial_4 SCHEME_GFS_suite_interstitial_4 SUBROUTINE_GFS_suite_interstitial_4_run + + + flag_for_zhao_carr_microphysics_scheme + choice of Zhao-Carr microphysics scheme + flag + imp_physics_zhao_carr + integer + + in + F + MODULE_GFS_suite_interstitial_4 SCHEME_GFS_suite_interstitial_4 SUBROUTINE_GFS_suite_interstitial_4_run + + + flag_for_zhao_carr_pdf_microphysics_scheme + choice of Zhao-Carr microphysics scheme with PDF clouds + flag + imp_physics_zhao_carr_pdf + integer + + in + F + MODULE_GFS_suite_interstitial_4 SCHEME_GFS_suite_interstitial_4 SUBROUTINE_GFS_suite_interstitial_4_run + + + time_step_for_dynamics + dynamics timestep + s + dtf + real + + in + F + MODULE_GFS_suite_interstitial_4 SCHEME_GFS_suite_interstitial_4 SUBROUTINE_GFS_suite_interstitial_4_run + + + cloud_condensed_water_mixing_ratio_save + moist (dry+vapor, no condensates) mixing ratio of cloud water (condensate) before entering a physics scheme + kg kg-1 + save_qc + real + (:,:) + in + F + MODULE_GFS_suite_interstitial_4 SCHEME_GFS_suite_interstitial_4 SUBROUTINE_GFS_suite_interstitial_4_run + + + ice_water_mixing_ratio_save + cloud ice water mixing ratio before entering a physics scheme + kg kg-1 + save_qi + real + (:,:) + in + F + MODULE_GFS_suite_interstitial_4 SCHEME_GFS_suite_interstitial_4 SUBROUTINE_GFS_suite_interstitial_4_run + + + pi + ratio of a circle's circumference to its diameter + radians + con_pi + real + + in + F + MODULE_GFS_suite_interstitial_4 SCHEME_GFS_suite_interstitial_4 SUBROUTINE_GFS_suite_interstitial_4_run + + + tracer_concentration_updated_by_physics + tracer concentration updated by physics + kg kg-1 + gq0 + real + (:,:,:) + inout + F + MODULE_GFS_suite_interstitial_4 SCHEME_GFS_suite_interstitial_4 SUBROUTINE_GFS_suite_interstitial_4_run + + + convective_transportable_tracers + array to contain cloud water and other convective trans. tracers + kg kg-1 + clw + real + (:,:,:) + inout + F + MODULE_GFS_suite_interstitial_4 SCHEME_GFS_suite_interstitial_4 SUBROUTINE_GFS_suite_interstitial_4_run + + + instantaneous_water_vapor_specific_humidity_tendency_due_to_convection + instantaneous moisture tendency due to convection + kg kg-1 s-1 + dqdti + real + (:,:) + inout + F + MODULE_GFS_suite_interstitial_4 SCHEME_GFS_suite_interstitial_4 SUBROUTINE_GFS_suite_interstitial_4_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_GFS_suite_interstitial_4 SCHEME_GFS_suite_interstitial_4 SUBROUTINE_GFS_suite_interstitial_4_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_GFS_suite_interstitial_4 SCHEME_GFS_suite_interstitial_4 SUBROUTINE_GFS_suite_interstitial_4_run + + + + diff --git a/physics/GFS_suite_interstitial_phys_reset.xml b/physics/GFS_suite_interstitial_phys_reset.xml new file mode 100644 index 000000000..d4b859976 --- /dev/null +++ b/physics/GFS_suite_interstitial_phys_reset.xml @@ -0,0 +1,51 @@ + + + + + + GFS_interstitial_type_instance + derived type GFS_interstitial_type in FV3 + DDT + Interstitial + GFS_interstitial_type + + inout + F + MODULE_GFS_suite_interstitial_phys_reset SCHEME_GFS_suite_interstitial_phys_reset SUBROUTINE_GFS_suite_interstitial_phys_reset_run + + + GFS_control_type_instance + Fortran DDT containing FV3-GFS model control parameters + DDT + Model + GFS_control_type + + in + F + MODULE_GFS_suite_interstitial_phys_reset SCHEME_GFS_suite_interstitial_phys_reset SUBROUTINE_GFS_suite_interstitial_phys_reset_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_GFS_suite_interstitial_phys_reset SCHEME_GFS_suite_interstitial_phys_reset SUBROUTINE_GFS_suite_interstitial_phys_reset_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_GFS_suite_interstitial_phys_reset SCHEME_GFS_suite_interstitial_phys_reset SUBROUTINE_GFS_suite_interstitial_phys_reset_run + + + + diff --git a/physics/GFS_suite_interstitial_rad_reset.xml b/physics/GFS_suite_interstitial_rad_reset.xml new file mode 100644 index 000000000..d4c661151 --- /dev/null +++ b/physics/GFS_suite_interstitial_rad_reset.xml @@ -0,0 +1,40 @@ + + + + + + GFS_interstitial_type_instance + derived type GFS_interstitial_type in FV3 + DDT + Interstitial + GFS_interstitial_type + + inout + F + MODULE_GFS_suite_interstitial_rad_reset SCHEME_GFS_suite_interstitial_rad_reset SUBROUTINE_GFS_suite_interstitial_rad_reset_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_GFS_suite_interstitial_rad_reset SCHEME_GFS_suite_interstitial_rad_reset SUBROUTINE_GFS_suite_interstitial_rad_reset_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_GFS_suite_interstitial_rad_reset SCHEME_GFS_suite_interstitial_rad_reset SUBROUTINE_GFS_suite_interstitial_rad_reset_run + + + + diff --git a/physics/GFS_suite_stateout_reset.xml b/physics/GFS_suite_stateout_reset.xml new file mode 100644 index 000000000..000c35641 --- /dev/null +++ b/physics/GFS_suite_stateout_reset.xml @@ -0,0 +1,150 @@ + + + + + + + horizontal_loop_extent + horizontal loop extent + count + im + integer + + in + F + MODULE_GFS_suite_stateout_reset SCHEME_GFS_suite_stateout_reset SUBROUTINE_GFS_suite_stateout_reset_run + + + vertical_dimension + vertical layer dimension + count + levs + integer + + in + F + MODULE_GFS_suite_stateout_reset SCHEME_GFS_suite_stateout_reset SUBROUTINE_GFS_suite_stateout_reset_run + + + number_of_tracers + number of tracers + count + ntrac + integer + + in + F + MODULE_GFS_suite_stateout_reset SCHEME_GFS_suite_stateout_reset SUBROUTINE_GFS_suite_stateout_reset_run + + + air_temperature + model layer mean temperature + K + tgrs + real + (:,:) + in + F + MODULE_GFS_suite_stateout_reset SCHEME_GFS_suite_stateout_reset SUBROUTINE_GFS_suite_stateout_reset_run + + + x_wind + zonal wind + m s-1 + ugrs + real + (:,:) + in + F + MODULE_GFS_suite_stateout_reset SCHEME_GFS_suite_stateout_reset SUBROUTINE_GFS_suite_stateout_reset_run + + + y_wind + meridional wind + m s-1 + vgrs + real + (:,:) + in + F + MODULE_GFS_suite_stateout_reset SCHEME_GFS_suite_stateout_reset SUBROUTINE_GFS_suite_stateout_reset_run + + + tracer_concentration + model layer mean tracer concentration + kg kg-1 + qgrs + real + (:,:,:) + in + F + MODULE_GFS_suite_stateout_reset SCHEME_GFS_suite_stateout_reset SUBROUTINE_GFS_suite_stateout_reset_run + + + air_temperature_updated_by_physics + temperature updated by physics + K + gt0 + real + (:,:) + out + F + MODULE_GFS_suite_stateout_reset SCHEME_GFS_suite_stateout_reset SUBROUTINE_GFS_suite_stateout_reset_run + + + x_wind_updated_by_physics + zonal wind updated by physics + m s-1 + gu0 + real + (:,:) + out + F + MODULE_GFS_suite_stateout_reset SCHEME_GFS_suite_stateout_reset SUBROUTINE_GFS_suite_stateout_reset_run + + + y_wind_updated_by_physics + meridional wind updated by physics + m s-1 + gv0 + real + (:,:) + out + F + MODULE_GFS_suite_stateout_reset SCHEME_GFS_suite_stateout_reset SUBROUTINE_GFS_suite_stateout_reset_run + + + tracer_concentration_updated_by_physics + tracer concentration updated by physics + kg kg-1 + gq0 + real + (:,:,:) + out + F + MODULE_GFS_suite_stateout_reset SCHEME_GFS_suite_stateout_reset SUBROUTINE_GFS_suite_stateout_reset_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_GFS_suite_stateout_reset SCHEME_GFS_suite_stateout_reset SUBROUTINE_GFS_suite_stateout_reset_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_GFS_suite_stateout_reset SCHEME_GFS_suite_stateout_reset SUBROUTINE_GFS_suite_stateout_reset_run + + + diff --git a/physics/GFS_suite_stateout_update.xml b/physics/GFS_suite_stateout_update.xml new file mode 100644 index 000000000..2c049e822 --- /dev/null +++ b/physics/GFS_suite_stateout_update.xml @@ -0,0 +1,205 @@ + + + + + + horizontal_loop_extent + horizontal loop extent + count + im + integer + + in + F + MODULE_GFS_suite_stateout_update SCHEME_GFS_suite_stateout_update SUBROUTINE_GFS_suite_stateout_update_run + + + vertical_dimension + vertical layer dimension + count + levs + integer + + in + F + MODULE_GFS_suite_stateout_update SCHEME_GFS_suite_stateout_update SUBROUTINE_GFS_suite_stateout_update_run + + + number_of_tracers + number of tracers + count + ntrac + integer + + in + F + MODULE_GFS_suite_stateout_update SCHEME_GFS_suite_stateout_update SUBROUTINE_GFS_suite_stateout_update_run + + + time_step_for_physics + physics timestep + s + dtp + real + + in + F + MODULE_GFS_suite_stateout_update SCHEME_GFS_suite_stateout_update SUBROUTINE_GFS_suite_stateout_update_run + + + air_temperature + model layer mean temperature + K + tgrs + real + (:,:) + in + F + MODULE_GFS_suite_stateout_update SCHEME_GFS_suite_stateout_update SUBROUTINE_GFS_suite_stateout_update_run + + + x_wind + zonal wind + m s-1 + ugrs + real + (:,:) + in + F + MODULE_GFS_suite_stateout_update SCHEME_GFS_suite_stateout_update SUBROUTINE_GFS_suite_stateout_update_run + + + y_wind + meridional wind + m s-1 + vgrs + real + (:,:) + in + F + MODULE_GFS_suite_stateout_update SCHEME_GFS_suite_stateout_update SUBROUTINE_GFS_suite_stateout_update_run + + + tracer_concentration + model layer mean tracer concentration + kg kg-1 + qgrs + real + (:,:,:) + in + F + MODULE_GFS_suite_stateout_update SCHEME_GFS_suite_stateout_update SUBROUTINE_GFS_suite_stateout_update_run + + + tendency_of_x_wind_due_to_model_physics + updated tendency of the x wind + m s-2 + dudt + real + (:,:) + in + F + MODULE_GFS_suite_stateout_update SCHEME_GFS_suite_stateout_update SUBROUTINE_GFS_suite_stateout_update_run + + + tendency_of_y_wind_due_to_model_physics + updated tendency of the y wind + m s-2 + dvdt + real + (:,:) + in + F + MODULE_GFS_suite_stateout_update SCHEME_GFS_suite_stateout_update SUBROUTINE_GFS_suite_stateout_update_run + + + tendency_of_air_temperature_due_to_model_physics + updated tendency of the temperature + K s-1 + dtdt + real + (:,:) + in + F + MODULE_GFS_suite_stateout_update SCHEME_GFS_suite_stateout_update SUBROUTINE_GFS_suite_stateout_update_run + + + tendency_of_tracers_due_to_model_physics + updated tendency of the tracers + kg kg-1 s-1 + dqdt + real + (:,:,:) + in + F + MODULE_GFS_suite_stateout_update SCHEME_GFS_suite_stateout_update SUBROUTINE_GFS_suite_stateout_update_run + + + air_temperature_updated_by_physics + temperature updated by physics + K + gt0 + real + (:,:) + out + F + MODULE_GFS_suite_stateout_update SCHEME_GFS_suite_stateout_update SUBROUTINE_GFS_suite_stateout_update_run + + + x_wind_updated_by_physics + zonal wind updated by physics + m s-1 + gu0 + real + (:,:) + out + F + MODULE_GFS_suite_stateout_update SCHEME_GFS_suite_stateout_update SUBROUTINE_GFS_suite_stateout_update_run + + + y_wind_updated_by_physics + meridional wind updated by physics + m s-1 + gv0 + real + (:,:) + out + F + MODULE_GFS_suite_stateout_update SCHEME_GFS_suite_stateout_update SUBROUTINE_GFS_suite_stateout_update_run + + + tracer_concentration_updated_by_physics + tracer concentration updated by physics + kg kg-1 + gq0 + real + (:,:,:) + out + F + MODULE_GFS_suite_stateout_update SCHEME_GFS_suite_stateout_update SUBROUTINE_GFS_suite_stateout_update_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_GFS_suite_stateout_update SCHEME_GFS_suite_stateout_update SUBROUTINE_GFS_suite_stateout_update_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_GFS_suite_stateout_update SCHEME_GFS_suite_stateout_update SUBROUTINE_GFS_suite_stateout_update_run + + + + diff --git a/physics/GFS_surface_generic_post.xml b/physics/GFS_surface_generic_post.xml new file mode 100644 index 000000000..e71131bcb --- /dev/null +++ b/physics/GFS_surface_generic_post.xml @@ -0,0 +1,942 @@ + + + + + horizontal_loop_extent + horizontal loop extent + count + im + integer + + in + F + MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run + + + flag_for_flux_coupling + flag controlling cplflx collection (default off) + flag + cplflx + logical + + in + F + MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run + + + flag_diagnostics + logical flag for storing diagnostics + flag + lssav + logical + + in + F + MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run + + + sea_land_ice_mask + landmask: sea/land/ice=0/1/2 + flag + islmsk + integer + (:) + in + F + MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run + + + time_step_for_dynamics + dynamics timestep + s + dtf + real + + in + F + MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run + + + surface_upward_potential_latent_heat_flux + surface upward potential latent heat flux + W m-2 + ep1d + real + (:) + in + F + MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run + + + upward_heat_flux_in_soil + upward soil heat flux + W m-2 + gflx + real + (:) + in + F + MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run + + + air_temperature_at_lowest_model_layer + mean temperature at lowest model layer + K + tgrs_1 + real + (:) + in + F + MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run + + + water_vapor_specific_humidity_at_lowest_model_layer + specific humidity at lowest model layer + kg kg-1 + qgrs_1 + real + (:) + in + F + MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run + + + x_wind_at_lowest_model_layer + zonal wind at lowest model layer + m s-1 + ugrs_1 + real + (:) + in + F + MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run + + + y_wind_at_lowest_model_layer + meridional wind at lowest model layer + m s-1 + vgrs_1 + real + (:) + in + F + MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run + + + surface_downwelling_longwave_flux + surface downwelling longwave flux at current time + W m-2 + adjsfcdlw + real + (:) + in + F + MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run + + + surface_downwelling_shortwave_flux + surface downwelling shortwave flux at current time + W m-2 + adjsfcdsw + real + (:) + in + F + MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run + + + surface_downwelling_direct_near_infrared_shortwave_flux + surface downwelling beam near-infrared shortwave flux at current time + W m-2 + adjnirbmd + real + (:) + in + F + MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run + + + surface_downwelling_diffuse_near_infrared_shortwave_flux + surface downwelling diffuse near-infrared shortwave flux at current time + W m-2 + adjnirdfd + real + (:) + in + F + MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run + + + surface_downwelling_direct_ultraviolet_and_visible_shortwave_flux + surface downwelling beam ultraviolet plus visible shortwave flux at current time + W m-2 + adjvisbmd + real + (:) + in + F + MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run + + + surface_downwelling_diffuse_ultraviolet_and_visible_shortwave_flux + surface downwelling diffuse ultraviolet plus visible shortwave flux at current time + W m-2 + adjvisdfd + real + (:) + in + F + MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run + + + surface_upwelling_longwave_flux + surface upwelling longwave flux at current time + W m-2 + adjsfculw + real + (:) + in + F + MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run + + + surface_upwelling_direct_near_infrared_shortwave_flux + surface upwelling beam near-infrared shortwave flux at current time + W m-2 + adjnirbmu + real + (:) + in + F + MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run + + + surface_upwelling_diffuse_near_infrared_shortwave_flux + surface upwelling diffuse near-infrared shortwave flux at current time + W m-2 + adjnirdfu + real + (:) + in + F + MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run + + + surface_upwelling_direct_ultraviolet_and_visible_shortwave_flux + surface upwelling beam ultraviolet plus visible shortwave flux at current time + W m-2 + adjvisbmu + real + (:) + in + F + MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run + + + surface_upwelling_diffuse_ultraviolet_and_visible_shortwave_flux + surface upwelling diffuse ultraviolet plus visible shortwave flux at current time + W m-2 + adjvisdfu + real + (:) + in + F + MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run + + + temperature_at_2m + 2 meter temperature + K + t2m + real + (:) + in + F + MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run + + + specific_humidity_at_2m + 2 meter specific humidity + kg kg-1 + q2m + real + (:) + in + F + MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run + + + x_wind_at_10m + 10 meter u wind speed + m s-1 + u10m + real + (:) + in + F + MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run + + + y_wind_at_10m + 10 meter v wind speed + m s-1 + v10m + real + (:) + in + F + MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run + + + surface_skin_temperature + surface skin temperature + K + tsfc + real + (:) + in + F + MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run + + + surface_air_pressure + surface pressure + Pa + pgr + real + (:) + in + F + MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run + + + instantaneous_cosine_of_zenith_angle + cosine of zenith angle at current time + none + xcosz + real + (:) + in + F + MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run + + + soil_upward_latent_heat_flux + soil upward latent heat flux + W m-2 + evbs + real + (:) + in + F + MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run + + + canopy_upward_latent_heat_flux + canopy upward latent heat flux + W m-2 + evcw + real + (:) + in + F + MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run + + + transpiration_flux + total plant transpiration rate + kg m-2 s-1 + trans + real + (:) + in + F + MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run + + + snow_deposition_sublimation_upward_latent_heat_flux + latent heat flux from snow depo/subl + W m-2 + sbsno + real + (:) + in + F + MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run + + + surface_snow_area_fraction + surface snow area fraction + frac + snowc + real + (:) + in + F + MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run + + + snow_freezing_rain_upward_latent_heat_flux + latent heat flux due to snow and frz rain + W m-2 + snohf + real + (:) + in + F + MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run + + + instantaneous_surface_potential_evaporation + instantaneous sfc potential evaporation + W m-2 + epi + real + (:) + inout + F + MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run + + + instantaneous_surface_ground_heat_flux + instantaneous sfc ground heat flux + W m-2 + gfluxi + real + (:) + inout + F + MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run + + + air_temperature_at_lowest_model_layer_for_diag + layer 1 temperature for diag + K + t1 + real + (:) + inout + F + MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run + + + water_vapor_specific_humidity_at_lowest_model_layer_for_diag + layer 1 specific humidity for diag + kg kg-1 + q1 + real + (:) + inout + F + MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run + + + x_wind_at_lowest_model_layer_for_diag + layer 1 x wind for diag + m s-1 + u1 + real + (:) + inout + F + MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run + + + y_wind_at_lowest_model_layer_for_diag + layer 1 y wind for diag + m s-1 + v1 + real + (:) + inout + F + MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run + + + instantaneous_surface_downwelling_longwave_flux_for_coupling + instantaneous sfc downward lw flux + W m-2 + dlwsfci_cpl + real + (:) + inout + F + MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run + + + instantaneous_surface_downwelling_shortwave_flux_for_coupling + instantaneous sfc downward sw flux + W m-2 + dswsfci_cpl + real + (:) + inout + F + MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run + + + cumulative_surface_downwelling_longwave_flux_for_coupling_multiplied_by_timestep + cumulative sfc downward lw flux mulitplied by timestep + W m-2 s + dlwsfc_cpl + real + (:) + inout + F + MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run + + + cumulative_surface_downwelling_shortwave_flux_for_coupling_multiplied_by_timestep + cumulative sfc downward sw flux multiplied by timestep + W m-2 s + dswsfc_cpl + real + (:) + inout + F + MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run + + + instantaneous_surface_downwelling_direct_near_infrared_shortwave_flux_for_coupling + instantaneous sfc nir beam downward sw flux + W m-2 + dnirbmi_cpl + real + (:) + inout + F + MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run + + + instantaneous_surface_downwelling_diffuse_near_infrared_shortwave_flux_for_coupling + instantaneous sfc nir diff downward sw flux + W m-2 + dnirdfi_cpl + real + (:) + inout + F + MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run + + + instantaneous_surface_downwelling_direct_ultraviolet_and_visible_shortwave_flux_for_coupling + instantaneous sfc uv+vis beam downward sw flux + W m-2 + dvisbmi_cpl + real + (:) + inout + F + MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run + + + instantaneous_surface_downwelling_diffuse_ultraviolet_and_visible_shortwave_flux_for_coupling + instantaneous sfc uv+vis diff downward sw flux + W m-2 + dvisdfi_cpl + real + (:) + inout + F + MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run + + + cumulative_surface_downwelling_direct_near_infrared_shortwave_flux_for_coupling_multiplied_by_timestep + cumulative sfc nir beam downward sw flux multiplied by timestep + W m-2 s + dnirbm_cpl + real + (:) + inout + F + MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run + + + cumulative_surface_downwelling_diffuse_near_infrared_shortwave_flux_for_coupling_multiplied_by_timestep + cumulative sfc nir diff downward sw flux multiplied by timestep + W m-2 s + dnirdf_cpl + real + (:) + inout + F + MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run + + + cumulative_surface_downwelling_direct_ultraviolet_and_visible_shortwave_flux_for_coupling_multiplied_by_timestep + cumulative sfc uv+vis beam dnwd sw flux multiplied by timestep + W m-2 s + dvisbm_cpl + real + (:) + inout + F + MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run + + + cumulative_surface_downwelling_diffuse_ultraviolet_and_visible_shortwave_flux_for_coupling_multiplied_by_timestep + cumulative sfc uv+vis diff dnwd sw flux multiplied by timestep + W m-2 s + dvisdf_cpl + real + (:) + inout + F + MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run + + + instantaneous_surface_net_downward_longwave_flux_for_coupling + instantaneous net sfc downward lw flux + W m-2 + nlwsfci_cpl + real + (:) + inout + F + MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run + + + cumulative_surface_net_downward_longwave_flux_for_coupling_multiplied_by_timestep + cumulative net downward lw flux multiplied by timestep + W m-2 s + nlwsfc_cpl + real + (:) + inout + F + MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run + + + instantaneous_temperature_at_2m_for_coupling + instantaneous T2m + K + t2mi_cpl + real + (:) + inout + F + MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run + + + instantaneous_specific_humidity_at_2m_for_coupling + instantaneous Q2m + kg kg-1 + q2mi_cpl + real + (:) + inout + F + MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run + + + instantaneous_x_wind_at_10m_for_coupling + instantaneous U10m + m s-1 + u10mi_cpl + real + (:) + inout + F + MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run + + + instantaneous_y_wind_at_10m_for_coupling + instantaneous V10m + m s-1 + v10mi_cpl + real + (:) + inout + F + MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run + + + instantaneous_surface_skin_temperature_for_coupling + instantaneous sfc temperature + K + tsfci_cpl + real + (:) + inout + F + MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run + + + instantaneous_surface_air_pressure_for_coupling + instantaneous sfc pressure + Pa + psurfi_cpl + real + (:) + inout + F + MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run + + + instantaneous_surface_net_downward_direct_near_infrared_shortwave_flux_for_coupling + instantaneous net nir beam sfc downward sw flux + W m-2 + nnirbmi_cpl + real + (:) + inout + F + MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run + + + instantaneous_surface_net_downward_diffuse_near_infrared_shortwave_flux_for_coupling + instantaneous net nir diff sfc downward sw flux + W m-2 + nnirdfi_cpl + real + (:) + inout + F + MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run + + + instantaneous_surface_net_downward_direct_ultraviolet_and_visible_shortwave_flux_for_coupling + instantaneous net uv+vis beam downward sw flux + W m-2 + nvisbmi_cpl + real + (:) + inout + F + MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run + + + instantaneous_surface_net_downward_diffuse_ultraviolet_and_visible_shortwave_flux_for_coupling + instantaneous net uv+vis diff downward sw flux + W m-2 + nvisdfi_cpl + real + (:) + inout + F + MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run + + + instantaneous_surface_net_downward_shortwave_flux_for_coupling + instantaneous net sfc downward sw flux + W m-2 + nswsfci_cpl + real + (:) + inout + F + MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run + + + cumulative_surface_net_downward_shortwave_flux_for_coupling_multiplied_by_timestep + cumulative net downward sw flux multiplied by timestep + W m-2 s + nswsfc_cpl + real + (:) + inout + F + MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run + + + cumulative_surface_net_downward_direct_near_infrared_shortwave_flux_for_coupling_multiplied_by_timestep + cumulative net nir beam downward sw flux multiplied by timestep + W m-2 s + nnirbm_cpl + real + (:) + inout + F + MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run + + + cumulative_surface_net_downward_diffuse_near_infrared_shortwave_flux_for_coupling_multiplied_by_timestep + cumulative net nir diff downward sw flux multiplied by timestep + W m-2 s + nnirdf_cpl + real + (:) + inout + F + MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run + + + cumulative_surface_net_downward_direct_ultraviolet_and_visible_shortwave_flux_for_coupling_multiplied_by_timestep + cumulative net uv+vis beam downward sw rad flux multiplied by timestep + W m-2 s + nvisbm_cpl + real + (:) + inout + F + MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run + + + cumulative_surface_net_downward_diffuse_ultraviolet_and_visible_shortwave_flux_for_coupling_multiplied_by_timestep + cumulative net uv+vis diff downward sw rad flux multiplied by timestep + W m-2 s + nvisdf_cpl + real + (:) + inout + F + MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run + + + cumulative_surface_ground_heat_flux_multiplied_by_timestep + cumulative groud conductive heat flux multiplied by timestep + W m-2 s + gflux + real + (:) + inout + F + MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run + + + cumulative_soil_upward_latent_heat_flux_multiplied_by_timestep + cumulative soil upward latent heat flux multiplied by timestep + W m-2 s + evbsa + real + (:) + inout + F + MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run + + + cumulative_canopy_upward_latent_heat_flu_multiplied_by_timestep + cumulative canopy upward latent heat flux multiplied by timestep + W m-2 s + evcwa + real + (:) + inout + F + MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run + + + cumulative_transpiration_flux_multiplied_by_timestep + cumulative total plant transpiration rate multiplied by timestep + kg m-2 + transa + real + (:) + inout + F + MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run + + + cumulative_snow_deposition_sublimation_upward_latent_heat_flux_multiplied_by_timestep + cumulative latent heat flux from snow depo/subl multiplied by timestep + W m-2 s + sbsnoa + real + (:) + inout + F + MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run + + + cumulative_surface_snow_area_fraction_multiplied_by_timestep + cumulative surface snow area fraction multiplied by timestep + s + snowca + real + (:) + inout + F + MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run + + + cumulative_snow_freezing_rain_upward_latent_heat_flux_multiplied_by_timestep + cumulative latent heat flux due to snow and frz rain multiplied by timestep + W m-2 s + snohfa + real + (:) + inout + F + MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run + + + cumulative_surface_upward_potential_latent_heat_flux_multiplied_by_timestep + cumulative surface upward potential latent heat flux multiplied by timestep + W m-2 s + ep + real + (:) + inout + F + MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run + + + total_runoff + total water runoff + kg m-2 + runoff + real + (:) + inout + F + MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run + + + surface_runoff + surface water runoff (from lsm) + kg m-2 + srunoff + real + (:) + inout + F + MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run + + + surface_runoff_flux + surface runoff flux + g m-2 s-1 + runof + real + (:) + in + F + MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run + + + subsurface_runoff_flux + subsurface runoff flux + g m-2 s-1 + drain + real + (:) + in + F + MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run + + + + + diff --git a/physics/GFS_surface_generic_pre.xml b/physics/GFS_surface_generic_pre.xml new file mode 100644 index 000000000..fa8a5f525 --- /dev/null +++ b/physics/GFS_surface_generic_pre.xml @@ -0,0 +1,502 @@ + + + + + + horizontal_loop_extent + horizontal loop extent + count + im + integer + + in + F + MODULE_GFS_surface_generic_pre SCHEME_GFS_surface_generic_pre SUBROUTINE_GFS_surface_generic_pre_run + + + vertical_dimension + number of vertical levels + count + levs + integer + + in + F + MODULE_GFS_surface_generic_pre SCHEME_GFS_surface_generic_pre SUBROUTINE_GFS_surface_generic_pre_run + + + vegetation_area_fraction + areal fractional cover of green vegetation + frac + vfrac + real + (:) + in + F + MODULE_GFS_surface_generic_pre SCHEME_GFS_surface_generic_pre SUBROUTINE_GFS_surface_generic_pre_run + + + sea_land_ice_mask + landmask: sea/land/ice=0/1/2 + flag + islmsk + integer + (:) + in + F + MODULE_GFS_surface_generic_pre SCHEME_GFS_surface_generic_pre SUBROUTINE_GFS_surface_generic_pre_run + + + soil_type_dataset_choice + soil type dataset choice + index + isot + integer + + in + F + MODULE_GFS_surface_generic_pre SCHEME_GFS_surface_generic_pre SUBROUTINE_GFS_surface_generic_pre_run + + + vegetation_type_dataset_choice + land use dataset choice + index + ivegsrc + integer + + in + F + MODULE_GFS_surface_generic_pre SCHEME_GFS_surface_generic_pre SUBROUTINE_GFS_surface_generic_pre_run + + + soil_type_classification_real + soil type for lsm + index + stype + real + (:) + in + F + MODULE_GFS_surface_generic_pre SCHEME_GFS_surface_generic_pre SUBROUTINE_GFS_surface_generic_pre_run + + + vegetation_type_classification_real + vegetation type for lsm + index + vtype + real + (:) + in + F + MODULE_GFS_surface_generic_pre SCHEME_GFS_surface_generic_pre SUBROUTINE_GFS_surface_generic_pre_run + + + surface_slope_classification_real + sfc slope type for lsm + index + slope + real + (:) + in + F + MODULE_GFS_surface_generic_pre SCHEME_GFS_surface_generic_pre SUBROUTINE_GFS_surface_generic_pre_run + + + dimensionless_exner_function_at_lowest_model_interface + dimensionless Exner function at lowest model interface + none + prsik_1 + real + (:) + in + F + MODULE_GFS_surface_generic_pre SCHEME_GFS_surface_generic_pre SUBROUTINE_GFS_surface_generic_pre_run + + + dimensionless_exner_function_at_lowest_model_layer + dimensionless Exner function at lowest model layer + none + prslk_1 + real + (:) + in + F + MODULE_GFS_surface_generic_pre SCHEME_GFS_surface_generic_pre SUBROUTINE_GFS_surface_generic_pre_run + + + surface_longwave_emissivity + surface lw emissivity in fraction + frac + semis + real + (:) + in + F + MODULE_GFS_surface_generic_pre SCHEME_GFS_surface_generic_pre SUBROUTINE_GFS_surface_generic_pre_run + + + surface_downwelling_longwave_flux + surface downwelling longwave flux at current time + W m-2 + adjsfcdlw + real + (:) + in + F + MODULE_GFS_surface_generic_pre SCHEME_GFS_surface_generic_pre SUBROUTINE_GFS_surface_generic_pre_run + + + surface_skin_temperature + surface skin temperature + K + tsfc + real + (:) + in + F + MODULE_GFS_surface_generic_pre SCHEME_GFS_surface_generic_pre SUBROUTINE_GFS_surface_generic_pre_run + + + geopotential + geopotential at model layer centers + m2 s-2 + phil + real + (:,:) + in + F + MODULE_GFS_surface_generic_pre SCHEME_GFS_surface_generic_pre SUBROUTINE_GFS_surface_generic_pre_run + + + gravitational_acceleration + gravitational acceleration + m s-2 + con_g + real + + in + F + MODULE_GFS_surface_generic_pre SCHEME_GFS_surface_generic_pre SUBROUTINE_GFS_surface_generic_pre_run + + + bounded_vegetation_area_fraction + areal fractional cover of green vegetation bounded on the bottom + frac + sigmaf + real + (:) + inout + F + MODULE_GFS_surface_generic_pre SCHEME_GFS_surface_generic_pre SUBROUTINE_GFS_surface_generic_pre_run + + + soil_type_classification + soil type at each grid cell + index + soiltyp + integer + (:) + inout + F + MODULE_GFS_surface_generic_pre SCHEME_GFS_surface_generic_pre SUBROUTINE_GFS_surface_generic_pre_run + + + vegetation_type_classification + vegetation type at each grid cell + index + vegtype + integer + (:) + inout + F + MODULE_GFS_surface_generic_pre SCHEME_GFS_surface_generic_pre SUBROUTINE_GFS_surface_generic_pre_run + + + surface_slope_classification + surface slope type at each grid cell + index + slopetyp + integer + (:) + inout + F + MODULE_GFS_surface_generic_pre SCHEME_GFS_surface_generic_pre SUBROUTINE_GFS_surface_generic_pre_run + + + ratio_of_exner_function_between_midlayer_and_interface_at_lowest_model_layer + Exner function ratio bt midlayer and interface at 1st layer + ratio + work3 + real + (:) + inout + F + MODULE_GFS_surface_generic_pre SCHEME_GFS_surface_generic_pre SUBROUTINE_GFS_surface_generic_pre_run + + + surface_downwelling_longwave_flux_absorbed_by_ground + total sky surface downward longwave flux absorbed by the ground + W m-2 + gabsbdlw + real + (:) + inout + F + MODULE_GFS_surface_generic_pre SCHEME_GFS_surface_generic_pre SUBROUTINE_GFS_surface_generic_pre_run + + + surface_skin_temperature_after_iteration + surface skin temperature after iteration + K + tsurf + real + (:) + inout + F + MODULE_GFS_surface_generic_pre SCHEME_GFS_surface_generic_pre SUBROUTINE_GFS_surface_generic_pre_run + + + height_above_ground_at_lowest_model_layer + layer 1 height above ground (not MSL) + m + zlvl + real + (:) + inout + F + MODULE_GFS_surface_generic_pre SCHEME_GFS_surface_generic_pre SUBROUTINE_GFS_surface_generic_pre_run + + + flag_for_stochastic_surface_physics_perturbations + flag for stochastic surface physics perturbations + flag + do_sppt + logical + + in + F + MODULE_GFS_surface_generic_pre SCHEME_GFS_surface_generic_pre SUBROUTINE_GFS_surface_generic_pre_run + + + tendency_of_air_temperature_due_to_radiative_heating_on_physics_time_step + temp. change due to radiative heating per time step + K + dtdtr + real + (:,:) + out + F + MODULE_GFS_surface_generic_pre SCHEME_GFS_surface_generic_pre SUBROUTINE_GFS_surface_generic_pre_run + + + tendency_of_lwe_thickness_of_precipitation_amount_for_coupling + change in rain_cpl (coupling_type) + m + drain_cpl + real + (:) + out + F + MODULE_GFS_surface_generic_pre SCHEME_GFS_surface_generic_pre SUBROUTINE_GFS_surface_generic_pre_run + + + tendency_of_lwe_thickness_of_snow_amount_for_coupling + change in show_cpl (coupling_type) + m + dsnow_cpl + real + (:) + out + F + MODULE_GFS_surface_generic_pre SCHEME_GFS_surface_generic_pre SUBROUTINE_GFS_surface_generic_pre_run + + + lwe_thickness_of_precipitation_amount_for_coupling + total rain precipitation + m + rain_cpl + real + (:) + in + F + MODULE_GFS_surface_generic_pre SCHEME_GFS_surface_generic_pre SUBROUTINE_GFS_surface_generic_pre_run + + + lwe_thickness_of_snow_amount_for_coupling + total snow precipitation + m + snow_cpl + real + (:) + in + F + MODULE_GFS_surface_generic_pre SCHEME_GFS_surface_generic_pre SUBROUTINE_GFS_surface_generic_pre_run + + + flag_for_stochastic_surface_perturbations + flag for stochastic surface perturbations option + flag + do_sfcperts + logical + + in + F + MODULE_GFS_surface_generic_pre SCHEME_GFS_surface_generic_pre SUBROUTINE_GFS_surface_generic_pre_run + + + number_of_surface_perturbations + number of surface perturbations + count + nsfcpert + integer + + in + F + MODULE_GFS_surface_generic_pre SCHEME_GFS_surface_generic_pre SUBROUTINE_GFS_surface_generic_pre_run + + + weights_for_stochastic_surface_physics_perturbation + weights for stochastic surface physics perturbation + none + sfc_wts + real + (:,:) + in + F + MODULE_GFS_surface_generic_pre SCHEME_GFS_surface_generic_pre SUBROUTINE_GFS_surface_generic_pre_run + + + magnitude_of_perturbation_of_momentum_roughness_length + magnitude of perturbation of momentum roughness length + frac + pertz0 + real + (:) + in + F + MODULE_GFS_surface_generic_pre SCHEME_GFS_surface_generic_pre SUBROUTINE_GFS_surface_generic_pre_run + + + magnitude_of_perturbation_of_heat_to_momentum_roughness_length_ratio + magnitude of perturbation of heat to momentum roughness length r. + frac + pertzt + real + (:) + in + F + MODULE_GFS_surface_generic_pre SCHEME_GFS_surface_generic_pre SUBROUTINE_GFS_surface_generic_pre_run + + + magnitude_of_perturbation_of_soil_type_b_parameter + magnitude of perturbation of soil type b parameter + frac + pertshc + real + (:) + in + F + MODULE_GFS_surface_generic_pre SCHEME_GFS_surface_generic_pre SUBROUTINE_GFS_surface_generic_pre_run + + + magnitude_of_perturbation_of_leaf_area_index + magnitude of perturbation of leaf area index + frac + pertlai + real + (:) + in + F + MODULE_GFS_surface_generic_pre SCHEME_GFS_surface_generic_pre SUBROUTINE_GFS_surface_generic_pre_run + + + magnitude_of_perturbation_of_vegetation_fraction + magnitude of perturbation of vegetation fraction + frac + pertvegf + real + (:) + in + F + MODULE_GFS_surface_generic_pre SCHEME_GFS_surface_generic_pre SUBROUTINE_GFS_surface_generic_pre_run + + + perturbation_of_momentum_roughness_length + perturbation of momentum roughness length + frac + z01d + real + (:) + out + F + MODULE_GFS_surface_generic_pre SCHEME_GFS_surface_generic_pre SUBROUTINE_GFS_surface_generic_pre_run + + + perturbation_of_heat_to_momentum_roughness_length_ratio + perturbation of heat to momentum roughness length ratio + frac + zt1d + real + (:) + out + F + MODULE_GFS_surface_generic_pre SCHEME_GFS_surface_generic_pre SUBROUTINE_GFS_surface_generic_pre_run + + + perturbation_of_soil_type_b_parameter + perturbation of soil type "b" parameter + frac + bexp1d + real + (:) + out + F + MODULE_GFS_surface_generic_pre SCHEME_GFS_surface_generic_pre SUBROUTINE_GFS_surface_generic_pre_run + + + perturbation_of_leaf_area_index + perturbation of leaf area index + frac + xlai1d + real + (:) + out + F + MODULE_GFS_surface_generic_pre SCHEME_GFS_surface_generic_pre SUBROUTINE_GFS_surface_generic_pre_run + + + perturbation_of_vegetation_fraction + perturbation of vegetation fraction + frac + vegf1d + real + (:) + out + F + MODULE_GFS_surface_generic_pre SCHEME_GFS_surface_generic_pre SUBROUTINE_GFS_surface_generic_pre_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_GFS_surface_generic_pre SCHEME_GFS_surface_generic_pre SUBROUTINE_GFS_surface_generic_pre_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_GFS_surface_generic_pre SCHEME_GFS_surface_generic_pre SUBROUTINE_GFS_surface_generic_pre_run + + + + diff --git a/physics/GFS_surface_loop_control_part1.xml b/physics/GFS_surface_loop_control_part1.xml new file mode 100644 index 000000000..8e07f979d --- /dev/null +++ b/physics/GFS_surface_loop_control_part1.xml @@ -0,0 +1,73 @@ + + + + + horizontal_loop_extent + horizontal loop extent + count + im + integer + + in + F + MODULE_GFS_surface_loop_control_part1 SCHEME_GFS_surface_loop_control_part1 SUBROUTINE_GFS_surface_loop_control_part1_run + + + ccpp_loop_counter + loop counter for subcycling loops in CCPP + index + iter + integer + + in + F + MODULE_GFS_surface_loop_control_part1 SCHEME_GFS_surface_loop_control_part1 SUBROUTINE_GFS_surface_loop_control_part1_run + + + wind_speed_at_lowest_model_layer + wind speed at lowest model level + m s-1 + wind + real + (:) + in + F + MODULE_GFS_surface_loop_control_part1 SCHEME_GFS_surface_loop_control_part1 SUBROUTINE_GFS_surface_loop_control_part1_run + + + flag_for_guess_run + flag for guess run + flag + flag_guess + logical + (:) + inout + F + MODULE_GFS_surface_loop_control_part1 SCHEME_GFS_surface_loop_control_part1 SUBROUTINE_GFS_surface_loop_control_part1_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_GFS_surface_loop_control_part1 SCHEME_GFS_surface_loop_control_part1 SUBROUTINE_GFS_surface_loop_control_part1_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_GFS_surface_loop_control_part1 SCHEME_GFS_surface_loop_control_part1 SUBROUTINE_GFS_surface_loop_control_part1_run + + + + + diff --git a/physics/GFS_surface_loop_control_part2.xml b/physics/GFS_surface_loop_control_part2.xml new file mode 100644 index 000000000..8c2287f13 --- /dev/null +++ b/physics/GFS_surface_loop_control_part2.xml @@ -0,0 +1,106 @@ + + + + + horizontal_loop_extent + horizontal loop extent + count + im + integer + + in + F + MODULE_GFS_surface_loop_control_part2 SCHEME_GFS_surface_loop_control_part2 SUBROUTINE_GFS_surface_loop_control_part2_run + + + ccpp_loop_counter + loop counter for subcycling loops in CCPP + index + iter + integer + + in + F + MODULE_GFS_surface_loop_control_part2 SCHEME_GFS_surface_loop_control_part2 SUBROUTINE_GFS_surface_loop_control_part2_run + + + wind_speed_at_lowest_model_layer + wind speed at lowest model level + m s-1 + wind + real + (:) + in + F + MODULE_GFS_surface_loop_control_part2 SCHEME_GFS_surface_loop_control_part2 SUBROUTINE_GFS_surface_loop_control_part2_run + + + flag_for_guess_run + flag for guess run + flag + flag_guess + logical + (:) + inout + F + MODULE_GFS_surface_loop_control_part2 SCHEME_GFS_surface_loop_control_part2 SUBROUTINE_GFS_surface_loop_control_part2_run + + + flag_for_iteration + flag for iteration + flag + flag_iter + logical + (:) + inout + F + MODULE_GFS_surface_loop_control_part2 SCHEME_GFS_surface_loop_control_part2 SUBROUTINE_GFS_surface_loop_control_part2_run + + + sea_land_ice_mask + landmask: sea/land/ice=0/1/2 + flag + islmsk + integer + (:) + in + F + MODULE_GFS_surface_loop_control_part2 SCHEME_GFS_surface_loop_control_part2 SUBROUTINE_GFS_surface_loop_control_part2_run + + + flag_for_nsstm_run + NSSTM flag: off/uncoupled/coupled=0/1/2 + flag + nstf_name1 + integer + + in + F + MODULE_GFS_surface_loop_control_part2 SCHEME_GFS_surface_loop_control_part2 SUBROUTINE_GFS_surface_loop_control_part2_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_GFS_surface_loop_control_part2 SCHEME_GFS_surface_loop_control_part2 SUBROUTINE_GFS_surface_loop_control_part2_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_GFS_surface_loop_control_part2 SCHEME_GFS_surface_loop_control_part2 SUBROUTINE_GFS_surface_loop_control_part2_run + + + + + diff --git a/physics/GFS_time_vary_pre.xml b/physics/GFS_time_vary_pre.xml new file mode 100644 index 000000000..db6dba340 --- /dev/null +++ b/physics/GFS_time_vary_pre.xml @@ -0,0 +1,86 @@ + + + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_GFS_time_vary_pre SCHEME_GFS_time_vary_pre SUBROUTINE_GFS_time_vary_pre_finalize + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_GFS_time_vary_pre SCHEME_GFS_time_vary_pre SUBROUTINE_GFS_time_vary_pre_finalize + + + + + GFS_control_type_instance + Fortran DDT containing FV3-GFS model control parameters + DDT + Model + GFS_control_type + + inout + F + MODULE_GFS_time_vary_pre SCHEME_GFS_time_vary_pre SUBROUTINE_GFS_time_vary_pre_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_GFS_time_vary_pre SCHEME_GFS_time_vary_pre SUBROUTINE_GFS_time_vary_pre_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_GFS_time_vary_pre SCHEME_GFS_time_vary_pre SUBROUTINE_GFS_time_vary_pre_run + + + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_GFS_time_vary_pre SCHEME_GFS_time_vary_pre SUBROUTINE_GFS_time_vary_pre_init + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_GFS_time_vary_pre SCHEME_GFS_time_vary_pre SUBROUTINE_GFS_time_vary_pre_init + + + diff --git a/physics/cnvc90.xml b/physics/cnvc90.xml new file mode 100644 index 000000000..9d51a629d --- /dev/null +++ b/physics/cnvc90.xml @@ -0,0 +1,183 @@ + + + + + + + convective_cloud_switch + switch for saving convective clouds + none + clstp + real + + in + F + MODULE_cnvc90 SCHEME_cnvc90 SUBROUTINE_cnvc90_run + + + horizontal_loop_extent + horizontal loop extent + count + im + integer + + in + F + MODULE_cnvc90 SCHEME_cnvc90 SUBROUTINE_cnvc90_run + + + horizontal_dimension + horizontal dimension + count + ix + integer + + in + F + MODULE_cnvc90 SCHEME_cnvc90 SUBROUTINE_cnvc90_run + + + lwe_thickness_of_convective_precipitation_amount_on_dynamics_timestep + convective rainfall amount on dynamics timestep + m + rn + real + (:) + in + F + MODULE_cnvc90 SCHEME_cnvc90 SUBROUTINE_cnvc90_run + + + vertical_index_at_cloud_base + vertical index at cloud base + index + kbot + integer + (:) + in + F + MODULE_cnvc90 SCHEME_cnvc90 SUBROUTINE_cnvc90_run + + + vertical_index_at_cloud_top + vertical index at cloud top + index + ktop + integer + (:) + in + F + MODULE_cnvc90 SCHEME_cnvc90 SUBROUTINE_cnvc90_run + + + vertical_dimension + number of vertical layers + count + km + integer + + in + F + MODULE_cnvc90 SCHEME_cnvc90 SUBROUTINE_cnvc90_run + + + air_pressure_at_interface + interface pressure + Pa + prsi + real + (:,:) + in + F + MODULE_cnvc90 SCHEME_cnvc90 SUBROUTINE_cnvc90_run + + + accumulated_lwe_thickness_of_convective_precipitation_amount_cnvc90 + accumulated convective rainfall amount for cnvc90 only + m + acv + real + (:) + inout + F + MODULE_cnvc90 SCHEME_cnvc90 SUBROUTINE_cnvc90_run + + + smallest_cloud_base_vertical_index_encountered_thus_far + smallest cloud base vertical index encountered thus far + index + acvb + real + (:) + inout + F + MODULE_cnvc90 SCHEME_cnvc90 SUBROUTINE_cnvc90_run + + + largest_cloud_top_vertical_index_encountered_thus_far + largest cloud top vertical index encountered thus far + index + acvt + real + (:) + inout + F + MODULE_cnvc90 SCHEME_cnvc90 SUBROUTINE_cnvc90_run + + + fraction_of_convective_cloud + fraction of convective cloud + frac + cv + real + (:) + inout + F + MODULE_cnvc90 SCHEME_cnvc90 SUBROUTINE_cnvc90_run + + + pressure_at_bottom_of_convective_cloud + pressure at bottom of convective cloud + Pa + cvb + real + (:) + inout + F + MODULE_cnvc90 SCHEME_cnvc90 SUBROUTINE_cnvc90_run + + + pressure_at_top_of_convective_cloud + pressure at top of convective cloud + Pa + cvt + real + (:) + inout + F + MODULE_cnvc90 SCHEME_cnvc90 SUBROUTINE_cnvc90_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_cnvc90 SCHEME_cnvc90 SUBROUTINE_cnvc90_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_cnvc90 SCHEME_cnvc90 SUBROUTINE_cnvc90_run + + + diff --git a/physics/cs_conv.xml b/physics/cs_conv.xml new file mode 100644 index 000000000..ac9dbb5f4 --- /dev/null +++ b/physics/cs_conv.xml @@ -0,0 +1,590 @@ + + + + + + + horizontal_dimension + horizontal dimension + count + im + integer + + in + F + MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run + + + horizontal_loop_extent + horizontal loop extent + count + ijsdim + integer + + in + F + MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run + + + vertical_dimension + number of veritcal levels + count + kmax + integer + + in + F + MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run + + + number_of_tracers_plus_one + number of tracers plus one + count + ntracp1 + integer + + in + F + MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run + + + number_of_tracers_for_convective_transport + number of tracers for convective transport (used to dimension clw) + count + nn + integer + + in + F + MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run + + + number_of_tracers_for_CS + number of convectively transported tracers in Chikira-Sugiyama deep conv. scheme + count + ntr + integer + + in + F + MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run + + + number_of_cloud_types_CS + number of cloud types in Chikira-Sugiyama scheme + count + nctp + integer + + in + F + MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run + + + flag_convective_tracer_transport + flag to enable tracer transport by updrafts/downdrafts[(:,1)] or subsidence [(:,2)] + flag + otspt + logical + (:,:) + in + F + MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run + + + latitude_index_in_debug_printouts + latitude index in debug printouts + index + lat + integer + + in + F + MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run + + + index_of_time_step + current forecast iteration + index + kdt + integer + + in + F + MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run + + + air_temperature_updated_by_physics + mid-layer temperature + K + t + real + (:,:) + inout + F + MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run + + + water_vapor_specific_humidity_updated_by_physics + mid-layer specific humidity of water vapor + kg kg-1 + q + real + (:,:) + inout + F + MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run + + + lwe_thickness_of_deep_convective_precipitation_amount + deep convective rainfall amount on physics timestep + m + rain1 + real + (:) + out + F + MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run + + + convective_transportable_tracers + array to contain cloud water and other convective trans. tracers + kg kg-1 + clw + real + (:,:,:) + inout + F + MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run + + + geopotential + mid-layer geopotential + m2 s-2 + zm + real + (:,:) + in + F + MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run + + + geopotential_at_interface + interface geopotential + m2 s-2 + zi + real + (:,:) + in + F + MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run + + + air_pressure + mid-layer pressure + Pa + pap + real + (:,:) + in + F + MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run + + + air_pressure_at_interface + interface pressure + Pa + paph + real + (:,:) + in + F + MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run + + + time_step_for_physics + physics time step + s + delta + real + + in + F + MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run + + + time_step_for_dynamics + dynamics time step + s + delti + real + + in + F + MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run + + + instantaneous_atmosphere_updraft_convective_mass_flux + (updraft mass flux) * delt + kg m-2 + ud_mf + real + (:,:) + inout + F + MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run + + + instantaneous_atmosphere_downdraft_convective_mass_flux + (downdraft mass flux) * delt + kg m-2 + dd_mf + real + (:,:) + inout + F + MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run + + + instantaneous_atmosphere_detrainment_convective_mass_flux + (detrainment mass flux) * delt + kg m-2 + dt_mf + real + (:,:) + inout + F + MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run + + + x_wind_updated_by_physics + mid-layer zonal wind + m s-1 + u + real + (:,:) + inout + F + MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run + + + y_wind_updated_by_physics + mid-layer meridional wind + m s-1 + v + real + (:,:) + inout + F + MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run + + + fraction_of_tracer_scavenged + fraction of the tracer (aerosols) that is scavenged by convection + km-1 + fscav + real + (:) + in + F + MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run + + + fraction_of_cloud_top_water_scavenged + fraction of the tracer (cloud top water) that is scavenged by convection + km-1 + fswtr + real + (:) + in + F + MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run + + + cloud_base_mass_flux + cloud base mass flux + kg m-2 s-1 + cbmfx + real + (:,:) + inout + F + MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run + + + mpi_rank + current MPI rank + index + mype + integer + + in + F + MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run + + + maximum_updraft_velocity_at_cloud_base + maximum updraft velocity at cloud base + m s-1 + wcbmaxm + real + (:) + in + F + MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run + + + detrainment_and_precipitation_tunable_parameter_3_CS + partition water between detrainment and precipitation (decrease for more precipitation) + m + precz0in + real + + in + F + MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run + + + detrainment_and_precipitation_tunable_parameter_4_CS + partition water between detrainment and precipitation (decrease for more precipitation) + m + preczhin + real + + in + F + MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run + + + entrainment_efficiency_tunable_parameter_9_CS + entrainment efficiency + none + clmdin + real + + in + F + MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run + + + convective_updraft_area_fraction_at_model_interfaces + convective updraft area fraction at model interfaces + frac + sigma + real + (:,:) + out + F + MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run + + + flag_for_Arakawa_Wu_adjustment + flag for Arakawa Wu scale-aware adjustment + flag + do_aw + logical + + in + F + MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run + + + flag_arakawa_wu_downdraft + flag to enable treating convective tendencies following Arakwaw-Wu for downdrafts (2013) + flag + do_awdd + logical + + in + F + MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run + + + flag_flux_form_CS + flag to enable using the flux form of the equations in CS scheme + flag + flx_form + logical + + in + F + MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run + + + flag_print + control flag for diagnostic print out + flag + lprnt + logical + + in + F + MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run + + + horizontal_index_of_printed_column + horizontal index of printed column + index + ipr + integer + + in + F + MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run + + + flag_deep_convection + flag indicating whether convection occurs in column + flag + kcnv + integer + (:) + inout + F + MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run + + + mass_fraction_of_convective_cloud_liquid_water + mass fraction of convective cloud liquid water + kg kg-1 + qlcn + real + (:,:) + out + F + MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run + + + mass_fraction_of_convective_cloud_ice + mass fraction of convective cloud ice water + kg kg-1 + qicn + real + (:,:) + out + F + MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run + + + vertical_velocity_for_updraft + vertical velocity for updraft + m s-1 + w_upi + real + (:,:) + out + F + MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run + + + convective_cloud_fraction_for_microphysics + convective cloud fraction for microphysics + frac + cf_upi + real + (:,:) + out + F + MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run + + + detrained_mass_flux + detrained mass flux + kg m-2 s-1 + cnv_mfd + real + (:,:) + out + F + MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run + + + tendency_of_cloud_water_due_to_convective_microphysics + tendency of cloud water due to convective microphysics + kg m-2 s-1 + cnv_dqldt + real + (:,:) + out + F + MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run + + + convective_cloud_volume_fraction + convective cloud volume fraction + frac + clcn + real + (:,:) + out + F + MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run + + + ice_fraction_in_convective_tower + ice fraction in convective tower + frac + cnv_fice + real + (:,:) + out + F + MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run + + + number_concentration_of_cloud_liquid_water_particles_for_detrainment + droplet number concentration in convective detrainment + m-3 + cnv_ndrop + real + (:,:) + out + F + MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run + + + number_concentration_of_ice_crystals_for_detrainment + crystal number concentration in convective detrainment + m-3 + cnv_nice + real + (:,:) + out + F + MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run + + + flag_for_microphysics_scheme + flag for microphysics scheme + flag + mp_phys + integer + + in + F + MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run + + + diff --git a/physics/cs_conv_aw_adj.xml b/physics/cs_conv_aw_adj.xml new file mode 100644 index 000000000..ec232caa8 --- /dev/null +++ b/physics/cs_conv_aw_adj.xml @@ -0,0 +1,249 @@ + + + + + horizontal_dimension + horizontal dimension + count + im + integer + + in + F + MODULE_cs_conv_aw_adj SCHEME_cs_conv_aw_adj SUBROUTINE_cs_conv_aw_adj_run + + + vertical_dimension + number of veritcal levels + count + levs + integer + + in + F + MODULE_cs_conv_aw_adj SCHEME_cs_conv_aw_adj SUBROUTINE_cs_conv_aw_adj_run + + + flag_for_Chikira_Sugiyama_deep_convection + flag for Chikira-Sugiyama convection + flag + do_cscnv + logical + + in + F + MODULE_cs_conv_aw_adj SCHEME_cs_conv_aw_adj SUBROUTINE_cs_conv_aw_adj_run + + + flag_for_Arakawa_Wu_adjustment + flag for Arakawa Wu scale-aware adjustment + flag + do_aw + logical + + in + F + MODULE_cs_conv_aw_adj SCHEME_cs_conv_aw_adj SUBROUTINE_cs_conv_aw_adj_run + + + flag_for_shoc + flag for SHOC + flag + do_shoc + logical + + in + F + MODULE_cs_conv_aw_adj SCHEME_cs_conv_aw_adj SUBROUTINE_cs_conv_aw_adj_run + + + number_of_tracers + number of tracers + count + ntrac + integer + + in + F + MODULE_cs_conv_aw_adj SCHEME_cs_conv_aw_adj SUBROUTINE_cs_conv_aw_adj_run + + + number_of_hydrometeors + number of hydrometeors + count + ncld + integer + + in + F + MODULE_cs_conv_aw_adj SCHEME_cs_conv_aw_adj SUBROUTINE_cs_conv_aw_adj_run + + + index_for_liquid_cloud_condensate + tracer index for cloud condensate (or liquid water) + index + ntcw + integer + + in + F + MODULE_cs_conv_aw_adj SCHEME_cs_conv_aw_adj SUBROUTINE_cs_conv_aw_adj_run + + + index_for_cloud_amount + tracer index for cloud amount integer + index + ntclamt + integer + + in + F + MODULE_cs_conv_aw_adj SCHEME_cs_conv_aw_adj SUBROUTINE_cs_conv_aw_adj_run + + + number_of_tracers_for_cloud_condensate + number of tracers for cloud condensate + count + nncl + integer + + in + F + MODULE_cs_conv_aw_adj SCHEME_cs_conv_aw_adj SUBROUTINE_cs_conv_aw_adj_run + + + gravitational_acceleration + gravitational acceleration + m s-2 + con_g + real + + in + F + MODULE_cs_conv_aw_adj SCHEME_cs_conv_aw_adj SUBROUTINE_cs_conv_aw_adj_run + + + convective_updraft_area_fraction + convective updraft area fraction + frac + sigmafrac + real + (:,:) + in + F + MODULE_cs_conv_aw_adj SCHEME_cs_conv_aw_adj SUBROUTINE_cs_conv_aw_adj_run + + + air_temperature_updated_by_physics + temperature updated by physics + K + gt0 + real + (:,:) + inout + F + MODULE_cs_conv_aw_adj SCHEME_cs_conv_aw_adj SUBROUTINE_cs_conv_aw_adj_run + + + tracer_concentration_updated_by_physics + tracer concentration updated by physics + kg kg-1 + gq0 + real + (:,:,:) + inout + F + MODULE_cs_conv_aw_adj SCHEME_cs_conv_aw_adj SUBROUTINE_cs_conv_aw_adj_run + + + air_temperature_save + air temperature before entering a physics scheme + K + save_t + real + (:,:) + in + F + MODULE_cs_conv_aw_adj SCHEME_cs_conv_aw_adj SUBROUTINE_cs_conv_aw_adj_run + + + tracer_concentration_save + tracer concentration before entering a physics scheme + kg kg-1 + save_q + real + (:,:,:) + in + F + MODULE_cs_conv_aw_adj SCHEME_cs_conv_aw_adj SUBROUTINE_cs_conv_aw_adj_run + + + air_pressure_at_interface + air pressure at model layer interfaces + Pa + prsi + real + (:,:) + in + F + MODULE_cs_conv_aw_adj SCHEME_cs_conv_aw_adj SUBROUTINE_cs_conv_aw_adj_run + + + cloud_fraction_for_MG + cloud fraction used by Morrison-Gettelman MP + frac + cldfrac + real + (:,:) + inout + F + MODULE_cs_conv_aw_adj SCHEME_cs_conv_aw_adj SUBROUTINE_cs_conv_aw_adj_run + + + subgrid_scale_cloud_fraction_from_shoc + subgrid-scale cloud fraction from the SHOC scheme + frac + subcldfrac + real + (:,:) + inout + F + MODULE_cs_conv_aw_adj SCHEME_cs_conv_aw_adj SUBROUTINE_cs_conv_aw_adj_run + + + lwe_thickness_of_explicit_precipitation_amount + explicit precipitation (rain, ice, snow, graupel, ...) on physics timestep + m + prcp + real + (:) + inout + F + MODULE_cs_conv_aw_adj SCHEME_cs_conv_aw_adj SUBROUTINE_cs_conv_aw_adj_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_cs_conv_aw_adj SCHEME_cs_conv_aw_adj SUBROUTINE_cs_conv_aw_adj_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_cs_conv_aw_adj SCHEME_cs_conv_aw_adj SUBROUTINE_cs_conv_aw_adj_run + + + + + diff --git a/physics/cs_conv_post.xml b/physics/cs_conv_post.xml new file mode 100644 index 000000000..c91f5427c --- /dev/null +++ b/physics/cs_conv_post.xml @@ -0,0 +1,84 @@ + + + + + + + horizontal_dimension + horizontal dimension + count + im + integer + + in + F + MODULE_cs_conv_post SCHEME_cs_conv_post SUBROUTINE_cs_conv_post_run + + + vertical_dimension + number of veritcal levels + count + kmax + integer + + in + F + MODULE_cs_conv_post SCHEME_cs_conv_post SUBROUTINE_cs_conv_post_run + + + flag_for_Arakawa_Wu_adjustment + flag for Arakawa Wu scale-aware adjustment + flag + do_aw + logical + + in + F + MODULE_cs_conv_post SCHEME_cs_conv_post SUBROUTINE_cs_conv_post_run + + + convective_updraft_area_fraction_at_model_interfaces + convective updraft area fraction at model interfaces + frac + sigmatot + real + (:,:) + in + F + MODULE_cs_conv_post SCHEME_cs_conv_post SUBROUTINE_cs_conv_post_run + + + convective_updraft_area_fraction + convective updraft area fraction + frac + sigmafrac + real + (:,:) + out + F + MODULE_cs_conv_post SCHEME_cs_conv_post SUBROUTINE_cs_conv_post_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_cs_conv_post SCHEME_cs_conv_post SUBROUTINE_cs_conv_post_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_cs_conv_post SCHEME_cs_conv_post SUBROUTINE_cs_conv_post_run + + + diff --git a/physics/cs_conv_pre.xml b/physics/cs_conv_pre.xml new file mode 100644 index 000000000..779bbeb5c --- /dev/null +++ b/physics/cs_conv_pre.xml @@ -0,0 +1,216 @@ + + + + + horizontal_dimension + horizontal dimension + count + im + integer + + in + F + MODULE_cs_conv_pre SCHEME_cs_conv_pre SUBROUTINE_cs_conv_pre_run + + + vertical_dimension + number of veritcal levels + count + levs + integer + + in + F + MODULE_cs_conv_pre SCHEME_cs_conv_pre SUBROUTINE_cs_conv_pre_run + + + number_of_tracers + number of tracers + count + ntrac + integer + + in + F + MODULE_cs_conv_pre SCHEME_cs_conv_pre SUBROUTINE_cs_conv_pre_run + + + number_of_hydrometeors + number of hydrometeors + count + ncld + integer + + in + F + MODULE_cs_conv_pre SCHEME_cs_conv_pre SUBROUTINE_cs_conv_pre_run + + + water_vapor_specific_humidity_updated_by_physics + water vapor specific humidity updated by physics + kg kg-1 + q + real + (:,:) + in + F + MODULE_cs_conv_pre SCHEME_cs_conv_pre SUBROUTINE_cs_conv_pre_run + + + ice_water_mixing_ratio_convective_transport_tracer + moist (dry+vapor, no condensates) mixing ratio of ice water in the convectively transported tracer array + kg kg-1 + clw1 + real + (:,:) + in + F + MODULE_cs_conv_pre SCHEME_cs_conv_pre SUBROUTINE_cs_conv_pre_run + + + cloud_condensed_water_mixing_ratio_convective_transport_tracer + moist (dry+vapor, no condensates) mixing ratio of cloud water (condensate) in the convectively transported tracer array + kg kg-1 + clw2 + real + (:,:) + in + F + MODULE_cs_conv_pre SCHEME_cs_conv_pre SUBROUTINE_cs_conv_pre_run + + + grid_size_related_coefficient_used_in_scale-sensitive_schemes + grid size related coefficient used in scale-sensitive schemes + none + work1 + real + (:) + in + F + MODULE_cs_conv_pre SCHEME_cs_conv_pre SUBROUTINE_cs_conv_pre_run + + + grid_size_related_coefficient_used_in_scale-sensitive_schemes_complement + complement to work1 + none + work2 + real + (:) + in + F + MODULE_cs_conv_pre SCHEME_cs_conv_pre SUBROUTINE_cs_conv_pre_run + + + updraft_velocity_tunable_parameter_1_CS + tunable parameter 1 for Chikira-Sugiyama convection + m s-1 + cs_parm1 + real + + in + F + MODULE_cs_conv_pre SCHEME_cs_conv_pre SUBROUTINE_cs_conv_pre_run + + + updraft_velocity_tunable_parameter_2_CS + tunable parameter 2 for Chikira-Sugiyama convection + m s-1 + cs_parm2 + real + + in + F + MODULE_cs_conv_pre SCHEME_cs_conv_pre SUBROUTINE_cs_conv_pre_run + + + maximum_updraft_velocity_at_cloud_base + maximum updraft velocity at cloud base + m s-1 + wcbmax + real + (:) + out + F + MODULE_cs_conv_pre SCHEME_cs_conv_pre SUBROUTINE_cs_conv_pre_run + + + fraction_of_cloud_top_water_scavenged + fraction of the tracer (cloud top water) that is scavenged by convection + km-1 + fswtr + real + (:) + out + F + MODULE_cs_conv_pre SCHEME_cs_conv_pre SUBROUTINE_cs_conv_pre_run + + + fraction_of_tracer_scavenged + fraction of the tracer (aerosols) that is scavenged by convection + km-1 + fscav + real + (:) + out + F + MODULE_cs_conv_pre SCHEME_cs_conv_pre SUBROUTINE_cs_conv_pre_run + + + water_vapor_specific_humidity_save + water vapor specific humidity before entering a physics scheme + kg kg-1 + save_q1 + real + (:,:) + out + F + MODULE_cs_conv_pre SCHEME_cs_conv_pre SUBROUTINE_cs_conv_pre_run + + + cloud_condensed_water_mixing_ratio_save + moist (dry+vapor, no condensates) mixing ratio of cloud water (condensate) before entering a physics scheme + kg kg-1 + save_q2 + real + (:,:) + out + F + MODULE_cs_conv_pre SCHEME_cs_conv_pre SUBROUTINE_cs_conv_pre_run + + + ice_water_mixing_ratio_save + cloud ice water mixing ratio before entering a physics scheme + kg kg-1 + save_q3 + real + (:,:) + out + F + MODULE_cs_conv_pre SCHEME_cs_conv_pre SUBROUTINE_cs_conv_pre_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_cs_conv_pre SCHEME_cs_conv_pre SUBROUTINE_cs_conv_pre_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_cs_conv_pre SCHEME_cs_conv_pre SUBROUTINE_cs_conv_pre_run + + + + + diff --git a/physics/cu_gf_driver.xml b/physics/cu_gf_driver.xml new file mode 100644 index 000000000..f515db4e0 --- /dev/null +++ b/physics/cu_gf_driver.xml @@ -0,0 +1,470 @@ + + + + + number_of_total_tracers + number of total tracers + count + tottracer + integer + + in + F + MODULE_cu_gf_driver SCHEME_cu_gf_driver SUBROUTINE_cu_gf_driver_run + + + number_of_vertical_diffusion_tracers + number of tracers to diffuse vertically + count + ntrac + integer + + in + F + MODULE_cu_gf_driver SCHEME_cu_gf_driver SUBROUTINE_cu_gf_driver_run + + + cell_area + grid cell area + m2 + garea + real + (:) + in + F + MODULE_cu_gf_driver SCHEME_cu_gf_driver SUBROUTINE_cu_gf_driver_run + + + horizontal_loop_extent + horizontal loop extent + count + im + integer + + in + F + MODULE_cu_gf_driver SCHEME_cu_gf_driver SUBROUTINE_cu_gf_driver_run + + + horizontal_dimension + horizontal dimension + count + ix + integer + + in + F + MODULE_cu_gf_driver SCHEME_cu_gf_driver SUBROUTINE_cu_gf_driver_run + + + vertical_dimension + vertical layer dimension + count + km + integer + + in + F + MODULE_cu_gf_driver SCHEME_cu_gf_driver SUBROUTINE_cu_gf_driver_run + + + time_step_for_physics + physics time step + s + dt + real + + in + F + MODULE_cu_gf_driver SCHEME_cu_gf_driver SUBROUTINE_cu_gf_driver_run + + + conv_activity_counter + convective activity memory + none + cactiv + integer + (:) + inout + F + MODULE_cu_gf_driver SCHEME_cu_gf_driver SUBROUTINE_cu_gf_driver_run + + + temperature_tendency_due_to_dynamics + temperature tendency due to dynamics only + K s-1 + forcet + real + (:,:) + in + F + MODULE_cu_gf_driver SCHEME_cu_gf_driver SUBROUTINE_cu_gf_driver_run + + + moisture_tendency_due_to_dynamics + moisture tendency due to dynamics only + kg kg-1 s-1 + forceqv_spechum + real + (:,:) + in + F + MODULE_cu_gf_driver SCHEME_cu_gf_driver SUBROUTINE_cu_gf_driver_run + + + geopotential + layer geopotential + m2 s-2 + phil + real + (:,:) + in + F + MODULE_cu_gf_driver SCHEME_cu_gf_driver SUBROUTINE_cu_gf_driver_run + + + lwe_thickness_of_deep_convective_precipitation_amount + deep convective rainfall amount on physics timestep + m + raincv + real + (:) + out + F + MODULE_cu_gf_driver SCHEME_cu_gf_driver SUBROUTINE_cu_gf_driver_run + + + water_vapor_specific_humidity_updated_by_physics + water vapor specific humidity updated by physics + kg kg-1 + qv_spechum + real + (:,:) + inout + F + MODULE_cu_gf_driver SCHEME_cu_gf_driver SUBROUTINE_cu_gf_driver_run + + + air_temperature_updated_by_physics + updated temperature + K + t + real + (:,:) + inout + F + MODULE_cu_gf_driver SCHEME_cu_gf_driver SUBROUTINE_cu_gf_driver_run + + + cloud_work_function + cloud work function + m2 s-2 + cld1d + real + (:) + out + F + MODULE_cu_gf_driver SCHEME_cu_gf_driver SUBROUTINE_cu_gf_driver_run + + + x_wind_updated_by_physics + updated x-direction wind + m s-1 + us + real + (:,:) + inout + F + MODULE_cu_gf_driver SCHEME_cu_gf_driver SUBROUTINE_cu_gf_driver_run + + + y_wind_updated_by_physics + updated y-direction wind + m s-1 + vs + real + (:,:) + inout + F + MODULE_cu_gf_driver SCHEME_cu_gf_driver SUBROUTINE_cu_gf_driver_run + + + air_temperature + mid-layer temperature + K + t2di + real + (:,:) + in + F + MODULE_cu_gf_driver SCHEME_cu_gf_driver SUBROUTINE_cu_gf_driver_run + + + omega + layer mean vertical velocity + Pa s-1 + w + real + (:,:) + in + F + MODULE_cu_gf_driver SCHEME_cu_gf_driver SUBROUTINE_cu_gf_driver_run + + + water_vapor_specific_humidity + water vapor specific humidity + kg kg-1 + qv2di_spechum + real + (:,:) + in + F + MODULE_cu_gf_driver SCHEME_cu_gf_driver SUBROUTINE_cu_gf_driver_run + + + air_pressure + mean layer pressure + Pa + p2di + real + (:,:) + in + F + MODULE_cu_gf_driver SCHEME_cu_gf_driver SUBROUTINE_cu_gf_driver_run + + + surface_air_pressure + surface pressure + Pa + psuri + real + (:) + in + F + MODULE_cu_gf_driver SCHEME_cu_gf_driver SUBROUTINE_cu_gf_driver_run + + + vertical_index_at_cloud_base + index for cloud base + index + hbot + integer + (:) + out + F + MODULE_cu_gf_driver SCHEME_cu_gf_driver SUBROUTINE_cu_gf_driver_run + + + vertical_index_at_cloud_top + index for cloud top + index + htop + integer + (:) + out + F + MODULE_cu_gf_driver SCHEME_cu_gf_driver SUBROUTINE_cu_gf_driver_run + + + flag_deep_convection + deep convection: 0=no, 1=yes + flag + kcnv + integer + (:) + out + F + MODULE_cu_gf_driver SCHEME_cu_gf_driver SUBROUTINE_cu_gf_driver_run + + + sea_land_ice_mask + landmask: sea/land/ice=0/1/2 + flag + xland + integer + (:) + in + F + MODULE_cu_gf_driver SCHEME_cu_gf_driver SUBROUTINE_cu_gf_driver_run + + + kinematic_surface_upward_sensible_heat_flux + kinematic surface upward sensible heat flux + K m s-1 + hfx2 + real + (:) + in + F + MODULE_cu_gf_driver SCHEME_cu_gf_driver SUBROUTINE_cu_gf_driver_run + + + kinematic_surface_upward_latent_heat_flux + kinematic surface upward latent heat flux + kg kg-1 m s-1 + qfx2 + real + (:) + in + F + MODULE_cu_gf_driver SCHEME_cu_gf_driver SUBROUTINE_cu_gf_driver_run + + + convective_transportable_tracers + cloud water and other convective trans. tracers + kg kg-1 + clw + real + (:,:,:) + inout + F + MODULE_cu_gf_driver SCHEME_cu_gf_driver SUBROUTINE_cu_gf_driver_run + + + atmosphere_boundary_layer_thickness + PBL thickness + m + pbl + real + (:) + in + F + MODULE_cu_gf_driver SCHEME_cu_gf_driver SUBROUTINE_cu_gf_driver_run + + + instantaneous_atmosphere_updraft_convective_mass_flux + (updraft mass flux) * delt + kg m-2 + ud_mf + real + (:,:) + out + F + MODULE_cu_gf_driver SCHEME_cu_gf_driver SUBROUTINE_cu_gf_driver_run + + + instantaneous_atmosphere_downdraft_convective_mass_flux + (downdraft mass flux) * delt + kg m-2 + dd_mf + real + (:,:) + out + F + MODULE_cu_gf_driver SCHEME_cu_gf_driver SUBROUTINE_cu_gf_driver_run + + + instantaneous_atmosphere_detrainment_convective_mass_flux + (detrainment mass flux) * delt + kg m-2 + dt_mf + real + (:,:) + out + F + MODULE_cu_gf_driver SCHEME_cu_gf_driver SUBROUTINE_cu_gf_driver_run + + + convective_cloud_water_mixing_ratio + moist convective cloud water mixing ratio + kg kg-1 + cnvw_moist + real + (:,:) + out + F + MODULE_cu_gf_driver SCHEME_cu_gf_driver SUBROUTINE_cu_gf_driver_run + + + convective_cloud_cover + convective cloud cover + frac + cnvc + real + (:,:) + out + F + MODULE_cu_gf_driver SCHEME_cu_gf_driver SUBROUTINE_cu_gf_driver_run + + + flag_for_mass_flux_shallow_convection_scheme + flag for mass-flux shallow convection scheme + flag + imfshalcnv + integer + + in + F + MODULE_cu_gf_driver SCHEME_cu_gf_driver SUBROUTINE_cu_gf_driver_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_cu_gf_driver SCHEME_cu_gf_driver SUBROUTINE_cu_gf_driver_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_cu_gf_driver SCHEME_cu_gf_driver SUBROUTINE_cu_gf_driver_run + + + + + mpi_rank + current MPI-rank + index + mpirank + integer + + in + F + MODULE_cu_gf_driver SCHEME_cu_gf_driver SUBROUTINE_cu_gf_driver_init + + + mpi_root + master MPI-rank + index + mpiroot + integer + + in + F + MODULE_cu_gf_driver SCHEME_cu_gf_driver SUBROUTINE_cu_gf_driver_init + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_cu_gf_driver SCHEME_cu_gf_driver SUBROUTINE_cu_gf_driver_init + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_cu_gf_driver SCHEME_cu_gf_driver SUBROUTINE_cu_gf_driver_init + + + + diff --git a/physics/cu_gf_driver_post.xml b/physics/cu_gf_driver_post.xml new file mode 100644 index 000000000..e1504f676 --- /dev/null +++ b/physics/cu_gf_driver_post.xml @@ -0,0 +1,106 @@ + + + + + + horizontal_loop_extent + horizontal loop extent + count + im + integer + + in + F + MODULE_cu_gf_driver_post SCHEME_cu_gf_driver_post SUBROUTINE_cu_gf_driver_post_run + + + air_temperature_updated_by_physics + temperature updated by physics + K + t + real + (:,:) + in + F + MODULE_cu_gf_driver_post SCHEME_cu_gf_driver_post SUBROUTINE_cu_gf_driver_post_run + + + water_vapor_specific_humidity_updated_by_physics + water vapor specific humidity updated by physics + kg kg-1 + q + real + (:,:) + in + F + MODULE_cu_gf_driver_post SCHEME_cu_gf_driver_post SUBROUTINE_cu_gf_driver_post_run + + + temperature_from_previous_timestep + temperature from previous time step + K + prevst + real + (:,:) + out + F + MODULE_cu_gf_driver_post SCHEME_cu_gf_driver_post SUBROUTINE_cu_gf_driver_post_run + + + moisture_from_previous_timestep + moisture from previous time step + kg kg-1 + prevsq + real + (:,:) + out + F + MODULE_cu_gf_driver_post SCHEME_cu_gf_driver_post SUBROUTINE_cu_gf_driver_post_run + + + conv_activity_counter + convective activity memory + none + cactiv + integer + (:) + in + F + MODULE_cu_gf_driver_post SCHEME_cu_gf_driver_post SUBROUTINE_cu_gf_driver_post_run + + + gf_memory_counter + Memory counter for GF + none + conv_act + real + (:) + out + F + MODULE_cu_gf_driver_post SCHEME_cu_gf_driver_post SUBROUTINE_cu_gf_driver_post_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_cu_gf_driver_post SCHEME_cu_gf_driver_post SUBROUTINE_cu_gf_driver_post_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_cu_gf_driver_post SCHEME_cu_gf_driver_post SUBROUTINE_cu_gf_driver_post_run + + + + diff --git a/physics/cu_gf_driver_pre.xml b/physics/cu_gf_driver_pre.xml new file mode 100644 index 000000000..2fcbca746 --- /dev/null +++ b/physics/cu_gf_driver_pre.xml @@ -0,0 +1,172 @@ + + + + + + + flag_for_first_time_step + flag signaling first time step for time integration loop + flag + flag_init + logical + + in + F + MODULE_cu_gf_driver_pre SCHEME_cu_gf_driver_pre SUBROUTINE_cu_gf_driver_pre_run + + + flag_for_restart + flag for restart (warmstart) or coldstart + flag + flag_restart + logical + + in + F + MODULE_cu_gf_driver_pre SCHEME_cu_gf_driver_pre SUBROUTINE_cu_gf_driver_pre_run + + + index_of_time_step + current forecast iteration + index + kdt + integer + + in + F + MODULE_cu_gf_driver_pre SCHEME_cu_gf_driver_pre SUBROUTINE_cu_gf_driver_pre_run + + + forecast_time + curent forecast time + h + fhour + real + + in + F + MODULE_cu_gf_driver_pre SCHEME_cu_gf_driver_pre SUBROUTINE_cu_gf_driver_pre_run + + + time_step_for_physics + physics timestep + s + dtp + real + + in + F + MODULE_cu_gf_driver_pre SCHEME_cu_gf_driver_pre SUBROUTINE_cu_gf_driver_pre_run + + + air_temperature + model layer mean temperature + K + t + real + (:,:) + in + F + MODULE_cu_gf_driver_pre SCHEME_cu_gf_driver_pre SUBROUTINE_cu_gf_driver_pre_run + + + water_vapor_specific_humidity + water vapor specific humidity + kg kg-1 + q + real + (:,:) + in + F + MODULE_cu_gf_driver_pre SCHEME_cu_gf_driver_pre SUBROUTINE_cu_gf_driver_pre_run + + + temperature_from_previous_timestep + temperature from previous time step + K + prevst + real + (:,:) + in + F + MODULE_cu_gf_driver_pre SCHEME_cu_gf_driver_pre SUBROUTINE_cu_gf_driver_pre_run + + + moisture_from_previous_timestep + moisture from previous time step + kg kg-1 + prevsq + real + (:,:) + in + F + MODULE_cu_gf_driver_pre SCHEME_cu_gf_driver_pre SUBROUTINE_cu_gf_driver_pre_run + + + temperature_tendency_due_to_dynamics + temperature tendency due to dynamics only + K s-1 + forcet + real + (:,:) + out + F + MODULE_cu_gf_driver_pre SCHEME_cu_gf_driver_pre SUBROUTINE_cu_gf_driver_pre_run + + + moisture_tendency_due_to_dynamics + moisture tendency due to dynamics only + kg kg-1 s-1 + forceq + real + (:,:) + out + F + MODULE_cu_gf_driver_pre SCHEME_cu_gf_driver_pre SUBROUTINE_cu_gf_driver_pre_run + + + conv_activity_counter + convective activity memory + none + cactiv + integer + (:) + out + F + MODULE_cu_gf_driver_pre SCHEME_cu_gf_driver_pre SUBROUTINE_cu_gf_driver_pre_run + + + gf_memory_counter + Memory counter for GF + none + conv_act + real + (:) + in + F + MODULE_cu_gf_driver_pre SCHEME_cu_gf_driver_pre SUBROUTINE_cu_gf_driver_pre_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_cu_gf_driver_pre SCHEME_cu_gf_driver_pre SUBROUTINE_cu_gf_driver_pre_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_cu_gf_driver_pre SCHEME_cu_gf_driver_pre SUBROUTINE_cu_gf_driver_pre_run + + + diff --git a/physics/dcyc2t3.xml b/physics/dcyc2t3.xml new file mode 100644 index 000000000..934c4dbd4 --- /dev/null +++ b/physics/dcyc2t3.xml @@ -0,0 +1,546 @@ + + + + + + + forecast_hour + forecast time in 24-hour form + h + solhr + real + + in + F + MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run + + + equation_of_time + equation of time + radians + slag + real + + in + F + MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run + + + sine_of_solar_declination_angle + sine of solar declination angle + none + sdec + real + + in + F + MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run + + + cosine_of_solar_declination_angle + cosine of solar declination angle + none + cdec + real + + in + F + MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run + + + sine_of_latitude + sine of latitude + none + sinlat + real + (:) + in + F + MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run + + + cosine_of_latitude + cosine of latitude + none + coslat + real + (:) + in + F + MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run + + + longitude + longitude of grid box + radians + xlon + real + (:) + in + F + MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run + + + cosine_of_zenith_angle + average of cosine of zenith angle over daytime shortwave call time interval + none + coszen + real + (:) + in + F + MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run + + + surface_skin_temperature + surface skin temperature + K + tsea + real + (:) + in + F + MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run + + + air_temperature_at_lowest_model_layer + air temperature at lowest model layer + K + tf + real + (:) + in + F + MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run + + + surface_midlayer_air_temperature_in_longwave_radiation + surface (first layer) air temperature saved in longwave radiation call + K + tsflw + real + (:) + in + F + MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run + + + surface_longwave_emissivity + surface emissivity + frac + sfcemis + real + (:) + in + F + MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run + + + surface_downwelling_shortwave_flux_on_radiation_time_step + total sky surface downwelling shortwave flux on radiation time step + W m-2 + sfcdsw + real + (:) + in + F + MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run + + + surface_net_downwelling_shortwave_flux_on_radiation_time_step + total sky surface net downwelling shortwave flux on radiation time step + W m-2 + sfcnsw + real + (:) + in + F + MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run + + + surface_downwelling_longwave_flux_on_radiation_time_step + total sky surface downwelling longwave flux on radiation time step + W m-2 + sfcdlw + real + (:) + in + F + MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run + + + tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step + total sky shortwave heating rate on radiation time step + K s-1 + swh + real + (:,:) + in + F + MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run + + + tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_time_step + clear sky shortwave heating rate on radiation time step + K s-1 + swhc + real + (:,:) + in + F + MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run + + + tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_step + total sky longwave heating rate on radiation time step + K s-1 + hlw + real + (:,:) + in + F + MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run + + + tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_time_step + clear sky longwave heating rate on radiation time step + K s-1 + hlwc + real + (:,:) + in + F + MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run + + + surface_upwelling_direct_near_infrared_shortwave_flux_on_radiation_time_step + total sky surface upwelling beam near-infrared shortwave flux on radiation time step + W m-2 + sfcnirbmu + real + (:) + in + F + MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run + + + surface_upwelling_diffuse_near_infrared_shortwave_flux_on_radiation_time_step + total sky surface upwelling diffuse near-infrared shortwave flux on radiation time step + W m-2 + sfcnirdfu + real + (:) + in + F + MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run + + + surface_upwelling_direct_ultraviolet_and_visible_shortwave_flux_on_radiation_time_step + total sky surface upwelling beam ultraviolet plus visible shortwave flux on radiation time step + W m-2 + sfcvisbmu + real + (:) + in + F + MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run + + + surface_upwelling_diffuse_ultraviolet_and_visible_shortwave_flux_on_radiation_time_step + total sky surface upwelling diffuse ultraviolet plus visible shortwave flux on radiation time step + W m-2 + sfcvisdfu + real + (:) + in + F + MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run + + + surface_downwelling_direct_near_infrared_shortwave_flux_on_radiation_time_step + total sky surface downwelling beam near-infrared shortwave flux on radiation time step + W m-2 + sfcnirbmd + real + (:) + in + F + MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run + + + surface_downwelling_diffuse_near_infrared_shortwave_flux_on_radiation_time_step + total sky surface downwelling diffuse near-infrared shortwave flux on radiation time step + W m-2 + sfcnirdfd + real + (:) + in + F + MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run + + + surface_downwelling_direct_ultraviolet_and_visible_shortwave_flux_on_radiation_time_step + total sky surface downwelling beam ultraviolet plus visible shortwave flux on radiation time step + W m-2 + sfcvisbmd + real + (:) + in + F + MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run + + + surface_downwelling_diffuse_ultraviolet_and_visible_shortwave_flux_on_radiation_time_step + total sky surface downwelling diffuse ultraviolet plus visible shortwave flux on radiation time step + W m-2 + sfcvisdfd + real + (:) + in + F + MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run + + + horizontal_dimension + horizontal dimension + count + ix + integer + + in + F + MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run + + + horizontal_loop_extent + horizontal loop extent + count + im + integer + + in + F + MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run + + + vertical_dimension + number of vertical layers + count + levs + integer + + in + F + MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run + + + time_step_for_dynamics + dynamics timestep + s + deltim + real + + in + F + MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run + + + tendency_of_air_temperature_due_to_model_physics + total radiative heating rate at current time + K s-1 + dtdt + real + (:,:) + inout + F + MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run + + + tendency_of_air_temperature_due_to_radiative_heating_assuming_clear_sky + clear sky radiative (shortwave + longwave) heating rate at current time + K s-1 + dtdtc + real + (:,:) + inout + F + MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run + + + surface_downwelling_shortwave_flux + surface downwelling shortwave flux at current time + W m-2 + adjsfcdsw + real + (:) + out + F + MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run + + + surface_net_downwelling_shortwave_flux + surface net downwelling shortwave flux at current time + W m-2 + adjsfcnsw + real + (:) + out + F + MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run + + + surface_downwelling_longwave_flux + surface downwelling longwave flux at current time + W m-2 + adjsfcdlw + real + (:) + out + F + MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run + + + surface_upwelling_longwave_flux + surface upwelling longwave flux at current time + W m-2 + adjsfculw + real + (:) + out + F + MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run + + + zenith_angle_temporal_adjustment_factor_for_shortwave_fluxes + zenith angle temporal adjustment factor for shortwave fluxes + none + xmu + real + (:) + out + F + MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run + + + instantaneous_cosine_of_zenith_angle + cosine of zenith angle at current time + none + xcosz + real + (:) + out + F + MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run + + + surface_upwelling_direct_near_infrared_shortwave_flux + surface upwelling beam near-infrared shortwave flux at current time + W m-2 + adjnirbmu + real + (:) + out + F + MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run + + + surface_upwelling_diffuse_near_infrared_shortwave_flux + surface upwelling diffuse near-infrared shortwave flux at current time + W m-2 + adjnirdfu + real + (:) + out + F + MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run + + + surface_upwelling_direct_ultraviolet_and_visible_shortwave_flux + surface upwelling beam ultraviolet plus visible shortwave flux at current time + W m-2 + adjvisbmu + real + (:) + out + F + MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run + + + surface_upwelling_diffuse_ultraviolet_and_visible_shortwave_flux + surface upwelling diffuse ultraviolet plus visible shortwave flux at current time + W m-2 + adjvisdfu + real + (:) + out + F + MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run + + + surface_downwelling_direct_near_infrared_shortwave_flux + surface downwelling beam near-infrared shortwave flux at current time + W m-2 + adjnirbmd + real + (:) + out + F + MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run + + + surface_downwelling_diffuse_near_infrared_shortwave_flux + surface downwelling diffuse near-infrared shortwave flux at current time + W m-2 + adjnirdfd + real + (:) + out + F + MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run + + + surface_downwelling_direct_ultraviolet_and_visible_shortwave_flux + surface downwelling beam ultraviolet plus visible shortwave flux at current time + W m-2 + adjvisbmd + real + (:) + out + F + MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run + + + surface_downwelling_diffuse_ultraviolet_and_visible_shortwave_flux + surface downwelling diffuse ultraviolet plus visible shortwave flux at current time + W m-2 + adjvisdfd + real + (:) + out + F + MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run + + + diff --git a/physics/dcyc2t3_post.xml b/physics/dcyc2t3_post.xml new file mode 100644 index 000000000..1c49d2b18 --- /dev/null +++ b/physics/dcyc2t3_post.xml @@ -0,0 +1,73 @@ + + + + + horizontal_loop_extent + horizontal loop extent + count + im + integer + + in + F + MODULE_dcyc2t3_post SCHEME_dcyc2t3_post SUBROUTINE_dcyc2t3_post_run + + + surface_downwelling_shortwave_flux + surface downwelling shortwave flux at current time + W m-2 + adjsfcdsw + real + (:) + in + F + MODULE_dcyc2t3_post SCHEME_dcyc2t3_post SUBROUTINE_dcyc2t3_post_run + + + surface_net_downwelling_shortwave_flux + surface net downwelling shortwave flux at current time + W m-2 + adjsfcnsw + real + (:) + in + F + MODULE_dcyc2t3_post SCHEME_dcyc2t3_post SUBROUTINE_dcyc2t3_post_run + + + surface_upwelling_shortwave_flux + surface upwelling shortwave flux at current time + W m-2 + adjsfcusw + real + (:) + out + F + MODULE_dcyc2t3_post SCHEME_dcyc2t3_post SUBROUTINE_dcyc2t3_post_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_dcyc2t3_post SCHEME_dcyc2t3_post SUBROUTINE_dcyc2t3_post_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_dcyc2t3_post SCHEME_dcyc2t3_post SUBROUTINE_dcyc2t3_post_run + + + + + diff --git a/physics/get_phi_fv3.xml b/physics/get_phi_fv3.xml new file mode 100644 index 000000000..12bd103e5 --- /dev/null +++ b/physics/get_phi_fv3.xml @@ -0,0 +1,106 @@ + + + + + + + horizontal_dimension + horizontal dimension + count + ix + integer + + in + F + MODULE_get_phi_fv3 SCHEME_get_phi_fv3 SUBROUTINE_get_phi_fv3_run + + + vertical_dimension + number of vertical layers + count + levs + integer + + in + F + MODULE_get_phi_fv3 SCHEME_get_phi_fv3 SUBROUTINE_get_phi_fv3_run + + + air_temperature_updated_by_physics + updated air temperature + K + gt0 + real + (:,:) + in + F + MODULE_get_phi_fv3 SCHEME_get_phi_fv3 SUBROUTINE_get_phi_fv3_run + + + water_vapor_specific_humidity_updated_by_physics + mid-layer specific humidity of water vapor + kg kg-1 + gq01 + real + (:,:) + in + F + MODULE_get_phi_fv3 SCHEME_get_phi_fv3 SUBROUTINE_get_phi_fv3_run + + + geopotential_difference_between_midlayers_divided_by_midlayer_virtual_temperature + difference between mid-layer geopotentials divided by mid-layer virtual temperature + m2 s-2 K-1 + del_gz + real + (:,:) + inout + F + MODULE_get_phi_fv3 SCHEME_get_phi_fv3 SUBROUTINE_get_phi_fv3_run + + + geopotential_at_interface + interface geopotential + m2 s-2 + phii + real + (:,:) + out + F + MODULE_get_phi_fv3 SCHEME_get_phi_fv3 SUBROUTINE_get_phi_fv3_run + + + geopotential + mid-layer geopotential + m2 s-2 + phil + real + (:,:) + out + F + MODULE_get_phi_fv3 SCHEME_get_phi_fv3 SUBROUTINE_get_phi_fv3_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_get_phi_fv3 SCHEME_get_phi_fv3 SUBROUTINE_get_phi_fv3_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_get_phi_fv3 SCHEME_get_phi_fv3 SUBROUTINE_get_phi_fv3_run + + + diff --git a/physics/get_prs_fv3.xml b/physics/get_prs_fv3.xml new file mode 100644 index 000000000..adf943a06 --- /dev/null +++ b/physics/get_prs_fv3.xml @@ -0,0 +1,117 @@ + + + + + + + horizontal_dimension + horizontal dimension + count + ix + integer + + in + F + MODULE_get_prs_fv3 SCHEME_get_prs_fv3 SUBROUTINE_get_prs_fv3_run + + + vertical_dimension + number of vertical layers + count + levs + integer + + in + F + MODULE_get_prs_fv3 SCHEME_get_prs_fv3 SUBROUTINE_get_prs_fv3_run + + + geopotential_at_interface + interface geopotential + m2 s-2 + phii + real + (:,:) + in + F + MODULE_get_prs_fv3 SCHEME_get_prs_fv3 SUBROUTINE_get_prs_fv3_run + + + air_pressure_at_interface + interface pressure + Pa + prsi + real + (:,:) + in + F + MODULE_get_prs_fv3 SCHEME_get_prs_fv3 SUBROUTINE_get_prs_fv3_run + + + air_temperature + mid-layer temperature + K + tgrs + real + (:,:) + in + F + MODULE_get_prs_fv3 SCHEME_get_prs_fv3 SUBROUTINE_get_prs_fv3_run + + + water_vapor_specific_humidity + mid-layer specific humidity of water vapor + kg kg-1 + qgrs1 + real + (:,:) + in + F + MODULE_get_prs_fv3 SCHEME_get_prs_fv3 SUBROUTINE_get_prs_fv3_run + + + air_pressure_difference_between_midlayers + difference between mid-layer pressures + Pa + del + real + (:,:) + out + F + MODULE_get_prs_fv3 SCHEME_get_prs_fv3 SUBROUTINE_get_prs_fv3_run + + + geopotential_difference_between_midlayers_divided_by_midlayer_virtual_temperature + difference between mid-layer geopotentials divided by mid-layer virtual temperature + m2 s-2 K-1 + del_gz + real + (:,:) + out + F + MODULE_get_prs_fv3 SCHEME_get_prs_fv3 SUBROUTINE_get_prs_fv3_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_get_prs_fv3 SCHEME_get_prs_fv3 SUBROUTINE_get_prs_fv3_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_get_prs_fv3 SCHEME_get_prs_fv3 SUBROUTINE_get_prs_fv3_run + + + diff --git a/physics/gfdl_cloud_microphys.xml b/physics/gfdl_cloud_microphys.xml new file mode 100644 index 000000000..9aa7100a5 --- /dev/null +++ b/physics/gfdl_cloud_microphys.xml @@ -0,0 +1,504 @@ + + + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_gfdl_cloud_microphys SCHEME_gfdl_cloud_microphys SUBROUTINE_gfdl_cloud_microphys_finalize + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_gfdl_cloud_microphys SCHEME_gfdl_cloud_microphys SUBROUTINE_gfdl_cloud_microphys_finalize + + + + + vertical_dimension + number of vertical levels + count + levs + integer + + in + F + MODULE_gfdl_cloud_microphys SCHEME_gfdl_cloud_microphys SUBROUTINE_gfdl_cloud_microphys_run + + + horizontal_loop_extent + horizontal loop extent + count + im + integer + + in + F + MODULE_gfdl_cloud_microphys SCHEME_gfdl_cloud_microphys SUBROUTINE_gfdl_cloud_microphys_run + + + gravitational_acceleration + gravitational acceleration + m s-2 + con_g + real + + in + F + MODULE_gfdl_cloud_microphys SCHEME_gfdl_cloud_microphys SUBROUTINE_gfdl_cloud_microphys_run + + + ratio_of_vapor_to_dry_air_gas_constants_minus_one + rv/rd - 1 (rv = ideal gas constant for water vapor) + none + con_fvirt + real + + in + F + MODULE_gfdl_cloud_microphys SCHEME_gfdl_cloud_microphys SUBROUTINE_gfdl_cloud_microphys_run + + + gas_constant_dry_air + ideal gas constant for dry air + J kg-1 K-1 + con_rd + real + + in + F + MODULE_gfdl_cloud_microphys SCHEME_gfdl_cloud_microphys SUBROUTINE_gfdl_cloud_microphys_run + + + land_area_fraction + land area fraction + frac + frland + real + (:) + in + F + MODULE_gfdl_cloud_microphys SCHEME_gfdl_cloud_microphys SUBROUTINE_gfdl_cloud_microphys_run + + + cell_area + area of grid cell + m2 + garea + real + (:) + in + F + MODULE_gfdl_cloud_microphys SCHEME_gfdl_cloud_microphys SUBROUTINE_gfdl_cloud_microphys_run + + + water_vapor_specific_humidity_updated_by_physics + water vapor specific humidity updated by physics + kg kg-1 + gq0 + real + (:,:) + inout + F + MODULE_gfdl_cloud_microphys SCHEME_gfdl_cloud_microphys SUBROUTINE_gfdl_cloud_microphys_run + + + cloud_condensed_water_mixing_ratio_updated_by_physics + cloud condensed water mixing ratio updated by physics + kg kg-1 + gq0_ntcw + real + (:,:) + inout + F + MODULE_gfdl_cloud_microphys SCHEME_gfdl_cloud_microphys SUBROUTINE_gfdl_cloud_microphys_run + + + rain_water_mixing_ratio_updated_by_physics + moist mixing ratio of rain updated by physics + kg kg-1 + gq0_ntrw + real + (:,:) + inout + F + MODULE_gfdl_cloud_microphys SCHEME_gfdl_cloud_microphys SUBROUTINE_gfdl_cloud_microphys_run + + + ice_water_mixing_ratio_updated_by_physics + moist mixing ratio of cloud ice updated by physics + kg kg-1 + gq0_ntiw + real + (:,:) + inout + F + MODULE_gfdl_cloud_microphys SCHEME_gfdl_cloud_microphys SUBROUTINE_gfdl_cloud_microphys_run + + + snow_water_mixing_ratio_updated_by_physics + moist mixing ratio of snow updated by physics + kg kg-1 + gq0_ntsw + real + (:,:) + inout + F + MODULE_gfdl_cloud_microphys SCHEME_gfdl_cloud_microphys SUBROUTINE_gfdl_cloud_microphys_run + + + graupel_mixing_ratio_updated_by_physics + moist mixing ratio of graupel updated by physics + kg kg-1 + gq0_ntgl + real + (:,:) + inout + F + MODULE_gfdl_cloud_microphys SCHEME_gfdl_cloud_microphys SUBROUTINE_gfdl_cloud_microphys_run + + + cloud_fraction_updated_by_physics + cloud fraction updated by physics + frac + gq0_ntclamt + real + (:,:) + inout + F + MODULE_gfdl_cloud_microphys SCHEME_gfdl_cloud_microphys SUBROUTINE_gfdl_cloud_microphys_run + + + air_temperature_updated_by_physics + air temperature updated by physics + K + gt0 + real + (:,:) + inout + F + MODULE_gfdl_cloud_microphys SCHEME_gfdl_cloud_microphys SUBROUTINE_gfdl_cloud_microphys_run + + + x_wind_updated_by_physics + zonal wind updated by physics + m s-1 + gu0 + real + (:,:) + inout + F + MODULE_gfdl_cloud_microphys SCHEME_gfdl_cloud_microphys SUBROUTINE_gfdl_cloud_microphys_run + + + y_wind_updated_by_physics + meridional wind updated by physics + m s-1 + gv0 + real + (:,:) + inout + F + MODULE_gfdl_cloud_microphys SCHEME_gfdl_cloud_microphys SUBROUTINE_gfdl_cloud_microphys_run + + + omega + layer mean vertical velocity + Pa s-1 + vvl + real + (:,:) + in + F + MODULE_gfdl_cloud_microphys SCHEME_gfdl_cloud_microphys SUBROUTINE_gfdl_cloud_microphys_run + + + air_pressure + mean layer pressure + Pa + prsl + real + (:,:) + in + F + MODULE_gfdl_cloud_microphys SCHEME_gfdl_cloud_microphys SUBROUTINE_gfdl_cloud_microphys_run + + + geopotential_at_interface + geopotential at model layer interfaces + m2 s-2 + phii + real + (:,:) + in + F + MODULE_gfdl_cloud_microphys SCHEME_gfdl_cloud_microphys SUBROUTINE_gfdl_cloud_microphys_run + + + air_pressure_difference_between_midlayers + air pressure difference between mid-layers + Pa + del + real + (:,:) + in + F + MODULE_gfdl_cloud_microphys SCHEME_gfdl_cloud_microphys SUBROUTINE_gfdl_cloud_microphys_run + + + lwe_thickness_of_explicit_rain_amount + explicit rain on physics timestep + m + rain0 + real + (:) + out + F + MODULE_gfdl_cloud_microphys SCHEME_gfdl_cloud_microphys SUBROUTINE_gfdl_cloud_microphys_run + + + lwe_thickness_of_ice_amount + ice fall on physics timestep + m + ice0 + real + (:) + out + F + MODULE_gfdl_cloud_microphys SCHEME_gfdl_cloud_microphys SUBROUTINE_gfdl_cloud_microphys_run + + + lwe_thickness_of_snow_amount + snow fall on physics timestep + m + snow0 + real + (:) + out + F + MODULE_gfdl_cloud_microphys SCHEME_gfdl_cloud_microphys SUBROUTINE_gfdl_cloud_microphys_run + + + lwe_thickness_of_graupel_amount + graupel fall on physics timestep + m + graupel0 + real + (:) + out + F + MODULE_gfdl_cloud_microphys SCHEME_gfdl_cloud_microphys SUBROUTINE_gfdl_cloud_microphys_run + + + lwe_thickness_of_explicit_precipitation_amount + explicit precipitation (rain, ice, snow, graupel) on physics timestep + m + prcp0 + real + (:) + out + F + MODULE_gfdl_cloud_microphys SCHEME_gfdl_cloud_microphys SUBROUTINE_gfdl_cloud_microphys_run + + + ratio_of_snowfall_to_rainfall + snow ratio: ratio of snow to total precipitation + frac + sr + real + (:) + out + F + MODULE_gfdl_cloud_microphys SCHEME_gfdl_cloud_microphys SUBROUTINE_gfdl_cloud_microphys_run + + + time_step_for_physics + physics timestep + s + dtp + real + + in + F + MODULE_gfdl_cloud_microphys SCHEME_gfdl_cloud_microphys SUBROUTINE_gfdl_cloud_microphys_run + + + flag_for_hydrostatic_solver + flag indicating hydrostatic solver + flag + hydrostatic + logical + + in + F + MODULE_gfdl_cloud_microphys SCHEME_gfdl_cloud_microphys SUBROUTINE_gfdl_cloud_microphys_run + + + flag_for_hydrostatic_heating_from_physics + flag indicating hydrostatic heating from physics + flag + phys_hydrostatic + logical + + in + F + MODULE_gfdl_cloud_microphys SCHEME_gfdl_cloud_microphys SUBROUTINE_gfdl_cloud_microphys_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_gfdl_cloud_microphys SCHEME_gfdl_cloud_microphys SUBROUTINE_gfdl_cloud_microphys_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_gfdl_cloud_microphys SCHEME_gfdl_cloud_microphys SUBROUTINE_gfdl_cloud_microphys_run + + + + + mpi_rank + MPI rank of current process + index + me + integer + + in + F + MODULE_gfdl_cloud_microphys SCHEME_gfdl_cloud_microphys SUBROUTINE_gfdl_cloud_microphys_init + + + mpi_root + MPI rank of master process + index + master + integer + + in + F + MODULE_gfdl_cloud_microphys SCHEME_gfdl_cloud_microphys SUBROUTINE_gfdl_cloud_microphys_init + + + iounit_namelist + fortran unit number for opening nameliust file + none + nlunit + integer + + in + F + MODULE_gfdl_cloud_microphys SCHEME_gfdl_cloud_microphys SUBROUTINE_gfdl_cloud_microphys_init + + + namelist_filename_for_internal_file_reads + character string to store full namelist contents + none + input_nml_file + character + (:) + in + F + MODULE_gfdl_cloud_microphys SCHEME_gfdl_cloud_microphys SUBROUTINE_gfdl_cloud_microphys_init + + + iounit_log + fortran unit number for writing logfile + none + logunit + integer + + in + F + MODULE_gfdl_cloud_microphys SCHEME_gfdl_cloud_microphys SUBROUTINE_gfdl_cloud_microphys_init + + + namelist_filename + namelist filename + none + fn_nml + character + + in + F + MODULE_gfdl_cloud_microphys SCHEME_gfdl_cloud_microphys SUBROUTINE_gfdl_cloud_microphys_init + + + flag_for_microphysics_scheme + choice of microphysics scheme + flag + imp_physics + integer + + in + F + MODULE_gfdl_cloud_microphys SCHEME_gfdl_cloud_microphys SUBROUTINE_gfdl_cloud_microphys_init + + + flag_for_gfdl_microphysics_scheme + choice of GFDL microphysics scheme + flag + imp_physics_gfdl + integer + + in + F + MODULE_gfdl_cloud_microphys SCHEME_gfdl_cloud_microphys SUBROUTINE_gfdl_cloud_microphys_init + + + flag_for_shoc + flag to indicate use of SHOC + flag + do_shoc + logical + + in + F + MODULE_gfdl_cloud_microphys SCHEME_gfdl_cloud_microphys SUBROUTINE_gfdl_cloud_microphys_init + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_gfdl_cloud_microphys SCHEME_gfdl_cloud_microphys SUBROUTINE_gfdl_cloud_microphys_init + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_gfdl_cloud_microphys SCHEME_gfdl_cloud_microphys SUBROUTINE_gfdl_cloud_microphys_init + + + diff --git a/physics/gmtb_scm_sfc_flux_spec.xml b/physics/gmtb_scm_sfc_flux_spec.xml new file mode 100644 index 000000000..fa23ff323 --- /dev/null +++ b/physics/gmtb_scm_sfc_flux_spec.xml @@ -0,0 +1,381 @@ + + + + + + x_wind_at_lowest_model_layer + x component of 1st model layer wind + m s-1 + u1 + real + (:) + in + F + MODULE_gmtb_scm_sfc_flux_spec SCHEME_gmtb_scm_sfc_flux_spec SUBROUTINE_gmtb_scm_sfc_flux_spec_run + + + y_wind_at_lowest_model_layer + y component of 1st model layer wind + m s-1 + v1 + real + (:) + in + F + MODULE_gmtb_scm_sfc_flux_spec SCHEME_gmtb_scm_sfc_flux_spec SUBROUTINE_gmtb_scm_sfc_flux_spec_run + + + height_above_ground_at_lowest_model_layer + height above ground at 1st model layer + m + z1 + real + (:) + in + F + MODULE_gmtb_scm_sfc_flux_spec SCHEME_gmtb_scm_sfc_flux_spec SUBROUTINE_gmtb_scm_sfc_flux_spec_run + + + air_temperature_at_lowest_model_layer + 1st model layer air temperature + K + t1 + real + (:) + in + F + MODULE_gmtb_scm_sfc_flux_spec SCHEME_gmtb_scm_sfc_flux_spec SUBROUTINE_gmtb_scm_sfc_flux_spec_run + + + water_vapor_specific_humidity_at_lowest_model_layer + 1st model layer specific humidity + kg kg-1 + q1 + real + (:) + in + F + MODULE_gmtb_scm_sfc_flux_spec SCHEME_gmtb_scm_sfc_flux_spec SUBROUTINE_gmtb_scm_sfc_flux_spec_run + + + air_pressure_at_lowest_model_layer + Model layer 1 mean pressure + Pa + p1 + real + (:) + in + F + MODULE_gmtb_scm_sfc_flux_spec SCHEME_gmtb_scm_sfc_flux_spec SUBROUTINE_gmtb_scm_sfc_flux_spec_run + + + surface_roughness_length + surface roughness length + cm + roughness_length + real + (:) + in + F + MODULE_gmtb_scm_sfc_flux_spec SCHEME_gmtb_scm_sfc_flux_spec SUBROUTINE_gmtb_scm_sfc_flux_spec_run + + + specified_kinematic_surface_upward_sensible_heat_flux + specified kinematic surface upward sensible heat flux + K m s-1 + spec_sh_flux + real + (:) + in + F + MODULE_gmtb_scm_sfc_flux_spec SCHEME_gmtb_scm_sfc_flux_spec SUBROUTINE_gmtb_scm_sfc_flux_spec_run + + + specified_kinematic_surface_upward_latent_heat_flux + specified kinematic surface upward latent heat flux + kg kg-1 m s-1 + spec_lh_flux + real + (:) + in + F + MODULE_gmtb_scm_sfc_flux_spec SCHEME_gmtb_scm_sfc_flux_spec SUBROUTINE_gmtb_scm_sfc_flux_spec_run + + + ratio_of_exner_function_between_midlayer_and_interface_at_lowest_model_layer + Exner function ratio bt midlayer and interface at 1st layer + ratio + exner_inverse + real + (:) + in + F + MODULE_gmtb_scm_sfc_flux_spec SCHEME_gmtb_scm_sfc_flux_spec SUBROUTINE_gmtb_scm_sfc_flux_spec_run + + + surface_skin_temperature + surface skin temperature + K + T_surf + real + (:) + in + F + MODULE_gmtb_scm_sfc_flux_spec SCHEME_gmtb_scm_sfc_flux_spec SUBROUTINE_gmtb_scm_sfc_flux_spec_run + + + specific_heat_of_dry_air_at_constant_pressure + specific heat of dry air at constant pressure + J kg-1 K-1 + cp + real + + in + F + MODULE_gmtb_scm_sfc_flux_spec SCHEME_gmtb_scm_sfc_flux_spec SUBROUTINE_gmtb_scm_sfc_flux_spec_run + + + gravitational_acceleration + gravitational acceleration + m s-2 + grav + real + + in + F + MODULE_gmtb_scm_sfc_flux_spec SCHEME_gmtb_scm_sfc_flux_spec SUBROUTINE_gmtb_scm_sfc_flux_spec_run + + + latent_heat_of_vaporization_of_water_at_0C + latent heat of vaporization of water at 0C + J kg-1 + hvap + real + + in + F + MODULE_gmtb_scm_sfc_flux_spec SCHEME_gmtb_scm_sfc_flux_spec SUBROUTINE_gmtb_scm_sfc_flux_spec_run + + + gas_constant_dry_air + ideal gas constant for dry air + J kg-1 K-1 + rd + real + + in + F + MODULE_gmtb_scm_sfc_flux_spec SCHEME_gmtb_scm_sfc_flux_spec SUBROUTINE_gmtb_scm_sfc_flux_spec_run + + + ratio_of_vapor_to_dry_air_gas_constants_minus_one + rv/rd - 1 (rv = ideal gas constant for water vapor) + none + fvirt + real + + in + F + MODULE_gmtb_scm_sfc_flux_spec SCHEME_gmtb_scm_sfc_flux_spec SUBROUTINE_gmtb_scm_sfc_flux_spec_run + + + vonKarman_constant + vonKarman constant + none + vonKarman + real + + in + F + MODULE_gmtb_scm_sfc_flux_spec SCHEME_gmtb_scm_sfc_flux_spec SUBROUTINE_gmtb_scm_sfc_flux_spec_run + + + kinematic_surface_upward_sensible_heat_flux + surface upward sensible heat flux + K m s-1 + sh_flux + real + (:) + out + F + MODULE_gmtb_scm_sfc_flux_spec SCHEME_gmtb_scm_sfc_flux_spec SUBROUTINE_gmtb_scm_sfc_flux_spec_run + + + kinematic_surface_upward_latent_heat_flux + surface upward evaporation flux + kg kg-1 m s-1 + lh_flux + real + (:) + out + F + MODULE_gmtb_scm_sfc_flux_spec SCHEME_gmtb_scm_sfc_flux_spec SUBROUTINE_gmtb_scm_sfc_flux_spec_run + + + surface_friction_velocity + boundary layer parameter + m s-1 + u_star + real + (:) + out + F + MODULE_gmtb_scm_sfc_flux_spec SCHEME_gmtb_scm_sfc_flux_spec SUBROUTINE_gmtb_scm_sfc_flux_spec_run + + + surface_wind_stress + surface wind stress + m2 s-2 + sfc_stress + real + (:) + out + F + MODULE_gmtb_scm_sfc_flux_spec SCHEME_gmtb_scm_sfc_flux_spec SUBROUTINE_gmtb_scm_sfc_flux_spec_run + + + surface_drag_coefficient_for_momentum_in_air + surface exchange coeff for momentum + none + cm + real + (:) + out + F + MODULE_gmtb_scm_sfc_flux_spec SCHEME_gmtb_scm_sfc_flux_spec SUBROUTINE_gmtb_scm_sfc_flux_spec_run + + + surface_drag_coefficient_for_heat_and_moisture_in_air + surface exchange coeff heat moisture + none + ch + real + (:) + out + F + MODULE_gmtb_scm_sfc_flux_spec SCHEME_gmtb_scm_sfc_flux_spec SUBROUTINE_gmtb_scm_sfc_flux_spec_run + + + Monin-Obukhov_similarity_function_for_momentum + Monin-Obukhov similarity function for momentum + none + fm + real + (:) + out + F + MODULE_gmtb_scm_sfc_flux_spec SCHEME_gmtb_scm_sfc_flux_spec SUBROUTINE_gmtb_scm_sfc_flux_spec_run + + + Monin-Obukhov_similarity_function_for_heat + Monin-Obukhov similarity function for heat + none + fh + real + (:) + out + F + MODULE_gmtb_scm_sfc_flux_spec SCHEME_gmtb_scm_sfc_flux_spec SUBROUTINE_gmtb_scm_sfc_flux_spec_run + + + bulk_richardson_number_at_lowest_model_level + bulk Richardson number at the surface + none + rb + real + (:) + out + F + MODULE_gmtb_scm_sfc_flux_spec SCHEME_gmtb_scm_sfc_flux_spec SUBROUTINE_gmtb_scm_sfc_flux_spec_run + + + x_wind_at_10m + 10 meter u wind speed + m s-1 + u10m + real + (:) + out + F + MODULE_gmtb_scm_sfc_flux_spec SCHEME_gmtb_scm_sfc_flux_spec SUBROUTINE_gmtb_scm_sfc_flux_spec_run + + + y_wind_at_10m + 10 meter v wind speed + m s-1 + v10m + real + (:) + out + F + MODULE_gmtb_scm_sfc_flux_spec SCHEME_gmtb_scm_sfc_flux_spec SUBROUTINE_gmtb_scm_sfc_flux_spec_run + + + wind_speed_at_lowest_model_layer + wind speed at lowest model level + m s-1 + wind1 + real + (:) + out + F + MODULE_gmtb_scm_sfc_flux_spec SCHEME_gmtb_scm_sfc_flux_spec SUBROUTINE_gmtb_scm_sfc_flux_spec_run + + + surface_specific_humidity + surface air saturation specific humidity + kg kg-1 + qss + real + (:) + out + F + MODULE_gmtb_scm_sfc_flux_spec SCHEME_gmtb_scm_sfc_flux_spec SUBROUTINE_gmtb_scm_sfc_flux_spec_run + + + temperature_at_2m + 2 meter temperature + K + t2m + real + (:) + out + F + MODULE_gmtb_scm_sfc_flux_spec SCHEME_gmtb_scm_sfc_flux_spec SUBROUTINE_gmtb_scm_sfc_flux_spec_run + + + specific_humidity_at_2m + 2 meter specific humidity + kg kg-1 + q2m + real + (:) + out + F + MODULE_gmtb_scm_sfc_flux_spec SCHEME_gmtb_scm_sfc_flux_spec SUBROUTINE_gmtb_scm_sfc_flux_spec_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_gmtb_scm_sfc_flux_spec SCHEME_gmtb_scm_sfc_flux_spec SUBROUTINE_gmtb_scm_sfc_flux_spec_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_gmtb_scm_sfc_flux_spec SCHEME_gmtb_scm_sfc_flux_spec SUBROUTINE_gmtb_scm_sfc_flux_spec_run + + + + diff --git a/physics/gwdc.xml b/physics/gwdc.xml new file mode 100644 index 000000000..28023d915 --- /dev/null +++ b/physics/gwdc.xml @@ -0,0 +1,359 @@ + + + + + horizontal_loop_extent + horizontal loop extent + count + im + integer + + in + F + MODULE_gwdc SCHEME_gwdc SUBROUTINE_gwdc_run + + + horizontal_dimension + horizontal dimension + count + ix + integer + + in + F + MODULE_gwdc SCHEME_gwdc SUBROUTINE_gwdc_run + + + vertical_dimension + number of vertical layers + count + km + integer + + in + F + MODULE_gwdc SCHEME_gwdc SUBROUTINE_gwdc_run + + + latitude_index_in_debug_printouts + latitude index in debug printouts + index + lat + integer + + in + F + MODULE_gwdc SCHEME_gwdc SUBROUTINE_gwdc_run + + + x_wind + zonal wind + m s-1 + u1 + real + (:,:) + in + F + MODULE_gwdc SCHEME_gwdc SUBROUTINE_gwdc_run + + + y_wind + meridional wind + m s-1 + v1 + real + (:,:) + in + F + MODULE_gwdc SCHEME_gwdc SUBROUTINE_gwdc_run + + + air_temperature + mid-layer temperature + K + t1 + real + (:,:) + in + F + MODULE_gwdc SCHEME_gwdc SUBROUTINE_gwdc_run + + + water_vapor_specific_humidity + mid-layer specific humidity of water vapor + kg kg-1 + q1 + real + (:,:) + in + F + MODULE_gwdc SCHEME_gwdc SUBROUTINE_gwdc_run + + + time_step_for_physics + physics time step + s + deltim + real + + in + F + MODULE_gwdc SCHEME_gwdc SUBROUTINE_gwdc_run + + + air_pressure + mid-layer pressure + Pa + pmid1 + real + (:,:) + in + F + MODULE_gwdc SCHEME_gwdc SUBROUTINE_gwdc_run + + + air_pressure_at_interface + interface pressure + Pa + pint1 + real + (:,:) + in + F + MODULE_gwdc SCHEME_gwdc SUBROUTINE_gwdc_run + + + air_pressure_difference_between_midlayers + difference between mid-layer pressures + Pa + dpmid1 + real + (:,:) + in + F + MODULE_gwdc SCHEME_gwdc SUBROUTINE_gwdc_run + + + maximum_column_heating_rate + maximum heating rate in column + K s-1 + qmax + real + (:) + in + F + MODULE_gwdc SCHEME_gwdc SUBROUTINE_gwdc_run + + + vertical_index_at_cloud_top + vertical index at cloud top + index + ktop + integer + (:) + in + F + MODULE_gwdc SCHEME_gwdc SUBROUTINE_gwdc_run + + + vertical_index_at_cloud_base + vertical index at cloud base + index + kbot + integer + (:) + in + F + MODULE_gwdc SCHEME_gwdc SUBROUTINE_gwdc_run + + + flag_deep_convection + flag indicating whether convection occurs in column (0 or 1) + flag + kcnv + integer + (:) + in + F + MODULE_gwdc SCHEME_gwdc SUBROUTINE_gwdc_run + + + cloud_area_fraction + fraction of grid box area in which updrafts occur + frac + cldf + real + (:) + in + F + MODULE_gwdc SCHEME_gwdc SUBROUTINE_gwdc_run + + + gravitational_acceleration + gravitational acceleration + m s-2 + grav + real + + in + F + MODULE_gwdc SCHEME_gwdc SUBROUTINE_gwdc_run + + + specific_heat_of_dry_air_at_constant_pressure + specific heat of dry air at constant pressure + J kg-1 K-1 + cp + real + + in + F + MODULE_gwdc SCHEME_gwdc SUBROUTINE_gwdc_run + + + gas_constant_dry_air + ideal gas constant for dry air + J kg-1 K-1 + rd + real + + in + F + MODULE_gwdc SCHEME_gwdc SUBROUTINE_gwdc_run + + + ratio_of_vapor_to_dry_air_gas_constants_minus_one + rv/rd - 1 (rv = ideal gas constant for water vapor) + none + fv + real + + in + F + MODULE_gwdc SCHEME_gwdc SUBROUTINE_gwdc_run + + + pi + ratio of a circle's circumference to its diameter + radians + pi + real + + in + F + MODULE_gwdc SCHEME_gwdc SUBROUTINE_gwdc_run + + + characteristic_grid_length_scale + representative horizontal length scale of grid box + m + dlength + real + (:) + in + F + MODULE_gwdc SCHEME_gwdc SUBROUTINE_gwdc_run + + + flag_print + flag for debugging printouts + flag + lprnt + logical + + in + F + MODULE_gwdc SCHEME_gwdc SUBROUTINE_gwdc_run + + + horizontal_index_of_printed_column + horizontal index of column used in debugging printouts + index + ipr + integer + + in + F + MODULE_gwdc SCHEME_gwdc SUBROUTINE_gwdc_run + + + forecast_time + forecast hour + h + fhour + real + + in + F + MODULE_gwdc SCHEME_gwdc SUBROUTINE_gwdc_run + + + tendency_of_x_wind_due_to_convective_gravity_wave_drag + zonal wind tendency due to convective gravity wave drag + m s-2 + utgwc + real + (:,:) + out + F + MODULE_gwdc SCHEME_gwdc SUBROUTINE_gwdc_run + + + tendency_of_y_wind_due_to_convective_gravity_wave_drag + meridional wind tendency due to convective gravity wave drag + m s-2 + vtgwc + real + (:,:) + out + F + MODULE_gwdc SCHEME_gwdc SUBROUTINE_gwdc_run + + + instantaneous_x_stress_due_to_gravity_wave_drag + zonal stress at cloud top due to convective gravity wave drag + Pa + tauctx + real + (:) + out + F + MODULE_gwdc SCHEME_gwdc SUBROUTINE_gwdc_run + + + instantaneous_y_stress_due_to_gravity_wave_drag + meridional stress at cloud top due to convective gravity wave drag + Pa + taucty + real + (:) + out + F + MODULE_gwdc SCHEME_gwdc SUBROUTINE_gwdc_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_gwdc SCHEME_gwdc SUBROUTINE_gwdc_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_gwdc SCHEME_gwdc SUBROUTINE_gwdc_run + + + + + diff --git a/physics/gwdc_post.xml b/physics/gwdc_post.xml new file mode 100644 index 000000000..9ac2fd3c2 --- /dev/null +++ b/physics/gwdc_post.xml @@ -0,0 +1,227 @@ + + + + + + + horizontal_loop_extent + horizontal loop extent + count + im + integer + + in + F + MODULE_gwdc_post SCHEME_gwdc_post SUBROUTINE_gwdc_post_run + + + vertical_dimension + number of vertical layers + count + levs + integer + + in + F + MODULE_gwdc_post SCHEME_gwdc_post SUBROUTINE_gwdc_post_run + + + flag_diagnostics + flag for calculating diagnostic fields + flag + lssav + logical + + in + F + MODULE_gwdc_post SCHEME_gwdc_post SUBROUTINE_gwdc_post_run + + + flag_diagnostics_3D + flag for calculating 3-D diagnostic fields + flag + ldiag3d + logical + + in + F + MODULE_gwdc_post SCHEME_gwdc_post SUBROUTINE_gwdc_post_run + + + time_step_for_dynamics + dynamics time step + s + dtf + real + + in + F + MODULE_gwdc_post SCHEME_gwdc_post SUBROUTINE_gwdc_post_run + + + time_step_for_physics + physics time step + s + dtp + real + + in + F + MODULE_gwdc_post SCHEME_gwdc_post SUBROUTINE_gwdc_post_run + + + specific_heat_of_dry_air_at_constant_pressure + specific heat of dry air at constant pressure + J kg-1 K-1 + con_cp + real + + in + F + MODULE_gwdc_post SCHEME_gwdc_post SUBROUTINE_gwdc_post_run + + + instantaneous_x_stress_due_to_gravity_wave_drag + zonal stress at cloud top due to convective gravity wave drag + Pa + tauctx + real + (:) + in + F + MODULE_gwdc_post SCHEME_gwdc_post SUBROUTINE_gwdc_post_run + + + instantaneous_y_stress_due_to_gravity_wave_drag + meridional stress at cloud top due to convective gravity wave drag + Pa + taucty + real + (:) + in + F + MODULE_gwdc_post SCHEME_gwdc_post SUBROUTINE_gwdc_post_run + + + tendency_of_x_wind_due_to_convective_gravity_wave_drag + zonal wind tendency due to convective gravity wave drag + m s-2 + gwdcu + real + (:,:) + in + F + MODULE_gwdc_post SCHEME_gwdc_post SUBROUTINE_gwdc_post_run + + + tendency_of_y_wind_due_to_convective_gravity_wave_drag + meridional wind tendency due to convective gravity wave drag + m s-2 + gwdcv + real + (:,:) + in + F + MODULE_gwdc_post SCHEME_gwdc_post SUBROUTINE_gwdc_post_run + + + time_integral_of_x_stress_due_to_gravity_wave_drag + integral over time of zonal stress due to gravity wave drag + Pa s + dugwd + real + (:) + inout + F + MODULE_gwdc_post SCHEME_gwdc_post SUBROUTINE_gwdc_post_run + + + time_integral_of_y_stress_due_to_gravity_wave_drag + integral over time of meridional stress due to gravity wave drag + Pa s + dvgwd + real + (:) + inout + F + MODULE_gwdc_post SCHEME_gwdc_post SUBROUTINE_gwdc_post_run + + + cumulative_change_in_x_wind_due_to_convective_gravity_wave_drag + cumulative change in zonal wind due to convective gravity wave drag + m s-1 + du3dt + real + (:,:) + inout + F + MODULE_gwdc_post SCHEME_gwdc_post SUBROUTINE_gwdc_post_run + + + cumulative_change_in_y_wind_due_to_convective_gravity_wave_drag + cumulative change in meridional wind due to convective gravity wave drag + m s-1 + dv3dt + real + (:,:) + inout + F + MODULE_gwdc_post SCHEME_gwdc_post SUBROUTINE_gwdc_post_run + + + x_wind_updated_by_physics + updated zonal wind + m s-1 + gu0 + real + (:,:) + inout + F + MODULE_gwdc_post SCHEME_gwdc_post SUBROUTINE_gwdc_post_run + + + y_wind_updated_by_physics + updated meridional wind + m s-1 + gv0 + real + (:,:) + inout + F + MODULE_gwdc_post SCHEME_gwdc_post SUBROUTINE_gwdc_post_run + + + air_temperature_updated_by_physics + updated air temperature + K + gt0 + real + (:,:) + inout + F + MODULE_gwdc_post SCHEME_gwdc_post SUBROUTINE_gwdc_post_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_gwdc_post SCHEME_gwdc_post SUBROUTINE_gwdc_post_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_gwdc_post SCHEME_gwdc_post SUBROUTINE_gwdc_post_run + + + diff --git a/physics/gwdc_pre.xml b/physics/gwdc_pre.xml new file mode 100644 index 000000000..89d7fb9bf --- /dev/null +++ b/physics/gwdc_pre.xml @@ -0,0 +1,194 @@ + + + + + + + horizontal_loop_extent + horizontal loop extent + count + im + integer + + in + F + MODULE_gwdc_pre SCHEME_gwdc_pre SUBROUTINE_gwdc_pre_run + + + multiplication_factors_for_convective_gravity_wave_drag + multiplication factors for convective gravity wave drag + none + cgwf + real + (:) + in + F + MODULE_gwdc_pre SCHEME_gwdc_pre SUBROUTINE_gwdc_pre_run + + + cell_size + grid size in zonal direction + m + dx + real + (:) + in + F + MODULE_gwdc_pre SCHEME_gwdc_pre SUBROUTINE_gwdc_pre_run + + + grid_size_related_coefficient_used_in_scale-sensitive_schemes + grid size related coefficient used in scale-sensitive schemes + none + work1 + real + (:) + in + F + MODULE_gwdc_pre SCHEME_gwdc_pre SUBROUTINE_gwdc_pre_run + + + grid_size_related_coefficient_used_in_scale-sensitive_schemes_complement + complement to work1 + none + work2 + real + (:) + in + F + MODULE_gwdc_pre SCHEME_gwdc_pre SUBROUTINE_gwdc_pre_run + + + characteristic_grid_length_scale + representative horizontal length scale of grid box + m + dlength + real + (:) + out + F + MODULE_gwdc_pre SCHEME_gwdc_pre SUBROUTINE_gwdc_pre_run + + + cloud_area_fraction + fraction of grid box area in which updrafts occur + frac + cldf + real + (:) + out + F + MODULE_gwdc_pre SCHEME_gwdc_pre SUBROUTINE_gwdc_pre_run + + + vertical_dimension + number of vertical layers + count + levs + integer + + in + F + MODULE_gwdc_pre SCHEME_gwdc_pre SUBROUTINE_gwdc_pre_run + + + vertical_index_at_cloud_base + vertical index at cloud base + index + kbot + integer + (:) + in + F + MODULE_gwdc_pre SCHEME_gwdc_pre SUBROUTINE_gwdc_pre_run + + + vertical_index_at_cloud_top + vertical index at cloud top + index + ktop + integer + (:) + in + F + MODULE_gwdc_pre SCHEME_gwdc_pre SUBROUTINE_gwdc_pre_run + + + time_step_for_physics + physics time step + s + dtp + real + + in + F + MODULE_gwdc_pre SCHEME_gwdc_pre SUBROUTINE_gwdc_pre_run + + + air_temperature_updated_by_physics + updated air temperature + K + gt0 + real + (:,:) + in + F + MODULE_gwdc_pre SCHEME_gwdc_pre SUBROUTINE_gwdc_pre_run + + + air_temperature_save + air temperature before entering convection scheme + K + gt0_init + real + (:,:) + in + F + MODULE_gwdc_pre SCHEME_gwdc_pre SUBROUTINE_gwdc_pre_run + + + air_pressure_difference_between_midlayers + difference between mid-layer pressures + Pa + del + real + (:,:) + in + F + MODULE_gwdc_pre SCHEME_gwdc_pre SUBROUTINE_gwdc_pre_run + + + maximum_column_heating_rate + maximum heating rate in column + K s-1 + cumabs + real + (:) + out + F + MODULE_gwdc_pre SCHEME_gwdc_pre SUBROUTINE_gwdc_pre_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_gwdc_pre SCHEME_gwdc_pre SUBROUTINE_gwdc_pre_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_gwdc_pre SCHEME_gwdc_pre SUBROUTINE_gwdc_pre_run + + + diff --git a/physics/gwdps.xml b/physics/gwdps.xml new file mode 100644 index 000000000..e6098a444 --- /dev/null +++ b/physics/gwdps.xml @@ -0,0 +1,469 @@ + + + + + + horizontal_loop_extent + horizontal loop extent + count + im + integer + + in + F + MODULE_gwdps SCHEME_gwdps SUBROUTINE_gwdps_run + + + horizontal_dimension + horizontal dimension + count + ix + integer + + in + F + MODULE_gwdps SCHEME_gwdps SUBROUTINE_gwdps_run + + + vertical_dimension + number of vertical layers + count + km + integer + + in + F + MODULE_gwdps SCHEME_gwdps SUBROUTINE_gwdps_run + + + tendency_of_y_wind_due_to_model_physics + meridional wind tendency due to model physics + m s-2 + A + real + (:,:) + inout + F + MODULE_gwdps SCHEME_gwdps SUBROUTINE_gwdps_run + + + tendency_of_x_wind_due_to_model_physics + zonal wind tendency due to model physics + m s-2 + B + real + (:,:) + inout + F + MODULE_gwdps SCHEME_gwdps SUBROUTINE_gwdps_run + + + tendency_of_air_temperature_due_to_model_physics + air temperature tendency due to model physics + K s-1 + C + real + (:,:) + inout + F + MODULE_gwdps SCHEME_gwdps SUBROUTINE_gwdps_run + + + x_wind + zonal wind + m s-1 + u1 + real + (:,:) + in + F + MODULE_gwdps SCHEME_gwdps SUBROUTINE_gwdps_run + + + y_wind + meridional wind + m s-1 + v1 + real + (:,:) + in + F + MODULE_gwdps SCHEME_gwdps SUBROUTINE_gwdps_run + + + air_temperature + mid-layer temperature + K + t1 + real + (:,:) + in + F + MODULE_gwdps SCHEME_gwdps SUBROUTINE_gwdps_run + + + water_vapor_specific_humidity + mid-layer specific humidity of water vapor + kg kg-1 + q1 + real + (:,:) + in + F + MODULE_gwdps SCHEME_gwdps SUBROUTINE_gwdps_run + + + vertical_index_at_top_of_atmosphere_boundary_layer + vertical index at top atmospheric boundary layer + index + kpbl + integer + (:) + in + F + MODULE_gwdps SCHEME_gwdps SUBROUTINE_gwdps_run + + + air_pressure_at_interface + interface pressure + Pa + prsi + real + (:,:) + in + F + MODULE_gwdps SCHEME_gwdps SUBROUTINE_gwdps_run + + + air_pressure_difference_between_midlayers + difference between mid-layer pressures + Pa + del + real + (:,:) + in + F + MODULE_gwdps SCHEME_gwdps SUBROUTINE_gwdps_run + + + air_pressure + mid-layer pressure + Pa + prsl + real + (:,:) + in + F + MODULE_gwdps SCHEME_gwdps SUBROUTINE_gwdps_run + + + dimensionless_exner_function_at_model_layers + mid-layer Exner function + none + prslk + real + (:,:) + in + F + MODULE_gwdps SCHEME_gwdps SUBROUTINE_gwdps_run + + + geopotential_at_interface + interface geopotential + m2 s-2 + phii + real + (:,:) + in + F + MODULE_gwdps SCHEME_gwdps SUBROUTINE_gwdps_run + + + geopotential + mid-layer geopotential + m2 s-2 + phil + real + (:,:) + in + F + MODULE_gwdps SCHEME_gwdps SUBROUTINE_gwdps_run + + + time_step_for_physics + physics time step + s + deltim + real + + in + F + MODULE_gwdps SCHEME_gwdps SUBROUTINE_gwdps_run + + + index_of_time_step + current time step index + index + kdt + integer + + in + F + MODULE_gwdps SCHEME_gwdps SUBROUTINE_gwdps_run + + + standard_deviation_of_subgrid_orography + standard deviation of subgrid orography + m + hprime + real + (:) + in + F + MODULE_gwdps SCHEME_gwdps SUBROUTINE_gwdps_run + + + convexity_of_subgrid_orography + convexity of subgrid orography + none + oc + real + (:) + in + F + MODULE_gwdps SCHEME_gwdps SUBROUTINE_gwdps_run + + + asymmetry_of_subgrid_orography + asymmetry of subgrid orography + none + oa4 + real + (:,:) + in + F + MODULE_gwdps SCHEME_gwdps SUBROUTINE_gwdps_run + + + fraction_of_grid_box_with_subgrid_orography_higher_than_critical_height + horizontal fraction of grid box covered by subgrid orography higher than critical height + frac + clx4 + real + (:,:) + in + F + MODULE_gwdps SCHEME_gwdps SUBROUTINE_gwdps_run + + + angle_from_east_of_maximum_subgrid_orographic_variations + angle with respect to east of maximum subgrid orographic variations + degrees + theta + real + (:) + in + F + MODULE_gwdps SCHEME_gwdps SUBROUTINE_gwdps_run + + + slope_of_subgrid_orography + slope of subgrid orography + none + sigma + real + (:) + in + F + MODULE_gwdps SCHEME_gwdps SUBROUTINE_gwdps_run + + + anisotropy_of_subgrid_orography + anisotropy of subgrid orography + none + gamma + real + (:) + in + F + MODULE_gwdps SCHEME_gwdps SUBROUTINE_gwdps_run + + + maximum_subgrid_orography + maximum of subgrid orography + m + elvmax + real + (:) + inout + F + MODULE_gwdps SCHEME_gwdps SUBROUTINE_gwdps_run + + + instantaneous_x_stress_due_to_gravity_wave_drag + zonal surface stress due to orographic gravity wave drag + Pa + dusfc + real + (:) + out + F + MODULE_gwdps SCHEME_gwdps SUBROUTINE_gwdps_run + + + instantaneous_y_stress_due_to_gravity_wave_drag + meridional surface stress due to orographic gravity wave drag + Pa + dvsfc + real + (:) + out + F + MODULE_gwdps SCHEME_gwdps SUBROUTINE_gwdps_run + + + gravitational_acceleration + gravitational acceleration + m s-2 + g + real + + in + F + MODULE_gwdps SCHEME_gwdps SUBROUTINE_gwdps_run + + + specific_heat_of_dry_air_at_constant_pressure + specific heat of dry air at constant pressure + J kg-1 K-1 + cp + real + + in + F + MODULE_gwdps SCHEME_gwdps SUBROUTINE_gwdps_run + + + gas_constant_dry_air + ideal gas constant for dry air + J kg-1 K-1 + rd + real + + in + F + MODULE_gwdps SCHEME_gwdps SUBROUTINE_gwdps_run + + + gas_constant_water_vapor + ideal gas constant for water vapor + J kg-1 K-1 + rv + real + + in + F + MODULE_gwdps SCHEME_gwdps SUBROUTINE_gwdps_run + + + number_of_equatorial_longitude_points + number of longitude points along the equator + count + imx + integer + + in + F + MODULE_gwdps SCHEME_gwdps SUBROUTINE_gwdps_run + + + number_of_statistical_measures_of_subgrid_orography + number of statistical measures of subgrid orography + count + nmtvr + integer + + in + F + MODULE_gwdps SCHEME_gwdps SUBROUTINE_gwdps_run + + + multiplication_factors_for_mountain_blocking_and_orographic_gravity_wave_drag + multiplic. factors for (1) mountain blocking drag coeff. and (2) ref. level orographic gravity wave drag + none + cdmbgwd + real + (:) + in + F + MODULE_gwdps SCHEME_gwdps SUBROUTINE_gwdps_run + + + mpi_rank + rank of the current MPI task + index + me + integer + + in + F + MODULE_gwdps SCHEME_gwdps SUBROUTINE_gwdps_run + + + flag_print + flag for debugging printouts + flag + lprnt + logical + + in + F + MODULE_gwdps SCHEME_gwdps SUBROUTINE_gwdps_run + + + horizontal_index_of_printed_column + horizontal index of column used in debugging printouts + index + ipr + integer + + in + F + MODULE_gwdps SCHEME_gwdps SUBROUTINE_gwdps_run + + + level_of_dividing_streamline + level of the dividing streamline + none + rdxzb + real + (:) + out + F + MODULE_gwdps SCHEME_gwdps SUBROUTINE_gwdps_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_gwdps SCHEME_gwdps SUBROUTINE_gwdps_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_gwdps SCHEME_gwdps SUBROUTINE_gwdps_run + + + + diff --git a/physics/gwdps_post.xml b/physics/gwdps_post.xml new file mode 100644 index 000000000..2fd8a6306 --- /dev/null +++ b/physics/gwdps_post.xml @@ -0,0 +1,172 @@ + + + + + + + flag_diagnostics + flag for calculating diagnostic fields + flag + lssav + logical + + in + F + MODULE_gwdps_post SCHEME_gwdps_post SUBROUTINE_gwdps_post_run + + + flag_diagnostics_3D + flag for calculating 3-D diagnostic fields + flag + ldiag3d + logical + + in + F + MODULE_gwdps_post SCHEME_gwdps_post SUBROUTINE_gwdps_post_run + + + time_step_for_dynamics + dynamics time step + s + dtf + real + + in + F + MODULE_gwdps_post SCHEME_gwdps_post SUBROUTINE_gwdps_post_run + + + instantaneous_x_stress_due_to_gravity_wave_drag + zonal surface stress due to orographic gravity wave drag + Pa + dusfcg + real + (:) + in + F + MODULE_gwdps_post SCHEME_gwdps_post SUBROUTINE_gwdps_post_run + + + instantaneous_y_stress_due_to_gravity_wave_drag + meridional surface stress due to orographic gravity wave drag + Pa + dvsfcg + real + (:) + in + F + MODULE_gwdps_post SCHEME_gwdps_post SUBROUTINE_gwdps_post_run + + + tendency_of_x_wind_due_to_model_physics + zonal wind tendency due to model physics + m s-2 + dudt + real + (:,:) + in + F + MODULE_gwdps_post SCHEME_gwdps_post SUBROUTINE_gwdps_post_run + + + tendency_of_y_wind_due_to_model_physics + meridional wind tendency due to model physics + m s-2 + dvdt + real + (:,:) + in + F + MODULE_gwdps_post SCHEME_gwdps_post SUBROUTINE_gwdps_post_run + + + tendency_of_air_temperature_due_to_model_physics + air temperature tendency due to model physics + K s-1 + dtdt + real + (:,:) + in + F + MODULE_gwdps_post SCHEME_gwdps_post SUBROUTINE_gwdps_post_run + + + time_integral_of_x_stress_due_to_gravity_wave_drag + integral over time of zonal stress due to gravity wave drag + Pa s + dugwd + real + (:) + inout + F + MODULE_gwdps_post SCHEME_gwdps_post SUBROUTINE_gwdps_post_run + + + time_integral_of_y_stress_due_to_gravity_wave_drag + integral over time of meridional stress due to gravity wave drag + Pa s + dvgwd + real + (:) + inout + F + MODULE_gwdps_post SCHEME_gwdps_post SUBROUTINE_gwdps_post_run + + + cumulative_change_in_x_wind_due_to_orographic_gravity_wave_drag + cumulative change in zonal wind due to orographic gravity wave drag + m s-1 + du3dt + real + (:,:) + inout + F + MODULE_gwdps_post SCHEME_gwdps_post SUBROUTINE_gwdps_post_run + + + cumulative_change_in_y_wind_due_to_orographic_gravity_wave_drag + cumulative change in meridional wind due to orographic gravity wave drag + m s-1 + dv3dt + real + (:,:) + inout + F + MODULE_gwdps_post SCHEME_gwdps_post SUBROUTINE_gwdps_post_run + + + cumulative_change_in_temperature_due_to_shortwave_radiation_and_orographic_gravity_wave_drag + cumulative change in temperature due to SW rad and oro. GWD + K + dt3dt + real + (:,:) + inout + F + MODULE_gwdps_post SCHEME_gwdps_post SUBROUTINE_gwdps_post_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_gwdps_post SCHEME_gwdps_post SUBROUTINE_gwdps_post_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_gwdps_post SCHEME_gwdps_post SUBROUTINE_gwdps_post_run + + + diff --git a/physics/gwdps_pre.xml b/physics/gwdps_pre.xml new file mode 100644 index 000000000..52acc6362 --- /dev/null +++ b/physics/gwdps_pre.xml @@ -0,0 +1,150 @@ + + + + + horizontal_loop_extent + horizontal dimension + count + im + integer + + in + F + MODULE_gwdps_pre SCHEME_gwdps_pre SUBROUTINE_gwdps_pre_run + + + number_of_statistical_measures_of_subgrid_orography + number of statistical measures of subgrid orography + count + nmtvr + integer + + in + F + MODULE_gwdps_pre SCHEME_gwdps_pre SUBROUTINE_gwdps_pre_run + + + statistical_measures_of_subgrid_orography + array of statistical measures of subgrid orography + various + mntvar + real + (:,:) + in + F + MODULE_gwdps_pre SCHEME_gwdps_pre SUBROUTINE_gwdps_pre_run + + + standard_deviation_of_subgrid_orography + standard deviation of subgrid orography + m + hprime + real + (:) + out + F + MODULE_gwdps_pre SCHEME_gwdps_pre SUBROUTINE_gwdps_pre_run + + + convexity_of_subgrid_orography + convexity of subgrid orography + none + oc + real + (:) + out + F + MODULE_gwdps_pre SCHEME_gwdps_pre SUBROUTINE_gwdps_pre_run + + + asymmetry_of_subgrid_orography + asymmetry of subgrid orography + none + oa4 + real + (:,:) + out + F + MODULE_gwdps_pre SCHEME_gwdps_pre SUBROUTINE_gwdps_pre_run + + + fraction_of_grid_box_with_subgrid_orography_higher_than_critical_height + horizontal fraction of grid box covered by subgrid orography higher than critical height + frac + clx + real + (:,:) + out + F + MODULE_gwdps_pre SCHEME_gwdps_pre SUBROUTINE_gwdps_pre_run + + + angle_from_east_of_maximum_subgrid_orographic_variations + angle with_respect to east of maximum subgrid orographic variations + degrees + theta + real + (:) + out + F + MODULE_gwdps_pre SCHEME_gwdps_pre SUBROUTINE_gwdps_pre_run + + + slope_of_subgrid_orography + slope of subgrid orography + none + sigma + real + (:) + out + F + MODULE_gwdps_pre SCHEME_gwdps_pre SUBROUTINE_gwdps_pre_run + + + anisotropy_of_subgrid_orography + anisotropy of subgrid orography + none + gamma + real + (:) + out + F + MODULE_gwdps_pre SCHEME_gwdps_pre SUBROUTINE_gwdps_pre_run + + + maximum_subgrid_orography + maximum of subgrid orography + m + elvmax + real + (:) + out + F + MODULE_gwdps_pre SCHEME_gwdps_pre SUBROUTINE_gwdps_pre_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_gwdps_pre SCHEME_gwdps_pre SUBROUTINE_gwdps_pre_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_gwdps_pre SCHEME_gwdps_pre SUBROUTINE_gwdps_pre_run + + + + + diff --git a/physics/h2ophys.xml b/physics/h2ophys.xml new file mode 100644 index 000000000..4af3f8c5e --- /dev/null +++ b/physics/h2ophys.xml @@ -0,0 +1,161 @@ + + + + + + horizontal_dimension + horizontal dimension + count + ix + integer + + in + F + MODULE_h2ophys SCHEME_h2ophys SUBROUTINE_h2ophys_run + + + horizontal_loop_extent + horizontal loop extent + count + im + integer + + in + F + MODULE_h2ophys SCHEME_h2ophys SUBROUTINE_h2ophys_run + + + vertical_dimension + number of vertical layers + count + levs + integer + + in + F + MODULE_h2ophys SCHEME_h2ophys SUBROUTINE_h2ophys_run + + + vertical_dimension_of_h2o_forcing_data + number of vertical layers in h2o forcing data + count + kh2o + integer + + in + F + MODULE_h2ophys SCHEME_h2ophys SUBROUTINE_h2ophys_run + + + time_step_for_physics + physics time step + s + dt + real + + in + F + MODULE_h2ophys SCHEME_h2ophys SUBROUTINE_h2ophys_run + + + water_vapor_specific_humidity_updated_by_physics + water vapor specific humidity updated by physics + kg kg-1 + h2o + real + (:,:) + inout + F + MODULE_h2ophys SCHEME_h2ophys SUBROUTINE_h2ophys_run + + + natural_log_of_h2o_forcing_data_pressure_levels + natural log of h2o forcing data pressure levels + log(Pa) + ph2o + real + (:) + in + F + MODULE_h2ophys SCHEME_h2ophys SUBROUTINE_h2ophys_run + + + air_pressure + mid-layer pressure + Pa + prsl + real + (:,:) + in + F + MODULE_h2ophys SCHEME_h2ophys SUBROUTINE_h2ophys_run + + + h2o_forcing + water forcing data + various + h2opltc + real + (:,:,:) + in + F + MODULE_h2ophys SCHEME_h2ophys SUBROUTINE_h2ophys_run + + + number_of_coefficients_in_h2o_forcing_data + number of coefficients in h2o forcing data + index + h2o_coeff + integer + + in + F + MODULE_h2ophys SCHEME_h2ophys SUBROUTINE_h2ophys_run + + + flag_diagnostics_3D + flag for calculating 3-D diagnostic fields + flag + ldiag3d + logical + + in + F + MODULE_h2ophys SCHEME_h2ophys SUBROUTINE_h2ophys_run + + + mpi_rank + rank of the current MPI task + index + me + integer + + in + F + MODULE_h2ophys SCHEME_h2ophys SUBROUTINE_h2ophys_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_h2ophys SCHEME_h2ophys SUBROUTINE_h2ophys_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_h2ophys SCHEME_h2ophys SUBROUTINE_h2ophys_run + + + + diff --git a/physics/hedmf.xml b/physics/hedmf.xml new file mode 100644 index 000000000..ac2452c1f --- /dev/null +++ b/physics/hedmf.xml @@ -0,0 +1,612 @@ + + + + + horizontal_dimension + horizontal dimension + count + ix + integer + + in + F + MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run + + + horizontal_loop_extent + horizontal loop extent + count + im + integer + + in + F + MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run + + + vertical_dimension + vertical layer dimension + count + km + integer + + in + F + MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run + + + number_of_vertical_diffusion_tracers + number of tracers to diffuse vertically + count + ntrac + integer + + in + F + MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run + + + index_for_liquid_cloud_condensate + cloud condensate index in tracer array + index + ntcw + integer + + in + F + MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run + + + tendency_of_y_wind_due_to_model_physics + updated tendency of the y wind + m s-2 + dv + real + (:,:) + inout + F + MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run + + + tendency_of_x_wind_due_to_model_physics + updated tendency of the x wind + m s-2 + du + real + (:,:) + inout + F + MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run + + + tendency_of_air_temperature_due_to_model_physics + updated tendency of the temperature + K s-1 + tau + real + (:,:) + inout + F + MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run + + + tendency_of_vertically_diffused_tracer_concentration + updated tendency of the tracers due to vertical diffusion in PBL scheme + kg kg-1 s-1 + rtg + real + (:,:,:) + inout + F + MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run + + + x_wind + x component of layer wind + m s-1 + u1 + real + (:,:) + in + F + MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run + + + y_wind + y component of layer wind + m s-1 + v1 + real + (:,:) + in + F + MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run + + + air_temperature + layer mean air temperature + K + t1 + real + (:,:) + in + F + MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run + + + vertically_diffused_tracer_concentration + tracer concentration diffused by PBL scheme + kg kg-1 + q1 + real + (:,:,:) + in + F + MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run + + + tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step + total sky shortwave heating rate + K s-1 + swh + real + (:,:) + in + F + MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run + + + tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_step + total sky longwave heating rate + K s-1 + hlw + real + (:,:) + in + F + MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run + + + zenith_angle_temporal_adjustment_factor_for_shortwave_fluxes + zenith angle temporal adjustment factor for shortwave + none + xmu + real + (:) + in + F + MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run + + + dimensionless_exner_function_at_lowest_model_interface + dimensionless Exner function at the surface interface + none + psk + real + (:) + in + F + MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run + + + bulk_richardson_number_at_lowest_model_level + bulk Richardson number at the surface + none + rbsoil + real + (:) + in + F + MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run + + + surface_roughness_length + surface roughness length in cm + cm + zorl + real + (:) + in + F + MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run + + + x_wind_at_10m + x component of wind at 10 m + m s-1 + u10m + real + (:) + in + F + MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run + + + y_wind_at_10m + y component of wind at 10 m + m s-1 + v10m + real + (:) + in + F + MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run + + + Monin-Obukhov_similarity_function_for_momentum + Monin-Obukhov similarity function for momentum + none + fm + real + (:) + in + F + MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run + + + Monin-Obukhov_similarity_function_for_heat + Monin-Obukhov similarity function for heat + none + fh + real + (:) + in + F + MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run + + + surface_skin_temperature + surface skin temperature + K + tsea + real + (:) + in + F + MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run + + + kinematic_surface_upward_sensible_heat_flux + kinematic surface upward sensible heat flux + K m s-1 + heat + real + (:) + in + F + MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run + + + kinematic_surface_upward_latent_heat_flux + kinematic surface upward latent heat flux + kg kg-1 m s-1 + evap + real + (:) + in + F + MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run + + + surface_wind_stress + surface wind stress + m2 s-2 + stress + real + (:) + in + F + MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run + + + wind_speed_at_lowest_model_layer + wind speed at lowest model level + m s-1 + spd1 + real + (:) + in + F + MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run + + + vertical_index_at_top_of_atmosphere_boundary_layer + PBL top model level index + index + kpbl + integer + (:) + out + F + MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run + + + air_pressure_at_interface + air pressure at model layer interfaces + Pa + prsi + real + (:,:) + in + F + MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run + + + air_pressure_difference_between_midlayers + pres(k) - pres(k+1) + Pa + del + real + (:,:) + in + F + MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run + + + air_pressure + mean layer pressure + Pa + prsl + real + (:,:) + in + F + MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run + + + dimensionless_exner_function_at_model_layers + Exner function at layers + none + prslk + real + (:,:) + in + F + MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run + + + geopotential_at_interface + geopotential at model layer interfaces + m2 s-2 + phii + real + (:,:) + in + F + MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run + + + geopotential + geopotential at model layer centers + m2 s-2 + phil + real + (:,:) + in + F + MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run + + + time_step_for_physics + time step for physics + s + delt + real + + in + F + MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run + + + flag_TKE_dissipation_heating + flag for using TKE dissipation heating + flag + dspheat + logical + + in + F + MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run + + + instantaneous_surface_x_momentum_flux + x momentum flux + Pa + dusfc + real + (:) + out + F + MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run + + + instantaneous_surface_y_momentum_flux + y momentum flux + Pa + dvsfc + real + (:) + out + F + MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run + + + instantaneous_surface_upward_sensible_heat_flux + surface upward sensible heat flux + W m-2 + dtsfc + real + (:) + out + F + MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run + + + instantaneous_surface_upward_latent_heat_flux + surface upward latent heat flux + W m-2 + dqsfc + real + (:) + out + F + MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run + + + atmosphere_boundary_layer_thickness + PBL thickness + m + hpbl + real + (:) + out + F + MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run + + + countergradient_mixing_term_for_temperature + countergradient mixing term for temperature + K + hgamt + real + (:) + inout + F + MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run + + + countergradient_mixing_term_for_water_vapor + countergradient mixing term for water vapor + kg kg-1 + hgamq + real + (:) + inout + F + MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run + + + atmosphere_heat_diffusivity + diffusivity for heat + m2 s-1 + dkt + real + (:,:) + out + F + MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run + + + index_of_highest_temperature_inversion + index of highest temperature inversion + index + kinver + integer + (:) + in + F + MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run + + + atmosphere_momentum_diffusivity_background + background value of momentum diffusivity + m2 s-1 + xkzm_m + real + + in + F + MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run + + + atmosphere_heat_diffusivity_background + background value of heat diffusivity + m2 s-1 + xkzm_h + real + + in + F + MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run + + + diffusivity_background_sigma_level + sigma level threshold for background diffusivity + none + xkzm_s + real + + in + F + MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run + + + flag_print + flag for printing diagnostics to output + flag + lprnt + logical + + in + F + MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run + + + horizontal_index_of_printed_column + horizontal index of printed column + index + ipr + integer + + in + F + MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run + + + atmosphere_heat_diffusivity_background_maximum + maximum background value of heat diffusivity + m2 s-1 + xkzminv + real + + in + F + MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run + + + atmosphere_diffusivity_coefficient_factor + multiplicative constant for atmospheric diffusivities + none + moninq_fac + real + + in + F + MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run + + + + + diff --git a/physics/lsm_noah.xml b/physics/lsm_noah.xml new file mode 100644 index 000000000..70879f1ce --- /dev/null +++ b/physics/lsm_noah.xml @@ -0,0 +1,856 @@ + + + + + horizontal_loop_extent + horizontal loop extent + count + im + integer + + in + F + MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run + + + soil_vertical_dimension + soil vertical layer dimension + count + km + integer + + in + F + MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run + + + surface_air_pressure + surface pressure + Pa + ps + real + (:) + in + F + MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run + + + x_wind_at_lowest_model_layer + x component of 1st model layer wind + m s-1 + u1 + real + (:) + in + F + MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run + + + y_wind_at_lowest_model_layer + y component of 1st model layer wind + m s-1 + v1 + real + (:) + in + F + MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run + + + air_temperature_at_lowest_model_layer + 1st model layer air temperature + K + t1 + real + (:) + in + F + MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run + + + water_vapor_specific_humidity_at_lowest_model_layer + 1st model layer specific humidity + kg kg-1 + q1 + real + (:) + in + F + MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run + + + soil_type_classification + soil type at each grid cell + index + soiltyp + integer + (:) + in + F + MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run + + + vegetation_type_classification + vegetation type at each grid cell + index + vegtype + integer + (:) + in + F + MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run + + + bounded_vegetation_area_fraction + areal fractional cover of green vegetation bounded on the bottom + frac + sigmaf + real + (:) + in + F + MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run + + + surface_longwave_emissivity + surface longwave emissivity + frac + sfcemis + real + (:) + in + F + MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run + + + surface_downwelling_longwave_flux_absorbed_by_ground + total sky surface downward longwave flux absorbed by the ground + W m-2 + dlwflx + real + (:) + in + F + MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run + + + surface_downwelling_shortwave_flux + total sky surface downward shortwave flux + W m-2 + dswsfc + real + (:) + in + F + MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run + + + surface_net_downwelling_shortwave_flux + total sky surface net shortwave flux + W m-2 + snet + real + (:) + in + F + MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run + + + time_step_for_dynamics + dynamics time step + s + delt + real + + in + F + MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run + + + deep_soil_temperature + bottom soil temperature + K + tg3 + real + (:) + in + F + MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run + + + surface_drag_coefficient_for_momentum_in_air + surface exchange coeff for momentum + none + cm + real + (:) + in + F + MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run + + + surface_drag_coefficient_for_heat_and_moisture_in_air + surface exchange coeff heat moisture + none + ch + real + (:) + in + F + MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run + + + air_pressure_at_lowest_model_layer + Model layer 1 mean pressure + Pa + prsl1 + real + (:) + in + F + MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run + + + ratio_of_exner_function_between_midlayer_and_interface_at_lowest_model_layer + Exner function ratio bt midlayer and interface at 1st layer + ratio + prslki + real + (:) + in + F + MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run + + + height_above_ground_at_lowest_model_layer + height above ground at 1st model layer + m + zf + real + (:) + in + F + MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run + + + sea_land_ice_mask + landmask: sea/land/ice=0/1/2 + flag + islimsk + integer + (:) + in + F + MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run + + + surface_wind_enhancement_due_to_convection + surface wind enhancement due to convection + m s-1 + ddvel + real + (:) + in + F + MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run + + + surface_slope_classification + surface slope type at each grid cell + index + slopetyp + integer + (:) + in + F + MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run + + + minimum_vegetation_area_fraction + min fractional coverage of green veg + frac + shdmin + real + (:) + in + F + MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run + + + maximum_vegetation_area_fraction + max fractnl cover of green veg (not used) + frac + shdmax + real + (:) + in + F + MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run + + + upper_bound_on_max_albedo_over_deep_snow + upper bound on max albedo over deep snow + frac + snoalb + real + (:) + in + F + MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run + + + surface_diffused_shortwave_albedo + mean surface diffused shortwave albedo + frac + sfalb + real + (:) + in + F + MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run + + + flag_for_iteration + flag for iteration + flag + flag_iter + logical + (:) + in + F + MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run + + + flag_for_guess_run + flag for guess run + flag + flag_guess + logical + (:) + in + F + MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run + + + soil_type_dataset_choice + soil type dataset choice + index + isot + integer + + in + F + MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run + + + vegetation_type_dataset_choice + land use dataset choice + index + ivegsrc + integer + + in + F + MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run + + + perturbation_of_soil_type_b_parameter + perturbation of soil type "b" parameter + frac + bexppert + real + (:) + in + F + MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run + + + perturbation_of_leaf_area_index + perturbation of leaf area index + frac + xlaipert + real + (:) + in + F + MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run + + + perturbation_of_vegetation_fraction + perturbation of vegetation fraction + frac + vegfpert + real + (:) + in + F + MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run + + + magnitude_of_perturbation_of_vegetation_fraction + magnitude of perturbation of vegetation fraction + frac + pertvegf + real + (:) + in + F + MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run + + + water_equivalent_accumulated_snow_depth + water equivalent accumulated snow depth + mm + weasd + real + (:) + inout + F + MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run + + + surface_snow_thickness_water_equivalent + water equivalent snow depth over land + mm + snwdph + real + (:) + inout + F + MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run + + + surface_skin_temperature + surface skin temperature + K + tskin + real + (:) + inout + F + MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run + + + nonnegative_lwe_thickness_of_precipitation_amount_on_dynamics_timestep + nonnegative precipitation amount in one dynamics time step + m + tprcp + real + (:) + inout + F + MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run + + + flag_for_precipitation_type + flag for snow or rain precipitation + flag + srflag + real + (:) + inout + F + MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run + + + volume_fraction_of_soil_moisture + volumetric fraction of soil moisture + frac + smc + real + (:,:) + inout + F + MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run + + + soil_temperature + soil temperature + K + stc + real + (:,:) + inout + F + MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run + + + volume_fraction_of_unfrozen_soil_moisture + volume fraction of unfrozen soil moisture + frac + slc + real + (:,:) + inout + F + MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run + + + canopy_water_amount + canopy moisture content + kg m-2 + canopy + real + (:) + inout + F + MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run + + + transpiration_flux + total plant transpiration rate + kg m-2 s-1 + trans + real + (:) + inout + F + MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run + + + surface_skin_temperature_after_iteration + surface skin temperature after iteration + K + tsurf + real + (:) + inout + F + MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run + + + surface_roughness_length + surface roughness length + cm + zorl + real + (:) + inout + F + MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run + + + surface_snow_area_fraction_for_diagnostics + surface snow area fraction + frac + sncovr1 + real + (:) + inout + F + MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run + + + surface_specific_humidity + surface specific humidity + kg kg-1 + qsurf + real + (:) + inout + F + MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run + + + upward_heat_flux_in_soil + upward soil heat flux + W m-2 + gflux + real + (:) + inout + F + MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run + + + subsurface_runoff_flux + subsurface runoff flux + g m-2 s-1 + drain + real + (:) + inout + F + MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run + + + kinematic_surface_upward_latent_heat_flux + surface upward evaporation flux + kg kg-1 m s-1 + evap + real + (:) + inout + F + MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run + + + kinematic_surface_upward_sensible_heat_flux + surface upward sensible heat flux + K m s-1 + hflx + real + (:) + inout + F + MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run + + + surface_upward_potential_latent_heat_flux + surface upward potential latent heat flux + W m-2 + ep + real + (:) + inout + F + MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run + + + surface_runoff_flux + surface runoff flux + g m-2 s-1 + runoff + real + (:) + inout + F + MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run + + + surface_drag_wind_speed_for_momentum_in_air + surf mom exch coef time mean surf wind + m s-1 + cmm + real + (:) + inout + F + MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run + + + surface_drag_mass_flux_for_heat_and_moisture_in_air + surf h m exch coef time surf wind density + kg m-2 s-1 + chh + real + (:) + inout + F + MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run + + + soil_upward_latent_heat_flux + soil upward latent heat flux + W m-2 + evbs + real + (:) + inout + F + MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run + + + canopy_upward_latent_heat_flux + canopy upward latent heat flux + W m-2 + evcw + real + (:) + inout + F + MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run + + + snow_deposition_sublimation_upward_latent_heat_flux + latent heat flux from snow depo/subl + W m-2 + sbsno + real + (:) + inout + F + MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run + + + surface_snow_area_fraction + surface snow area fraction + frac + snowc + real + (:) + inout + F + MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run + + + soil_moisture_content + soil moisture content + kg m-2 + stm + real + (:) + inout + F + MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run + + + snow_freezing_rain_upward_latent_heat_flux + latent heat flux due to snow and frz rain + W m-2 + snohf + real + (:) + inout + F + MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run + + + volume_fraction_of_condensed_water_in_soil_at_wilting_point + soil water fraction at wilting point + frac + smcwlt2 + real + (:) + inout + F + MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run + + + threshold_volume_fraction_of_condensed_water_in_soil + soil moisture threshold + frac + smcref2 + real + (:) + inout + F + MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run + + + normalized_soil_wetness + normalized soil wetness + frac + wet1 + real + (:) + inout + F + MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run + + + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_finalize + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_finalize + + + + + mpi_rank + current MPI-rank + index + me + integer + + in + F + MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_init + + + soil_type_dataset_choice + soil type dataset choice + index + isot + integer + + in + F + MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_init + + + vegetation_type_dataset_choice + land use dataset choice + index + ivegsrc + integer + + in + F + MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_init + + + iounit_namelist + fortran unit number for file opens + none + nlunit + integer + + in + F + MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_init + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_init + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_init + + + diff --git a/physics/lsm_ruc.xml b/physics/lsm_ruc.xml new file mode 100644 index 000000000..d5631ba21 --- /dev/null +++ b/physics/lsm_ruc.xml @@ -0,0 +1,1230 @@ + + + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_finalize + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_finalize + + + + + time_step_for_dynamics + physics time step + s + delt + real + + in + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + mpi_rank + current MPI-rank + index + me + integer + + in + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + index_of_time_step + current number of time steps + index + kdt + integer + + in + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + ccpp_loop_counter + loop counter for subcycling loops in CCPP + index + iter + integer + + in + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + horizontal_loop_extent + horizontal loop extent + count + im + integer + + in + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + vertical_dimension + number of vertical levels + count + nlev + integer + + in + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + flag_for_ruc_land_surface_scheme + flag for RUC land surface model + flag + lsm_ruc + integer + + in + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + flag_for_land_surface_scheme + flag for land surface model + flag + lsm + integer + + in + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + do_mynnsfclay + flag to activate MYNN surface layer + flag + do_mynnsfclay + logical + + in + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + soil_vertical_dimension_for_land_surface_model + number of soil layers internal to land surface model + count + lsoil_ruc + integer + + in + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + soil_vertical_dimension + soil vertical layer dimension + count + lsoil + integer + + in + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + depth_of_soil_levels_for_land_surface_model + depth of soil levels for land surface model + m + zs + real + (:) + inout + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + sea_land_ice_mask + landmask: sea/land/ice=0/1/2 + flag + islmsk + integer + (:) + in + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + specific_heat_of_dry_air_at_constant_pressure + specific heat !of dry air at constant pressure + J kg-1 K-1 + con_cp + real + + in + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + gravitational_acceleration + gravitational acceleration + m s-2 + con_g + real + + in + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + pi + ratio of a circle's circumference to its diameter + radians + con_pi + real + + in + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + gas_constant_dry_air + ideal gas constant for dry air + J kg-1 K-1 + con_rd + real + + in + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + gas_constant_water_vapor + ideal gas constant for water vapor + J kg-1 K-1 + con_rv + real + + in + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + latent_heat_of_vaporization_of_water_at_0C + latent heat of vaporization/sublimation (hvap) + J kg-1 + con_hvap + real + + in + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + ratio_of_vapor_to_dry_air_gas_constants_minus_one + rv/rd - 1 (rv = ideal gas constant for water vapor) + none + con_fvirt + real + + in + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + lwe_thickness_of_explicit_rainfall_amount_from_previous_timestep + explicit rainfall from previous timestep + m + rainnc + real + (:) + in + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + lwe_thickness_of_convective_precipitation_amount_from_previous_timestep + convective_precipitation_amount from previous timestep + m + rainc + real + (:) + in + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + lwe_thickness_of_ice_amount_from_previous_timestep + ice amount from previous timestep + m + ice + real + (:) + in + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + lwe_thickness_of_snow_amount_from_previous_timestep + snow amount from previous timestep + m + snow + real + (:) + in + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + lwe_thickness_of_graupel_amount_from_previous_timestep + graupel amount from previous timestep + m + graupel + real + (:) + in + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + flag_for_precipitation_type + snow/rain flag for precipitation + flag + srflag + real + (:) + in + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + surface_snow_area_fraction_for_diagnostics + surface snow area fraction + frac + sncovr1 + real + (:) + inout + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + surface_snow_area_fraction + surface snow area fraction + frac + snowc + real + (:) + inout + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + water_equivalent_accumulated_snow_depth + water equiv of acc snow depth over land and sea ice + mm + weasd + real + (:) + inout + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + surface_snow_thickness_water_equivalent + water equivalent snow depth over land + mm + snwdph + real + (:) + inout + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + ratio_of_snowfall_to_rainfall + snow ratio: ratio of snow to total precipitation + frac + sr + real + (:) + in + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + density_of_frozen_precipitation + density of frozen precipitation + kg m-3 + rhosnf + real + (:) + out + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + height_above_ground_at_lowest_model_layer + layer 1 height above ground (not MSL) + m + zf + real + (:) + in + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + x_wind_at_lowest_model_layer + zonal wind at lowest model layer + m s-1 + u1 + real + (:) + in + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + y_wind_at_lowest_model_layer + meridional wind at lowest model layer + m s-1 + v1 + real + (:) + in + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + air_pressure_at_lowest_model_layer + mean pressure at lowest model layer + Pa + prsl1 + real + (:) + in + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + surface_wind_enhancement_due_to_convection + surface wind enhancement due to convection + m s-1 + ddvel + real + (:) + in + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + air_temperature_at_lowest_model_layer + mean temperature at lowest model layer + K + t1 + real + (:) + in + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + water_vapor_specific_humidity_at_lowest_model_layer + water vapor specific humidity at lowest model layer + kg kg-1 + q1 + real + (:) + in + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + cloud_condensed_water_mixing_ratio_at_lowest_model_layer + moist (dry+vapor, no condensates) mixing ratio of cloud water at lowest model layer + kg kg-1 + qc + real + (:) + in + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + surface_downwelling_longwave_flux + surface downwelling longwave flux at current time + W m-2 + dlwflx + real + (:) + in + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + surface_downwelling_shortwave_flux + surface downwelling shortwave flux at current time + W m-2 + dswsfc + real + (:) + in + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + surface_net_downwelling_shortwave_flux + surface net downwelling shortwave flux at current time + W m-2 + snet + real + (:) + in + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + surface_longwave_emissivity + surface lw emissivity in fraction + frac + sfcemis + real + (:) + inout + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + wind_speed_at_lowest_model_layer + wind speed at lowest model level + m s-1 + wspd + real + (:) + inout + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + surface_drag_coefficient_for_momentum_in_air + surface exchange coeff for momentum + none + cm + real + (:) + in + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + surface_drag_coefficient_for_heat_and_moisture_in_air + surface exchange coeff heat moisture + none + ch + real + (:) + in + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + surface_drag_mass_flux_for_heat_and_moisture_in_air + surf h m exch coef time surf wind density + kg m-2 s-1 + chh + real + (:) + inout + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + surface_drag_wind_speed_for_momentum_in_air + surf mom exch coef time mean surf wind + m s-1 + cmm + real + (:) + inout + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + normalized_soil_wetness + normalized soil wetness + frac + wet1 + real + (:) + inout + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + canopy_water_amount + canopy water amount + kg m-2 + canopy + real + (:) + inout + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + vegetation_area_fraction + areal fractional cover of green vegetation + frac + sigmaf + real + (:) + in + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + surface_diffused_shortwave_albedo + mean surface diffused sw albedo + frac + sfalb + real + (:) + inout + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + mean_vis_albedo_with_weak_cosz_dependency + mean vis albedo with weak cosz dependency + frac + alvwf + real + (:) + in + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + mean_nir_albedo_with_weak_cosz_dependency + mean nir albedo with weak cosz dependency + frac + alnwf + real + (:) + in + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + upper_bound_on_max_albedo_over_deep_snow + maximum snow albedo + frac + snoalb + real + (:) + in + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + surface_roughness_length + surface roughness length + cm + zorl + real + (:) + inout + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + surface_specific_humidity + surface air saturation specific humidity + kg kg-1 + qsurf + real + (:) + inout + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + cloud_condensed_water_mixing_ratio_at_surface + moist cloud water mixing ratio at surface + kg kg-1 + sfcqc + real + (:) + inout + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + water_vapor_mixing_ratio_at_surface + water vapor mixing ratio at surface + kg kg-1 + sfcqv + real + (:) + inout + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + surface_condensation_mass + surface condensation mass + kg m-2 + sfcdew + real + (:) + inout + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + deep_soil_temperature + deep soil temperature + K + tg3 + real + (:) + in + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + volume_fraction_of_soil_moisture + total soil moisture + frac + smc + real + (:,:) + inout + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + volume_fraction_of_unfrozen_soil_moisture + liquid soil moisture + frac + slc + real + (:,:) + inout + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + soil_temperature + soil temperature + K + stc + real + (:,:) + inout + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + volume_fraction_of_condensed_water_in_soil_at_wilting_point + soil water fraction at wilting point + frac + smcwlt2 + real + (:) + inout + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + threshold_volume_fraction_of_condensed_water_in_soil + soil moisture threshold + frac + smcref2 + real + (:) + inout + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + vegetation_type_classification + vegetation type at each grid cell + index + vegtype + integer + (:) + in + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + soil_type_classification + soil type at each grid cell + index + soiltyp + integer + (:) + in + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + soil_type_dataset_choice + soil type dataset choice + index + isot + integer + + in + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + vegetation_type_dataset_choice + land use dataset choice + index + ivegsrc + integer + + in + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + sea_ice_concentration + ice fraction over open water + frac + fice + real + (:) + in + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + flag_for_frozen_soil_physics + flag for frozen soil physics (RUC) + flag + keepfr + real + (:,:) + inout + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + volume_fraction_of_soil_moisture_for_land_surface_model + volumetric fraction of soil moisture for lsm + frac + smois + real + (:,:) + inout + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + volume_fraction_of_unfrozen_soil_moisture_for_land_surface_model + volume fraction of unfrozen soil moisture for lsm + frac + sh2o + real + (:,:) + inout + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + volume_fraction_of_frozen_soil_moisture_for_land_surface_model + volume fraction of frozen soil moisture for lsm + frac + smfrkeep + real + (:,:) + inout + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + soil_temperature_for_land_surface_model + soil temperature for land surface model + K + tslb + real + (:,:) + inout + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + soil_moisture_content + soil moisture content + kg m-2 + stm + real + (:) + inout + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + surface_skin_temperature + surface skin temperature + K + tskin + real + (:) + inout + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + surface_skin_temperature_after_iteration + surface skin temperature after iteration + K + tsurf + real + (:) + inout + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + sea_ice_temperature + sea ice surface skin temperature + K + tice + real + (:) + inout + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + snow_temperature_bottom_first_layer + snow temperature at the bottom of first snow layer + K + tsnow + real + (:) + inout + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + total_accumulated_snowfall + run-total snow accumulation on the ground + kg m-2 + snowfallac + real + (:) + inout + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + accumulated_water_equivalent_of_frozen_precip + snow water equivalent of run-total frozen precip + kg m-2 + acsnow + real + (:) + inout + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + kinematic_surface_upward_latent_heat_flux + kinematic surface upward evaporation flux + kg kg-1 m s-1 + evap + real + (:) + out + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + kinematic_surface_upward_sensible_heat_flux + kinematic surface upward sensible heat flux + K m s-1 + hflx + real + (:) + out + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + soil_upward_latent_heat_flux + soil upward latent heat flux + W m-2 + evbs + real + (:) + out + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + canopy_upward_latent_heat_flux + canopy upward latent heat flux + W m-2 + evcw + real + (:) + out + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + snow_deposition_sublimation_upward_latent_heat_flux + latent heat flux from snow depo/subl + W m-2 + sbsno + real + (:) + out + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + transpiration_flux + total plant transpiration rate + kg m-2 s-1 + trans + real + (:) + out + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + surface_runoff_flux + surface runoff flux + g m-2 s-1 + runof + real + (:) + out + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + subsurface_runoff_flux + subsurface runoff flux + g m-2 s-1 + drain + real + (:) + out + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + total_runoff + total water runoff + kg m-2 + runoff + real + (:) + inout + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + surface_runoff + surface water runoff (from lsm) + kg m-2 + srunoff + real + (:) + inout + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + upward_heat_flux_in_soil + soil heat flux + W m-2 + gflux + real + (:) + out + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + minimum_vegetation_area_fraction + min fractional coverage of green vegetation + frac + shdmin + real + (:) + in + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + maximum_vegetation_area_fraction + max fractional coverage of green vegetation + frac + shdmax + real + (:) + in + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + flag_for_iteration + flag for iteration + flag + flag_iter + logical + (:) + in + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + flag_for_guess_run + flag for guess run + flag + flag_guess + logical + (:) + in + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + flag_for_first_time_step + flag signaling first time step for time integration loop + flag + flag_init + logical + + in + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + flag_for_restart + flag for restart (warmstart) or coldstart + flag + flag_restart + logical + + in + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run + + + + + mpi_rank + current MPI-rank + index + me + integer + + in + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_init + + + soil_type_dataset_choice + soil type dataset choice + index + isot + integer + + in + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_init + + + vegetation_type_dataset_choice + land use dataset choice + index + ivegsrc + integer + + in + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_init + + + iounit_namelist + fortran unit number for file opens + none + nlunit + integer + + in + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_init + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_init + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_init + + + diff --git a/physics/m_micro.xml b/physics/m_micro.xml new file mode 100644 index 000000000..b86b66b84 --- /dev/null +++ b/physics/m_micro.xml @@ -0,0 +1,1152 @@ + + + + + horizontal_loop_extent + horizontal loop extent + count + im + integer + + in + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run + + + horizontal_dimension + horizontal dimension + count + ix + integer + + in + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run + + + vertical_dimension + vertical layer dimension + count + lm + integer + + in + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run + + + flag_flip + vertical flip logical + flag + flipv + logical + + in + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run + + + time_step_for_physics + physics time step + s + dt_i + real + + in + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run + + + air_pressure + layer mean pressure + Pa + prsl_i + real + (:,:) + in + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run + + + air_pressure_at_interface + air pressure at model layer interfaces + Pa + prsi_i + real + (:,:) + in + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run + + + geopotential + geopotential at model layer centers + m2 s-2 + phil + real + (:,:) + in + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run + + + geopotential_at_interface + geopotential at model layer interfaces + m2 s-2 + phii + real + (:,:) + in + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run + + + omega + layer mean vertical velocity + Pa s-1 + omega_i + real + (:,:) + in + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run + + + cloud_condensed_water_mixing_ratio_convective_transport_tracer + moist (dry+vapor, no condensates) mixing ratio of cloud water (condensate) in the convectively transported tracer array + kg kg-1 + qlls_i + real + (:,:) + in + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run + + + mass_fraction_of_convective_cloud_liquid_water + mass fraction of convective cloud liquid water + kg kg-1 + qlcn_i + real + (:,:) + in + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run + + + ice_water_mixing_ratio_convective_transport_tracer + moist (dry+vapor, no condensates) mixing ratio of ice water in the convectively transported tracer array + kg kg-1 + qils_i + real + (:,:) + in + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run + + + mass_fraction_of_convective_cloud_ice + mass fraction of convective cloud ice water + kg kg-1 + qicn_i + real + (:,:) + in + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run + + + tendency_of_air_temperature_due_to_longwave_heating_on_radiation_timestep + total sky lw heating rate + K s-1 + lwheat_i + real + (:,:) + in + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run + + + tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_timestep + total sky sw heating rate + K s-1 + swheat_i + real + (:,:) + in + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run + + + vertical_velocity_for_updraft + vertical velocity for updraft + m s-1 + w_upi + real + (:,:) + in + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run + + + convective_cloud_fraction_for_microphysics + convective cloud fraction for microphysics + frac + cf_upi + real + (:,:) + in + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run + + + land_area_fraction + land area fraction + frac + frland + real + (:) + in + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run + + + atmosphere_boundary_layer_thickness + pbl height + m + zpbl + real + (:) + in + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run + + + detrained_mass_flux + detrained mass flux + kg m-2 s-1 + cnv_mfd_i + real + (:,:) + in + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run + + + tendency_of_cloud_water_due_to_convective_microphysics + tendency of cloud water due to convective microphysics + kg m-2 s-1 + cnv_dqldt_i + real + (:,:) + in + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run + + + convective_cloud_volume_fraction + convective cloud volume fraction + frac + clcn_i + real + (:,:) + in + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run + + + x_wind_updated_by_physics + zonal wind updated by physics + m s-1 + u_i + real + (:,:) + in + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run + + + y_wind_updated_by_physics + meridional wind updated by physics + m s-1 + v_i + real + (:,:) + in + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run + + + cumulative_surface_x_momentum_flux_for_diag_multiplied_by_timestep + cumulative sfc x momentum flux multiplied by timestep + Pa s + taugwx + real + (:) + in + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run + + + cumulative_surface_y_momentum_flux_for_diag_multiplied_by_timestep + cumulative sfc y momentum flux multiplied by timestep + Pa s + taugwy + real + (:) + in + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run + + + instantaneous_surface_x_momentum_flux + x momentum flux + Pa + tauorox + real + (:) + in + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run + + + instantaneous_surface_y_momentum_flux + y momentum flux + Pa + tauoroy + real + (:) + in + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run + + + ice_fraction_in_convective_tower + ice fraction in convective tower + frac + cnv_fice_i + real + (:,:) + in + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run + + + number_concentration_of_cloud_liquid_water_particles_for_detrainment + droplet number concentration in convective detrainment + m-3 + cnv_ndrop_i + real + (:,:) + in + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run + + + number_concentration_of_ice_crystals_for_detrainment + crystal number concentration in convective detrainment + m-3 + cnv_nice_i + real + (:,:) + in + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run + + + water_vapor_specific_humidity_updated_by_physics + water vapor specific humidity updated by physics + kg kg-1 + q_io + real + (:,:) + inout + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run + + + cloud_condensed_water_mixing_ratio_updated_by_physics + moist (dry+vapor, no condensates) mixing ratio of cloud condensed water updated by physics + kg kg-1 + lwm_o + real + (:,:) + out + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run + + + ice_water_mixing_ratio_updated_by_physics + moist (dry+vapor, no condensates) mixing ratio of ice water updated by physics + kg kg-1 + qi_o + real + (:,:) + out + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run + + + air_temperature_updated_by_physics + temperature updated by physics + K + t_io + real + (:,:) + inout + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run + + + lwe_thickness_of_explicit_precipitation_amount + explicit precipitation (rain, ice, snow, graupel, ...) on physics timestep + m + rn_o + real + (:) + out + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run + + + ratio_of_snowfall_to_rainfall + snow ratio: ratio of snow to total precipitation + frac + sr_o + real + (:) + out + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run + + + cloud_droplet_number_concentration_updated_by_physics + number concentration of cloud droplets updated by physics + kg-1 + ncpl_io + real + (:,:) + inout + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run + + + ice_number_concentration_updated_by_physics + number concentration of ice updated by physics + kg-1 + ncpi_io + real + (:,:) + inout + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run + + + number_of_frozen_precipitation_species + number of frozen precipitation species + count + fprcp + integer + + in + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run + + + local_rain_water_mixing_ratio + moist (dry+vapor, no condensates) mixing ratio of rain water local to physics + kg kg-1 + rnw_io + real + (:,:) + inout + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run + + + local_snow_water_mixing_ratio + moist (dry+vapor, no condensates) mixing ratio of snow water local to physics + kg kg-1 + snw_io + real + (:,:) + inout + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run + + + local_graupel_mixing_ratio + moist (dry+vapor, no condensates) mixing ratio of graupel local to physics + kg kg-1 + qgl_io + real + (:,:) + inout + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run + + + local_rain_number_concentration + number concentration of rain local to physics + kg-1 + ncpr_io + real + (:,:) + inout + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run + + + local_snow_number_concentration + number concentration of snow local to physics + kg-1 + ncps_io + real + (:,:) + inout + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run + + + local_graupel_number_concentration + number concentration of graupel local to physics + kg-1 + ncgl_io + real + (:,:) + inout + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run + + + cloud_fraction_for_MG + cloud fraction used by Morrison-Gettelman MP + frac + clls_io + real + (:,:) + inout + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run + + + vertical_index_at_cloud_base + vertical index at cloud base + index + kcbl + integer + (:) + inout + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run + + + effective_radius_of_stratiform_cloud_liquid_water_particle_in_um + effective radius of cloud liquid water particle in micrometer + um + cldreffl + real + (:,:) + out + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run + + + effective_radius_of_stratiform_cloud_ice_particle_in_um + effective radius of cloud ice water particle in micrometers + um + cldreffi + real + (:,:) + out + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run + + + effective_radius_of_stratiform_cloud_rain_particle_in_um + effective radius of cloud rain particle in micrometers + um + cldreffr + real + (:,:) + out + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run + + + effective_radius_of_stratiform_cloud_snow_particle_in_um + effective radius of cloud snow particle in micrometers + um + cldreffs + real + (:,:) + out + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run + + + effective_radius_of_stratiform_cloud_graupel_particle_in_um + effective radius of cloud graupel particle in micrometers + um + cldreffg + real + (:,:) + out + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run + + + aerosol_number_concentration_from_gocart_aerosol_climatology + GOCART aerosol climatology number concentration + kg-1? + aerfld_i + real + (:,:,:) + in + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run + + + flag_for_aerosol_input_MG + flag for using aerosols in Morrison-Gettelman microphysics + flag + aero_in + logical + + in + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run + + + in_number_concentration + IN number concentration + kg-1? + naai_i + real + (:,:) + in + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run + + + ccn_number_concentration + CCN number concentration + kg-1? + npccn_i + real + (:,:) + in + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run + + + flag_for_in_ccn_forcing_for_morrison_gettelman_microphysics + flag for IN and CCN forcing for morrison gettelman microphysics + flag + iccn + logical + + in + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run + + + flag_skip_macro + flag to skip cloud macrophysics in Morrison scheme + flag + skip_macro + logical + + in + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run + + + flag_print + control flag for diagnostic print out + flag + lprnt + logical + + in + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run + + + mg_tuning_factor_for_alphas + tuning factor for alphas (alpha = 1 - critical relative humidity) + none + alf_fac + real + + in + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run + + + mg_minimum_cloud_condensed_water_and_ice_mixing_ratio + minimum cloud condensed water and ice mixing ratio in MG macro clouds + kg kg-1 + qc_min + real + (:) + in + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run + + + flag_for_pdf_for_morrison_gettelman_microphysics_scheme + pdf flag for MG macrophysics + flag + pdfflag + integer + + in + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run + + + horizontal_index_of_printed_column + horizontal index of printed column + index + ipr + integer + + in + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run + + + index_of_time_step + current forecast iteration + index + kdt + integer + + in + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run + + + latitude + latitude + radians + xlat + real + (:) + in + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run + + + longitude + longitude + radians + xlon + real + (:) + in + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run + + + critical_relative_humidity + critical relative humidity + frac + rhc_i + real + (:,:) + in + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run + + + + + flag_for_microphysics_scheme + choice of microphysics scheme + flag + imp_physics + integer + + in + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_init + + + flag_for_morrison_gettelman_microphysics_scheme + choice of Morrison-Gettelman rmicrophysics scheme + flag + imp_physics_mg + integer + + in + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_init + + + number_of_frozen_precipitation_species + number of frozen precipitation species + count + fprcp + integer + + in + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_init + + + gravitational_acceleration + gravitational acceleration + m s-2 + gravit + real + + in + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_init + + + gas_constant_dry_air + ideal gas constant for dry air + J kg-1 K-1 + rair + real + + in + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_init + + + gas_constant_water_vapor + ideal gas constant for water vapor + J kg-1 K-1 + rh2o + real + + in + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_init + + + specific_heat_of_dry_air_at_constant_pressure + specific heat of dry air at constant pressure + J kg-1 K-1 + cpair + real + + in + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_init + + + triple_point_temperature_of_water + triple point temperature of water + K + tmelt + real + + in + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_init + + + latent_heat_of_vaporization_of_water_at_0C + latent heat of evaporation/sublimation + J kg-1 + latvap + real + + in + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_init + + + latent_heat_of_fusion_of_water_at_0C + latent heat of fusion + J kg-1 + latice + real + + in + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_init + + + mg_autoconversion_size_threshold_ice_snow + autoconversion size threshold for cloud ice to snow for MG microphysics + um + mg_dcs + real + + in + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_init + + + mg_cloud_water_variance + cloud water relative variance for MG microphysics + + mg_qcvar + real + + in + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_init + + + mg_time_scale_for_autoconversion_of_ice + autoconversion time scale for ice for MG microphysics + s + mg_ts_auto_ice + real + (:) + in + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_init + + + mg_minimum_rh_for_ice + relative humidity threshold parameter for nucleating ice for MG microphysics + none + mg_rhmini + real + + in + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_init + + + mg_flag_for_uniform_subcolumns + flag for uniform subcolumns for MG microphysics + flag + microp_uniform + logical + + in + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_init + + + mg_flag_for_cloud_ice_processes + flag for cloud ice processes for MG microphysics + flag + do_cldice + logical + + in + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_init + + + mg_flag_for_heterogeneous_freezing + flag for heterogeneous freezing for MG microphysics + flag + hetfrz_classnuc + logical + + in + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_init + + + mg_type_of_precip_fraction_method + type of precip fraction method for MG microphysics (in_cloud or max_overlap) + none + mg_precip_frac_method + character + + in + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_init + + + mg_bergeron_efficiency_factor + bergeron efficiency factor for MG microphysics + frac + mg_berg_eff_factor + real + + in + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_init + + + mg_allow_supersat_after_sed + allow supersaturation after sedimentation for MG microphysics + flag + sed_supersat + logical + + in + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_init + + + mg_flag_for_sb2001_autoconversion + flag for SB 2001 autoconversion or accretion for MG microphysics + flag + do_sb_physics + logical + + in + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_init + + + mg_flag_for_hail + flag for hail for MG microphysics (graupel possible if false) + flag + mg_do_hail + logical + + in + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_init + + + mg_flag_for_graupel + flag for graupel for MG microphysics (hail possible if false) + flag + mg_do_graupel + logical + + in + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_init + + + mg_flag_drop_concentration_constant + flag for constant droplet concentration for MG microphysics + flag + mg_nccons + logical + + in + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_init + + + mg_flag_ice_concentration_constant + flag for constant ice concentration for MG microphysics + flag + mg_nicons + logical + + in + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_init + + + mg_flag_graupel_concentration_constant + flag for constant graupel concentration for MG microphysics + flag + mg_ngcons + logical + + in + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_init + + + mg_drop_concentration_constant + droplet concentration constant for MG microphysics + m-3 + mg_ncnst + real + + in + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_init + + + mg_ice_concentration_constant + ice concentration constant for MG microphysics + m-3 + mg_ninst + real + + in + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_init + + + mg_graupel_concentration_constant + graupel concentration constant for MG microphysics + m-3 + mg_ngnst + real + + in + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_init + + + mg_flag_for_gmao_ice_formulation + flag for gmao ice formulation + flag + mg_do_ice_gmao + logical + + in + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_init + + + mg_flag_for_liu_liquid_treatment + flag for liu liquid treatment + flag + mg_do_liq_liu + logical + + in + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_init + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_init + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_init + + + + diff --git a/physics/m_micro_post.xml b/physics/m_micro_post.xml new file mode 100644 index 000000000..4b0089790 --- /dev/null +++ b/physics/m_micro_post.xml @@ -0,0 +1,205 @@ + + + + + + horizontal_loop_extent + horizontal loop extent + count + im + integer + + in + F + MODULE_m_micro_post SCHEME_m_micro_post SUBROUTINE_m_micro_post_run + + + vertical_dimension + number of vertical layers + count + levs + integer + + in + F + MODULE_m_micro_post SCHEME_m_micro_post SUBROUTINE_m_micro_post_run + + + number_of_frozen_precipitation_species + number of frozen precipitation species + count + fprcp + integer + + in + F + MODULE_m_micro_post SCHEME_m_micro_post SUBROUTINE_m_micro_post_run + + + flag_mg3_as_mg2 + flag for controlling prep for Morrison-Gettelman microphysics + flag + mg3_as_mg2 + logical + + in + F + MODULE_m_micro_post SCHEME_m_micro_post SUBROUTINE_m_micro_post_run + + + local_rain_number_concentration + number concentration of rain local to physics + kg-1 + ncpr + real + (:,:) + in + F + MODULE_m_micro_post SCHEME_m_micro_post SUBROUTINE_m_micro_post_run + + + local_snow_number_concentration + number concentration of snow local to physics + kg-1 + ncps + real + (:,:) + in + F + MODULE_m_micro_post SCHEME_m_micro_post SUBROUTINE_m_micro_post_run + + + local_graupel_number_concentration + number concentration of graupel local to physics + kg-1 + ncgl + real + (:,:) + in + F + MODULE_m_micro_post SCHEME_m_micro_post SUBROUTINE_m_micro_post_run + + + local_rain_water_mixing_ratio + moist (dry+vapor, no condensates) mixing ratio of rain water local to physics + kg kg-1 + qrn + real + (:,:) + inout + F + MODULE_m_micro_post SCHEME_m_micro_post SUBROUTINE_m_micro_post_run + + + local_snow_water_mixing_ratio + moist (dry+vapor, no condensates) mixing ratio of snow water local to physics + kg kg-1 + qsnw + real + (:,:) + inout + F + MODULE_m_micro_post SCHEME_m_micro_post SUBROUTINE_m_micro_post_run + + + local_graupel_mixing_ratio + moist (dry+vapor, no condensates) mixing ratio of graupel local to physics + kg kg-1 + qgl + real + (:,:) + inout + F + MODULE_m_micro_post SCHEME_m_micro_post SUBROUTINE_m_micro_post_run + + + rain_water_mixing_ratio_updated_by_physics + moist (dry+vapor, no condensates) mixing ratio of rain water updated by physics + kg kg-1 + gq0_rain + real + (:,:) + out + F + MODULE_m_micro_post SCHEME_m_micro_post SUBROUTINE_m_micro_post_run + + + snow_water_mixing_ratio_updated_by_physics + moist (dry+vapor, no condensates) mixing ratio of snow water updated by physics + kg kg-1 + gq0_snow + real + (:,:) + out + F + MODULE_m_micro_post SCHEME_m_micro_post SUBROUTINE_m_micro_post_run + + + graupel_mixing_ratio_updated_by_physics + moist (dry+vapor, no condensates) mixing ratio of graupel updated by physics + kg kg-1 + gq0_graupel + real + (:,:) + out + F + MODULE_m_micro_post SCHEME_m_micro_post SUBROUTINE_m_micro_post_run + + + rain_number_concentration_updated_by_physics + number concentration of rain updated by physics + kg-1 + gq0_rain_nc + real + (:,:) + out + F + MODULE_m_micro_post SCHEME_m_micro_post SUBROUTINE_m_micro_post_run + + + snow_number_concentration_updated_by_physics + number concentration of snow updated by physics + kg-1 + gq0_snow_nc + real + (:,:) + out + F + MODULE_m_micro_post SCHEME_m_micro_post SUBROUTINE_m_micro_post_run + + + graupel_number_concentration_updated_by_physics + number concentration of graupel updated by physics + kg-1 + gq0_graupel_nc + real + (:,:) + out + F + MODULE_m_micro_post SCHEME_m_micro_post SUBROUTINE_m_micro_post_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_m_micro_post SCHEME_m_micro_post SUBROUTINE_m_micro_post_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_m_micro_post SCHEME_m_micro_post SUBROUTINE_m_micro_post_run + + + + diff --git a/physics/m_micro_pre.xml b/physics/m_micro_pre.xml new file mode 100644 index 000000000..a9baa1979 --- /dev/null +++ b/physics/m_micro_pre.xml @@ -0,0 +1,381 @@ + + + + + + + horizontal_loop_extent + horizontal loop extent + count + im + integer + + in + F + MODULE_m_micro_pre SCHEME_m_micro_pre SUBROUTINE_m_micro_pre_run + + + vertical_dimension + number of vertical layers + count + levs + integer + + in + F + MODULE_m_micro_pre SCHEME_m_micro_pre SUBROUTINE_m_micro_pre_run + + + flag_for_shoc + flag for SHOC + flag + do_shoc + logical + + in + F + MODULE_m_micro_pre SCHEME_m_micro_pre SUBROUTINE_m_micro_pre_run + + + number_of_frozen_precipitation_species + number of frozen precipitation species + count + fprcp + integer + + in + F + MODULE_m_micro_pre SCHEME_m_micro_pre SUBROUTINE_m_micro_pre_run + + + flag_mg3_as_mg2 + flag for controlling prep for Morrison-Gettelman microphysics + flag + mg3_as_mg2 + logical + + in + F + MODULE_m_micro_pre SCHEME_m_micro_pre SUBROUTINE_m_micro_pre_run + + + ice_water_mixing_ratio_updated_by_physics + moist (dry+vapor, no condensates) mixing ratio of ice water updated by physics + kg kg-1 + gq0_ice + real + (:,:) + in + F + MODULE_m_micro_pre SCHEME_m_micro_pre SUBROUTINE_m_micro_pre_run + + + cloud_condensed_water_mixing_ratio_updated_by_physics + moist (dry+vapor, no condensates) mixing ratio of cloud condensed water updated by physics + kg kg-1 + gq0_water + real + (:,:) + in + F + MODULE_m_micro_pre SCHEME_m_micro_pre SUBROUTINE_m_micro_pre_run + + + rain_water_mixing_ratio_updated_by_physics + moist (dry+vapor, no condensates) mixing ratio of rain water updated by physics + kg kg-1 + gq0_rain + real + (:,:) + in + F + MODULE_m_micro_pre SCHEME_m_micro_pre SUBROUTINE_m_micro_pre_run + + + snow_water_mixing_ratio_updated_by_physics + moist (dry+vapor, no condensates) mixing ratio of snow water updated by physics + kg kg-1 + gq0_snow + real + (:,:) + in + F + MODULE_m_micro_pre SCHEME_m_micro_pre SUBROUTINE_m_micro_pre_run + + + graupel_mixing_ratio_updated_by_physics + moist (dry+vapor, no condensates) mixing ratio of graupel updated by physics + kg kg-1 + gq0_graupel + real + (:,:) + in + F + MODULE_m_micro_pre SCHEME_m_micro_pre SUBROUTINE_m_micro_pre_run + + + rain_number_concentration_updated_by_physics + number concentration of rain updated by physics + kg-1 + gq0_rain_nc + real + (:,:) + in + F + MODULE_m_micro_pre SCHEME_m_micro_pre SUBROUTINE_m_micro_pre_run + + + snow_number_concentration_updated_by_physics + number concentration of snow updated by physics + kg-1 + gq0_snow_nc + real + (:,:) + in + F + MODULE_m_micro_pre SCHEME_m_micro_pre SUBROUTINE_m_micro_pre_run + + + graupel_number_concentration_updated_by_physics + number concentration of graupel updated by physics + kg-1 + gq0_graupel_nc + real + (:,:) + in + F + MODULE_m_micro_pre SCHEME_m_micro_pre SUBROUTINE_m_micro_pre_run + + + subgrid_scale_cloud_fraction_from_shoc + subgrid-scale cloud fraction from the SHOC scheme + frac + cld_shoc + real + (:,:) + in + F + MODULE_m_micro_pre SCHEME_m_micro_pre SUBROUTINE_m_micro_pre_run + + + convective_cloud_cover + convective cloud cover + frac + cnvc + real + (:,:) + in + F + MODULE_m_micro_pre SCHEME_m_micro_pre SUBROUTINE_m_micro_pre_run + + + convective_cloud_water_mixing_ratio + moist convective cloud water mixing ratio + kg kg-1 + cnvw + real + (:,:) + in + F + MODULE_m_micro_pre SCHEME_m_micro_pre SUBROUTINE_m_micro_pre_run + + + cloud_phase_transition_threshold_temperature + threshold temperature below which cloud starts to freeze + K + tcr + real + + in + F + MODULE_m_micro_pre SCHEME_m_micro_pre SUBROUTINE_m_micro_pre_run + + + cloud_phase_transition_denominator + denominator in cloud phase transition = 1/(tcr-tf) + K-1 + tcrf + real + + in + F + MODULE_m_micro_pre SCHEME_m_micro_pre SUBROUTINE_m_micro_pre_run + + + air_temperature_updated_by_physics + temperature updated by physics + K + gt0 + real + (:,:) + in + F + MODULE_m_micro_pre SCHEME_m_micro_pre SUBROUTINE_m_micro_pre_run + + + local_rain_water_mixing_ratio + moist (dry+vapor, no condensates) mixing ratio of rain water local to physics + kg kg-1 + qrn + real + (:,:) + inout + F + MODULE_m_micro_pre SCHEME_m_micro_pre SUBROUTINE_m_micro_pre_run + + + local_snow_water_mixing_ratio + moist (dry+vapor, no condensates) mixing ratio of snow water local to physics + kg kg-1 + qsnw + real + (:,:) + inout + F + MODULE_m_micro_pre SCHEME_m_micro_pre SUBROUTINE_m_micro_pre_run + + + local_graupel_mixing_ratio + moist (dry+vapor, no condensates) mixing ratio of graupel local to physics + kg kg-1 + qgl + real + (:,:) + inout + F + MODULE_m_micro_pre SCHEME_m_micro_pre SUBROUTINE_m_micro_pre_run + + + local_rain_number_concentration + number concentration of rain local to physics + kg-1 + ncpr + real + (:,:) + inout + F + MODULE_m_micro_pre SCHEME_m_micro_pre SUBROUTINE_m_micro_pre_run + + + local_snow_number_concentration + number concentration of snow local to physics + kg-1 + ncps + real + (:,:) + inout + F + MODULE_m_micro_pre SCHEME_m_micro_pre SUBROUTINE_m_micro_pre_run + + + local_graupel_number_concentration + number concentration of graupel local to physics + kg-1 + ncgl + real + (:,:) + inout + F + MODULE_m_micro_pre SCHEME_m_micro_pre SUBROUTINE_m_micro_pre_run + + + cloud_fraction_for_MG + cloud fraction used by Morrison-Gettelman MP + frac + cld_frc_MG + real + (:,:) + inout + F + MODULE_m_micro_pre SCHEME_m_micro_pre SUBROUTINE_m_micro_pre_run + + + mass_fraction_of_convective_cloud_liquid_water + mass fraction of convective cloud liquid water + kg kg-1 + qlcn + real + (:,:) + inout + F + MODULE_m_micro_pre SCHEME_m_micro_pre SUBROUTINE_m_micro_pre_run + + + mass_fraction_of_convective_cloud_ice + mass fraction of convective cloud ice water + kg kg-1 + qicn + real + (:,:) + inout + F + MODULE_m_micro_pre SCHEME_m_micro_pre SUBROUTINE_m_micro_pre_run + + + convective_cloud_fraction_for_microphysics + convective cloud fraction for microphysics + frac + cf_upi + real + (:,:) + inout + F + MODULE_m_micro_pre SCHEME_m_micro_pre SUBROUTINE_m_micro_pre_run + + + cloud_condensed_water_mixing_ratio_convective_transport_tracer + moist (dry+vapor, no condensates) mixing ratio of cloud water (condensate) in the convectively transported tracer array + kg kg-1 + clw_water + real + (:,:) + out + F + MODULE_m_micro_pre SCHEME_m_micro_pre SUBROUTINE_m_micro_pre_run + + + ice_water_mixing_ratio_convective_transport_tracer + moist (dry+vapor, no condensates) mixing ratio of ice water in the convectively transported tracer array + kg kg-1 + clw_ice + real + (:,:) + out + F + MODULE_m_micro_pre SCHEME_m_micro_pre SUBROUTINE_m_micro_pre_run + + + convective_cloud_volume_fraction + convective cloud volume fraction + frac + clcn + real + (:,:) + in + F + MODULE_m_micro_pre SCHEME_m_micro_pre SUBROUTINE_m_micro_pre_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_m_micro_pre SCHEME_m_micro_pre SUBROUTINE_m_micro_pre_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_m_micro_pre SCHEME_m_micro_pre SUBROUTINE_m_micro_pre_run + + + diff --git a/physics/machine.xml b/physics/machine.xml new file mode 100644 index 000000000..cd06d9827 --- /dev/null +++ b/physics/machine.xml @@ -0,0 +1,36 @@ + + + + kind_dyn + definition of kind_dyn + none + kind_dyn + integer + + none + F + MODULE_machine + + + kind_grid + definition of kind_grid + none + kind_grid + integer + + none + F + MODULE_machine + + + kind_phys + definition of kind_phys + none + kind_phys + integer + + none + F + MODULE_machine + + diff --git a/physics/moninshoc.xml b/physics/moninshoc.xml new file mode 100644 index 000000000..608f48dbe --- /dev/null +++ b/physics/moninshoc.xml @@ -0,0 +1,634 @@ + + + + + horizontal_dimension + horizontal dimension + count + ix + integer + + in + F + MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run + + + horizontal_loop_extent + horizontal loop extent + count + im + integer + + in + F + MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run + + + vertical_dimension + vertical layer dimension + count + km + integer + + in + F + MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run + + + number_of_vertical_diffusion_tracers + number of tracers to diffuse vertically + count + ntrac + integer + + in + F + MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run + + + index_for_liquid_cloud_condensate + cloud condensate index in tracer array + index + ntcw + integer + + in + F + MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run + + + number_of_tracers_for_cloud_condensate + number of tracers for cloud condensate + count + ncnd + integer + + in + F + MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run + + + tendency_of_y_wind_due_to_model_physics + updated tendency of the y wind + m s-2 + dv + real + (:,:) + inout + F + MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run + + + tendency_of_x_wind_due_to_model_physics + updated tendency of the x wind + m s-2 + du + real + (:,:) + inout + F + MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run + + + tendency_of_air_temperature_due_to_model_physics + updated tendency of the temperature + K s-1 + tau + real + (:,:) + inout + F + MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run + + + tendency_of_vertically_diffused_tracer_concentration + updated tendency of the tracers due to vertical diffusion in PBL scheme + kg kg-1 s-1 + rtg + real + (:,:,:) + inout + F + MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run + + + x_wind + x component of layer wind + m s-1 + u1 + real + (:,:) + in + F + MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run + + + y_wind + y component of layer wind + m s-1 + v1 + real + (:,:) + in + F + MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run + + + air_temperature + layer mean air temperature + K + t1 + real + (:,:) + in + F + MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run + + + vertically_diffused_tracer_concentration + tracer concentration diffused by PBL scheme + kg kg-1 + q1 + real + (:,:,:) + in + F + MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run + + + atmosphere_heat_diffusivity_from_shoc + diffusivity for heat from the SHOC scheme + m2 s-1 + tkh + real + (:,:) + in + F + MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run + + + prandtl_number + turbulent Prandtl number + none + prnum + real + (:,:) + inout + F + MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run + + + index_for_turbulent_kinetic_energy + tracer index for turbulent kinetic energy + index + ntke + integer + + in + F + MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run + + + dimensionless_exner_function_at_lowest_model_interface + dimensionless Exner function at the surface interface + none + psk + real + (:) + in + F + MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run + + + bulk_richardson_number_at_lowest_model_level + bulk Richardson number at the surface + none + rbsoil + real + (:) + in + F + MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run + + + surface_roughness_length + surface roughness length in cm + cm + zorl + real + (:) + in + F + MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run + + + x_wind_at_10m + x component of wind at 10 m + m s-1 + u10m + real + (:) + in + F + MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run + + + y_wind_at_10m + y component of wind at 10 m + m s-1 + v10m + real + (:) + in + F + MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run + + + Monin-Obukhov_similarity_function_for_momentum + Monin-Obukhov similarity function for momentum + none + fm + real + (:) + in + F + MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run + + + Monin-Obukhov_similarity_function_for_heat + Monin-Obukhov similarity function for heat + none + fh + real + (:) + in + F + MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run + + + surface_skin_temperature + surface skin temperature + K + tsea + real + (:) + in + F + MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run + + + kinematic_surface_upward_sensible_heat_flux + kinematic surface upward sensible heat flux + K m s-1 + heat + real + (:) + in + F + MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run + + + kinematic_surface_upward_latent_heat_flux + kinematic surface upward latent heat flux + kg kg-1 m s-1 + evap + real + (:) + in + F + MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run + + + surface_wind_stress + surface wind stress + m2 s-2 + stress + real + (:) + in + F + MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run + + + wind_speed_at_lowest_model_layer + wind speed at lowest model level + m s-1 + spd1 + real + (:) + in + F + MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run + + + vertical_index_at_top_of_atmosphere_boundary_layer + PBL top model level index + index + kpbl + integer + (:) + out + F + MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run + + + air_pressure_at_interface + air pressure at model layer interfaces + Pa + prsi + real + (:,:) + in + F + MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run + + + air_pressure_difference_between_midlayers + pres(k) - pres(k+1) + Pa + del + real + (:,:) + in + F + MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run + + + air_pressure + mean layer pressure + Pa + prsl + real + (:,:) + in + F + MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run + + + dimensionless_exner_function_at_model_layers + Exner function at layers + none + prslk + real + (:,:) + in + F + MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run + + + geopotential_at_interface + geopotential at model layer interfaces + m2 s-2 + phii + real + (:,:) + in + F + MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run + + + geopotential + geopotential at model layer centers + m2 s-2 + phil + real + (:,:) + in + F + MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run + + + time_step_for_physics + time step for physics + s + delt + real + + in + F + MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run + + + instantaneous_surface_x_momentum_flux + x momentum flux + Pa + dusfc + real + (:) + out + F + MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run + + + instantaneous_surface_y_momentum_flux + y momentum flux + Pa + dvsfc + real + (:) + out + F + MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run + + + instantaneous_surface_upward_sensible_heat_flux + surface upward sensible heat flux + W m-2 + dtsfc + real + (:) + out + F + MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run + + + instantaneous_surface_upward_latent_heat_flux + surface upward latent heat flux + W m-2 + dqsfc + real + (:) + out + F + MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run + + + atmosphere_heat_diffusivity + diffusivity for heat + m2 s-1 + dkt + real + (:,:) + out + F + MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run + + + atmosphere_boundary_layer_thickness + PBL thickness + m + hpbl + real + (:) + out + F + MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run + + + index_of_highest_temperature_inversion + index of highest temperature inversion + index + kinver + integer + (:) + in + F + MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run + + + atmosphere_momentum_diffusivity_background + background value of momentum diffusivity + m2 s-1 + xkzm_m + real + + in + F + MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run + + + atmosphere_heat_diffusivity_background + background value of heat diffusivity + m2 s-1 + xkzm_h + real + + in + F + MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run + + + diffusivity_background_sigma_level + sigma level threshold for background diffusivity + none + xkzm_s + real + + in + F + MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run + + + flag_print + flag for printing diagnostics to output + flag + lprnt + logical + + in + F + MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run + + + horizontal_index_of_printed_column + horizontal index of printed column + index + ipr + integer + + in + F + MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run + + + mpi_rank + current MPI-rank + index + me + integer + + in + F + MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run + + + gravitational_acceleration + gravitational acceleration + m s-2 + grav + real + + in + F + MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run + + + gas_constant_dry_air + ideal gas constant for dry air + J kg-1 K-1 + rd + real + + in + F + MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run + + + specific_heat_of_dry_air_at_constant_pressure + specific heat of dry air at constant pressure + J kg-1 K-1 + cp + real + + in + F + MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run + + + latent_heat_of_vaporization_of_water_at_0C + latent heat of evaporation/sublimation + J kg-1 + hvap + real + + in + F + MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run + + + ratio_of_vapor_to_dry_air_gas_constants_minus_one + (rv/rd) - 1 (rv = ideal gas constant for water vapor) + none + fv + real + + in + F + MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run + + + + + diff --git a/physics/mp_thompson_hrrr.xml b/physics/mp_thompson_hrrr.xml new file mode 100644 index 000000000..4d03acc23 --- /dev/null +++ b/physics/mp_thompson_hrrr.xml @@ -0,0 +1,625 @@ + + + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_finalize + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_finalize + + + + + horizontal_loop_extent + horizontal loop extent + count + ncol + integer + + in + F + MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_init + + + vertical_dimension + number of vertical levels + count + nlev + integer + + in + F + MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_init + + + flag_for_aerosol_physics + flag for aerosol-aware physics + flag + is_aerosol_aware + logical + + in + F + MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_init + + + tendency_of_water_friendly_aerosols_at_surface + instantaneous fake water-friendly surface aerosol source + kg-1 s-1 + nwfa2d + real + (:) + inout + T + MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_init + + + tendency_of_ice_friendly_aerosols_at_surface + instantaneous fake ice-friendly surface aerosol source + kg-1 s-1 + nifa2d + real + (:) + inout + T + MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_init + + + water_friendly_aerosol_number_concentration + number concentration of water-friendly aerosols + kg-1 + nwfa + real + (:,:) + inout + T + MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_init + + + ice_friendly_aerosol_number_concentration + number concentration of ice-friendly aerosols + kg-1 + nifa + real + (:,:) + inout + T + MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_init + + + mpi_comm + MPI communicator + index + mpicomm + integer + + in + F + MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_init + + + mpi_rank + current MPI-rank + index + mpirank + integer + + in + F + MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_init + + + mpi_root + master MPI-rank + index + mpiroot + integer + + in + F + MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_init + + + omp_threads + number of OpenMP threads available to scheme + count + threads + integer + + in + F + MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_init + + + flag_for_microphysics_scheme + choice of microphysics scheme + flag + imp_physics + integer + + in + F + MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_init + + + flag_for_thompson_microphysics_scheme + choice of Thompson microphysics scheme + flag + imp_physics_thompson + integer + + in + F + MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_init + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_init + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_init + + + + + horizontal_loop_extent + horizontal loop extent + count + ncol + integer + + in + F + MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_run + + + vertical_dimension + number of vertical levels + count + nlev + integer + + in + F + MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_run + + + gravitational_acceleration + gravitational acceleration + m s-2 + con_g + real + + in + F + MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_run + + + gas_constant_dry_air + ideal gas constant for dry air + J kg-1 K-1 + con_rd + real + + in + F + MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_run + + + water_vapor_specific_humidity_updated_by_physics + water vapor specific humidity + kg kg-1 + spechum + real + (:,:) + inout + F + MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_run + + + cloud_condensed_water_mixing_ratio_updated_by_physics + cloud water mixing ratio wrt dry+vapor (no condensates) + kg kg-1 + qc + real + (:,:) + inout + F + MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_run + + + rain_water_mixing_ratio_updated_by_physics + rain water mixing ratio wrt dry+vapor (no condensates) + kg kg-1 + qr + real + (:,:) + inout + F + MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_run + + + ice_water_mixing_ratio_updated_by_physics + ice water mixing ratio wrt dry+vapor (no condensates) + kg kg-1 + qi + real + (:,:) + inout + F + MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_run + + + snow_water_mixing_ratio_updated_by_physics + snow water mixing ratio wrt dry+vapor (no condensates) + kg kg-1 + qs + real + (:,:) + inout + F + MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_run + + + graupel_mixing_ratio_updated_by_physics + graupel mixing ratio wrt dry+vapor (no condensates) + kg kg-1 + qg + real + (:,:) + inout + F + MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_run + + + ice_number_concentration_updated_by_physics + ice number concentration + kg-1 + ni + real + (:,:) + inout + F + MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_run + + + rain_number_concentration_updated_by_physics + rain number concentration + kg-1 + nr + real + (:,:) + inout + F + MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_run + + + flag_for_aerosol_physics + flag for aerosol-aware physics + flag + is_aerosol_aware + logical + + in + F + MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_run + + + cloud_droplet_number_concentration_updated_by_physics + cloud droplet number concentration + kg-1 + nc + real + (:,:) + inout + T + MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_run + + + water_friendly_aerosol_number_concentration_updated_by_physics + number concentration of water-friendly aerosols + kg-1 + nwfa + real + (:,:) + inout + T + MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_run + + + ice_friendly_aerosol_number_concentration_updated_by_physics + number concentration of ice-friendly aerosols + kg-1 + nifa + real + (:,:) + inout + T + MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_run + + + tendency_of_water_friendly_aerosols_at_surface + instantaneous fake water-friendly surface aerosol source + kg-1 s-1 + nwfa2d + real + (:) + in + T + MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_run + + + tendency_of_ice_friendly_aerosols_at_surface + instantaneous fake ice-friendly surface aerosol source + kg-1 s-1 + nifa2d + real + (:) + in + T + MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_run + + + air_temperature_updated_by_physics + model layer mean temperature + K + tgrs + real + (:,:) + inout + F + MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_run + + + air_pressure + mean layer pressure + Pa + prsl + real + (:,:) + in + F + MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_run + + + geopotential_at_interface + geopotential at model layer interfaces + m2 s-2 + phii + real + (:,:) + in + F + MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_run + + + omega + layer mean vertical velocity + Pa s-1 + omega + real + (:,:) + in + F + MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_run + + + time_step_for_physics + physics timestep + s + dtp + real + + in + F + MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_run + + + lwe_thickness_of_explicit_precipitation_amount + explicit precipitation (rain, ice, snow, graupel) on physics timestep + m + prcp + real + (:) + inout + F + MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_run + + + lwe_thickness_of_explicit_rain_amount + explicit rain fall on physics timestep + m + rain + real + (:) + inout + F + MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_run + + + lwe_thickness_of_graupel_amount + graupel fall on physics timestep + m + graupel + real + (:) + inout + F + MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_run + + + lwe_thickness_of_ice_amount + ice fall on physics timestep + m + ice + real + (:) + inout + F + MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_run + + + lwe_thickness_of_snow_amount + snow fall on physics timestep + m + snow + real + (:) + inout + F + MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_run + + + ratio_of_snowfall_to_rainfall + ratio of snowfall to large-scale rainfall + frac + sr + real + (:) + out + F + MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_run + + + radar_reflectivity_10cm + instantaneous refl_10cm + dBZ + refl_10cm + real + (:,:) + out + F + MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_run + + + flag_for_radar_reflectivity + flag for radar reflectivity + flag + do_radar_ref + logical + + in + F + MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_run + + + effective_radius_of_stratiform_cloud_liquid_water_particle_in_um + eff. radius of cloud liquid water particle in micrometer + um + re_cloud + real + (:,:) + none + F + MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_run + + + effective_radius_of_stratiform_cloud_ice_particle_in_um + eff. radius of cloud ice water particle in micrometer + um + re_ice + real + (:,:) + none + F + MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_run + + + effective_radius_of_stratiform_cloud_snow_particle_in_um + effective radius of cloud snow particle in micrometers + um + re_snow + real + (:,:) + none + F + MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_run + + + mpi_comm + MPI communicator + index + mpicomm + integer + + in + F + MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_run + + + mpi_rank + current MPI-rank + index + mpirank + integer + + in + F + MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_run + + + mpi_root + master MPI-rank + index + mpiroot + integer + + in + F + MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_run + + + diff --git a/physics/mp_thompson_hrrr_post.xml b/physics/mp_thompson_hrrr_post.xml new file mode 100644 index 000000000..956dd892d --- /dev/null +++ b/physics/mp_thompson_hrrr_post.xml @@ -0,0 +1,207 @@ + + + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_mp_thompson_hrrr_post SCHEME_mp_thompson_hrrr_post SUBROUTINE_mp_thompson_hrrr_post_finalize + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_mp_thompson_hrrr_post SCHEME_mp_thompson_hrrr_post SUBROUTINE_mp_thompson_hrrr_post_finalize + + + + + horizontal_loop_extent + horizontal loop extent + count + ncol + integer + + in + F + MODULE_mp_thompson_hrrr_post SCHEME_mp_thompson_hrrr_post SUBROUTINE_mp_thompson_hrrr_post_run + + + vertical_dimension + number of vertical levels + count + nlev + integer + + in + F + MODULE_mp_thompson_hrrr_post SCHEME_mp_thompson_hrrr_post SUBROUTINE_mp_thompson_hrrr_post_run + + + air_temperature_save + air temperature before entering a physics scheme + K + tgrs_save + real + (:,:) + in + F + MODULE_mp_thompson_hrrr_post SCHEME_mp_thompson_hrrr_post SUBROUTINE_mp_thompson_hrrr_post_run + + + air_temperature_updated_by_physics + model layer mean temperature + K + tgrs + real + (:,:) + inout + F + MODULE_mp_thompson_hrrr_post SCHEME_mp_thompson_hrrr_post SUBROUTINE_mp_thompson_hrrr_post_run + + + dimensionless_exner_function_at_model_layers + dimensionless Exner function at model layer centers + none + prslk + real + (:,:) + in + F + MODULE_mp_thompson_hrrr_post SCHEME_mp_thompson_hrrr_post SUBROUTINE_mp_thompson_hrrr_post_run + + + time_step_for_physics + physics timestep + s + dtp + real + + in + F + MODULE_mp_thompson_hrrr_post SCHEME_mp_thompson_hrrr_post SUBROUTINE_mp_thompson_hrrr_post_run + + + mpi_comm + MPI communicator + index + mpicomm + integer + + in + F + MODULE_mp_thompson_hrrr_post SCHEME_mp_thompson_hrrr_post SUBROUTINE_mp_thompson_hrrr_post_run + + + mpi_rank + current MPI-rank + index + mpirank + integer + + in + F + MODULE_mp_thompson_hrrr_post SCHEME_mp_thompson_hrrr_post SUBROUTINE_mp_thompson_hrrr_post_run + + + mpi_root + master MPI-rank + index + mpiroot + integer + + in + F + MODULE_mp_thompson_hrrr_post SCHEME_mp_thompson_hrrr_post SUBROUTINE_mp_thompson_hrrr_post_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_mp_thompson_hrrr_post SCHEME_mp_thompson_hrrr_post SUBROUTINE_mp_thompson_hrrr_post_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_mp_thompson_hrrr_post SCHEME_mp_thompson_hrrr_post SUBROUTINE_mp_thompson_hrrr_post_run + + + + + horizontal_loop_extent + horizontal loop extent + count + ncol + integer + + in + F + MODULE_mp_thompson_hrrr_post SCHEME_mp_thompson_hrrr_post SUBROUTINE_mp_thompson_hrrr_post_init + + + cell_area + area of the grid cell + m2 + area + real + (:) + in + F + MODULE_mp_thompson_hrrr_post SCHEME_mp_thompson_hrrr_post SUBROUTINE_mp_thompson_hrrr_post_init + + + limit_for_temperature_tendency_for_microphysics + temperature tendency limiter per physics time step + K s-1 + ttendlim + real + + in + F + MODULE_mp_thompson_hrrr_post SCHEME_mp_thompson_hrrr_post SUBROUTINE_mp_thompson_hrrr_post_init + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_mp_thompson_hrrr_post SCHEME_mp_thompson_hrrr_post SUBROUTINE_mp_thompson_hrrr_post_init + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_mp_thompson_hrrr_post SCHEME_mp_thompson_hrrr_post SUBROUTINE_mp_thompson_hrrr_post_init + + + diff --git a/physics/mp_thompson_hrrr_pre.xml b/physics/mp_thompson_hrrr_pre.xml new file mode 100644 index 000000000..3939c1338 --- /dev/null +++ b/physics/mp_thompson_hrrr_pre.xml @@ -0,0 +1,337 @@ + + + + + + horizontal_loop_extent + horizontal loop extent + count + ncol + integer + + in + F + MODULE_mp_thompson_hrrr_pre SCHEME_mp_thompson_hrrr_pre SUBROUTINE_mp_thompson_hrrr_pre_run + + + vertical_dimension + number of vertical levels + count + nlev + integer + + in + F + MODULE_mp_thompson_hrrr_pre SCHEME_mp_thompson_hrrr_pre SUBROUTINE_mp_thompson_hrrr_pre_run + + + index_of_time_step + current forecast iteration + index + kdt + integer + + in + F + MODULE_mp_thompson_hrrr_pre SCHEME_mp_thompson_hrrr_pre SUBROUTINE_mp_thompson_hrrr_pre_run + + + gravitational_acceleration + gravitational acceleration + m s-2 + con_g + real + + in + F + MODULE_mp_thompson_hrrr_pre SCHEME_mp_thompson_hrrr_pre SUBROUTINE_mp_thompson_hrrr_pre_run + + + gas_constant_dry_air + ideal gas constant for dry air + J kg-1 K-1 + con_rd + real + + in + F + MODULE_mp_thompson_hrrr_pre SCHEME_mp_thompson_hrrr_pre SUBROUTINE_mp_thompson_hrrr_pre_run + + + water_vapor_specific_humidity_updated_by_physics + water vapor specific humidity + kg kg-1 + spechum + real + (:,:) + inout + F + MODULE_mp_thompson_hrrr_pre SCHEME_mp_thompson_hrrr_pre SUBROUTINE_mp_thompson_hrrr_pre_run + + + cloud_condensed_water_mixing_ratio_updated_by_physics + cloud water mixing ratio wrt dry+vapor (no condensates) + kg kg-1 + qc + real + (:,:) + inout + F + MODULE_mp_thompson_hrrr_pre SCHEME_mp_thompson_hrrr_pre SUBROUTINE_mp_thompson_hrrr_pre_run + + + rain_water_mixing_ratio_updated_by_physics + rain water mixing ratio wrt dry+vapor (no condensates) + kg kg-1 + qr + real + (:,:) + inout + F + MODULE_mp_thompson_hrrr_pre SCHEME_mp_thompson_hrrr_pre SUBROUTINE_mp_thompson_hrrr_pre_run + + + ice_water_mixing_ratio_updated_by_physics + ice water mixing ratio wrt dry+vapor (no condensates) + kg kg-1 + qi + real + (:,:) + inout + F + MODULE_mp_thompson_hrrr_pre SCHEME_mp_thompson_hrrr_pre SUBROUTINE_mp_thompson_hrrr_pre_run + + + snow_water_mixing_ratio_updated_by_physics + snow water mixing ratio wrt dry+vapor (no condensates) + kg kg-1 + qs + real + (:,:) + inout + F + MODULE_mp_thompson_hrrr_pre SCHEME_mp_thompson_hrrr_pre SUBROUTINE_mp_thompson_hrrr_pre_run + + + graupel_mixing_ratio_updated_by_physics + graupel mixing ratio wrt dry+vapor (no condensates) + kg kg-1 + qg + real + (:,:) + inout + F + MODULE_mp_thompson_hrrr_pre SCHEME_mp_thompson_hrrr_pre SUBROUTINE_mp_thompson_hrrr_pre_run + + + ice_number_concentration_updated_by_physics + ice number concentration + kg-1 + ni + real + (:,:) + inout + F + MODULE_mp_thompson_hrrr_pre SCHEME_mp_thompson_hrrr_pre SUBROUTINE_mp_thompson_hrrr_pre_run + + + rain_number_concentration_updated_by_physics + rain number concentration + kg-1 + nr + real + (:,:) + inout + F + MODULE_mp_thompson_hrrr_pre SCHEME_mp_thompson_hrrr_pre SUBROUTINE_mp_thompson_hrrr_pre_run + + + flag_for_aerosol_physics + flag for aerosol-aware physics + flag + is_aerosol_aware + logical + + in + F + MODULE_mp_thompson_hrrr_pre SCHEME_mp_thompson_hrrr_pre SUBROUTINE_mp_thompson_hrrr_pre_run + + + cloud_droplet_number_concentration_updated_by_physics + cloud droplet number concentration + kg-1 + nc + real + (:,:) + inout + T + MODULE_mp_thompson_hrrr_pre SCHEME_mp_thompson_hrrr_pre SUBROUTINE_mp_thompson_hrrr_pre_run + + + water_friendly_aerosol_number_concentration_updated_by_physics + number concentration of water-friendly aerosols + kg-1 + nwfa + real + (:,:) + inout + T + MODULE_mp_thompson_hrrr_pre SCHEME_mp_thompson_hrrr_pre SUBROUTINE_mp_thompson_hrrr_pre_run + + + ice_friendly_aerosol_number_concentration_updated_by_physics + number concentration of ice-friendly aerosols + kg-1 + nifa + real + (:,:) + inout + T + MODULE_mp_thompson_hrrr_pre SCHEME_mp_thompson_hrrr_pre SUBROUTINE_mp_thompson_hrrr_pre_run + + + tendency_of_water_friendly_aerosols_at_surface + instantaneous fake water-friendly surface aerosol source + kg-1 s-1 + nwfa2d + real + (:) + inout + T + MODULE_mp_thompson_hrrr_pre SCHEME_mp_thompson_hrrr_pre SUBROUTINE_mp_thompson_hrrr_pre_run + + + tendency_of_ice_friendly_aerosols_at_surface + instantaneous fake ice-friendly surface aerosol source + kg-1 s-1 + nifa2d + real + (:) + inout + T + MODULE_mp_thompson_hrrr_pre SCHEME_mp_thompson_hrrr_pre SUBROUTINE_mp_thompson_hrrr_pre_run + + + air_temperature_updated_by_physics + model layer mean temperature + K + tgrs + real + (:,:) + in + F + MODULE_mp_thompson_hrrr_pre SCHEME_mp_thompson_hrrr_pre SUBROUTINE_mp_thompson_hrrr_pre_run + + + air_temperature_save + air temperature before entering a physics scheme + K + tgrs_save + real + (:,:) + out + F + MODULE_mp_thompson_hrrr_pre SCHEME_mp_thompson_hrrr_pre SUBROUTINE_mp_thompson_hrrr_pre_run + + + air_pressure + mean layer pressure + Pa + prsl + real + (:,:) + in + F + MODULE_mp_thompson_hrrr_pre SCHEME_mp_thompson_hrrr_pre SUBROUTINE_mp_thompson_hrrr_pre_run + + + geopotential + geopotential at model layer centers + m2 s-2 + phil + real + (:,:) + in + F + MODULE_mp_thompson_hrrr_pre SCHEME_mp_thompson_hrrr_pre SUBROUTINE_mp_thompson_hrrr_pre_run + + + cell_area + area of the grid cell + m2 + area + real + (:) + in + F + MODULE_mp_thompson_hrrr_pre SCHEME_mp_thompson_hrrr_pre SUBROUTINE_mp_thompson_hrrr_pre_run + + + mpi_comm + MPI communicator + index + mpicomm + integer + + in + F + MODULE_mp_thompson_hrrr_pre SCHEME_mp_thompson_hrrr_pre SUBROUTINE_mp_thompson_hrrr_pre_run + + + mpi_rank + current MPI-rank + index + mpirank + integer + + in + F + MODULE_mp_thompson_hrrr_pre SCHEME_mp_thompson_hrrr_pre SUBROUTINE_mp_thompson_hrrr_pre_run + + + mpi_root + master MPI-rank + index + mpiroot + integer + + in + F + MODULE_mp_thompson_hrrr_pre SCHEME_mp_thompson_hrrr_pre SUBROUTINE_mp_thompson_hrrr_pre_run + + + ccpp_block_number + for explicit data blocking: block number of this block + index + blkno + integer + + in + F + MODULE_mp_thompson_hrrr_pre SCHEME_mp_thompson_hrrr_pre SUBROUTINE_mp_thompson_hrrr_pre_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_mp_thompson_hrrr_pre SCHEME_mp_thompson_hrrr_pre SUBROUTINE_mp_thompson_hrrr_pre_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_mp_thompson_hrrr_pre SCHEME_mp_thompson_hrrr_pre SUBROUTINE_mp_thompson_hrrr_pre_run + + + + diff --git a/physics/mynnedmf_wrapper.xml b/physics/mynnedmf_wrapper.xml new file mode 100644 index 000000000..3735485bd --- /dev/null +++ b/physics/mynnedmf_wrapper.xml @@ -0,0 +1,1052 @@ + + + + + + + horizontal_dimension + horizontal dimension + count + ix + integer + + in + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + horizontal_loop_extent + horizontal loop extent + count + im + integer + + in + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + vertical_dimension + vertical layer dimension + count + levs + integer + + in + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + flag_for_first_time_step + flag signaling first time step for time integration loop + flag + flag_init + logical + + in + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + flag_for_restart + flag for restart (warmstart) or coldstart + flag + flag_restart + logical + + in + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + time_step_for_physics + time step for physics + s + delt + real + + in + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + cell_size + size of the grid cell + m + dx + real + (:) + in + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + surface_roughness_length + surface roughness length in cm + cm + zorl + real + (:) + in + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + geopotential_at_interface + geopotential at model layer interfaces + m2 s-2 + phii + real + (:,:) + in + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + x_wind + x component of layer wind + m s-1 + U + real + (:,:) + in + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + y_wind + y component of layer wind + m s-1 + V + real + (:,:) + in + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + omega + layer mean vertical velocity + Pa s-1 + omega + real + (:,:) + in + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + air_temperature + layer mean air temperature + K + T3D + real + (:,:) + in + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + water_vapor_specific_humidity + water vapor specific humidity + kg kg-1 + qgrs_water_vapor + real + (:,:) + in + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + cloud_condensed_water_mixing_ratio + moist (dry+vapor, no condensates) mixing ratio of cloud water (condensate) + kg kg-1 + qgrs_liquid_cloud + real + (:,:) + in + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + ice_water_mixing_ratio + moist (dry+vapor, no condensates) mixing ratio of ice water + kg kg-1 + qgrs_ice_cloud + real + (:,:) + in + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + cloud_droplet_number_concentration + number concentration of cloud droplets (liquid) + kg-1 + qgrs_cloud_droplet_num_conc + real + (:,:) + in + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + ice_number_concentration + number concentration of ice + kg-1 + qgrs_cloud_ice_num_conc + real + (:,:) + in + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + ozone_mixing_ratio + ozone mixing ratio + kg kg-1 + qgrs_ozone + real + (:,:) + in + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + water_friendly_aerosol_number_concentration + number concentration of water-friendly aerosols + kg-1 + qgrs_water_aer_num_conc + real + (:,:) + in + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + ice_friendly_aerosol_number_concentration + number concentration of ice-friendly aerosols + kg-1 + qgrs_ice_aer_num_conc + real + (:,:) + in + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + air_pressure + mean layer pressure + Pa + prsl + real + (:,:) + in + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + dimensionless_exner_function_at_model_layers + Exner function at layers + none + exner + real + (:,:) + in + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + sea_land_ice_mask_real + landmask: sea/land/ice=0/1/2 + flag + slmsk + real + (:) + in + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + surface_skin_temperature + surface temperature + K + tsurf + real + (:) + in + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + surface_specific_humidity + surface air saturation specific humidity + kg kg-1 + qsfc + real + (:) + in + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + surface_air_pressure + surface pressure + Pa + ps + real + (:) + in + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + surface_friction_velocity + boundary layer parameter + m s-1 + ust + real + (:) + in + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + surface_drag_wind_speed_for_momentum_in_air + momentum exchange coefficient + m s-1 + ch + real + (:) + out + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + kinematic_surface_upward_sensible_heat_flux + kinematic surface upward sensible heat flux + K m s-1 + hflx + real + (:) + in + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + kinematic_surface_upward_latent_heat_flux + kinematic surface upward latent heat flux + kg kg-1 m s-1 + qflx + real + (:) + in + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + wind_speed_at_lowest_model_layer + wind speed at lowest model level + m s-1 + wspd + real + (:) + in + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + bulk_richardson_number_at_lowest_model_level + bulk Richardson number at the surface + none + rb + real + (:) + in + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + instantaneous_surface_upward_sensible_heat_flux + surface upward sensible heat flux valid for current call + W m-2 + dtsfc1 + real + (:) + out + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + instantaneous_surface_upward_latent_heat_flux + surface upward latent heat flux valid for current call + W m-2 + dqsfc1 + real + (:) + out + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + instantaneous_surface_upward_sensible_heat_flux_for_diag + instantaneous sfc sensible heat flux multiplied by timestep + W m-2 + dtsfci_diag + real + (:) + out + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + instantaneous_surface_upward_latent_heat_flux_for_diag + instantaneous sfc latent heat flux multiplied by timestep + W m-2 + dqsfci_diag + real + (:) + out + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + cumulative_surface_upward_sensible_heat_flux_for_diag_multiplied_by_timestep + cumulative sfc sensible heat flux multiplied by timestep + W m-2 s + dtsfc_diag + real + (:) + out + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + cumulative_surface_upward_latent_heat_flux_for_diag_multiplied_by_timestep + cumulative sfc latent heat flux multiplied by timestep + W m-2 s + dqsfc_diag + real + (:) + out + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + reciprocal_of_obukhov_length + one over obukhov length + m-1 + recmol + real + (:) + in + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + tke_at_mass_points + 2 x tke at mass points + m2 s-2 + qke + real + (:,:) + inout + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + turbulent_kinetic_energy + turbulent kinetic energy + J + qke_adv + real + (:,:) + inout + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + t_prime_squared + temperature fluctuation squared + K2 + tsq + real + (:,:) + out + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + q_prime_squared + water vapor fluctuation squared + kg2 kg-2 + qsq + real + (:,:) + out + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + t_prime_q_prime + covariance of temperature and moisture + K kg kg-1 + cov + real + (:,:) + out + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + mixing_length + mixing length in meters + m + el_pbl + real + (:,:) + inout + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + stability_function_for_heat + stability function for heat + none + Sh3D + real + (:,:) + inout + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + atmosphere_heat_diffusivity_for_mynnpbl + diffusivity for heat for MYNN PBL (defined for all mass levels) + m2 s-1 + exch_h + real + (:,:) + out + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + atmosphere_momentum_diffusivity_for_mynnpbl + diffusivity for momentum for MYNN PBL (defined for all mass levels) + m2 s-1 + exch_m + real + (:,:) + out + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + atmosphere_boundary_layer_thickness + PBL thickness + m + PBLH + real + (:) + inout + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + vertical_index_at_top_of_atmosphere_boundary_layer + PBL top model level index + index + kpbl + integer + (:) + inout + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + subgrid_cloud_mixing_ratio_pbl + subgrid cloud cloud mixing ratio from PBL scheme + kg kg-1 + QC_BL + real + (:,:) + inout + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + subgrid_cloud_fraction_pbl + subgrid cloud fraction from PBL scheme + frac + CLDFRA_BL + real + (:,:) + inout + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + emdf_updraft_area + updraft area from mass flux scheme + frac + edmf_a + real + (:,:) + inout + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + emdf_updraft_vertical_velocity + updraft vertical velocity from mass flux scheme + m s-1 + edmf_w + real + (:,:) + inout + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + emdf_updraft_total_water + updraft total water from mass flux scheme + kg kg-1 + edmf_qt + real + (:,:) + inout + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + emdf_updraft_theta_l + updraft theta-l from mass flux scheme + K + edmf_thl + real + (:,:) + inout + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + emdf_updraft_entrainment_rate + updraft entrainment rate from mass flux scheme + s-1 + edmf_ent + real + (:,:) + inout + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + emdf_updraft_cloud_water + updraft cloud water from mass flux scheme + kg kg-1 + edmf_qc + real + (:,:) + inout + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + number_of_plumes + number of plumes per grid column + count + nupdraft + integer + (:) + inout + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + maximum_mass_flux + maximum mass flux within a column + m s-1 + maxMF + real + (:) + out + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + k_level_of_highest_reaching_plume + k-level of highest reaching plume + count + ktop_shallow + integer + (:) + inout + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_step + total sky longwave heating rate + K s-1 + RTHRATEN + real + (:,:) + in + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + tendency_of_x_wind_due_to_model_physics + updated tendency of the x wind + m s-2 + dudt + real + (:,:) + inout + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + tendency_of_y_wind_due_to_model_physics + updated tendency of the y wind + m s-2 + dvdt + real + (:,:) + inout + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + tendency_of_air_temperature_due_to_model_physics + updated tendency of the temperature + K s-1 + dtdt + real + (:,:) + inout + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + tendency_of_water_vapor_specific_humidity_due_to_model_physics + water vapor specific humidity tendency due to model physics + kg kg-1 s-1 + dqdt_water_vapor + real + (:,:) + inout + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + tendency_of_liquid_cloud_water_mixing_ratio_due_to_model_physics + cloud condensed water mixing ratio tendency due to model physics + kg kg-1 s-1 + dqdt_liquid_cloud + real + (:,:) + inout + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + tendency_of_ice_cloud_water_mixing_ratio_due_to_model_physics + cloud condensed water mixing ratio tendency due to model physics + kg kg-1 s-1 + dqdt_ice_cloud + real + (:,:) + inout + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + tendency_of_ozone_mixing_ratio_due_to_model_physics + ozone mixing ratio tendency due to model physics + kg kg-1 s-1 + dqdt_ozone + real + (:,:) + inout + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + tendency_of_cloud_droplet_number_concentration_due_to_model_physics + number conc. of cloud droplets (liquid) tendency due to model physics + kg-1 s-1 + dqdt_cloud_droplet_num_conc + real + (:,:) + inout + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + tendency_of_ice_number_concentration_due_to_model_physics + number conc. of ice tendency due to model physics + kg-1 s-1 + dqdt_ice_num_conc + real + (:,:) + inout + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + tendency_of_water_friendly_aerosol_number_concentration_due_to_model_physics + number conc. of water-friendly aerosols tendency due to model physics + kg-1 s-1 + dqdt_water_aer_num_conc + real + (:,:) + inout + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + tendency_of_ice_friendly_aerosol_number_concentration_due_to_model_physics + number conc. of ice-friendly aerosols tendency due to model physics + kg-1 s-1 + dqdt_ice_aer_num_conc + real + (:,:) + inout + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + grav_settling + flag to activate gravitational setting of fog + flag + grav_settling + integer + + in + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + tke_budget + flag for activating TKE budget + flag + bl_mynn_tkebudget + integer + + in + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + tke_advect + flag for activating TKE advect + flag + bl_mynn_tkeadvect + logical + + in + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + cloudpdf + flag to determine which cloud PDF to use + flag + bl_mynn_cloudpdf + integer + + in + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + mixing_length_flag + flag to determine which mixing length form to use + flag + bl_mynn_mixlength + integer + + in + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + edmf_flag + flag to activate the mass-flux scheme + flag + bl_mynn_edmf + integer + + in + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + edmf_momentum_transport_flag + flag to activate the transport of momentum + flag + bl_mynn_edmf_mom + integer + + in + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + edmf_tke_transport_flag + flag to activate the transport of TKE + flag + bl_mynn_edmf_tke + integer + + in + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + edmf_partition_flag + flag to partitioning of the MF and ED areas + flag + bl_mynn_edmf_part + integer + + in + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + cloud_specie_mix_flag + flag to activate mixing of cloud species + flag + bl_mynn_cloudmix + integer + + in + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + mix_total_water_flag + flag to mix total water or individual species + flag + bl_mynn_mixqt + integer + + in + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + couple_sgs_clouds_to_radiation_flag + flag for coupling sgs clouds to radiation + flag + icloud_bl + integer + + in + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + do_mynnsfclay + flag to activate MYNN surface layer + flag + do_mynnsfclay + logical + + in + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + flag_for_microphysics_scheme + choice of microphysics scheme + flag + imp_physics + integer + + in + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + flag_for_gfdl_microphysics_scheme + choice of GFDL microphysics scheme + flag + imp_physics_gfdl + integer + + in + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + flag_for_thompson_microphysics_scheme + choice of Thompson microphysics scheme + flag + imp_physics_thompson + integer + + in + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + flag_for_wsm6_microphysics_scheme + choice of WSM6 microphysics scheme + flag + imp_physics_wsm6 + integer + + in + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + flag_for_aerosol_physics + flag for aerosol physics + flag + ltaerosol + logical + + in + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + flag_print + control flag for diagnostic print out + flag + lprnt + logical + + in + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run + + + diff --git a/physics/mynnrad_post.xml b/physics/mynnrad_post.xml new file mode 100644 index 000000000..eb979fa04 --- /dev/null +++ b/physics/mynnrad_post.xml @@ -0,0 +1,106 @@ + + + + + + horizontal_dimension + horizontal dimension + count + ix + integer + + in + F + MODULE_mynnrad_post SCHEME_mynnrad_post SUBROUTINE_mynnrad_post_run + + + horizontal_loop_extent + horizontal loop extent + count + im + integer + + in + F + MODULE_mynnrad_post SCHEME_mynnrad_post SUBROUTINE_mynnrad_post_run + + + vertical_dimension + vertical layer dimension + count + levs + integer + + in + F + MODULE_mynnrad_post SCHEME_mynnrad_post SUBROUTINE_mynnrad_post_run + + + cloud_condensed_water_mixing_ratio + moist (dry+vapor, no condensates) mixing ratio of cloud water (condensate) + kg kg-1 + qc + real + (:,:) + out + F + MODULE_mynnrad_post SCHEME_mynnrad_post SUBROUTINE_mynnrad_post_run + + + ice_water_mixing_ratio + moist (dry+vapor, no condensates) mixing ratio of ice water + kg kg-1 + qi + real + (:,:) + out + F + MODULE_mynnrad_post SCHEME_mynnrad_post SUBROUTINE_mynnrad_post_run + + + cloud_condensed_water_mixing_ratio_save + moist (dry+vapor, no condensates) mixing ratio of cloud water (condensate) before entering a physics scheme + kg kg-1 + qc_save + real + (:,:) + in + F + MODULE_mynnrad_post SCHEME_mynnrad_post SUBROUTINE_mynnrad_post_run + + + ice_water_mixing_ratio_save + moist (dry+vapor, no condensates) mixing ratio of ice water before entering a physics scheme + kg kg-1 + qi_save + real + (:,:) + in + F + MODULE_mynnrad_post SCHEME_mynnrad_post SUBROUTINE_mynnrad_post_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_mynnrad_post SCHEME_mynnrad_post SUBROUTINE_mynnrad_post_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_mynnrad_post SCHEME_mynnrad_post SUBROUTINE_mynnrad_post_run + + + + diff --git a/physics/mynnrad_pre.xml b/physics/mynnrad_pre.xml new file mode 100644 index 000000000..772eda1e6 --- /dev/null +++ b/physics/mynnrad_pre.xml @@ -0,0 +1,216 @@ + + + + + + horizontal_dimension + horizontal dimension + count + ix + integer + + in + F + MODULE_mynnrad_pre SCHEME_mynnrad_pre SUBROUTINE_mynnrad_pre_run + + + horizontal_loop_extent + horizontal loop extent + count + im + integer + + in + F + MODULE_mynnrad_pre SCHEME_mynnrad_pre SUBROUTINE_mynnrad_pre_run + + + vertical_dimension + vertical layer dimension + count + levs + integer + + in + F + MODULE_mynnrad_pre SCHEME_mynnrad_pre SUBROUTINE_mynnrad_pre_run + + + cloud_condensed_water_mixing_ratio + moist (dry+vapor, no condensates) mixing ratio of cloud water (condensate) + kg kg-1 + qc + real + (:,:) + inout + F + MODULE_mynnrad_pre SCHEME_mynnrad_pre SUBROUTINE_mynnrad_pre_run + + + ice_water_mixing_ratio + moist (dry+vapor, no condensates) mixing ratio of ice water + kg kg-1 + qi + real + (:,:) + inout + F + MODULE_mynnrad_pre SCHEME_mynnrad_pre SUBROUTINE_mynnrad_pre_run + + + air_temperature + layer mean air temperature + K + T3D + real + (:,:) + in + F + MODULE_mynnrad_pre SCHEME_mynnrad_pre SUBROUTINE_mynnrad_pre_run + + + cloud_condensed_water_mixing_ratio_save + moist (dry+vapor, no condensates) mixing ratio of cloud water (condensate) before entering a physics scheme + kg kg-1 + qc_save + real + (:,:) + out + F + MODULE_mynnrad_pre SCHEME_mynnrad_pre SUBROUTINE_mynnrad_pre_run + + + ice_water_mixing_ratio_save + moist (dry+vapor, no condensates) mixing ratio of ice water before entering a physics scheme + kg kg-1 + qi_save + real + (:,:) + out + F + MODULE_mynnrad_pre SCHEME_mynnrad_pre SUBROUTINE_mynnrad_pre_run + + + subgrid_cloud_mixing_ratio_pbl + subgrid cloud cloud mixing ratio from PBL scheme + kg kg-1 + QC_BL + real + (:,:) + in + F + MODULE_mynnrad_pre SCHEME_mynnrad_pre SUBROUTINE_mynnrad_pre_run + + + subgrid_cloud_fraction_pbl + subgrid cloud fraction from PBL scheme + frac + CLDFRA_BL + real + (:,:) + in + F + MODULE_mynnrad_pre SCHEME_mynnrad_pre SUBROUTINE_mynnrad_pre_run + + + layer_pressure_thickness_for_radiation + layer pressure thickness on radiation levels + hPa + delp + real + (:,:) + out + F + MODULE_mynnrad_pre SCHEME_mynnrad_pre SUBROUTINE_mynnrad_pre_run + + + total_cloud_fraction + layer total cloud fraction + frac + clouds1 + real + (:,:) + inout + F + MODULE_mynnrad_pre SCHEME_mynnrad_pre SUBROUTINE_mynnrad_pre_run + + + cloud_liquid_water_path + layer cloud liquid water path + g m-2 + clouds2 + real + (:,:) + inout + F + MODULE_mynnrad_pre SCHEME_mynnrad_pre SUBROUTINE_mynnrad_pre_run + + + mean_effective_radius_for_liquid_cloud + mean effective radius for liquid cloud + micron + clouds3 + real + (:,:) + inout + F + MODULE_mynnrad_pre SCHEME_mynnrad_pre SUBROUTINE_mynnrad_pre_run + + + cloud_ice_water_path + layer cloud ice water path + g m-2 + clouds4 + real + (:,:) + inout + F + MODULE_mynnrad_pre SCHEME_mynnrad_pre SUBROUTINE_mynnrad_pre_run + + + mean_effective_radius_for_ice_cloud + mean effective radius for ice cloud + micron + clouds5 + real + (:,:) + inout + F + MODULE_mynnrad_pre SCHEME_mynnrad_pre SUBROUTINE_mynnrad_pre_run + + + sea_land_ice_mask_real + landmask: sea/land/ice=0/1/2 + flag + slmsk + real + (:) + in + F + MODULE_mynnrad_pre SCHEME_mynnrad_pre SUBROUTINE_mynnrad_pre_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_mynnrad_pre SCHEME_mynnrad_pre SUBROUTINE_mynnrad_pre_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_mynnrad_pre SCHEME_mynnrad_pre SUBROUTINE_mynnrad_pre_run + + + + diff --git a/physics/mynnsfc_wrapper.xml b/physics/mynnsfc_wrapper.xml new file mode 100644 index 000000000..787799ec9 --- /dev/null +++ b/physics/mynnsfc_wrapper.xml @@ -0,0 +1,700 @@ + + + + + + horizontal_dimension + horizontal dimension + count + ix + integer + + in + F + MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run + + + horizontal_loop_extent + horizontal loop extent + count + im + integer + + in + F + MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run + + + vertical_dimension + vertical layer dimension + count + levs + integer + + in + F + MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run + + + ccpp_loop_counter + loop counter for subcycling loops in CCPP + index + iter + integer + + in + F + MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run + + + flag_for_first_time_step + flag signaling first time step for time integration loop + flag + flag_init + logical + + in + F + MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run + + + flag_for_restart + flag for restart (warmstart) or coldstart + flag + flag_restart + logical + + in + F + MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run + + + time_step_for_physics + time step for physics + s + delt + real + + in + F + MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run + + + cell_size + size of the grid cell + m + dx + real + (:) + in + F + MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run + + + x_wind + x component of layer wind + m s-1 + u + real + (:,:) + in + F + MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run + + + y_wind + y component of layer wind + m s-1 + v + real + (:,:) + in + F + MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run + + + air_temperature + layer mean air temperature + K + t3d + real + (:,:) + in + F + MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run + + + water_vapor_specific_humidity + water vapor specific humidity + kg kg-1 + qvsh + real + (:,:) + in + F + MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run + + + cloud_condensed_water_mixing_ratio + moist (dry+vapor, no condensates) mixing ratio of cloud water (condensate) + kg kg-1 + qc + real + (:,:) + in + F + MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run + + + air_pressure + mean layer pressure + Pa + prsl + real + (:,:) + in + F + MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run + + + geopotential_at_interface + geopotential at model layer interfaces + m2 s-2 + phii + real + (:,:) + in + F + MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run + + + dimensionless_exner_function_at_model_layers + Exner function at layers + none + exner + real + (:,:) + in + F + MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run + + + t_prime_squared + temperature fluctuation squared + K2 + tsq + real + (:,:) + in + F + MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run + + + q_prime_squared + water vapor fluctuation squared + kg2 kg-2 + qsq + real + (:,:) + in + F + MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run + + + t_prime_q_prime + covariance of temperature and moisture + K kg kg-1 + cov + real + (:,:) + in + F + MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run + + + mixing_length + mixing length in meters + m + el_pbl + real + (:,:) + in + F + MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run + + + stability_function_for_heat + stability function for heat + none + Sh3D + real + (:,:) + in + F + MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run + + + subgrid_cloud_mixing_ratio_pbl + subgrid cloud cloud mixing ratio from PBL scheme + kg kg-1 + QC_BL + real + (:,:) + in + F + MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run + + + subgrid_cloud_fraction_pbl + subgrid cloud fraction from PBL scheme + frac + CLDFRA_BL + real + (:,:) + in + F + MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run + + + surface_air_pressure + surface pressure + Pa + ps + real + (:) + in + F + MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run + + + atmosphere_boundary_layer_thickness + PBL thickness + m + PBLH + real + (:) + in + F + MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run + + + sea_land_ice_mask_real + landmask: sea/land/ice=0/1/2 + flag + slmsk + real + (:) + in + F + MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run + + + surface_skin_temperature + surface temperature + K + tsk + real + (:) + in + F + MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run + + + surface_specific_humidity + surface air saturation specific humidity + kg kg-1 + qsfc + real + (:) + in + F + MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run + + + surface_snow_thickness_water_equivalent + water equivalent snow depth over land + mm + snowd + real + (:) + in + F + MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run + + + surface_roughness_length + surface roughness length in cm + cm + zorl + real + (:) + inout + F + MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run + + + surface_friction_velocity + boundary layer parameter + m s-1 + ust + real + (:) + inout + F + MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run + + + surface_friction_velocity_drag + friction velocity isolated for momentum only + m s-1 + ustm + real + (:) + inout + F + MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run + + + surface_stability_parameter + monin obukhov surface stability parameter + none + zol + real + (:) + inout + F + MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run + + + theta_star + temperature flux divided by ustar (temperature scale) + K + mol + real + (:) + inout + F + MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run + + + reciprocal_of_obukhov_length + one over obukhov length + m-1 + rmol + real + (:) + inout + F + MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run + + + Monin-Obukhov_similarity_function_for_momentum + Monin-Obukhov similarity parameter for momentum + none + fm + real + (:) + inout + F + MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run + + + Monin-Obukhov_similarity_function_for_heat + Monin-Obukhov similarity parameter for heat + none + fh + real + (:) + inout + F + MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run + + + Monin-Obukhov_similarity_function_for_momentum_at_10m + Monin-Obukhov similarity parameter for momentum + none + fm10 + real + (:) + inout + F + MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run + + + Monin-Obukhov_similarity_function_for_heat_at_2m + Monin-Obukhov similarity parameter for heat + none + fh2 + real + (:) + inout + F + MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run + + + wind_speed_at_lowest_model_layer + wind speed at lowest model level + m s-1 + wspd + real + (:) + inout + F + MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run + + + bulk_richardson_number_at_lowest_model_level + bulk Richardson number at the surface + none + br + real + (:) + inout + F + MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run + + + surface_drag_wind_speed_for_momentum_in_air + momentum exchange coefficient + m s-1 + ch + real + (:) + inout + F + MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run + + + kinematic_surface_upward_sensible_heat_flux + kinematic surface upward sensible heat flux + K m s-1 + hflx + real + (:) + inout + F + MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run + + + kinematic_surface_upward_latent_heat_flux + kinematic surface upward latent heat flux + kg kg-1 m s-1 + QFX + real + (:) + inout + F + MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run + + + surface_latent_heat + latent heating at the surface (pos = up) + W m-2 + lh + real + (:) + inout + F + MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run + + + surface_exchange_coefficient_for_heat + surface exchange coefficient for heat + W m-2 K-1 + flhc + real + (:) + inout + F + MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run + + + surface_exchange_coefficient_for_moisture + surface exchange coefficient for moisture + kg m-2 s-1 + flqc + real + (:) + inout + F + MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run + + + x_wind_at_10m + 10 meter u wind speed + m s-1 + u10 + real + (:) + inout + F + MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run + + + y_wind_at_10m + 10 meter v wind speed + m s-1 + v10 + real + (:) + inout + F + MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run + + + potential_temperature_at_2m + 2 meter potential temperature + K + th2 + real + (:) + inout + F + MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run + + + temperature_at_2m + 2 meter temperature + K + t2 + real + (:) + inout + F + MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run + + + specific_humidity_at_2m + 2 meter specific humidity + kg kg-1 + q2 + real + (:) + inout + F + MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run + + + surface_wind_enhancement_due_to_convection + surface wind enhancement due to convection + m s-1 + wstar + real + (:) + inout + F + MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run + + + surface_exchange_coefficient_for_heat_at_2m + exchange coefficient for heat at 2 meters + m s-1 + chs2 + real + (:) + inout + F + MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run + + + surface_exchange_coefficient_for_moisture_at_2m + exchange coefficient for moisture at 2 meters + m s-1 + cqs2 + real + (:) + inout + F + MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run + + + surface_drag_coefficient_for_momentum_in_air + surface exchange coeff for momentum + none + cda + real + (:) + inout + F + MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run + + + surface_drag_coefficient_for_heat_and_moisture_in_air + surface exchange coeff heat moisture + none + cka + real + (:) + inout + F + MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run + + + surface_wind_stress + surface wind stress + m2 s-2 + stress + real + (:) + inout + F + MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run + + + cloudpdf + flag to determine which cloud PDF to use + flag + bl_mynn_cloudpdf + integer + + in + F + MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run + + + couple_sgs_clouds_to_radiation_flag + flag for coupling sgs clouds to radiation + flag + icloud_bl + integer + + in + F + MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run + + + flag_print + control flag for diagnostic print out + flag + lprnt + logical + + none + F + MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run + + + + diff --git a/physics/ozphys.xml b/physics/ozphys.xml new file mode 100644 index 000000000..60abfcd51 --- /dev/null +++ b/physics/ozphys.xml @@ -0,0 +1,238 @@ + + + + + horizontal_dimension + horizontal dimension + count + ix + integer + + in + F + MODULE_ozphys SCHEME_ozphys SUBROUTINE_ozphys_run + + + horizontal_loop_extent + horizontal loop extent + count + im + integer + + in + F + MODULE_ozphys SCHEME_ozphys SUBROUTINE_ozphys_run + + + vertical_dimension + number of vertical layers + count + levs + integer + + in + F + MODULE_ozphys SCHEME_ozphys SUBROUTINE_ozphys_run + + + vertical_dimension_of_ozone_forcing_data + number of vertical layers in ozone forcing data + count + ko3 + integer + + in + F + MODULE_ozphys SCHEME_ozphys SUBROUTINE_ozphys_run + + + time_step_for_physics + physics time step + s + dt + real + + in + F + MODULE_ozphys SCHEME_ozphys SUBROUTINE_ozphys_run + + + ozone_concentration_updated_by_physics + ozone concentration updated by physics + kg kg-1 + oz + real + (:,:) + inout + F + MODULE_ozphys SCHEME_ozphys SUBROUTINE_ozphys_run + + + air_temperature_updated_by_physics + updated air temperature + K + tin + real + (:,:) + in + F + MODULE_ozphys SCHEME_ozphys SUBROUTINE_ozphys_run + + + natural_log_of_ozone_forcing_data_pressure_levels + natural log of ozone forcing data pressure levels + log(Pa) + po3 + real + (:) + in + F + MODULE_ozphys SCHEME_ozphys SUBROUTINE_ozphys_run + + + air_pressure + mid-layer pressure + Pa + prsl + real + (:,:) + in + F + MODULE_ozphys SCHEME_ozphys SUBROUTINE_ozphys_run + + + ozone_forcing + ozone forcing coefficients + various + prdout + real + (:,:,:) + in + F + MODULE_ozphys SCHEME_ozphys SUBROUTINE_ozphys_run + + + number_of_coefficients_in_ozone_forcing_data + number of coefficients in ozone forcing data + index + oz_coeff + integer + + in + F + MODULE_ozphys SCHEME_ozphys SUBROUTINE_ozphys_run + + + air_pressure_difference_between_midlayers + difference between mid-layer pressures + Pa + delp + real + (:,:) + in + F + MODULE_ozphys SCHEME_ozphys SUBROUTINE_ozphys_run + + + flag_diagnostics_3D + flag for calculating 3-D diagnostic fields + flag + ldiag3d + logical + + in + F + MODULE_ozphys SCHEME_ozphys SUBROUTINE_ozphys_run + + + cumulative_change_in_ozone_concentration_due_to_production_and_loss_rate + cumulative change in ozone concentration due to production and loss rate + kg kg-1 + ozp1 + real + (:,:) + inout + F + MODULE_ozphys SCHEME_ozphys SUBROUTINE_ozphys_run + + + cumulative_change_in_ozone_concentration_due_to_ozone_mixing_ratio + cumulative change in ozone concentration due to ozone mixing ratio + kg kg-1 + ozp2 + real + (:,:) + inout + F + MODULE_ozphys SCHEME_ozphys SUBROUTINE_ozphys_run + + + cumulative_change_in_ozone_concentration_due_to_temperature + cumulative change in ozone concentration due to temperature + kg kg-1 + ozp3 + real + (:,:) + inout + F + MODULE_ozphys SCHEME_ozphys SUBROUTINE_ozphys_run + + + cumulative_change_in_ozone_concentration_due_to_overhead_ozone_column + cumulative change in ozone concentration due to overhead ozone column + kg kg-1 + ozp4 + real + (:,:) + inout + F + MODULE_ozphys SCHEME_ozphys SUBROUTINE_ozphys_run + + + gravitational_acceleration + gravitational acceleration + m s-2 + con_g + real + + in + F + MODULE_ozphys SCHEME_ozphys SUBROUTINE_ozphys_run + + + mpi_rank + rank of the current MPI task + index + me + integer + + in + F + MODULE_ozphys SCHEME_ozphys SUBROUTINE_ozphys_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_ozphys SCHEME_ozphys SUBROUTINE_ozphys_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_ozphys SCHEME_ozphys SUBROUTINE_ozphys_run + + + + + diff --git a/physics/ozphys_2015.xml b/physics/ozphys_2015.xml new file mode 100644 index 000000000..5c244b381 --- /dev/null +++ b/physics/ozphys_2015.xml @@ -0,0 +1,238 @@ + + + + + horizontal_dimension + horizontal dimension + count + ix + integer + + in + F + MODULE_ozphys_2015 SCHEME_ozphys_2015 SUBROUTINE_ozphys_2015_run + + + horizontal_loop_extent + horizontal loop extent + count + im + integer + + in + F + MODULE_ozphys_2015 SCHEME_ozphys_2015 SUBROUTINE_ozphys_2015_run + + + vertical_dimension + number of vertical layers + count + levs + integer + + in + F + MODULE_ozphys_2015 SCHEME_ozphys_2015 SUBROUTINE_ozphys_2015_run + + + vertical_dimension_of_ozone_forcing_data + number of vertical layers in ozone forcing data + count + ko3 + integer + + in + F + MODULE_ozphys_2015 SCHEME_ozphys_2015 SUBROUTINE_ozphys_2015_run + + + time_step_for_physics + physics time step + s + dt + real + + in + F + MODULE_ozphys_2015 SCHEME_ozphys_2015 SUBROUTINE_ozphys_2015_run + + + ozone_concentration_updated_by_physics + ozone concentration updated by physics + kg kg-1 + oz + real + (:,:) + inout + F + MODULE_ozphys_2015 SCHEME_ozphys_2015 SUBROUTINE_ozphys_2015_run + + + air_temperature_updated_by_physics + updated air temperature + K + tin + real + (:,:) + in + F + MODULE_ozphys_2015 SCHEME_ozphys_2015 SUBROUTINE_ozphys_2015_run + + + natural_log_of_ozone_forcing_data_pressure_levels + natural log of ozone forcing data pressure levels + log(Pa) + po3 + real + (:) + in + F + MODULE_ozphys_2015 SCHEME_ozphys_2015 SUBROUTINE_ozphys_2015_run + + + air_pressure + mid-layer pressure + Pa + prsl + real + (:,:) + in + F + MODULE_ozphys_2015 SCHEME_ozphys_2015 SUBROUTINE_ozphys_2015_run + + + ozone_forcing + ozone forcing data + various + prdout + real + (:,:,:) + in + F + MODULE_ozphys_2015 SCHEME_ozphys_2015 SUBROUTINE_ozphys_2015_run + + + number_of_coefficients_in_ozone_forcing_data + number of coefficients in ozone forcing data + index + pl_coeff + integer + + in + F + MODULE_ozphys_2015 SCHEME_ozphys_2015 SUBROUTINE_ozphys_2015_run + + + air_pressure_difference_between_midlayers + difference between mid-layer pressures + Pa + delp + real + (:,:) + in + F + MODULE_ozphys_2015 SCHEME_ozphys_2015 SUBROUTINE_ozphys_2015_run + + + flag_diagnostics_3D + flag for calculating 3-D diagnostic fields + flag + ldiag3d + logical + + in + F + MODULE_ozphys_2015 SCHEME_ozphys_2015 SUBROUTINE_ozphys_2015_run + + + cumulative_change_in_ozone_concentration_due_to_production_and_loss_rate + cumulative change in ozone concentration due to production and loss rate + kg kg-1 + ozp1 + real + (:,:) + inout + F + MODULE_ozphys_2015 SCHEME_ozphys_2015 SUBROUTINE_ozphys_2015_run + + + cumulative_change_in_ozone_concentration_due_to_ozone_mixing_ratio + cumulative change in ozone concentration due to ozone mixing ratio + kg kg-1 + ozp2 + real + (:,:) + inout + F + MODULE_ozphys_2015 SCHEME_ozphys_2015 SUBROUTINE_ozphys_2015_run + + + cumulative_change_in_ozone_concentration_due_to_temperature + cumulative change in ozone concentration due to temperature + kg kg-1 + ozp3 + real + (:,:) + inout + F + MODULE_ozphys_2015 SCHEME_ozphys_2015 SUBROUTINE_ozphys_2015_run + + + cumulative_change_in_ozone_concentration_due_to_overhead_ozone_column + cumulative change in ozone concentration due to overhead ozone column + kg kg-1 + ozp4 + real + (:,:) + inout + F + MODULE_ozphys_2015 SCHEME_ozphys_2015 SUBROUTINE_ozphys_2015_run + + + gravitational_acceleration + gravitational acceleration + m s-2 + con_g + real + + in + F + MODULE_ozphys_2015 SCHEME_ozphys_2015 SUBROUTINE_ozphys_2015_run + + + mpi_rank + rank of the current MPI task + index + me + integer + + in + F + MODULE_ozphys_2015 SCHEME_ozphys_2015 SUBROUTINE_ozphys_2015_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_ozphys_2015 SCHEME_ozphys_2015 SUBROUTINE_ozphys_2015_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_ozphys_2015 SCHEME_ozphys_2015 SUBROUTINE_ozphys_2015_run + + + + + diff --git a/physics/rayleigh_damp.xml b/physics/rayleigh_damp.xml new file mode 100644 index 000000000..f3c519cb6 --- /dev/null +++ b/physics/rayleigh_damp.xml @@ -0,0 +1,205 @@ + + + + + + + flag_idealized_physics + flag for idealized physics + flag + lsidea + logical + + in + F + MODULE_rayleigh_damp SCHEME_rayleigh_damp SUBROUTINE_rayleigh_damp_run + + + horizontal_loop_extent + horizontal loop extent + count + im + integer + + in + F + MODULE_rayleigh_damp SCHEME_rayleigh_damp SUBROUTINE_rayleigh_damp_run + + + horizontal_dimension + horizontal dimension + count + ix + integer + + in + F + MODULE_rayleigh_damp SCHEME_rayleigh_damp SUBROUTINE_rayleigh_damp_run + + + vertical_dimension + number of vertical layers + count + km + integer + + in + F + MODULE_rayleigh_damp SCHEME_rayleigh_damp SUBROUTINE_rayleigh_damp_run + + + tendency_of_y_wind_due_to_model_physics + meridional wind tendency due to model physics + m s-2 + A + real + (:,:) + inout + F + MODULE_rayleigh_damp SCHEME_rayleigh_damp SUBROUTINE_rayleigh_damp_run + + + tendency_of_x_wind_due_to_model_physics + zonal wind tendency due to model physics + m s-2 + B + real + (:,:) + inout + F + MODULE_rayleigh_damp SCHEME_rayleigh_damp SUBROUTINE_rayleigh_damp_run + + + tendency_of_air_temperature_due_to_model_physics + air temperature tendency due to model physics + K s-1 + C + real + (:,:) + inout + F + MODULE_rayleigh_damp SCHEME_rayleigh_damp SUBROUTINE_rayleigh_damp_run + + + x_wind + zonal wind + m s-1 + u1 + real + (:,:) + in + F + MODULE_rayleigh_damp SCHEME_rayleigh_damp SUBROUTINE_rayleigh_damp_run + + + y_wind + meridional wind + m s-1 + v1 + real + (:,:) + in + F + MODULE_rayleigh_damp SCHEME_rayleigh_damp SUBROUTINE_rayleigh_damp_run + + + time_step_for_physics + physics time step + s + dt + real + + in + F + MODULE_rayleigh_damp SCHEME_rayleigh_damp SUBROUTINE_rayleigh_damp_run + + + specific_heat_of_dry_air_at_constant_pressure + specific heat of dry air at constant pressure + J kg-1 K-1 + cp + real + + in + F + MODULE_rayleigh_damp SCHEME_rayleigh_damp SUBROUTINE_rayleigh_damp_run + + + number_of_vertical_layers_for_radiation_calculations + number of vertical layers for radiation calculations + count + levr + integer + + in + F + MODULE_rayleigh_damp SCHEME_rayleigh_damp SUBROUTINE_rayleigh_damp_run + + + surface_air_pressure + surface pressure + Pa + pgr + real + (:) + in + F + MODULE_rayleigh_damp SCHEME_rayleigh_damp SUBROUTINE_rayleigh_damp_run + + + air_pressure + mid-layer pressure + Pa + prsl + real + (:,:) + in + F + MODULE_rayleigh_damp SCHEME_rayleigh_damp SUBROUTINE_rayleigh_damp_run + + + pressure_cutoff_for_rayleigh_damping + pressure level above which to apply Rayleigh damping + Pa + prslrd0 + real + + in + F + MODULE_rayleigh_damp SCHEME_rayleigh_damp SUBROUTINE_rayleigh_damp_run + + + time_scale_for_rayleigh_damping + time scale for Rayleigh damping + d + ral_ts + real + + in + F + MODULE_rayleigh_damp SCHEME_rayleigh_damp SUBROUTINE_rayleigh_damp_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_rayleigh_damp SCHEME_rayleigh_damp SUBROUTINE_rayleigh_damp_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_rayleigh_damp SCHEME_rayleigh_damp SUBROUTINE_rayleigh_damp_run + + + diff --git a/physics/rrtmg_lw.xml b/physics/rrtmg_lw.xml new file mode 100644 index 000000000..ff1545fbb --- /dev/null +++ b/physics/rrtmg_lw.xml @@ -0,0 +1,524 @@ + + + + + + + air_pressure_at_layer_for_radiation_in_hPa + air pressure layer + hPa + plyr + real + (:,:) + in + F + MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run + + + air_pressure_at_interface_for_radiation_in_hPa + air pressure level + hPa + plvl + real + (:,:) + in + F + MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run + + + air_temperature_at_layer_for_radiation + air temperature layer + K + tlyr + real + (:,:) + in + F + MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run + + + air_temperature_at_interface_for_radiation + air temperature level + K + tlvl + real + (:,:) + in + F + MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run + + + water_vapor_specific_humidity_at_layer_for_radiation + specific humidity layer + kg kg-1 + qlyr + real + (:,:) + in + F + MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run + + + ozone_concentration_at_layer_for_radiation + ozone concentration layer + kg kg-1 + olyr + real + (:,:) + in + F + MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run + + + volume_mixing_ratio_co2 + volume mixing ratio co2 + kg kg-1 + gasvmr_co2 + real + (:,:) + in + F + MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run + + + volume_mixing_ratio_n2o + volume mixing ratio no2 + kg kg-1 + gasvmr_n2o + real + (:,:) + in + F + MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run + + + volume_mixing_ratio_ch4 + volume mixing ratio ch4 + kg kg-1 + gasvmr_ch4 + real + (:,:) + in + F + MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run + + + volume_mixing_ratio_o2 + volume mixing ratio o2 + kg kg-1 + gasvmr_o2 + real + (:,:) + in + F + MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run + + + volume_mixing_ratio_co + volume mixing ratio co + kg kg-1 + gasvmr_co + real + (:,:) + in + F + MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run + + + volume_mixing_ratio_cfc11 + volume mixing ratio cfc11 + kg kg-1 + gasvmr_cfc11 + real + (:,:) + in + F + MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run + + + volume_mixing_ratio_cfc12 + volume mixing ratio cfc12 + kg kg-1 + gasvmr_cfc12 + real + (:,:) + in + F + MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run + + + volume_mixing_ratio_cfc22 + volume mixing ratio cfc22 + kg kg-1 + gasvmr_cfc22 + real + (:,:) + in + F + MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run + + + volume_mixing_ratio_ccl4 + volume mixing ratio ccl4 + kg kg-1 + gasvmr_ccl4 + real + (:,:) + in + F + MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run + + + seed_random_numbers_lw + seed for random number generation for longwave radiation + none + icseed + integer + (:) + in + F + MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run + + + aerosol_optical_depth_for_longwave_bands_01-16 + aerosol optical depth for longwave bands 01-16 + none + aeraod + real + (:,:,:) + in + F + MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run + + + aerosol_single_scattering_albedo_for_longwave_bands_01-16 + aerosol single scattering albedo for longwave bands 01-16 + frac + aerssa + real + (:,:,:) + in + F + MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run + + + surface_longwave_emissivity + surface emissivity + frac + sfemis + real + (:) + in + F + MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run + + + surface_ground_temperature_for_radiation + surface ground temperature for radiation + K + sfgtmp + real + (:) + in + F + MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run + + + layer_thickness_for_radiation + layer thickness + km + dzlyr + real + (:,:) + in + F + MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run + + + layer_pressure_thickness_for_radiation + layer pressure thickness + hPa + delpin + real + (:,:) + in + F + MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run + + + cloud_decorrelation_length + cloud decorrelation length + km + de_lgth + real + (:) + in + F + MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run + + + horizontal_loop_extent + horizontal dimension + count + npts + integer + + in + F + MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run + + + adjusted_vertical_layer_dimension_for_radiation + number of vertical layers for radiation + count + nlay + integer + + in + F + MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run + + + adjusted_vertical_level_dimension_for_radiation + number of vertical levels for radiation + count + nlp1 + integer + + in + F + MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run + + + flag_print + flag to print + flag + lprnt + logical + + in + F + MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run + + + total_cloud_fraction + total cloud fraction + frac + cld_cf + real + (:,:) + in + F + MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run + + + flag_to_calc_lw + flag to calculate LW irradiances + flag + lslwr + logical + + in + F + MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run + + + tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_step + longwave total sky heating rate + K s-1 + hlwc + real + (:,:) + inout + F + MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run + + + lw_fluxes_top_atmosphere + longwave total sky fluxes at the top of the atm + W m-2 + topflx + topflw_type + (:) + inout + F + MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run + + + lw_fluxes_sfc + longwave total sky fluxes at the Earth surface + W m-2 + sfcflx + sfcflw_type + (:) + inout + F + MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run + + + cloud_optical_depth_layers_at_10mu_band + approx 10mu band layer cloud optical depth + none + cldtau + real + (:,:) + inout + F + MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run + + + tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_time_step + longwave clear sky heating rate + K s-1 + hlw0 + real + (:,:) + inout + T + MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run + + + lw_heating_rate_spectral + longwave total sky heating rate (spectral) + K s-1 + hlwb + real + (:,:,:) + inout + T + MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run + + + lw_fluxes + lw fluxes total sky / csk and up / down at levels + W m-2 + flxprf + proflw_type + (:,:) + inout + T + MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run + + + cloud_liquid_water_path + cloud liquid water path + g m-2 + cld_lwp + real + (:,:) + in + T + MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run + + + mean_effective_radius_for_liquid_cloud + mean effective radius for liquid cloud + micron + cld_ref_liq + real + (:,:) + in + T + MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run + + + cloud_ice_water_path + cloud ice water path + g m-2 + cld_iwp + real + (:,:) + in + T + MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run + + + mean_effective_radius_for_ice_cloud + mean effective radius for ice cloud + micron + cld_ref_ice + real + (:,:) + in + T + MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run + + + cloud_rain_water_path + cloud ice water path + g m-2 + cld_rwp + real + (:,:) + in + T + MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run + + + mean_effective_radius_for_rain_drop + mean effective radius for rain drop + micron + cld_ref_rain + real + (:,:) + in + T + MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run + + + cloud_snow_water_path + cloud snow water path + g m-2 + cld_swp + real + (:,:) + in + T + MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run + + + mean_effective_radius_for_snow_flake + mean effective radius for snow flake + micron + cld_ref_snow + real + (:,:) + in + T + MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run + + + cloud_optical_depth + cloud optical depth + none + cld_od + real + (:,:) + in + T + MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run + + + diff --git a/physics/rrtmg_lw_post.xml b/physics/rrtmg_lw_post.xml new file mode 100644 index 000000000..c8d7c4f07 --- /dev/null +++ b/physics/rrtmg_lw_post.xml @@ -0,0 +1,150 @@ + + + + + + GFS_control_type_instance + Fortran DDT containing FV3-GFS model control parameters + DDT + Model + GFS_control_type + + in + F + MODULE_rrtmg_lw_post SCHEME_rrtmg_lw_post SUBROUTINE_rrtmg_lw_post_run + + + GFS_grid_type_instance + Fortran DDT containing FV3-GFS grid and interpolation related data + DDT + Grid + GFS_grid_type + + in + F + MODULE_rrtmg_lw_post SCHEME_rrtmg_lw_post SUBROUTINE_rrtmg_lw_post_run + + + GFS_radtend_type_instance + Fortran DDT containing FV3-GFS fields targetted for diagnostic output + DDT + Radtend + GFS_radtend_type + + inout + F + MODULE_rrtmg_lw_post SCHEME_rrtmg_lw_post SUBROUTINE_rrtmg_lw_post_run + + + GFS_coupling_type_instance + Fortran DDT containing FV3-GFS fields to/from coupling with other components + DDT + Coupling + GFS_coupling_type + + inout + F + MODULE_rrtmg_lw_post SCHEME_rrtmg_lw_post SUBROUTINE_rrtmg_lw_post_run + + + horizontal_loop_extent + horizontal loop extent + count + im + integer + + in + F + MODULE_rrtmg_lw_post SCHEME_rrtmg_lw_post SUBROUTINE_rrtmg_lw_post_run + + + extra_top_layer + extra top layers + none + ltp + integer + + in + F + MODULE_rrtmg_lw_post SCHEME_rrtmg_lw_post SUBROUTINE_rrtmg_lw_post_run + + + vertical_layer_dimension_for_radiation + number of vertical layers for radiation calculation + count + lm + integer + + in + F + MODULE_rrtmg_lw_post SCHEME_rrtmg_lw_post SUBROUTINE_rrtmg_lw_post_run + + + vertical_index_difference_between_inout_and_local + vertical index difference between in/out and local + index + kd + integer + + in + F + MODULE_rrtmg_lw_post SCHEME_rrtmg_lw_post SUBROUTINE_rrtmg_lw_post_run + + + surface_air_temperature_for_radiation + lowest model layer air temperature for radiation + K + tsfa + real + (:) + in + F + MODULE_rrtmg_lw_post SCHEME_rrtmg_lw_post SUBROUTINE_rrtmg_lw_post_run + + + tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_step + total sky heating rate due to longwave radiation + K s-1 + htlwc + real + (:,:) + in + F + MODULE_rrtmg_lw_post SCHEME_rrtmg_lw_post SUBROUTINE_rrtmg_lw_post_run + + + tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_time_step + clear sky heating rate due to longwave radiation + K s-1 + htlw0 + real + (:,:) + in + F + MODULE_rrtmg_lw_post SCHEME_rrtmg_lw_post SUBROUTINE_rrtmg_lw_post_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_rrtmg_lw_post SCHEME_rrtmg_lw_post SUBROUTINE_rrtmg_lw_post_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_rrtmg_lw_post SCHEME_rrtmg_lw_post SUBROUTINE_rrtmg_lw_post_run + + + + diff --git a/physics/rrtmg_lw_pre.xml b/physics/rrtmg_lw_pre.xml new file mode 100644 index 000000000..f6b6512ad --- /dev/null +++ b/physics/rrtmg_lw_pre.xml @@ -0,0 +1,106 @@ + + + + + GFS_control_type_instance + Fortran DDT containing FV3-GFS model control parameters + DDT + Model + GFS_control_type + + in + F + MODULE_rrtmg_lw_pre SCHEME_rrtmg_lw_pre SUBROUTINE_rrtmg_lw_pre_run + + + GFS_grid_type_instance + Fortran DDT containing FV3-GFS grid and interpolation related data + DDT + Grid + GFS_grid_type + + in + F + MODULE_rrtmg_lw_pre SCHEME_rrtmg_lw_pre SUBROUTINE_rrtmg_lw_pre_run + + + GFS_sfcprop_type_instance + Fortran DDT containing FV3-GFS surface fields + DDT + Sfcprop + GFS_sfcprop_type + + in + F + MODULE_rrtmg_lw_pre SCHEME_rrtmg_lw_pre SUBROUTINE_rrtmg_lw_pre_run + + + GFS_radtend_type_instance + Fortran DDT containing FV3-GFS radiation tendencies + DDT + Radtend + GFS_radtend_type + + inout + F + MODULE_rrtmg_lw_pre SCHEME_rrtmg_lw_pre SUBROUTINE_rrtmg_lw_pre_run + + + horizontal_loop_extent + horizontal loop extent + count + im + integer + + in + F + MODULE_rrtmg_lw_pre SCHEME_rrtmg_lw_pre SUBROUTINE_rrtmg_lw_pre_run + + + surface_ground_temperature_for_radiation + surface ground temperature for radiation + K + tsfg + real + (:) + in + F + MODULE_rrtmg_lw_pre SCHEME_rrtmg_lw_pre SUBROUTINE_rrtmg_lw_pre_run + + + surface_air_temperature_for_radiation + lowest model layer air temperature for radiation + K + tsfa + real + (:) + in + F + MODULE_rrtmg_lw_pre SCHEME_rrtmg_lw_pre SUBROUTINE_rrtmg_lw_pre_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_rrtmg_lw_pre SCHEME_rrtmg_lw_pre SUBROUTINE_rrtmg_lw_pre_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_rrtmg_lw_pre SCHEME_rrtmg_lw_pre SUBROUTINE_rrtmg_lw_pre_run + + + + + diff --git a/physics/rrtmg_sw.xml b/physics/rrtmg_sw.xml new file mode 100644 index 000000000..3cb297ce5 --- /dev/null +++ b/physics/rrtmg_sw.xml @@ -0,0 +1,634 @@ + + + + + + air_pressure_at_layer_for_radiation_in_hPa + air pressure layer + hPa + plyr + real + (:,:) + in + F + MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run + + + air_pressure_at_interface_for_radiation_in_hPa + air pressure level + hPa + plvl + real + (:,:) + in + F + MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run + + + air_temperature_at_layer_for_radiation + air temperature layer + K + tlyr + real + (:,:) + in + F + MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run + + + air_temperature_at_interface_for_radiation + air temperature level + K + tlvl + real + (:,:) + in + F + MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run + + + water_vapor_specific_humidity_at_layer_for_radiation + specific humidity layer + kg kg-1 + qlyr + real + (:,:) + in + F + MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run + + + ozone_concentration_at_layer_for_radiation + ozone concentration layer + kg kg-1 + olyr + real + (:,:) + in + F + MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run + + + volume_mixing_ratio_co2 + volume mixing ratio co2 + kg kg-1 + gasvmr_co2 + real + (:,:) + in + F + MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run + + + volume_mixing_ratio_n2o + volume mixing ratio no2 + kg kg-1 + gasvmr_n2o + real + (:,:) + in + F + MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run + + + volume_mixing_ratio_ch4 + volume mixing ratio ch4 + kg kg-1 + gasvmr_ch4 + real + (:,:) + in + F + MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run + + + volume_mixing_ratio_o2 + volume mixing ratio o2 + kg kg-1 + gasvmr_o2 + real + (:,:) + in + F + MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run + + + volume_mixing_ratio_co + volume mixing ratio co + kg kg-1 + gasvmr_co + real + (:,:) + in + F + MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run + + + volume_mixing_ratio_cfc11 + volume mixing ratio cfc11 + kg kg-1 + gasvmr_cfc11 + real + (:,:) + in + F + MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run + + + volume_mixing_ratio_cfc12 + volume mixing ratio cfc12 + kg kg-1 + gasvmr_cfc12 + real + (:,:) + in + F + MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run + + + volume_mixing_ratio_cfc22 + volume mixing ratio cfc22 + kg kg-1 + gasvmr_cfc22 + real + (:,:) + in + F + MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run + + + volume_mixing_ratio_ccl4 + volume mixing ratio ccl4 + kg kg-1 + gasvmr_ccl4 + real + (:,:) + in + F + MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run + + + seed_random_numbers_sw + seed for random number generation for shortwave radiation + none + icseed + integer + (:) + in + F + MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run + + + aerosol_optical_depth_for_shortwave_bands_01-16 + aerosol optical depth for shortwave bands 01-16 + none + aeraod + real + (:,:,:) + in + F + MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run + + + aerosol_single_scattering_albedo_for_shortwave_bands_01-16 + aerosol single scattering albedo for shortwave bands 01-16 + frac + aerssa + real + (:,:,:) + in + F + MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run + + + aerosol_asymmetry_parameter_for_shortwave_bands_01-16 + aerosol asymmetry paramter for shortwave bands 01-16 + none + aerasy + real + (:,:,:) + in + F + MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run + + + surface_albedo_due_to_near_IR_direct + surface albedo due to near IR direct beam + frac + sfcalb_nir_dir + real + (:) + in + F + MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run + + + surface_albedo_due_to_near_IR_diffused + surface albedo due to near IR diffused beam + frac + sfcalb_nir_dif + real + (:) + in + F + MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run + + + surface_albedo_due_to_UV_and_VIS_direct + surface albedo due to UV+VIS direct beam + frac + sfcalb_uvis_dir + real + (:) + in + F + MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run + + + surface_albedo_due_to_UV_and_VIS_diffused + surface albedo due to UV+VIS diffused beam + frac + sfcalb_uvis_dif + real + (:) + in + F + MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run + + + layer_thickness_for_radiation + layer thickness + km + dzlyr + real + (:,:) + in + F + MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run + + + layer_pressure_thickness_for_radiation + layer pressure thickness + hPa + delpin + real + (:,:) + in + F + MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run + + + cloud_decorrelation_length + cloud decorrelation length + km + de_lgth + real + (:) + in + F + MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run + + + cosine_of_zenith_angle + cosine of the solar zenit angle + none + cosz + real + (:) + in + F + MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run + + + solar_constant + solar constant + W m-2 + solcon + real + + in + F + MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run + + + daytime_points_dimension + daytime points dimension + count + nday + integer + + in + F + MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run + + + daytime_points + daytime points + index + idxday + integer + (:) + in + F + MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run + + + horizontal_loop_extent + horizontal dimension + count + npts + integer + + in + F + MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run + + + adjusted_vertical_layer_dimension_for_radiation + number of vertical layers for radiation + count + nlay + integer + + in + F + MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run + + + adjusted_vertical_level_dimension_for_radiation + number of vertical levels for radiation + count + nlp1 + integer + + in + F + MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run + + + flag_print + flag to print + flag + lprnt + logical + + in + F + MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run + + + total_cloud_fraction + total cloud fraction + frac + cld_cf + real + (:,:) + in + F + MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run + + + flag_to_calc_sw + flag to calculate SW irradiances + flag + lsswr + logical + + in + F + MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run + + + tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step + shortwave total sky heating rate + K s-1 + hswc + real + (:,:) + inout + F + MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run + + + sw_fluxes_top_atmosphere + shortwave total sky fluxes at the top of the atm + W m-2 + topflx + topfsw_type + (:) + inout + F + MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run + + + sw_fluxes_sfc + shortwave total sky fluxes at the Earth surface + W m-2 + sfcflx + sfcfsw_type + (:) + inout + F + MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run + + + cloud_optical_depth_layers_at_0.55mu_band + approx .55mu band layer cloud optical depth + none + cldtau + real + (:,:) + inout + F + MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run + + + tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_time_step + shortwave clear sky heating rate + K s-1 + hsw0 + real + (:,:) + inout + T + MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run + + + sw_heating_rate_spectral + shortwave total sky heating rate (spectral) + K s-1 + hswb + real + (:,:,:) + inout + T + MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run + + + sw_fluxes + sw fluxes total sky / csk and up / down at levels + W m-2 + flxprf + profsw_type + (:,:) + inout + T + MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run + + + components_of_surface_downward_shortwave_fluxes + derived type for special components of surface downward shortwave fluxes + W m-2 + fdncmp + cmpfsw_type + (:) + inout + T + MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run + + + cloud_liquid_water_path + cloud liquid water path + g m-2 + cld_lwp + real + (:,:) + in + T + MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run + + + mean_effective_radius_for_liquid_cloud + mean effective radius for liquid cloud + micron + cld_ref_liq + real + (:,:) + in + T + MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run + + + cloud_ice_water_path + cloud ice water path + g m-2 + cld_iwp + real + (:,:) + in + T + MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run + + + mean_effective_radius_for_ice_cloud + mean effective radius for ice cloud + micron + cld_ref_ice + real + (:,:) + in + T + MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run + + + cloud_rain_water_path + cloud rain water path + g m-2 + cld_rwp + real + (:,:) + in + T + MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run + + + mean_effective_radius_for_rain_drop + mean effective radius for rain drop + micron + cld_ref_rain + real + (:,:) + in + T + MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run + + + cloud_snow_water_path + cloud snow water path + g m-2 + cld_swp + real + (:,:) + in + T + MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run + + + mean_effective_radius_for_snow_flake + mean effective radius for snow flake + micron + cld_ref_snow + real + (:,:) + in + T + MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run + + + cloud_optical_depth + cloud optical depth + none + cld_od + real + (:,:) + in + T + MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run + + + cloud_single_scattering_albedo + cloud single scattering albedo + frac + cld_ssa + real + (:,:) + in + T + MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run + + + cloud_asymmetry_parameter + cloud asymmetry parameter + none + cld_asy + real + (:,:) + in + T + MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run + + + + diff --git a/physics/rrtmg_sw_post.xml b/physics/rrtmg_sw_post.xml new file mode 100644 index 000000000..4e3473ffe --- /dev/null +++ b/physics/rrtmg_sw_post.xml @@ -0,0 +1,216 @@ + + + + + + + GFS_control_type_instance + Fortran DDT containing FV3-GFS model control parameters + DDT + Model + GFS_control_type + + in + F + MODULE_rrtmg_sw_post SCHEME_rrtmg_sw_post SUBROUTINE_rrtmg_sw_post_run + + + GFS_grid_type_instance + Fortran DDT containing FV3-GFS grid and interpolation related data + DDT + Grid + GFS_grid_type + + in + F + MODULE_rrtmg_sw_post SCHEME_rrtmg_sw_post SUBROUTINE_rrtmg_sw_post_run + + + GFS_diag_type_instance + Fortran DDT containing FV3-GFS diagnotics data + DDT + Diag + GFS_diag_type + + inout + F + MODULE_rrtmg_sw_post SCHEME_rrtmg_sw_post SUBROUTINE_rrtmg_sw_post_run + + + GFS_radtend_type_instance + Fortran DDT containing FV3-GFS fields targetted for diagnostic output + DDT + Radtend + GFS_radtend_type + + inout + F + MODULE_rrtmg_sw_post SCHEME_rrtmg_sw_post SUBROUTINE_rrtmg_sw_post_run + + + GFS_coupling_type_instance + Fortran DDT containing FV3-GFS fields to/from coupling with other components + DDT + Coupling + GFS_coupling_type + + inout + F + MODULE_rrtmg_sw_post SCHEME_rrtmg_sw_post SUBROUTINE_rrtmg_sw_post_run + + + horizontal_loop_extent + horizontal loop extent + count + im + integer + + in + F + MODULE_rrtmg_sw_post SCHEME_rrtmg_sw_post SUBROUTINE_rrtmg_sw_post_run + + + extra_top_layer + extra top layers + none + ltp + integer + + in + F + MODULE_rrtmg_sw_post SCHEME_rrtmg_sw_post SUBROUTINE_rrtmg_sw_post_run + + + daytime_points_dimension + daytime points dimension + count + nday + integer + + in + F + MODULE_rrtmg_sw_post SCHEME_rrtmg_sw_post SUBROUTINE_rrtmg_sw_post_run + + + vertical_layer_dimension_for_radiation + number of vertical layers for radiation calculation + count + lm + integer + + in + F + MODULE_rrtmg_sw_post SCHEME_rrtmg_sw_post SUBROUTINE_rrtmg_sw_post_run + + + vertical_index_difference_between_inout_and_local + vertical index difference between in/out and local + index + kd + integer + + in + F + MODULE_rrtmg_sw_post SCHEME_rrtmg_sw_post SUBROUTINE_rrtmg_sw_post_run + + + tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step + total sky heating rate due to shortwave radiation + K s-1 + htswc + real + (:,:) + in + F + MODULE_rrtmg_sw_post SCHEME_rrtmg_sw_post SUBROUTINE_rrtmg_sw_post_run + + + tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_time_step + clear sky heating rates due to shortwave radiation + K s-1 + htsw0 + real + (:,:) + in + F + MODULE_rrtmg_sw_post SCHEME_rrtmg_sw_post SUBROUTINE_rrtmg_sw_post_run + + + surface_albedo_due_to_near_IR_direct + surface albedo due to near IR direct beam + frac + sfcalb1 + real + (:) + in + F + MODULE_rrtmg_sw_post SCHEME_rrtmg_sw_post SUBROUTINE_rrtmg_sw_post_run + + + surface_albedo_due_to_near_IR_diffused + surface albedo due to near IR diffused beam + frac + sfcalb2 + real + (:) + in + F + MODULE_rrtmg_sw_post SCHEME_rrtmg_sw_post SUBROUTINE_rrtmg_sw_post_run + + + surface_albedo_due_to_UV_and_VIS_direct + surface albedo due to UV+VIS direct beam + frac + sfcalb3 + real + (:) + in + F + MODULE_rrtmg_sw_post SCHEME_rrtmg_sw_post SUBROUTINE_rrtmg_sw_post_run + + + surface_albedo_due_to_UV_and_VIS_diffused + surface albedo due to UV+VIS diffused beam + frac + sfcalb4 + real + (:) + in + F + MODULE_rrtmg_sw_post SCHEME_rrtmg_sw_post SUBROUTINE_rrtmg_sw_post_run + + + components_of_surface_downward_shortwave_fluxes + derived type for special components of surface downward shortwave fluxes + W m-2 + scmpsw + cmpfsw_type + (:) + inout + F + MODULE_rrtmg_sw_post SCHEME_rrtmg_sw_post SUBROUTINE_rrtmg_sw_post_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_rrtmg_sw_post SCHEME_rrtmg_sw_post SUBROUTINE_rrtmg_sw_post_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_rrtmg_sw_post SCHEME_rrtmg_sw_post SUBROUTINE_rrtmg_sw_post_run + + + diff --git a/physics/rrtmg_sw_pre.xml b/physics/rrtmg_sw_pre.xml new file mode 100644 index 000000000..9523a4248 --- /dev/null +++ b/physics/rrtmg_sw_pre.xml @@ -0,0 +1,183 @@ + + + + + + + GFS_control_type_instance + Fortran DDT containing FV3-GFS model control parameters + DDT + Model + GFS_control_type + + in + F + MODULE_rrtmg_sw_pre SCHEME_rrtmg_sw_pre SUBROUTINE_rrtmg_sw_pre_run + + + GFS_grid_type_instance + Fortran DDT containing FV3-GFS grid and interpolation related data + DDT + Grid + GFS_grid_type + + in + F + MODULE_rrtmg_sw_pre SCHEME_rrtmg_sw_pre SUBROUTINE_rrtmg_sw_pre_run + + + GFS_sfcprop_type_instance + Fortran DDT containing FV3-GFS surface fields + DDT + Sfcprop + GFS_sfcprop_type + + in + F + MODULE_rrtmg_sw_pre SCHEME_rrtmg_sw_pre SUBROUTINE_rrtmg_sw_pre_run + + + GFS_radtend_type_instance + Fortran DDT containing FV3-GFS radiation tendencies + DDT + Radtend + GFS_radtend_type + + inout + F + MODULE_rrtmg_sw_pre SCHEME_rrtmg_sw_pre SUBROUTINE_rrtmg_sw_pre_run + + + horizontal_loop_extent + horizontal loop extent + count + im + integer + + in + F + MODULE_rrtmg_sw_pre SCHEME_rrtmg_sw_pre SUBROUTINE_rrtmg_sw_pre_run + + + daytime_points_dimension + daytime points dimension + count + nday + integer + + out + F + MODULE_rrtmg_sw_pre SCHEME_rrtmg_sw_pre SUBROUTINE_rrtmg_sw_pre_run + + + daytime_points + daytime points + index + idxday + integer + (:) + out + F + MODULE_rrtmg_sw_pre SCHEME_rrtmg_sw_pre SUBROUTINE_rrtmg_sw_pre_run + + + surface_ground_temperature_for_radiation + surface ground temperature for radiation + K + tsfg + real + (:) + in + F + MODULE_rrtmg_sw_pre SCHEME_rrtmg_sw_pre SUBROUTINE_rrtmg_sw_pre_run + + + surface_air_temperature_for_radiation + lowest model layer air temperature for radiation + K + tsfa + real + (:) + in + F + MODULE_rrtmg_sw_pre SCHEME_rrtmg_sw_pre SUBROUTINE_rrtmg_sw_pre_run + + + surface_albedo_due_to_near_IR_direct + surface albedo due to near IR direct beam + frac + sfcalb1 + real + (:) + out + F + MODULE_rrtmg_sw_pre SCHEME_rrtmg_sw_pre SUBROUTINE_rrtmg_sw_pre_run + + + surface_albedo_due_to_near_IR_diffused + surface albedo due to near IR diffused beam + frac + sfcalb2 + real + (:) + out + F + MODULE_rrtmg_sw_pre SCHEME_rrtmg_sw_pre SUBROUTINE_rrtmg_sw_pre_run + + + surface_albedo_due_to_UV_and_VIS_direct + surface albedo due to UV+VIS direct beam + frac + sfcalb3 + real + (:) + out + F + MODULE_rrtmg_sw_pre SCHEME_rrtmg_sw_pre SUBROUTINE_rrtmg_sw_pre_run + + + surface_albedo_due_to_UV_and_VIS_diffused + surface albedo due to UV+VIS diffused beam + frac + sfcalb4 + real + (:) + out + F + MODULE_rrtmg_sw_pre SCHEME_rrtmg_sw_pre SUBROUTINE_rrtmg_sw_pre_run + + + surface_albedo_perturbation + surface albedo perturbation + frac + alb1d + real + (:) + in + F + MODULE_rrtmg_sw_pre SCHEME_rrtmg_sw_pre SUBROUTINE_rrtmg_sw_pre_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_rrtmg_sw_pre SCHEME_rrtmg_sw_pre SUBROUTINE_rrtmg_sw_pre_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_rrtmg_sw_pre SCHEME_rrtmg_sw_pre SUBROUTINE_rrtmg_sw_pre_run + + + diff --git a/physics/rrtmgp_lw.xml b/physics/rrtmgp_lw.xml new file mode 100644 index 000000000..618dd72a0 --- /dev/null +++ b/physics/rrtmgp_lw.xml @@ -0,0 +1,547 @@ + + + + + + GFS_control_type_instance + Fortran DDT containing FV3-GFS model control parameters + DDT + Model + GFS_control_type + + in + F + MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_init + + + mpi_rank + current MPI rank + index + mpirank + integer + + in + F + MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_init + + + mpi_root + master MPI rank + index + mpiroot + integer + + in + F + MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_init + + + mpi_comm + MPI communicator + index + mpicomm + integer + + in + F + MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_init + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_init + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_init + + + + + air_pressure_at_layer_for_radiation_in_hPa + air pressure layer + hPa + p_lay + real + (:,:) + in + F + MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_run + + + air_pressure_at_interface_for_radiation_in_hPa + air pressure level + hPa + p_lev + real + (:,:) + in + F + MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_run + + + air_temperature_at_layer_for_radiation + air temperature layer + K + t_lay + real + (:,:) + in + F + MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_run + + + air_temperature_at_interface_for_radiation + air temperature level + K + t_lev + real + (:,:) + in + F + MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_run + + + water_vapor_specific_humidity_at_layer_for_radiation + specific humidity layer + kg kg-1 + q_lay + real + (:,:) + in + F + MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_run + + + ozone_concentration_at_layer_for_radiation + ozone concentration layer + kg kg-1 + o3_lay + real + (:,:) + in + F + MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_run + + + volume_mixing_ratio_co2 + volume mixing ratio co2 + kg kg-1 + vmr_co2 + real + (:,:) + in + F + MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_run + + + volume_mixing_ratio_n2o + volume mixing ratio no2 + kg kg-1 + vmr_n2o + real + (:,:) + in + F + MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_run + + + volume_mixing_ratio_ch4 + volume mixing ratio ch4 + kg kg-1 + vmr_ch4 + real + (:,:) + in + F + MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_run + + + volume_mixing_ratio_o2 + volume mixing ratio o2 + kg kg-1 + vmr_o2 + real + (:,:) + in + F + MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_run + + + volume_mixing_ratio_co + volume mixing ratio co + kg kg-1 + vmr_co + real + (:,:) + in + F + MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_run + + + volume_mixing_ratio_cfc11 + volume mixing ratio cfc11 + kg kg-1 + vmr_cfc11 + real + (:,:) + in + F + MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_run + + + volume_mixing_ratio_cfc12 + volume mixing ratio cfc12 + kg kg-1 + vmr_cfc12 + real + (:,:) + in + F + MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_run + + + volume_mixing_ratio_cfc22 + volume mixing ratio cfc22 + kg kg-1 + vmr_cfc22 + real + (:,:) + in + F + MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_run + + + volume_mixing_ratio_ccl4 + volume mixing ratio ccl4 + kg kg-1 + vmr_ccl4 + real + (:,:) + in + F + MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_run + + + seed_random_numbers_lw + seed for random number generation for longwave radiation + none + icseed + integer + (:) + in + F + MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_run + + + aerosol_optical_depth_for_longwave_bands_01-16 + aerosol optical depth for longwave bands 01-16 + none + tau_aer + real + (:,:,:) + in + F + MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_run + + + aerosol_single_scattering_albedo_for_longwave_bands_01-16 + aerosol single scattering albedo for longwave bands 01-16 + frac + ssa_aer + real + (:,:,:) + in + F + MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_run + + + surface_longwave_emissivity + surface emissivity + frac + sfc_emiss + real + (:) + in + F + MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_run + + + surface_ground_temperature_for_radiation + surface ground temperature for radiation + K + skt + real + (:) + in + F + MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_run + + + horizontal_loop_extent + horizontal dimension + count + ncol + integer + + in + F + MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_run + + + adjusted_vertical_layer_dimension_for_radiation + number of vertical layers for radiation + count + nlay + integer + + in + F + MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_run + + + flag_print + flag to print + flag + lprint + logical + + in + F + MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_run + + + total_cloud_fraction + total cloud fraction + frac + cldfrac + real + (:,:) + in + F + MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_run + + + flag_to_calc_lw + flag to calculate LW irradiances + flag + lslwr + logical + + in + F + MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_run + + + tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_step + longwave total sky heating rate + K s-1 + hlwc + real + (:,:) + out + F + MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_run + + + lw_fluxes_top_atmosphere + longwave total sky fluxes at the top of the atm + W m-2 + topflx + topflw_type + (:) + inout + F + MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_run + + + lw_fluxes_sfc + longwave total sky fluxes at the Earth surface + W m-2 + sfcflx + sfcflw_type + (:) + inout + F + MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_run + + + tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_time_step + longwave clear sky heating rate + K s-1 + hlw0 + real + (:,:) + inout + T + MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_run + + + lw_fluxes + lw fluxes total sky / csk and up / down at levels + W m-2 + flxprf + proflw_type + (:,:) + in + F + MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_run + + + lw_heating_rate_spectral + longwave total sky heating rate (spectral) + K s-1 + hlwb + real + (:,:,:) + inout + T + MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_run + + + lw_fluxes + lw fluxes total sky / csk and up / down at levels + W m-2 + flxprf + proflw_type + (:,:) + inout + T + MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_run + + + cloud_liquid_water_path + cloud liquid water path + g m-2 + cld_lwp + real + (:,:) + in + T + MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_run + + + mean_effective_radius_for_liquid_cloud + mean effective radius for liquid cloud + micron + cld_ref_liq + real + (:,:) + in + T + MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_run + + + cloud_ice_water_path + cloud ice water path + g m-2 + cld_iwp + real + (:,:) + in + T + MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_run + + + mean_effective_radius_for_ice_cloud + mean effective radius for ice cloud + micron + cld_ref_ice + real + (:,:) + in + T + MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_run + + + cloud_rain_water_path + cloud ice water path + g m-2 + cld_rwp + real + (:,:) + in + T + MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_run + + + mean_effective_radius_for_rain_drop + mean effective radius for rain drop + micron + cld_ref_rain + real + (:,:) + in + T + MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_run + + + cloud_snow_water_path + cloud snow water path + g m-2 + cld_swp + real + (:,:) + in + T + MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_run + + + mean_effective_radius_for_snow_flake + mean effective radius for snow flake + micron + cld_ref_snow + real + (:,:) + in + T + MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_run + + + cloud_optical_depth + cloud optical depth + none + cld_od + real + (:,:) + in + T + MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_run + + + diff --git a/physics/rte-rrtmgp b/physics/rte-rrtmgp index 54440ad72..fa305df4d 160000 --- a/physics/rte-rrtmgp +++ b/physics/rte-rrtmgp @@ -1 +1 @@ -Subproject commit 54440ad72cc65f8c368a0c6235157c38d30bd84e +Subproject commit fa305df4d3d88467e541f14db869f42c157013a7 diff --git a/physics/samfdeepcnv.xml b/physics/samfdeepcnv.xml new file mode 100644 index 000000000..5a59a552f --- /dev/null +++ b/physics/samfdeepcnv.xml @@ -0,0 +1,700 @@ + + + + + horizontal_loop_extent + horizontal loop extent + count + im + integer + + in + F + MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run + + + horizontal_dimension + horizontal dimension + count + ix + integer + + in + F + MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run + + + vertical_dimension + vertical layer dimension + count + km + integer + + in + F + MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run + + + specific_heat_of_liquid_water_at_constant_pressure + specific heat of liquid water at constant pressure + J kg-1 K-1 + cliq + real + + in + F + MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run + + + specific_heat_of_dry_air_at_constant_pressure + specific heat of dry air at constant pressure + J kg-1 K-1 + cp + real + + in + F + MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run + + + specific_heat_of_water_vapor_at_constant_pressure + specific heat of water vapor at constant pressure + J kg-1 K-1 + cvap + real + + in + F + MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run + + + ratio_of_dry_air_to_water_vapor_gas_constants + rd/rv + none + eps + real + + in + F + MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run + + + ratio_of_dry_air_to_water_vapor_gas_constants_minus_one + (rd/rv) - 1 + none + epsm1 + real + + in + F + MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run + + + ratio_of_vapor_to_dry_air_gas_constants_minus_one + (rv/rd) - 1 (rv = ideal gas constant for water vapor) + none + fv + real + + in + F + MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run + + + gravitational_acceleration + gravitational acceleration + m s-2 + grav + real + + in + F + MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run + + + latent_heat_of_vaporization_of_water_at_0C + latent heat of evaporation/sublimation + J kg-1 + hvap + real + + in + F + MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run + + + gas_constant_dry_air + ideal gas constant for dry air + J kg-1 K-1 + rd + real + + in + F + MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run + + + gas_constant_water_vapor + ideal gas constant for water vapor + J kg-1 K-1 + rv + real + + in + F + MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run + + + temperature_at_zero_celsius + temperature at 0 degrees Celsius + K + t0c + real + + in + F + MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run + + + time_step_for_physics + physics time step + s + delt + real + + in + F + MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run + + + index_for_turbulent_kinetic_energy_convective_transport_tracer + index for turbulent kinetic energy in the convectively transported tracer array + index + ntk + integer + + in + F + MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run + + + number_of_tracers_for_samf + number of tracers for scale-aware mass flux schemes + count + ntr + integer + + in + F + MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run + + + air_pressure_difference_between_midlayers + pres(k) - pres(k+1) + Pa + delp + real + (:,:) + in + F + MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run + + + air_pressure + mean layer pressure + Pa + prslp + real + (:,:) + in + F + MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run + + + surface_air_pressure + surface pressure + Pa + psp + real + (:) + in + F + MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run + + + geopotential + layer geopotential + m2 s-2 + phil + real + (:,:) + in + F + MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run + + + convective_transportable_tracers + array to contain cloud water and other convective trans. tracers + kg kg-1 + qtr + real + (:,:,:) + inout + F + MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run + + + water_vapor_specific_humidity_updated_by_physics + updated vapor specific humidity + kg kg-1 + q1 + real + (:,:) + inout + F + MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run + + + air_temperature_updated_by_physics + updated temperature + K + t1 + real + (:,:) + inout + F + MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run + + + x_wind_updated_by_physics + updated x-direction wind + m s-1 + u1 + real + (:,:) + inout + F + MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run + + + y_wind_updated_by_physics + updated y-direction wind + m s-1 + v1 + real + (:,:) + inout + F + MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run + + + cloud_work_function + cloud work function + m2 s-2 + cldwrk + real + (:) + out + F + MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run + + + lwe_thickness_of_deep_convective_precipitation_amount + deep convective rainfall amount on physics timestep + m + rn + real + (:) + out + F + MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run + + + vertical_index_at_cloud_base + index for cloud base + index + kbot + integer + (:) + out + F + MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run + + + vertical_index_at_cloud_top + index for cloud top + index + ktop + integer + (:) + out + F + MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run + + + flag_deep_convection + deep convection: 0=no, 1=yes + flag + kcnv + integer + (:) + inout + F + MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run + + + sea_land_ice_mask + landmask: sea/land/ice=0/1/2 + flag + islimsk + integer + (:) + in + F + MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run + + + cell_area + grid cell area + m2 + garea + real + (:) + in + F + MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run + + + omega + layer mean vertical velocity + Pa s-1 + dot + real + (:,:) + in + F + MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run + + + number_of_hydrometeors + number of hydrometeors + count + ncloud + integer + + in + F + MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run + + + instantaneous_atmosphere_updraft_convective_mass_flux + (updraft mass flux) * delt + kg m-2 + ud_mf + real + (:,:) + out + F + MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run + + + instantaneous_atmosphere_downdraft_convective_mass_flux + (downdraft mass flux) * delt + kg m-2 + dd_mf + real + (:,:) + out + F + MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run + + + instantaneous_atmosphere_detrainment_convective_mass_flux + (detrainment mass flux) * delt + kg m-2 + dt_mf + real + (:,:) + out + F + MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run + + + convective_cloud_water_mixing_ratio + moist convective cloud water mixing ratio + kg kg-1 + cnvw + real + (:,:) + inout + F + MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run + + + convective_cloud_cover + convective cloud cover + frac + cnvc + real + (:,:) + inout + F + MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run + + + mass_fraction_of_convective_cloud_liquid_water + mass fraction of convective cloud liquid water + kg kg-1 + qlcn + real + (:,:) + inout + F + MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run + + + mass_fraction_of_convective_cloud_ice + mass fraction of convective cloud ice water + kg kg-1 + qicn + real + (:,:) + inout + F + MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run + + + vertical_velocity_for_updraft + vertical velocity for updraft + m s-1 + w_upi + real + (:,:) + inout + F + MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run + + + convective_cloud_fraction_for_microphysics + convective cloud fraction for microphysics + frac + cf_upi + real + (:,:) + inout + F + MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run + + + detrained_mass_flux + detrained mass flux + kg m-2 s-1 + cnv_mfd + real + (:,:) + inout + F + MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run + + + tendency_of_cloud_water_due_to_convective_microphysics + tendency of cloud water due to convective microphysics + kg m-2 s-1 + cnv_dqldt + real + (:,:) + inout + F + MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run + + + convective_cloud_volume_fraction + convective cloud volume fraction + frac + clcn + real + (:,:) + inout + F + MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run + + + ice_fraction_in_convective_tower + ice fraction in convective tower + frac + cnv_fice + real + (:,:) + inout + F + MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run + + + number_concentration_of_cloud_liquid_water_particles_for_detrainment + droplet number concentration in convective detrainment + m-3 + cnv_ndrop + real + (:,:) + inout + F + MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run + + + number_concentration_of_ice_crystals_for_detrainment + crystal number concentration in convective detrainment + m-3 + cnv_nice + real + (:,:) + inout + F + MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run + + + flag_for_microphysics_scheme + choice of microphysics scheme + flag + mp_phys + integer + + in + F + MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run + + + flag_for_morrison_gettelman_microphysics_scheme + choice of Morrison-Gettelman rmicrophysics scheme + flag + mp_phys_mg + integer + + in + F + MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run + + + entrainment_rate_coefficient_deep_convection + entrainment rate coefficient for deep conv. + none + clam + real + + in + F + MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run + + + rain_conversion_parameter_deep_convection + convective rain conversion parameter for deep conv. + m-1 + c0s + real + + in + F + MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run + + + detrainment_conversion_parameter_deep_convection + convective detrainment conversion parameter for deep conv. + m-1 + c1 + real + + in + F + MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run + + + downdraft_fraction_reaching_surface_over_land_deep_convection + downdraft fraction reaching surface over land for deep conv. + frac + betal + real + + in + F + MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run + + + downdraft_fraction_reaching_surface_over_ocean_deep_convection + downdraft fraction reaching surface over ocean for deep conv. + frac + betas + real + + in + F + MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run + + + rain_evaporation_coefficient_deep_convection + convective rain evaporation coefficient for deep conv. + frac + evfact + real + + in + F + MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run + + + rain_evaporation_coefficient_over_land_deep_convection + convective rain evaporation coefficient over land for deep conv. + frac + evfactl + real + + in + F + MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run + + + momentum_transport_reduction_factor_pgf_deep_convection + reduction factor in momentum transport due to deep conv. induced pressure gradient force + frac + pgcon + real + + in + F + MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run + + + aerosol_aware_parameter_deep_convection + aerosol-aware parameter inversely proportional to CCN number concentraion from Lim (2011) for deep conv. + none + asolfac + real + + in + F + MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run + + + + + diff --git a/physics/samfshalcnv.xml b/physics/samfshalcnv.xml new file mode 100644 index 000000000..c9e4b67a2 --- /dev/null +++ b/physics/samfshalcnv.xml @@ -0,0 +1,513 @@ + + + + + horizontal_loop_extent + horizontal loop extent + count + im + integer + + in + F + MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run + + + horizontal_dimension + horizontal dimension + count + ix + integer + + in + F + MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run + + + vertical_dimension + vertical layer dimension + count + km + integer + + in + F + MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run + + + specific_heat_of_liquid_water_at_constant_pressure + specific heat of liquid water at constant pressure + J kg-1 K-1 + cliq + real + + in + F + MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run + + + specific_heat_of_dry_air_at_constant_pressure + specific heat of dry air at constant pressure + J kg-1 K-1 + cp + real + + in + F + MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run + + + specific_heat_of_water_vapor_at_constant_pressure + specific heat of water vapor at constant pressure + J kg-1 K-1 + cvap + real + + in + F + MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run + + + ratio_of_dry_air_to_water_vapor_gas_constants + rd/rv + none + eps + real + + in + F + MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run + + + ratio_of_dry_air_to_water_vapor_gas_constants_minus_one + (rd/rv) - 1 + none + epsm1 + real + + in + F + MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run + + + ratio_of_vapor_to_dry_air_gas_constants_minus_one + (rv/rd) - 1 (rv = ideal gas constant for water vapor) + none + fv + real + + in + F + MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run + + + gravitational_acceleration + gravitational acceleration + m s-2 + grav + real + + in + F + MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run + + + latent_heat_of_vaporization_of_water_at_0C + latent heat of evaporation/sublimation + J kg-1 + hvap + real + + in + F + MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run + + + gas_constant_dry_air + ideal gas constant for dry air + J kg-1 K-1 + rd + real + + in + F + MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run + + + gas_constant_water_vapor + ideal gas constant for water vapor + J kg-1 K-1 + rv + real + + in + F + MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run + + + temperature_at_zero_celsius + temperature at 0 degrees Celsius + K + t0c + real + + in + F + MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run + + + time_step_for_physics + physics time step + s + delt + real + + in + F + MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run + + + index_for_turbulent_kinetic_energy_convective_transport_tracer + index for turbulent kinetic energy in the convectively transported tracer array + index + ntk + integer + + in + F + MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run + + + number_of_tracers_for_samf + number of tracers for scale-aware mass flux schemes + count + ntr + integer + + in + F + MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run + + + air_pressure_difference_between_midlayers + pres(k) - pres(k+1) + Pa + delp + real + (:,:) + in + F + MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run + + + air_pressure + mean layer pressure + Pa + prslp + real + (:,:) + in + F + MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run + + + surface_air_pressure + surface pressure + Pa + psp + real + (:) + in + F + MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run + + + geopotential + layer geopotential + m2 s-2 + phil + real + (:,:) + in + F + MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run + + + convective_transportable_tracers + array to contain cloud water and other convective trans. tracers + kg kg-1 + qtr + real + (:,:,:) + inout + F + MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run + + + water_vapor_specific_humidity_updated_by_physics + updated vapor specific humidity + kg kg-1 + q1 + real + (:,:) + inout + F + MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run + + + air_temperature_updated_by_physics + updated temperature + K + t1 + real + (:,:) + inout + F + MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run + + + x_wind_updated_by_physics + updated x-direction wind + m s-1 + u1 + real + (:,:) + inout + F + MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run + + + y_wind_updated_by_physics + updated y-direction wind + m s-1 + v1 + real + (:,:) + inout + F + MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run + + + lwe_thickness_of_shallow_convective_precipitation_amount + shallow convective rainfall amount on physics timestep + m + rn + real + (:) + out + F + MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run + + + vertical_index_at_cloud_base + index at cloud base + index + kbot + integer + (:) + out + F + MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run + + + vertical_index_at_cloud_top + index at cloud top + index + ktop + integer + (:) + out + F + MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run + + + flag_deep_convection + deep convection: 0=no, 1=yes + flag + kcnv + integer + (:) + inout + F + MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run + + + sea_land_ice_mask + landmask: sea/land/ice=0/1/2 + flag + islimsk + integer + (:) + in + F + MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run + + + cell_area + grid cell area + m2 + garea + real + (:) + in + F + MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run + + + omega + layer mean vertical velocity + Pa s-1 + dot + real + (:,:) + in + F + MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run + + + number_of_hydrometeors + number of hydrometeors + count + ncloud + integer + + in + F + MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run + + + atmosphere_boundary_layer_thickness + PBL top height + m + hpbl + real + (:) + in + F + MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run + + + instantaneous_atmosphere_updraft_convective_mass_flux + (updraft mass flux) * delt + kg m-2 + ud_mf + real + (:,:) + out + F + MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run + + + instantaneous_atmosphere_detrainment_convective_mass_flux + (detrainment mass flux) * delt + kg m-2 + dt_mf + real + (:,:) + out + F + MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run + + + convective_cloud_water_mixing_ratio + moist convective cloud water mixing ratio + kg kg-1 + cnvw + real + (:,:) + out + F + MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run + + + convective_cloud_cover + convective cloud cover + frac + cnvc + real + (:,:) + out + F + MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run + + + entrainment_rate_coefficient_shallow_convection + entrainment rate coefficient for shal conv. + none + clam + real + + in + F + MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run + + + rain_conversion_parameter_shallow_convection + convective rain conversion parameter for shal conv. + m-1 + c0s + real + + in + F + MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run + + + detrainment_conversion_parameter_shallow_convection + convective detrainment conversion parameter for shal conv. + m-1 + c1 + real + + in + F + MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run + + + momentum_transport_reduction_factor_pgf_shallow_convection + reduction factor in momentum transport due to shal conv. induced pressure gradient force + frac + pgcon + real + + in + F + MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run + + + aerosol_aware_parameter_shallow_convection + aerosol-aware parameter inversely proportional to CCN number concentraion from Lim (2011) for shal conv. + none + asolfac + real + + in + F + MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run + + + + + diff --git a/physics/samfshalcnv_post.xml b/physics/samfshalcnv_post.xml new file mode 100644 index 000000000..0d196bc95 --- /dev/null +++ b/physics/samfshalcnv_post.xml @@ -0,0 +1,205 @@ + + + + + horizontal_loop_extent + horizontal loop extent + count + im + integer + + in + F + MODULE_samfshalcnv_post SCHEME_samfshalcnv_post SUBROUTINE_samfshalcnv_post_run + + + vertical_dimension + vertical layer dimension + count + levs + integer + + in + F + MODULE_samfshalcnv_post SCHEME_samfshalcnv_post SUBROUTINE_samfshalcnv_post_run + + + flag_diagnostics + logical flag for storing diagnostics + flag + lssav + logical + + in + F + MODULE_samfshalcnv_post SCHEME_samfshalcnv_post SUBROUTINE_samfshalcnv_post_run + + + flag_shallow_convective_cloud + flag for shallow convective cloud + + shcnvcw + logical + + in + F + MODULE_samfshalcnv_post SCHEME_samfshalcnv_post SUBROUTINE_samfshalcnv_post_run + + + dynamics_to_physics_timestep_ratio + ratio of dynamics timestep to physics timestep + none + frain + real + + in + F + MODULE_samfshalcnv_post SCHEME_samfshalcnv_post SUBROUTINE_samfshalcnv_post_run + + + lwe_thickness_of_shallow_convective_precipitation_amount + shallow convective rainfall amount on physics timestep + m + rain1 + real + (:) + in + F + MODULE_samfshalcnv_post SCHEME_samfshalcnv_post SUBROUTINE_samfshalcnv_post_run + + + number_of_3d_arrays_associated_with_pdf-based_clouds + number of 3d arrays associated with pdf based clouds/mp + count + npdf3d + integer + + in + F + MODULE_samfshalcnv_post SCHEME_samfshalcnv_post SUBROUTINE_samfshalcnv_post_run + + + array_dimension_of_3d_arrays_for_microphysics + number of 3D arrays needed for microphysics + count + num_p3d + integer + + in + F + MODULE_samfshalcnv_post SCHEME_samfshalcnv_post SUBROUTINE_samfshalcnv_post_run + + + number_of_convective_3d_cloud_fields + number of convective 3d clouds fields + count + ncnvcld3d + integer + + in + F + MODULE_samfshalcnv_post SCHEME_samfshalcnv_post SUBROUTINE_samfshalcnv_post_run + + + convective_cloud_cover + convective cloud cover + frac + cnvc + real + (:,:) + in + F + MODULE_samfshalcnv_post SCHEME_samfshalcnv_post SUBROUTINE_samfshalcnv_post_run + + + convective_cloud_water_mixing_ratio + moist convective cloud water mixing ratio + kg kg-1 + cnvw + real + (:,:) + in + F + MODULE_samfshalcnv_post SCHEME_samfshalcnv_post SUBROUTINE_samfshalcnv_post_run + + + lwe_thickness_of_convective_precipitation_amount_on_dynamics_timestep + convective rain at this time step + m + rainc + real + (:) + inout + F + MODULE_samfshalcnv_post SCHEME_samfshalcnv_post SUBROUTINE_samfshalcnv_post_run + + + cumulative_lwe_thickness_of_convective_precipitation_amount + cumulative convective precipitation + m + cnvprcp + real + (:) + inout + F + MODULE_samfshalcnv_post SCHEME_samfshalcnv_post SUBROUTINE_samfshalcnv_post_run + + + cumulative_lwe_thickness_of_convective_precipitation_amount_in_bucket + cumulative convective precipitation in bucket + m + cnvprcpb + real + (:) + inout + F + MODULE_samfshalcnv_post SCHEME_samfshalcnv_post SUBROUTINE_samfshalcnv_post_run + + + convective_cloud_water_mixing_ratio_in_phy_f3d + convective cloud water mixing ratio in the phy_f3d array + kg kg-1 + cnvw_phy_f3d + real + (:,:) + inout + F + MODULE_samfshalcnv_post SCHEME_samfshalcnv_post SUBROUTINE_samfshalcnv_post_run + + + convective_cloud_cover_in_phy_f3d + convective cloud cover in the phy_f3d array + frac + cnvc_phy_f3d + real + (:,:) + inout + F + MODULE_samfshalcnv_post SCHEME_samfshalcnv_post SUBROUTINE_samfshalcnv_post_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_samfshalcnv_post SCHEME_samfshalcnv_post SUBROUTINE_samfshalcnv_post_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_samfshalcnv_post SCHEME_samfshalcnv_post SUBROUTINE_samfshalcnv_post_run + + + + + diff --git a/physics/satmedmfvdif.xml b/physics/satmedmfvdif.xml new file mode 100644 index 000000000..3b5ec573d --- /dev/null +++ b/physics/satmedmfvdif.xml @@ -0,0 +1,667 @@ + + + + + + + horizontal_dimension + horizontal dimension + count + ix + integer + + in + F + MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run + + + horizontal_loop_extent + horizontal loop extent + count + im + integer + + in + F + MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run + + + vertical_dimension + vertical layer dimension + count + km + integer + + in + F + MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run + + + number_of_vertical_diffusion_tracers + number of tracers to diffuse vertically + count + ntrac + integer + + in + F + MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run + + + index_for_liquid_cloud_condensate + tracer index for cloud condensate (or liquid water) + index + ntcw + integer + + in + F + MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run + + + index_for_ice_cloud_condensate_vertical_diffusion_tracer + tracer index for ice water in the vertically diffused tracer array + index + ntiw + integer + + in + F + MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run + + + index_for_turbulent_kinetic_energy_vertical_diffusion_tracer + index for turbulent kinetic energy in the vertically diffused tracer array + index + ntke + integer + + in + F + MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run + + + gravitational_acceleration + gravitational acceleration + m s-2 + grav + real + + in + F + MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run + + + gas_constant_dry_air + ideal gas constant for dry air + J kg-1 K-1 + rd + real + + in + F + MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run + + + specific_heat_of_dry_air_at_constant_pressure + specific heat of dry air at constant pressure + J kg-1 K-1 + cp + real + + in + F + MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run + + + gas_constant_water_vapor + ideal gas constant for water vapor + J kg-1 K-1 + rv + real + + in + F + MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run + + + latent_heat_of_vaporization_of_water_at_0C + latent heat of evaporation/sublimation + J kg-1 + hvap + real + + in + F + MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run + + + latent_heat_of_fusion_of_water_at_0C + latent heat of fusion + J kg-1 + hfus + real + + in + F + MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run + + + ratio_of_vapor_to_dry_air_gas_constants_minus_one + (rv/rd) - 1 (rv = ideal gas constant for water vapor) + none + fv + real + + in + F + MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run + + + ratio_of_dry_air_to_water_vapor_gas_constants + rd/rv + none + eps + real + + in + F + MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run + + + ratio_of_dry_air_to_water_vapor_gas_constants_minus_one + (rd/rv) - 1 + none + epsm1 + real + + in + F + MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run + + + tendency_of_y_wind_due_to_model_physics + updated tendency of the y wind + m s-2 + dv + real + (:,:) + inout + F + MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run + + + tendency_of_x_wind_due_to_model_physics + updated tendency of the x wind + m s-2 + du + real + (:,:) + inout + F + MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run + + + tendency_of_air_temperature_due_to_model_physics + updated tendency of the temperature + K s-1 + tdt + real + (:,:) + inout + F + MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run + + + tendency_of_vertically_diffused_tracer_concentration + updated tendency of the tracers due to vertical diffusion in PBL scheme + kg kg-1 s-1 + rtg + real + (:,:,:) + inout + F + MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run + + + x_wind + x component of layer wind + m s-1 + u1 + real + (:,:) + in + F + MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run + + + y_wind + y component of layer wind + m s-1 + v1 + real + (:,:) + in + F + MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run + + + air_temperature + layer mean air temperature + K + t1 + real + (:,:) + in + F + MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run + + + vertically_diffused_tracer_concentration + tracer concentration diffused by PBL scheme + kg kg-1 + q1 + real + (:,:,:) + in + F + MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run + + + tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step + total sky shortwave heating rate + K s-1 + swh + real + (:,:) + in + F + MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run + + + tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_step + total sky longwave heating rate + K s-1 + hlw + real + (:,:) + in + F + MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run + + + zenith_angle_temporal_adjustment_factor_for_shortwave_fluxes + zenith angle temporal adjustment factor for shortwave + none + xmu + real + (:) + in + F + MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run + + + cell_area + area of the grid cell + m2 + garea + real + (:) + in + F + MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run + + + dimensionless_exner_function_at_lowest_model_interface + dimensionless Exner function at the surface interface + none + psk + real + (:) + in + F + MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run + + + bulk_richardson_number_at_lowest_model_level + bulk Richardson number at the surface + none + rbsoil + real + (:) + in + F + MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run + + + surface_roughness_length + surface roughness length in cm + cm + zorl + real + (:) + in + F + MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run + + + x_wind_at_10m + x component of wind at 10 m + m s-1 + u10m + real + (:) + in + F + MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run + + + y_wind_at_10m + y component of wind at 10 m + m s-1 + v10m + real + (:) + in + F + MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run + + + Monin-Obukhov_similarity_function_for_momentum + Monin-Obukhov similarity function for momentum + none + fm + real + (:) + in + F + MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run + + + Monin-Obukhov_similarity_function_for_heat + Monin-Obukhov similarity function for heat + none + fh + real + (:) + in + F + MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run + + + surface_skin_temperature + surface skin temperature + K + tsea + real + (:) + in + F + MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run + + + kinematic_surface_upward_sensible_heat_flux + kinematic surface upward sensible heat flux + K m s-1 + heat + real + (:) + in + F + MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run + + + kinematic_surface_upward_latent_heat_flux + kinematic surface upward latent heat flux + kg kg-1 m s-1 + evap + real + (:) + in + F + MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run + + + surface_wind_stress + surface wind stress + m2 s-2 + stress + real + (:) + in + F + MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run + + + wind_speed_at_lowest_model_layer + wind speed at lowest model level + m s-1 + spd1 + real + (:) + in + F + MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run + + + vertical_index_at_top_of_atmosphere_boundary_layer + PBL top model level index + index + kpbl + integer + (:) + out + F + MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run + + + air_pressure_at_interface + air pressure at model layer interfaces + Pa + prsi + real + (:,:) + in + F + MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run + + + air_pressure_difference_between_midlayers + pres(k) - pres(k+1) + Pa + del + real + (:,:) + in + F + MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run + + + air_pressure + mean layer pressure + Pa + prsl + real + (:,:) + in + F + MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run + + + dimensionless_exner_function_at_model_layers + Exner function at layers + none + prslk + real + (:,:) + in + F + MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run + + + geopotential_at_interface + geopotential at model layer interfaces + m2 s-2 + phii + real + (:,:) + in + F + MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run + + + geopotential + geopotential at model layer centers + m2 s-2 + phil + real + (:,:) + in + F + MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run + + + time_step_for_physics + time step for physics + s + delt + real + + in + F + MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run + + + flag_TKE_dissipation_heating + flag for using TKE dissipation heating + flag + dspheat + logical + + in + F + MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run + + + instantaneous_surface_x_momentum_flux + x momentum flux + Pa + dusfc + real + (:) + out + F + MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run + + + instantaneous_surface_y_momentum_flux + y momentum flux + Pa + dvsfc + real + (:) + out + F + MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run + + + instantaneous_surface_upward_sensible_heat_flux + surface upward sensible heat flux + W m-2 + dtsfc + real + (:) + out + F + MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run + + + instantaneous_surface_upward_latent_heat_flux + surface upward latent heat flux + W m-2 + dqsfc + real + (:) + out + F + MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run + + + atmosphere_boundary_layer_thickness + PBL thickness + m + hpbl + real + (:) + out + F + MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run + + + index_of_highest_temperature_inversion + index of highest temperature inversion + index + kinver + integer + (:) + in + F + MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run + + + atmosphere_momentum_diffusivity_background + background value of momentum diffusivity + m2 s-1 + xkzm_m + real + + in + F + MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run + + + atmosphere_heat_diffusivity_background + background value of heat diffusivity + m2 s-1 + xkzm_h + real + + in + F + MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run + + + diffusivity_background_sigma_level + sigma level threshold for background diffusivity + none + xkzm_s + real + + in + F + MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run + + + diff --git a/physics/sfc_diag.xml b/physics/sfc_diag.xml new file mode 100644 index 000000000..b5dfc9b6c --- /dev/null +++ b/physics/sfc_diag.xml @@ -0,0 +1,282 @@ + + + + + + + horizontal_loop_extent + horizontal loop extent + count + im + integer + + in + F + MODULE_sfc_diag SCHEME_sfc_diag SUBROUTINE_sfc_diag_run + + + gravitational_acceleration + gravitational acceleration + m s-2 + grav + real + + in + F + MODULE_sfc_diag SCHEME_sfc_diag SUBROUTINE_sfc_diag_run + + + specific_heat_of_dry_air_at_constant_pressure + specific heat of dry air at constant pressure + J kg-1 K-1 + cp + real + + in + F + MODULE_sfc_diag SCHEME_sfc_diag SUBROUTINE_sfc_diag_run + + + ratio_of_dry_air_to_water_vapor_gas_constants + rd/rv + none + eps + real + + in + F + MODULE_sfc_diag SCHEME_sfc_diag SUBROUTINE_sfc_diag_run + + + ratio_of_dry_air_to_water_vapor_gas_constants_minus_one + (rd/rv) - 1 + none + epsm1 + real + + in + F + MODULE_sfc_diag SCHEME_sfc_diag SUBROUTINE_sfc_diag_run + + + surface_air_pressure + surface pressure + Pa + ps + real + (:) + in + F + MODULE_sfc_diag SCHEME_sfc_diag SUBROUTINE_sfc_diag_run + + + x_wind_at_lowest_model_layer_updated_by_physics + x component of 1st model layer wind + m s-1 + u1 + real + (:) + in + F + MODULE_sfc_diag SCHEME_sfc_diag SUBROUTINE_sfc_diag_run + + + y_wind_at_lowest_model_layer_updated_by_physics + y component of 1st model layer wind + m s-1 + v1 + real + (:) + in + F + MODULE_sfc_diag SCHEME_sfc_diag SUBROUTINE_sfc_diag_run + + + air_temperature_at_lowest_model_layer_updated_by_physics + 1st model layer air temperature + K + t1 + real + (:) + in + F + MODULE_sfc_diag SCHEME_sfc_diag SUBROUTINE_sfc_diag_run + + + water_vapor_specific_humidity_at_lowest_model_layer_updated_by_physics + 1st model layer specific humidity + kg kg-1 + q1 + real + (:) + in + F + MODULE_sfc_diag SCHEME_sfc_diag SUBROUTINE_sfc_diag_run + + + surface_skin_temperature + surface skin temperature + K + tskin + real + (:) + in + F + MODULE_sfc_diag SCHEME_sfc_diag SUBROUTINE_sfc_diag_run + + + surface_specific_humidity + surface specific humidity + kg kg-1 + qsurf + real + (:) + in + F + MODULE_sfc_diag SCHEME_sfc_diag SUBROUTINE_sfc_diag_run + + + ratio_of_wind_at_lowest_model_layer_and_wind_at_10m + ratio of fm10 and fm + ratio + f10m + real + (:) + out + F + MODULE_sfc_diag SCHEME_sfc_diag SUBROUTINE_sfc_diag_run + + + x_wind_at_10m + x component of wind at 10 m + m s-1 + u10m + real + (:) + out + F + MODULE_sfc_diag SCHEME_sfc_diag SUBROUTINE_sfc_diag_run + + + y_wind_at_10m + y component of wind at 10 m + m s-1 + v10m + real + (:) + out + F + MODULE_sfc_diag SCHEME_sfc_diag SUBROUTINE_sfc_diag_run + + + temperature_at_2m + temperature at 2 m + K + t2m + real + (:) + out + F + MODULE_sfc_diag SCHEME_sfc_diag SUBROUTINE_sfc_diag_run + + + specific_humidity_at_2m + specific humidity at 2 m + kg kg-1 + q2m + real + (:) + out + F + MODULE_sfc_diag SCHEME_sfc_diag SUBROUTINE_sfc_diag_run + + + ratio_of_exner_function_between_midlayer_and_interface_at_lowest_model_layer + Exner function ratio bt midlayer and interface at 1st layer + ratio + prslki + real + (:) + in + F + MODULE_sfc_diag SCHEME_sfc_diag SUBROUTINE_sfc_diag_run + + + kinematic_surface_upward_latent_heat_flux + surface upward evaporation flux + kg kg-1 m s-1 + evap + real + (:) + in + F + MODULE_sfc_diag SCHEME_sfc_diag SUBROUTINE_sfc_diag_run + + + Monin-Obukhov_similarity_function_for_momentum + Monin-Obukhov similarity parameter for momentum + none + fm + real + (:) + in + F + MODULE_sfc_diag SCHEME_sfc_diag SUBROUTINE_sfc_diag_run + + + Monin-Obukhov_similarity_function_for_heat + Monin-Obukhov similarity parameter for heat + none + fh + real + (:) + in + F + MODULE_sfc_diag SCHEME_sfc_diag SUBROUTINE_sfc_diag_run + + + Monin-Obukhov_similarity_function_for_momentum_at_10m + Monin-Obukhov similarity parameter for momentum + none + fm10 + real + (:) + in + F + MODULE_sfc_diag SCHEME_sfc_diag SUBROUTINE_sfc_diag_run + + + Monin-Obukhov_similarity_function_for_heat_at_2m + Monin-Obukhov similarity parameter for heat + none + fh2 + real + (:) + in + F + MODULE_sfc_diag SCHEME_sfc_diag SUBROUTINE_sfc_diag_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_sfc_diag SCHEME_sfc_diag SUBROUTINE_sfc_diag_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_sfc_diag SCHEME_sfc_diag SUBROUTINE_sfc_diag_run + + + diff --git a/physics/sfc_diag_post.xml b/physics/sfc_diag_post.xml new file mode 100644 index 000000000..0029ffa0f --- /dev/null +++ b/physics/sfc_diag_post.xml @@ -0,0 +1,227 @@ + + + + + + horizontal_loop_extent + horizontal loop extent + count + im + integer + + in + F + MODULE_sfc_diag_post SCHEME_sfc_diag_post SUBROUTINE_sfc_diag_post_run + + + flag_diagnostics + logical flag for storing diagnostics + flag + lssav + logical + + in + F + MODULE_sfc_diag_post SCHEME_sfc_diag_post SUBROUTINE_sfc_diag_post_run + + + time_step_for_dynamics + dynamics timestep + s + dtf + real + + in + F + MODULE_sfc_diag_post SCHEME_sfc_diag_post SUBROUTINE_sfc_diag_post_run + + + ratio_of_dry_air_to_water_vapor_gas_constants + rd/rv + none + con_eps + real + + in + F + MODULE_sfc_diag_post SCHEME_sfc_diag_post SUBROUTINE_sfc_diag_post_run + + + ratio_of_dry_air_to_water_vapor_gas_constants_minus_one + (rd/rv) - 1 + none + con_epsm1 + real + + in + F + MODULE_sfc_diag_post SCHEME_sfc_diag_post SUBROUTINE_sfc_diag_post_run + + + surface_air_pressure + surface pressure + Pa + pgr + real + (:) + in + F + MODULE_sfc_diag_post SCHEME_sfc_diag_post SUBROUTINE_sfc_diag_post_run + + + temperature_at_2m + 2 meter temperature + K + t2m + real + (:) + in + F + MODULE_sfc_diag_post SCHEME_sfc_diag_post SUBROUTINE_sfc_diag_post_run + + + specific_humidity_at_2m + 2 meter specific humidity + kg kg-1 + q2m + real + (:) + in + F + MODULE_sfc_diag_post SCHEME_sfc_diag_post SUBROUTINE_sfc_diag_post_run + + + x_wind_at_10m + 10 meter u wind speed + m s-1 + u10m + real + (:) + in + F + MODULE_sfc_diag_post SCHEME_sfc_diag_post SUBROUTINE_sfc_diag_post_run + + + y_wind_at_10m + 10 meter v wind speed + m s-1 + v10m + real + (:) + in + F + MODULE_sfc_diag_post SCHEME_sfc_diag_post SUBROUTINE_sfc_diag_post_run + + + minimum_temperature_at_2m + min temperature at 2m height + K + tmpmin + real + (:) + inout + F + MODULE_sfc_diag_post SCHEME_sfc_diag_post SUBROUTINE_sfc_diag_post_run + + + maximum_temperature_at_2m + max temperature at 2m height + K + tmpmax + real + (:) + inout + F + MODULE_sfc_diag_post SCHEME_sfc_diag_post SUBROUTINE_sfc_diag_post_run + + + minimum_specific_humidity_at_2m + minimum specific humidity at 2m height + kg kg-1 + spfhmin + real + (:) + inout + F + MODULE_sfc_diag_post SCHEME_sfc_diag_post SUBROUTINE_sfc_diag_post_run + + + maximum_specific_humidity_at_2m + maximum specific humidity at 2m height + kg kg-1 + spfhmax + real + (:) + inout + F + MODULE_sfc_diag_post SCHEME_sfc_diag_post SUBROUTINE_sfc_diag_post_run + + + maximum_wind_at_10m + maximum wind speed at 10 m + m s-1 + wind10mmax + real + (:) + inout + F + MODULE_sfc_diag_post SCHEME_sfc_diag_post SUBROUTINE_sfc_diag_post_run + + + maximum_x_wind_at_10m + maximum x wind at 10 m + m s-1 + u10mmax + real + (:) + inout + F + MODULE_sfc_diag_post SCHEME_sfc_diag_post SUBROUTINE_sfc_diag_post_run + + + maximum_y_wind_at_10m + maximum y wind at 10 m + m s-1 + v10mmax + real + (:) + inout + F + MODULE_sfc_diag_post SCHEME_sfc_diag_post SUBROUTINE_sfc_diag_post_run + + + dewpoint_temperature_at_2m + 2 meter dewpoint temperature + K + dpt2m + real + (:) + inout + F + MODULE_sfc_diag_post SCHEME_sfc_diag_post SUBROUTINE_sfc_diag_post_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_sfc_diag_post SCHEME_sfc_diag_post SUBROUTINE_sfc_diag_post_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_sfc_diag_post SCHEME_sfc_diag_post SUBROUTINE_sfc_diag_post_run + + + + diff --git a/physics/sfc_ex_coef.xml b/physics/sfc_ex_coef.xml new file mode 100644 index 000000000..a5ef62457 --- /dev/null +++ b/physics/sfc_ex_coef.xml @@ -0,0 +1,392 @@ + + + + + + horizontal_loop_extent + horizontal loop extent + count + im + integer + + in + F + MODULE_sfc_ex_coef SCHEME_sfc_ex_coef SUBROUTINE_sfc_ex_coef_run + + + surface_air_pressure + surface pressure + Pa + ps + real + (:) + in + F + MODULE_sfc_ex_coef SCHEME_sfc_ex_coef SUBROUTINE_sfc_ex_coef_run + + + x_wind_at_lowest_model_layer + x component of 1st model layer wind + m s-1 + u1 + real + (:) + in + F + MODULE_sfc_ex_coef SCHEME_sfc_ex_coef SUBROUTINE_sfc_ex_coef_run + + + y_wind_at_lowest_model_layer + y component of 1st model layer wind + m s-1 + v1 + real + (:) + in + F + MODULE_sfc_ex_coef SCHEME_sfc_ex_coef SUBROUTINE_sfc_ex_coef_run + + + air_temperature_at_lowest_model_layer + 1st model layer air temperature + K + t1 + real + (:) + in + F + MODULE_sfc_ex_coef SCHEME_sfc_ex_coef SUBROUTINE_sfc_ex_coef_run + + + water_vapor_specific_humidity_at_lowest_model_layer + 1st model layer specific humidity + kg kg-1 + q1 + real + (:) + in + F + MODULE_sfc_ex_coef SCHEME_sfc_ex_coef SUBROUTINE_sfc_ex_coef_run + + + height_above_ground_at_lowest_model_layer + height above ground at 1st model layer + m + z1 + real + (:) + in + F + MODULE_sfc_ex_coef SCHEME_sfc_ex_coef SUBROUTINE_sfc_ex_coef_run + + + surface_snow_thickness_water_equivalent + water equivalent surface snow thickness + mm + snwdph + real + (:) + in + F + MODULE_sfc_ex_coef SCHEME_sfc_ex_coef SUBROUTINE_sfc_ex_coef_run + + + surface_skin_temperature + surface skin temperature + K + tskin + real + (:) + in + F + MODULE_sfc_ex_coef SCHEME_sfc_ex_coef SUBROUTINE_sfc_ex_coef_run + + + surface_roughness_length + surface roughness length + cm + z0rl + real + (:) + inout + F + MODULE_sfc_ex_coef SCHEME_sfc_ex_coef SUBROUTINE_sfc_ex_coef_run + + + surface_drag_coefficient_for_momentum_in_air + surface exchange coeff for momentum + none + cm + real + (:) + inout + F + MODULE_sfc_ex_coef SCHEME_sfc_ex_coef SUBROUTINE_sfc_ex_coef_run + + + surface_drag_coefficient_for_heat_and_moisture_in_air + surface exchange coeff heat moisture + none + ch + real + (:) + inout + F + MODULE_sfc_ex_coef SCHEME_sfc_ex_coef SUBROUTINE_sfc_ex_coef_run + + + bulk_richardson_number_at_lowest_model_level + bulk Richardson number at the surface + none + rb + real + (:) + inout + F + MODULE_sfc_ex_coef SCHEME_sfc_ex_coef SUBROUTINE_sfc_ex_coef_run + + + air_pressure_at_lowest_model_layer + Model layer 1 mean pressure + Pa + prsl1 + real + (:) + in + F + MODULE_sfc_ex_coef SCHEME_sfc_ex_coef SUBROUTINE_sfc_ex_coef_run + + + ratio_of_exner_function_between_midlayer_and_interface_at_lowest_model_layer + Exner function ratio bt midlayer and interface at 1st layer + ratio + prslki + real + (:) + in + F + MODULE_sfc_ex_coef SCHEME_sfc_ex_coef SUBROUTINE_sfc_ex_coef_run + + + sea_land_ice_mask + landmask: sea/land/ice=0/1/2 + flag + islimsk + integer + (:) + in + F + MODULE_sfc_ex_coef SCHEME_sfc_ex_coef SUBROUTINE_sfc_ex_coef_run + + + surface_wind_stress + surface wind stress + m2 s-2 + stress + real + (:) + inout + F + MODULE_sfc_ex_coef SCHEME_sfc_ex_coef SUBROUTINE_sfc_ex_coef_run + + + Monin-Obukhov_similarity_function_for_momentum + Monin-Obukhov similarity parameter for momentum + none + fm + real + (:) + inout + F + MODULE_sfc_ex_coef SCHEME_sfc_ex_coef SUBROUTINE_sfc_ex_coef_run + + + Monin-Obukhov_similarity_function_for_heat + Monin-Obukhov similarity parameter for heat + none + fh + real + (:) + inout + F + MODULE_sfc_ex_coef SCHEME_sfc_ex_coef SUBROUTINE_sfc_ex_coef_run + + + surface_friction_velocity + surface friction velocity + m s-1 + ustar + real + (:) + inout + F + MODULE_sfc_ex_coef SCHEME_sfc_ex_coef SUBROUTINE_sfc_ex_coef_run + + + wind_speed_at_lowest_model_layer + wind speed at lowest model level + m s-1 + wind + real + (:) + inout + F + MODULE_sfc_ex_coef SCHEME_sfc_ex_coef SUBROUTINE_sfc_ex_coef_run + + + surface_wind_enhancement_due_to_convection + surface wind enhancement due to convection + m s-1 + ddvel + real + (:) + in + F + MODULE_sfc_ex_coef SCHEME_sfc_ex_coef SUBROUTINE_sfc_ex_coef_run + + + Monin-Obukhov_similarity_function_for_momentum_at_10m + Monin-Obukhov similarity parameter for momentum + none + fm10 + real + (:) + inout + F + MODULE_sfc_ex_coef SCHEME_sfc_ex_coef SUBROUTINE_sfc_ex_coef_run + + + Monin-Obukhov_similarity_function_for_heat_at_2m + Monin-Obukhov similarity parameter for heat + none + fh2 + real + (:) + inout + F + MODULE_sfc_ex_coef SCHEME_sfc_ex_coef SUBROUTINE_sfc_ex_coef_run + + + bounded_vegetation_area_fraction + areal fractional cover of green vegetation bounded on the bottom + frac + sigmaf + real + (:) + in + F + MODULE_sfc_ex_coef SCHEME_sfc_ex_coef SUBROUTINE_sfc_ex_coef_run + + + vegetation_type_classification + vegetation type at each grid cell + index + vegtype + integer + (:) + in + F + MODULE_sfc_ex_coef SCHEME_sfc_ex_coef SUBROUTINE_sfc_ex_coef_run + + + maximum_vegetation_area_fraction + max fractnl cover of green veg + frac + shdmax + real + (:) + in + F + MODULE_sfc_ex_coef SCHEME_sfc_ex_coef SUBROUTINE_sfc_ex_coef_run + + + vegetation_type_dataset_choice + land use dataset choice + index + ivegsrc + integer + + in + F + MODULE_sfc_ex_coef SCHEME_sfc_ex_coef SUBROUTINE_sfc_ex_coef_run + + + perturbation_of_momentum_roughness_length + perturbation of momentum roughness length + frac + z0pert + real + (:) + in + F + MODULE_sfc_ex_coef SCHEME_sfc_ex_coef SUBROUTINE_sfc_ex_coef_run + + + perturbation_of_heat_to_momentum_roughness_length_ratio + perturbation of heat to momentum roughness length ratio + frac + ztpert + real + (:) + in + F + MODULE_sfc_ex_coef SCHEME_sfc_ex_coef SUBROUTINE_sfc_ex_coef_run + + + surface_skin_temperature_after_iteration + surface skin temperature after iteration + K + tsurf + real + (:) + in + F + MODULE_sfc_ex_coef SCHEME_sfc_ex_coef SUBROUTINE_sfc_ex_coef_run + + + flag_for_iteration + flag for iteration + flag + flag_iter + logical + (:) + in + F + MODULE_sfc_ex_coef SCHEME_sfc_ex_coef SUBROUTINE_sfc_ex_coef_run + + + flag_for_reduced_drag_coefficient_over_sea + flag for reduced drag coefficient over sea + flag + redrag + logical + + in + F + MODULE_sfc_ex_coef SCHEME_sfc_ex_coef SUBROUTINE_sfc_ex_coef_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_sfc_ex_coef SCHEME_sfc_ex_coef SUBROUTINE_sfc_ex_coef_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_sfc_ex_coef SCHEME_sfc_ex_coef SUBROUTINE_sfc_ex_coef_run + + + + diff --git a/physics/sfc_nst.xml b/physics/sfc_nst.xml new file mode 100644 index 000000000..35051132f --- /dev/null +++ b/physics/sfc_nst.xml @@ -0,0 +1,656 @@ + + + + + + horizontal_loop_extent + horizontal loop extent + count + im + integer + + in + F + MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run + + + surface_air_pressure + surface pressure + Pa + ps + real + (:) + in + F + MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run + + + x_wind_at_lowest_model_layer + x component of surface layer wind + m s-1 + u1 + real + (:) + in + F + MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run + + + y_wind_at_lowest_model_layer + y component of surface layer wind + m s-1 + v1 + real + (:) + in + F + MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run + + + air_temperature_at_lowest_model_layer + surface layer mean temperature + K + t1 + real + (:) + in + F + MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run + + + water_vapor_specific_humidity_at_lowest_model_layer + surface layer mean specific humidity + kg kg-1 + q1 + real + (:) + in + F + MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run + + + sea_surface_reference_temperature + reference/foundation temperature + K + tref + real + (:) + in + F + MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run + + + surface_drag_coefficient_for_momentum_in_air + surface exchange coeff for momentum + none + cm + real + (:) + in + F + MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run + + + surface_drag_coefficient_for_heat_and_moisture_in_air + surface exchange coeff heat moisture + none + ch + real + (:) + in + F + MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run + + + air_pressure_at_lowest_model_layer + surface layer mean pressure + Pa + prsl1 + real + (:) + in + F + MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run + + + ratio_of_exner_function_between_midlayer_and_interface_at_lowest_model_layer + Exner function ratio bt midlayer and interface at 1st layer + ratio + prslki + real + (:) + in + F + MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run + + + sea_land_ice_mask + landmask: sea/land/ice=0/1/2 + flag + islimsk + integer + (:) + in + F + MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run + + + longitude + longitude + radians + xlon + real + (:) + in + F + MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run + + + sine_of_latitude + sine of latitude + none + sinlat + real + (:) + in + F + MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run + + + surface_wind_stress + wind stress + m2 s-2 + stress + real + (:) + in + F + MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run + + + surface_longwave_emissivity + surface longwave emissivity + frac + sfcemis + real + (:) + in + F + MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run + + + surface_downwelling_longwave_flux_absorbed_by_ground + total sky sfc downward lw flux absorbed by the ocean + W m-2 + dlwflx + real + (:) + in + F + MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run + + + surface_net_downwelling_shortwave_flux + total sky sfc net sw flx into ocean + W m-2 + sfcnsw + real + (:) + in + F + MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run + + + nonnegative_lwe_thickness_of_precipitation_amount_on_dynamics_timestep + nonnegative precipitation amount on dyn time step + m + rain + real + (:) + in + F + MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run + + + time_step_for_dynamics + timestep interval + s + timestep + real + + in + F + MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run + + + index_of_time_step + current time step index + index + kdt + integer + + in + F + MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run + + + forecast_hour + fcst hour at the end of prev time step + h + solhr + real + + in + F + MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run + + + instantaneous_cosine_of_zenith_angle + cosine of solar zenith angle + none + xcosz + real + (:) + in + F + MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run + + + surface_wind_enhancement_due_to_convection + wind enhancement due to convection + m s-1 + ddvel + real + (:) + in + F + MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run + + + flag_for_iteration + flag for iteration + flag + flag_iter + logical + (:) + in + F + MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run + + + flag_for_guess_run + flag for guess run + flag + flag_guess + logical + (:) + in + F + MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run + + + flag_for_nsstm_run + NSSTM flag: off/uncoupled/coupled=0/1/2 + flag + nstf_name1 + integer + + in + F + MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run + + + vertical_temperature_average_range_lower_bound + zsea1 + mm + nstf_name4 + integer + + in + F + MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run + + + vertical_temperature_average_range_upper_bound + zsea2 + mm + nstf_name5 + integer + + in + F + MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run + + + flag_print + flag for printing diagnostics to output + flag + lprnt + logical + + in + F + MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run + + + horizontal_index_of_printed_column + horizontal index of printed column + index + ipr + integer + + in + F + MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run + + + surface_skin_temperature_for_nsst + ocean surface skin temperature + K + tskin + real + (:) + inout + F + MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run + + + surface_skin_temperature_after_iteration + ocean surface skin temperature for guess run + K + tsurf + real + (:) + inout + F + MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run + + + diurnal_thermocline_layer_heat_content + heat content in diurnal thermocline layer + K m + xt + real + (:) + inout + F + MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run + + + sea_water_salinity + salinity content in diurnal thermocline layer + ppt m + xs + real + (:) + inout + F + MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run + + + diurnal_thermocline_layer_x_current + u-current content in diurnal thermocline layer + m2 s-1 + xu + real + (:) + inout + F + MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run + + + diurnal_thermocline_layer_y_current + v-current content in diurnal thermocline layer + m2 s-1 + xv + real + (:) + inout + F + MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run + + + diurnal_thermocline_layer_thickness + diurnal thermocline layer thickness + m + xz + real + (:) + inout + F + MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run + + + ocean_mixed_layer_thickness + mixed layer thickness + m + zm + real + (:) + inout + F + MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run + + + sensitivity_of_dtl_heat_content_to_surface_temperature + d(xt)/d(ts) + m + xtts + real + (:) + inout + F + MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run + + + sensitivity_of_dtl_thickness_to_surface_temperature + d(xz)/d(ts) + m K-1 + xzts + real + (:) + inout + F + MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run + + + sub-layer_cooling_amount + sub-layer cooling amount + K + dt_cool + real + (:) + inout + F + MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run + + + sub-layer_cooling_thickness + sub-layer cooling thickness + m + z_c + real + (:) + inout + F + MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run + + + coefficient_c_0 + coefficient1 to calculate d(tz)/d(ts) + none + c_0 + real + (:) + inout + F + MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run + + + coefficient_c_d + coefficient2 to calculate d(tz)/d(ts) + none + c_d + real + (:) + inout + F + MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run + + + coefficient_w_0 + coefficient3 to calculate d(tz)/d(ts) + none + w_0 + real + (:) + inout + F + MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run + + + coefficient_w_d + coefficient4 to calculate d(tz)/d(ts) + none + w_d + real + (:) + inout + F + MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run + + + free_convection_layer_thickness + thickness of free convection layer + m + d_conv + real + (:) + inout + F + MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run + + + index_of_dtlm_start + index to start dtlm run or not + index + ifd + real + (:) + inout + F + MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run + + + sensible_heat_flux_due_to_rainfall + sensible heat flux due to rainfall + W + qrain + real + (:) + inout + F + MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run + + + surface_specific_humidity + surface air saturation specific humidity + kg kg-1 + qsurf + real + (:) + inout + F + MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run + + + upward_heat_flux_in_soil + soil heat flux + W m-2 + gflux + real + (:) + inout + F + MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run + + + surface_drag_wind_speed_for_momentum_in_air + surf mom exch coef time mean surf wind + m s-1 + cmm + real + (:) + inout + F + MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run + + + surface_drag_mass_flux_for_heat_and_moisture_in_air + surf h m exch coef time surf wind density + kg m-2 s-1 + chh + real + (:) + inout + F + MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run + + + kinematic_surface_upward_latent_heat_flux + kinematic from latent heat flux + kg kg-1 m s-1 + evap + real + (:) + inout + F + MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run + + + kinematic_surface_upward_sensible_heat_flux + kinematic sensible heat flux + K m s-1 + hflx + real + (:) + inout + F + MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run + + + surface_upward_potential_latent_heat_flux + potential evaporation + W m-2 + ep + real + (:) + inout + F + MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run + + + + diff --git a/physics/sfc_nst_post.xml b/physics/sfc_nst_post.xml new file mode 100644 index 000000000..f7dd20f46 --- /dev/null +++ b/physics/sfc_nst_post.xml @@ -0,0 +1,216 @@ + + + + + horizontal_loop_extent + horizontal loop extent + count + im + integer + + in + F + MODULE_sfc_nst_post SCHEME_sfc_nst_post SUBROUTINE_sfc_nst_post_run + + + sea_land_ice_mask + landmask: sea/land/ice=0/1/2 + flag + islimsk + integer + (:) + in + F + MODULE_sfc_nst_post SCHEME_sfc_nst_post SUBROUTINE_sfc_nst_post_run + + + orography + orography + m + oro + real + (:) + in + F + MODULE_sfc_nst_post SCHEME_sfc_nst_post SUBROUTINE_sfc_nst_post_run + + + orography_unfiltered + unfiltered orography + m + oro_uf + real + (:) + in + F + MODULE_sfc_nst_post SCHEME_sfc_nst_post SUBROUTINE_sfc_nst_post_run + + + flag_for_nsstm_run + NSSTM flag: off/uncoupled/coupled=0/1/2 + flag + nstf_name1 + integer + + in + F + MODULE_sfc_nst_post SCHEME_sfc_nst_post SUBROUTINE_sfc_nst_post_run + + + vertical_temperature_average_range_lower_bound + zsea1 + mm + nstf_name4 + integer + + in + F + MODULE_sfc_nst_post SCHEME_sfc_nst_post SUBROUTINE_sfc_nst_post_run + + + vertical_temperature_average_range_upper_bound + zsea2 + mm + nstf_name5 + integer + + in + F + MODULE_sfc_nst_post SCHEME_sfc_nst_post SUBROUTINE_sfc_nst_post_run + + + diurnal_thermocline_layer_heat_content + heat content in diurnal thermocline layer + K m + xt + real + (:) + in + F + MODULE_sfc_nst_post SCHEME_sfc_nst_post SUBROUTINE_sfc_nst_post_run + + + diurnal_thermocline_layer_thickness + diurnal thermocline layer thickness + m + xz + real + (:) + in + F + MODULE_sfc_nst_post SCHEME_sfc_nst_post SUBROUTINE_sfc_nst_post_run + + + sub-layer_cooling_amount + sub-layer cooling amount + K + dt_cool + real + (:) + in + F + MODULE_sfc_nst_post SCHEME_sfc_nst_post SUBROUTINE_sfc_nst_post_run + + + sub-layer_cooling_thickness + sub-layer cooling thickness + m + z_c + real + (:) + in + F + MODULE_sfc_nst_post SCHEME_sfc_nst_post SUBROUTINE_sfc_nst_post_run + + + sea_land_ice_mask_real + landmask: sea/land/ice=0/1/2 + flag + rslimsk + real + (:) + in + F + MODULE_sfc_nst_post SCHEME_sfc_nst_post SUBROUTINE_sfc_nst_post_run + + + sea_surface_reference_temperature + reference/foundation temperature + K + tref + real + (:) + in + F + MODULE_sfc_nst_post SCHEME_sfc_nst_post SUBROUTINE_sfc_nst_post_run + + + longitude + longitude + radians + xlon + real + (:) + in + F + MODULE_sfc_nst_post SCHEME_sfc_nst_post SUBROUTINE_sfc_nst_post_run + + + surface_skin_temperature_after_iteration + ocean surface skin temperature for guess run + K + tsurf + real + (:) + inout + F + MODULE_sfc_nst_post SCHEME_sfc_nst_post SUBROUTINE_sfc_nst_post_run + + + mean_change_over_depth_in_sea_water_temperature + mean of dT(z) (zsea1 to zsea2) + K + dtzm + real + (:) + out + F + MODULE_sfc_nst_post SCHEME_sfc_nst_post SUBROUTINE_sfc_nst_post_run + + + surface_skin_temperature + surface skin temperature + K + tsfc + real + (:) + inout + F + MODULE_sfc_nst_post SCHEME_sfc_nst_post SUBROUTINE_sfc_nst_post_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_sfc_nst_post SCHEME_sfc_nst_post SUBROUTINE_sfc_nst_post_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_sfc_nst_post SCHEME_sfc_nst_post SUBROUTINE_sfc_nst_post_run + + + + + diff --git a/physics/sfc_nst_pre.xml b/physics/sfc_nst_pre.xml new file mode 100644 index 000000000..cd7931866 --- /dev/null +++ b/physics/sfc_nst_pre.xml @@ -0,0 +1,106 @@ + + + + + + + horizontal_loop_extent + horizontal loop extent + count + im + integer + + in + F + MODULE_sfc_nst_pre SCHEME_sfc_nst_pre SUBROUTINE_sfc_nst_pre_run + + + sea_land_ice_mask + landmask: sea/land/ice=0/1/2 + flag + islimsk + integer + (:) + in + F + MODULE_sfc_nst_pre SCHEME_sfc_nst_pre SUBROUTINE_sfc_nst_pre_run + + + orography + orography + m + oro + real + (:) + in + F + MODULE_sfc_nst_pre SCHEME_sfc_nst_pre SUBROUTINE_sfc_nst_pre_run + + + orography_unfiltered + unfiltered orographyo + m + oro_uf + real + (:) + in + F + MODULE_sfc_nst_pre SCHEME_sfc_nst_pre SUBROUTINE_sfc_nst_pre_run + + + surface_skin_temperature + surface skin temperature + K + tsfc + real + (:) + in + F + MODULE_sfc_nst_pre SCHEME_sfc_nst_pre SUBROUTINE_sfc_nst_pre_run + + + surface_skin_temperature_after_iteration + ocean surface skin temperature for guess run + K + tsurf + real + (:) + inout + F + MODULE_sfc_nst_pre SCHEME_sfc_nst_pre SUBROUTINE_sfc_nst_pre_run + + + surface_skin_temperature_for_nsst + ocean surface skin temperature + K + tskin + real + (:) + out + F + MODULE_sfc_nst_pre SCHEME_sfc_nst_pre SUBROUTINE_sfc_nst_pre_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_sfc_nst_pre SCHEME_sfc_nst_pre SUBROUTINE_sfc_nst_pre_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_sfc_nst_pre SCHEME_sfc_nst_pre SUBROUTINE_sfc_nst_pre_run + + + diff --git a/physics/sfc_ocean.xml b/physics/sfc_ocean.xml new file mode 100644 index 000000000..d36950994 --- /dev/null +++ b/physics/sfc_ocean.xml @@ -0,0 +1,260 @@ + + + + + + + horizontal_loop_extent + horizontal loop extent + count + im + integer + + in + F + MODULE_sfc_ocean SCHEME_sfc_ocean SUBROUTINE_sfc_ocean_run + + + surface_air_pressure + surface pressure + Pa + ps + real + (:) + in + F + MODULE_sfc_ocean SCHEME_sfc_ocean SUBROUTINE_sfc_ocean_run + + + x_wind_at_lowest_model_layer + x component of surface layer wind + m s-1 + u1 + real + (:) + in + F + MODULE_sfc_ocean SCHEME_sfc_ocean SUBROUTINE_sfc_ocean_run + + + y_wind_at_lowest_model_layer + y component of surface layer wind + m s-1 + v1 + real + (:) + in + F + MODULE_sfc_ocean SCHEME_sfc_ocean SUBROUTINE_sfc_ocean_run + + + air_temperature_at_lowest_model_layer + surface layer mean temperature + K + t1 + real + (:) + in + F + MODULE_sfc_ocean SCHEME_sfc_ocean SUBROUTINE_sfc_ocean_run + + + water_vapor_specific_humidity_at_lowest_model_layer + surface layer mean specific humidity + kg kg-1 + q1 + real + (:) + in + F + MODULE_sfc_ocean SCHEME_sfc_ocean SUBROUTINE_sfc_ocean_run + + + surface_skin_temperature + surface skin temperature + K + tskin + real + (:) + in + F + MODULE_sfc_ocean SCHEME_sfc_ocean SUBROUTINE_sfc_ocean_run + + + surface_drag_coefficient_for_momentum_in_air + surface exchange coeff for momentum + none + cm + real + (:) + in + F + MODULE_sfc_ocean SCHEME_sfc_ocean SUBROUTINE_sfc_ocean_run + + + surface_drag_coefficient_for_heat_and_moisture_in_air + surface exchange coeff heat moisture + none + ch + real + (:) + in + F + MODULE_sfc_ocean SCHEME_sfc_ocean SUBROUTINE_sfc_ocean_run + + + air_pressure_at_lowest_model_layer + surface layer mean pressure + Pa + prsl1 + real + (:) + in + F + MODULE_sfc_ocean SCHEME_sfc_ocean SUBROUTINE_sfc_ocean_run + + + ratio_of_exner_function_between_midlayer_and_interface_at_lowest_model_layer + Exner function ratio bt midlayer and interface at 1st layer + ratio + prslki + real + (:) + in + F + MODULE_sfc_ocean SCHEME_sfc_ocean SUBROUTINE_sfc_ocean_run + + + sea_land_ice_mask + landmask: sea/land/ice=0/1/2 + flag + islimsk + integer + (:) + in + F + MODULE_sfc_ocean SCHEME_sfc_ocean SUBROUTINE_sfc_ocean_run + + + surface_wind_enhancement_due_to_convection + wind enhancement due to convection + m s-1 + ddvel + real + (:) + in + F + MODULE_sfc_ocean SCHEME_sfc_ocean SUBROUTINE_sfc_ocean_run + + + flag_for_iteration + flag for iteration + flag + flag_iter + logical + (:) + in + F + MODULE_sfc_ocean SCHEME_sfc_ocean SUBROUTINE_sfc_ocean_run + + + surface_specific_humidity + surface air saturation specific humidity + kg kg-1 + qsurf + real + (:) + inout + F + MODULE_sfc_ocean SCHEME_sfc_ocean SUBROUTINE_sfc_ocean_run + + + surface_drag_wind_speed_for_momentum_in_air + surf mom exch coef time mean surf wind + m s-1 + cmm + real + (:) + inout + F + MODULE_sfc_ocean SCHEME_sfc_ocean SUBROUTINE_sfc_ocean_run + + + surface_drag_mass_flux_for_heat_and_moisture_in_air + surf h m exch coef time surf wind density + kg m-2 s-1 + chh + real + (:) + inout + F + MODULE_sfc_ocean SCHEME_sfc_ocean SUBROUTINE_sfc_ocean_run + + + upward_heat_flux_in_soil + soil heat flux + W m-2 + gflux + real + (:) + inout + F + MODULE_sfc_ocean SCHEME_sfc_ocean SUBROUTINE_sfc_ocean_run + + + kinematic_surface_upward_latent_heat_flux + kinematic from latent heat flux + kg kg-1 m s-1 + evap + real + (:) + inout + F + MODULE_sfc_ocean SCHEME_sfc_ocean SUBROUTINE_sfc_ocean_run + + + kinematic_surface_upward_sensible_heat_flux + kinematic sensible heat flux + K m s-1 + hflx + real + (:) + inout + F + MODULE_sfc_ocean SCHEME_sfc_ocean SUBROUTINE_sfc_ocean_run + + + surface_upward_potential_latent_heat_flux + potential evaporation + W m-2 + ep + real + (:) + inout + F + MODULE_sfc_ocean SCHEME_sfc_ocean SUBROUTINE_sfc_ocean_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_sfc_ocean SCHEME_sfc_ocean SUBROUTINE_sfc_ocean_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_sfc_ocean SCHEME_sfc_ocean SUBROUTINE_sfc_ocean_run + + + diff --git a/physics/sfc_sice.xml b/physics/sfc_sice.xml new file mode 100644 index 000000000..d6d51a995 --- /dev/null +++ b/physics/sfc_sice.xml @@ -0,0 +1,469 @@ + + + + + horizontal_loop_extent + horizontal loop extent + count + im + integer + + in + F + MODULE_sfc_sice SCHEME_sfc_sice SUBROUTINE_sfc_sice_run + + + soil_vertical_dimension + vertical loop extent for soil levels, start at 1 + count + km + integer + + in + F + MODULE_sfc_sice SCHEME_sfc_sice SUBROUTINE_sfc_sice_run + + + surface_air_pressure + surface pressure + Pa + ps + real + (:) + in + F + MODULE_sfc_sice SCHEME_sfc_sice SUBROUTINE_sfc_sice_run + + + x_wind_at_lowest_model_layer + u component of surface layer wind + m s-1 + u1 + real + (:) + in + F + MODULE_sfc_sice SCHEME_sfc_sice SUBROUTINE_sfc_sice_run + + + y_wind_at_lowest_model_layer + v component of surface layer wind + m s-1 + v1 + real + (:) + in + F + MODULE_sfc_sice SCHEME_sfc_sice SUBROUTINE_sfc_sice_run + + + air_temperature_at_lowest_model_layer + surface layer mean temperature + K + t1 + real + (:) + in + F + MODULE_sfc_sice SCHEME_sfc_sice SUBROUTINE_sfc_sice_run + + + water_vapor_specific_humidity_at_lowest_model_layer + surface layer mean specific humidity + kg kg-1 + q1 + real + (:) + in + F + MODULE_sfc_sice SCHEME_sfc_sice SUBROUTINE_sfc_sice_run + + + time_step_for_dynamics + time step + s + delt + real + + in + F + MODULE_sfc_sice SCHEME_sfc_sice SUBROUTINE_sfc_sice_run + + + surface_longwave_emissivity + sfc lw emissivity + frac + sfcemis + real + (:) + in + F + MODULE_sfc_sice SCHEME_sfc_sice SUBROUTINE_sfc_sice_run + + + surface_downwelling_longwave_flux_absorbed_by_ground + total sky surface downward longwave flux absorbed by the ground + W m-2 + dlwflx + real + (:) + in + F + MODULE_sfc_sice SCHEME_sfc_sice SUBROUTINE_sfc_sice_run + + + surface_net_downwelling_shortwave_flux + total sky sfc netsw flx into ground + W m-2 + sfcnsw + real + (:) + in + F + MODULE_sfc_sice SCHEME_sfc_sice SUBROUTINE_sfc_sice_run + + + surface_downwelling_shortwave_flux + total sky sfc downward sw flux + W m-2 + sfcdsw + real + (:) + in + F + MODULE_sfc_sice SCHEME_sfc_sice SUBROUTINE_sfc_sice_run + + + flag_for_precipitation_type + snow/rain flag for precipitation + flag + srflag + real + (:) + in + F + MODULE_sfc_sice SCHEME_sfc_sice SUBROUTINE_sfc_sice_run + + + surface_drag_coefficient_for_momentum_in_air + surface exchange coeff for momentum + none + cm + real + (:) + in + F + MODULE_sfc_sice SCHEME_sfc_sice SUBROUTINE_sfc_sice_run + + + surface_drag_coefficient_for_heat_and_moisture_in_air + surface exchange coeff heat moisture + none + ch + real + (:) + in + F + MODULE_sfc_sice SCHEME_sfc_sice SUBROUTINE_sfc_sice_run + + + air_pressure_at_lowest_model_layer + surface layer mean pressure + Pa + prsl1 + real + (:) + in + F + MODULE_sfc_sice SCHEME_sfc_sice SUBROUTINE_sfc_sice_run + + + ratio_of_exner_function_between_midlayer_and_interface_at_lowest_model_layer + Exner function ratio bt midlayer and interface at 1st layer + ratio + prslki + real + (:) + in + F + MODULE_sfc_sice SCHEME_sfc_sice SUBROUTINE_sfc_sice_run + + + sea_land_ice_mask + sea/land/ice mask (=0/1/2) + flag + islimsk + integer + (:) + in + F + MODULE_sfc_sice SCHEME_sfc_sice SUBROUTINE_sfc_sice_run + + + surface_wind_enhancement_due_to_convection + wind enhancement due to convection + m s-1 + ddvel + real + (:) + in + F + MODULE_sfc_sice SCHEME_sfc_sice SUBROUTINE_sfc_sice_run + + + flag_for_iteration + flag for iteration + flag + flag_iter + logical + (:) + in + F + MODULE_sfc_sice SCHEME_sfc_sice SUBROUTINE_sfc_sice_run + + + flag_for_mom4_coupling + flag for Mom4 coupling + flag + mom4ice + logical + + in + F + MODULE_sfc_sice SCHEME_sfc_sice SUBROUTINE_sfc_sice_run + + + flag_for_land_surface_scheme + flag for land sfc scheme =0: osu; =1: noah + flag + lsm + integer + + in + F + MODULE_sfc_sice SCHEME_sfc_sice SUBROUTINE_sfc_sice_run + + + flag_print + switch for printing sample column to stdout + flag + lprnt + logical + + in + F + MODULE_sfc_sice SCHEME_sfc_sice SUBROUTINE_sfc_sice_run + + + horizontal_index_of_printed_column + horizontal index of printed column + index + ipr + integer + + in + F + MODULE_sfc_sice SCHEME_sfc_sice SUBROUTINE_sfc_sice_run + + + sea_ice_thickness + sea-ice thickness + m + hice + real + (:) + inout + F + MODULE_sfc_sice SCHEME_sfc_sice SUBROUTINE_sfc_sice_run + + + sea_ice_concentration + sea-ice concentration [0,1] + frac + fice + real + (:) + inout + F + MODULE_sfc_sice SCHEME_sfc_sice SUBROUTINE_sfc_sice_run + + + sea_ice_temperature + sea-ice surface temperature + K + tice + real + (:) + inout + F + MODULE_sfc_sice SCHEME_sfc_sice SUBROUTINE_sfc_sice_run + + + water_equivalent_accumulated_snow_depth + water equivalent accumulated snow depth + mm + weasd + real + (:) + inout + F + MODULE_sfc_sice SCHEME_sfc_sice SUBROUTINE_sfc_sice_run + + + surface_skin_temperature + surface skin temperature + K + tskin + real + (:) + inout + F + MODULE_sfc_sice SCHEME_sfc_sice SUBROUTINE_sfc_sice_run + + + nonnegative_lwe_thickness_of_precipitation_amount_on_dynamics_timestep + nonnegative precipitation amount in one dynamics time step + m + tprcp + real + (:) + inout + F + MODULE_sfc_sice SCHEME_sfc_sice SUBROUTINE_sfc_sice_run + + + soil_temperature + soil temp + K + stc + real + (:,:) + inout + F + MODULE_sfc_sice SCHEME_sfc_sice SUBROUTINE_sfc_sice_run + + + surface_upward_potential_latent_heat_flux + potential evaporation + W m-2 + ep + real + (:) + inout + F + MODULE_sfc_sice SCHEME_sfc_sice SUBROUTINE_sfc_sice_run + + + surface_snow_thickness_water_equivalent + water equivalent snow depth + mm + snwdph + real + (:) + inout + F + MODULE_sfc_sice SCHEME_sfc_sice SUBROUTINE_sfc_sice_run + + + surface_specific_humidity + sfc air saturation specific humidity + kg kg-1 + qsurf + real + (:) + inout + F + MODULE_sfc_sice SCHEME_sfc_sice SUBROUTINE_sfc_sice_run + + + surface_snow_melt + snow melt during timestep + m + snowmt + real + (:) + inout + F + MODULE_sfc_sice SCHEME_sfc_sice SUBROUTINE_sfc_sice_run + + + upward_heat_flux_in_soil + soil heat flux + W m-2 + gflux + real + (:) + inout + F + MODULE_sfc_sice SCHEME_sfc_sice SUBROUTINE_sfc_sice_run + + + surface_drag_wind_speed_for_momentum_in_air + surf mom exch coef time mean surf wind + m s-1 + cmm + real + (:) + inout + F + MODULE_sfc_sice SCHEME_sfc_sice SUBROUTINE_sfc_sice_run + + + surface_drag_mass_flux_for_heat_and_moisture_in_air + surf h m exch coef time surf wind density + kg m-2 s-1 + chh + real + (:) + inout + F + MODULE_sfc_sice SCHEME_sfc_sice SUBROUTINE_sfc_sice_run + + + kinematic_surface_upward_latent_heat_flux + evaporative latent heat flux + kg kg-1 m s-1 + evap + real + (:) + inout + F + MODULE_sfc_sice SCHEME_sfc_sice SUBROUTINE_sfc_sice_run + + + kinematic_surface_upward_sensible_heat_flux + kinematic sensible heat flux + K m s-1 + hflx + real + (:) + inout + F + MODULE_sfc_sice SCHEME_sfc_sice SUBROUTINE_sfc_sice_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_sfc_sice SCHEME_sfc_sice SUBROUTINE_sfc_sice_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_sfc_sice SCHEME_sfc_sice SUBROUTINE_sfc_sice_run + + + + + diff --git a/physics/sfc_sice_post.xml b/physics/sfc_sice_post.xml new file mode 100644 index 000000000..859b3c121 --- /dev/null +++ b/physics/sfc_sice_post.xml @@ -0,0 +1,95 @@ + + + + + horizontal_loop_extent + horizontal loop extent + count + im + integer + + in + F + MODULE_sfc_sice_post SCHEME_sfc_sice_post SUBROUTINE_sfc_sice_post_run + + + sea_land_ice_mask + sea/land/ice mask (=0/1/2) + flag + islmsk + integer + (:) + in + F + MODULE_sfc_sice_post SCHEME_sfc_sice_post SUBROUTINE_sfc_sice_post_run + + + surface_skin_temperature + surface skin temperature + K + tsfc + real + (:) + in + F + MODULE_sfc_sice_post SCHEME_sfc_sice_post SUBROUTINE_sfc_sice_post_run + + + sea_ice_concentration + sea-ice concentration [0,1] + frac + fice + real + (:) + inout + F + MODULE_sfc_sice_post SCHEME_sfc_sice_post SUBROUTINE_sfc_sice_post_run + + + sea_ice_thickness + sea-ice thickness + m + hice + real + (:) + inout + F + MODULE_sfc_sice_post SCHEME_sfc_sice_post SUBROUTINE_sfc_sice_post_run + + + sea_ice_temperature + sea-ice surface temperature + K + tisfc + real + (:) + inout + F + MODULE_sfc_sice_post SCHEME_sfc_sice_post SUBROUTINE_sfc_sice_post_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_sfc_sice_post SCHEME_sfc_sice_post SUBROUTINE_sfc_sice_post_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_sfc_sice_post SCHEME_sfc_sice_post SUBROUTINE_sfc_sice_post_run + + + + + diff --git a/physics/shoc.xml b/physics/shoc.xml new file mode 100644 index 000000000..34d015867 --- /dev/null +++ b/physics/shoc.xml @@ -0,0 +1,645 @@ + + + + + + + horizontal_dimension + horizontal dimension + count + ix + integer + + in + F + MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run + + + horizontal_loop_extent + horizontal loop extent + count + nx + integer + + in + F + MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run + + + vertical_dimension + vertical layer dimension + count + nzm + integer + + in + F + MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run + + + flag_for_shoc + flag for SHOC + flag + do_shoc + logical + + in + F + MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run + + + flag_for_shoc_after_convection + flag to execute SHOC after convection + flag + shocaftcnv + logical + + in + F + MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run + + + flag_mg3_as_mg2 + flag for controlling prep for Morrison-Gettelman microphysics + flag + mg3_as_mg2 + logical + + in + F + MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run + + + flag_for_microphysics_scheme + choice of microphysics scheme + flag + imp_physics + integer + + in + F + MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run + + + flag_for_gfdl_microphysics_scheme + choice of GFDL microphysics scheme + flag + imp_physics_gfdl + integer + + in + F + MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run + + + flag_for_zhao_carr_microphysics_scheme + choice of Zhao-Carr microphysics scheme + flag + imp_physics_zhao_carr + integer + + in + F + MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run + + + flag_for_zhao_carr_pdf_microphysics_scheme + choice of Zhao-Carr microphysics scheme with PDF clouds + flag + imp_physics_zhao_carr_pdf + integer + + in + F + MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run + + + flag_for_morrison_gettelman_microphysics_scheme + choice of Morrison-Gettelman rmicrophysics scheme + flag + imp_physics_mg + integer + + in + F + MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run + + + number_of_frozen_precipitation_species + number of frozen precipitation species + count + fprcp + integer + + in + F + MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run + + + cloud_phase_transition_threshold_temperature + threshold temperature below which cloud starts to freeze + K + tcr + real + + in + F + MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run + + + cloud_phase_transition_denominator + denominator in cloud phase transition = 1/(tcr-tf) + K-1 + tcrf + real + + in + F + MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run + + + specific_heat_of_dry_air_at_constant_pressure + specific heat of dry air at constant pressure + J kg-1 K-1 + con_cp + real + + in + F + MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run + + + gravitational_acceleration + gravitational acceleration + m s-2 + con_g + real + + in + F + MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run + + + latent_heat_of_vaporization_of_water_at_0C + latent heat of evaporation/sublimation + J kg-1 + con_hvap + real + + in + F + MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run + + + latent_heat_of_fusion_of_water_at_0C + latent heat of fusion + J kg-1 + con_hfus + real + + in + F + MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run + + + gas_constant_water_vapor + ideal gas constant for water vapor + J kg-1 K-1 + con_rv + real + + in + F + MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run + + + gas_constant_dry_air + ideal gas constant for dry air + J kg-1 K-1 + con_rd + real + + in + F + MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run + + + pi + ratio of a circle's circumference to its diameter + radians + con_pi + real + + in + F + MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run + + + ratio_of_vapor_to_dry_air_gas_constants_minus_one + (rv/rd) - 1 (rv = ideal gas constant for water vapor) + none + con_fvirt + real + + in + F + MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run + + + ice_water_mixing_ratio_updated_by_physics + moist (dry+vapor, no condensates) mixing ratio of ice water updated by physics + kg kg-1 + gq0_cloud_ice + real + (:,:) + in + F + MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run + + + rain_water_mixing_ratio_updated_by_physics + moist (dry+vapor, no condensates) mixing ratio of rain water updated by physics + kg kg-1 + gq0_rain + real + (:,:) + in + F + MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run + + + snow_water_mixing_ratio_updated_by_physics + moist (dry+vapor, no condensates) mixing ratio of snow water updated by physics + kg kg-1 + gq0_snow + real + (:,:) + in + F + MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run + + + graupel_mixing_ratio_updated_by_physics + moist (dry+vapor, no condensates) mixing ratio of graupel updated by physics + kg kg-1 + gq0_graupel + real + (:,:) + in + F + MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run + + + time_step_for_physics + time step for physics + s + dtp + real + + in + F + MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run + + + mpi_rank + current MPI-rank + index + me + integer + + in + F + MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run + + + air_pressure + mean layer pressure + Pa + prsl + real + (:,:) + in + F + MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run + + + geopotential_at_interface + geopotential at model layer interfaces + m2 s-2 + phii + real + (:,:) + in + F + MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run + + + geopotential + geopotential at model layer centers + m2 s-2 + phil + real + (:,:) + in + F + MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run + + + x_wind_updated_by_physics + zonal wind updated by physics + m s-1 + u + real + (:,:) + in + F + MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run + + + y_wind_updated_by_physics + meridional wind updated by physics + m s-1 + v + real + (:,:) + in + F + MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run + + + omega + layer mean vertical velocity + Pa s-1 + omega + real + (:,:) + in + F + MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run + + + critical_relative_humidity + critical relative humidity + frac + rhc + real + (:,:) + in + F + MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run + + + ice_supersaturation_threshold + ice supersaturation parameter for PDF clouds + none + supice + real + + in + F + MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run + + + shoc_tke_dissipatation_pressure_threshold + pressure below which extra TKE diss. is applied in SHOC + Pa + pcrit + real + + in + F + MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run + + + shoc_tke_dissipation_tunable_parameter + mult. tuning parameter for TKE diss. in SHOC + none + cefac + real + + in + F + MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run + + + shoc_tke_dissipation_tunable_parameter_near_surface + mult. tuning parameter for TKE diss. at surface in SHOC + none + cesfac + real + + in + F + MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run + + + shoc_implicit_TKE_integration_uncentering_term + uncentering term for TKE integration in SHOC + none + tkef1 + real + + in + F + MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run + + + shoc_flag_for_optional_surface_TKE_dissipation + flag for alt. TKE diss. near surface in SHOC (>0 = ON) + none + dis_opt + real + + in + F + MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run + + + kinematic_surface_upward_sensible_heat_flux + kinematic surface upward sensible heat flux + K m s-1 + hflx + real + (:) + in + F + MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run + + + kinematic_surface_upward_latent_heat_flux + kinematic surface upward latent heat flux + kg kg-1 m s-1 + evap + real + (:) + in + F + MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run + + + prandtl_number + turbulent Prandtl number + none + prnum + real + (:,:) + in + F + MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run + + + flag_skip_macro + flag to skip cloud macrophysics in Morrison scheme + flag + skip_macro + logical + + inout + F + MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run + + + ice_water_mixing_ratio_convective_transport_tracer + moist (dry+vapor, no condensates) mixing ratio of ice water in the convectively transported tracer array + kg kg-1 + clw_ice + real + (:,:) + inout + F + MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run + + + cloud_condensed_water_mixing_ratio_convective_transport_tracer + moist (dry+vapor, no condensates) mixing ratio of cloud water (condensate) in the convectively transported tracer array + kg kg-1 + clw_liquid + real + (:,:) + inout + F + MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run + + + cloud_condensed_water_mixing_ratio_updated_by_physics + moist (dry+vapor, no condensates) mixing ratio of cloud condensed water updated by physics + kg kg-1 + gq0_cloud_liquid + real + (:,:) + inout + F + MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run + + + cloud_droplet_number_concentration_updated_by_physics + number concentration of cloud droplets updated by physics + kg-1 + ncpl + real + (:,:) + inout + F + MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run + + + ice_number_concentration_updated_by_physics + number concentration of ice updated by physics + kg-1 + ncpi + real + (:,:) + inout + F + MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run + + + air_temperature_updated_by_physics + temperature updated by physics + K + gt0 + real + (:,:) + inout + F + MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run + + + water_vapor_specific_humidity_updated_by_physics + water vapor specific humidity updated by physics + kg kg-1 + gq0_water_vapor + real + (:,:) + inout + F + MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run + + + subgrid_scale_cloud_fraction_from_shoc + subgrid-scale cloud fraction from the SHOC scheme + frac + cld_sgs + real + (:,:) + inout + F + MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run + + + turbulent_kinetic_energy_convective_transport_tracer + turbulent kinetic energy in the convectively transported tracer array + m2 s-2 + tke + real + (:,:) + inout + F + MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run + + + atmosphere_heat_diffusivity_from_shoc + diffusivity for heat from the SHOC scheme + m2 s-1 + tkh + real + (:,:) + inout + F + MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run + + + kinematic_buoyancy_flux_from_shoc + upward kinematic buoyancy flux from the SHOC scheme + K m s-1 + wthv_sec + real + (:,:) + inout + F + MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run + + + diff --git a/physics/zhaocarr_gscond.xml b/physics/zhaocarr_gscond.xml new file mode 100644 index 000000000..22b925fc7 --- /dev/null +++ b/physics/zhaocarr_gscond.xml @@ -0,0 +1,260 @@ + + + + + + horizontal_loop_extent + horizontal loop extent + count + im + integer + + in + F + MODULE_zhaocarr_gscond SCHEME_zhaocarr_gscond SUBROUTINE_zhaocarr_gscond_run + + + horizontal_dimension + horizontal dimension + count + ix + integer + + in + F + MODULE_zhaocarr_gscond SCHEME_zhaocarr_gscond SUBROUTINE_zhaocarr_gscond_run + + + vertical_dimension + vertical layer dimension + count + km + integer + + in + F + MODULE_zhaocarr_gscond SCHEME_zhaocarr_gscond SUBROUTINE_zhaocarr_gscond_run + + + time_step_for_physics + physics time step + s + dt + real + + in + F + MODULE_zhaocarr_gscond SCHEME_zhaocarr_gscond SUBROUTINE_zhaocarr_gscond_run + + + time_step_for_dynamics + dynamics time step + s + dtf + real + + in + F + MODULE_zhaocarr_gscond SCHEME_zhaocarr_gscond SUBROUTINE_zhaocarr_gscond_run + + + air_pressure + layer mean air pressure + Pa + prsl + real + (:,:) + in + F + MODULE_zhaocarr_gscond SCHEME_zhaocarr_gscond SUBROUTINE_zhaocarr_gscond_run + + + surface_air_pressure + surface pressure + Pa + ps + real + (:) + in + F + MODULE_zhaocarr_gscond SCHEME_zhaocarr_gscond SUBROUTINE_zhaocarr_gscond_run + + + water_vapor_specific_humidity_updated_by_physics + water vapor specific humidity + kg kg-1 + q + real + (:,:) + inout + F + MODULE_zhaocarr_gscond SCHEME_zhaocarr_gscond SUBROUTINE_zhaocarr_gscond_run + + + ice_water_mixing_ratio_convective_transport_tracer + moist (dry+vapor, no condensates) mixing ratio of ice water in the convectively transported tracer array + kg kg-1 + clw1 + real + (:,:) + in + F + MODULE_zhaocarr_gscond SCHEME_zhaocarr_gscond SUBROUTINE_zhaocarr_gscond_run + + + cloud_condensed_water_mixing_ratio_convective_transport_tracer + moist (dry+vapor, no condensates) mixing ratio of cloud water (condensate) in the convectively transported tracer array + kg kg-1 + clw2 + real + (:,:) + in + F + MODULE_zhaocarr_gscond SCHEME_zhaocarr_gscond SUBROUTINE_zhaocarr_gscond_run + + + cloud_condensed_water_mixing_ratio_updated_by_physics + moist cloud condensed water mixing ratio + kg kg-1 + cwm + real + (:,:) + out + F + MODULE_zhaocarr_gscond SCHEME_zhaocarr_gscond SUBROUTINE_zhaocarr_gscond_run + + + air_temperature_updated_by_physics + layer mean air temperature + K + t + real + (:,:) + inout + F + MODULE_zhaocarr_gscond SCHEME_zhaocarr_gscond SUBROUTINE_zhaocarr_gscond_run + + + air_temperature_two_time_steps_back + air temperature two time steps back + K + tp + real + (:,:) + inout + F + MODULE_zhaocarr_gscond SCHEME_zhaocarr_gscond SUBROUTINE_zhaocarr_gscond_run + + + water_vapor_specific_humidity_two_time_steps_back + water vapor specific humidity two time steps back + kg kg-1 + qp + real + (:,:) + inout + F + MODULE_zhaocarr_gscond SCHEME_zhaocarr_gscond SUBROUTINE_zhaocarr_gscond_run + + + surface_air_pressure_two_time_steps_back + surface air pressure two time steps back + Pa + psp + real + (:) + inout + F + MODULE_zhaocarr_gscond SCHEME_zhaocarr_gscond SUBROUTINE_zhaocarr_gscond_run + + + air_temperature_at_previous_time_step + air temperature at previous time step + K + tp1 + real + (:,:) + inout + F + MODULE_zhaocarr_gscond SCHEME_zhaocarr_gscond SUBROUTINE_zhaocarr_gscond_run + + + water_vapor_specific_humidity_at_previous_time_step + water vapor specific humidity at previous time step + kg kg-1 + qp1 + real + (:,:) + inout + F + MODULE_zhaocarr_gscond SCHEME_zhaocarr_gscond SUBROUTINE_zhaocarr_gscond_run + + + surface_air_pressure_at_previous_time_step + surface air surface pressure at previous time step + Pa + psp1 + real + (:) + inout + F + MODULE_zhaocarr_gscond SCHEME_zhaocarr_gscond SUBROUTINE_zhaocarr_gscond_run + + + critical_relative_humidity + critical relative humidity + frac + u + real + (:,:) + in + F + MODULE_zhaocarr_gscond SCHEME_zhaocarr_gscond SUBROUTINE_zhaocarr_gscond_run + + + flag_print + flag for printing diagnostics to output + flag + lprnt + logical + + in + F + MODULE_zhaocarr_gscond SCHEME_zhaocarr_gscond SUBROUTINE_zhaocarr_gscond_run + + + horizontal_index_of_printed_column + horizontal index of printed column + index + ipr + integer + + in + F + MODULE_zhaocarr_gscond SCHEME_zhaocarr_gscond SUBROUTINE_zhaocarr_gscond_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_zhaocarr_gscond SCHEME_zhaocarr_gscond SUBROUTINE_zhaocarr_gscond_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_zhaocarr_gscond SCHEME_zhaocarr_gscond SUBROUTINE_zhaocarr_gscond_run + + + + diff --git a/physics/zhaocarr_precpd.xml b/physics/zhaocarr_precpd.xml new file mode 100644 index 000000000..925b7da4f --- /dev/null +++ b/physics/zhaocarr_precpd.xml @@ -0,0 +1,249 @@ + + + + + + + horizontal_loop_extent + horizontal loop extent + count + im + integer + + in + F + MODULE_zhaocarr_precpd SCHEME_zhaocarr_precpd SUBROUTINE_zhaocarr_precpd_run + + + horizontal_dimension + horizontal dimension + count + ix + integer + + in + F + MODULE_zhaocarr_precpd SCHEME_zhaocarr_precpd SUBROUTINE_zhaocarr_precpd_run + + + vertical_dimension + vertical layer dimension + count + km + integer + + in + F + MODULE_zhaocarr_precpd SCHEME_zhaocarr_precpd SUBROUTINE_zhaocarr_precpd_run + + + time_step_for_physics + physics time step + s + dt + real + + in + F + MODULE_zhaocarr_precpd SCHEME_zhaocarr_precpd SUBROUTINE_zhaocarr_precpd_run + + + air_pressure_difference_between_midlayers + pressure level thickness + Pa + del + real + (:,:) + in + F + MODULE_zhaocarr_precpd SCHEME_zhaocarr_precpd SUBROUTINE_zhaocarr_precpd_run + + + air_pressure + layer mean pressure + Pa + prsl + real + (:,:) + in + F + MODULE_zhaocarr_precpd SCHEME_zhaocarr_precpd SUBROUTINE_zhaocarr_precpd_run + + + water_vapor_specific_humidity_updated_by_physics + water vapor specific humidity + kg kg-1 + q + real + (:,:) + inout + F + MODULE_zhaocarr_precpd SCHEME_zhaocarr_precpd SUBROUTINE_zhaocarr_precpd_run + + + cloud_condensed_water_mixing_ratio_updated_by_physics + moist cloud condensed water mixing ratio + kg kg-1 + cwm + real + (:,:) + inout + F + MODULE_zhaocarr_precpd SCHEME_zhaocarr_precpd SUBROUTINE_zhaocarr_precpd_run + + + air_temperature_updated_by_physics + layer mean air temperature + K + t + real + (:,:) + inout + F + MODULE_zhaocarr_precpd SCHEME_zhaocarr_precpd SUBROUTINE_zhaocarr_precpd_run + + + lwe_thickness_of_explicit_precipitation_amount + explicit precipitation amount on physics timestep + m + rn + real + (:) + out + F + MODULE_zhaocarr_precpd SCHEME_zhaocarr_precpd SUBROUTINE_zhaocarr_precpd_run + + + ratio_of_snowfall_to_rainfall + ratio of snowfall to large-scale rainfall + frac + sr + real + (:) + out + F + MODULE_zhaocarr_precpd SCHEME_zhaocarr_precpd SUBROUTINE_zhaocarr_precpd_run + + + tendency_of_rain_water_mixing_ratio_due_to_microphysics + tendency of rain water mixing ratio due to microphysics + kg kg-1 s-1 + rainp + real + (:,:) + out + F + MODULE_zhaocarr_precpd SCHEME_zhaocarr_precpd SUBROUTINE_zhaocarr_precpd_run + + + critical_relative_humidity + critical relative humidity + frac + u00k + real + (:,:) + in + F + MODULE_zhaocarr_precpd SCHEME_zhaocarr_precpd SUBROUTINE_zhaocarr_precpd_run + + + coefficient_from_cloud_ice_to_snow + conversion coefficient from cloud ice to snow + none + psautco + real + (:) + in + F + MODULE_zhaocarr_precpd SCHEME_zhaocarr_precpd SUBROUTINE_zhaocarr_precpd_run + + + coefficient_from_cloud_water_to_rain + conversion coefficient from cloud water to rain + none + prautco + real + (:) + in + F + MODULE_zhaocarr_precpd SCHEME_zhaocarr_precpd SUBROUTINE_zhaocarr_precpd_run + + + coefficient_for_evaporation_of_rainfall + coefficient for evaporation of rainfall + none + evpco + real + + in + F + MODULE_zhaocarr_precpd SCHEME_zhaocarr_precpd SUBROUTINE_zhaocarr_precpd_run + + + cloud_condensed_water_conversion_threshold + conversion coefficient from cloud liquid and ice to precipitation + none + wminco + real + (:) + in + F + MODULE_zhaocarr_precpd SCHEME_zhaocarr_precpd SUBROUTINE_zhaocarr_precpd_run + + + grid_size_related_coefficient_used_in_scale-sensitive_schemes + grid size related coefficient used in scale-sensitive schemes + none + wk1 + real + (:) + in + F + MODULE_zhaocarr_precpd SCHEME_zhaocarr_precpd SUBROUTINE_zhaocarr_precpd_run + + + flag_print + flag for printing diagnostics to output + flag + lprnt + logical + + in + F + MODULE_zhaocarr_precpd SCHEME_zhaocarr_precpd SUBROUTINE_zhaocarr_precpd_run + + + horizontal_index_of_printed_column + horizontal index of printed column + index + jpr + integer + + in + F + MODULE_zhaocarr_precpd SCHEME_zhaocarr_precpd SUBROUTINE_zhaocarr_precpd_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_zhaocarr_precpd SCHEME_zhaocarr_precpd SUBROUTINE_zhaocarr_precpd_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_zhaocarr_precpd SCHEME_zhaocarr_precpd SUBROUTINE_zhaocarr_precpd_run + + + From 5ddf44d3950e86d994e26c58687bb184f67c11d4 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Thu, 18 Apr 2019 15:41:45 -0600 Subject: [PATCH 006/167] SW all-sky calculation working. Microphysics needs some attention. --- physics/rrtmgp_lw_main.F90 | 2 +- physics/rrtmgp_sw_cloud_optics.F90 | 2422 ++++++++++++++++++++++++++++ physics/rrtmgp_sw_main.F90 | 164 +- 3 files changed, 2575 insertions(+), 13 deletions(-) create mode 100644 physics/rrtmgp_sw_cloud_optics.F90 diff --git a/physics/rrtmgp_lw_main.F90 b/physics/rrtmgp_lw_main.F90 index 691ddd74f..c2837d294 100644 --- a/physics/rrtmgp_lw_main.F90 +++ b/physics/rrtmgp_lw_main.F90 @@ -1149,7 +1149,7 @@ subroutine rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr do iLay=1,nLay do iGpt=1,nGptsLW iBand = kdist_lw_clr%convert_gpt2band(iGpt) - if (cldfracMCICA(iBand,iCol,iLay) .gt. 0.) then + if (cldfracMCICA(iGpt,iCol,iLay) .gt. 0.) then tau_gpt(iCol,iLay,iGpt) = tau_cld(iband,iCol,iLay)*secdiff(iBand,iCol) else tau_gpt(iCol,iLay,iGpt) = 0. diff --git a/physics/rrtmgp_sw_cloud_optics.F90 b/physics/rrtmgp_sw_cloud_optics.F90 new file mode 100644 index 000000000..cc353af66 --- /dev/null +++ b/physics/rrtmgp_sw_cloud_optics.F90 @@ -0,0 +1,2422 @@ +module mo_rrtmgp_sw_cloud_optics + use machine, only: kind_phys + use physparam, only: iswcliq, iswcice, iovrsw + use mersenne_twister, only: random_setseed, random_number, random_stat + implicit none + + ! Parameters used for RRTMG cloud-optics + integer,parameter :: & + nBandsSW_RRTMG = 14 + real(kind_phys),parameter :: & + a0r = 3.07e-3 + real(kind_phys),dimension(nBandsSW_RRTMG),parameter :: & + b0r = (/0.466, 0.437, 0.416, 0.391, 0.374, 0.352, 0.183, & + 0.048, 0.012, 0.000, 0.000, 0.000, 0.000, 0.496/) + real(kind_phys),dimension(nBandsSW_RRTMG),parameter :: & + b0s = (/0.460, 0.460, 0.460, 0.460, 0.460, 0.460, 0.460, & + 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.460/) + real(kind_phys),dimension(nBandsSW_RRTMG),parameter :: & + b1s = (/0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, & + 1.62e-5, 1.62e-5, 0.000, 0.000, 0.000, 0.000, 0.000/) + real(kind_phys),dimension(nBandsSW_RRTMG),parameter :: & + c0r = (/0.975, 0.965, 0.960, 0.955, 0.952, 0.950, 0.944, & + 0.894, 0.884, 0.883, 0.883, 0.883, 0.883, 0.980/) + real(kind_phys),dimension(nBandsSW_RRTMG),parameter :: & + c0s = (/0.970, 0.970, 0.970, 0.970, 0.970, 0.970, 0.970, & + 0.970, 0.970, 0.700, 0.700, 0.700, 0.700, 0.970/) + + ! RRTMG SW cloud property coefficients + ! Liquid + real(kind_phys),dimension(58,nBandsSW_RRTMG),parameter :: & ! + extliq1 = reshape(source= (/ & ! + 8.981463e-01, 6.317895e-01, 4.557508e-01, 3.481624e-01, 2.797950e-01, & ! 1 + 2.342753e-01, 2.026934e-01, 1.800102e-01, 1.632408e-01, 1.505384e-01, & ! + 1.354524e-01, 1.246520e-01, 1.154342e-01, 1.074756e-01, 1.005353e-01, & ! + 9.442987e-02, 8.901760e-02, 8.418693e-02, 7.984904e-02, 7.593229e-02, & ! + 7.237827e-02, 6.913887e-02, 6.617415e-02, 6.345061e-02, 6.094001e-02, & ! + 5.861834e-02, 5.646506e-02, 5.446250e-02, 5.249596e-02, 5.081114e-02, & ! + 4.922243e-02, 4.772189e-02, 4.630243e-02, 4.495766e-02, 4.368189e-02, & ! + 4.246995e-02, 4.131720e-02, 4.021941e-02, 3.917276e-02, 3.817376e-02, & ! + 3.721926e-02, 3.630635e-02, 3.543237e-02, 3.459491e-02, 3.379171e-02, & ! + 3.302073e-02, 3.228007e-02, 3.156798e-02, 3.088284e-02, 3.022315e-02, & ! + 2.958753e-02, 2.897468e-02, 2.838340e-02, 2.781258e-02, 2.726117e-02, & ! + 2.672821e-02, 2.621278e-02, 2.5714e-02, & ! + 8.293797e-01, 6.048371e-01, 4.465706e-01, 3.460387e-01, 2.800064e-01, & ! 2 + 2.346584e-01, 2.022399e-01, 1.782626e-01, 1.600153e-01, 1.457903e-01, & ! + 1.334061e-01, 1.228548e-01, 1.138396e-01, 1.060486e-01, 9.924856e-02, & ! + 9.326208e-02, 8.795158e-02, 8.320883e-02, 7.894750e-02, 7.509792e-02, & ! + 7.160323e-02, 6.841653e-02, 6.549889e-02, 6.281763e-02, 6.034516e-02, & ! + 5.805802e-02, 5.593615e-02, 5.396226e-02, 5.202302e-02, 5.036246e-02, & ! + 4.879606e-02, 4.731610e-02, 4.591565e-02, 4.458852e-02, 4.332912e-02, & ! + 4.213243e-02, 4.099390e-02, 3.990941e-02, 3.887522e-02, 3.788792e-02, & ! + 3.694440e-02, 3.604183e-02, 3.517760e-02, 3.434934e-02, 3.355485e-02, & ! + 3.279211e-02, 3.205925e-02, 3.135458e-02, 3.067648e-02, 3.002349e-02, & ! + 2.939425e-02, 2.878748e-02, 2.820200e-02, 2.763673e-02, 2.709062e-02, & ! + 2.656272e-02, 2.605214e-02, 2.5558e-02, & ! + 9.193685e-01, 6.128292e-01, 4.344150e-01, 3.303048e-01, 2.659500e-01, & ! 3 + 2.239727e-01, 1.953457e-01, 1.751012e-01, 1.603515e-01, 1.493360e-01, & ! + 1.323791e-01, 1.219335e-01, 1.130076e-01, 1.052926e-01, 9.855839e-02, & ! + 9.262925e-02, 8.736918e-02, 8.267112e-02, 7.844965e-02, 7.463585e-02, & ! + 7.117343e-02, 6.801601e-02, 6.512503e-02, 6.246815e-02, 6.001806e-02, & ! + 5.775154e-02, 5.564872e-02, 5.369250e-02, 5.176284e-02, 5.011536e-02, & ! + 4.856099e-02, 4.709211e-02, 4.570193e-02, 4.438430e-02, 4.313375e-02, & ! + 4.194529e-02, 4.081443e-02, 3.973712e-02, 3.870966e-02, 3.772866e-02, & ! + 3.679108e-02, 3.589409e-02, 3.503514e-02, 3.421185e-02, 3.342206e-02, & ! + 3.266377e-02, 3.193513e-02, 3.123447e-02, 3.056018e-02, 2.991081e-02, & ! + 2.928502e-02, 2.868154e-02, 2.809920e-02, 2.753692e-02, 2.699367e-02, & ! + 2.646852e-02, 2.596057e-02, 2.5469e-02, & ! + 9.136931e-01, 5.743244e-01, 4.080708e-01, 3.150572e-01, 2.577261e-01, & ! 4 + 2.197900e-01, 1.933037e-01, 1.740212e-01, 1.595056e-01, 1.482756e-01, & ! + 1.312164e-01, 1.209246e-01, 1.121227e-01, 1.045095e-01, 9.785967e-02, & ! + 9.200149e-02, 8.680170e-02, 8.215531e-02, 7.797850e-02, 7.420361e-02, & ! + 7.077530e-02, 6.764798e-02, 6.478369e-02, 6.215063e-02, 5.972189e-02, & ! + 5.747458e-02, 5.538913e-02, 5.344866e-02, 5.153216e-02, 4.989745e-02, & ! + 4.835476e-02, 4.689661e-02, 4.551629e-02, 4.420777e-02, 4.296563e-02, & ! + 4.178497e-02, 4.066137e-02, 3.959081e-02, 3.856963e-02, 3.759452e-02, & ! + 3.666244e-02, 3.577061e-02, 3.491650e-02, 3.409777e-02, 3.331227e-02, & ! + 3.255803e-02, 3.183322e-02, 3.113617e-02, 3.046530e-02, 2.981918e-02, & ! + 2.919646e-02, 2.859591e-02, 2.801635e-02, 2.745671e-02, 2.691599e-02, & ! + 2.639324e-02, 2.588759e-02, 2.5398e-02, & ! + 8.447548e-01, 5.326840e-01, 3.921523e-01, 3.119082e-01, 2.597055e-01, & ! 5 + 2.228737e-01, 1.954157e-01, 1.741155e-01, 1.570881e-01, 1.431520e-01, & ! + 1.302034e-01, 1.200491e-01, 1.113571e-01, 1.038330e-01, 9.725657e-02, & ! + 9.145949e-02, 8.631112e-02, 8.170840e-02, 7.756901e-02, 7.382641e-02, & ! + 7.042616e-02, 6.732338e-02, 6.448069e-02, 6.186672e-02, 5.945494e-02, & ! + 5.722277e-02, 5.515089e-02, 5.322262e-02, 5.132153e-02, 4.969799e-02, & ! + 4.816556e-02, 4.671686e-02, 4.534525e-02, 4.404480e-02, 4.281014e-02, & ! + 4.163643e-02, 4.051930e-02, 3.945479e-02, 3.843927e-02, 3.746945e-02, & ! + 3.654234e-02, 3.565518e-02, 3.480547e-02, 3.399088e-02, 3.320930e-02, & ! + 3.245876e-02, 3.173745e-02, 3.104371e-02, 3.037600e-02, 2.973287e-02, & ! + 2.911300e-02, 2.851516e-02, 2.793818e-02, 2.738101e-02, 2.684264e-02, & ! + 2.632214e-02, 2.581863e-02, 2.5331e-02, & ! + 7.727642e-01, 5.034865e-01, 3.808673e-01, 3.080333e-01, 2.586453e-01, & ! 6 + 2.224989e-01, 1.947060e-01, 1.725821e-01, 1.545096e-01, 1.394456e-01, & ! + 1.288683e-01, 1.188852e-01, 1.103317e-01, 1.029214e-01, 9.643967e-02, & ! + 9.072239e-02, 8.564194e-02, 8.109758e-02, 7.700875e-02, 7.331026e-02, & ! + 6.994879e-02, 6.688028e-02, 6.406807e-02, 6.148133e-02, 5.909400e-02, & ! + 5.688388e-02, 5.483197e-02, 5.292185e-02, 5.103763e-02, 4.942905e-02, & ! + 4.791039e-02, 4.647438e-02, 4.511453e-02, 4.382497e-02, 4.260043e-02, & ! + 4.143616e-02, 4.032784e-02, 3.927155e-02, 3.826375e-02, 3.730117e-02, & ! + 3.638087e-02, 3.550013e-02, 3.465646e-02, 3.384759e-02, 3.307141e-02, & ! + 3.232598e-02, 3.160953e-02, 3.092040e-02, 3.025706e-02, 2.961810e-02, & ! + 2.900220e-02, 2.840814e-02, 2.783478e-02, 2.728106e-02, 2.674599e-02, & ! + 2.622864e-02, 2.572816e-02, 2.5244e-02, & ! + 7.416833e-01, 4.959591e-01, 3.775057e-01, 3.056353e-01, 2.565943e-01, & ! 7 + 2.206935e-01, 1.931479e-01, 1.712860e-01, 1.534837e-01, 1.386906e-01, & ! + 1.281198e-01, 1.182344e-01, 1.097595e-01, 1.024137e-01, 9.598552e-02, & ! + 9.031320e-02, 8.527093e-02, 8.075927e-02, 7.669869e-02, 7.302481e-02, & ! + 6.968491e-02, 6.663542e-02, 6.384008e-02, 6.126838e-02, 5.889452e-02, & ! + 5.669654e-02, 5.465558e-02, 5.275540e-02, 5.087937e-02, 4.927904e-02, & ! + 4.776796e-02, 4.633895e-02, 4.498557e-02, 4.370202e-02, 4.248306e-02, & ! + 4.132399e-02, 4.022052e-02, 3.916878e-02, 3.816523e-02, 3.720665e-02, & ! + 3.629011e-02, 3.541290e-02, 3.457257e-02, 3.376685e-02, 3.299365e-02, & ! + 3.225105e-02, 3.153728e-02, 3.085069e-02, 3.018977e-02, 2.955310e-02, & ! + 2.893940e-02, 2.834742e-02, 2.777606e-02, 2.722424e-02, 2.669099e-02, & ! + 2.617539e-02, 2.567658e-02, 2.5194e-02, & ! + 7.058580e-01, 4.866573e-01, 3.712238e-01, 2.998638e-01, 2.513441e-01, & ! 8 + 2.161972e-01, 1.895576e-01, 1.686669e-01, 1.518437e-01, 1.380046e-01, & ! + 1.267564e-01, 1.170399e-01, 1.087026e-01, 1.014704e-01, 9.513729e-02, & ! + 8.954555e-02, 8.457221e-02, 8.012009e-02, 7.611136e-02, 7.248294e-02, & ! + 6.918317e-02, 6.616934e-02, 6.340584e-02, 6.086273e-02, 5.851465e-02, & ! + 5.634001e-02, 5.432027e-02, 5.243946e-02, 5.058070e-02, 4.899628e-02, & ! + 4.749975e-02, 4.608411e-02, 4.474303e-02, 4.347082e-02, 4.226237e-02, & ! + 4.111303e-02, 4.001861e-02, 3.897528e-02, 3.797959e-02, 3.702835e-02, & ! + 3.611867e-02, 3.524791e-02, 3.441364e-02, 3.361360e-02, 3.284577e-02, & ! + 3.210823e-02, 3.139923e-02, 3.071716e-02, 3.006052e-02, 2.942791e-02, & ! + 2.881806e-02, 2.822974e-02, 2.766185e-02, 2.711335e-02, 2.658326e-02, & ! + 2.607066e-02, 2.557473e-02, 2.5095e-02, & ! + 6.822779e-01, 4.750373e-01, 3.634834e-01, 2.940726e-01, 2.468060e-01, & ! 9 + 2.125768e-01, 1.866586e-01, 1.663588e-01, 1.500326e-01, 1.366192e-01, & ! + 1.253472e-01, 1.158052e-01, 1.076101e-01, 1.004954e-01, 9.426089e-02, & ! + 8.875268e-02, 8.385090e-02, 7.946063e-02, 7.550578e-02, 7.192466e-02, & ! + 6.866669e-02, 6.569001e-02, 6.295971e-02, 6.044642e-02, 5.812526e-02, & ! + 5.597500e-02, 5.397746e-02, 5.211690e-02, 5.027505e-02, 4.870703e-02, & ! + 4.722555e-02, 4.582373e-02, 4.449540e-02, 4.323497e-02, 4.203742e-02, & ! + 4.089821e-02, 3.981321e-02, 3.877867e-02, 3.779118e-02, 3.684762e-02, & ! + 3.594514e-02, 3.508114e-02, 3.425322e-02, 3.345917e-02, 3.269698e-02, & ! + 3.196477e-02, 3.126082e-02, 3.058352e-02, 2.993141e-02, 2.930310e-02, & ! + 2.869732e-02, 2.811289e-02, 2.754869e-02, 2.700371e-02, 2.647698e-02, & ! + 2.596760e-02, 2.547473e-02, 2.4998e-02, & ! + 6.666233e-01, 4.662044e-01, 3.579517e-01, 2.902984e-01, 2.440475e-01, & ! 10 + 2.104431e-01, 1.849277e-01, 1.648970e-01, 1.487555e-01, 1.354714e-01, & ! + 1.244173e-01, 1.149913e-01, 1.068903e-01, 9.985323e-02, 9.368351e-02, & ! + 8.823009e-02, 8.337507e-02, 7.902511e-02, 7.510529e-02, 7.155482e-02, & ! + 6.832386e-02, 6.537113e-02, 6.266218e-02, 6.016802e-02, 5.786408e-02, & ! + 5.572939e-02, 5.374598e-02, 5.189830e-02, 5.006825e-02, 4.851081e-02, & ! + 4.703906e-02, 4.564623e-02, 4.432621e-02, 4.307349e-02, 4.188312e-02, & ! + 4.075060e-02, 3.967183e-02, 3.864313e-02, 3.766111e-02, 3.672269e-02, & ! + 3.582505e-02, 3.496559e-02, 3.414196e-02, 3.335198e-02, 3.259362e-02, & ! + 3.186505e-02, 3.116454e-02, 3.049052e-02, 2.984152e-02, 2.921617e-02, & ! + 2.861322e-02, 2.803148e-02, 2.746986e-02, 2.692733e-02, 2.640295e-02, & ! + 2.589582e-02, 2.540510e-02, 2.4930e-02, & ! + 6.535669e-01, 4.585865e-01, 3.529226e-01, 2.867245e-01, 2.413848e-01, & ! 11 + 2.083956e-01, 1.833191e-01, 1.636150e-01, 1.477247e-01, 1.346392e-01, & ! + 1.236449e-01, 1.143095e-01, 1.062828e-01, 9.930773e-02, 9.319029e-02, & ! + 8.778150e-02, 8.296497e-02, 7.864847e-02, 7.475799e-02, 7.123343e-02, & ! + 6.802549e-02, 6.509332e-02, 6.240285e-02, 5.992538e-02, 5.763657e-02, & ! + 5.551566e-02, 5.354483e-02, 5.170870e-02, 4.988866e-02, 4.834061e-02, & ! + 4.687751e-02, 4.549264e-02, 4.417999e-02, 4.293410e-02, 4.175006e-02, & ! + 4.062344e-02, 3.955019e-02, 3.852663e-02, 3.754943e-02, 3.661553e-02, & ! + 3.572214e-02, 3.486669e-02, 3.404683e-02, 3.326040e-02, 3.250542e-02, & ! + 3.178003e-02, 3.108254e-02, 3.041139e-02, 2.976511e-02, 2.914235e-02, & ! + 2.854187e-02, 2.796247e-02, 2.740309e-02, 2.686271e-02, 2.634038e-02, & ! + 2.583520e-02, 2.534636e-02, 2.4873e-02, & ! + 6.448790e-01, 4.541425e-01, 3.503348e-01, 2.850494e-01, 2.401966e-01, & ! 12 + 2.074811e-01, 1.825631e-01, 1.629515e-01, 1.471142e-01, 1.340574e-01, & ! + 1.231462e-01, 1.138628e-01, 1.058802e-01, 9.894286e-02, 9.285818e-02, & ! + 8.747802e-02, 8.268676e-02, 7.839271e-02, 7.452230e-02, 7.101580e-02, & ! + 6.782418e-02, 6.490685e-02, 6.222991e-02, 5.976484e-02, 5.748742e-02, & ! + 5.537703e-02, 5.341593e-02, 5.158883e-02, 4.977355e-02, 4.823172e-02, & ! + 4.677430e-02, 4.539465e-02, 4.408680e-02, 4.284533e-02, 4.166539e-02, & ! + 4.054257e-02, 3.947283e-02, 3.845256e-02, 3.747842e-02, 3.654737e-02, & ! + 3.565665e-02, 3.480370e-02, 3.398620e-02, 3.320198e-02, 3.244908e-02, & ! + 3.172566e-02, 3.103002e-02, 3.036062e-02, 2.971600e-02, 2.909482e-02, & ! + 2.849582e-02, 2.791785e-02, 2.735982e-02, 2.682072e-02, 2.629960e-02, & ! + 2.579559e-02, 2.530786e-02, 2.4836e-02, & ! + 6.422688e-01, 4.528453e-01, 3.497232e-01, 2.847724e-01, 2.400815e-01, & ! 13 + 2.074403e-01, 1.825502e-01, 1.629415e-01, 1.470934e-01, 1.340183e-01, & ! + 1.230935e-01, 1.138049e-01, 1.058201e-01, 9.888245e-02, 9.279878e-02, & ! + 8.742053e-02, 8.263175e-02, 7.834058e-02, 7.447327e-02, 7.097000e-02, & ! + 6.778167e-02, 6.486765e-02, 6.219400e-02, 5.973215e-02, 5.745790e-02, & ! + 5.535059e-02, 5.339250e-02, 5.156831e-02, 4.975308e-02, 4.821235e-02, & ! + 4.675596e-02, 4.537727e-02, 4.407030e-02, 4.282968e-02, 4.165053e-02, & ! + 4.052845e-02, 3.945941e-02, 3.843980e-02, 3.746628e-02, 3.653583e-02, & ! + 3.564567e-02, 3.479326e-02, 3.397626e-02, 3.319253e-02, 3.244008e-02, & ! + 3.171711e-02, 3.102189e-02, 3.035289e-02, 2.970866e-02, 2.908784e-02, & ! + 2.848920e-02, 2.791156e-02, 2.735385e-02, 2.681507e-02, 2.629425e-02, & ! + 2.579053e-02, 2.530308e-02, 2.4831e-02, & ! + 4.614710e-01, 4.556116e-01, 4.056568e-01, 3.529833e-01, 3.060334e-01, & ! 14 + 2.658127e-01, 2.316095e-01, 2.024325e-01, 1.773749e-01, 1.556867e-01, & ! + 1.455558e-01, 1.332882e-01, 1.229052e-01, 1.140067e-01, 1.062981e-01, & ! + 9.955703e-02, 9.361333e-02, 8.833420e-02, 8.361467e-02, 7.937071e-02, & ! + 7.553420e-02, 7.204942e-02, 6.887031e-02, 6.595851e-02, 6.328178e-02, & ! + 6.081286e-02, 5.852854e-02, 5.640892e-02, 5.431269e-02, 5.252561e-02, & ! + 5.084345e-02, 4.925727e-02, 4.775910e-02, 4.634182e-02, 4.499907e-02, & ! + 4.372512e-02, 4.251484e-02, 4.136357e-02, 4.026710e-02, 3.922162e-02, & ! + 3.822365e-02, 3.727004e-02, 3.635790e-02, 3.548457e-02, 3.464764e-02, & ! + 3.384488e-02, 3.307424e-02, 3.233384e-02, 3.162192e-02, 3.093688e-02, & ! + 3.027723e-02, 2.964158e-02, 2.902864e-02, 2.843722e-02, 2.786621e-02, & ! + 2.731457e-02, 2.678133e-02, 2.6266e-02/), & ! + shape = (/58,nBandsSW_RRTMG/)) + + real(kind_phys),dimension(58,nBandsSW_RRTMG),parameter :: & ! + extliq2 = reshape(source= (/ & ! + 9.004493E-01, 6.366723E-01, 4.542354E-01, 3.468253E-01, 2.816431E-01, & ! 1 + 2.383415E-01, 2.070854E-01, 1.831854E-01, 1.642115E-01, 1.487539E-01, & ! + 1.359169E-01, 1.250900E-01, 1.158354E-01, 1.078400E-01, 1.008646E-01, & ! + 9.472307E-02, 8.928000E-02, 8.442308E-02, 8.005924E-02, 7.612231E-02, & ! + 7.255153E-02, 6.929539E-02, 6.631769E-02, 6.358153E-02, 6.106231E-02, & ! + 5.873077E-02, 5.656924E-02, 5.455769E-02, 5.267846E-02, 5.091923E-02, & ! + 4.926692E-02, 4.771154E-02, 4.623923E-02, 4.484385E-02, 4.351539E-02, & ! + 4.224615E-02, 4.103385E-02, 3.986538E-02, 3.874077E-02, 3.765462E-02, & ! + 3.660077E-02, 3.557384E-02, 3.457615E-02, 3.360308E-02, 3.265000E-02, & ! + 3.171770E-02, 3.080538E-02, 2.990846E-02, 2.903000E-02, 2.816461E-02, & ! + 2.731539E-02, 2.648231E-02, 2.566308E-02, 2.485923E-02, 2.407000E-02, & ! + 2.329615E-02, 2.253769E-02, 2.179615E-02, & ! + 6.741200e-01, 5.390739e-01, 4.198767e-01, 3.332553e-01, 2.735633e-01, & ! 2 + 2.317727e-01, 2.012760e-01, 1.780400e-01, 1.596927e-01, 1.447980e-01, & ! + 1.324480e-01, 1.220347e-01, 1.131327e-01, 1.054313e-01, 9.870534e-02, & ! + 9.278200e-02, 8.752599e-02, 8.282933e-02, 7.860600e-02, 7.479133e-02, & ! + 7.132800e-02, 6.816733e-02, 6.527401e-02, 6.261266e-02, 6.015934e-02, & ! + 5.788867e-02, 5.578134e-02, 5.381667e-02, 5.198133e-02, 5.026067e-02, & ! + 4.864466e-02, 4.712267e-02, 4.568066e-02, 4.431200e-02, 4.300867e-02, & ! + 4.176600e-02, 4.057400e-02, 3.942534e-02, 3.832066e-02, 3.725068e-02, & ! + 3.621400e-02, 3.520533e-02, 3.422333e-02, 3.326400e-02, 3.232467e-02, & ! + 3.140535e-02, 3.050400e-02, 2.962000e-02, 2.875267e-02, 2.789800e-02, & ! + 2.705934e-02, 2.623667e-02, 2.542667e-02, 2.463200e-02, 2.385267e-02, & ! + 2.308667e-02, 2.233667e-02, 2.160067e-02, & ! + 9.250861e-01, 6.245692e-01, 4.347038e-01, 3.320208e-01, 2.714869e-01, & ! 3 + 2.309516e-01, 2.012592e-01, 1.783315e-01, 1.600369e-01, 1.451000e-01, & ! + 1.326838e-01, 1.222069e-01, 1.132554e-01, 1.055146e-01, 9.876000e-02, & ! + 9.281386e-02, 8.754000e-02, 8.283078e-02, 7.860077e-02, 7.477769e-02, & ! + 7.130847e-02, 6.814461e-02, 6.524615e-02, 6.258462e-02, 6.012847e-02, & ! + 5.785462e-02, 5.574231e-02, 5.378000e-02, 5.194461e-02, 5.022462e-02, & ! + 4.860846e-02, 4.708462e-02, 4.564154e-02, 4.427462e-02, 4.297231e-02, & ! + 4.172769e-02, 4.053693e-02, 3.939000e-02, 3.828462e-02, 3.721692e-02, & ! + 3.618000e-02, 3.517077e-02, 3.418923e-02, 3.323077e-02, 3.229154e-02, & ! + 3.137154e-02, 3.047154e-02, 2.959077e-02, 2.872308e-02, 2.786846e-02, & ! + 2.703077e-02, 2.620923e-02, 2.540077e-02, 2.460615e-02, 2.382693e-02, & ! + 2.306231e-02, 2.231231e-02, 2.157923e-02, & ! + 9.298960e-01, 5.776460e-01, 4.083450e-01, 3.211160e-01, 2.666390e-01, & ! 4 + 2.281990e-01, 1.993250e-01, 1.768080e-01, 1.587810e-01, 1.440390e-01, & ! + 1.317720e-01, 1.214150e-01, 1.125540e-01, 1.048890e-01, 9.819600e-02, & ! + 9.230201e-02, 8.706900e-02, 8.239698e-02, 7.819500e-02, 7.439899e-02, & ! + 7.095300e-02, 6.780700e-02, 6.492900e-02, 6.228600e-02, 5.984600e-02, & ! + 5.758599e-02, 5.549099e-02, 5.353801e-02, 5.171400e-02, 5.000500e-02, & ! + 4.840000e-02, 4.688500e-02, 4.545100e-02, 4.409300e-02, 4.279700e-02, & ! + 4.156100e-02, 4.037700e-02, 3.923800e-02, 3.813800e-02, 3.707600e-02, & ! + 3.604500e-02, 3.504300e-02, 3.406500e-02, 3.310800e-02, 3.217700e-02, & ! + 3.126600e-02, 3.036800e-02, 2.948900e-02, 2.862400e-02, 2.777500e-02, & ! + 2.694200e-02, 2.612300e-02, 2.531700e-02, 2.452800e-02, 2.375100e-02, & ! + 2.299100e-02, 2.224300e-02, 2.151201e-02, & ! + 8.780964e-01, 5.407031e-01, 3.961100e-01, 3.166645e-01, 2.640455e-01, & ! 5 + 2.261070e-01, 1.974820e-01, 1.751775e-01, 1.573415e-01, 1.427725e-01, & ! + 1.306535e-01, 1.204195e-01, 1.116650e-01, 1.040915e-01, 9.747550e-02, & ! + 9.164800e-02, 8.647649e-02, 8.185501e-02, 7.770200e-02, 7.394749e-02, & ! + 7.053800e-02, 6.742700e-02, 6.457999e-02, 6.196149e-02, 5.954450e-02, & ! + 5.730650e-02, 5.522949e-02, 5.329450e-02, 5.148500e-02, 4.979000e-02, & ! + 4.819600e-02, 4.669301e-02, 4.527050e-02, 4.391899e-02, 4.263500e-02, & ! + 4.140500e-02, 4.022850e-02, 3.909500e-02, 3.800199e-02, 3.694600e-02, & ! + 3.592000e-02, 3.492250e-02, 3.395050e-02, 3.300150e-02, 3.207250e-02, & ! + 3.116250e-02, 3.027100e-02, 2.939500e-02, 2.853500e-02, 2.768900e-02, & ! + 2.686000e-02, 2.604350e-02, 2.524150e-02, 2.445350e-02, 2.368049e-02, & ! + 2.292150e-02, 2.217800e-02, 2.144800e-02, & ! + 7.937480e-01, 5.123036e-01, 3.858181e-01, 3.099622e-01, 2.586829e-01, & ! 6 + 2.217587e-01, 1.939755e-01, 1.723397e-01, 1.550258e-01, 1.408600e-01, & ! + 1.290545e-01, 1.190661e-01, 1.105039e-01, 1.030848e-01, 9.659387e-02, & ! + 9.086775e-02, 8.577807e-02, 8.122452e-02, 7.712711e-02, 7.342193e-02, & ! + 7.005387e-02, 6.697840e-02, 6.416000e-02, 6.156903e-02, 5.917484e-02, & ! + 5.695807e-02, 5.489968e-02, 5.298097e-02, 5.118806e-02, 4.950645e-02, & ! + 4.792710e-02, 4.643581e-02, 4.502484e-02, 4.368547e-02, 4.241001e-02, & ! + 4.118936e-02, 4.002193e-02, 3.889711e-02, 3.781322e-02, 3.676387e-02, & ! + 3.574549e-02, 3.475548e-02, 3.379033e-02, 3.284678e-02, 3.192420e-02, & ! + 3.102032e-02, 3.013484e-02, 2.926258e-02, 2.840839e-02, 2.756742e-02, & ! + 2.674258e-02, 2.593064e-02, 2.513258e-02, 2.435000e-02, 2.358064e-02, & ! + 2.282581e-02, 2.208548e-02, 2.135936e-02, & ! + 7.533129e-01, 5.033129e-01, 3.811271e-01, 3.062757e-01, 2.558729e-01, & ! 7 + 2.196828e-01, 1.924372e-01, 1.711714e-01, 1.541086e-01, 1.401114e-01, & ! + 1.284257e-01, 1.185200e-01, 1.100243e-01, 1.026529e-01, 9.620142e-02, & ! + 9.050714e-02, 8.544428e-02, 8.091714e-02, 7.684000e-02, 7.315429e-02, & ! + 6.980143e-02, 6.673999e-02, 6.394000e-02, 6.136000e-02, 5.897715e-02, & ! + 5.677000e-02, 5.472285e-02, 5.281286e-02, 5.102858e-02, 4.935429e-02, & ! + 4.778000e-02, 4.629714e-02, 4.489142e-02, 4.355857e-02, 4.228715e-02, & ! + 4.107285e-02, 3.990857e-02, 3.879000e-02, 3.770999e-02, 3.666429e-02, & ! + 3.565000e-02, 3.466286e-02, 3.370143e-02, 3.276143e-02, 3.184143e-02, & ! + 3.094000e-02, 3.005714e-02, 2.919000e-02, 2.833714e-02, 2.750000e-02, & ! + 2.667714e-02, 2.586714e-02, 2.507143e-02, 2.429143e-02, 2.352428e-02, & ! + 2.277143e-02, 2.203429e-02, 2.130857e-02, & ! + 7.079894e-01, 4.878198e-01, 3.719852e-01, 3.001873e-01, 2.514795e-01, & ! 8 + 2.163013e-01, 1.897100e-01, 1.689033e-01, 1.521793e-01, 1.384449e-01, & ! + 1.269666e-01, 1.172326e-01, 1.088745e-01, 1.016224e-01, 9.527085e-02, & ! + 8.966240e-02, 8.467543e-02, 8.021144e-02, 7.619344e-02, 7.255676e-02, & ! + 6.924996e-02, 6.623030e-02, 6.346261e-02, 6.091499e-02, 5.856325e-02, & ! + 5.638385e-02, 5.435930e-02, 5.247156e-02, 5.070699e-02, 4.905230e-02, & ! + 4.749499e-02, 4.602611e-02, 4.463581e-02, 4.331543e-02, 4.205647e-02, & ! + 4.085241e-02, 3.969978e-02, 3.859033e-02, 3.751877e-02, 3.648168e-02, & ! + 3.547468e-02, 3.449553e-02, 3.354072e-02, 3.260732e-02, 3.169438e-02, & ! + 3.079969e-02, 2.992146e-02, 2.905875e-02, 2.821201e-02, 2.737873e-02, & ! + 2.656052e-02, 2.575586e-02, 2.496511e-02, 2.418783e-02, 2.342500e-02, & ! + 2.267646e-02, 2.194177e-02, 2.122146e-02, & ! + 6.850164e-01, 4.762468e-01, 3.642001e-01, 2.946012e-01, 2.472001e-01, & ! 9 + 2.128588e-01, 1.868537e-01, 1.664893e-01, 1.501142e-01, 1.366620e-01, & ! + 1.254147e-01, 1.158721e-01, 1.076732e-01, 1.005530e-01, 9.431306e-02, & ! + 8.879891e-02, 8.389232e-02, 7.949714e-02, 7.553857e-02, 7.195474e-02, & ! + 6.869413e-02, 6.571444e-02, 6.298286e-02, 6.046779e-02, 5.814474e-02, & ! + 5.599141e-02, 5.399114e-02, 5.212443e-02, 5.037870e-02, 4.874321e-02, & ! + 4.720219e-02, 4.574813e-02, 4.437160e-02, 4.306460e-02, 4.181810e-02, & ! + 4.062603e-02, 3.948252e-02, 3.838256e-02, 3.732049e-02, 3.629192e-02, & ! + 3.529301e-02, 3.432190e-02, 3.337412e-02, 3.244842e-02, 3.154175e-02, & ! + 3.065253e-02, 2.978063e-02, 2.892367e-02, 2.808221e-02, 2.725478e-02, & ! + 2.644174e-02, 2.564175e-02, 2.485508e-02, 2.408303e-02, 2.332365e-02, & ! + 2.257890e-02, 2.184824e-02, 2.113224e-02, & ! + 6.673017e-01, 4.664520e-01, 3.579398e-01, 2.902234e-01, 2.439904e-01, & ! 10 + 2.104149e-01, 1.849277e-01, 1.649234e-01, 1.488087e-01, 1.355515e-01, & ! + 1.244562e-01, 1.150329e-01, 1.069321e-01, 9.989310e-02, 9.372070e-02, & ! + 8.826450e-02, 8.340622e-02, 7.905378e-02, 7.513109e-02, 7.157859e-02, & ! + 6.834588e-02, 6.539114e-02, 6.268150e-02, 6.018621e-02, 5.788098e-02, & ! + 5.574351e-02, 5.375699e-02, 5.190412e-02, 5.017099e-02, 4.854497e-02, & ! + 4.701490e-02, 4.557030e-02, 4.420249e-02, 4.290304e-02, 4.166427e-02, & ! + 4.047820e-02, 3.934232e-02, 3.824778e-02, 3.719236e-02, 3.616931e-02, & ! + 3.517597e-02, 3.420856e-02, 3.326566e-02, 3.234346e-02, 3.144122e-02, & ! + 3.055684e-02, 2.968798e-02, 2.883519e-02, 2.799635e-02, 2.717228e-02, & ! + 2.636182e-02, 2.556424e-02, 2.478114e-02, 2.401086e-02, 2.325657e-02, & ! + 2.251506e-02, 2.178594e-02, 2.107301e-02, & ! + 6.552414e-01, 4.599454e-01, 3.538626e-01, 2.873547e-01, 2.418033e-01, & ! 11 + 2.086660e-01, 1.834885e-01, 1.637142e-01, 1.477767e-01, 1.346583e-01, & ! + 1.236734e-01, 1.143412e-01, 1.063148e-01, 9.933905e-02, 9.322026e-02, & ! + 8.780979e-02, 8.299230e-02, 7.867554e-02, 7.478450e-02, 7.126053e-02, & ! + 6.805276e-02, 6.512143e-02, 6.243211e-02, 5.995541e-02, 5.766712e-02, & ! + 5.554484e-02, 5.357246e-02, 5.173222e-02, 5.001069e-02, 4.839505e-02, & ! + 4.687471e-02, 4.543861e-02, 4.407857e-02, 4.278577e-02, 4.155331e-02, & ! + 4.037322e-02, 3.924302e-02, 3.815376e-02, 3.710172e-02, 3.608296e-02, & ! + 3.509330e-02, 3.412980e-02, 3.319009e-02, 3.227106e-02, 3.137157e-02, & ! + 3.048950e-02, 2.962365e-02, 2.877297e-02, 2.793726e-02, 2.711500e-02, & ! + 2.630666e-02, 2.551206e-02, 2.473052e-02, 2.396287e-02, 2.320861e-02, & ! + 2.246810e-02, 2.174162e-02, 2.102927e-02, & ! + 6.430901e-01, 4.532134e-01, 3.496132e-01, 2.844655e-01, 2.397347e-01, & ! 12 + 2.071236e-01, 1.822976e-01, 1.627640e-01, 1.469961e-01, 1.340006e-01, & ! + 1.231069e-01, 1.138441e-01, 1.058706e-01, 9.893678e-02, 9.285166e-02, & ! + 8.746871e-02, 8.267411e-02, 7.837656e-02, 7.450257e-02, 7.099318e-02, & ! + 6.779929e-02, 6.487987e-02, 6.220168e-02, 5.973530e-02, 5.745636e-02, & ! + 5.534344e-02, 5.337986e-02, 5.154797e-02, 4.983404e-02, 4.822582e-02, & ! + 4.671228e-02, 4.528321e-02, 4.392997e-02, 4.264325e-02, 4.141647e-02, & ! + 4.024259e-02, 3.911767e-02, 3.803309e-02, 3.698782e-02, 3.597140e-02, & ! + 3.498774e-02, 3.402852e-02, 3.309340e-02, 3.217818e-02, 3.128292e-02, & ! + 3.040486e-02, 2.954230e-02, 2.869545e-02, 2.786261e-02, 2.704372e-02, & ! + 2.623813e-02, 2.544668e-02, 2.466788e-02, 2.390313e-02, 2.315136e-02, & ! + 2.241391e-02, 2.168921e-02, 2.097903e-02, & ! + 6.367074e-01, 4.495768e-01, 3.471263e-01, 2.826149e-01, 2.382868e-01, & ! 13 + 2.059640e-01, 1.813562e-01, 1.619881e-01, 1.463436e-01, 1.334402e-01, & ! + 1.226166e-01, 1.134096e-01, 1.054829e-01, 9.858838e-02, 9.253790e-02, & ! + 8.718582e-02, 8.241830e-02, 7.814482e-02, 7.429212e-02, 7.080165e-02, & ! + 6.762385e-02, 6.471838e-02, 6.205388e-02, 5.959726e-02, 5.732871e-02, & ! + 5.522402e-02, 5.326793e-02, 5.144230e-02, 4.973440e-02, 4.813188e-02, & ! + 4.662283e-02, 4.519798e-02, 4.384833e-02, 4.256541e-02, 4.134253e-02, & ! + 4.017136e-02, 3.904911e-02, 3.796779e-02, 3.692364e-02, 3.591182e-02, & ! + 3.492930e-02, 3.397230e-02, 3.303920e-02, 3.212572e-02, 3.123278e-02, & ! + 3.035519e-02, 2.949493e-02, 2.864985e-02, 2.781840e-02, 2.700197e-02, & ! + 2.619682e-02, 2.540674e-02, 2.462966e-02, 2.386613e-02, 2.311602e-02, & ! + 2.237846e-02, 2.165660e-02, 2.094756e-02, & ! + 4.298416e-01, 4.391639e-01, 3.975030e-01, 3.443028e-01, 2.957345e-01, & ! 14 + 2.556461e-01, 2.234755e-01, 1.976636e-01, 1.767428e-01, 1.595611e-01, & ! + 1.452636e-01, 1.332156e-01, 1.229481e-01, 1.141059e-01, 1.064208e-01, & ! + 9.968527e-02, 9.373833e-02, 8.845221e-02, 8.372112e-02, 7.946667e-02, & ! + 7.561807e-02, 7.212029e-02, 6.893166e-02, 6.600944e-02, 6.332277e-02, & ! + 6.084277e-02, 5.854721e-02, 5.641361e-02, 5.442639e-02, 5.256750e-02, & ! + 5.082499e-02, 4.918556e-02, 4.763694e-02, 4.617222e-02, 4.477861e-02, & ! + 4.344861e-02, 4.217999e-02, 4.096111e-02, 3.978638e-02, 3.865361e-02, & ! + 3.755473e-02, 3.649028e-02, 3.545361e-02, 3.444361e-02, 3.345666e-02, & ! + 3.249167e-02, 3.154722e-02, 3.062083e-02, 2.971250e-02, 2.882083e-02, & ! + 2.794611e-02, 2.708778e-02, 2.624500e-02, 2.541750e-02, 2.460528e-02, & ! + 2.381194e-02, 2.303250e-02, 2.226833e-02/), & ! + shape = (/58,nBandsSW_RRTMG/)) + + real(kind_phys),dimension(58,nBandsSW_RRTMG),parameter :: & ! + ssaliq1 = reshape(source= (/ & ! + 8.143821e-01, 7.836739e-01, 7.550722e-01, 7.306269e-01, 7.105612e-01, & ! 1 + 6.946649e-01, 6.825556e-01, 6.737762e-01, 6.678448e-01, 6.642830e-01, & ! + 6.679741e-01, 6.584607e-01, 6.505598e-01, 6.440951e-01, 6.388901e-01, & ! + 6.347689e-01, 6.315549e-01, 6.290718e-01, 6.271432e-01, 6.255928e-01, & ! + 6.242441e-01, 6.229207e-01, 6.214464e-01, 6.196445e-01, 6.173388e-01, & ! + 6.143527e-01, 6.105099e-01, 6.056339e-01, 6.108290e-01, 6.073939e-01, & ! + 6.043073e-01, 6.015473e-01, 5.990913e-01, 5.969173e-01, 5.950028e-01, & ! + 5.933257e-01, 5.918636e-01, 5.905944e-01, 5.894957e-01, 5.885453e-01, & ! + 5.877209e-01, 5.870003e-01, 5.863611e-01, 5.857811e-01, 5.852381e-01, & ! + 5.847098e-01, 5.841738e-01, 5.836081e-01, 5.829901e-01, 5.822979e-01, & ! + 5.815089e-01, 5.806011e-01, 5.795521e-01, 5.783396e-01, 5.769413e-01, & ! + 5.753351e-01, 5.734986e-01, 5.7141e-01, & ! + 8.165821e-01, 8.002015e-01, 7.816921e-01, 7.634131e-01, 7.463721e-01, & ! 2 + 7.312469e-01, 7.185883e-01, 7.088975e-01, 7.026671e-01, 7.004020e-01, & ! + 7.042138e-01, 6.960930e-01, 6.894243e-01, 6.840459e-01, 6.797957e-01, & ! + 6.765119e-01, 6.740325e-01, 6.721955e-01, 6.708391e-01, 6.698013e-01, & ! + 6.689201e-01, 6.680339e-01, 6.669805e-01, 6.655982e-01, 6.637250e-01, & ! + 6.611992e-01, 6.578588e-01, 6.535420e-01, 6.584449e-01, 6.553992e-01, & ! + 6.526547e-01, 6.501917e-01, 6.479905e-01, 6.460313e-01, 6.442945e-01, & ! + 6.427605e-01, 6.414094e-01, 6.402217e-01, 6.391775e-01, 6.382573e-01, & ! + 6.374413e-01, 6.367099e-01, 6.360433e-01, 6.354218e-01, 6.348257e-01, & ! + 6.342355e-01, 6.336313e-01, 6.329935e-01, 6.323023e-01, 6.315383e-01, & ! + 6.306814e-01, 6.297122e-01, 6.286110e-01, 6.273579e-01, 6.259333e-01, & ! + 6.243176e-01, 6.224910e-01, 6.2043e-01, & ! + 9.900163e-01, 9.854307e-01, 9.797730e-01, 9.733113e-01, 9.664245e-01, & ! 3 + 9.594976e-01, 9.529055e-01, 9.470112e-01, 9.421695e-01, 9.387304e-01, & ! + 9.344918e-01, 9.305302e-01, 9.267048e-01, 9.230072e-01, 9.194289e-01, & ! + 9.159616e-01, 9.125968e-01, 9.093260e-01, 9.061409e-01, 9.030330e-01, & ! + 8.999940e-01, 8.970154e-01, 8.940888e-01, 8.912058e-01, 8.883579e-01, & ! + 8.855368e-01, 8.827341e-01, 8.799413e-01, 8.777423e-01, 8.749566e-01, & ! + 8.722298e-01, 8.695605e-01, 8.669469e-01, 8.643875e-01, 8.618806e-01, & ! + 8.594246e-01, 8.570179e-01, 8.546589e-01, 8.523459e-01, 8.500773e-01, & ! + 8.478516e-01, 8.456670e-01, 8.435219e-01, 8.414148e-01, 8.393439e-01, & ! + 8.373078e-01, 8.353047e-01, 8.333330e-01, 8.313911e-01, 8.294774e-01, & ! + 8.275904e-01, 8.257282e-01, 8.238893e-01, 8.220721e-01, 8.202751e-01, & ! + 8.184965e-01, 8.167346e-01, 8.1499e-01, & ! + 9.999916e-01, 9.987396e-01, 9.966900e-01, 9.950738e-01, 9.937531e-01, & ! 4 + 9.925912e-01, 9.914525e-01, 9.902018e-01, 9.887046e-01, 9.868263e-01, & ! + 9.849039e-01, 9.832372e-01, 9.815265e-01, 9.797770e-01, 9.779940e-01, & ! + 9.761827e-01, 9.743481e-01, 9.724955e-01, 9.706303e-01, 9.687575e-01, & ! + 9.668823e-01, 9.650100e-01, 9.631457e-01, 9.612947e-01, 9.594622e-01, & ! + 9.576534e-01, 9.558734e-01, 9.541275e-01, 9.522059e-01, 9.504258e-01, & ! + 9.486459e-01, 9.468676e-01, 9.450921e-01, 9.433208e-01, 9.415548e-01, & ! + 9.397955e-01, 9.380441e-01, 9.363022e-01, 9.345706e-01, 9.328510e-01, & ! + 9.311445e-01, 9.294524e-01, 9.277761e-01, 9.261167e-01, 9.244755e-01, & ! + 9.228540e-01, 9.212534e-01, 9.196748e-01, 9.181197e-01, 9.165894e-01, & ! + 9.150851e-01, 9.136080e-01, 9.121596e-01, 9.107410e-01, 9.093536e-01, & ! + 9.079987e-01, 9.066775e-01, 9.0539e-01, & ! + 9.979493e-01, 9.964113e-01, 9.950014e-01, 9.937045e-01, 9.924964e-01, & ! 5 + 9.913546e-01, 9.902575e-01, 9.891843e-01, 9.881136e-01, 9.870238e-01, & ! + 9.859934e-01, 9.849372e-01, 9.838873e-01, 9.828434e-01, 9.818052e-01, & ! + 9.807725e-01, 9.797450e-01, 9.787225e-01, 9.777047e-01, 9.766914e-01, & ! + 9.756823e-01, 9.746771e-01, 9.736756e-01, 9.726775e-01, 9.716827e-01, & ! + 9.706907e-01, 9.697014e-01, 9.687145e-01, 9.678060e-01, 9.668108e-01, & ! + 9.658218e-01, 9.648391e-01, 9.638629e-01, 9.628936e-01, 9.619313e-01, & ! + 9.609763e-01, 9.600287e-01, 9.590888e-01, 9.581569e-01, 9.572330e-01, & ! + 9.563176e-01, 9.554108e-01, 9.545128e-01, 9.536239e-01, 9.527443e-01, & ! + 9.518741e-01, 9.510137e-01, 9.501633e-01, 9.493230e-01, 9.484931e-01, & ! + 9.476740e-01, 9.468656e-01, 9.460683e-01, 9.452824e-01, 9.445080e-01, & ! + 9.437454e-01, 9.429948e-01, 9.4226e-01, & ! + 9.988742e-01, 9.982668e-01, 9.976935e-01, 9.971497e-01, 9.966314e-01, & ! 6 + 9.961344e-01, 9.956545e-01, 9.951873e-01, 9.947286e-01, 9.942741e-01, & ! + 9.938457e-01, 9.933947e-01, 9.929473e-01, 9.925032e-01, 9.920621e-01, & ! + 9.916237e-01, 9.911875e-01, 9.907534e-01, 9.903209e-01, 9.898898e-01, & ! + 9.894597e-01, 9.890304e-01, 9.886015e-01, 9.881726e-01, 9.877435e-01, & ! + 9.873138e-01, 9.868833e-01, 9.864516e-01, 9.860698e-01, 9.856317e-01, & ! + 9.851957e-01, 9.847618e-01, 9.843302e-01, 9.839008e-01, 9.834739e-01, & ! + 9.830494e-01, 9.826275e-01, 9.822083e-01, 9.817918e-01, 9.813782e-01, & ! + 9.809675e-01, 9.805598e-01, 9.801552e-01, 9.797538e-01, 9.793556e-01, & ! + 9.789608e-01, 9.785695e-01, 9.781817e-01, 9.777975e-01, 9.774171e-01, & ! + 9.770404e-01, 9.766676e-01, 9.762988e-01, 9.759340e-01, 9.755733e-01, & ! + 9.752169e-01, 9.748649e-01, 9.7452e-01, & ! + 9.994441e-01, 9.991608e-01, 9.988949e-01, 9.986439e-01, 9.984054e-01, & ! 7 + 9.981768e-01, 9.979557e-01, 9.977396e-01, 9.975258e-01, 9.973120e-01, & ! + 9.971011e-01, 9.968852e-01, 9.966708e-01, 9.964578e-01, 9.962462e-01, & ! + 9.960357e-01, 9.958264e-01, 9.956181e-01, 9.954108e-01, 9.952043e-01, & ! + 9.949987e-01, 9.947937e-01, 9.945892e-01, 9.943853e-01, 9.941818e-01, & ! + 9.939786e-01, 9.937757e-01, 9.935728e-01, 9.933922e-01, 9.931825e-01, & ! + 9.929739e-01, 9.927661e-01, 9.925592e-01, 9.923534e-01, 9.921485e-01, & ! + 9.919447e-01, 9.917421e-01, 9.915406e-01, 9.913403e-01, 9.911412e-01, & ! + 9.909435e-01, 9.907470e-01, 9.905519e-01, 9.903581e-01, 9.901659e-01, & ! + 9.899751e-01, 9.897858e-01, 9.895981e-01, 9.894120e-01, 9.892276e-01, & ! + 9.890447e-01, 9.888637e-01, 9.886845e-01, 9.885070e-01, 9.883314e-01, & ! + 9.881576e-01, 9.879859e-01, 9.8782e-01, & ! + 9.999138e-01, 9.998730e-01, 9.998338e-01, 9.997965e-01, 9.997609e-01, & ! 8 + 9.997270e-01, 9.996944e-01, 9.996629e-01, 9.996321e-01, 9.996016e-01, & ! + 9.995690e-01, 9.995372e-01, 9.995057e-01, 9.994744e-01, 9.994433e-01, & ! + 9.994124e-01, 9.993817e-01, 9.993510e-01, 9.993206e-01, 9.992903e-01, & ! + 9.992600e-01, 9.992299e-01, 9.991998e-01, 9.991698e-01, 9.991398e-01, & ! + 9.991098e-01, 9.990799e-01, 9.990499e-01, 9.990231e-01, 9.989920e-01, & ! + 9.989611e-01, 9.989302e-01, 9.988996e-01, 9.988690e-01, 9.988386e-01, & ! + 9.988084e-01, 9.987783e-01, 9.987485e-01, 9.987187e-01, 9.986891e-01, & ! + 9.986598e-01, 9.986306e-01, 9.986017e-01, 9.985729e-01, 9.985443e-01, & ! + 9.985160e-01, 9.984879e-01, 9.984600e-01, 9.984324e-01, 9.984050e-01, & ! + 9.983778e-01, 9.983509e-01, 9.983243e-01, 9.982980e-01, 9.982719e-01, & ! + 9.982461e-01, 9.982206e-01, 9.9820e-01, & ! + 9.999985e-01, 9.999979e-01, 9.999972e-01, 9.999966e-01, 9.999961e-01, & ! 9 + 9.999955e-01, 9.999950e-01, 9.999944e-01, 9.999938e-01, 9.999933e-01, & ! + 9.999927e-01, 9.999921e-01, 9.999915e-01, 9.999910e-01, 9.999904e-01, & ! + 9.999899e-01, 9.999893e-01, 9.999888e-01, 9.999882e-01, 9.999877e-01, & ! + 9.999871e-01, 9.999866e-01, 9.999861e-01, 9.999855e-01, 9.999850e-01, & ! + 9.999844e-01, 9.999839e-01, 9.999833e-01, 9.999828e-01, 9.999823e-01, & ! + 9.999817e-01, 9.999812e-01, 9.999807e-01, 9.999801e-01, 9.999796e-01, & ! + 9.999791e-01, 9.999786e-01, 9.999781e-01, 9.999776e-01, 9.999770e-01, & ! + 9.999765e-01, 9.999761e-01, 9.999756e-01, 9.999751e-01, 9.999746e-01, & ! + 9.999741e-01, 9.999736e-01, 9.999732e-01, 9.999727e-01, 9.999722e-01, & ! + 9.999718e-01, 9.999713e-01, 9.999709e-01, 9.999705e-01, 9.999701e-01, & ! + 9.999697e-01, 9.999692e-01, 9.9997e-01, & ! + 9.999999e-01, 9.999998e-01, 9.999997e-01, 9.999997e-01, 9.999997e-01, & ! 10 + 9.999996e-01, 9.999996e-01, 9.999995e-01, 9.999995e-01, 9.999994e-01, & ! + 9.999994e-01, 9.999993e-01, 9.999993e-01, 9.999992e-01, 9.999992e-01, & ! + 9.999991e-01, 9.999991e-01, 9.999991e-01, 9.999990e-01, 9.999989e-01, & ! + 9.999989e-01, 9.999989e-01, 9.999988e-01, 9.999988e-01, 9.999987e-01, & ! + 9.999987e-01, 9.999986e-01, 9.999986e-01, 9.999985e-01, 9.999985e-01, & ! + 9.999984e-01, 9.999984e-01, 9.999984e-01, 9.999983e-01, 9.999983e-01, & ! + 9.999982e-01, 9.999982e-01, 9.999982e-01, 9.999981e-01, 9.999980e-01, & ! + 9.999980e-01, 9.999980e-01, 9.999979e-01, 9.999979e-01, 9.999978e-01, & ! + 9.999978e-01, 9.999977e-01, 9.999977e-01, 9.999977e-01, 9.999976e-01, & ! + 9.999976e-01, 9.999975e-01, 9.999975e-01, 9.999974e-01, 9.999974e-01, & ! + 9.999974e-01, 9.999973e-01, 1.0000e+00, & ! + 9.999997e-01, 9.999995e-01, 9.999993e-01, 9.999992e-01, 9.999990e-01, & ! 11 + 9.999989e-01, 9.999988e-01, 9.999987e-01, 9.999986e-01, 9.999985e-01, & ! + 9.999984e-01, 9.999983e-01, 9.999982e-01, 9.999981e-01, 9.999980e-01, & ! + 9.999978e-01, 9.999977e-01, 9.999976e-01, 9.999975e-01, 9.999974e-01, & ! + 9.999973e-01, 9.999972e-01, 9.999970e-01, 9.999969e-01, 9.999968e-01, & ! + 9.999967e-01, 9.999966e-01, 9.999965e-01, 9.999964e-01, 9.999963e-01, & ! + 9.999962e-01, 9.999961e-01, 9.999959e-01, 9.999958e-01, 9.999957e-01, & ! + 9.999956e-01, 9.999955e-01, 9.999954e-01, 9.999953e-01, 9.999952e-01, & ! + 9.999951e-01, 9.999949e-01, 9.999949e-01, 9.999947e-01, 9.999946e-01, & ! + 9.999945e-01, 9.999944e-01, 9.999943e-01, 9.999942e-01, 9.999941e-01, & ! + 9.999940e-01, 9.999939e-01, 9.999938e-01, 9.999937e-01, 9.999936e-01, & ! + 9.999935e-01, 9.999934e-01, 9.9999e-01, & ! + 9.999984e-01, 9.999976e-01, 9.999969e-01, 9.999962e-01, 9.999956e-01, & ! 12 + 9.999950e-01, 9.999945e-01, 9.999940e-01, 9.999935e-01, 9.999931e-01, & ! + 9.999926e-01, 9.999920e-01, 9.999914e-01, 9.999908e-01, 9.999903e-01, & ! + 9.999897e-01, 9.999891e-01, 9.999886e-01, 9.999880e-01, 9.999874e-01, & ! + 9.999868e-01, 9.999863e-01, 9.999857e-01, 9.999851e-01, 9.999846e-01, & ! + 9.999840e-01, 9.999835e-01, 9.999829e-01, 9.999824e-01, 9.999818e-01, & ! + 9.999812e-01, 9.999806e-01, 9.999800e-01, 9.999795e-01, 9.999789e-01, & ! + 9.999783e-01, 9.999778e-01, 9.999773e-01, 9.999767e-01, 9.999761e-01, & ! + 9.999756e-01, 9.999750e-01, 9.999745e-01, 9.999739e-01, 9.999734e-01, & ! + 9.999729e-01, 9.999723e-01, 9.999718e-01, 9.999713e-01, 9.999708e-01, & ! + 9.999703e-01, 9.999697e-01, 9.999692e-01, 9.999687e-01, 9.999683e-01, & ! + 9.999678e-01, 9.999673e-01, 9.9997e-01, & ! + 9.999981e-01, 9.999973e-01, 9.999965e-01, 9.999958e-01, 9.999951e-01, & ! 13 + 9.999943e-01, 9.999937e-01, 9.999930e-01, 9.999924e-01, 9.999918e-01, & ! + 9.999912e-01, 9.999905e-01, 9.999897e-01, 9.999890e-01, 9.999883e-01, & ! + 9.999876e-01, 9.999869e-01, 9.999862e-01, 9.999855e-01, 9.999847e-01, & ! + 9.999840e-01, 9.999834e-01, 9.999827e-01, 9.999819e-01, 9.999812e-01, & ! + 9.999805e-01, 9.999799e-01, 9.999791e-01, 9.999785e-01, 9.999778e-01, & ! + 9.999771e-01, 9.999764e-01, 9.999757e-01, 9.999750e-01, 9.999743e-01, & ! + 9.999736e-01, 9.999729e-01, 9.999722e-01, 9.999715e-01, 9.999709e-01, & ! + 9.999701e-01, 9.999695e-01, 9.999688e-01, 9.999682e-01, 9.999675e-01, & ! + 9.999669e-01, 9.999662e-01, 9.999655e-01, 9.999649e-01, 9.999642e-01, & ! + 9.999636e-01, 9.999630e-01, 9.999624e-01, 9.999618e-01, 9.999612e-01, & ! + 9.999606e-01, 9.999600e-01, 9.9996e-01, & ! + 8.505737e-01, 8.465102e-01, 8.394829e-01, 8.279508e-01, 8.110806e-01, & ! 14 + 7.900397e-01, 7.669615e-01, 7.444422e-01, 7.253055e-01, 7.124831e-01, & ! + 7.016434e-01, 6.885485e-01, 6.767340e-01, 6.661029e-01, 6.565577e-01, & ! + 6.480013e-01, 6.403373e-01, 6.334697e-01, 6.273034e-01, 6.217440e-01, & ! + 6.166983e-01, 6.120740e-01, 6.077796e-01, 6.037249e-01, 5.998207e-01, & ! + 5.959788e-01, 5.921123e-01, 5.881354e-01, 5.891285e-01, 5.851143e-01, & ! + 5.814653e-01, 5.781606e-01, 5.751792e-01, 5.724998e-01, 5.701016e-01, & ! + 5.679634e-01, 5.660642e-01, 5.643829e-01, 5.628984e-01, 5.615898e-01, & ! + 5.604359e-01, 5.594158e-01, 5.585083e-01, 5.576924e-01, 5.569470e-01, & ! + 5.562512e-01, 5.555838e-01, 5.549239e-01, 5.542503e-01, 5.535420e-01, & ! + 5.527781e-01, 5.519374e-01, 5.509989e-01, 5.499417e-01, 5.487445e-01, & ! + 5.473865e-01, 5.458466e-01, 5.4410e-01 /), & ! + shape = (/58,nBandsSW_RRTMG/)) + + real(kind_phys),dimension(58,nBandsSW_RRTMG),parameter :: & ! + ssaliq2 = reshape(source= (/ & ! + 8.362119e-01, 8.098460e-01, 7.762291e-01, 7.486042e-01, 7.294172e-01, & ! 1 + 7.161000e-01, 7.060656e-01, 6.978387e-01, 6.907193e-01, 6.843551e-01, & ! + 6.785668e-01, 6.732450e-01, 6.683191e-01, 6.637264e-01, 6.594307e-01, & ! + 6.554033e-01, 6.516115e-01, 6.480295e-01, 6.446429e-01, 6.414306e-01, & ! + 6.383783e-01, 6.354750e-01, 6.327068e-01, 6.300665e-01, 6.275376e-01, & ! + 6.251245e-01, 6.228136e-01, 6.205944e-01, 6.184720e-01, 6.164330e-01, & ! + 6.144742e-01, 6.125962e-01, 6.108004e-01, 6.090740e-01, 6.074200e-01, & ! + 6.058381e-01, 6.043209e-01, 6.028681e-01, 6.014836e-01, 6.001626e-01, & ! + 5.988957e-01, 5.976864e-01, 5.965390e-01, 5.954379e-01, 5.943972e-01, & ! + 5.934019e-01, 5.924624e-01, 5.915579e-01, 5.907025e-01, 5.898913e-01, & ! + 5.891213e-01, 5.883815e-01, 5.876851e-01, 5.870158e-01, 5.863868e-01, & ! + 5.857821e-01, 5.852111e-01, 5.846579e-01, & ! + 6.995459e-01, 7.158012e-01, 7.076001e-01, 6.927244e-01, 6.786434e-01, & ! 2 + 6.673545e-01, 6.585859e-01, 6.516314e-01, 6.459010e-01, 6.410225e-01, & ! + 6.367574e-01, 6.329554e-01, 6.295119e-01, 6.263595e-01, 6.234462e-01, & ! + 6.207274e-01, 6.181755e-01, 6.157678e-01, 6.134880e-01, 6.113173e-01, & ! + 6.092495e-01, 6.072689e-01, 6.053717e-01, 6.035507e-01, 6.018001e-01, & ! + 6.001134e-01, 5.984951e-01, 5.969294e-01, 5.954256e-01, 5.939698e-01, & ! + 5.925716e-01, 5.912265e-01, 5.899270e-01, 5.886771e-01, 5.874746e-01, & ! + 5.863185e-01, 5.852077e-01, 5.841460e-01, 5.831249e-01, 5.821474e-01, & ! + 5.812078e-01, 5.803173e-01, 5.794616e-01, 5.786443e-01, 5.778617e-01, & ! + 5.771236e-01, 5.764191e-01, 5.757400e-01, 5.750971e-01, 5.744842e-01, & ! + 5.739012e-01, 5.733482e-01, 5.728175e-01, 5.723214e-01, 5.718383e-01, & ! + 5.713827e-01, 5.709471e-01, 5.705330e-01, & ! + 9.929711e-01, 9.896942e-01, 9.852408e-01, 9.806820e-01, 9.764512e-01, & ! 3 + 9.725375e-01, 9.688677e-01, 9.653832e-01, 9.620552e-01, 9.588522e-01, & ! + 9.557475e-01, 9.527265e-01, 9.497731e-01, 9.468756e-01, 9.440270e-01, & ! + 9.412230e-01, 9.384592e-01, 9.357287e-01, 9.330369e-01, 9.303778e-01, & ! + 9.277502e-01, 9.251546e-01, 9.225907e-01, 9.200553e-01, 9.175521e-01, & ! + 9.150773e-01, 9.126352e-01, 9.102260e-01, 9.078485e-01, 9.055057e-01, & ! + 9.031978e-01, 9.009306e-01, 8.987010e-01, 8.965177e-01, 8.943774e-01, & ! + 8.922869e-01, 8.902430e-01, 8.882551e-01, 8.863182e-01, 8.844373e-01, & ! + 8.826143e-01, 8.808499e-01, 8.791413e-01, 8.774940e-01, 8.759019e-01, & ! + 8.743650e-01, 8.728941e-01, 8.714712e-01, 8.701065e-01, 8.688008e-01, & ! + 8.675409e-01, 8.663295e-01, 8.651714e-01, 8.640637e-01, 8.629943e-01, & ! + 8.619762e-01, 8.609995e-01, 8.600581e-01, & ! + 9.910612e-01, 9.854226e-01, 9.795008e-01, 9.742920e-01, 9.695996e-01, & ! 4 + 9.652274e-01, 9.610648e-01, 9.570521e-01, 9.531397e-01, 9.493086e-01, & ! + 9.455413e-01, 9.418362e-01, 9.381902e-01, 9.346016e-01, 9.310718e-01, & ! + 9.275957e-01, 9.241757e-01, 9.208038e-01, 9.174802e-01, 9.142058e-01, & ! + 9.109753e-01, 9.077895e-01, 9.046433e-01, 9.015409e-01, 8.984784e-01, & ! + 8.954572e-01, 8.924748e-01, 8.895367e-01, 8.866395e-01, 8.837864e-01, & ! + 8.809819e-01, 8.782267e-01, 8.755231e-01, 8.728712e-01, 8.702802e-01, & ! + 8.677443e-01, 8.652733e-01, 8.628678e-01, 8.605300e-01, 8.582593e-01, & ! + 8.560596e-01, 8.539352e-01, 8.518782e-01, 8.498915e-01, 8.479790e-01, & ! + 8.461384e-01, 8.443645e-01, 8.426613e-01, 8.410229e-01, 8.394495e-01, & ! + 8.379428e-01, 8.364967e-01, 8.351117e-01, 8.337820e-01, 8.325091e-01, & ! + 8.312874e-01, 8.301169e-01, 8.289985e-01, & ! + 9.969802e-01, 9.950445e-01, 9.931448e-01, 9.914272e-01, 9.898652e-01, & ! 5 + 9.884250e-01, 9.870637e-01, 9.857482e-01, 9.844558e-01, 9.831755e-01, & ! + 9.819068e-01, 9.806477e-01, 9.794000e-01, 9.781666e-01, 9.769461e-01, & ! + 9.757386e-01, 9.745459e-01, 9.733650e-01, 9.721953e-01, 9.710398e-01, & ! + 9.698936e-01, 9.687583e-01, 9.676334e-01, 9.665192e-01, 9.654132e-01, & ! + 9.643208e-01, 9.632374e-01, 9.621625e-01, 9.611003e-01, 9.600518e-01, & ! + 9.590144e-01, 9.579922e-01, 9.569864e-01, 9.559948e-01, 9.550239e-01, & ! + 9.540698e-01, 9.531382e-01, 9.522280e-01, 9.513409e-01, 9.504772e-01, & ! + 9.496360e-01, 9.488220e-01, 9.480327e-01, 9.472693e-01, 9.465333e-01, & ! + 9.458211e-01, 9.451344e-01, 9.444732e-01, 9.438372e-01, 9.432268e-01, & ! + 9.426391e-01, 9.420757e-01, 9.415308e-01, 9.410102e-01, 9.405115e-01, & ! + 9.400326e-01, 9.395716e-01, 9.391313e-01, & ! + 9.980034e-01, 9.968572e-01, 9.958696e-01, 9.949747e-01, 9.941241e-01, & ! 6 + 9.933043e-01, 9.924971e-01, 9.916978e-01, 9.909023e-01, 9.901046e-01, & ! + 9.893087e-01, 9.885146e-01, 9.877195e-01, 9.869283e-01, 9.861379e-01, & ! + 9.853523e-01, 9.845715e-01, 9.837945e-01, 9.830217e-01, 9.822567e-01, & ! + 9.814935e-01, 9.807356e-01, 9.799815e-01, 9.792332e-01, 9.784845e-01, & ! + 9.777424e-01, 9.770042e-01, 9.762695e-01, 9.755416e-01, 9.748152e-01, & ! + 9.740974e-01, 9.733873e-01, 9.726813e-01, 9.719861e-01, 9.713010e-01, & ! + 9.706262e-01, 9.699647e-01, 9.693144e-01, 9.686794e-01, 9.680596e-01, & ! + 9.674540e-01, 9.668657e-01, 9.662926e-01, 9.657390e-01, 9.652019e-01, & ! + 9.646820e-01, 9.641784e-01, 9.636945e-01, 9.632260e-01, 9.627743e-01, & ! + 9.623418e-01, 9.619227e-01, 9.615194e-01, 9.611341e-01, 9.607629e-01, & ! + 9.604057e-01, 9.600622e-01, 9.597322e-01, & ! + 9.988219e-01, 9.981767e-01, 9.976168e-01, 9.971066e-01, 9.966195e-01, & ! 7 + 9.961566e-01, 9.956995e-01, 9.952481e-01, 9.947982e-01, 9.943495e-01, & ! + 9.938955e-01, 9.934368e-01, 9.929825e-01, 9.925239e-01, 9.920653e-01, & ! + 9.916096e-01, 9.911552e-01, 9.907067e-01, 9.902594e-01, 9.898178e-01, & ! + 9.893791e-01, 9.889453e-01, 9.885122e-01, 9.880837e-01, 9.876567e-01, & ! + 9.872331e-01, 9.868121e-01, 9.863938e-01, 9.859790e-01, 9.855650e-01, & ! + 9.851548e-01, 9.847491e-01, 9.843496e-01, 9.839521e-01, 9.835606e-01, & ! + 9.831771e-01, 9.827975e-01, 9.824292e-01, 9.820653e-01, 9.817124e-01, & ! + 9.813644e-01, 9.810291e-01, 9.807020e-01, 9.803864e-01, 9.800782e-01, & ! + 9.797821e-01, 9.794958e-01, 9.792179e-01, 9.789509e-01, 9.786940e-01, & ! + 9.784460e-01, 9.782090e-01, 9.779789e-01, 9.777553e-01, 9.775425e-01, & ! + 9.773387e-01, 9.771420e-01, 9.769529e-01, & ! + 9.998902e-01, 9.998395e-01, 9.997915e-01, 9.997442e-01, 9.997016e-01, & ! 8 + 9.996600e-01, 9.996200e-01, 9.995806e-01, 9.995411e-01, 9.995005e-01, & ! + 9.994589e-01, 9.994178e-01, 9.993766e-01, 9.993359e-01, 9.992948e-01, & ! + 9.992533e-01, 9.992120e-01, 9.991723e-01, 9.991313e-01, 9.990906e-01, & ! + 9.990510e-01, 9.990113e-01, 9.989716e-01, 9.989323e-01, 9.988923e-01, & ! + 9.988532e-01, 9.988140e-01, 9.987761e-01, 9.987373e-01, 9.986989e-01, & ! + 9.986597e-01, 9.986239e-01, 9.985861e-01, 9.985485e-01, 9.985123e-01, & ! + 9.984762e-01, 9.984415e-01, 9.984065e-01, 9.983722e-01, 9.983398e-01, & ! + 9.983078e-01, 9.982758e-01, 9.982461e-01, 9.982157e-01, 9.981872e-01, & ! + 9.981595e-01, 9.981324e-01, 9.981068e-01, 9.980811e-01, 9.980580e-01, & ! + 9.980344e-01, 9.980111e-01, 9.979908e-01, 9.979690e-01, 9.979492e-01, & ! + 9.979316e-01, 9.979116e-01, 9.978948e-01, & ! + 9.999978e-01, 9.999948e-01, 9.999915e-01, 9.999905e-01, 9.999896e-01, & ! 9 + 9.999887e-01, 9.999888e-01, 9.999888e-01, 9.999870e-01, 9.999854e-01, & ! + 9.999855e-01, 9.999856e-01, 9.999839e-01, 9.999834e-01, 9.999829e-01, & ! + 9.999809e-01, 9.999816e-01, 9.999793e-01, 9.999782e-01, 9.999779e-01, & ! + 9.999772e-01, 9.999764e-01, 9.999756e-01, 9.999744e-01, 9.999744e-01, & ! + 9.999736e-01, 9.999729e-01, 9.999716e-01, 9.999706e-01, 9.999692e-01, & ! + 9.999690e-01, 9.999675e-01, 9.999673e-01, 9.999660e-01, 9.999654e-01, & ! + 9.999647e-01, 9.999647e-01, 9.999625e-01, 9.999620e-01, 9.999614e-01, & ! + 9.999613e-01, 9.999607e-01, 9.999604e-01, 9.999594e-01, 9.999589e-01, & ! + 9.999586e-01, 9.999567e-01, 9.999550e-01, 9.999557e-01, 9.999542e-01, & ! + 9.999546e-01, 9.999539e-01, 9.999536e-01, 9.999526e-01, 9.999523e-01, & ! + 9.999508e-01, 9.999534e-01, 9.999507e-01, & ! + 1.000000e+00, 1.000000e+00, 1.000000e+00, 1.000000e+00, 1.000000e+00, & ! 10 + 1.000000e+00, 1.000000e+00, 1.000000e+00, 1.000000e+00, 1.000000e+00, & ! + 1.000000e+00, 1.000000e+00, 1.000000e+00, 1.000000e+00, 1.000000e+00, & ! + 1.000000e+00, 1.000000e+00, 1.000000e+00, 1.000000e+00, 9.999995e-01, & ! + 9.999995e-01, 9.999990e-01, 9.999991e-01, 9.999991e-01, 9.999990e-01, & ! + 9.999989e-01, 9.999988e-01, 9.999988e-01, 9.999986e-01, 9.999988e-01, & ! + 9.999986e-01, 9.999987e-01, 9.999986e-01, 9.999985e-01, 9.999985e-01, & ! + 9.999985e-01, 9.999985e-01, 9.999983e-01, 9.999983e-01, 9.999981e-01, & ! + 9.999981e-01, 9.999986e-01, 9.999985e-01, 9.999983e-01, 9.999984e-01, & ! + 9.999982e-01, 9.999983e-01, 9.999982e-01, 9.999980e-01, 9.999981e-01, & ! + 9.999978e-01, 9.999979e-01, 9.999985e-01, 9.999985e-01, 9.999983e-01, & ! + 9.999983e-01, 9.999983e-01, 9.999983e-01, & ! + 1.000000e+00, 1.000000e+00, 1.000000e+00, 1.000000e+00, 1.000000e+00, & ! 11 + 1.000000e+00, 1.000000e+00, 1.000000e+00, 1.000000e+00, 1.000000e+00, & ! + 1.000000e+00, 1.000000e+00, 1.000000e+00, 1.000000e+00, 1.000000e+00, & ! + 1.000000e+00, 1.000000e+00, 1.000000e+00, 1.000000e+00, 9.999991e-01, & ! + 9.999990e-01, 9.999992e-01, 9.999995e-01, 9.999986e-01, 9.999994e-01, & ! + 9.999985e-01, 9.999980e-01, 9.999984e-01, 9.999983e-01, 9.999979e-01, & ! + 9.999969e-01, 9.999977e-01, 9.999971e-01, 9.999969e-01, 9.999969e-01, & ! + 9.999965e-01, 9.999970e-01, 9.999985e-01, 9.999973e-01, 9.999961e-01, & ! + 9.999968e-01, 9.999952e-01, 9.999970e-01, 9.999974e-01, 9.999965e-01, & ! + 9.999969e-01, 9.999970e-01, 9.999970e-01, 9.999960e-01, 9.999923e-01, & ! + 9.999958e-01, 9.999937e-01, 9.999960e-01, 9.999953e-01, 9.999946e-01, & ! + 9.999946e-01, 9.999957e-01, 9.999951e-01, & ! + 1.000000e+00, 1.000000e+00, 9.999983e-01, 9.999979e-01, 9.999965e-01, & ! 12 + 9.999949e-01, 9.999948e-01, 9.999918e-01, 9.999917e-01, 9.999923e-01, & ! + 9.999908e-01, 9.999889e-01, 9.999902e-01, 9.999895e-01, 9.999881e-01, & ! + 9.999882e-01, 9.999876e-01, 9.999866e-01, 9.999866e-01, 9.999858e-01, & ! + 9.999860e-01, 9.999852e-01, 9.999836e-01, 9.999831e-01, 9.999818e-01, & ! + 9.999808e-01, 9.999816e-01, 9.999800e-01, 9.999783e-01, 9.999780e-01, & ! + 9.999763e-01, 9.999746e-01, 9.999731e-01, 9.999713e-01, 9.999762e-01, & ! + 9.999740e-01, 9.999670e-01, 9.999703e-01, 9.999687e-01, 9.999666e-01, & ! + 9.999683e-01, 9.999667e-01, 9.999611e-01, 9.999635e-01, 9.999600e-01, & ! + 9.999635e-01, 9.999594e-01, 9.999601e-01, 9.999586e-01, 9.999559e-01, & ! + 9.999569e-01, 9.999558e-01, 9.999523e-01, 9.999535e-01, 9.999529e-01, & ! + 9.999553e-01, 9.999495e-01, 9.999490e-01, & ! + 9.999920e-01, 9.999873e-01, 9.999855e-01, 9.999832e-01, 9.999807e-01, & ! 13 + 9.999778e-01, 9.999754e-01, 9.999721e-01, 9.999692e-01, 9.999651e-01, & ! + 9.999621e-01, 9.999607e-01, 9.999567e-01, 9.999546e-01, 9.999521e-01, & ! + 9.999491e-01, 9.999457e-01, 9.999439e-01, 9.999403e-01, 9.999374e-01, & ! + 9.999353e-01, 9.999315e-01, 9.999282e-01, 9.999244e-01, 9.999234e-01, & ! + 9.999189e-01, 9.999130e-01, 9.999117e-01, 9.999073e-01, 9.999020e-01, & ! + 9.998993e-01, 9.998987e-01, 9.998922e-01, 9.998893e-01, 9.998869e-01, & ! + 9.998805e-01, 9.998778e-01, 9.998751e-01, 9.998708e-01, 9.998676e-01, & ! + 9.998624e-01, 9.998642e-01, 9.998582e-01, 9.998547e-01, 9.998546e-01, & ! + 9.998477e-01, 9.998487e-01, 9.998466e-01, 9.998403e-01, 9.998412e-01, & ! + 9.998406e-01, 9.998342e-01, 9.998326e-01, 9.998333e-01, 9.998328e-01, & ! + 9.998290e-01, 9.998276e-01, 9.998249e-01, & ! + 8.383753e-01, 8.461471e-01, 8.373325e-01, 8.212889e-01, 8.023834e-01, & ! 14 + 7.829501e-01, 7.641777e-01, 7.466000e-01, 7.304023e-01, 7.155998e-01, & ! + 7.021259e-01, 6.898840e-01, 6.787615e-01, 6.686479e-01, 6.594414e-01, & ! + 6.510417e-01, 6.433668e-01, 6.363335e-01, 6.298788e-01, 6.239398e-01, & ! + 6.184633e-01, 6.134055e-01, 6.087228e-01, 6.043786e-01, 6.003439e-01, & ! + 5.965910e-01, 5.930917e-01, 5.898280e-01, 5.867798e-01, 5.839264e-01, & ! + 5.812576e-01, 5.787592e-01, 5.764163e-01, 5.742189e-01, 5.721598e-01, & ! + 5.702286e-01, 5.684182e-01, 5.667176e-01, 5.651237e-01, 5.636253e-01, & ! + 5.622228e-01, 5.609074e-01, 5.596713e-01, 5.585089e-01, 5.574223e-01, & ! + 5.564002e-01, 5.554411e-01, 5.545397e-01, 5.536914e-01, 5.528967e-01, & ! + 5.521495e-01, 5.514457e-01, 5.507818e-01, 5.501623e-01, 5.495750e-01, & ! + 5.490192e-01, 5.484980e-01, 5.480046e-01/), & ! + shape = (/58,nBandsSW_RRTMG/)) + + real(kind_phys),dimension(58,nBandsSW_RRTMG),parameter :: & ! + asyliq1 = reshape(source= (/ & ! + 8.133297e-01, 8.133528e-01, 8.173865e-01, 8.243205e-01, 8.333063e-01, & ! 1 + 8.436317e-01, 8.546611e-01, 8.657934e-01, 8.764345e-01, 8.859837e-01, & ! + 8.627394e-01, 8.824569e-01, 8.976887e-01, 9.089541e-01, 9.167699e-01, & ! + 9.216517e-01, 9.241147e-01, 9.246743e-01, 9.238469e-01, 9.221504e-01, & ! + 9.201045e-01, 9.182299e-01, 9.170491e-01, 9.170862e-01, 9.188653e-01, & ! + 9.229111e-01, 9.297468e-01, 9.398950e-01, 9.203269e-01, 9.260693e-01, & ! + 9.309373e-01, 9.349918e-01, 9.382935e-01, 9.409030e-01, 9.428809e-01, & ! + 9.442881e-01, 9.451851e-01, 9.456331e-01, 9.456926e-01, 9.454247e-01, & ! + 9.448902e-01, 9.441503e-01, 9.432661e-01, 9.422987e-01, 9.413094e-01, & ! + 9.403594e-01, 9.395102e-01, 9.388230e-01, 9.383594e-01, 9.381810e-01, & ! + 9.383489e-01, 9.389251e-01, 9.399707e-01, 9.415475e-01, 9.437167e-01, & ! + 9.465399e-01, 9.500786e-01, 9.5439e-01, & ! + 8.794448e-01, 8.819306e-01, 8.837667e-01, 8.853832e-01, 8.871010e-01, & ! 2 + 8.892675e-01, 8.922584e-01, 8.964666e-01, 9.022940e-01, 9.101456e-01, & ! + 8.839999e-01, 9.035610e-01, 9.184568e-01, 9.292315e-01, 9.364282e-01, & ! + 9.405887e-01, 9.422554e-01, 9.419703e-01, 9.402759e-01, 9.377159e-01, & ! + 9.348345e-01, 9.321769e-01, 9.302888e-01, 9.297166e-01, 9.310075e-01, & ! + 9.347080e-01, 9.413643e-01, 9.515216e-01, 9.306286e-01, 9.361781e-01, & ! + 9.408374e-01, 9.446692e-01, 9.477363e-01, 9.501013e-01, 9.518268e-01, & ! + 9.529756e-01, 9.536105e-01, 9.537938e-01, 9.535886e-01, 9.530574e-01, & ! + 9.522633e-01, 9.512688e-01, 9.501370e-01, 9.489306e-01, 9.477126e-01, & ! + 9.465459e-01, 9.454934e-01, 9.446183e-01, 9.439833e-01, 9.436519e-01, & ! + 9.436866e-01, 9.441508e-01, 9.451073e-01, 9.466195e-01, 9.487501e-01, & ! + 9.515621e-01, 9.551185e-01, 9.5948e-01, & ! + 8.478817e-01, 8.269312e-01, 8.161352e-01, 8.135960e-01, 8.173586e-01, & ! 3 + 8.254167e-01, 8.357072e-01, 8.461167e-01, 8.544952e-01, 8.586776e-01, & ! + 8.335562e-01, 8.524273e-01, 8.669052e-01, 8.775014e-01, 8.847277e-01, & ! + 8.890958e-01, 8.911173e-01, 8.913038e-01, 8.901669e-01, 8.882182e-01, & ! + 8.859692e-01, 8.839315e-01, 8.826164e-01, 8.825356e-01, 8.842004e-01, & ! + 8.881223e-01, 8.948131e-01, 9.047837e-01, 8.855951e-01, 8.911796e-01, & ! + 8.959229e-01, 8.998837e-01, 9.031209e-01, 9.056939e-01, 9.076609e-01, & ! + 9.090812e-01, 9.100134e-01, 9.105167e-01, 9.106496e-01, 9.104712e-01, & ! + 9.100404e-01, 9.094159e-01, 9.086568e-01, 9.078218e-01, 9.069697e-01, & ! + 9.061595e-01, 9.054499e-01, 9.048999e-01, 9.045683e-01, 9.045142e-01, & ! + 9.047962e-01, 9.054730e-01, 9.066037e-01, 9.082472e-01, 9.104623e-01, & ! + 9.133079e-01, 9.168427e-01, 9.2113e-01, & ! + 8.216697e-01, 7.982871e-01, 7.891147e-01, 7.909083e-01, 8.003833e-01, & ! 4 + 8.142516e-01, 8.292290e-01, 8.420356e-01, 8.493945e-01, 8.480316e-01, & ! + 8.212381e-01, 8.394984e-01, 8.534095e-01, 8.634813e-01, 8.702242e-01, & ! + 8.741483e-01, 8.757638e-01, 8.755808e-01, 8.741095e-01, 8.718604e-01, & ! + 8.693433e-01, 8.670686e-01, 8.655464e-01, 8.652872e-01, 8.668006e-01, & ! + 8.705973e-01, 8.771874e-01, 8.870809e-01, 8.678284e-01, 8.732315e-01, & ! + 8.778084e-01, 8.816166e-01, 8.847146e-01, 8.871603e-01, 8.890116e-01, & ! + 8.903266e-01, 8.911632e-01, 8.915796e-01, 8.916337e-01, 8.913834e-01, & ! + 8.908869e-01, 8.902022e-01, 8.893873e-01, 8.885001e-01, 8.875986e-01, & ! + 8.867411e-01, 8.859852e-01, 8.853891e-01, 8.850111e-01, 8.849089e-01, & ! + 8.851405e-01, 8.857639e-01, 8.868372e-01, 8.884185e-01, 8.905656e-01, & ! + 8.933368e-01, 8.967899e-01, 9.0098e-01, & ! + 8.063610e-01, 7.938147e-01, 7.921304e-01, 7.985092e-01, 8.101339e-01, & ! 5 + 8.242175e-01, 8.379913e-01, 8.486920e-01, 8.535547e-01, 8.498083e-01, & ! + 8.224849e-01, 8.405509e-01, 8.542436e-01, 8.640770e-01, 8.705653e-01, & ! + 8.742227e-01, 8.755630e-01, 8.751004e-01, 8.733491e-01, 8.708231e-01, & ! + 8.680365e-01, 8.655035e-01, 8.637381e-01, 8.632544e-01, 8.645665e-01, & ! + 8.681885e-01, 8.746346e-01, 8.844188e-01, 8.648180e-01, 8.700563e-01, & ! + 8.744672e-01, 8.781087e-01, 8.810393e-01, 8.833174e-01, 8.850011e-01, & ! + 8.861485e-01, 8.868183e-01, 8.870687e-01, 8.869579e-01, 8.865441e-01, & ! + 8.858857e-01, 8.850412e-01, 8.840686e-01, 8.830263e-01, 8.819726e-01, & ! + 8.809658e-01, 8.800642e-01, 8.793260e-01, 8.788099e-01, 8.785737e-01, & ! + 8.786758e-01, 8.791746e-01, 8.801283e-01, 8.815955e-01, 8.836340e-01, & ! + 8.863024e-01, 8.896592e-01, 8.9376e-01, & ! + 7.885899e-01, 7.937172e-01, 8.020658e-01, 8.123971e-01, 8.235502e-01, & ! 6 + 8.343776e-01, 8.437336e-01, 8.504711e-01, 8.534421e-01, 8.514978e-01, & ! + 8.238888e-01, 8.417463e-01, 8.552057e-01, 8.647853e-01, 8.710038e-01, & ! + 8.743798e-01, 8.754319e-01, 8.746786e-01, 8.726386e-01, 8.698303e-01, & ! + 8.667724e-01, 8.639836e-01, 8.619823e-01, 8.612870e-01, 8.624165e-01, & ! + 8.658893e-01, 8.722241e-01, 8.819394e-01, 8.620216e-01, 8.671239e-01, & ! + 8.713983e-01, 8.749032e-01, 8.776970e-01, 8.798385e-01, 8.813860e-01, & ! + 8.823980e-01, 8.829332e-01, 8.830500e-01, 8.828068e-01, 8.822623e-01, & ! + 8.814750e-01, 8.805031e-01, 8.794056e-01, 8.782407e-01, 8.770672e-01, & ! + 8.759432e-01, 8.749275e-01, 8.740784e-01, 8.734547e-01, 8.731146e-01, & ! + 8.731170e-01, 8.735199e-01, 8.743823e-01, 8.757625e-01, 8.777191e-01, & ! + 8.803105e-01, 8.835953e-01, 8.8763e-01, & ! + 7.811516e-01, 7.962229e-01, 8.096199e-01, 8.212996e-01, 8.312212e-01, & ! 7 + 8.393430e-01, 8.456236e-01, 8.500214e-01, 8.524950e-01, 8.530031e-01, & ! + 8.251485e-01, 8.429043e-01, 8.562461e-01, 8.656954e-01, 8.717737e-01, & ! + 8.750020e-01, 8.759022e-01, 8.749953e-01, 8.728027e-01, 8.698461e-01, & ! + 8.666466e-01, 8.637257e-01, 8.616047e-01, 8.608051e-01, 8.618483e-01, & ! + 8.652557e-01, 8.715487e-01, 8.812485e-01, 8.611645e-01, 8.662052e-01, & ! + 8.704173e-01, 8.738594e-01, 8.765901e-01, 8.786678e-01, 8.801517e-01, & ! + 8.810999e-01, 8.815713e-01, 8.816246e-01, 8.813185e-01, 8.807114e-01, & ! + 8.798621e-01, 8.788290e-01, 8.776713e-01, 8.764470e-01, 8.752152e-01, & ! + 8.740343e-01, 8.729631e-01, 8.720602e-01, 8.713842e-01, 8.709936e-01, & ! + 8.709475e-01, 8.713041e-01, 8.721221e-01, 8.734602e-01, 8.753774e-01, & ! + 8.779319e-01, 8.811825e-01, 8.8519e-01, & ! + 7.865744e-01, 8.093340e-01, 8.257596e-01, 8.369940e-01, 8.441574e-01, & ! 8 + 8.483602e-01, 8.507096e-01, 8.523139e-01, 8.542834e-01, 8.577321e-01, & ! + 8.288960e-01, 8.465308e-01, 8.597175e-01, 8.689830e-01, 8.748542e-01, & ! + 8.778584e-01, 8.785222e-01, 8.773728e-01, 8.749370e-01, 8.717419e-01, & ! + 8.683145e-01, 8.651816e-01, 8.628704e-01, 8.619077e-01, 8.628205e-01, & ! + 8.661356e-01, 8.723803e-01, 8.820815e-01, 8.616715e-01, 8.666389e-01, & ! + 8.707753e-01, 8.741398e-01, 8.767912e-01, 8.787885e-01, 8.801908e-01, & ! + 8.810570e-01, 8.814460e-01, 8.814167e-01, 8.810283e-01, 8.803395e-01, & ! + 8.794095e-01, 8.782971e-01, 8.770613e-01, 8.757610e-01, 8.744553e-01, & ! + 8.732031e-01, 8.720634e-01, 8.710951e-01, 8.703572e-01, 8.699086e-01, & ! + 8.698084e-01, 8.701155e-01, 8.708887e-01, 8.721872e-01, 8.740698e-01, & ! + 8.765957e-01, 8.798235e-01, 8.8381e-01, & ! + 8.069513e-01, 8.262939e-01, 8.398241e-01, 8.486352e-01, 8.538213e-01, & ! 9 + 8.564743e-01, 8.576854e-01, 8.585455e-01, 8.601452e-01, 8.635755e-01, & ! + 8.337383e-01, 8.512655e-01, 8.643049e-01, 8.733896e-01, 8.790535e-01, & ! + 8.818295e-01, 8.822518e-01, 8.808533e-01, 8.781676e-01, 8.747284e-01, & ! + 8.710690e-01, 8.677229e-01, 8.652236e-01, 8.641047e-01, 8.648993e-01, & ! + 8.681413e-01, 8.743640e-01, 8.841007e-01, 8.633558e-01, 8.682719e-01, & ! + 8.723543e-01, 8.756621e-01, 8.782547e-01, 8.801915e-01, 8.815318e-01, & ! + 8.823347e-01, 8.826598e-01, 8.825663e-01, 8.821135e-01, 8.813608e-01, & ! + 8.803674e-01, 8.791928e-01, 8.778960e-01, 8.765366e-01, 8.751738e-01, & ! + 8.738670e-01, 8.726755e-01, 8.716585e-01, 8.708755e-01, 8.703856e-01, & ! + 8.702483e-01, 8.705229e-01, 8.712687e-01, 8.725448e-01, 8.744109e-01, & ! + 8.769260e-01, 8.801496e-01, 8.8414e-01, & ! + 8.252182e-01, 8.379244e-01, 8.471709e-01, 8.535760e-01, 8.577540e-01, & ! 10 + 8.603183e-01, 8.618820e-01, 8.630578e-01, 8.644587e-01, 8.666970e-01, & ! + 8.362159e-01, 8.536817e-01, 8.666387e-01, 8.756240e-01, 8.811746e-01, & ! + 8.838273e-01, 8.841191e-01, 8.825871e-01, 8.797681e-01, 8.761992e-01, & ! + 8.724174e-01, 8.689593e-01, 8.663623e-01, 8.651632e-01, 8.658988e-01, & ! + 8.691064e-01, 8.753226e-01, 8.850847e-01, 8.641620e-01, 8.690500e-01, & ! + 8.731026e-01, 8.763795e-01, 8.789400e-01, 8.808438e-01, 8.821503e-01, & ! + 8.829191e-01, 8.832095e-01, 8.830813e-01, 8.825938e-01, 8.818064e-01, & ! + 8.807787e-01, 8.795704e-01, 8.782408e-01, 8.768493e-01, 8.754557e-01, & ! + 8.741193e-01, 8.728995e-01, 8.718561e-01, 8.710484e-01, 8.705360e-01, & ! + 8.703782e-01, 8.706347e-01, 8.713650e-01, 8.726285e-01, 8.744849e-01, & ! + 8.769933e-01, 8.802136e-01, 8.8421e-01, & ! + 8.370583e-01, 8.467920e-01, 8.537769e-01, 8.585136e-01, 8.615034e-01, & ! 11 + 8.632474e-01, 8.642468e-01, 8.650026e-01, 8.660161e-01, 8.677882e-01, & ! + 8.369760e-01, 8.543821e-01, 8.672699e-01, 8.761782e-01, 8.816454e-01, & ! + 8.842103e-01, 8.844114e-01, 8.827872e-01, 8.798766e-01, 8.762179e-01, & ! + 8.723500e-01, 8.688112e-01, 8.661403e-01, 8.648758e-01, 8.655563e-01, & ! + 8.687206e-01, 8.749072e-01, 8.846546e-01, 8.636289e-01, 8.684849e-01, & ! + 8.725054e-01, 8.757501e-01, 8.782785e-01, 8.801503e-01, 8.814249e-01, & ! + 8.821620e-01, 8.824211e-01, 8.822620e-01, 8.817440e-01, 8.809268e-01, & ! + 8.798699e-01, 8.786330e-01, 8.772756e-01, 8.758572e-01, 8.744374e-01, & ! + 8.730760e-01, 8.718323e-01, 8.707660e-01, 8.699366e-01, 8.694039e-01, & ! + 8.692271e-01, 8.694661e-01, 8.701803e-01, 8.714293e-01, 8.732727e-01, & ! + 8.757702e-01, 8.789811e-01, 8.8297e-01, & ! + 8.430819e-01, 8.510060e-01, 8.567270e-01, 8.606533e-01, 8.631934e-01, & ! 12 + 8.647554e-01, 8.657471e-01, 8.665760e-01, 8.676496e-01, 8.693754e-01, & ! + 8.384298e-01, 8.557913e-01, 8.686214e-01, 8.774605e-01, 8.828495e-01, & ! + 8.853287e-01, 8.854393e-01, 8.837215e-01, 8.807161e-01, 8.769639e-01, & ! + 8.730053e-01, 8.693812e-01, 8.666321e-01, 8.652988e-01, 8.659219e-01, & ! + 8.690419e-01, 8.751999e-01, 8.849360e-01, 8.638013e-01, 8.686371e-01, & ! + 8.726369e-01, 8.758605e-01, 8.783674e-01, 8.802176e-01, 8.814705e-01, & ! + 8.821859e-01, 8.824234e-01, 8.822429e-01, 8.817038e-01, 8.808658e-01, & ! + 8.797887e-01, 8.785323e-01, 8.771560e-01, 8.757196e-01, 8.742828e-01, & ! + 8.729052e-01, 8.716467e-01, 8.705666e-01, 8.697250e-01, 8.691812e-01, & ! + 8.689950e-01, 8.692264e-01, 8.699346e-01, 8.711795e-01, 8.730209e-01, & ! + 8.755181e-01, 8.787312e-01, 8.8272e-01, & ! + 8.452284e-01, 8.522700e-01, 8.572973e-01, 8.607031e-01, 8.628802e-01, & ! 13 + 8.642215e-01, 8.651198e-01, 8.659679e-01, 8.671588e-01, 8.690853e-01, & ! + 8.383803e-01, 8.557485e-01, 8.685851e-01, 8.774303e-01, 8.828245e-01, & ! + 8.853077e-01, 8.854207e-01, 8.837034e-01, 8.806962e-01, 8.769398e-01, & ! + 8.729740e-01, 8.693393e-01, 8.665761e-01, 8.652247e-01, 8.658253e-01, & ! + 8.689182e-01, 8.750438e-01, 8.847424e-01, 8.636140e-01, 8.684449e-01, & ! + 8.724400e-01, 8.756589e-01, 8.781613e-01, 8.800072e-01, 8.812559e-01, & ! + 8.819671e-01, 8.822007e-01, 8.820165e-01, 8.814737e-01, 8.806322e-01, & ! + 8.795518e-01, 8.782923e-01, 8.769129e-01, 8.754737e-01, 8.740342e-01, & ! + 8.726542e-01, 8.713934e-01, 8.703111e-01, 8.694677e-01, 8.689222e-01, & ! + 8.687344e-01, 8.689646e-01, 8.696715e-01, 8.709156e-01, 8.727563e-01, & ! + 8.752531e-01, 8.784659e-01, 8.8245e-01, & ! + 7.800869e-01, 8.091120e-01, 8.325369e-01, 8.466266e-01, 8.515495e-01, & ! 14 + 8.499371e-01, 8.456203e-01, 8.430521e-01, 8.470286e-01, 8.625431e-01, & ! + 8.402261e-01, 8.610822e-01, 8.776608e-01, 8.904485e-01, 8.999294e-01, & ! + 9.065860e-01, 9.108995e-01, 9.133503e-01, 9.144187e-01, 9.145855e-01, & ! + 9.143320e-01, 9.141402e-01, 9.144933e-01, 9.158754e-01, 9.187716e-01, & ! + 9.236677e-01, 9.310503e-01, 9.414058e-01, 9.239108e-01, 9.300719e-01, & ! + 9.353612e-01, 9.398378e-01, 9.435609e-01, 9.465895e-01, 9.489829e-01, & ! + 9.508000e-01, 9.521002e-01, 9.529424e-01, 9.533860e-01, 9.534902e-01, & ! + 9.533143e-01, 9.529177e-01, 9.523596e-01, 9.516997e-01, 9.509973e-01, & ! + 9.503121e-01, 9.497037e-01, 9.492317e-01, 9.489558e-01, 9.489356e-01, & ! + 9.492311e-01, 9.499019e-01, 9.510077e-01, 9.526084e-01, 9.547636e-01, & ! + 9.575331e-01, 9.609766e-01, 9.6515e-01 /), & ! + shape = (/58,nBandsSW_RRTMG/)) + + real(kind_phys),dimension(58,nBandsSW_RRTMG),parameter :: & ! + asyliq2 = reshape(source= (/ & ! + 8.038165e-01, 8.014154e-01, 7.942381e-01, 7.970521e-01, 8.086621e-01, & ! 1 + 8.233392e-01, 8.374127e-01, 8.495742e-01, 8.596945e-01, 8.680497e-01, & ! + 8.750005e-01, 8.808589e-01, 8.858749e-01, 8.902403e-01, 8.940939e-01, & ! + 8.975379e-01, 9.006450e-01, 9.034741e-01, 9.060659e-01, 9.084561e-01, & ! + 9.106675e-01, 9.127198e-01, 9.146332e-01, 9.164194e-01, 9.180970e-01, & ! + 9.196658e-01, 9.211421e-01, 9.225352e-01, 9.238443e-01, 9.250841e-01, & ! + 9.262541e-01, 9.273620e-01, 9.284081e-01, 9.294002e-01, 9.303395e-01, & ! + 9.312285e-01, 9.320715e-01, 9.328716e-01, 9.336271e-01, 9.343427e-01, & ! + 9.350219e-01, 9.356647e-01, 9.362728e-01, 9.368495e-01, 9.373956e-01, & ! + 9.379113e-01, 9.383987e-01, 9.388608e-01, 9.392986e-01, 9.397132e-01, & ! + 9.401063e-01, 9.404776e-01, 9.408299e-01, 9.411641e-01, 9.414800e-01, & ! + 9.417787e-01, 9.420633e-01, 9.423364e-01, & ! + 8.941000e-01, 9.054049e-01, 9.049510e-01, 9.027216e-01, 9.021636e-01, & ! 2 + 9.037878e-01, 9.069852e-01, 9.109817e-01, 9.152013e-01, 9.193040e-01, & ! + 9.231177e-01, 9.265712e-01, 9.296606e-01, 9.324048e-01, 9.348419e-01, & ! + 9.370131e-01, 9.389529e-01, 9.406954e-01, 9.422727e-01, 9.437088e-01, & ! + 9.450221e-01, 9.462308e-01, 9.473488e-01, 9.483830e-01, 9.493492e-01, & ! + 9.502541e-01, 9.510999e-01, 9.518971e-01, 9.526455e-01, 9.533554e-01, & ! + 9.540249e-01, 9.546571e-01, 9.552551e-01, 9.558258e-01, 9.563603e-01, & ! + 9.568713e-01, 9.573569e-01, 9.578141e-01, 9.582485e-01, 9.586604e-01, & ! + 9.590525e-01, 9.594218e-01, 9.597710e-01, 9.601052e-01, 9.604181e-01, & ! + 9.607159e-01, 9.609979e-01, 9.612655e-01, 9.615184e-01, 9.617564e-01, & ! + 9.619860e-01, 9.622009e-01, 9.624031e-01, 9.625957e-01, 9.627792e-01, & ! + 9.629530e-01, 9.631171e-01, 9.632746e-01, & ! + 8.574638e-01, 8.351383e-01, 8.142977e-01, 8.083068e-01, 8.129284e-01, & ! 3 + 8.215827e-01, 8.307238e-01, 8.389963e-01, 8.460481e-01, 8.519273e-01, & ! + 8.568153e-01, 8.609116e-01, 8.643892e-01, 8.673941e-01, 8.700248e-01, & ! + 8.723707e-01, 8.744902e-01, 8.764240e-01, 8.782057e-01, 8.798593e-01, & ! + 8.814063e-01, 8.828573e-01, 8.842261e-01, 8.855196e-01, 8.867497e-01, & ! + 8.879164e-01, 8.890316e-01, 8.900941e-01, 8.911118e-01, 8.920832e-01, & ! + 8.930156e-01, 8.939091e-01, 8.947663e-01, 8.955888e-01, 8.963786e-01, & ! + 8.971350e-01, 8.978617e-01, 8.985590e-01, 8.992243e-01, 8.998631e-01, & ! + 9.004753e-01, 9.010602e-01, 9.016192e-01, 9.021542e-01, 9.026644e-01, & ! + 9.031535e-01, 9.036194e-01, 9.040656e-01, 9.044894e-01, 9.048933e-01, & ! + 9.052789e-01, 9.056481e-01, 9.060004e-01, 9.063343e-01, 9.066544e-01, & ! + 9.069604e-01, 9.072512e-01, 9.075290e-01, & ! + 8.349569e-01, 8.034579e-01, 7.932136e-01, 8.010156e-01, 8.137083e-01, & ! 4 + 8.255339e-01, 8.351938e-01, 8.428286e-01, 8.488944e-01, 8.538187e-01, & ! + 8.579255e-01, 8.614473e-01, 8.645338e-01, 8.672908e-01, 8.697947e-01, & ! + 8.720843e-01, 8.742015e-01, 8.761718e-01, 8.780160e-01, 8.797479e-01, & ! + 8.813810e-01, 8.829250e-01, 8.843907e-01, 8.857822e-01, 8.871059e-01, & ! + 8.883724e-01, 8.895810e-01, 8.907384e-01, 8.918456e-01, 8.929083e-01, & ! + 8.939284e-01, 8.949060e-01, 8.958463e-01, 8.967486e-01, 8.976129e-01, & ! + 8.984463e-01, 8.992439e-01, 9.000094e-01, 9.007438e-01, 9.014496e-01, & ! + 9.021235e-01, 9.027699e-01, 9.033859e-01, 9.039772e-01, 9.045419e-01, & ! + 9.050819e-01, 9.055975e-01, 9.060907e-01, 9.065607e-01, 9.070093e-01, & ! + 9.074389e-01, 9.078475e-01, 9.082388e-01, 9.086117e-01, 9.089678e-01, & ! + 9.093081e-01, 9.096307e-01, 9.099410e-01, & ! + 8.109692e-01, 7.846657e-01, 7.881928e-01, 8.009509e-01, 8.131208e-01, & ! 5 + 8.230400e-01, 8.309448e-01, 8.372920e-01, 8.424837e-01, 8.468166e-01, & ! + 8.504947e-01, 8.536642e-01, 8.564256e-01, 8.588513e-01, 8.610011e-01, & ! + 8.629122e-01, 8.646262e-01, 8.661720e-01, 8.675752e-01, 8.688582e-01, & ! + 8.700379e-01, 8.711300e-01, 8.721485e-01, 8.731027e-01, 8.740010e-01, & ! + 8.748499e-01, 8.756564e-01, 8.764239e-01, 8.771542e-01, 8.778523e-01, & ! + 8.785211e-01, 8.791601e-01, 8.797725e-01, 8.803589e-01, 8.809173e-01, & ! + 8.814552e-01, 8.819705e-01, 8.824611e-01, 8.829311e-01, 8.833791e-01, & ! + 8.838078e-01, 8.842148e-01, 8.846044e-01, 8.849756e-01, 8.853291e-01, & ! + 8.856645e-01, 8.859841e-01, 8.862904e-01, 8.865801e-01, 8.868551e-01, & ! + 8.871182e-01, 8.873673e-01, 8.876059e-01, 8.878307e-01, 8.880462e-01, & ! + 8.882501e-01, 8.884453e-01, 8.886339e-01, & ! + 7.838510e-01, 7.803151e-01, 7.980477e-01, 8.144160e-01, 8.261784e-01, & ! 6 + 8.344240e-01, 8.404278e-01, 8.450391e-01, 8.487593e-01, 8.518741e-01, & ! + 8.545484e-01, 8.568890e-01, 8.589560e-01, 8.607983e-01, 8.624504e-01, & ! + 8.639408e-01, 8.652945e-01, 8.665301e-01, 8.676634e-01, 8.687121e-01, & ! + 8.696855e-01, 8.705933e-01, 8.714448e-01, 8.722454e-01, 8.730014e-01, & ! + 8.737180e-01, 8.743982e-01, 8.750436e-01, 8.756598e-01, 8.762481e-01, & ! + 8.768089e-01, 8.773427e-01, 8.778532e-01, 8.783434e-01, 8.788089e-01, & ! + 8.792530e-01, 8.796784e-01, 8.800845e-01, 8.804716e-01, 8.808411e-01, & ! + 8.811923e-01, 8.815276e-01, 8.818472e-01, 8.821504e-01, 8.824408e-01, & ! + 8.827155e-01, 8.829777e-01, 8.832269e-01, 8.834631e-01, 8.836892e-01, & ! + 8.839034e-01, 8.841075e-01, 8.843021e-01, 8.844866e-01, 8.846631e-01, & ! + 8.848304e-01, 8.849910e-01, 8.851425e-01, & ! + 7.760783e-01, 7.890215e-01, 8.090192e-01, 8.230252e-01, 8.321369e-01, & ! 7 + 8.384258e-01, 8.431529e-01, 8.469558e-01, 8.501499e-01, 8.528899e-01, & ! + 8.552899e-01, 8.573956e-01, 8.592570e-01, 8.609098e-01, 8.623897e-01, & ! + 8.637169e-01, 8.649184e-01, 8.660097e-01, 8.670096e-01, 8.679338e-01, & ! + 8.687896e-01, 8.695880e-01, 8.703365e-01, 8.710422e-01, 8.717092e-01, & ! + 8.723378e-01, 8.729363e-01, 8.735063e-01, 8.740475e-01, 8.745661e-01, & ! + 8.750560e-01, 8.755275e-01, 8.759731e-01, 8.764000e-01, 8.768071e-01, & ! + 8.771942e-01, 8.775628e-01, 8.779126e-01, 8.782483e-01, 8.785626e-01, & ! + 8.788610e-01, 8.791482e-01, 8.794180e-01, 8.796765e-01, 8.799207e-01, & ! + 8.801522e-01, 8.803707e-01, 8.805777e-01, 8.807749e-01, 8.809605e-01, & ! + 8.811362e-01, 8.813047e-01, 8.814647e-01, 8.816131e-01, 8.817588e-01, & ! + 8.818930e-01, 8.820230e-01, 8.821445e-01, & ! + 7.847907e-01, 8.099917e-01, 8.257428e-01, 8.350423e-01, 8.411971e-01, & ! 8 + 8.457241e-01, 8.493010e-01, 8.522565e-01, 8.547660e-01, 8.569311e-01, & ! + 8.588181e-01, 8.604729e-01, 8.619296e-01, 8.632208e-01, 8.643725e-01, & ! + 8.654050e-01, 8.663363e-01, 8.671835e-01, 8.679590e-01, 8.686707e-01, & ! + 8.693308e-01, 8.699433e-01, 8.705147e-01, 8.710490e-01, 8.715497e-01, & ! + 8.720219e-01, 8.724669e-01, 8.728849e-01, 8.732806e-01, 8.736550e-01, & ! + 8.740099e-01, 8.743435e-01, 8.746601e-01, 8.749610e-01, 8.752449e-01, & ! + 8.755143e-01, 8.757688e-01, 8.760095e-01, 8.762375e-01, 8.764532e-01, & ! + 8.766579e-01, 8.768506e-01, 8.770323e-01, 8.772049e-01, 8.773690e-01, & ! + 8.775226e-01, 8.776679e-01, 8.778062e-01, 8.779360e-01, 8.780587e-01, & ! + 8.781747e-01, 8.782852e-01, 8.783892e-01, 8.784891e-01, 8.785824e-01, & ! + 8.786705e-01, 8.787546e-01, 8.788336e-01, & ! + 8.054324e-01, 8.266282e-01, 8.378075e-01, 8.449848e-01, 8.502166e-01, & ! 9 + 8.542268e-01, 8.573477e-01, 8.598022e-01, 8.617689e-01, 8.633859e-01, & ! + 8.647536e-01, 8.659354e-01, 8.669807e-01, 8.679143e-01, 8.687577e-01, & ! + 8.695222e-01, 8.702207e-01, 8.708591e-01, 8.714446e-01, 8.719836e-01, & ! + 8.724812e-01, 8.729426e-01, 8.733689e-01, 8.737665e-01, 8.741373e-01, & ! + 8.744834e-01, 8.748070e-01, 8.751131e-01, 8.754011e-01, 8.756676e-01, & ! + 8.759219e-01, 8.761599e-01, 8.763857e-01, 8.765984e-01, 8.767999e-01, & ! + 8.769889e-01, 8.771669e-01, 8.773373e-01, 8.774969e-01, 8.776469e-01, & ! + 8.777894e-01, 8.779237e-01, 8.780505e-01, 8.781703e-01, 8.782820e-01, & ! + 8.783886e-01, 8.784894e-01, 8.785844e-01, 8.786736e-01, 8.787584e-01, & ! + 8.788379e-01, 8.789130e-01, 8.789849e-01, 8.790506e-01, 8.791141e-01, & ! + 8.791750e-01, 8.792324e-01, 8.792867e-01, & ! + 8.249534e-01, 8.391988e-01, 8.474107e-01, 8.526860e-01, 8.563983e-01, & ! 10 + 8.592389e-01, 8.615144e-01, 8.633790e-01, 8.649325e-01, 8.662504e-01, & ! + 8.673841e-01, 8.683741e-01, 8.692495e-01, 8.700309e-01, 8.707328e-01, & ! + 8.713650e-01, 8.719432e-01, 8.724676e-01, 8.729498e-01, 8.733922e-01, & ! + 8.737981e-01, 8.741745e-01, 8.745225e-01, 8.748467e-01, 8.751512e-01, & ! + 8.754315e-01, 8.756962e-01, 8.759450e-01, 8.761774e-01, 8.763945e-01, & ! + 8.766021e-01, 8.767970e-01, 8.769803e-01, 8.771511e-01, 8.773151e-01, & ! + 8.774689e-01, 8.776147e-01, 8.777533e-01, 8.778831e-01, 8.780050e-01, & ! + 8.781197e-01, 8.782301e-01, 8.783323e-01, 8.784312e-01, 8.785222e-01, & ! + 8.786096e-01, 8.786916e-01, 8.787688e-01, 8.788411e-01, 8.789122e-01, & ! + 8.789762e-01, 8.790373e-01, 8.790954e-01, 8.791514e-01, 8.792018e-01, & ! + 8.792517e-01, 8.792990e-01, 8.793429e-01, & ! + 8.323091e-01, 8.429776e-01, 8.498123e-01, 8.546929e-01, 8.584295e-01, & ! 11 + 8.613489e-01, 8.636324e-01, 8.654303e-01, 8.668675e-01, 8.680404e-01, & ! + 8.690174e-01, 8.698495e-01, 8.705666e-01, 8.711961e-01, 8.717556e-01, & ! + 8.722546e-01, 8.727063e-01, 8.731170e-01, 8.734933e-01, 8.738382e-01, & ! + 8.741590e-01, 8.744525e-01, 8.747295e-01, 8.749843e-01, 8.752210e-01, & ! + 8.754437e-01, 8.756524e-01, 8.758472e-01, 8.760288e-01, 8.762030e-01, & ! + 8.763603e-01, 8.765122e-01, 8.766539e-01, 8.767894e-01, 8.769130e-01, & ! + 8.770310e-01, 8.771422e-01, 8.772437e-01, 8.773419e-01, 8.774355e-01, & ! + 8.775221e-01, 8.776047e-01, 8.776802e-01, 8.777539e-01, 8.778216e-01, & ! + 8.778859e-01, 8.779473e-01, 8.780031e-01, 8.780562e-01, 8.781097e-01, & ! + 8.781570e-01, 8.782021e-01, 8.782463e-01, 8.782845e-01, 8.783235e-01, & ! + 8.783610e-01, 8.783953e-01, 8.784273e-01, & ! + 8.396448e-01, 8.480172e-01, 8.535934e-01, 8.574145e-01, 8.600835e-01, & ! 12 + 8.620347e-01, 8.635500e-01, 8.648003e-01, 8.658758e-01, 8.668248e-01, & ! + 8.676697e-01, 8.684220e-01, 8.690893e-01, 8.696807e-01, 8.702046e-01, & ! + 8.706676e-01, 8.710798e-01, 8.714478e-01, 8.717778e-01, 8.720747e-01, & ! + 8.723431e-01, 8.725889e-01, 8.728144e-01, 8.730201e-01, 8.732129e-01, & ! + 8.733907e-01, 8.735541e-01, 8.737100e-01, 8.738533e-01, 8.739882e-01, & ! + 8.741164e-01, 8.742362e-01, 8.743485e-01, 8.744530e-01, 8.745512e-01, & ! + 8.746471e-01, 8.747373e-01, 8.748186e-01, 8.748973e-01, 8.749732e-01, & ! + 8.750443e-01, 8.751105e-01, 8.751747e-01, 8.752344e-01, 8.752902e-01, & ! + 8.753412e-01, 8.753917e-01, 8.754393e-01, 8.754843e-01, 8.755282e-01, & ! + 8.755662e-01, 8.756039e-01, 8.756408e-01, 8.756722e-01, 8.757072e-01, & ! + 8.757352e-01, 8.757653e-01, 8.757932e-01, & ! + 8.374590e-01, 8.465669e-01, 8.518701e-01, 8.547627e-01, 8.565745e-01, & ! 13 + 8.579065e-01, 8.589717e-01, 8.598632e-01, 8.606363e-01, 8.613268e-01, & ! + 8.619560e-01, 8.625340e-01, 8.630689e-01, 8.635601e-01, 8.640084e-01, & ! + 8.644180e-01, 8.647885e-01, 8.651220e-01, 8.654218e-01, 8.656908e-01, & ! + 8.659294e-01, 8.661422e-01, 8.663334e-01, 8.665037e-01, 8.666543e-01, & ! + 8.667913e-01, 8.669156e-01, 8.670242e-01, 8.671249e-01, 8.672161e-01, & ! + 8.672993e-01, 8.673733e-01, 8.674457e-01, 8.675103e-01, 8.675713e-01, & ! + 8.676267e-01, 8.676798e-01, 8.677286e-01, 8.677745e-01, 8.678178e-01, & ! + 8.678601e-01, 8.678986e-01, 8.679351e-01, 8.679693e-01, 8.680013e-01, & ! + 8.680334e-01, 8.680624e-01, 8.680915e-01, 8.681178e-01, 8.681428e-01, & ! + 8.681654e-01, 8.681899e-01, 8.682103e-01, 8.682317e-01, 8.682498e-01, & ! + 8.682677e-01, 8.682861e-01, 8.683041e-01, & ! + 7.877069e-01, 8.244281e-01, 8.367971e-01, 8.409074e-01, 8.429859e-01, & ! 14 + 8.454386e-01, 8.489350e-01, 8.534141e-01, 8.585814e-01, 8.641267e-01, & ! + 8.697999e-01, 8.754223e-01, 8.808785e-01, 8.860944e-01, 8.910354e-01, & ! + 8.956837e-01, 9.000392e-01, 9.041091e-01, 9.079071e-01, 9.114479e-01, & ! + 9.147462e-01, 9.178234e-01, 9.206903e-01, 9.233663e-01, 9.258668e-01, & ! + 9.282006e-01, 9.303847e-01, 9.324288e-01, 9.343418e-01, 9.361356e-01, & ! + 9.378176e-01, 9.393939e-01, 9.408736e-01, 9.422622e-01, 9.435670e-01, & ! + 9.447900e-01, 9.459395e-01, 9.470199e-01, 9.480335e-01, 9.489852e-01, & ! + 9.498782e-01, 9.507168e-01, 9.515044e-01, 9.522470e-01, 9.529409e-01, & ! + 9.535946e-01, 9.542071e-01, 9.547838e-01, 9.553256e-01, 9.558351e-01, & ! + 9.563139e-01, 9.567660e-01, 9.571915e-01, 9.575901e-01, 9.579685e-01, & ! + 9.583239e-01, 9.586602e-01, 9.589766e-01/), & ! + shape = (/58,nBandsSW_RRTMG/)) + + real(kind_phys),dimension(43,nBandsSW_RRTMG),parameter :: & ! + extice2 = reshape(source= (/ & ! + 4.101824e-01, 2.435514e-01, 1.713697e-01, 1.314865e-01, 1.063406e-01, & ! 1 + 8.910701e-02, 7.659480e-02, 6.711784e-02, 5.970353e-02, 5.375249e-02, & ! + 4.887577e-02, 4.481025e-02, 4.137171e-02, 3.842744e-02, 3.587948e-02, & ! + 3.365396e-02, 3.169419e-02, 2.995593e-02, 2.840419e-02, 2.701091e-02, & ! + 2.575336e-02, 2.461293e-02, 2.357423e-02, 2.262443e-02, 2.175276e-02, & ! + 2.095012e-02, 2.020875e-02, 1.952199e-02, 1.888412e-02, 1.829018e-02, & ! + 1.773586e-02, 1.721738e-02, 1.673144e-02, 1.627510e-02, 1.584579e-02, & ! + 1.544122e-02, 1.505934e-02, 1.469833e-02, 1.435654e-02, 1.403251e-02, & ! + 1.372492e-02, 1.343255e-02, 1.315433e-02, & ! + 3.836650e-01, 2.304055e-01, 1.637265e-01, 1.266681e-01, 1.031602e-01, & ! 2 + 8.695191e-02, 7.511544e-02, 6.610009e-02, 5.900909e-02, 5.328833e-02, & ! + 4.857728e-02, 4.463133e-02, 4.127880e-02, 3.839567e-02, 3.589013e-02, & ! + 3.369280e-02, 3.175027e-02, 3.002079e-02, 2.847121e-02, 2.707493e-02, & ! + 2.581031e-02, 2.465962e-02, 2.360815e-02, 2.264363e-02, 2.175571e-02, & ! + 2.093563e-02, 2.017592e-02, 1.947015e-02, 1.881278e-02, 1.819901e-02, & ! + 1.762463e-02, 1.708598e-02, 1.657982e-02, 1.610330e-02, 1.565390e-02, & ! + 1.522937e-02, 1.482768e-02, 1.444706e-02, 1.408588e-02, 1.374270e-02, & ! + 1.341619e-02, 1.310517e-02, 1.280857e-02, & ! + 4.152673e-01, 2.436816e-01, 1.702243e-01, 1.299704e-01, 1.047528e-01, & ! 3 + 8.756039e-02, 7.513327e-02, 6.575690e-02, 5.844616e-02, 5.259609e-02, & ! + 4.781531e-02, 4.383980e-02, 4.048517e-02, 3.761891e-02, 3.514342e-02, & ! + 3.298525e-02, 3.108814e-02, 2.940825e-02, 2.791096e-02, 2.656858e-02, & ! + 2.535869e-02, 2.426297e-02, 2.326627e-02, 2.235602e-02, 2.152164e-02, & ! + 2.075420e-02, 2.004613e-02, 1.939091e-02, 1.878296e-02, 1.821744e-02, & ! + 1.769015e-02, 1.719741e-02, 1.673600e-02, 1.630308e-02, 1.589615e-02, & ! + 1.551298e-02, 1.515159e-02, 1.481021e-02, 1.448726e-02, 1.418131e-02, & ! + 1.389109e-02, 1.361544e-02, 1.335330e-02, & ! + 3.873250e-01, 2.331609e-01, 1.655002e-01, 1.277753e-01, 1.038247e-01, & ! 4 + 8.731780e-02, 7.527638e-02, 6.611873e-02, 5.892850e-02, 5.313885e-02, & ! + 4.838068e-02, 4.440356e-02, 4.103167e-02, 3.813804e-02, 3.562870e-02, & ! + 3.343269e-02, 3.149539e-02, 2.977414e-02, 2.823510e-02, 2.685112e-02, & ! + 2.560015e-02, 2.446411e-02, 2.342805e-02, 2.247948e-02, 2.160789e-02, & ! + 2.080438e-02, 2.006139e-02, 1.937238e-02, 1.873177e-02, 1.813469e-02, & ! + 1.757689e-02, 1.705468e-02, 1.656479e-02, 1.610435e-02, 1.567081e-02, & ! + 1.526192e-02, 1.487565e-02, 1.451020e-02, 1.416396e-02, 1.383546e-02, & ! + 1.352339e-02, 1.322657e-02, 1.294392e-02, & ! + 3.784280e-01, 2.291396e-01, 1.632551e-01, 1.263775e-01, 1.028944e-01, & ! 5 + 8.666975e-02, 7.480952e-02, 6.577335e-02, 5.866714e-02, 5.293694e-02, & ! + 4.822153e-02, 4.427547e-02, 4.092626e-02, 3.804918e-02, 3.555184e-02, & ! + 3.336440e-02, 3.143307e-02, 2.971577e-02, 2.817912e-02, 2.679632e-02, & ! + 2.554558e-02, 2.440903e-02, 2.337187e-02, 2.242173e-02, 2.154821e-02, & ! + 2.074249e-02, 1.999706e-02, 1.930546e-02, 1.866212e-02, 1.806221e-02, & ! + 1.750152e-02, 1.697637e-02, 1.648352e-02, 1.602010e-02, 1.558358e-02, & ! + 1.517172e-02, 1.478250e-02, 1.441413e-02, 1.406498e-02, 1.373362e-02, & ! + 1.341872e-02, 1.311911e-02, 1.283371e-02, & ! + 3.719909e-01, 2.259490e-01, 1.613144e-01, 1.250648e-01, 1.019462e-01, & ! 6 + 8.595358e-02, 7.425064e-02, 6.532618e-02, 5.830218e-02, 5.263421e-02, & ! + 4.796697e-02, 4.405891e-02, 4.074013e-02, 3.788776e-02, 3.541071e-02, & ! + 3.324008e-02, 3.132280e-02, 2.961733e-02, 2.809071e-02, 2.671645e-02, & ! + 2.547302e-02, 2.434276e-02, 2.331102e-02, 2.236558e-02, 2.149614e-02, & ! + 2.069397e-02, 1.995163e-02, 1.926272e-02, 1.862174e-02, 1.802389e-02, & ! + 1.746500e-02, 1.694142e-02, 1.644994e-02, 1.598772e-02, 1.555225e-02, & ! + 1.514129e-02, 1.475286e-02, 1.438515e-02, 1.403659e-02, 1.370572e-02, & ! + 1.339124e-02, 1.309197e-02, 1.280685e-02, & ! + 3.713158e-01, 2.253816e-01, 1.608461e-01, 1.246718e-01, 1.016109e-01, & ! 7 + 8.566332e-02, 7.399666e-02, 6.510199e-02, 5.810290e-02, 5.245608e-02, & ! + 4.780702e-02, 4.391478e-02, 4.060989e-02, 3.776982e-02, 3.530374e-02, & ! + 3.314296e-02, 3.123458e-02, 2.953719e-02, 2.801794e-02, 2.665043e-02, & ! + 2.541321e-02, 2.428868e-02, 2.326224e-02, 2.232173e-02, 2.145688e-02, & ! + 2.065899e-02, 1.992067e-02, 1.923552e-02, 1.859808e-02, 1.800356e-02, & ! + 1.744782e-02, 1.692721e-02, 1.643855e-02, 1.597900e-02, 1.554606e-02, & ! + 1.513751e-02, 1.475137e-02, 1.438586e-02, 1.403938e-02, 1.371050e-02, & ! + 1.339793e-02, 1.310050e-02, 1.281713e-02, & ! + 3.605883e-01, 2.204388e-01, 1.580431e-01, 1.229033e-01, 1.004203e-01, & ! 8 + 8.482616e-02, 7.338941e-02, 6.465105e-02, 5.776176e-02, 5.219398e-02, & ! + 4.760288e-02, 4.375369e-02, 4.048111e-02, 3.766539e-02, 3.521771e-02, & ! + 3.307079e-02, 3.117277e-02, 2.948303e-02, 2.796929e-02, 2.660560e-02, & ! + 2.537086e-02, 2.424772e-02, 2.322182e-02, 2.228114e-02, 2.141556e-02, & ! + 2.061649e-02, 1.987661e-02, 1.918962e-02, 1.855009e-02, 1.795330e-02, & ! + 1.739514e-02, 1.687199e-02, 1.638069e-02, 1.591845e-02, 1.548276e-02, & ! + 1.507143e-02, 1.468249e-02, 1.431416e-02, 1.396486e-02, 1.363318e-02, & ! + 1.331781e-02, 1.301759e-02, 1.273147e-02, & ! + 3.527890e-01, 2.168469e-01, 1.560090e-01, 1.216216e-01, 9.955787e-02, & ! 9 + 8.421942e-02, 7.294827e-02, 6.432192e-02, 5.751081e-02, 5.199888e-02, & ! + 4.744835e-02, 4.362899e-02, 4.037847e-02, 3.757910e-02, 3.514351e-02, & ! + 3.300546e-02, 3.111382e-02, 2.942853e-02, 2.791775e-02, 2.655584e-02, & ! + 2.532195e-02, 2.419892e-02, 2.317255e-02, 2.223092e-02, 2.136402e-02, & ! + 2.056334e-02, 1.982160e-02, 1.913258e-02, 1.849087e-02, 1.789178e-02, & ! + 1.733124e-02, 1.680565e-02, 1.631187e-02, 1.584711e-02, 1.540889e-02, & ! + 1.499502e-02, 1.460354e-02, 1.423269e-02, 1.388088e-02, 1.354670e-02, & ! + 1.322887e-02, 1.292620e-02, 1.263767e-02, & ! + 3.477874e-01, 2.143515e-01, 1.544887e-01, 1.205942e-01, 9.881779e-02, & ! 10 + 8.366261e-02, 7.251586e-02, 6.397790e-02, 5.723183e-02, 5.176908e-02, & ! + 4.725658e-02, 4.346715e-02, 4.024055e-02, 3.746055e-02, 3.504080e-02, & ! + 3.291583e-02, 3.103507e-02, 2.935891e-02, 2.785582e-02, 2.650042e-02, & ! + 2.527206e-02, 2.415376e-02, 2.313142e-02, 2.219326e-02, 2.132934e-02, & ! + 2.053122e-02, 1.979169e-02, 1.910456e-02, 1.846448e-02, 1.786680e-02, & ! + 1.730745e-02, 1.678289e-02, 1.628998e-02, 1.582595e-02, 1.538835e-02, & ! + 1.497499e-02, 1.458393e-02, 1.421341e-02, 1.386187e-02, 1.352788e-02, & ! + 1.321019e-02, 1.290762e-02, 1.261913e-02, & ! + 3.453721e-01, 2.130744e-01, 1.536698e-01, 1.200140e-01, 9.838078e-02, & ! 11 + 8.331940e-02, 7.223803e-02, 6.374775e-02, 5.703770e-02, 5.160290e-02, & ! + 4.711259e-02, 4.334110e-02, 4.012923e-02, 3.736150e-02, 3.495208e-02, & ! + 3.283589e-02, 3.096267e-02, 2.929302e-02, 2.779560e-02, 2.644517e-02, & ! + 2.522119e-02, 2.410677e-02, 2.308788e-02, 2.215281e-02, 2.129165e-02, & ! + 2.049602e-02, 1.975874e-02, 1.907365e-02, 1.843542e-02, 1.783943e-02, & ! + 1.728162e-02, 1.675847e-02, 1.626685e-02, 1.580401e-02, 1.536750e-02, & ! + 1.495515e-02, 1.456502e-02, 1.419537e-02, 1.384463e-02, 1.351139e-02, & ! + 1.319438e-02, 1.289246e-02, 1.260456e-02, & ! + 3.417883e-01, 2.113379e-01, 1.526395e-01, 1.193347e-01, 9.790253e-02, & ! 12 + 8.296715e-02, 7.196979e-02, 6.353806e-02, 5.687024e-02, 5.146670e-02, & ! + 4.700001e-02, 4.324667e-02, 4.004894e-02, 3.729233e-02, 3.489172e-02, & ! + 3.278257e-02, 3.091499e-02, 2.924987e-02, 2.775609e-02, 2.640859e-02, & ! + 2.518695e-02, 2.407439e-02, 2.305697e-02, 2.212303e-02, 2.126273e-02, & ! + 2.046774e-02, 1.973090e-02, 1.904610e-02, 1.840801e-02, 1.781204e-02, & ! + 1.725417e-02, 1.673086e-02, 1.623902e-02, 1.577590e-02, 1.533906e-02, & ! + 1.492634e-02, 1.453580e-02, 1.416571e-02, 1.381450e-02, 1.348078e-02, & ! + 1.316327e-02, 1.286082e-02, 1.257240e-02, & ! + 3.416111e-01, 2.114124e-01, 1.527734e-01, 1.194809e-01, 9.804612e-02, & ! 13 + 8.310287e-02, 7.209595e-02, 6.365442e-02, 5.697710e-02, 5.156460e-02, & ! + 4.708957e-02, 4.332850e-02, 4.012361e-02, 3.736037e-02, 3.495364e-02, & ! + 3.283879e-02, 3.096593e-02, 2.929589e-02, 2.779751e-02, 2.644571e-02, & ! + 2.522004e-02, 2.410369e-02, 2.308271e-02, 2.214542e-02, 2.128195e-02, & ! + 2.048396e-02, 1.974429e-02, 1.905679e-02, 1.841614e-02, 1.781774e-02, & ! + 1.725754e-02, 1.673203e-02, 1.623807e-02, 1.577293e-02, 1.533416e-02, & ! + 1.491958e-02, 1.452727e-02, 1.415547e-02, 1.380262e-02, 1.346732e-02, & ! + 1.314830e-02, 1.284439e-02, 1.255456e-02, & ! + 4.196611e-01, 2.493642e-01, 1.761261e-01, 1.357197e-01, 1.102161e-01, & ! 14 + 9.269376e-02, 7.992985e-02, 7.022538e-02, 6.260168e-02, 5.645603e-02, & ! + 5.139732e-02, 4.716088e-02, 4.356133e-02, 4.046498e-02, 3.777303e-02, & ! + 3.541094e-02, 3.332137e-02, 3.145954e-02, 2.978998e-02, 2.828419e-02, & ! + 2.691905e-02, 2.567559e-02, 2.453811e-02, 2.349350e-02, 2.253072e-02, & ! + 2.164042e-02, 2.081464e-02, 2.004652e-02, 1.933015e-02, 1.866041e-02, & ! + 1.803283e-02, 1.744348e-02, 1.688894e-02, 1.636616e-02, 1.587244e-02, & ! + 1.540539e-02, 1.496287e-02, 1.454295e-02, 1.414392e-02, 1.376423e-02, & ! + 1.340247e-02, 1.305739e-02, 1.272784e-02/), & ! + shape = (/43,nBandsSW_RRTMG/)) + + real(kind_phys),dimension(43,nBandsSW_RRTMG),parameter :: & ! + ssaice2 = reshape(source= (/ & ! + 6.630615e-01, 6.451169e-01, 6.333696e-01, 6.246927e-01, 6.178420e-01, & ! 1 + 6.121976e-01, 6.074069e-01, 6.032505e-01, 5.995830e-01, 5.963030e-01, & ! + 5.933372e-01, 5.906311e-01, 5.881427e-01, 5.858395e-01, 5.836955e-01, & ! + 5.816896e-01, 5.798046e-01, 5.780264e-01, 5.763429e-01, 5.747441e-01, & ! + 5.732213e-01, 5.717672e-01, 5.703754e-01, 5.690403e-01, 5.677571e-01, & ! + 5.665215e-01, 5.653297e-01, 5.641782e-01, 5.630643e-01, 5.619850e-01, & ! + 5.609381e-01, 5.599214e-01, 5.589328e-01, 5.579707e-01, 5.570333e-01, & ! + 5.561193e-01, 5.552272e-01, 5.543558e-01, 5.535041e-01, 5.526708e-01, & ! + 5.518551e-01, 5.510561e-01, 5.502729e-01, & ! + 7.689749e-01, 7.398171e-01, 7.205819e-01, 7.065690e-01, 6.956928e-01, & ! 2 + 6.868989e-01, 6.795813e-01, 6.733606e-01, 6.679838e-01, 6.632742e-01, & ! + 6.591036e-01, 6.553766e-01, 6.520197e-01, 6.489757e-01, 6.461991e-01, & ! + 6.436531e-01, 6.413075e-01, 6.391375e-01, 6.371221e-01, 6.352438e-01, & ! + 6.334876e-01, 6.318406e-01, 6.302918e-01, 6.288315e-01, 6.274512e-01, & ! + 6.261436e-01, 6.249022e-01, 6.237211e-01, 6.225953e-01, 6.215201e-01, & ! + 6.204914e-01, 6.195055e-01, 6.185592e-01, 6.176492e-01, 6.167730e-01, & ! + 6.159280e-01, 6.151120e-01, 6.143228e-01, 6.135587e-01, 6.128177e-01, & ! + 6.120984e-01, 6.113993e-01, 6.107189e-01, & ! + 9.956167e-01, 9.814770e-01, 9.716104e-01, 9.639746e-01, 9.577179e-01, & ! 3 + 9.524010e-01, 9.477672e-01, 9.436527e-01, 9.399467e-01, 9.365708e-01, & ! + 9.334672e-01, 9.305921e-01, 9.279118e-01, 9.253993e-01, 9.230330e-01, & ! + 9.207954e-01, 9.186719e-01, 9.166501e-01, 9.147199e-01, 9.128722e-01, & ! + 9.110997e-01, 9.093956e-01, 9.077544e-01, 9.061708e-01, 9.046406e-01, & ! + 9.031598e-01, 9.017248e-01, 9.003326e-01, 8.989804e-01, 8.976655e-01, & ! + 8.963857e-01, 8.951389e-01, 8.939233e-01, 8.927370e-01, 8.915785e-01, & ! + 8.904464e-01, 8.893392e-01, 8.882559e-01, 8.871951e-01, 8.861559e-01, & ! + 8.851373e-01, 8.841383e-01, 8.831581e-01, & ! + 9.723177e-01, 9.452119e-01, 9.267592e-01, 9.127393e-01, 9.014238e-01, & ! 4 + 8.919334e-01, 8.837584e-01, 8.765773e-01, 8.701736e-01, 8.643950e-01, & ! + 8.591299e-01, 8.542942e-01, 8.498230e-01, 8.456651e-01, 8.417794e-01, & ! + 8.381324e-01, 8.346964e-01, 8.314484e-01, 8.283687e-01, 8.254408e-01, & ! + 8.226505e-01, 8.199854e-01, 8.174348e-01, 8.149891e-01, 8.126403e-01, & ! + 8.103808e-01, 8.082041e-01, 8.061044e-01, 8.040765e-01, 8.021156e-01, & ! + 8.002174e-01, 7.983781e-01, 7.965941e-01, 7.948622e-01, 7.931795e-01, & ! + 7.915432e-01, 7.899508e-01, 7.884002e-01, 7.868891e-01, 7.854156e-01, & ! + 7.839779e-01, 7.825742e-01, 7.812031e-01, & ! + 9.933294e-01, 9.860917e-01, 9.811564e-01, 9.774008e-01, 9.743652e-01, & ! 5 + 9.718155e-01, 9.696159e-01, 9.676810e-01, 9.659531e-01, 9.643915e-01, & ! + 9.629667e-01, 9.616561e-01, 9.604426e-01, 9.593125e-01, 9.582548e-01, & ! + 9.572607e-01, 9.563227e-01, 9.554347e-01, 9.545915e-01, 9.537888e-01, & ! + 9.530226e-01, 9.522898e-01, 9.515874e-01, 9.509130e-01, 9.502643e-01, & ! + 9.496394e-01, 9.490366e-01, 9.484542e-01, 9.478910e-01, 9.473456e-01, & ! + 9.468169e-01, 9.463039e-01, 9.458056e-01, 9.453212e-01, 9.448499e-01, & ! + 9.443910e-01, 9.439438e-01, 9.435077e-01, 9.430821e-01, 9.426666e-01, & ! + 9.422607e-01, 9.418638e-01, 9.414756e-01, & ! + 9.900787e-01, 9.828880e-01, 9.779258e-01, 9.741173e-01, 9.710184e-01, & ! 6 + 9.684012e-01, 9.661332e-01, 9.641301e-01, 9.623352e-01, 9.607083e-01, & ! + 9.592198e-01, 9.578474e-01, 9.565739e-01, 9.553856e-01, 9.542715e-01, & ! + 9.532226e-01, 9.522314e-01, 9.512919e-01, 9.503986e-01, 9.495472e-01, & ! + 9.487337e-01, 9.479549e-01, 9.472077e-01, 9.464897e-01, 9.457985e-01, & ! + 9.451322e-01, 9.444890e-01, 9.438673e-01, 9.432656e-01, 9.426826e-01, & ! + 9.421173e-01, 9.415684e-01, 9.410351e-01, 9.405164e-01, 9.400115e-01, & ! + 9.395198e-01, 9.390404e-01, 9.385728e-01, 9.381164e-01, 9.376707e-01, & ! + 9.372350e-01, 9.368091e-01, 9.363923e-01, & ! + 9.986793e-01, 9.985239e-01, 9.983911e-01, 9.982715e-01, 9.981606e-01, & ! 7 + 9.980562e-01, 9.979567e-01, 9.978613e-01, 9.977691e-01, 9.976798e-01, & ! + 9.975929e-01, 9.975081e-01, 9.974251e-01, 9.973438e-01, 9.972640e-01, & ! + 9.971855e-01, 9.971083e-01, 9.970322e-01, 9.969571e-01, 9.968830e-01, & ! + 9.968099e-01, 9.967375e-01, 9.966660e-01, 9.965951e-01, 9.965250e-01, & ! + 9.964555e-01, 9.963867e-01, 9.963185e-01, 9.962508e-01, 9.961836e-01, & ! + 9.961170e-01, 9.960508e-01, 9.959851e-01, 9.959198e-01, 9.958550e-01, & ! + 9.957906e-01, 9.957266e-01, 9.956629e-01, 9.955997e-01, 9.955367e-01, & ! + 9.954742e-01, 9.954119e-01, 9.953500e-01, & ! + 9.997944e-01, 9.997791e-01, 9.997664e-01, 9.997547e-01, 9.997436e-01, & ! 8 + 9.997327e-01, 9.997219e-01, 9.997110e-01, 9.996999e-01, 9.996886e-01, & ! + 9.996771e-01, 9.996653e-01, 9.996533e-01, 9.996409e-01, 9.996282e-01, & ! + 9.996152e-01, 9.996019e-01, 9.995883e-01, 9.995743e-01, 9.995599e-01, & ! + 9.995453e-01, 9.995302e-01, 9.995149e-01, 9.994992e-01, 9.994831e-01, & ! + 9.994667e-01, 9.994500e-01, 9.994329e-01, 9.994154e-01, 9.993976e-01, & ! + 9.993795e-01, 9.993610e-01, 9.993422e-01, 9.993230e-01, 9.993035e-01, & ! + 9.992837e-01, 9.992635e-01, 9.992429e-01, 9.992221e-01, 9.992008e-01, & ! + 9.991793e-01, 9.991574e-01, 9.991352e-01, & ! + 9.999949e-01, 9.999947e-01, 9.999943e-01, 9.999939e-01, 9.999934e-01, & ! 9 + 9.999927e-01, 9.999920e-01, 9.999913e-01, 9.999904e-01, 9.999895e-01, & ! + 9.999885e-01, 9.999874e-01, 9.999863e-01, 9.999851e-01, 9.999838e-01, & ! + 9.999824e-01, 9.999810e-01, 9.999795e-01, 9.999780e-01, 9.999764e-01, & ! + 9.999747e-01, 9.999729e-01, 9.999711e-01, 9.999692e-01, 9.999673e-01, & ! + 9.999653e-01, 9.999632e-01, 9.999611e-01, 9.999589e-01, 9.999566e-01, & ! + 9.999543e-01, 9.999519e-01, 9.999495e-01, 9.999470e-01, 9.999444e-01, & ! + 9.999418e-01, 9.999392e-01, 9.999364e-01, 9.999336e-01, 9.999308e-01, & ! + 9.999279e-01, 9.999249e-01, 9.999219e-01, & ! + 9.999997e-01, 9.999997e-01, 9.999997e-01, 9.999996e-01, 9.999996e-01, & ! 10 + 9.999995e-01, 9.999994e-01, 9.999993e-01, 9.999993e-01, 9.999992e-01, & ! + 9.999991e-01, 9.999989e-01, 9.999988e-01, 9.999987e-01, 9.999986e-01, & ! + 9.999984e-01, 9.999983e-01, 9.999981e-01, 9.999980e-01, 9.999978e-01, & ! + 9.999976e-01, 9.999974e-01, 9.999972e-01, 9.999971e-01, 9.999969e-01, & ! + 9.999966e-01, 9.999964e-01, 9.999962e-01, 9.999960e-01, 9.999957e-01, & ! + 9.999955e-01, 9.999953e-01, 9.999950e-01, 9.999947e-01, 9.999945e-01, & ! + 9.999942e-01, 9.999939e-01, 9.999936e-01, 9.999934e-01, 9.999931e-01, & ! + 9.999928e-01, 9.999925e-01, 9.999921e-01, & ! + 9.999997e-01, 9.999996e-01, 9.999996e-01, 9.999995e-01, 9.999994e-01, & ! 11 + 9.999993e-01, 9.999992e-01, 9.999991e-01, 9.999990e-01, 9.999989e-01, & ! + 9.999987e-01, 9.999986e-01, 9.999984e-01, 9.999982e-01, 9.999980e-01, & ! + 9.999978e-01, 9.999976e-01, 9.999974e-01, 9.999972e-01, 9.999970e-01, & ! + 9.999967e-01, 9.999965e-01, 9.999962e-01, 9.999959e-01, 9.999956e-01, & ! + 9.999954e-01, 9.999951e-01, 9.999947e-01, 9.999944e-01, 9.999941e-01, & ! + 9.999938e-01, 9.999934e-01, 9.999931e-01, 9.999927e-01, 9.999923e-01, & ! + 9.999920e-01, 9.999916e-01, 9.999912e-01, 9.999908e-01, 9.999904e-01, & ! + 9.999899e-01, 9.999895e-01, 9.999891e-01, & ! + 9.999987e-01, 9.999987e-01, 9.999985e-01, 9.999984e-01, 9.999982e-01, & ! 12 + 9.999980e-01, 9.999978e-01, 9.999976e-01, 9.999973e-01, 9.999970e-01, & ! + 9.999967e-01, 9.999964e-01, 9.999960e-01, 9.999956e-01, 9.999952e-01, & ! + 9.999948e-01, 9.999944e-01, 9.999939e-01, 9.999934e-01, 9.999929e-01, & ! + 9.999924e-01, 9.999918e-01, 9.999913e-01, 9.999907e-01, 9.999901e-01, & ! + 9.999894e-01, 9.999888e-01, 9.999881e-01, 9.999874e-01, 9.999867e-01, & ! + 9.999860e-01, 9.999853e-01, 9.999845e-01, 9.999837e-01, 9.999829e-01, & ! + 9.999821e-01, 9.999813e-01, 9.999804e-01, 9.999796e-01, 9.999787e-01, & ! + 9.999778e-01, 9.999768e-01, 9.999759e-01, & ! + 9.999989e-01, 9.999989e-01, 9.999987e-01, 9.999986e-01, 9.999984e-01, & ! 13 + 9.999982e-01, 9.999980e-01, 9.999978e-01, 9.999975e-01, 9.999972e-01, & ! + 9.999969e-01, 9.999966e-01, 9.999962e-01, 9.999958e-01, 9.999954e-01, & ! + 9.999950e-01, 9.999945e-01, 9.999941e-01, 9.999936e-01, 9.999931e-01, & ! + 9.999925e-01, 9.999920e-01, 9.999914e-01, 9.999908e-01, 9.999902e-01, & ! + 9.999896e-01, 9.999889e-01, 9.999883e-01, 9.999876e-01, 9.999869e-01, & ! + 9.999861e-01, 9.999854e-01, 9.999846e-01, 9.999838e-01, 9.999830e-01, & ! + 9.999822e-01, 9.999814e-01, 9.999805e-01, 9.999796e-01, 9.999787e-01, & ! + 9.999778e-01, 9.999769e-01, 9.999759e-01, & ! + 7.042143e-01, 6.691161e-01, 6.463240e-01, 6.296590e-01, 6.166381e-01, & ! 14 + 6.060183e-01, 5.970908e-01, 5.894144e-01, 5.826968e-01, 5.767343e-01, & ! + 5.713804e-01, 5.665256e-01, 5.620867e-01, 5.579987e-01, 5.542101e-01, & ! + 5.506794e-01, 5.473727e-01, 5.442620e-01, 5.413239e-01, 5.385389e-01, & ! + 5.358901e-01, 5.333633e-01, 5.309460e-01, 5.286277e-01, 5.263988e-01, & ! + 5.242512e-01, 5.221777e-01, 5.201719e-01, 5.182280e-01, 5.163410e-01, & ! + 5.145062e-01, 5.127197e-01, 5.109776e-01, 5.092766e-01, 5.076137e-01, & ! + 5.059860e-01, 5.043911e-01, 5.028266e-01, 5.012904e-01, 4.997805e-01, & ! + 4.982951e-01, 4.968326e-01, 4.953913e-01/), & ! + shape = (/43,nBandsSW_RRTMG/)) + + real(kind_phys),dimension(43,nBandsSW_RRTMG),parameter :: & ! + asyice2 = reshape(source= (/ & ! + 7.946655e-01, 8.547685e-01, 8.806016e-01, 8.949880e-01, 9.041676e-01, & ! 1 + 9.105399e-01, 9.152249e-01, 9.188160e-01, 9.216573e-01, 9.239620e-01, & ! + 9.258695e-01, 9.274745e-01, 9.288441e-01, 9.300267e-01, 9.310584e-01, & ! + 9.319665e-01, 9.327721e-01, 9.334918e-01, 9.341387e-01, 9.347236e-01, & ! + 9.352551e-01, 9.357402e-01, 9.361850e-01, 9.365942e-01, 9.369722e-01, & ! + 9.373225e-01, 9.376481e-01, 9.379516e-01, 9.382352e-01, 9.385010e-01, & ! + 9.387505e-01, 9.389854e-01, 9.392070e-01, 9.394163e-01, 9.396145e-01, & ! + 9.398024e-01, 9.399809e-01, 9.401508e-01, 9.403126e-01, 9.404670e-01, & ! + 9.406144e-01, 9.407555e-01, 9.408906e-01, & ! + 9.078091e-01, 9.195850e-01, 9.267250e-01, 9.317083e-01, 9.354632e-01, & ! 2 + 9.384323e-01, 9.408597e-01, 9.428935e-01, 9.446301e-01, 9.461351e-01, & ! + 9.474555e-01, 9.486259e-01, 9.496722e-01, 9.506146e-01, 9.514688e-01, & ! + 9.522476e-01, 9.529612e-01, 9.536181e-01, 9.542251e-01, 9.547883e-01, & ! + 9.553124e-01, 9.558019e-01, 9.562601e-01, 9.566904e-01, 9.570953e-01, & ! + 9.574773e-01, 9.578385e-01, 9.581806e-01, 9.585054e-01, 9.588142e-01, & ! + 9.591083e-01, 9.593888e-01, 9.596569e-01, 9.599135e-01, 9.601593e-01, & ! + 9.603952e-01, 9.606219e-01, 9.608399e-01, 9.610499e-01, 9.612523e-01, & ! + 9.614477e-01, 9.616365e-01, 9.618192e-01, & ! + 8.322045e-01, 8.528693e-01, 8.648167e-01, 8.729163e-01, 8.789054e-01, & ! 3 + 8.835845e-01, 8.873819e-01, 8.905511e-01, 8.932532e-01, 8.955965e-01, & ! + 8.976567e-01, 8.994887e-01, 9.011334e-01, 9.026221e-01, 9.039791e-01, & ! + 9.052237e-01, 9.063715e-01, 9.074349e-01, 9.084245e-01, 9.093489e-01, & ! + 9.102154e-01, 9.110303e-01, 9.117987e-01, 9.125253e-01, 9.132140e-01, & ! + 9.138682e-01, 9.144910e-01, 9.150850e-01, 9.156524e-01, 9.161955e-01, & ! + 9.167160e-01, 9.172157e-01, 9.176959e-01, 9.181581e-01, 9.186034e-01, & ! + 9.190330e-01, 9.194478e-01, 9.198488e-01, 9.202368e-01, 9.206126e-01, & ! + 9.209768e-01, 9.213301e-01, 9.216731e-01, & ! + 8.116560e-01, 8.488278e-01, 8.674331e-01, 8.788148e-01, 8.865810e-01, & ! 4 + 8.922595e-01, 8.966149e-01, 9.000747e-01, 9.028980e-01, 9.052513e-01, & ! + 9.072468e-01, 9.089632e-01, 9.104574e-01, 9.117713e-01, 9.129371e-01, & ! + 9.139793e-01, 9.149174e-01, 9.157668e-01, 9.165400e-01, 9.172473e-01, & ! + 9.178970e-01, 9.184962e-01, 9.190508e-01, 9.195658e-01, 9.200455e-01, & ! + 9.204935e-01, 9.209130e-01, 9.213067e-01, 9.216771e-01, 9.220262e-01, & ! + 9.223560e-01, 9.226680e-01, 9.229636e-01, 9.232443e-01, 9.235112e-01, & ! + 9.237652e-01, 9.240074e-01, 9.242385e-01, 9.244594e-01, 9.246708e-01, & ! + 9.248733e-01, 9.250674e-01, 9.252536e-01, & ! + 8.047113e-01, 8.402864e-01, 8.570332e-01, 8.668455e-01, 8.733206e-01, & ! 5 + 8.779272e-01, 8.813796e-01, 8.840676e-01, 8.862225e-01, 8.879904e-01, & ! + 8.894682e-01, 8.907228e-01, 8.918019e-01, 8.927404e-01, 8.935645e-01, & ! + 8.942943e-01, 8.949452e-01, 8.955296e-01, 8.960574e-01, 8.965366e-01, & ! + 8.969736e-01, 8.973740e-01, 8.977422e-01, 8.980820e-01, 8.983966e-01, & ! + 8.986889e-01, 8.989611e-01, 8.992153e-01, 8.994533e-01, 8.996766e-01, & ! + 8.998865e-01, 9.000843e-01, 9.002709e-01, 9.004474e-01, 9.006146e-01, & ! + 9.007731e-01, 9.009237e-01, 9.010670e-01, 9.012034e-01, 9.013336e-01, & ! + 9.014579e-01, 9.015767e-01, 9.016904e-01, & ! + 8.179122e-01, 8.480726e-01, 8.621945e-01, 8.704354e-01, 8.758555e-01, & ! 6 + 8.797007e-01, 8.825750e-01, 8.848078e-01, 8.865939e-01, 8.880564e-01, & ! + 8.892765e-01, 8.903105e-01, 8.911982e-01, 8.919689e-01, 8.926446e-01, & ! + 8.932419e-01, 8.937738e-01, 8.942506e-01, 8.946806e-01, 8.950702e-01, & ! + 8.954251e-01, 8.957497e-01, 8.960477e-01, 8.963223e-01, 8.965762e-01, & ! + 8.968116e-01, 8.970306e-01, 8.972347e-01, 8.974255e-01, 8.976042e-01, & ! + 8.977720e-01, 8.979298e-01, 8.980784e-01, 8.982188e-01, 8.983515e-01, & ! + 8.984771e-01, 8.985963e-01, 8.987095e-01, 8.988171e-01, 8.989195e-01, & ! + 8.990172e-01, 8.991104e-01, 8.991994e-01, & ! + 8.169789e-01, 8.455024e-01, 8.586925e-01, 8.663283e-01, 8.713217e-01, & ! 7 + 8.748488e-01, 8.774765e-01, 8.795122e-01, 8.811370e-01, 8.824649e-01, & ! + 8.835711e-01, 8.845073e-01, 8.853103e-01, 8.860068e-01, 8.866170e-01, & ! + 8.871560e-01, 8.876358e-01, 8.880658e-01, 8.884533e-01, 8.888044e-01, & ! + 8.891242e-01, 8.894166e-01, 8.896851e-01, 8.899324e-01, 8.901612e-01, & ! + 8.903733e-01, 8.905706e-01, 8.907545e-01, 8.909265e-01, 8.910876e-01, & ! + 8.912388e-01, 8.913812e-01, 8.915153e-01, 8.916419e-01, 8.917617e-01, & ! + 8.918752e-01, 8.919829e-01, 8.920851e-01, 8.921824e-01, 8.922751e-01, & ! + 8.923635e-01, 8.924478e-01, 8.925284e-01, & ! + 8.387642e-01, 8.569979e-01, 8.658630e-01, 8.711825e-01, 8.747605e-01, & ! 8 + 8.773472e-01, 8.793129e-01, 8.808621e-01, 8.821179e-01, 8.831583e-01, & ! + 8.840361e-01, 8.847875e-01, 8.854388e-01, 8.860094e-01, 8.865138e-01, & ! + 8.869634e-01, 8.873668e-01, 8.877310e-01, 8.880617e-01, 8.883635e-01, & ! + 8.886401e-01, 8.888947e-01, 8.891298e-01, 8.893477e-01, 8.895504e-01, & ! + 8.897393e-01, 8.899159e-01, 8.900815e-01, 8.902370e-01, 8.903833e-01, & ! + 8.905214e-01, 8.906518e-01, 8.907753e-01, 8.908924e-01, 8.910036e-01, & ! + 8.911094e-01, 8.912101e-01, 8.913062e-01, 8.913979e-01, 8.914856e-01, & ! + 8.915695e-01, 8.916498e-01, 8.917269e-01, & ! + 8.522208e-01, 8.648132e-01, 8.711224e-01, 8.749901e-01, 8.776354e-01, & ! 9 + 8.795743e-01, 8.810649e-01, 8.822518e-01, 8.832225e-01, 8.840333e-01, & ! + 8.847224e-01, 8.853162e-01, 8.858342e-01, 8.862906e-01, 8.866962e-01, & ! + 8.870595e-01, 8.873871e-01, 8.876842e-01, 8.879551e-01, 8.882032e-01, & ! + 8.884316e-01, 8.886425e-01, 8.888380e-01, 8.890199e-01, 8.891895e-01, & ! + 8.893481e-01, 8.894968e-01, 8.896366e-01, 8.897683e-01, 8.898926e-01, & ! + 8.900102e-01, 8.901215e-01, 8.902272e-01, 8.903276e-01, 8.904232e-01, & ! + 8.905144e-01, 8.906014e-01, 8.906845e-01, 8.907640e-01, 8.908402e-01, & ! + 8.909132e-01, 8.909834e-01, 8.910507e-01, & ! + 8.578202e-01, 8.683033e-01, 8.735431e-01, 8.767488e-01, 8.789378e-01, & ! 10 + 8.805399e-01, 8.817701e-01, 8.827485e-01, 8.835480e-01, 8.842152e-01, & ! + 8.847817e-01, 8.852696e-01, 8.856949e-01, 8.860694e-01, 8.864020e-01, & ! + 8.866997e-01, 8.869681e-01, 8.872113e-01, 8.874330e-01, 8.876360e-01, & ! + 8.878227e-01, 8.879951e-01, 8.881548e-01, 8.883033e-01, 8.884418e-01, & ! + 8.885712e-01, 8.886926e-01, 8.888066e-01, 8.889139e-01, 8.890152e-01, & ! + 8.891110e-01, 8.892017e-01, 8.892877e-01, 8.893695e-01, 8.894473e-01, & ! + 8.895214e-01, 8.895921e-01, 8.896597e-01, 8.897243e-01, 8.897862e-01, & ! + 8.898456e-01, 8.899025e-01, 8.899572e-01, & ! + 8.625615e-01, 8.713831e-01, 8.755799e-01, 8.780560e-01, 8.796983e-01, & ! 11 + 8.808714e-01, 8.817534e-01, 8.824420e-01, 8.829953e-01, 8.834501e-01, & ! + 8.838310e-01, 8.841549e-01, 8.844338e-01, 8.846767e-01, 8.848902e-01, & ! + 8.850795e-01, 8.852484e-01, 8.854002e-01, 8.855374e-01, 8.856620e-01, & ! + 8.857758e-01, 8.858800e-01, 8.859759e-01, 8.860644e-01, 8.861464e-01, & ! + 8.862225e-01, 8.862935e-01, 8.863598e-01, 8.864218e-01, 8.864800e-01, & ! + 8.865347e-01, 8.865863e-01, 8.866349e-01, 8.866809e-01, 8.867245e-01, & ! + 8.867658e-01, 8.868050e-01, 8.868423e-01, 8.868778e-01, 8.869117e-01, & ! + 8.869440e-01, 8.869749e-01, 8.870044e-01, & ! + 8.587495e-01, 8.684764e-01, 8.728189e-01, 8.752872e-01, 8.768846e-01, & ! 12 + 8.780060e-01, 8.788386e-01, 8.794824e-01, 8.799960e-01, 8.804159e-01, & ! + 8.807660e-01, 8.810626e-01, 8.813175e-01, 8.815390e-01, 8.817335e-01, & ! + 8.819057e-01, 8.820593e-01, 8.821973e-01, 8.823220e-01, 8.824353e-01, & ! + 8.825387e-01, 8.826336e-01, 8.827209e-01, 8.828016e-01, 8.828764e-01, & ! + 8.829459e-01, 8.830108e-01, 8.830715e-01, 8.831283e-01, 8.831817e-01, & ! + 8.832320e-01, 8.832795e-01, 8.833244e-01, 8.833668e-01, 8.834071e-01, & ! + 8.834454e-01, 8.834817e-01, 8.835164e-01, 8.835495e-01, 8.835811e-01, & ! + 8.836113e-01, 8.836402e-01, 8.836679e-01, & ! + 8.561110e-01, 8.678583e-01, 8.727554e-01, 8.753892e-01, 8.770154e-01, & ! 13 + 8.781109e-01, 8.788949e-01, 8.794812e-01, 8.799348e-01, 8.802952e-01, & ! + 8.805880e-01, 8.808300e-01, 8.810331e-01, 8.812058e-01, 8.813543e-01, & ! + 8.814832e-01, 8.815960e-01, 8.816956e-01, 8.817839e-01, 8.818629e-01, & ! + 8.819339e-01, 8.819979e-01, 8.820560e-01, 8.821089e-01, 8.821573e-01, & ! + 8.822016e-01, 8.822425e-01, 8.822801e-01, 8.823150e-01, 8.823474e-01, & ! + 8.823775e-01, 8.824056e-01, 8.824318e-01, 8.824564e-01, 8.824795e-01, & ! + 8.825011e-01, 8.825215e-01, 8.825408e-01, 8.825589e-01, 8.825761e-01, & ! + 8.825924e-01, 8.826078e-01, 8.826224e-01, & ! + 8.311124e-01, 8.688197e-01, 8.900274e-01, 9.040696e-01, 9.142334e-01, & ! 14 + 9.220181e-01, 9.282195e-01, 9.333048e-01, 9.375689e-01, 9.412085e-01, & ! + 9.443604e-01, 9.471230e-01, 9.495694e-01, 9.517549e-01, 9.537224e-01, & ! + 9.555057e-01, 9.571316e-01, 9.586222e-01, 9.599952e-01, 9.612656e-01, & ! + 9.624458e-01, 9.635461e-01, 9.645756e-01, 9.655418e-01, 9.664513e-01, & ! + 9.673098e-01, 9.681222e-01, 9.688928e-01, 9.696256e-01, 9.703237e-01, & ! + 9.709903e-01, 9.716280e-01, 9.722391e-01, 9.728258e-01, 9.733901e-01, & ! + 9.739336e-01, 9.744579e-01, 9.749645e-01, 9.754546e-01, 9.759294e-01, & ! + 9.763901e-01, 9.768376e-01, 9.772727e-01/), & ! + shape = (/43,nBandsSW_RRTMG/)) + + real(kind_phys),dimension(46,nBandsSW_RRTMG),parameter :: & ! + extice3 = reshape(source= (/ & ! + 5.194013e-01, 3.215089e-01, 2.327917e-01, 1.824424e-01, 1.499977e-01, & ! 1 + 1.273492e-01, 1.106421e-01, 9.780982e-02, 8.764435e-02, 7.939266e-02, & ! + 7.256081e-02, 6.681137e-02, 6.190600e-02, 5.767154e-02, 5.397915e-02, & ! + 5.073102e-02, 4.785151e-02, 4.528125e-02, 4.297296e-02, 4.088853e-02, & ! + 3.899690e-02, 3.727251e-02, 3.569411e-02, 3.424393e-02, 3.290694e-02, & ! + 3.167040e-02, 3.052340e-02, 2.945654e-02, 2.846172e-02, 2.753188e-02, & ! + 2.666085e-02, 2.584322e-02, 2.507423e-02, 2.434967e-02, 2.366579e-02, & ! + 2.301926e-02, 2.240711e-02, 2.182666e-02, 2.127551e-02, 2.075150e-02, & ! + 2.025267e-02, 1.977725e-02, 1.932364e-02, 1.889035e-02, 1.847607e-02, & ! + 1.807956e-02, & ! + 4.901155e-01, 3.065286e-01, 2.230800e-01, 1.753951e-01, 1.445402e-01, & ! 2 + 1.229417e-01, 1.069777e-01, 9.469760e-02, 8.495824e-02, 7.704501e-02, & ! + 7.048834e-02, 6.496693e-02, 6.025353e-02, 5.618286e-02, 5.263186e-02, & ! + 4.950698e-02, 4.673585e-02, 4.426164e-02, 4.203904e-02, 4.003153e-02, & ! + 3.820932e-02, 3.654790e-02, 3.502688e-02, 3.362919e-02, 3.234041e-02, & ! + 3.114829e-02, 3.004234e-02, 2.901356e-02, 2.805413e-02, 2.715727e-02, & ! + 2.631705e-02, 2.552828e-02, 2.478637e-02, 2.408725e-02, 2.342734e-02, & ! + 2.280343e-02, 2.221264e-02, 2.165242e-02, 2.112043e-02, 2.061461e-02, & ! + 2.013308e-02, 1.967411e-02, 1.923616e-02, 1.881783e-02, 1.841781e-02, & ! + 1.803494e-02, & ! + 5.056264e-01, 3.160261e-01, 2.298442e-01, 1.805973e-01, 1.487318e-01, & ! 3 + 1.264258e-01, 1.099389e-01, 9.725656e-02, 8.719819e-02, 7.902576e-02, & ! + 7.225433e-02, 6.655206e-02, 6.168427e-02, 5.748028e-02, 5.381296e-02, & ! + 5.058572e-02, 4.772383e-02, 4.516857e-02, 4.287317e-02, 4.079990e-02, & ! + 3.891801e-02, 3.720217e-02, 3.563133e-02, 3.418786e-02, 3.285686e-02, & ! + 3.162569e-02, 3.048352e-02, 2.942104e-02, 2.843018e-02, 2.750395e-02, & ! + 2.663621e-02, 2.582160e-02, 2.505539e-02, 2.433337e-02, 2.365185e-02, & ! + 2.300750e-02, 2.239736e-02, 2.181878e-02, 2.126937e-02, 2.074699e-02, & ! + 2.024968e-02, 1.977567e-02, 1.932338e-02, 1.889134e-02, 1.847823e-02, & ! + 1.808281e-02, & ! + 4.881605e-01, 3.055237e-01, 2.225070e-01, 1.750688e-01, 1.443736e-01, & ! 4 + 1.228869e-01, 1.070054e-01, 9.478893e-02, 8.509997e-02, 7.722769e-02, & ! + 7.070495e-02, 6.521211e-02, 6.052311e-02, 5.647351e-02, 5.294088e-02, & ! + 4.983217e-02, 4.707539e-02, 4.461398e-02, 4.240288e-02, 4.040575e-02, & ! + 3.859298e-02, 3.694016e-02, 3.542701e-02, 3.403655e-02, 3.275444e-02, & ! + 3.156849e-02, 3.046827e-02, 2.944481e-02, 2.849034e-02, 2.759812e-02, & ! + 2.676226e-02, 2.597757e-02, 2.523949e-02, 2.454400e-02, 2.388750e-02, & ! + 2.326682e-02, 2.267909e-02, 2.212176e-02, 2.159253e-02, 2.108933e-02, & ! + 2.061028e-02, 2.015369e-02, 1.971801e-02, 1.930184e-02, 1.890389e-02, & ! + 1.852300e-02, & ! + 5.103703e-01, 3.188144e-01, 2.317435e-01, 1.819887e-01, 1.497944e-01, & ! 5 + 1.272584e-01, 1.106013e-01, 9.778822e-02, 8.762610e-02, 7.936938e-02, & ! + 7.252809e-02, 6.676701e-02, 6.184901e-02, 5.760165e-02, 5.389651e-02, & ! + 5.063598e-02, 4.774457e-02, 4.516295e-02, 4.284387e-02, 4.074922e-02, & ! + 3.884792e-02, 3.711438e-02, 3.552734e-02, 3.406898e-02, 3.272425e-02, & ! + 3.148038e-02, 3.032643e-02, 2.925299e-02, 2.825191e-02, 2.731612e-02, & ! + 2.643943e-02, 2.561642e-02, 2.484230e-02, 2.411284e-02, 2.342429e-02, & ! + 2.277329e-02, 2.215686e-02, 2.157231e-02, 2.101724e-02, 2.048946e-02, & ! + 1.998702e-02, 1.950813e-02, 1.905118e-02, 1.861468e-02, 1.819730e-02, & ! + 1.779781e-02, & ! + 5.031161e-01, 3.144511e-01, 2.286942e-01, 1.796903e-01, 1.479819e-01, & ! 6 + 1.257860e-01, 1.093803e-01, 9.676059e-02, 8.675183e-02, 7.861971e-02, & ! + 7.188168e-02, 6.620754e-02, 6.136376e-02, 5.718050e-02, 5.353127e-02, & ! + 5.031995e-02, 4.747218e-02, 4.492952e-02, 4.264544e-02, 4.058240e-02, & ! + 3.870979e-02, 3.700242e-02, 3.543933e-02, 3.400297e-02, 3.267854e-02, & ! + 3.145345e-02, 3.031691e-02, 2.925967e-02, 2.827370e-02, 2.735203e-02, & ! + 2.648858e-02, 2.567798e-02, 2.491555e-02, 2.419710e-02, 2.351893e-02, & ! + 2.287776e-02, 2.227063e-02, 2.169491e-02, 2.114821e-02, 2.062840e-02, & ! + 2.013354e-02, 1.966188e-02, 1.921182e-02, 1.878191e-02, 1.837083e-02, & ! + 1.797737e-02, & ! + 4.949453e-01, 3.095918e-01, 2.253402e-01, 1.771964e-01, 1.460446e-01, & ! 7 + 1.242383e-01, 1.081206e-01, 9.572235e-02, 8.588928e-02, 7.789990e-02, & ! + 7.128013e-02, 6.570559e-02, 6.094684e-02, 5.683701e-02, 5.325183e-02, & ! + 5.009688e-02, 4.729909e-02, 4.480106e-02, 4.255708e-02, 4.053025e-02, & ! + 3.869051e-02, 3.701310e-02, 3.547745e-02, 3.406631e-02, 3.276512e-02, & ! + 3.156153e-02, 3.044494e-02, 2.940626e-02, 2.843759e-02, 2.753211e-02, & ! + 2.668381e-02, 2.588744e-02, 2.513839e-02, 2.443255e-02, 2.376629e-02, & ! + 2.313637e-02, 2.253990e-02, 2.197428e-02, 2.143718e-02, 2.092649e-02, & ! + 2.044032e-02, 1.997694e-02, 1.953478e-02, 1.911241e-02, 1.870855e-02, & ! + 1.832199e-02, & ! + 5.052816e-01, 3.157665e-01, 2.296233e-01, 1.803986e-01, 1.485473e-01, & ! 8 + 1.262514e-01, 1.097718e-01, 9.709524e-02, 8.704139e-02, 7.887264e-02, & ! + 7.210424e-02, 6.640454e-02, 6.153894e-02, 5.733683e-02, 5.367116e-02, & ! + 5.044537e-02, 4.758477e-02, 4.503066e-02, 4.273629e-02, 4.066395e-02, & ! + 3.878291e-02, 3.706784e-02, 3.549771e-02, 3.405488e-02, 3.272448e-02, & ! + 3.149387e-02, 3.035221e-02, 2.929020e-02, 2.829979e-02, 2.737397e-02, & ! + 2.650663e-02, 2.569238e-02, 2.492651e-02, 2.420482e-02, 2.352361e-02, & ! + 2.287954e-02, 2.226968e-02, 2.169136e-02, 2.114220e-02, 2.062005e-02, & ! + 2.012296e-02, 1.964917e-02, 1.919709e-02, 1.876524e-02, 1.835231e-02, & ! + 1.795707e-02, & ! + 5.042067e-01, 3.151195e-01, 2.291708e-01, 1.800573e-01, 1.482779e-01, & ! 9 + 1.260324e-01, 1.095900e-01, 9.694202e-02, 8.691087e-02, 7.876056e-02, & ! + 7.200745e-02, 6.632062e-02, 6.146600e-02, 5.727338e-02, 5.361599e-02, & ! + 5.039749e-02, 4.754334e-02, 4.499500e-02, 4.270580e-02, 4.063815e-02, & ! + 3.876135e-02, 3.705016e-02, 3.548357e-02, 3.404400e-02, 3.271661e-02, & ! + 3.148877e-02, 3.034969e-02, 2.929008e-02, 2.830191e-02, 2.737818e-02, & ! + 2.651279e-02, 2.570039e-02, 2.493624e-02, 2.421618e-02, 2.353650e-02, & ! + 2.289390e-02, 2.228541e-02, 2.170840e-02, 2.116048e-02, 2.063950e-02, & ! + 2.014354e-02, 1.967082e-02, 1.921975e-02, 1.878888e-02, 1.837688e-02, & ! + 1.798254e-02, & ! + 5.022507e-01, 3.139246e-01, 2.283218e-01, 1.794059e-01, 1.477544e-01, & ! 10 + 1.255984e-01, 1.092222e-01, 9.662516e-02, 8.663439e-02, 7.851688e-02, & ! + 7.179095e-02, 6.612700e-02, 6.129193e-02, 5.711618e-02, 5.347351e-02, & ! + 5.026796e-02, 4.742530e-02, 4.488721e-02, 4.260724e-02, 4.054790e-02, & ! + 3.867866e-02, 3.697435e-02, 3.541407e-02, 3.398029e-02, 3.265824e-02, & ! + 3.143535e-02, 3.030085e-02, 2.924551e-02, 2.826131e-02, 2.734130e-02, & ! + 2.647939e-02, 2.567026e-02, 2.490919e-02, 2.419203e-02, 2.351509e-02, & ! + 2.287507e-02, 2.226903e-02, 2.169434e-02, 2.114862e-02, 2.062975e-02, & ! + 2.013578e-02, 1.966496e-02, 1.921571e-02, 1.878658e-02, 1.837623e-02, & ! + 1.798348e-02, & ! + 5.068316e-01, 3.166869e-01, 2.302576e-01, 1.808693e-01, 1.489122e-01, & ! 11 + 1.265423e-01, 1.100080e-01, 9.728926e-02, 8.720201e-02, 7.900612e-02, & ! + 7.221524e-02, 6.649660e-02, 6.161484e-02, 5.739877e-02, 5.372093e-02, & ! + 5.048442e-02, 4.761431e-02, 4.505172e-02, 4.274972e-02, 4.067050e-02, & ! + 3.878321e-02, 3.706244e-02, 3.548710e-02, 3.403948e-02, 3.270466e-02, & ! + 3.146995e-02, 3.032450e-02, 2.925897e-02, 2.826527e-02, 2.733638e-02, & ! + 2.646615e-02, 2.564920e-02, 2.488078e-02, 2.415670e-02, 2.347322e-02, & ! + 2.282702e-02, 2.221513e-02, 2.163489e-02, 2.108390e-02, 2.056002e-02, & ! + 2.006128e-02, 1.958591e-02, 1.913232e-02, 1.869904e-02, 1.828474e-02, & ! + 1.788819e-02, & ! + 5.077707e-01, 3.172636e-01, 2.306695e-01, 1.811871e-01, 1.491691e-01, & ! 12 + 1.267565e-01, 1.101907e-01, 9.744773e-02, 8.734125e-02, 7.912973e-02, & ! + 7.232591e-02, 6.659637e-02, 6.170530e-02, 5.748120e-02, 5.379634e-02, & ! + 5.055367e-02, 4.767809e-02, 4.511061e-02, 4.280423e-02, 4.072104e-02, & ! + 3.883015e-02, 3.710611e-02, 3.552776e-02, 3.407738e-02, 3.274002e-02, & ! + 3.150296e-02, 3.035532e-02, 2.928776e-02, 2.829216e-02, 2.736150e-02, & ! + 2.648961e-02, 2.567111e-02, 2.490123e-02, 2.417576e-02, 2.349098e-02, & ! + 2.284354e-02, 2.223049e-02, 2.164914e-02, 2.109711e-02, 2.057222e-02, & ! + 2.007253e-02, 1.959626e-02, 1.914181e-02, 1.870770e-02, 1.829261e-02, & ! + 1.789531e-02, & ! + 5.062281e-01, 3.163402e-01, 2.300275e-01, 1.807060e-01, 1.487921e-01, & ! 13 + 1.264523e-01, 1.099403e-01, 9.723879e-02, 8.716516e-02, 7.898034e-02, & ! + 7.219863e-02, 6.648771e-02, 6.161254e-02, 5.740217e-02, 5.372929e-02, & ! + 5.049716e-02, 4.763092e-02, 4.507179e-02, 4.277290e-02, 4.069649e-02, & ! + 3.881175e-02, 3.709331e-02, 3.552008e-02, 3.407442e-02, 3.274141e-02, & ! + 3.150837e-02, 3.036447e-02, 2.930037e-02, 2.830801e-02, 2.738037e-02, & ! + 2.651132e-02, 2.569547e-02, 2.492810e-02, 2.420499e-02, 2.352243e-02, & ! + 2.287710e-02, 2.226604e-02, 2.168658e-02, 2.113634e-02, 2.061316e-02, & ! + 2.011510e-02, 1.964038e-02, 1.918740e-02, 1.875471e-02, 1.834096e-02, & ! + 1.794495e-02, & ! + 1.338834e-01, 1.924912e-01, 1.755523e-01, 1.534793e-01, 1.343937e-01, & ! 14 + 1.187883e-01, 1.060654e-01, 9.559106e-02, 8.685880e-02, 7.948698e-02, & ! + 7.319086e-02, 6.775669e-02, 6.302215e-02, 5.886236e-02, 5.517996e-02, & ! + 5.189810e-02, 4.895539e-02, 4.630225e-02, 4.389823e-02, 4.171002e-02, & ! + 3.970998e-02, 3.787493e-02, 3.618537e-02, 3.462471e-02, 3.317880e-02, & ! + 3.183547e-02, 3.058421e-02, 2.941590e-02, 2.832256e-02, 2.729724e-02, & ! + 2.633377e-02, 2.542675e-02, 2.457136e-02, 2.376332e-02, 2.299882e-02, & ! + 2.227443e-02, 2.158707e-02, 2.093400e-02, 2.031270e-02, 1.972091e-02, & ! + 1.915659e-02, 1.861787e-02, 1.810304e-02, 1.761055e-02, 1.713899e-02, & ! + 1.668704e-02 /), & ! + shape = (/46,nBandsSW_RRTMG/)) + + real(kind_phys),dimension(46,nBandsSW_RRTMG),parameter :: & ! + ssaice3 = reshape(source= (/ & ! + 6.749442e-01, 6.649947e-01, 6.565828e-01, 6.489928e-01, 6.420046e-01, & ! 1 + 6.355231e-01, 6.294964e-01, 6.238901e-01, 6.186783e-01, 6.138395e-01, & ! + 6.093543e-01, 6.052049e-01, 6.013742e-01, 5.978457e-01, 5.946030e-01, & ! + 5.916302e-01, 5.889115e-01, 5.864310e-01, 5.841731e-01, 5.821221e-01, & ! + 5.802624e-01, 5.785785e-01, 5.770549e-01, 5.756759e-01, 5.744262e-01, & ! + 5.732901e-01, 5.722524e-01, 5.712974e-01, 5.704097e-01, 5.695739e-01, & ! + 5.687747e-01, 5.679964e-01, 5.672238e-01, 5.664415e-01, 5.656340e-01, & ! + 5.647860e-01, 5.638821e-01, 5.629070e-01, 5.618452e-01, 5.606815e-01, & ! + 5.594006e-01, 5.579870e-01, 5.564255e-01, 5.547008e-01, 5.527976e-01, & ! + 5.507005e-01, & ! + 7.628550e-01, 7.567297e-01, 7.508463e-01, 7.451972e-01, 7.397745e-01, & ! 2 + 7.345705e-01, 7.295775e-01, 7.247881e-01, 7.201945e-01, 7.157894e-01, & ! + 7.115652e-01, 7.075145e-01, 7.036300e-01, 6.999044e-01, 6.963304e-01, & ! + 6.929007e-01, 6.896083e-01, 6.864460e-01, 6.834067e-01, 6.804833e-01, & ! + 6.776690e-01, 6.749567e-01, 6.723397e-01, 6.698109e-01, 6.673637e-01, & ! + 6.649913e-01, 6.626870e-01, 6.604441e-01, 6.582561e-01, 6.561163e-01, & ! + 6.540182e-01, 6.519554e-01, 6.499215e-01, 6.479099e-01, 6.459145e-01, & ! + 6.439289e-01, 6.419468e-01, 6.399621e-01, 6.379686e-01, 6.359601e-01, & ! + 6.339306e-01, 6.318740e-01, 6.297845e-01, 6.276559e-01, 6.254825e-01, & ! + 6.232583e-01, & ! + 9.924147e-01, 9.882792e-01, 9.842257e-01, 9.802522e-01, 9.763566e-01, & ! 3 + 9.725367e-01, 9.687905e-01, 9.651157e-01, 9.615104e-01, 9.579725e-01, & ! + 9.544997e-01, 9.510901e-01, 9.477416e-01, 9.444520e-01, 9.412194e-01, & ! + 9.380415e-01, 9.349165e-01, 9.318421e-01, 9.288164e-01, 9.258373e-01, & ! + 9.229027e-01, 9.200106e-01, 9.171589e-01, 9.143457e-01, 9.115688e-01, & ! + 9.088263e-01, 9.061161e-01, 9.034362e-01, 9.007846e-01, 8.981592e-01, & ! + 8.955581e-01, 8.929792e-01, 8.904206e-01, 8.878803e-01, 8.853562e-01, & ! + 8.828464e-01, 8.803488e-01, 8.778616e-01, 8.753827e-01, 8.729102e-01, & ! + 8.704421e-01, 8.679764e-01, 8.655112e-01, 8.630445e-01, 8.605744e-01, & ! + 8.580989e-01, & ! + 9.629413e-01, 9.517182e-01, 9.409209e-01, 9.305366e-01, 9.205529e-01, & ! 4 + 9.109569e-01, 9.017362e-01, 8.928780e-01, 8.843699e-01, 8.761992e-01, & ! + 8.683536e-01, 8.608204e-01, 8.535873e-01, 8.466417e-01, 8.399712e-01, & ! + 8.335635e-01, 8.274062e-01, 8.214868e-01, 8.157932e-01, 8.103129e-01, & ! + 8.050336e-01, 7.999432e-01, 7.950294e-01, 7.902798e-01, 7.856825e-01, & ! + 7.812250e-01, 7.768954e-01, 7.726815e-01, 7.685711e-01, 7.645522e-01, & ! + 7.606126e-01, 7.567404e-01, 7.529234e-01, 7.491498e-01, 7.454074e-01, & ! + 7.416844e-01, 7.379688e-01, 7.342485e-01, 7.305118e-01, 7.267468e-01, & ! + 7.229415e-01, 7.190841e-01, 7.151628e-01, 7.111657e-01, 7.070811e-01, & ! + 7.028972e-01, & ! + 9.942270e-01, 9.909206e-01, 9.876775e-01, 9.844960e-01, 9.813746e-01, & ! 5 + 9.783114e-01, 9.753049e-01, 9.723535e-01, 9.694553e-01, 9.666088e-01, & ! + 9.638123e-01, 9.610641e-01, 9.583626e-01, 9.557060e-01, 9.530928e-01, & ! + 9.505211e-01, 9.479895e-01, 9.454961e-01, 9.430393e-01, 9.406174e-01, & ! + 9.382288e-01, 9.358717e-01, 9.335446e-01, 9.312456e-01, 9.289731e-01, & ! + 9.267255e-01, 9.245010e-01, 9.222980e-01, 9.201147e-01, 9.179496e-01, & ! + 9.158008e-01, 9.136667e-01, 9.115457e-01, 9.094359e-01, 9.073358e-01, & ! + 9.052436e-01, 9.031577e-01, 9.010763e-01, 8.989977e-01, 8.969203e-01, & ! + 8.948423e-01, 8.927620e-01, 8.906778e-01, 8.885879e-01, 8.864907e-01, & ! + 8.843843e-01, & ! + 9.934014e-01, 9.899331e-01, 9.865537e-01, 9.832610e-01, 9.800523e-01, & ! 6 + 9.769254e-01, 9.738777e-01, 9.709069e-01, 9.680106e-01, 9.651862e-01, & ! + 9.624315e-01, 9.597439e-01, 9.571212e-01, 9.545608e-01, 9.520605e-01, & ! + 9.496177e-01, 9.472301e-01, 9.448954e-01, 9.426111e-01, 9.403749e-01, & ! + 9.381843e-01, 9.360370e-01, 9.339307e-01, 9.318629e-01, 9.298313e-01, & ! + 9.278336e-01, 9.258673e-01, 9.239302e-01, 9.220198e-01, 9.201338e-01, & ! + 9.182700e-01, 9.164258e-01, 9.145991e-01, 9.127874e-01, 9.109884e-01, & ! + 9.091999e-01, 9.074194e-01, 9.056447e-01, 9.038735e-01, 9.021033e-01, & ! + 9.003320e-01, 8.985572e-01, 8.967766e-01, 8.949879e-01, 8.931888e-01, & ! + 8.913770e-01, & ! + 9.994833e-01, 9.992055e-01, 9.989278e-01, 9.986500e-01, 9.983724e-01, & ! 7 + 9.980947e-01, 9.978172e-01, 9.975397e-01, 9.972623e-01, 9.969849e-01, & ! + 9.967077e-01, 9.964305e-01, 9.961535e-01, 9.958765e-01, 9.955997e-01, & ! + 9.953230e-01, 9.950464e-01, 9.947699e-01, 9.944936e-01, 9.942174e-01, & ! + 9.939414e-01, 9.936656e-01, 9.933899e-01, 9.931144e-01, 9.928390e-01, & ! + 9.925639e-01, 9.922889e-01, 9.920141e-01, 9.917396e-01, 9.914652e-01, & ! + 9.911911e-01, 9.909171e-01, 9.906434e-01, 9.903700e-01, 9.900967e-01, & ! + 9.898237e-01, 9.895510e-01, 9.892784e-01, 9.890062e-01, 9.887342e-01, & ! + 9.884625e-01, 9.881911e-01, 9.879199e-01, 9.876490e-01, 9.873784e-01, & ! + 9.871081e-01, & ! + 9.999343e-01, 9.998917e-01, 9.998492e-01, 9.998067e-01, 9.997642e-01, & ! 8 + 9.997218e-01, 9.996795e-01, 9.996372e-01, 9.995949e-01, 9.995528e-01, & ! + 9.995106e-01, 9.994686e-01, 9.994265e-01, 9.993845e-01, 9.993426e-01, & ! + 9.993007e-01, 9.992589e-01, 9.992171e-01, 9.991754e-01, 9.991337e-01, & ! + 9.990921e-01, 9.990505e-01, 9.990089e-01, 9.989674e-01, 9.989260e-01, & ! + 9.988846e-01, 9.988432e-01, 9.988019e-01, 9.987606e-01, 9.987194e-01, & ! + 9.986782e-01, 9.986370e-01, 9.985959e-01, 9.985549e-01, 9.985139e-01, & ! + 9.984729e-01, 9.984319e-01, 9.983910e-01, 9.983502e-01, 9.983094e-01, & ! + 9.982686e-01, 9.982279e-01, 9.981872e-01, 9.981465e-01, 9.981059e-01, & ! + 9.980653e-01, & ! + 9.999978e-01, 9.999965e-01, 9.999952e-01, 9.999939e-01, 9.999926e-01, & ! 9 + 9.999913e-01, 9.999900e-01, 9.999887e-01, 9.999873e-01, 9.999860e-01, & ! + 9.999847e-01, 9.999834e-01, 9.999821e-01, 9.999808e-01, 9.999795e-01, & ! + 9.999782e-01, 9.999769e-01, 9.999756e-01, 9.999743e-01, 9.999730e-01, & ! + 9.999717e-01, 9.999704e-01, 9.999691e-01, 9.999678e-01, 9.999665e-01, & ! + 9.999652e-01, 9.999639e-01, 9.999626e-01, 9.999613e-01, 9.999600e-01, & ! + 9.999587e-01, 9.999574e-01, 9.999561e-01, 9.999548e-01, 9.999535e-01, & ! + 9.999522e-01, 9.999509e-01, 9.999496e-01, 9.999483e-01, 9.999470e-01, & ! + 9.999457e-01, 9.999444e-01, 9.999431e-01, 9.999418e-01, 9.999405e-01, & ! + 9.999392e-01, & ! + 9.999994e-01, 9.999993e-01, 9.999991e-01, 9.999990e-01, 9.999989e-01, & ! 10 + 9.999987e-01, 9.999986e-01, 9.999984e-01, 9.999983e-01, 9.999982e-01, & ! + 9.999980e-01, 9.999979e-01, 9.999977e-01, 9.999976e-01, 9.999975e-01, & ! + 9.999973e-01, 9.999972e-01, 9.999970e-01, 9.999969e-01, 9.999967e-01, & ! + 9.999966e-01, 9.999965e-01, 9.999963e-01, 9.999962e-01, 9.999960e-01, & ! + 9.999959e-01, 9.999957e-01, 9.999956e-01, 9.999954e-01, 9.999953e-01, & ! + 9.999952e-01, 9.999950e-01, 9.999949e-01, 9.999947e-01, 9.999946e-01, & ! + 9.999944e-01, 9.999943e-01, 9.999941e-01, 9.999940e-01, 9.999939e-01, & ! + 9.999937e-01, 9.999936e-01, 9.999934e-01, 9.999933e-01, 9.999931e-01, & ! + 9.999930e-01, & ! + 9.999997e-01, 9.999995e-01, 9.999992e-01, 9.999990e-01, 9.999987e-01, & ! 11 + 9.999985e-01, 9.999983e-01, 9.999980e-01, 9.999978e-01, 9.999976e-01, & ! + 9.999973e-01, 9.999971e-01, 9.999969e-01, 9.999967e-01, 9.999965e-01, & ! + 9.999963e-01, 9.999960e-01, 9.999958e-01, 9.999956e-01, 9.999954e-01, & ! + 9.999952e-01, 9.999950e-01, 9.999948e-01, 9.999946e-01, 9.999944e-01, & ! + 9.999942e-01, 9.999939e-01, 9.999937e-01, 9.999935e-01, 9.999933e-01, & ! + 9.999931e-01, 9.999929e-01, 9.999927e-01, 9.999925e-01, 9.999923e-01, & ! + 9.999920e-01, 9.999918e-01, 9.999916e-01, 9.999914e-01, 9.999911e-01, & ! + 9.999909e-01, 9.999907e-01, 9.999905e-01, 9.999902e-01, 9.999900e-01, & ! + 9.999897e-01, & ! + 9.999991e-01, 9.999985e-01, 9.999980e-01, 9.999974e-01, 9.999968e-01, & ! 12 + 9.999963e-01, 9.999957e-01, 9.999951e-01, 9.999946e-01, 9.999940e-01, & ! + 9.999934e-01, 9.999929e-01, 9.999923e-01, 9.999918e-01, 9.999912e-01, & ! + 9.999907e-01, 9.999901e-01, 9.999896e-01, 9.999891e-01, 9.999885e-01, & ! + 9.999880e-01, 9.999874e-01, 9.999869e-01, 9.999863e-01, 9.999858e-01, & ! + 9.999853e-01, 9.999847e-01, 9.999842e-01, 9.999836e-01, 9.999831e-01, & ! + 9.999826e-01, 9.999820e-01, 9.999815e-01, 9.999809e-01, 9.999804e-01, & ! + 9.999798e-01, 9.999793e-01, 9.999787e-01, 9.999782e-01, 9.999776e-01, & ! + 9.999770e-01, 9.999765e-01, 9.999759e-01, 9.999754e-01, 9.999748e-01, & ! + 9.999742e-01, & ! + 9.999975e-01, 9.999961e-01, 9.999946e-01, 9.999931e-01, 9.999917e-01, & ! 13 + 9.999903e-01, 9.999888e-01, 9.999874e-01, 9.999859e-01, 9.999845e-01, & ! + 9.999831e-01, 9.999816e-01, 9.999802e-01, 9.999788e-01, 9.999774e-01, & ! + 9.999759e-01, 9.999745e-01, 9.999731e-01, 9.999717e-01, 9.999702e-01, & ! + 9.999688e-01, 9.999674e-01, 9.999660e-01, 9.999646e-01, 9.999631e-01, & ! + 9.999617e-01, 9.999603e-01, 9.999589e-01, 9.999574e-01, 9.999560e-01, & ! + 9.999546e-01, 9.999532e-01, 9.999517e-01, 9.999503e-01, 9.999489e-01, & ! + 9.999474e-01, 9.999460e-01, 9.999446e-01, 9.999431e-01, 9.999417e-01, & ! + 9.999403e-01, 9.999388e-01, 9.999374e-01, 9.999359e-01, 9.999345e-01, & ! + 9.999330e-01, & ! + 4.526500e-01, 5.287890e-01, 5.410487e-01, 5.459865e-01, 5.485149e-01, & ! 14 + 5.498914e-01, 5.505895e-01, 5.508310e-01, 5.507364e-01, 5.503793e-01, & ! + 5.498090e-01, 5.490612e-01, 5.481637e-01, 5.471395e-01, 5.460083e-01, & ! + 5.447878e-01, 5.434946e-01, 5.421442e-01, 5.407514e-01, 5.393309e-01, & ! + 5.378970e-01, 5.364641e-01, 5.350464e-01, 5.336582e-01, 5.323140e-01, & ! + 5.310283e-01, 5.298158e-01, 5.286914e-01, 5.276704e-01, 5.267680e-01, & ! + 5.260000e-01, 5.253823e-01, 5.249311e-01, 5.246629e-01, 5.245946e-01, & ! + 5.247434e-01, 5.251268e-01, 5.257626e-01, 5.266693e-01, 5.278653e-01, & ! + 5.293698e-01, 5.312022e-01, 5.333823e-01, 5.359305e-01, 5.388676e-01, & ! + 5.422146e-01/), & ! + shape = (/46,nBandsSW_RRTMG/)) + + real(kind_phys),dimension(46,nBandsSW_RRTMG),parameter :: & ! + asyice3 = reshape(source= (/ & ! + 8.340752e-01, 8.435170e-01, 8.517487e-01, 8.592064e-01, 8.660387e-01, & ! 1 + 8.723204e-01, 8.780997e-01, 8.834137e-01, 8.882934e-01, 8.927662e-01, & ! + 8.968577e-01, 9.005914e-01, 9.039899e-01, 9.070745e-01, 9.098659e-01, & ! + 9.123836e-01, 9.146466e-01, 9.166734e-01, 9.184817e-01, 9.200886e-01, & ! + 9.215109e-01, 9.227648e-01, 9.238661e-01, 9.248304e-01, 9.256727e-01, & ! + 9.264078e-01, 9.270505e-01, 9.276150e-01, 9.281156e-01, 9.285662e-01, & ! + 9.289806e-01, 9.293726e-01, 9.297557e-01, 9.301435e-01, 9.305491e-01, & ! + 9.309859e-01, 9.314671e-01, 9.320055e-01, 9.326140e-01, 9.333053e-01, & ! + 9.340919e-01, 9.349861e-01, 9.360000e-01, 9.371451e-01, 9.384329e-01, & ! + 9.398744e-01, & ! + 8.728160e-01, 8.777333e-01, 8.823754e-01, 8.867535e-01, 8.908785e-01, & ! 2 + 8.947611e-01, 8.984118e-01, 9.018408e-01, 9.050582e-01, 9.080739e-01, & ! + 9.108976e-01, 9.135388e-01, 9.160068e-01, 9.183106e-01, 9.204595e-01, & ! + 9.224620e-01, 9.243271e-01, 9.260632e-01, 9.276788e-01, 9.291822e-01, & ! + 9.305817e-01, 9.318853e-01, 9.331012e-01, 9.342372e-01, 9.353013e-01, & ! + 9.363013e-01, 9.372450e-01, 9.381400e-01, 9.389939e-01, 9.398145e-01, & ! + 9.406092e-01, 9.413856e-01, 9.421511e-01, 9.429131e-01, 9.436790e-01, & ! + 9.444561e-01, 9.452517e-01, 9.460729e-01, 9.469270e-01, 9.478209e-01, & ! + 9.487617e-01, 9.497562e-01, 9.508112e-01, 9.519335e-01, 9.531294e-01, & ! + 9.544055e-01, & ! + 7.897566e-01, 7.948704e-01, 7.998041e-01, 8.045623e-01, 8.091495e-01, & ! 3 + 8.135702e-01, 8.178290e-01, 8.219305e-01, 8.258790e-01, 8.296792e-01, & ! + 8.333355e-01, 8.368524e-01, 8.402343e-01, 8.434856e-01, 8.466108e-01, & ! + 8.496143e-01, 8.525004e-01, 8.552737e-01, 8.579384e-01, 8.604990e-01, & ! + 8.629597e-01, 8.653250e-01, 8.675992e-01, 8.697867e-01, 8.718916e-01, & ! + 8.739185e-01, 8.758715e-01, 8.777551e-01, 8.795734e-01, 8.813308e-01, & ! + 8.830315e-01, 8.846799e-01, 8.862802e-01, 8.878366e-01, 8.893534e-01, & ! + 8.908350e-01, 8.922854e-01, 8.937090e-01, 8.951099e-01, 8.964925e-01, & ! + 8.978609e-01, 8.992192e-01, 9.005718e-01, 9.019229e-01, 9.032765e-01, & ! + 9.046369e-01, & ! + 7.812615e-01, 7.887764e-01, 7.959664e-01, 8.028413e-01, 8.094109e-01, & ! 4 + 8.156849e-01, 8.216730e-01, 8.273846e-01, 8.328294e-01, 8.380166e-01, & ! + 8.429556e-01, 8.476556e-01, 8.521258e-01, 8.563753e-01, 8.604131e-01, & ! + 8.642481e-01, 8.678893e-01, 8.713455e-01, 8.746254e-01, 8.777378e-01, & ! + 8.806914e-01, 8.834948e-01, 8.861566e-01, 8.886854e-01, 8.910897e-01, & ! + 8.933779e-01, 8.955586e-01, 8.976402e-01, 8.996311e-01, 9.015398e-01, & ! + 9.033745e-01, 9.051436e-01, 9.068555e-01, 9.085185e-01, 9.101410e-01, & ! + 9.117311e-01, 9.132972e-01, 9.148476e-01, 9.163905e-01, 9.179340e-01, & ! + 9.194864e-01, 9.210559e-01, 9.226505e-01, 9.242784e-01, 9.259476e-01, & ! + 9.276661e-01, & ! + 7.640720e-01, 7.691119e-01, 7.739941e-01, 7.787222e-01, 7.832998e-01, & ! 5 + 7.877304e-01, 7.920177e-01, 7.961652e-01, 8.001765e-01, 8.040551e-01, & ! + 8.078044e-01, 8.114280e-01, 8.149294e-01, 8.183119e-01, 8.215791e-01, & ! + 8.247344e-01, 8.277812e-01, 8.307229e-01, 8.335629e-01, 8.363046e-01, & ! + 8.389514e-01, 8.415067e-01, 8.439738e-01, 8.463560e-01, 8.486568e-01, & ! + 8.508795e-01, 8.530274e-01, 8.551039e-01, 8.571122e-01, 8.590558e-01, & ! + 8.609378e-01, 8.627618e-01, 8.645309e-01, 8.662485e-01, 8.679178e-01, & ! + 8.695423e-01, 8.711251e-01, 8.726697e-01, 8.741792e-01, 8.756571e-01, & ! + 8.771065e-01, 8.785307e-01, 8.799331e-01, 8.813169e-01, 8.826854e-01, & ! + 8.840419e-01, & ! + 7.602598e-01, 7.651572e-01, 7.699014e-01, 7.744962e-01, 7.789452e-01, & ! 6 + 7.832522e-01, 7.874205e-01, 7.914538e-01, 7.953555e-01, 7.991290e-01, & ! + 8.027777e-01, 8.063049e-01, 8.097140e-01, 8.130081e-01, 8.161906e-01, & ! + 8.192645e-01, 8.222331e-01, 8.250993e-01, 8.278664e-01, 8.305374e-01, & ! + 8.331153e-01, 8.356030e-01, 8.380037e-01, 8.403201e-01, 8.425553e-01, & ! + 8.447121e-01, 8.467935e-01, 8.488022e-01, 8.507412e-01, 8.526132e-01, & ! + 8.544210e-01, 8.561675e-01, 8.578554e-01, 8.594875e-01, 8.610665e-01, & ! + 8.625951e-01, 8.640760e-01, 8.655119e-01, 8.669055e-01, 8.682594e-01, & ! + 8.695763e-01, 8.708587e-01, 8.721094e-01, 8.733308e-01, 8.745255e-01, & ! + 8.756961e-01, & ! + 7.568957e-01, 7.606995e-01, 7.644072e-01, 7.680204e-01, 7.715402e-01, & ! 7 + 7.749682e-01, 7.783057e-01, 7.815541e-01, 7.847148e-01, 7.877892e-01, & ! + 7.907786e-01, 7.936846e-01, 7.965084e-01, 7.992515e-01, 8.019153e-01, & ! + 8.045011e-01, 8.070103e-01, 8.094444e-01, 8.118048e-01, 8.140927e-01, & ! + 8.163097e-01, 8.184571e-01, 8.205364e-01, 8.225488e-01, 8.244958e-01, & ! + 8.263789e-01, 8.281993e-01, 8.299586e-01, 8.316580e-01, 8.332991e-01, & ! + 8.348831e-01, 8.364115e-01, 8.378857e-01, 8.393071e-01, 8.406770e-01, & ! + 8.419969e-01, 8.432682e-01, 8.444923e-01, 8.456706e-01, 8.468044e-01, & ! + 8.478952e-01, 8.489444e-01, 8.499533e-01, 8.509234e-01, 8.518561e-01, & ! + 8.527528e-01, & ! + 7.575066e-01, 7.606912e-01, 7.638236e-01, 7.669035e-01, 7.699306e-01, & ! 8 + 7.729046e-01, 7.758254e-01, 7.786926e-01, 7.815060e-01, 7.842654e-01, & ! + 7.869705e-01, 7.896211e-01, 7.922168e-01, 7.947574e-01, 7.972428e-01, & ! + 7.996726e-01, 8.020466e-01, 8.043646e-01, 8.066262e-01, 8.088313e-01, & ! + 8.109796e-01, 8.130709e-01, 8.151049e-01, 8.170814e-01, 8.190001e-01, & ! + 8.208608e-01, 8.226632e-01, 8.244071e-01, 8.260924e-01, 8.277186e-01, & ! + 8.292856e-01, 8.307932e-01, 8.322411e-01, 8.336291e-01, 8.349570e-01, & ! + 8.362244e-01, 8.374312e-01, 8.385772e-01, 8.396621e-01, 8.406856e-01, & ! + 8.416476e-01, 8.425479e-01, 8.433861e-01, 8.441620e-01, 8.448755e-01, & ! + 8.455263e-01, & ! + 7.568829e-01, 7.597947e-01, 7.626745e-01, 7.655212e-01, 7.683337e-01, & ! 9 + 7.711111e-01, 7.738523e-01, 7.765565e-01, 7.792225e-01, 7.818494e-01, & ! + 7.844362e-01, 7.869819e-01, 7.894854e-01, 7.919459e-01, 7.943623e-01, & ! + 7.967337e-01, 7.990590e-01, 8.013373e-01, 8.035676e-01, 8.057488e-01, & ! + 8.078802e-01, 8.099605e-01, 8.119890e-01, 8.139645e-01, 8.158862e-01, & ! + 8.177530e-01, 8.195641e-01, 8.213183e-01, 8.230149e-01, 8.246527e-01, & ! + 8.262308e-01, 8.277483e-01, 8.292042e-01, 8.305976e-01, 8.319275e-01, & ! + 8.331929e-01, 8.343929e-01, 8.355265e-01, 8.365928e-01, 8.375909e-01, & ! + 8.385197e-01, 8.393784e-01, 8.401659e-01, 8.408815e-01, 8.415240e-01, & ! + 8.420926e-01, & ! + 7.548616e-01, 7.575454e-01, 7.602153e-01, 7.628696e-01, 7.655067e-01, & ! 10 + 7.681249e-01, 7.707225e-01, 7.732978e-01, 7.758492e-01, 7.783750e-01, & ! + 7.808735e-01, 7.833430e-01, 7.857819e-01, 7.881886e-01, 7.905612e-01, & ! + 7.928983e-01, 7.951980e-01, 7.974588e-01, 7.996789e-01, 8.018567e-01, & ! + 8.039905e-01, 8.060787e-01, 8.081196e-01, 8.101115e-01, 8.120527e-01, & ! + 8.139416e-01, 8.157764e-01, 8.175557e-01, 8.192776e-01, 8.209405e-01, & ! + 8.225427e-01, 8.240826e-01, 8.255585e-01, 8.269688e-01, 8.283117e-01, & ! + 8.295856e-01, 8.307889e-01, 8.319198e-01, 8.329767e-01, 8.339579e-01, & ! + 8.348619e-01, 8.356868e-01, 8.364311e-01, 8.370930e-01, 8.376710e-01, & ! + 8.381633e-01, & ! + 7.491854e-01, 7.518523e-01, 7.545089e-01, 7.571534e-01, 7.597839e-01, & ! 11 + 7.623987e-01, 7.649959e-01, 7.675737e-01, 7.701303e-01, 7.726639e-01, & ! + 7.751727e-01, 7.776548e-01, 7.801084e-01, 7.825318e-01, 7.849230e-01, & ! + 7.872804e-01, 7.896020e-01, 7.918862e-01, 7.941309e-01, 7.963345e-01, & ! + 7.984951e-01, 8.006109e-01, 8.026802e-01, 8.047009e-01, 8.066715e-01, & ! + 8.085900e-01, 8.104546e-01, 8.122636e-01, 8.140150e-01, 8.157072e-01, & ! + 8.173382e-01, 8.189063e-01, 8.204096e-01, 8.218464e-01, 8.232148e-01, & ! + 8.245130e-01, 8.257391e-01, 8.268915e-01, 8.279682e-01, 8.289675e-01, & ! + 8.298875e-01, 8.307264e-01, 8.314824e-01, 8.321537e-01, 8.327385e-01, & ! + 8.332350e-01, & ! + 7.397086e-01, 7.424069e-01, 7.450955e-01, 7.477725e-01, 7.504362e-01, & ! 12 + 7.530846e-01, 7.557159e-01, 7.583283e-01, 7.609199e-01, 7.634888e-01, & ! + 7.660332e-01, 7.685512e-01, 7.710411e-01, 7.735009e-01, 7.759288e-01, & ! + 7.783229e-01, 7.806814e-01, 7.830024e-01, 7.852841e-01, 7.875246e-01, & ! + 7.897221e-01, 7.918748e-01, 7.939807e-01, 7.960380e-01, 7.980449e-01, & ! + 7.999995e-01, 8.019000e-01, 8.037445e-01, 8.055311e-01, 8.072581e-01, & ! + 8.089235e-01, 8.105255e-01, 8.120623e-01, 8.135319e-01, 8.149326e-01, & ! + 8.162626e-01, 8.175198e-01, 8.187025e-01, 8.198089e-01, 8.208371e-01, & ! + 8.217852e-01, 8.226514e-01, 8.234338e-01, 8.241306e-01, 8.247399e-01, & ! + 8.252599e-01, & ! + 7.224533e-01, 7.251681e-01, 7.278728e-01, 7.305654e-01, 7.332444e-01, & ! 13 + 7.359078e-01, 7.385539e-01, 7.411808e-01, 7.437869e-01, 7.463702e-01, & ! + 7.489291e-01, 7.514616e-01, 7.539661e-01, 7.564408e-01, 7.588837e-01, & ! + 7.612933e-01, 7.636676e-01, 7.660049e-01, 7.683034e-01, 7.705612e-01, & ! + 7.727767e-01, 7.749480e-01, 7.770733e-01, 7.791509e-01, 7.811789e-01, & ! + 7.831556e-01, 7.850791e-01, 7.869478e-01, 7.887597e-01, 7.905131e-01, & ! + 7.922062e-01, 7.938372e-01, 7.954044e-01, 7.969059e-01, 7.983399e-01, & ! + 7.997047e-01, 8.009985e-01, 8.022195e-01, 8.033658e-01, 8.044357e-01, & ! + 8.054275e-01, 8.063392e-01, 8.071692e-01, 8.079157e-01, 8.085768e-01, & ! + 8.091507e-01, & ! + 8.850026e-01, 9.005489e-01, 9.069242e-01, 9.121799e-01, 9.168987e-01, & ! 14 + 9.212259e-01, 9.252176e-01, 9.289028e-01, 9.323000e-01, 9.354235e-01, & ! + 9.382858e-01, 9.408985e-01, 9.432734e-01, 9.454218e-01, 9.473557e-01, & ! + 9.490871e-01, 9.506282e-01, 9.519917e-01, 9.531904e-01, 9.542374e-01, & ! + 9.551461e-01, 9.559298e-01, 9.566023e-01, 9.571775e-01, 9.576692e-01, & ! + 9.580916e-01, 9.584589e-01, 9.587853e-01, 9.590851e-01, 9.593729e-01, & ! + 9.596632e-01, 9.599705e-01, 9.603096e-01, 9.606954e-01, 9.611427e-01, & ! + 9.616667e-01, 9.622826e-01, 9.630060e-01, 9.638524e-01, 9.648379e-01, & ! + 9.659788e-01, 9.672916e-01, 9.687933e-01, 9.705014e-01, 9.724337e-01, & ! + 9.746084e-01/), & ! + shape = (/46,nBandsSW_RRTMG/)) + + real(kind_phys),dimension(46,nBandsSW_RRTMG),parameter :: & ! + fdlice3 = reshape(source= (/ & ! + 4.959277e-02, 4.685292e-02, 4.426104e-02, 4.181231e-02, 3.950191e-02, & ! + 3.732500e-02, 3.527675e-02, 3.335235e-02, 3.154697e-02, 2.985578e-02, & ! + 2.827395e-02, 2.679666e-02, 2.541909e-02, 2.413640e-02, 2.294378e-02, & ! + 2.183639e-02, 2.080940e-02, 1.985801e-02, 1.897736e-02, 1.816265e-02, & ! + 1.740905e-02, 1.671172e-02, 1.606585e-02, 1.546661e-02, 1.490917e-02, & ! + 1.438870e-02, 1.390038e-02, 1.343939e-02, 1.300089e-02, 1.258006e-02, & ! + 1.217208e-02, 1.177212e-02, 1.137536e-02, 1.097696e-02, 1.057210e-02, & ! + 1.015596e-02, 9.723704e-03, 9.270516e-03, 8.791565e-03, 8.282026e-03, & ! + 7.737072e-03, 7.151879e-03, 6.521619e-03, 5.841467e-03, 5.106597e-03, & ! + 4.312183e-03, & ! + 5.071224e-02, 5.000217e-02, 4.933872e-02, 4.871992e-02, 4.814380e-02, & ! + 4.760839e-02, 4.711170e-02, 4.665177e-02, 4.622662e-02, 4.583426e-02, & ! + 4.547274e-02, 4.514007e-02, 4.483428e-02, 4.455340e-02, 4.429544e-02, & ! + 4.405844e-02, 4.384041e-02, 4.363939e-02, 4.345340e-02, 4.328047e-02, & ! + 4.311861e-02, 4.296586e-02, 4.282024e-02, 4.267977e-02, 4.254248e-02, & ! + 4.240640e-02, 4.226955e-02, 4.212995e-02, 4.198564e-02, 4.183462e-02, & ! + 4.167494e-02, 4.150462e-02, 4.132167e-02, 4.112413e-02, 4.091003e-02, & ! + 4.067737e-02, 4.042420e-02, 4.014854e-02, 3.984840e-02, 3.952183e-02, & ! + 3.916683e-02, 3.878144e-02, 3.836368e-02, 3.791158e-02, 3.742316e-02, & ! + 3.689645e-02, & ! + 1.062938e-01, 1.065234e-01, 1.067822e-01, 1.070682e-01, 1.073793e-01, & ! + 1.077137e-01, 1.080693e-01, 1.084442e-01, 1.088364e-01, 1.092439e-01, & ! + 1.096647e-01, 1.100970e-01, 1.105387e-01, 1.109878e-01, 1.114423e-01, & ! + 1.119004e-01, 1.123599e-01, 1.128190e-01, 1.132757e-01, 1.137279e-01, & ! + 1.141738e-01, 1.146113e-01, 1.150385e-01, 1.154534e-01, 1.158540e-01, & ! + 1.162383e-01, 1.166045e-01, 1.169504e-01, 1.172741e-01, 1.175738e-01, & ! + 1.178472e-01, 1.180926e-01, 1.183080e-01, 1.184913e-01, 1.186405e-01, & ! + 1.187538e-01, 1.188291e-01, 1.188645e-01, 1.188580e-01, 1.188076e-01, & ! + 1.187113e-01, 1.185672e-01, 1.183733e-01, 1.181277e-01, 1.178282e-01, & ! + 1.174731e-01, & ! + 1.076195e-01, 1.065195e-01, 1.054696e-01, 1.044673e-01, 1.035099e-01, & ! + 1.025951e-01, 1.017203e-01, 1.008831e-01, 1.000808e-01, 9.931116e-02, & ! + 9.857151e-02, 9.785939e-02, 9.717230e-02, 9.650774e-02, 9.586322e-02, & ! + 9.523623e-02, 9.462427e-02, 9.402484e-02, 9.343544e-02, 9.285358e-02, & ! + 9.227675e-02, 9.170245e-02, 9.112818e-02, 9.055144e-02, 8.996974e-02, & ! + 8.938056e-02, 8.878142e-02, 8.816981e-02, 8.754323e-02, 8.689919e-02, & ! + 8.623517e-02, 8.554869e-02, 8.483724e-02, 8.409832e-02, 8.332943e-02, & ! + 8.252807e-02, 8.169175e-02, 8.081795e-02, 7.990419e-02, 7.894796e-02, & ! + 7.794676e-02, 7.689809e-02, 7.579945e-02, 7.464834e-02, 7.344227e-02, & ! + 7.217872e-02, & ! + 1.119014e-01, 1.122706e-01, 1.126690e-01, 1.130947e-01, 1.135456e-01, & ! + 1.140199e-01, 1.145154e-01, 1.150302e-01, 1.155623e-01, 1.161096e-01, & ! + 1.166703e-01, 1.172422e-01, 1.178233e-01, 1.184118e-01, 1.190055e-01, & ! + 1.196025e-01, 1.202008e-01, 1.207983e-01, 1.213931e-01, 1.219832e-01, & ! + 1.225665e-01, 1.231411e-01, 1.237050e-01, 1.242561e-01, 1.247926e-01, & ! + 1.253122e-01, 1.258132e-01, 1.262934e-01, 1.267509e-01, 1.271836e-01, & ! + 1.275896e-01, 1.279669e-01, 1.283134e-01, 1.286272e-01, 1.289063e-01, & ! + 1.291486e-01, 1.293522e-01, 1.295150e-01, 1.296351e-01, 1.297104e-01, & ! + 1.297390e-01, 1.297189e-01, 1.296480e-01, 1.295244e-01, 1.293460e-01, & ! + 1.291109e-01, & ! + 1.133298e-01, 1.136777e-01, 1.140556e-01, 1.144615e-01, 1.148934e-01, & ! + 1.153492e-01, 1.158269e-01, 1.163243e-01, 1.168396e-01, 1.173706e-01, & ! + 1.179152e-01, 1.184715e-01, 1.190374e-01, 1.196108e-01, 1.201897e-01, & ! + 1.207720e-01, 1.213558e-01, 1.219389e-01, 1.225194e-01, 1.230951e-01, & ! + 1.236640e-01, 1.242241e-01, 1.247733e-01, 1.253096e-01, 1.258309e-01, & ! + 1.263352e-01, 1.268205e-01, 1.272847e-01, 1.277257e-01, 1.281415e-01, & ! + 1.285300e-01, 1.288893e-01, 1.292173e-01, 1.295118e-01, 1.297710e-01, & ! + 1.299927e-01, 1.301748e-01, 1.303154e-01, 1.304124e-01, 1.304637e-01, & ! + 1.304673e-01, 1.304212e-01, 1.303233e-01, 1.301715e-01, 1.299638e-01, & ! + 1.296983e-01, & ! + 1.145360e-01, 1.153256e-01, 1.161453e-01, 1.169929e-01, 1.178666e-01, & ! + 1.187641e-01, 1.196835e-01, 1.206227e-01, 1.215796e-01, 1.225522e-01, & ! + 1.235383e-01, 1.245361e-01, 1.255433e-01, 1.265579e-01, 1.275779e-01, & ! + 1.286011e-01, 1.296257e-01, 1.306494e-01, 1.316703e-01, 1.326862e-01, & ! + 1.336951e-01, 1.346950e-01, 1.356838e-01, 1.366594e-01, 1.376198e-01, & ! + 1.385629e-01, 1.394866e-01, 1.403889e-01, 1.412678e-01, 1.421212e-01, & ! + 1.429469e-01, 1.437430e-01, 1.445074e-01, 1.452381e-01, 1.459329e-01, & ! + 1.465899e-01, 1.472069e-01, 1.477819e-01, 1.483128e-01, 1.487976e-01, & ! + 1.492343e-01, 1.496207e-01, 1.499548e-01, 1.502346e-01, 1.504579e-01, & ! + 1.506227e-01, & ! + 1.153263e-01, 1.161445e-01, 1.169932e-01, 1.178703e-01, 1.187738e-01, & ! + 1.197016e-01, 1.206516e-01, 1.216217e-01, 1.226099e-01, 1.236141e-01, & ! + 1.246322e-01, 1.256621e-01, 1.267017e-01, 1.277491e-01, 1.288020e-01, & ! + 1.298584e-01, 1.309163e-01, 1.319736e-01, 1.330281e-01, 1.340778e-01, & ! + 1.351207e-01, 1.361546e-01, 1.371775e-01, 1.381873e-01, 1.391820e-01, & ! + 1.401593e-01, 1.411174e-01, 1.420540e-01, 1.429671e-01, 1.438547e-01, & ! + 1.447146e-01, 1.455449e-01, 1.463433e-01, 1.471078e-01, 1.478364e-01, & ! + 1.485270e-01, 1.491774e-01, 1.497857e-01, 1.503497e-01, 1.508674e-01, & ! + 1.513367e-01, 1.517554e-01, 1.521216e-01, 1.524332e-01, 1.526880e-01, & ! + 1.528840e-01, & ! + 1.160842e-01, 1.169118e-01, 1.177697e-01, 1.186556e-01, 1.195676e-01, & ! + 1.205036e-01, 1.214616e-01, 1.224394e-01, 1.234349e-01, 1.244463e-01, & ! + 1.254712e-01, 1.265078e-01, 1.275539e-01, 1.286075e-01, 1.296664e-01, & ! + 1.307287e-01, 1.317923e-01, 1.328550e-01, 1.339149e-01, 1.349699e-01, & ! + 1.360179e-01, 1.370567e-01, 1.380845e-01, 1.390991e-01, 1.400984e-01, & ! + 1.410803e-01, 1.420429e-01, 1.429840e-01, 1.439016e-01, 1.447936e-01, & ! + 1.456579e-01, 1.464925e-01, 1.472953e-01, 1.480642e-01, 1.487972e-01, & ! + 1.494923e-01, 1.501472e-01, 1.507601e-01, 1.513287e-01, 1.518511e-01, & ! + 1.523252e-01, 1.527489e-01, 1.531201e-01, 1.534368e-01, 1.536969e-01, & ! + 1.538984e-01, & ! + 1.168725e-01, 1.177088e-01, 1.185747e-01, 1.194680e-01, 1.203867e-01, & ! + 1.213288e-01, 1.222923e-01, 1.232750e-01, 1.242750e-01, 1.252903e-01, & ! + 1.263187e-01, 1.273583e-01, 1.284069e-01, 1.294626e-01, 1.305233e-01, & ! + 1.315870e-01, 1.326517e-01, 1.337152e-01, 1.347756e-01, 1.358308e-01, & ! + 1.368788e-01, 1.379175e-01, 1.389449e-01, 1.399590e-01, 1.409577e-01, & ! + 1.419389e-01, 1.429007e-01, 1.438410e-01, 1.447577e-01, 1.456488e-01, & ! + 1.465123e-01, 1.473461e-01, 1.481483e-01, 1.489166e-01, 1.496492e-01, & ! + 1.503439e-01, 1.509988e-01, 1.516118e-01, 1.521808e-01, 1.527038e-01, & ! + 1.531788e-01, 1.536037e-01, 1.539764e-01, 1.542951e-01, 1.545575e-01, & ! + 1.547617e-01, & ! + 1.180509e-01, 1.189025e-01, 1.197820e-01, 1.206875e-01, 1.216171e-01, & ! + 1.225687e-01, 1.235404e-01, 1.245303e-01, 1.255363e-01, 1.265564e-01, & ! + 1.275888e-01, 1.286313e-01, 1.296821e-01, 1.307392e-01, 1.318006e-01, & ! + 1.328643e-01, 1.339284e-01, 1.349908e-01, 1.360497e-01, 1.371029e-01, & ! + 1.381486e-01, 1.391848e-01, 1.402095e-01, 1.412208e-01, 1.422165e-01, & ! + 1.431949e-01, 1.441539e-01, 1.450915e-01, 1.460058e-01, 1.468947e-01, & ! + 1.477564e-01, 1.485888e-01, 1.493900e-01, 1.501580e-01, 1.508907e-01, & ! + 1.515864e-01, 1.522428e-01, 1.528582e-01, 1.534305e-01, 1.539578e-01, & ! + 1.544380e-01, 1.548692e-01, 1.552494e-01, 1.555767e-01, 1.558490e-01, & ! + 1.560645e-01, & ! + 1.200480e-01, 1.209267e-01, 1.218304e-01, 1.227575e-01, 1.237059e-01, & ! + 1.246739e-01, 1.256595e-01, 1.266610e-01, 1.276765e-01, 1.287041e-01, & ! + 1.297420e-01, 1.307883e-01, 1.318412e-01, 1.328988e-01, 1.339593e-01, & ! + 1.350207e-01, 1.360813e-01, 1.371393e-01, 1.381926e-01, 1.392396e-01, & ! + 1.402783e-01, 1.413069e-01, 1.423235e-01, 1.433263e-01, 1.443134e-01, & ! + 1.452830e-01, 1.462332e-01, 1.471622e-01, 1.480681e-01, 1.489490e-01, & ! + 1.498032e-01, 1.506286e-01, 1.514236e-01, 1.521863e-01, 1.529147e-01, & ! + 1.536070e-01, 1.542614e-01, 1.548761e-01, 1.554491e-01, 1.559787e-01, & ! + 1.564629e-01, 1.568999e-01, 1.572879e-01, 1.576249e-01, 1.579093e-01, & ! + 1.581390e-01, & ! + 1.247813e-01, 1.256496e-01, 1.265417e-01, 1.274560e-01, 1.283905e-01, & ! + 1.293436e-01, 1.303135e-01, 1.312983e-01, 1.322964e-01, 1.333060e-01, & ! + 1.343252e-01, 1.353523e-01, 1.363855e-01, 1.374231e-01, 1.384632e-01, & ! + 1.395042e-01, 1.405441e-01, 1.415813e-01, 1.426140e-01, 1.436404e-01, & ! + 1.446587e-01, 1.456672e-01, 1.466640e-01, 1.476475e-01, 1.486157e-01, & ! + 1.495671e-01, 1.504997e-01, 1.514117e-01, 1.523016e-01, 1.531673e-01, & ! + 1.540073e-01, 1.548197e-01, 1.556026e-01, 1.563545e-01, 1.570734e-01, & ! + 1.577576e-01, 1.584054e-01, 1.590149e-01, 1.595843e-01, 1.601120e-01, & ! + 1.605962e-01, 1.610349e-01, 1.614266e-01, 1.617693e-01, 1.620614e-01, & ! + 1.623011e-01, & ! + 1.006055e-01, 9.549582e-02, 9.063960e-02, 8.602900e-02, 8.165612e-02, & ! + 7.751308e-02, 7.359199e-02, 6.988496e-02, 6.638412e-02, 6.308156e-02, & ! + 5.996942e-02, 5.703979e-02, 5.428481e-02, 5.169657e-02, 4.926719e-02, & ! + 4.698880e-02, 4.485349e-02, 4.285339e-02, 4.098061e-02, 3.922727e-02, & ! + 3.758547e-02, 3.604733e-02, 3.460497e-02, 3.325051e-02, 3.197604e-02, & ! + 3.077369e-02, 2.963558e-02, 2.855381e-02, 2.752050e-02, 2.652776e-02, & ! + 2.556772e-02, 2.463247e-02, 2.371415e-02, 2.280485e-02, 2.189670e-02, & ! + 2.098180e-02, 2.005228e-02, 1.910024e-02, 1.811781e-02, 1.709709e-02, & ! + 1.603020e-02, 1.490925e-02, 1.372635e-02, 1.247363e-02, 1.114319e-02, & ! + 9.727157e-03/), & ! + shape = (/46,nBandsSW_RRTMG/)) + + + + real(kind_phys),dimension(5) :: & + abari = (/ 3.448e-03,3.448e-03,3.448e-03,3.448e-03,3.448e-03 /), & + bbari = (/ 2.431e+00,2.431e+00,2.431e+00,2.431e+00,2.431e+00 /), & + cbari = (/ 1.000e-05,1.100e-04,1.240e-02,3.779e-02,4.666e-01 /), & + dbari = (/ 0.000e+00,1.405e-05,6.867e-04,1.284e-03,2.050e-05 /), & + ebari = (/ 7.661e-01,7.730e-01,7.865e-01,8.172e-01,9.595e-01 /), & + fbari = (/ 5.851e-04,5.665e-04,7.204e-04,7.463e-04,1.076e-04 /) + + ! ipat is bands index for ebert & curry ice cloud (for iflagice=1) + integer,dimension(nBandsSW_RRTMG),parameter :: & + ipat = (/ 5, 5, 4, 4, 3, 3, 2, 2, 1, 1, 1, 1, 1, 5 /) + +contains + ! ######################################################################################### + ! rrtmgp_sw_cloud_optics + ! ######################################################################################### + subroutine rrtmgp_sw_cloud_optics(ncol, nlay, nBandsSW, cld_lwp, cld_ref_liq, cld_iwp, & + cld_ref_ice, cld_rwp, cld_ref_rain, cld_swp, cld_ref_snow, cld_frac, & + tau_cld, ssa_cld, asy_cld) + ! Inputs + integer,intent(in) :: & + nBandsSW, & ! Number of spectral bands + ncol, & ! Number of horizontal gridpoints + nlay ! Number of vertical layers + real(kind_phys), dimension(ncol,nlay), intent(in) :: & + cld_frac, & ! Cloud-fraction (1) + cld_lwp, & ! Cloud liquid water path (g/m2) + cld_ref_liq, & ! Effective radius (liquid) (micron) + cld_iwp, & ! Cloud ice water path (g/m2) + cld_ref_ice, & ! Effective radius (ice) (micron) + cld_rwp, & ! Cloud rain water path (g/m2) + cld_ref_rain, & ! Effective radius (rain-drop) (micron) + cld_swp, & ! Cloud snow-water path (g/m2) + cld_ref_snow ! Effective radius (snow-flake) (micron) + + ! Outputs + real(kind_phys),dimension(nBandsSW,ncol,nlay),intent(out) :: & + tau_cld, & ! In-cloud optical depth (1) + ssa_cld, & ! In-cloud single-scattering albedo (1) + asy_cld ! In-cloud asymmetry parameter (1) + + ! Local variables + integer :: iCol, iLay, iBand, index, ia, istr + real(kind_phys) :: tau_rain, tau_snow, factor, fint, cld_ref_iceTemp + real(kind_phys), dimension(nBandsSW) :: ssa_rain, ssa_snow, asy_rain, asy_snow, & + tau_liq, ssa_liq, asy_liq, tau_ice, ssa_ice, asy_ice, forwliq, asycoliq, & + forwice, extcoice, asycoice, ssacoice, fdelta, extcoliq, ssacoliq, & + tau_iceORG, tau_liqORG + + ! Initialize + tau_cld(:,:,:) = 0._kind_phys + ssa_cld(:,:,:) = 0._kind_phys + asy_cld(:,:,:) = 0._kind_phys + + ! Compute cloud radiative properties for cloud. + print*,'RRTMGP_CLOUD_OPTICS_CONFIG: ' + print*,'iswcliq: ',iswcliq + print*,'iswcice: ',iswcice + if (iswcliq > 0) then + do iCol=1,ncol + do iLay=1,nlay + if (cld_frac(iCol,iLay) .gt. 0.) then + ! ########################################################################### + ! Rain clouds + ! ########################################################################### + ! Rain optical depth (No band dependence) + tau_rain = cld_rwp(iCol,iLay)*a0r + + ! Rain single-scattering albedo and asymmetry (Band dependent) + do iBand=1,nBandsSW + ssa_rain(iBand) = tau_rain*(1.-b0r(iBand)) + asy_rain(iBand) = ssa_rain(iBand)*c0r(iBand) + enddo + + ! ########################################################################### + ! Snow clouds + ! ########################################################################### + ! Snow optical depth (No band dependence) + if (cld_swp(iCol,iLay) .gt. 0. .and. cld_ref_snow(iCol,iLay) .gt. 10._kind_phys) then + tau_snow = cld_swp(iCol,iLay) + else + tau_snow = 0._kind_phys + endif + + ! Snow single-scattering albedo and asymmetry (Band dependent) + do iBand=1,nBandsSW + ssa_snow(iBand) = tau_snow*(1.-(b0s(iBand)+b1s(iBand)*1.0315*cld_ref_snow(iCol,iLay))) + asy_snow(iBand) = ssa_snow(iBand)*c0s(iBand) + enddo + + ! ########################################################################### + ! Liquid clouds + ! ########################################################################### + if (cld_lwp(iCol,iLay) .gt. 0) then + factor = cld_ref_liq(iCol,iLay) - 1.5 + index = max( 1, min( 57, int( factor ) )) + fint = factor - float(index) + if ( iswcliq == 1 ) then + do iBand=1,nBandsSW + extcoliq(iBand) = extliq1(index,iBand) + fint*(extliq1(index+1,iBand)-extliq1(index,iBand)) + ssacoliq(iBand) = ssaliq1(index,iBand) + fint*(ssaliq1(index+1,iBand)-ssaliq1(index,iBand)) + asycoliq(iBand) = asyliq1(index,iBand) + fint*(asyliq1(index+1,iBand)-asyliq1(index,iBand)) + if (fint .lt. 0._kind_phys .and. ssacoliq(iBand) .gt. 1._kind_phys) then + ssacoliq(iBand) = ssaliq1(index,iBand) + endif + forwliq(iBand) = asycoliq(iBand)*asycoliq(iBand) + tau_liqORG(iBand) = cld_lwp(iCol,iLay) * extcoliq(iBand) + tau_liq(iBand) = (1._kind_phys - forwliq(iBand) * ssacoliq(iBand)) * tau_liqORG(iBand) + ssa_liq(iBand) = ssacoliq(iBand) * (1._kind_phys - forwliq(iBand) ) / & + (1._kind_phys - forwliq(iBand)*ssacoliq(iBand)) + asy_liq(iBand) = (asycoliq(iBand) - forwliq(iBand)) / (1._kind_phys - forwliq(iBand)) + enddo + elseif ( iswcliq == 2 ) then ! use updated coeffs + do iBand=1,nBandsSW + extcoliq(iBand) = extliq2(index,iBand) + fint*(extliq2(index+1,iBand)-extliq2(index,iBand)) + ssacoliq(iBand) = ssaliq2(index,iBand) + fint*(ssaliq2(index+1,iBand)-ssaliq2(index,iBand)) + asycoliq(iBand) = asyliq2(index,iBand) + fint*(asyliq2(index+1,iBand)-asyliq2(index,iBand)) + if (fint .lt. 0._kind_phys .and. ssacoliq(iBand) .gt. 1._kind_phys) then + ssacoliq(iBand) = ssaliq2(index,iBand) + endif + forwliq(iBand) = asycoliq(iBand)*asycoliq(iBand) + tau_liqORG(iBand) = cld_lwp(iCol,iLay) * extcoliq(iBand) + tau_liq(iBand) = (1._kind_phys - forwliq(iBand) * ssacoliq(iBand)) * tau_liqORG(iBand) + ssa_liq(iBand) = ssacoliq(iBand) * (1._kind_phys - forwliq(iBand) ) / & + (1._kind_phys - forwliq(iBand)*ssacoliq(iBand)) + asy_liq(iBand) = (asycoliq(iBand) - forwliq(iBand)) / (1._kind_phys - forwliq(iBand)) + enddo + endif + else ! Cloudy, but no liquid condensate present + tau_liq(iBand) = 0._kind_phys + ssa_liq(iBand) = 0._kind_phys + asy_liq(iBand) = 0._kind_phys + endif ! IF cloudy with liquid condensate + + ! ########################################################################### + ! Ice clouds + ! ########################################################################### + if (cld_iwp(iCol,iLay) .gt. 0) then + ! Ebert and curry approach for all particle sizes though somewhat + ! unjustified for large ice particles. + if ( iswcice == 1 ) then + cld_ref_iceTemp = min(130._kind_phys, max(13._kind_phys,cld_ref_ice(iCol,iLay))) + do iBand=1,nBandsSW + ia = ipat(iBand) ! eb_&_c band index for ice cloud coeff + extcoice(iBand) = abari(ia) + bbari(ia) / cld_ref_iceTemp + ssacoice(iBand) = 1._kind_phys - cbari(ia) - dbari(ia)*cld_ref_iceTemp + asycoice(iBand) = ebari(ia)+fbari(ia)*cld_ref_iceTemp + tau_ice(iBand) = cld_iwp(iCol,iLay) * extcoice(iBand) + ssa_ice(iBand) = tau_ice(iBand) * ssacoice(iBand) + asy_ice(iBand) = ssa_ice(iBand) * asycoice(iBand) + enddo + + ! Streamer approach for ice effective radius between 5.0 and 131.0 microns. + elseif ( iswcice == 2 ) then + cld_ref_iceTemp = min(131._kind_phys, max(5.0_kind_phys,cld_ref_ice(iCol,iLay))) + factor = (cld_ref_iceTemp - 2.) / 3. + index = max( 1, min( 42, int( factor ) )) + fint = factor - float(index) + do iBand = 1,nBandsSW + extcoice(iBand) = extice2(index,iBand) + fint*(extice2(index+1,iBand)-extice2(index,iBand)) + ssacoice(iBand) = ssaice2(index,iBand) + fint*(ssaice2(index+1,iBand)-ssaice2(index,iBand)) + asycoice(iBand) = asyice2(index,iBand) + fint*(asyice2(index+1,iBand)-asyice2(index,iBand)) + tau_ice(iBand) = cld_iwp(iCol,iLay) * extcoice(iBand) + ssa_ice(iBand) = tau_ice(iBand) * ssacoice(iBand) + asy_ice(iBand) = ssa_ice(iBand) * asycoice(iBand) + enddo + + ! Fu's approach for ice effective radius between 4.8 and 135 microns + ! (generalized effective size from 5 to 140 microns). + ! https://doi.org/10.1175/1520-0442(1996)009<2058:AAPOTS>2.0.CO;2 + elseif ( iswcice == 3 ) then + ! Determine indices for table interpolation. + factor = (cld_ref_ice(iCol,iLay) - 2._kind_phys) / 3._kind_phys + index = int( factor ) + fint = factor - float(index) + do iBand = 1,nBandsSW + ! Interpolate coefficient tables to appropriate ice-particle size and band. + extcoice(iBand) = extice3(index,iBand) + fint*(extice3(index+1,iBand)-extice3(index,iBand)) ! eq (3.9a) + ssacoice(iBand) = ssaice3(index,iBand) + fint*(ssaice3(index+1,iBand)-ssaice3(index,iBand)) ! eq (3.9b) + asycoice(iBand) = asyice3(index,iBand) + fint*(asyice3(index+1,iBand)-asyice3(index,iBand)) ! eq (3.9c) + fdelta(iBand) = fdlice3(index,iBand) + fint*(fdlice3(index+1,iBand)-fdlice3(index,iBand)) ! eq (3.9d) + forwice(iBand) = fdelta(iBand) + 0.5_kind_phys/ssacoice(iBand) ! eq (3.8) + if (forwice(iBand) .gt. asycoice(iBand)) forwice(iBand) = asycoice(iBand) + + ! Calculatice radiative properties + tau_iceORG(iBand) = cld_iwp(iCol,iLay) * extcoice(iBand) + tau_ice(iBand) = (1._kind_phys - forwice(iBand)*ssacoice(iBand)) * tau_iceORG(iBand) ! eq (A.2a) + ssa_ice(iBand) = ssacoice(iBand) * (1._kind_phys - forwice(iBand) ) / & ! eq (A.2b) + (1._kind_phys - forwice(iBand)*ssacoice(iBand)) + asy_ice(iBand) = (asycoice(iBand) - forwice(iBand)) / & ! eq (A.2c) + (1._kind_phys - forwice(iBand)) + enddo + endif + else ! Cloudy, but no ice condensate present + tau_ice(iBand) = 0._kind_phys + ssa_ice(iBand) = 0._kind_phys + asy_ice(iBand) = 0._kind_phys + endif ! IF cloudy column with ice condensate + else ! No clouds + tau_liq(:) = 0._kind_phys + tau_ice(:) = 0._kind_phys + tau_rain = 0._kind_phys + tau_snow = 0._kind_phys + ssa_liq(:) = 0._kind_phys + ssa_ice(:) = 0._kind_phys + ssa_rain(:) = 0._kind_phys + ssa_snow(:) = 0._kind_phys + asy_liq(:) = 0._kind_phys + asy_ice(:) = 0._kind_phys + asy_rain(:) = 0._kind_phys + asy_snow(:) = 0._kind_phys + endif ! IF cloudy column + + ! ########################################################################### + ! Compute total cloud optical depth + ! ########################################################################### + do iBand = 1,nBandsSW + tau_cld(iBand,iCol,iLay) = tau_liq(iBand) + tau_ice(iBand) + tau_rain + tau_snow + ssa_cld(iBand,iCol,iLay) = (tau_liq(iBand) * ssa_liq(iBand) + & + tau_ice(iBand) * ssa_ice(iBand) + & + tau_rain * ssa_rain(iBand) + & + tau_snow * ssa_snow(iBand)) / & + (tau_liq(iBand) + tau_ice(iBand) + tau_rain + tau_snow) + asy_cld(iBand,iCol,iLay) = (tau_liq(iBand) * ssa_liq(iBand) * asy_liq(iBand) + & + tau_ice(iBand) * ssa_ice(iBand) * asy_ice(iBand) + & + tau_rain * ssa_rain(iBand) * asy_rain(iBand) + & + tau_snow * ssa_snow(iBand) * asy_snow(iBand)) / & + (tau_liq(iBand) * ssa_liq(iBand) + & + tau_ice(iBand) * ssa_ice(iBand) + & + tau_rain * ssa_rain(iBand) + & + tau_snow * ssa_snow(iBand)) + enddo ! Loop over G-points + enddo ! Loop over layers + enddo ! Loop over columns + endif + end subroutine rrtmgp_sw_cloud_optics + + ! ####################################################################################### + ! SUBROUTINE mcica_subcol_sw + ! ####################################################################################### + subroutine mcica_subcol_sw(ncol, nlay, ngpts, cld_frac, icseed, dzlyr, de_lgth, cld_frac_mcica) + ! Inputs + integer,intent(in) :: & + ncol, & ! Number of horizontal gridpoints + nlay, & ! Number of vertical layers + ngpts ! Number of spectral g-points + integer,dimension(ncol),intent(in) :: & + icseed ! Permutation seed for each column. + real(kind_phys), dimension(ncol), intent(in) :: & + de_lgth ! Cloud decorrelation length (km) + real(kind_phys), dimension(ncol,nlay), intent(in) :: & + cld_frac, & ! Cloud-fraction + dzlyr ! Layer thinkness (km) + ! Outputs + real(kind_phys),dimension(ngpts,ncol,nlay),intent(out) :: & + cld_frac_mcica + ! Local variables + type(random_stat) :: stat + integer :: icol,n,k,k1 + real(kind_phys) :: tem1 + real(kind_phys),dimension(ngpts) :: rand1D + real(kind_phys),dimension(nlay*ngpts) :: rand2D + real(kind_phys),dimension(ngpts,nlay) :: cdfunc,cdfun2 + real(kind_phys),dimension(nlay) :: fac_lcf + logical,dimension(ngpts,nlay) :: lcloudy + + ! Loop over all columns + do icol=1,ncol + ! Call random_setseed() to advance random number generator by "icseed" values. + call random_setseed(icseed(icol),stat) + + ! ################################################################################### + ! Sub-column set up according to overlapping assumption: + ! - For random overlap, pick a random value at every level + ! - For max-random overlap, pick a random value at every level + ! - For maximum overlap, pick same random numebr at every level + ! ################################################################################### + select case ( iovrsw ) + ! ################################################################################### + ! 0) Random overlap + ! ################################################################################### + case( 0 ) + call random_number(rand2D,stat) + k1 = 0 + do n = 1, ngpts + do k = 1, nlay + k1 = k1 + 1 + cdfunc(n,k) = rand2d(k1) + enddo + enddo + + ! ################################################################################### + ! 1) Maximum-random overlap + ! ################################################################################### + case(1) + call random_number(rand2D,stat) + k1 = 0 + do n = 1, ngpts + do k = 1, nlay + k1 = k1 + 1 + cdfunc(n,k) = rand2d(k1) + enddo + enddo + + ! First pick a random number for bottom (or top) layer. + ! then walk up the column: (aer's code) + ! if layer below is cloudy, use the same rand num in the layer below + ! if layer below is clear, use a new random number + do k = 2, nlay + k1 = k - 1 + tem1 = 1._kind_phys - cld_frac(icol,k1) + do n = 1, ngpts + if ( cdfunc(n,k1) > tem1 ) then + cdfunc(n,k) = cdfunc(n,k1) + else + cdfunc(n,k) = cdfunc(n,k) * tem1 + endif + enddo + enddo + + ! ################################################################################### + ! 2) Maximum overlap + ! ################################################################################### + case(2) + call random_number(rand1d,stat) + do n = 1, ngpts + tem1 = rand1d(n) + do k = 1, nlay + cdfunc(n,k) = tem1 + enddo + enddo + + ! ################################################################################### + ! 3) Decorrelation length + ! ################################################################################### + case(3) + ! Compute overlapping factors based on layer midpoint distances and decorrelation + ! depths + do k = nlay, 2, -1 + fac_lcf(k) = exp( -0.5 * (dzlyr(iCol,k)+dzlyr(iCol,k-1)) / de_lgth(iCol) ) + enddo + + ! Setup 2 sets of random numbers + call random_number ( rand2d, stat ) + k1 = 0 + do k = 1, nlay + do n = 1, ngpts + k1 = k1 + 1 + cdfunc(n,k) = rand2d(k1) + enddo + enddo + ! + call random_number ( rand2d, stat ) + k1 = 0 + do k = 1, nlay + do n = 1, ngpts + k1 = k1 + 1 + cdfun2(n,k) = rand2d(k1) + enddo + enddo + + ! Then working from the top down: + ! if a random number (from an independent set -cdfun2) is smaller then the + ! scale factor: use the upper layer's number, otherwise use a new random + ! number (keep the original assigned one). + do k = nlay-1, 1, -1 + k1 = k + 1 + do n = 1, ngpts + if ( cdfun2(n,k) <= fac_lcf(k1) ) then + cdfunc(n,k) = cdfunc(n,k1) + endif + enddo + enddo + + end select + + ! ################################################################################### + ! Generate subcolumn cloud mask (0/1 for clear/cloudy) + ! ################################################################################### + do k = 1, nlay + tem1 = 1._kind_phys - cld_frac(icol,k) + do n = 1, ngpts + lcloudy(n,k) = cdfunc(n,k) >= tem1 + if (lcloudy(n,k)) then + cld_frac_mcica(n,icol,k) = 1._kind_phys + else + cld_frac_mcica(n,icol,k) = 0._kind_phys + endif + enddo + enddo + enddo ! END LOOP OVER COLUMNS + end subroutine mcica_subcol_sw +end module mo_rrtmgp_sw_cloud_optics diff --git a/physics/rrtmgp_sw_main.F90 b/physics/rrtmgp_sw_main.F90 index d7ad6a28a..1554d5699 100644 --- a/physics/rrtmgp_sw_main.F90 +++ b/physics/rrtmgp_sw_main.F90 @@ -13,13 +13,14 @@ module rrtmgp_sw use mo_heating_rates, only: compute_heating_rate use mo_rrtmgp_constants, only: grav, avogad use module_radsw_parameters, only: topfsw_type, sfcfsw_type, profsw_type, cmpfsw_type - + use mo_rrtmgp_sw_cloud_optics, only: rrtmgp_sw_cloud_optics, mcica_subcol_sw implicit none ! Parameters integer,parameter :: nGases = 6 real(kind_phys),parameter :: epsilon=1.0e-6 + real (kind=kind_phys), parameter :: ftiny = 1.0e-12 character(len=3),parameter, dimension(nGases) :: & active_gases = (/ 'h2o', 'co2', 'o3 ', 'n2o', 'ch4', 'o2 '/) @@ -643,23 +644,28 @@ subroutine rrtmgp_sw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr ! RTE+RRTMGP classes type(ty_optical_props_2str) :: & - optical_props_clr ! Optical properties for gaseous atmosphere - type(ty_optical_props_2str) :: & - optical_props_aer ! Optical properties for aerosols + optical_props_clr, & ! Optical properties for gaseous atmosphere + optical_props_aer, & ! Optical properties for aerosols + optical_props_cldy ! Optical properties for clouds type(ty_fluxes_broadband) :: & fluxAllSky, & ! All-sky flux (W/m2) fluxClrSky ! Clear-sky flux (W/m2) ! Local variables - integer :: iCol, iBand, iGpt, iDay + integer :: iCol, iBand, iGpt, iDay, iLay integer,dimension(ncol) :: ipseed - real(kind_phys) :: solAdjFac + real(kind_phys) :: solAdjFac,cfrac logical :: top_at_1=.false. + real(kind_phys), dimension(ncol) :: clrfracSFC, cldfracSFC real(kind_phys), dimension(ncol,nlay) :: vmr_o3, vmr_h2o, thetaTendClrSky, & thetaTendAllSky,coldry,tem0 + real(kind_phys), dimension(nday,nlay) :: cldfrac2 real(kind_phys), dimension(nday,nlay+1),target :: & flux_up_allSky, flux_up_clrSky, flux_dn_allSky, flux_dn_clrSky, p_lev2 real(kind_phys), dimension(nday,nGptsSW) :: toa_flux + real(kind_phys), dimension(nBandsSW,nday,nlay) :: tau_cld, asy_cld, ssa_cld + real(kind_phys), dimension(nGptsSW,nday,nlay) :: cldfracMCICA + real(kind_phys), dimension(:,:,:),allocatable :: tau, asy, ssa ! Initialize errmsg = '' @@ -729,6 +735,34 @@ subroutine rrtmgp_sw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr ! Compute solar constant adjustment factor.. solAdjFac = solcon / s0 + ! Compute fractions of clear sky view at surface + clrfracSFC = 1._kind_phys + cldfracSFC = 1._kind_phys + if (iovrsw == 0) then ! random overlapping + do iCol=1,nCol + do iLay = 1, nlay + clrfracSFC(iCol) = clrfracSFC(iCol) * (1._kind_phys - cldfrac(iCol,iLay)) + enddo + enddo + else if (iovrsw == 1) then ! max/ran overlapping + do iLay = 1, nlay + if (cldfrac(iCol,iLay) > ftiny) then ! cloudy layer + cldfracSFC(iCol) = min ( cldfracSFC(iCol), 1._kind_phys-cldfrac(iCol,iLay) ) + elseif (cldfracSFC(iCol) < 1._kind_phys) then ! clear layer + clrfracSFC(iCol) = clrfracSFC(iCol) * cldfracSFC(iCol) + cldfracSFC(iCol) = 1._kind_phys + endif + enddo + clrfracSFC(iCol) = clrfracSFC(iCol) * cldfracSFC(iCol) + else if (iovrsw >= 2) then + do iLay = 1, nlay + clrfracSFC(iCol) = min ( clrfracSFC(iCol), 1._kind_phys-cldfrac(iCol,iLay) ) ! used only as clear/cloudy indicator + enddo + endif + if (clrfracSFC(iCol) <= ftiny) clrfracSFC(iCol) = 0._kind_phys + if (clrfracSFC(iCol) > (1._kind_phys-epsilon)) clrfracSFC(iCol) = 1._kind_phys + cldfracSFC(iCol) = 1._kind_phys - clrfracSFC(iCol) + ! Initialize outputs hswc(:,:) = 0. cldtau(:,:) = 0. @@ -753,8 +787,9 @@ subroutine rrtmgp_sw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr if (nDay .gt. 0) then ! Allocate space for source functions and gas optical properties - call check_error_msg(optical_props_clr%alloc_2str(nday, nlay, kdist_sw_clr)) - call check_error_msg(optical_props_aer%alloc_2str(nday, nlay, kdist_sw_clr)) + call check_error_msg(optical_props_clr%alloc_2str(nday, nlay, kdist_sw_clr)) + call check_error_msg(optical_props_aer%alloc_2str(nday, nlay, kdist_sw_clr)) + call check_error_msg(optical_props_cldy%alloc_2str(nday, nlay, kdist_sw_clr)) ! Initialize RRTMGP files fluxAllSky%flux_up => flux_up_allSky @@ -797,23 +832,128 @@ subroutine rrtmgp_sw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr enddo enddo call check_error_msg(optical_props_aer%increment(optical_props_clr)) - - ! 1c) Compute the clear-sky broadband fluxes + + ! 1d) Compute the clear-sky broadband fluxes print*,'Clear-Sky(SW): Fluxes' call check_error_msg(rte_sw(optical_props_clr, top_at_1, cossza(idxday), toa_flux,& spread(sfcalb_nir_dir(idxday),1, ncopies = nBandsSW), & spread(sfcalb_nir_dif(idxday),1, ncopies = nBandsSW), & fluxClrSky)) - ! 1d) Compute heating rates + ! 1e) Compute heating rates print*,'Clear-Sky(SW): Heating-rates' call check_error_msg(compute_heating_rate( & fluxClrSky%flux_up, & fluxClrSky%flux_dn, & p_lev2(idxday,1:nlay+1)*100., & thetaTendClrSky)) - thetaTendAllSky = thetaTendClrSky + ! #################################################################################### + ! 2) Compute broadband all-sky calculation. + ! #################################################################################### + ! 2a) Compute in-cloud optics + print*,'All-Sky(SW): Optics ' + tau_cld(1:nBandsSW,1:nDay,1:nLay) = 0._kind_phys + asy_cld(1:nBandsSW,1:nDay,1:nLay) = 0._kind_phys + ssa_cld(1:nBandsSW,1:nDay,1:nLay) = 0._kind_phys + if (any(cldfrac(idxday,:) .gt. 0)) then + ! Cloud-optical properties by type provided. Compute optical-depth, single- + ! scattering albedo, and asymmetry parameter + if (.not. present(cld_od)) then + call rrtmgp_sw_cloud_optics(nday, nlay, nBandsSW, & + cld_lwp(idxday,1:nLay), cld_ref_liq(idxday,1:nLay), & + cld_iwp(idxday,1:nLay), cld_ref_ice(idxday,1:nLay), & + cld_rwp(idxday,1:nLay), cld_ref_rain(idxday,1:nLay), & + cld_swp(idxday,1:nLay), cld_ref_snow(idxday,1:nLay), & + cldfrac(idxday,1:nLay), & + tau_cld(:,:,:), ssa_cld(:,:,:), asy_cld(:,:,:)) + else + ! Cloud-optical depth, single scattering albedo, and asymmetry parameter provided. + do iDay=1,nDay + do iLay=1,nLay + if (cldfrac(iCol,iLay) .gt. 1e-20_kind_phys) then + tau_cld(:,iDay,iLay) = cld_od(idxday(iDay),iLay) + ssa_cld(:,iDay,iLay) = cld_ssa(idxday(iDay),iLay) + asy_cld(:,iDay,iLay) = cld_asy(idxday(iDay),iLay) + else + tau_cld(:,iDay,iLay) = 0. + ssa_cld(:,iDay,iLay) = 0. + asy_cld(:,iDay,iLay) = 0. + endif + end do + end do + endif + endif + + ! 2b) Call McICA to sample clouds. + if (isubcsw .gt. 0) then + print*,'All-Sky(SW): McICA' + allocate(tau(nDay,nLay,nGptsSW),asy(nDay,nLay,nGptsSW),ssa(nDay,nLay,nGptsSW)) + cldfrac2 = merge(cldfrac(idxday,:), 0., cldfrac(idxday,:) .gt. 0._kind_phys) + call mcica_subcol_sw(nday, nlay, nGptsSW, cldfrac2, ipseed(idxday), dzlyr(idxday,:), & + de_lgth(idxday), cldfracMCICA) + + ! Map band optical depth to each g-point using McICA + do iDay=1,nDay + do iLay=1,nLay + do iGpt=1,nGptsSW + iBand = kdist_sw_clr%convert_gpt2band(iGpt) + if (cldfracMCICA(iGpt,iDay,iLay) .gt. 0.) then + tau(iDay,iLay,iGpt) = tau_cld(iband,iDay,iLay) + asy(iDay,iLay,iGpt) = asy_cld(iband,iDay,iLay) + ssa(iDay,iLay,iGpt) = ssa_cld(iband,iDay,iLay) + else + tau(iDay,iLay,iGpt) = 0. + ssa(iDay,iLay,iGpt) = 0. + asy(iDay,iLay,iGpt) = 0. + endif + enddo + enddo + enddo + ! 2b) Or do calcualtion by band. + else + print*,'All-Sky(SW): Not using McICA. Computing quantities by band.' + allocate(tau(nDay,nLay,nBandsSW),asy(nDay,nLay,nBandsSW),ssa(nDay,nLay,nBandsSW)) + do iDay=1,nDay + do iLay=1,nLay + cfrac = cldfrac(idxday(iDay),iLay)/cldfracSFC(idxday(iDay)) + if (cfrac .gt. 0.) then + do iBand=1,nBandsSW + tau(iDay,iLay,iBand) = tau_cld(iBand,iDay,iLay) + asy(iDay,iLay,iBand) = asy_cld(iBand,iDay,iLay) + ssa(iDay,iLay,iBand) = ssa_cld(iBand,iDay,iLay) + enddo + else + tau(iDay,iLay,:) = 0. + asy(iDay,iLay,:) = 0. + ssa(iDay,iLay,:) = 0. + endif + enddo + enddo + endif + optical_props_cldy%tau = tau + optical_props_cldy%ssa = ssa + optical_props_cldy%g = asy + + ! 2c) Add cloud contribution from the gaseous (clear-sky) atmosphere. + print*,'All-Sky(SW): Increment' + call check_error_msg(optical_props_clr%increment(optical_props_cldy)) + + ! 2d) Compute broadband fluxes + print*,'All-Sky(SW): Fluxes' + call check_error_msg(rte_sw(optical_props_cldy, top_at_1, cossza(idxday), toa_flux,& + spread(sfcalb_nir_dir(idxday),1, ncopies = nBandsSW), & + spread(sfcalb_nir_dif(idxday),1, ncopies = nBandsSW), & + fluxAllSky)) + + ! 2e) Compute heating rates + print*,'All-Sky(SW): Heating-rates' + call check_error_msg(compute_heating_rate( & + fluxAllSky%flux_up, & + fluxAllSky%flux_dn, & + p_lev(idxday,1:nlay+1)*100., & + thetaTendAllSky)) + end if ! Daylit days ! ####################################################################################### From 67c2e26ed271aa2bdbe32548f443f6a916464f95 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Wed, 24 Apr 2019 10:53:16 -0600 Subject: [PATCH 007/167] Working./gmtb_scm twpice_control_RRTMGP_cloud --- physics/rrtmgp_lw_cloud_optics.F90 | 4 +- physics/rrtmgp_lw_main.F90 | 3 +- physics/rrtmgp_sw_cloud_optics.F90 | 191 ++++++++++++++--------------- physics/rrtmgp_sw_main.F90 | 73 ++++++----- 4 files changed, 141 insertions(+), 130 deletions(-) diff --git a/physics/rrtmgp_lw_cloud_optics.F90 b/physics/rrtmgp_lw_cloud_optics.F90 index d21a9221d..7b8c5f6f5 100644 --- a/physics/rrtmgp_lw_cloud_optics.F90 +++ b/physics/rrtmgp_lw_cloud_optics.F90 @@ -267,7 +267,7 @@ module mo_rrtmgp_lw_cloud_optics 1.202445e-02, 1.142838e-02, 1.086257e-02, 1.032445e-02, 9.811791e-03, & !3 9.322587e-03, 8.855053e-03, 8.407591e-03, 7.978763e-03, 7.567273e-03, & !3 7.171949e-03, 6.791728e-03, 6.425642e-03, 6.072809e-03, 5.732424e-03, & !3 - 5.403748e-03, 5.086103e-03, 4.778865e-03, & !3 + 5.403748e-03, 5.086103e-03, 4.778865e-03, & !3 1.804566e-01, 1.168987e-01, 8.680442e-02, 6.910060e-02, 5.738174e-02, & !4 4.902332e-02, 4.274585e-02, 3.784923e-02, 3.391734e-02, 3.068690e-02, & !4 2.798301e-02, 2.568480e-02, 2.370600e-02, 2.198337e-02, 2.046940e-02, & !4 @@ -321,7 +321,7 @@ module mo_rrtmgp_lw_cloud_optics 1.077117e-02, 1.035369e-02, 9.962643e-03, 9.595509e-03, 9.250088e-03, & !9 8.924447e-03, 8.616876e-03, 8.325862e-03, 8.050057e-03, 7.788258e-03, & !9 7.539388e-03, 7.302478e-03, 7.076656e-03, 6.861134e-03, 6.655197e-03, & !9 - 6.458197e-03, 6.269543e-03, 6.088697e-03, & !9 + 6.458197e-03, 6.269543e-03, 6.088697e-03, & !9 1.593628e-01, 1.014552e-01, 7.458955e-02, 5.903571e-02, 4.887582e-02, & !10 4.171159e-02, 3.638480e-02, 3.226692e-02, 2.898717e-02, 2.631256e-02, & !10 2.408925e-02, 2.221156e-02, 2.060448e-02, 1.921325e-02, 1.799699e-02, & !10 diff --git a/physics/rrtmgp_lw_main.F90 b/physics/rrtmgp_lw_main.F90 index c2837d294..09a092510 100644 --- a/physics/rrtmgp_lw_main.F90 +++ b/physics/rrtmgp_lw_main.F90 @@ -1058,6 +1058,7 @@ subroutine rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr do iCol=1,nCol do iGpt=1,nGptsLW iBand = kdist_lw_clr%convert_gpt2band(iGpt) + optical_props_clr%tau(iCol,1:nlay,iGpt) = optical_props_clr%tau(iCol,1:nlay,iGpt) * secdiff(iBand,iCol) optical_props_aer%tau(iCol,1:nlay,iGpt) = tau_aer(iCol,1:nlay,iBand) * (1. - ssa_aer(iCol,1:nlay,iBand)) * secdiff(iBand,iCol) enddo enddo @@ -1190,7 +1191,7 @@ subroutine rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr sum(fluxClrSky%flux_dn(1,iLay:iLay+1))/2.,sum(fluxAllSky%flux_up(1,iLay:iLay+1))/2.,& sum(fluxAllSky%flux_dn(1,iLay:iLay+1))/2. write(60,*) optical_props_clr%tau(1,iLay,:) - write(61,*) tau_cld(:,1,iLay)*secdiff(:,1) + write(61,'(16f12.3)') tau_cld(:,1,iLay)!*secdiff(:,1) enddo ! ####################################################################################### ! Copy fluxes from RRTGMP types into model radiation types. diff --git a/physics/rrtmgp_sw_cloud_optics.F90 b/physics/rrtmgp_sw_cloud_optics.F90 index cc353af66..10d4e8e4b 100644 --- a/physics/rrtmgp_sw_cloud_optics.F90 +++ b/physics/rrtmgp_sw_cloud_optics.F90 @@ -2070,25 +2070,35 @@ subroutine rrtmgp_sw_cloud_optics(ncol, nlay, nBandsSW, cld_lwp, cld_ref_liq, cl ! Local variables integer :: iCol, iLay, iBand, index, ia, istr - real(kind_phys) :: tau_rain, tau_snow, factor, fint, cld_ref_iceTemp + real(kind_phys) :: tau_rain, tau_snow, factor, fint, cld_ref_iceTemp,asyw,ssaw,za1,za2 + real(kind_phys), dimension(nBandsSW) :: ssa_rain, ssa_snow, asy_rain, asy_snow, & tau_liq, ssa_liq, asy_liq, tau_ice, ssa_ice, asy_ice, forwliq, asycoliq, & - forwice, extcoice, asycoice, ssacoice, fdelta, extcoliq, ssacoliq, & - tau_iceORG, tau_liqORG + forwice, extcoice, asycoice, ssacoice, fdelta, extcoliq, ssacoliq ! Initialize tau_cld(:,:,:) = 0._kind_phys - ssa_cld(:,:,:) = 0._kind_phys + ssa_cld(:,:,:) = 1._kind_phys asy_cld(:,:,:) = 0._kind_phys ! Compute cloud radiative properties for cloud. - print*,'RRTMGP_CLOUD_OPTICS_CONFIG: ' - print*,'iswcliq: ',iswcliq - print*,'iswcice: ',iswcice if (iswcliq > 0) then do iCol=1,ncol do iLay=1,nlay - if (cld_frac(iCol,iLay) .gt. 0.) then + ! Initialize + tau_liq(:) = 0._kind_phys + tau_ice(:) = 0._kind_phys + tau_rain = 0._kind_phys + tau_snow = 0._kind_phys + ssa_liq(:) = 0._kind_phys + ssa_ice(:) = 0._kind_phys + ssa_rain(:) = 0._kind_phys + ssa_snow(:) = 0._kind_phys + asy_liq(:) = 0._kind_phys + asy_ice(:) = 0._kind_phys + asy_rain(:) = 0._kind_phys + asy_snow(:) = 0._kind_phys + if (cld_frac(iCol,iLay) .gt. 0._kind_phys) then ! ########################################################################### ! Rain clouds ! ########################################################################### @@ -2121,44 +2131,36 @@ subroutine rrtmgp_sw_cloud_optics(ncol, nlay, nBandsSW, cld_lwp, cld_ref_liq, cl ! Liquid clouds ! ########################################################################### if (cld_lwp(iCol,iLay) .gt. 0) then + ! Find index in coefficient LUT for corresponding partice size. factor = cld_ref_liq(iCol,iLay) - 1.5 index = max( 1, min( 57, int( factor ) )) fint = factor - float(index) - if ( iswcliq == 1 ) then - do iBand=1,nBandsSW - extcoliq(iBand) = extliq1(index,iBand) + fint*(extliq1(index+1,iBand)-extliq1(index,iBand)) - ssacoliq(iBand) = ssaliq1(index,iBand) + fint*(ssaliq1(index+1,iBand)-ssaliq1(index,iBand)) - asycoliq(iBand) = asyliq1(index,iBand) + fint*(asyliq1(index+1,iBand)-asyliq1(index,iBand)) - if (fint .lt. 0._kind_phys .and. ssacoliq(iBand) .gt. 1._kind_phys) then - ssacoliq(iBand) = ssaliq1(index,iBand) - endif - forwliq(iBand) = asycoliq(iBand)*asycoliq(iBand) - tau_liqORG(iBand) = cld_lwp(iCol,iLay) * extcoliq(iBand) - tau_liq(iBand) = (1._kind_phys - forwliq(iBand) * ssacoliq(iBand)) * tau_liqORG(iBand) - ssa_liq(iBand) = ssacoliq(iBand) * (1._kind_phys - forwliq(iBand) ) / & - (1._kind_phys - forwliq(iBand)*ssacoliq(iBand)) - asy_liq(iBand) = (asycoliq(iBand) - forwliq(iBand)) / (1._kind_phys - forwliq(iBand)) - enddo - elseif ( iswcliq == 2 ) then ! use updated coeffs - do iBand=1,nBandsSW - extcoliq(iBand) = extliq2(index,iBand) + fint*(extliq2(index+1,iBand)-extliq2(index,iBand)) - ssacoliq(iBand) = ssaliq2(index,iBand) + fint*(ssaliq2(index+1,iBand)-ssaliq2(index,iBand)) - asycoliq(iBand) = asyliq2(index,iBand) + fint*(asyliq2(index+1,iBand)-asyliq2(index,iBand)) - if (fint .lt. 0._kind_phys .and. ssacoliq(iBand) .gt. 1._kind_phys) then - ssacoliq(iBand) = ssaliq2(index,iBand) - endif - forwliq(iBand) = asycoliq(iBand)*asycoliq(iBand) - tau_liqORG(iBand) = cld_lwp(iCol,iLay) * extcoliq(iBand) - tau_liq(iBand) = (1._kind_phys - forwliq(iBand) * ssacoliq(iBand)) * tau_liqORG(iBand) - ssa_liq(iBand) = ssacoliq(iBand) * (1._kind_phys - forwliq(iBand) ) / & - (1._kind_phys - forwliq(iBand)*ssacoliq(iBand)) - asy_liq(iBand) = (asycoliq(iBand) - forwliq(iBand)) / (1._kind_phys - forwliq(iBand)) - enddo - endif - else ! Cloudy, but no liquid condensate present - tau_liq(iBand) = 0._kind_phys - ssa_liq(iBand) = 0._kind_phys - asy_liq(iBand) = 0._kind_phys + + ! Extract coefficents for all bands and compute radiative properties + do iBand=1,nBandsSW + ! Interpolate coefficients + if ( iswcliq == 1 ) then + extcoliq(iBand) = max(0._kind_phys, extliq1(index,iBand) + & + fint*(extliq1(index+1,iBand)-extliq1(index,iBand))) + ssacoliq(iBand) = max(0._kind_phys, min(1._kind_phys, ssaliq1(index,iBand) + & + fint*(ssaliq1(index+1,iBand)-ssaliq1(index,iBand)))) + asycoliq(iBand) = max(0._kind_phys, min(1._kind_phys, asyliq1(index,iBand) + & + fint*(asyliq1(index+1,iBand)-asyliq1(index,iBand)))) + elseif ( iswcliq == 2 ) then ! use updated coeffs + extcoliq(iBand) = max(0._kind_phys, extliq2(index,iBand) + & + fint*(extliq2(index+1,iBand)-extliq2(index,iBand))) + ssacoliq(iBand) = max(0._kind_phys, min(1._kind_phys, ssaliq2(index,iBand) + & + fint*(ssaliq2(index+1,iBand)-ssaliq2(index,iBand)))) + asycoliq(iBand) = max(0._kind_phys, min(1._kind_phys, asyliq2(index,iBand) + & + fint*(asyliq2(index+1,iBand)-asyliq2(index,iBand)))) + endif + if (fint .lt. 0._kind_phys .and. ssacoliq(iBand) .gt. 1._kind_phys) then + ssacoliq(iBand) = ssaliq1(index,iBand) + endif + tau_liq(iBand) = cld_lwp(iCol,iLay) * extcoliq(iBand) + ssa_liq(iBand) = tau_liq(iBand) * ssacoliq(iBand) + asy_liq(iBand) = ssa_liq(iBand) * asycoliq(iBand) + enddo endif ! IF cloudy with liquid condensate ! ########################################################################### @@ -2186,9 +2188,12 @@ subroutine rrtmgp_sw_cloud_optics(ncol, nlay, nBandsSW, cld_lwp, cld_ref_liq, cl index = max( 1, min( 42, int( factor ) )) fint = factor - float(index) do iBand = 1,nBandsSW - extcoice(iBand) = extice2(index,iBand) + fint*(extice2(index+1,iBand)-extice2(index,iBand)) - ssacoice(iBand) = ssaice2(index,iBand) + fint*(ssaice2(index+1,iBand)-ssaice2(index,iBand)) - asycoice(iBand) = asyice2(index,iBand) + fint*(asyice2(index+1,iBand)-asyice2(index,iBand)) + extcoice(iBand) = extice2(index,iBand) + & + fint*(extice2(index+1,iBand)-extice2(index,iBand)) + ssacoice(iBand) = ssaice2(index,iBand) + & + fint*(ssaice2(index+1,iBand)-ssaice2(index,iBand)) + asycoice(iBand) = asyice2(index,iBand) + & + fint*(asyice2(index+1,iBand)-asyice2(index,iBand)) tau_ice(iBand) = cld_iwp(iCol,iLay) * extcoice(iBand) ssa_ice(iBand) = tau_ice(iBand) * ssacoice(iBand) asy_ice(iBand) = ssa_ice(iBand) * asycoice(iBand) @@ -2198,67 +2203,56 @@ subroutine rrtmgp_sw_cloud_optics(ncol, nlay, nBandsSW, cld_lwp, cld_ref_liq, cl ! (generalized effective size from 5 to 140 microns). ! https://doi.org/10.1175/1520-0442(1996)009<2058:AAPOTS>2.0.CO;2 elseif ( iswcice == 3 ) then + cld_ref_iceTemp = max( 5.0, min( 140.0, 1.0315*cld_ref_ice(iCol,iLay) )) ! Determine indices for table interpolation. - factor = (cld_ref_ice(iCol,iLay) - 2._kind_phys) / 3._kind_phys - index = int( factor ) + factor = (cld_ref_iceTemp - 2._kind_phys) / 3._kind_phys + index = max( 1, min( 45, int( factor ) )) fint = factor - float(index) do iBand = 1,nBandsSW - ! Interpolate coefficient tables to appropriate ice-particle size and band. - extcoice(iBand) = extice3(index,iBand) + fint*(extice3(index+1,iBand)-extice3(index,iBand)) ! eq (3.9a) - ssacoice(iBand) = ssaice3(index,iBand) + fint*(ssaice3(index+1,iBand)-ssaice3(index,iBand)) ! eq (3.9b) - asycoice(iBand) = asyice3(index,iBand) + fint*(asyice3(index+1,iBand)-asyice3(index,iBand)) ! eq (3.9c) - fdelta(iBand) = fdlice3(index,iBand) + fint*(fdlice3(index+1,iBand)-fdlice3(index,iBand)) ! eq (3.9d) - forwice(iBand) = fdelta(iBand) + 0.5_kind_phys/ssacoice(iBand) ! eq (3.8) + ! Interpolate coefficient tables to appropriate ice-particle size. + extcoice(iBand) = max(0._kind_phys, extice3(index,iBand) + & + fint*(extice3(index+1,iBand)-extice3(index,iBand))) ! eq (3.9a) + ssacoice(iBand) = max(0._kind_phys, min(1._kind_phys, ssaice3(index,iBand) + & + fint*(ssaice3(index+1,iBand)-ssaice3(index,iBand)))) ! eq (3.9b) + asycoice(iBand) = max(0._kind_phys, min(1._kind_phys, asyice3(index,iBand) + & + fint*(asyice3(index+1,iBand)-asyice3(index,iBand)))) ! eq (3.9c) + fdelta(iBand) = fdlice3(index,iBand) + & + fint*(fdlice3(index+1,iBand)-fdlice3(index,iBand)) ! eq (3.9d) + forwice(iBand) = fdelta(iBand) + 0.5_kind_phys / ssacoice(iBand) if (forwice(iBand) .gt. asycoice(iBand)) forwice(iBand) = asycoice(iBand) - - ! Calculatice radiative properties - tau_iceORG(iBand) = cld_iwp(iCol,iLay) * extcoice(iBand) - tau_ice(iBand) = (1._kind_phys - forwice(iBand)*ssacoice(iBand)) * tau_iceORG(iBand) ! eq (A.2a) - ssa_ice(iBand) = ssacoice(iBand) * (1._kind_phys - forwice(iBand) ) / & ! eq (A.2b) - (1._kind_phys - forwice(iBand)*ssacoice(iBand)) - asy_ice(iBand) = (asycoice(iBand) - forwice(iBand)) / & ! eq (A.2c) - (1._kind_phys - forwice(iBand)) + tau_ice(iBand) = cld_iwp(iCol,iLay) * extcoice(iBand) + ssa_ice(iBand) = tau_ice(iBand) * ssacoice(iBand) + asy_ice(iBand) = ssa_ice(iBand) * asycoice(iBand) enddo endif - else ! Cloudy, but no ice condensate present - tau_ice(iBand) = 0._kind_phys - ssa_ice(iBand) = 0._kind_phys - asy_ice(iBand) = 0._kind_phys endif ! IF cloudy column with ice condensate - else ! No clouds - tau_liq(:) = 0._kind_phys - tau_ice(:) = 0._kind_phys - tau_rain = 0._kind_phys - tau_snow = 0._kind_phys - ssa_liq(:) = 0._kind_phys - ssa_ice(:) = 0._kind_phys - ssa_rain(:) = 0._kind_phys - ssa_snow(:) = 0._kind_phys - asy_liq(:) = 0._kind_phys - asy_ice(:) = 0._kind_phys - asy_rain(:) = 0._kind_phys - asy_snow(:) = 0._kind_phys endif ! IF cloudy column ! ########################################################################### - ! Compute total cloud optical depth + ! Compute total cloud radiative properties (tau, omega, and g) ! ########################################################################### - do iBand = 1,nBandsSW - tau_cld(iBand,iCol,iLay) = tau_liq(iBand) + tau_ice(iBand) + tau_rain + tau_snow - ssa_cld(iBand,iCol,iLay) = (tau_liq(iBand) * ssa_liq(iBand) + & - tau_ice(iBand) * ssa_ice(iBand) + & - tau_rain * ssa_rain(iBand) + & - tau_snow * ssa_snow(iBand)) / & - (tau_liq(iBand) + tau_ice(iBand) + tau_rain + tau_snow) - asy_cld(iBand,iCol,iLay) = (tau_liq(iBand) * ssa_liq(iBand) * asy_liq(iBand) + & - tau_ice(iBand) * ssa_ice(iBand) * asy_ice(iBand) + & - tau_rain * ssa_rain(iBand) * asy_rain(iBand) + & - tau_snow * ssa_snow(iBand) * asy_snow(iBand)) / & - (tau_liq(iBand) * ssa_liq(iBand) + & - tau_ice(iBand) * ssa_ice(iBand) + & - tau_rain * ssa_rain(iBand) + & - tau_snow * ssa_snow(iBand)) - enddo ! Loop over G-points + if (cld_frac(iCol,iLay) .gt. 0._kind_phys) then + do iBand = 1,nBandsSW + ! Sum up radiative properties by type. + tau_cld(iBand,iCol,iLay) = tau_liq(iBand) + tau_ice(iBand) + tau_rain + tau_snow + ssa_cld(iBand,iCol,iLay) = ssa_liq(iBand) + ssa_ice(iBand) + ssa_rain(iBand) + ssa_snow(iBand) + asy_cld(iBand,iCol,iLay) = asy_liq(iBand) + asy_ice(iBand) + asy_rain(iBand) + asy_snow(iBand) + ! Delta-scale + asyw = asy_cld(iband,iCol,iLay)/max(0._kind_phys, ssa_cld(iBand,iCol,iLay)) + ssaw = min(1._kind_phys-0.000001, ssa_cld(iBand,iCol,iLay)/tau_cld(iBand,iCol,iLay)) + za1 = asyw * asyw + za2 = ssaw * za1 + tau_cld(iBand,iCol,iLay) = (1._kind_phys - za2) * tau_cld(iband,iCol,iLay) + ssa_cld(iBand,iCol,iLay) = (ssaw - za2) / (1._kind_phys - za2) + asy_cld(iBand,iCol,iLay) = (asyw - za2/ssaw)/(1-za2/ssaw) + !asy_cld(iBand,iCol,iLay) = (tau_liq(iBand)*ssa_liq(iBand)*(asycoliq(iBand)-asycoliq(iBand)**2)/& + ! (1 - asycoliq(iBand)**2) + & + ! tau_ice(iBand)*ssa_ice(iBand)*(asycoice(iBand)-forwice(iBand))/& + ! (1 - forwice(iBand)))/& + ! (tau_liq(iBand)*ssa_liq(iBand) + tau_ice(iBand)*ssa_ice(iBand)) + enddo ! Loop over SW bands + endif ! END sum cloudy properties + ! enddo ! Loop over layers enddo ! Loop over columns endif @@ -2266,8 +2260,9 @@ end subroutine rrtmgp_sw_cloud_optics ! ####################################################################################### ! SUBROUTINE mcica_subcol_sw - ! ####################################################################################### - subroutine mcica_subcol_sw(ncol, nlay, ngpts, cld_frac, icseed, dzlyr, de_lgth, cld_frac_mcica) + ! ###################################################################################### + subroutine mcica_subcol_sw(ncol, nlay, ngpts, cld_frac, icseed, dzlyr, de_lgth, & + cld_frac_mcica) ! Inputs integer,intent(in) :: & ncol, & ! Number of horizontal gridpoints diff --git a/physics/rrtmgp_sw_main.F90 b/physics/rrtmgp_sw_main.F90 index 1554d5699..53f1ae716 100644 --- a/physics/rrtmgp_sw_main.F90 +++ b/physics/rrtmgp_sw_main.F90 @@ -154,6 +154,9 @@ subroutine rrtmgp_sw_init(Model,mpicomm, mpirank, mpiroot, errmsg, errflg) integer,dimension(:),allocatable :: temp1,temp2,temp3,temp4,temp_log_array1,& temp_log_array2, temp_log_array3, temp_log_array4 + open(69,file='rrtmgp_sw_aux_dump.txt',status='unknown') + open(70,file='rrtmgp_sw_aux_taucld.txt',status='unknown') + ! Initialize errmsg = '' errflg = 0 @@ -644,9 +647,10 @@ subroutine rrtmgp_sw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr ! RTE+RRTMGP classes type(ty_optical_props_2str) :: & - optical_props_clr, & ! Optical properties for gaseous atmosphere - optical_props_aer, & ! Optical properties for aerosols - optical_props_cldy ! Optical properties for clouds + optical_props_clr, & ! Optical properties for gaseous atmosphere + optical_props_aer, & ! Optical properties for aerosols + optical_props_cldy ! Optical properties for clouds + type(ty_fluxes_broadband) :: & fluxAllSky, & ! All-sky flux (W/m2) fluxClrSky ! Clear-sky flux (W/m2) @@ -654,12 +658,12 @@ subroutine rrtmgp_sw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr ! Local variables integer :: iCol, iBand, iGpt, iDay, iLay integer,dimension(ncol) :: ipseed - real(kind_phys) :: solAdjFac,cfrac + real(kind_phys) :: solAdjFac, cfrac, asyw, ssaw, za1, za2 logical :: top_at_1=.false. real(kind_phys), dimension(ncol) :: clrfracSFC, cldfracSFC real(kind_phys), dimension(ncol,nlay) :: vmr_o3, vmr_h2o, thetaTendClrSky, & thetaTendAllSky,coldry,tem0 - real(kind_phys), dimension(nday,nlay) :: cldfrac2 + real(kind_phys), dimension(nday,nlay) :: cldfrac2, cld_lwp2 real(kind_phys), dimension(nday,nlay+1),target :: & flux_up_allSky, flux_up_clrSky, flux_dn_allSky, flux_dn_clrSky, p_lev2 real(kind_phys), dimension(nday,nGptsSW) :: toa_flux @@ -821,7 +825,7 @@ subroutine rrtmgp_sw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr optical_props_clr, & toa_flux)) - ! 1c) Add contribution from aerosols. Also, apply diffusivity angle + ! 1c) Add contribution from aerosols. print*,'Clear-Sky(SW): Increment Aerosol' do iDay=1,nDay do iGpt=1,nGptsSW @@ -831,7 +835,7 @@ subroutine rrtmgp_sw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr optical_props_aer%g(iDay,1:nlay,iGpt) = asy_aer(idxday(iDay),1:nlay,iBand) enddo enddo - call check_error_msg(optical_props_aer%increment(optical_props_clr)) + !call check_error_msg(optical_props_aer%increment(optical_props_clr)) ! 1d) Compute the clear-sky broadband fluxes print*,'Clear-Sky(SW): Fluxes' @@ -853,9 +857,11 @@ subroutine rrtmgp_sw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr ! #################################################################################### ! 2a) Compute in-cloud optics print*,'All-Sky(SW): Optics ' - tau_cld(1:nBandsSW,1:nDay,1:nLay) = 0._kind_phys - asy_cld(1:nBandsSW,1:nDay,1:nLay) = 0._kind_phys - ssa_cld(1:nBandsSW,1:nDay,1:nLay) = 0._kind_phys + tau_cld(:,:,:) = 0._kind_phys + asy_cld(:,:,:) = 0._kind_phys + ssa_cld(:,:,:) = 0._kind_phys + + cldfrac2 = merge(cldfrac(idxday,:), 0., cldfrac(idxday,:) .gt. 0._kind_phys) if (any(cldfrac(idxday,:) .gt. 0)) then ! Cloud-optical properties by type provided. Compute optical-depth, single- ! scattering albedo, and asymmetry parameter @@ -866,7 +872,7 @@ subroutine rrtmgp_sw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr cld_rwp(idxday,1:nLay), cld_ref_rain(idxday,1:nLay), & cld_swp(idxday,1:nLay), cld_ref_snow(idxday,1:nLay), & cldfrac(idxday,1:nLay), & - tau_cld(:,:,:), ssa_cld(:,:,:), asy_cld(:,:,:)) + tau_cld, ssa_cld, asy_cld) else ! Cloud-optical depth, single scattering albedo, and asymmetry parameter provided. do iDay=1,nDay @@ -877,7 +883,7 @@ subroutine rrtmgp_sw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr asy_cld(:,iDay,iLay) = cld_asy(idxday(iDay),iLay) else tau_cld(:,iDay,iLay) = 0. - ssa_cld(:,iDay,iLay) = 0. + ssa_cld(:,iDay,iLay) = 1. asy_cld(:,iDay,iLay) = 0. endif end do @@ -885,11 +891,21 @@ subroutine rrtmgp_sw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr endif endif + write(69,'(a20)') "RRTMGP TAUs" + write(70,*) "#" + do iDay=1,nDay + do iLay=1,nlay + write(69,'(a5,i2,4f12.3)') '',iLay,p_lay(idxday(iDay),iLay),sum(optical_props_clr%tau(iDay,iLay,:)) + write(70,'(16f12.3)') tau_cld(:,1,iLay) + write(70,'(16f12.3)') ssa_cld(:,1,iLay) + write(70,'(16f12.3)') asy_cld(:,1,iLay) + enddo + enddo + ! 2b) Call McICA to sample clouds. if (isubcsw .gt. 0) then print*,'All-Sky(SW): McICA' allocate(tau(nDay,nLay,nGptsSW),asy(nDay,nLay,nGptsSW),ssa(nDay,nLay,nGptsSW)) - cldfrac2 = merge(cldfrac(idxday,:), 0., cldfrac(idxday,:) .gt. 0._kind_phys) call mcica_subcol_sw(nday, nlay, nGptsSW, cldfrac2, ipseed(idxday), dzlyr(idxday,:), & de_lgth(idxday), cldfracMCICA) @@ -899,13 +915,13 @@ subroutine rrtmgp_sw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr do iGpt=1,nGptsSW iBand = kdist_sw_clr%convert_gpt2band(iGpt) if (cldfracMCICA(iGpt,iDay,iLay) .gt. 0.) then - tau(iDay,iLay,iGpt) = tau_cld(iband,iDay,iLay) - asy(iDay,iLay,iGpt) = asy_cld(iband,iDay,iLay) - ssa(iDay,iLay,iGpt) = ssa_cld(iband,iDay,iLay) + optical_props_cldy%tau(iDay,iLay,iGpt) = tau_cld(iband,iDay,iLay) + optical_props_cldy%ssa(iDay,iLay,iGpt) = ssa_cld(iBand,iDay,iLay) + optical_props_cldy%g(iDay,iLay,iGpt) = asy_cld(iBand,iDay,iLay) else - tau(iDay,iLay,iGpt) = 0. - ssa(iDay,iLay,iGpt) = 0. - asy(iDay,iLay,iGpt) = 0. + optical_props_cldy%tau(iDay,iLay,iGpt) = 0._kind_phys + optical_props_cldy%ssa(iDay,iLay,iGpt) = 1._kind_phys + optical_props_cldy%g(iDay,iLay,iGpt) = 0._kind_phys endif enddo enddo @@ -919,21 +935,18 @@ subroutine rrtmgp_sw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr cfrac = cldfrac(idxday(iDay),iLay)/cldfracSFC(idxday(iDay)) if (cfrac .gt. 0.) then do iBand=1,nBandsSW - tau(iDay,iLay,iBand) = tau_cld(iBand,iDay,iLay) - asy(iDay,iLay,iBand) = asy_cld(iBand,iDay,iLay) - ssa(iDay,iLay,iBand) = ssa_cld(iBand,iDay,iLay) + optical_props_cldy%tau(iDay,iLay,iBand) = tau_cld(iBand,iDay,iLay) + optical_props_cldy%g(iDay,iLay,iBand) = asy_cld(iBand,iDay,iLay) + optical_props_cldy%ssa(iDay,iLay,iBand) = ssa_cld(iBand,iDay,iLay) enddo else - tau(iDay,iLay,:) = 0. - asy(iDay,iLay,:) = 0. - ssa(iDay,iLay,:) = 0. + optical_props_cldy%tau(iDay,iLay,:) = 0._kind_phys + optical_props_cldy%g(iDay,iLay,:) = 1._kind_phys + optical_props_cldy%ssa(iDay,iLay,:) = 0._kind_phys endif enddo enddo endif - optical_props_cldy%tau = tau - optical_props_cldy%ssa = ssa - optical_props_cldy%g = asy ! 2c) Add cloud contribution from the gaseous (clear-sky) atmosphere. print*,'All-Sky(SW): Increment' @@ -966,7 +979,7 @@ subroutine rrtmgp_sw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr sfcflx(idxday)%upfx0 = fluxClrSky%flux_up(:,1) sfcflx(idxday)%dnfxc = fluxAllSky%flux_dn(:,1) sfcflx(idxday)%dnfx0 = fluxClrSky%flux_dn(:,1) - cldtau(idxday,:) = 0. + cldtau(idxday,:) = tau(:,:,10) hswc(idxday,:) = thetaTendAllSky ! Optional output @@ -989,6 +1002,8 @@ end subroutine rrtmgp_sw_run ! ######################################################################################### ! ######################################################################################### subroutine rrtmgp_sw_finalize() + close(69) + close(70) end subroutine rrtmgp_sw_finalize ! ######################################################################################### From 3c861b04be307f0cb0ee2786f4cb9fc497dce008 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Mon, 29 Apr 2019 17:29:51 -0600 Subject: [PATCH 008/167] LW RRTMGP cloud-optics working. Also, RRTMGP cloud sampling has been implemented (in progress). --- physics/GFS_rrtmg_pre.F90 | 8 +- physics/rrtmgp_lw_cloud_optics.F90 | 13 +- physics/rrtmgp_lw_main.F90 | 151 ++++--- physics/rrtmgp_sw.xml | 623 +++++++++++++++++++++++++++++ physics/rrtmgp_sw_main.F90 | 7 + 5 files changed, 711 insertions(+), 91 deletions(-) create mode 100644 physics/rrtmgp_sw.xml diff --git a/physics/GFS_rrtmg_pre.F90 b/physics/GFS_rrtmg_pre.F90 index 9b8b4e82b..2e51e305f 100644 --- a/physics/GFS_rrtmg_pre.F90 +++ b/physics/GFS_rrtmg_pre.F90 @@ -707,6 +707,7 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input ! DJS2019: START ! Compute layer cloud fraction. clwmin = 0.0 + cldcov(:,:) = 0.0 if (.not. Model%lmfshal) then do k = 1, LMK do i = 1, IM @@ -749,9 +750,7 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input do k=1,lm k1 = k + kd do i=1,im - ! DJS2019: Tbd%phy_f3d(:,:,1) is mean layer temperature, not cloud amount cldcov(i,k1) = Tbd%phy_f3d(i,k,Model%indcld) - cldcov(i,k1) = tracer1(i,k,Model%ntclamt) effrl(i,k1) = Tbd%phy_f3d(i,k,2) effri(i,k1) = Tbd%phy_f3d(i,k,3) effrr(i,k1) = Tbd%phy_f3d(i,k,4) @@ -784,6 +783,11 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input write(58,*) "Model%lgfdlmprad: ",Model%lgfdlmprad write(58,*) "Model%lmfshal: ",Model%lmfshal write(58,*) "Model%lmfdeep2: ",Model%lmfdeep2 + do k = 1, LMK + do i = 1, IM + write(58,'(a19,2i8,f10.2)') " Cloud-cover: ",k,i,cldcov(i,k) + end do + enddo if (Model%imp_physics == 99 .or. Model%imp_physics == 10) then ! zhao/moorthi's prognostic cloud scheme ! or unified cloud and/or with MG microphysics diff --git a/physics/rrtmgp_lw_cloud_optics.F90 b/physics/rrtmgp_lw_cloud_optics.F90 index 7b8c5f6f5..4c69aa70b 100644 --- a/physics/rrtmgp_lw_cloud_optics.F90 +++ b/physics/rrtmgp_lw_cloud_optics.F90 @@ -573,7 +573,7 @@ subroutine rrtmgp_lw_cloud_optics(ncol, nlay, nBandsLW, cld_lwp, cld_ref_liq, cl cld_ref_snow ! Effective radius (snow-flake) (micron) ! Outputs - real(kind_phys),dimension(nBandsLW,ncol,nlay),intent(out) :: & + real(kind_phys),dimension(ncol,nlay,nBandsLW),intent(out) :: & tau_cld ! Local variables @@ -654,7 +654,7 @@ subroutine rrtmgp_lw_cloud_optics(ncol, nlay, nBandsLW, cld_lwp, cld_ref_liq, cl endif ! Cloud optical depth do ib = 1, nBandsLW - tau_cld(ib,ij,ik) = tau_ice(ib) + tau_liq(ib) + tau_rain + tau_snow + tau_cld(ij,ik,ib) = tau_ice(ib) + tau_liq(ib) + tau_rain + tau_snow enddo end do end do @@ -677,7 +677,8 @@ subroutine mcica_subcol_lw(ncol, nlay, ngpts, cld_frac, icseed, dzlyr, de_lgth, cld_frac, & ! Cloud-fraction dzlyr ! Layer thinkness (km) ! Outputs - real(kind_phys),dimension(ngpts,ncol,nlay),intent(out) :: & + !real(kind_phys),dimension(ncol,nlay,ngpts),intent(out) :: & + logical,dimension(ncol,nlay,ngpts),intent(out) :: & cld_frac_mcica ! Local variables type(random_stat) :: stat @@ -800,16 +801,16 @@ subroutine mcica_subcol_lw(ncol, nlay, ngpts, cld_frac, icseed, dzlyr, de_lgth, end select ! ################################################################################### - ! Generate subcolumn cloud mask (0/1 for clear/cloudy) + ! Generate subcolumn cloud mask (.false./.true. for clear/cloudy) ! ################################################################################### do k = 1, nlay tem1 = 1._kind_phys - cld_frac(icol,k) do n = 1, ngpts lcloudy(n,k) = cdfunc(n,k) >= tem1 if (lcloudy(n,k)) then - cld_frac_mcica(n,icol,k) = 1._kind_phys + cld_frac_mcica(icol,k,n) = .true. else - cld_frac_mcica(n,icol,k) = 0._kind_phys + cld_frac_mcica(icol,k,n) = .false. endif enddo enddo diff --git a/physics/rrtmgp_lw_main.F90 b/physics/rrtmgp_lw_main.F90 index 09a092510..b2935087d 100644 --- a/physics/rrtmgp_lw_main.F90 +++ b/physics/rrtmgp_lw_main.F90 @@ -10,6 +10,7 @@ module rrtmgp_lw use mo_rte_kind, only: wl use mo_heating_rates, only: compute_heating_rate use mo_cloud_optics, only: ty_cloud_optics + use mo_cloud_sampling, only: sampled_mask_max_ran, sampled_mask_exp_ran use machine, only: kind_phys use module_radlw_parameters, only: topflw_type, sfcflw_type, proflw_type use physparam, only: ilwcliq,isubclw,iovrlw,ilwrgas,icldflg,ilwrate @@ -46,11 +47,6 @@ module rrtmgp_lw nBandsLW, & ! Number of LW bands nrghice, & ! Number of ice roughness categories ipsdlw0 ! Initial see for McICA - real(kind_phys) :: & - re_ice_min, & ! Minimum ice particle size allowed by RRTGMP - re_ice_max, & ! Maximum ice particle size allowed by RRTGMP - re_liq_min, & ! Minimum liquid particle size allowed by RRTGMP - re_liq_max ! Maximum liquid particle size allowed by RRTGMP integer,allocatable,dimension(:) :: & ngb_LW ! Band index for each g-points @@ -204,7 +200,7 @@ subroutine rrtmgp_lw_init(Model,mpicomm, mpirank, mpiroot, errmsg, errflg) open(59,file='rrtmgp_aux_dump.txt',status='unknown') open(60,file='rrtmgp_aux_tautot.txt',status='unknown') - open(61,file='rrtmgp_aux_taucld.txt',status='unknown') + open(61,file='rrtmgp_lw_aux_taucld.txt',status='unknown') ! Initialize errmsg = '' @@ -684,6 +680,7 @@ subroutine rrtmgp_lw_init(Model,mpicomm, mpirank, mpiroot, errmsg, errflg) call MPI_BCAST(lut_extice, size(lut_extice), kind_phys, mpiroot, mpicomm, ierr) call MPI_BCAST(lut_ssaice, size(lut_ssaice), kind_phys, mpiroot, mpicomm, ierr) call MPI_BCAST(lut_asyice, size(lut_asyice), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(band_lims_cldy), size(band_lims_cldy), kind_phys, mpiroot, mpicomm, ierr) endif if (rrtmgp_lw_cld_phys .eq. 2) then call MPI_BCAST(pade_extliq, size(pade_extliq), kind_phys, mpiroot, mpicomm, ierr) @@ -698,31 +695,27 @@ subroutine rrtmgp_lw_init(Model,mpicomm, mpirank, mpiroot, errmsg, errflg) call MPI_BCAST(pade_sizereg_extice), size(pade_sizereg_extice), kind_phys, mpiroot, mpicomm, ierr) call MPI_BCAST(pade_sizereg_ssaice), size(pade_sizereg_ssaice), kind_phys, mpiroot, mpicomm, ierr) call MPI_BCAST(pade_sizereg_asyice), size(pade_sizereg_asyice), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(band_lims_cldy), size(band_lims_cldy), kind_phys, mpiroot, mpicomm, ierr) endif - call MPI_BCAST(band_lims_cldy), size(band_lims_cldy), kind_phys, mpiroot, mpicomm, ierr) #endif ! Load tables data for RRTGMP cloud-optics if (rrtmgp_lw_cld_phys .eq. 1) then print*,'RRTMGP_INIT: ',shape(lut_extice) + call check_error_msg(kdist_lw_cldy%set_ice_roughness(nrghice)) call check_error_msg(kdist_lw_cldy%load(band_lims_cldy, radliq_lwr, radliq_upr, & radliq_fac, radice_lwr, radice_upr, radice_fac, lut_extliq, lut_ssaliq, & lut_asyliq, lut_extice, lut_ssaice, lut_asyice)) endif if (rrtmgp_lw_cld_phys .eq. 2) then + print*,'RRTMGP_INIT: ',shape(pade_extice) + call check_error_msg(kdist_lw_cldy%set_ice_roughness(nrghice)) call check_error_msg(kdist_lw_cldy%load(band_lims_cldy, pade_extliq, & pade_ssaliq, pade_asyliq, pade_extice, pade_ssaice, pade_asyice, & pade_sizereg_extliq, pade_sizereg_ssaliq, pade_sizereg_asyliq, & pade_sizereg_extice, pade_sizereg_ssaice, pade_sizereg_asyice)) endif - if ((rrtmgp_lw_cld_phys .gt. 0)) then - re_ice_min = radice_lwr - re_ice_max = radice_upr - re_liq_min = radliq_lwr - re_liq_max = radliq_upr - endif - end subroutine rrtmgp_lw_init ! ######################################################################################### @@ -882,19 +875,22 @@ subroutine rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr real(kind_phys), dimension(ncol,nlay) :: & vmr_o3, vmr_h2o, cldfrac2, thetaTendClrSky,thetaTendAllSky, cld_ref_liq2, & cld_ref_ice2,tau_snow,tau_rain,coldry,tem0,colamt + real(kind_phys), dimension(ncol,nlay,nBandsLW) :: & + tau_cld + real(kind_phys), dimension(nGptsLW,nlay,ncol) :: & + ipseeds logical,dimension(ncol,nlay) :: & liqmask,icemask - real(kind_phys), dimension(nGptsLW,ncol,nlay) :: & + logical, dimension(ncol,nlay,nGptsLW) :: & cldfracMCICA - real(kind_phys), dimension(:,:,:), allocatable :: & - tau_cld,tau_gpt logical :: & top_at_1=.false. ! RTE+RRTMGP classes type(ty_optical_props_1scl) :: & optical_props_clr, & ! Optical properties for gaseous atmosphere - optical_props_cldy, & ! Optical properties for clouds + optical_props_cldy, & ! Optical properties for clouds (by band) + optical_props_mcica,& ! Optical properties for clouds (sampled) optical_props_aer ! Optical properties for aerosols type(ty_source_func_lw) :: & @@ -968,10 +964,6 @@ subroutine rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr p_lev2=p_lev p_lev2(:,nlay+1) = kdist_lw_clr%get_press_min()/100. - ! Compute ice/liquid cloud masks, needed by rrtmgp_cloud_optics - liqmask = (cldfrac .gt. 0 .and. cld_lwp .gt. 0) - icemask = (cldfrac .gt. 0 .and. cld_iwp .gt. 0) - ! Conpute diffusivity angle adjustments. ! First need to compute precipitable water in each column tem0 = (1. - vmr_h2o)*amd + vmr_h2o*amw @@ -1001,25 +993,29 @@ subroutine rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr enddo enddo - ! RRTMGP cloud_optics expects particle size to be in a certain range. bound here - cld_ref_ice2 = cld_ref_ice - where(cld_ref_ice2 .gt. re_ice_max) cld_ref_ice2=re_ice_max - where(cld_ref_ice2 .lt. re_ice_min) cld_ref_ice2=re_ice_min - cld_ref_liq2 = cld_ref_liq - where(cld_ref_liq2 .gt. re_liq_max) cld_ref_liq2=re_liq_max - where(cld_ref_liq2 .lt. re_liq_min) cld_ref_liq2=re_liq_min + ! Compute ice/liquid cloud masks, needed by rrtmgp_cloud_optics + liqmask = (cldfrac .gt. 0 .and. cld_lwp .gt. 0) + icemask = (cldfrac .gt. 0 .and. cld_iwp .gt. 0) - allocate(tau_cld(nBandsLW, ncol, nlay)) - allocate(tau_gpt(ncol, nlay, nGptsLW)) + ! RRTMGP cloud_optics expects particle size to be in a certain range. bound here + if (rrtmgp_lw_cld_phys .gt. 0) then + cld_ref_ice2 = cld_ref_ice + where(cld_ref_ice2 .gt. kdist_lw_cldy%get_max_radius_ice()) cld_ref_ice2=kdist_lw_cldy%get_max_radius_ice() + where(cld_ref_ice2 .lt. kdist_lw_cldy%get_min_radius_ice()) cld_ref_ice2=kdist_lw_cldy%get_min_radius_ice() + cld_ref_liq2 = cld_ref_liq + where(cld_ref_liq2 .gt. kdist_lw_cldy%get_max_radius_liq()) cld_ref_liq2=kdist_lw_cldy%get_max_radius_liq() + where(cld_ref_liq2 .lt. kdist_lw_cldy%get_min_radius_liq()) cld_ref_liq2=kdist_lw_cldy%get_min_radius_liq() + endif ! ####################################################################################### ! Call RRTMGP ! ####################################################################################### ! Allocate space for source functions and gas optical properties - call check_error_msg(sources%alloc( ncol, nlay, kdist_lw_clr)) - call check_error_msg(optical_props_clr%alloc_1scl( ncol, nlay, kdist_lw_clr)) - call check_error_msg(optical_props_cldy%alloc_1scl(ncol, nlay, kdist_lw_clr)) - call check_error_msg(optical_props_aer%alloc_1scl( ncol, nlay, kdist_lw_clr)) + call check_error_msg(sources%alloc( ncol, nlay, kdist_lw_clr)) + call check_error_msg(optical_props_clr%alloc_1scl( ncol, nlay, kdist_lw_clr)) + call check_error_msg(optical_props_cldy%alloc_1scl( ncol, nlay, kdist_lw_cldy)) + call check_error_msg(optical_props_mcica%alloc_1scl(ncol, nlay, kdist_lw_clr)) + call check_error_msg(optical_props_aer%alloc_1scl( ncol, nlay, kdist_lw_clr)) ! Initialize RRTMGP files fluxAllSky%flux_up => flux_up_allSky @@ -1043,14 +1039,14 @@ subroutine rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr ! 1b) Compute the optical properties of the atmosphere and the Planck source functions ! from pressures, temperatures, and gas concentrations... print*,'Clear-Sky(LW): Optics' - call check_error_msg(kdist_lw_clr%gas_optics( & - p_lay(1:ncol,1:nlay)*100., & - p_lev2(1:ncol,1:nlay+1)*100., & - t_lay(1:ncol,1:nlay), & - skt(1:ncol), & - gas_concs_lw, & - optical_props_clr, & - sources, & + call check_error_msg(kdist_lw_clr%gas_optics( & + p_lay(1:ncol,1:nlay)*100., & + p_lev2(1:ncol,1:nlay+1)*100., & + t_lay(1:ncol,1:nlay), & + skt(1:ncol), & + gas_concs_lw, & + optical_props_clr, & + sources, & tlev = t_lev(1:ncol,1:nlay+1))) ! 1c) Add contribution from aerosols. Also, apply diffusivity angle @@ -1058,8 +1054,8 @@ subroutine rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr do iCol=1,nCol do iGpt=1,nGptsLW iBand = kdist_lw_clr%convert_gpt2band(iGpt) - optical_props_clr%tau(iCol,1:nlay,iGpt) = optical_props_clr%tau(iCol,1:nlay,iGpt) * secdiff(iBand,iCol) - optical_props_aer%tau(iCol,1:nlay,iGpt) = tau_aer(iCol,1:nlay,iBand) * (1. - ssa_aer(iCol,1:nlay,iBand)) * secdiff(iBand,iCol) + optical_props_clr%tau(iCol,1:nlay,iGpt) = optical_props_clr%tau(iCol,1:nlay,iGpt)! * secdiff(iBand,iCol) + optical_props_aer%tau(iCol,1:nlay,iGpt) = tau_aer(iCol,1:nlay,iBand) * (1. - ssa_aer(iCol,1:nlay,iBand))! * secdiff(iBand,iCol) enddo enddo call check_error_msg(optical_props_aer%increment(optical_props_clr)) @@ -1084,10 +1080,10 @@ subroutine rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr ! ####################################################################################### ! 2) All-sky fluxes ! ####################################################################################### - ! 2a) Compute in-cloud optics + ! 2a) Compute in-cloud radiative properties print*,'All-Sky(LW): Optics ' - tau_cld(:,:,:) = 0. if (any(cldfrac .gt. 0)) then + ! 2a.i) RRTMG cloud optics ! If using RRTMG cloud-physics. Model can provide either cloud-optics (cld_od) or ! cloud-properties by type (cloud LWP,snow effective radius, etc...) if (rrtmgp_lw_cld_phys .eq. 0) then @@ -1097,84 +1093,73 @@ subroutine rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr print*,' Using all types too...' call rrtmgp_lw_cloud_optics(ncol, nlay, nBandsLW, cld_lwp, cld_ref_liq, cld_iwp, & cld_ref_ice, cld_rwp, cld_ref_rain, cld_swp, cld_ref_snow, cldfrac, tau_cld) + optical_props_cldy%tau = tau_cld else ! Cloud-optical depth provided. do iCol=1,ncol do iLay=1,nlay if (cldfrac(iCol,iLay) .gt. cldmin) then - tau_cld(:,iCol,iLay) = cld_od(iCol,iLay)*secdiff(:,iCol) + optical_props_cldy%tau(iCol,iLay,:) = cld_od(iCol,iLay)*secdiff(:,iCol) else - tau_cld(:,iCol,iLay) = 0. + optical_props_cldy%tau(iCol,iLay,:) = 0._kind_phys endif end do end do endif endif - ! If using RRTMGP cloud-physics + ! 2a.ii) Use RRTMGP cloud-optics. if (rrtmgp_lw_cld_phys .gt. 0) then - print*,'Using RRTMGP cloud-physics' + print*,'Using RRTMGP cloud-physics',optical_props_cldy%get_ngpt(),optical_props_cldy%get_nband() call check_error_msg(kdist_lw_cldy%cloud_optics(ncol, nlay, nBandsLW, nrghice, & liqmask, icemask, cld_lwp, cld_iwp, cld_ref_liq2, cld_ref_ice2, optical_props_cldy)) - ! Add in contributions from snow and rain - do iCol=1,ncol - do iLay=1,nlay - if (cldfrac(iCol,iLay) .gt. cldmin) then - ! Rain optical-depth - tau_rain(iCol,iLay) = absrain*cld_rwp(iCol,iLay) - ! Snow optical-depth - if (cld_swp(iCol,iLay) .gt. 0. .and. cld_ref_snow(iCol,iLay) .gt. 10.) then - tau_snow(iCol,iLay) = abssnow0*1.05756*cld_swp(iCol,iLay)/cld_ref_snow(iCol,iLay) - else - tau_snow(iCol,iLay) = 0. - endif - endif - enddo - enddo - do iBand=1,nBandsLW - tau_cld(iBand,:,:) = optical_props_cldy%tau(iBand,:,:)+tau_snow+tau_rain - enddo + ! Add in contributions from snow and rain (Need to revisit) + end if endif - ! 2b) Call McICA to generate subcolumns. - tau_gpt(:,:,:) = 0. + ! 2c) Call McICA to generate subcolumns. if (isubclw .gt. 0) then print*,'All-Sky(LW): McICA' cldfrac2 = merge(cldfrac,0.,cldfrac .gt. cldmin) - call mcica_subcol_lw(ncol, nlay, nGptsLW, cldfrac2, ipseed, dzlyr, de_lgth, cldfracMCICA) + !call mcica_subcol_lw(ncol, nlay, nGptsLW, cldfrac2, ipseed, dzlyr, de_lgth, cldfracMCICA) + ipseeds(:,:,:) = ipseed(1) + !select case ( iovrlw ) + !case(2) + call check_error_msg(sampled_mask_max_ran(ipseeds,cldfrac2,cldfracMCICA)) + !end select + ! Map band optical depth to each g-point using McICA do iCol=1,ncol do iLay=1,nLay do iGpt=1,nGptsLW iBand = kdist_lw_clr%convert_gpt2band(iGpt) - if (cldfracMCICA(iGpt,iCol,iLay) .gt. 0.) then - tau_gpt(iCol,iLay,iGpt) = tau_cld(iband,iCol,iLay)*secdiff(iBand,iCol) + if (cldfracMCICA(iCol,iLay,iGpt)) then + optical_props_mcica%tau(iCol,iLay,iGpt) = optical_props_cldy%tau(iCol,iLay,iBand)!*secdiff(iBand,iCol) else - tau_gpt(iCol,iLay,iGpt) = 0. + optical_props_mcica%tau(iCol,iLay,iGpt) = 0._kind_phys endif enddo enddo enddo endif - optical_props_cldy%tau = tau_gpt - ! 2c) Add cloud contribution from the gaseous (clear-sky) atmosphere. + ! 2d) Add cloud contribution from the gaseous (clear-sky) atmosphere. print*,'All-Sky(LW): Increment' - call check_error_msg(optical_props_clr%increment(optical_props_cldy)) + call check_error_msg(optical_props_clr%increment(optical_props_mcica)) - ! 2d) Compute broadband fluxes + ! 2e) Compute broadband fluxes print*,'All-Sky(LW): Fluxes' call check_error_msg(rte_lw( & - optical_props_cldy, & + optical_props_mcica, & top_at_1, & sources, & semiss, & fluxAllSky)) - ! 2e) Compute heating rates + ! 2f) Compute heating rates print*,'All-Sky(LW): Heating-rates' call check_error_msg(compute_heating_rate( & fluxAllSky%flux_up, & @@ -1191,7 +1176,7 @@ subroutine rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr sum(fluxClrSky%flux_dn(1,iLay:iLay+1))/2.,sum(fluxAllSky%flux_up(1,iLay:iLay+1))/2.,& sum(fluxAllSky%flux_dn(1,iLay:iLay+1))/2. write(60,*) optical_props_clr%tau(1,iLay,:) - write(61,'(16f12.3)') tau_cld(:,1,iLay)!*secdiff(:,1) + write(61,'(16f12.3)') optical_props_cldy%tau(1,iLay,:)!*secdiff(:,1) enddo ! ####################################################################################### ! Copy fluxes from RRTGMP types into model radiation types. @@ -1203,7 +1188,7 @@ subroutine rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr sfcflx%upfx0 = fluxClrSky%flux_up(:,1) sfcflx%dnfxc = fluxAllSky%flux_dn(:,1) sfcflx%dnfx0 = fluxClrSky%flux_dn(:,1) - cldtau = tau_cld(7,:,:) + cldtau = optical_props_cldy%tau(:,:,7) hlwc = thetaTendAllSky ! Optional output diff --git a/physics/rrtmgp_sw.xml b/physics/rrtmgp_sw.xml new file mode 100644 index 000000000..392894a39 --- /dev/null +++ b/physics/rrtmgp_sw.xml @@ -0,0 +1,623 @@ + + + + + + air_pressure_at_layer_for_radiation_in_hPa + air pressure layer + hPa + p_lay + real + (:,:) + in + F + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + air_pressure_at_interface_for_radiation_in_hPa + air pressure level + hPa + p_lev + real + (:,:) + in + F + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + air_temperature_at_layer_for_radiation + air temperature layer + K + t_lay + real + (:,:) + in + F + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + air_temperature_at_interface_for_radiation + air temperature level + K + t_lev + real + (:,:) + in + F + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + water_vapor_specific_humidity_at_layer_for_radiation + specific humidity layer + kg kg-1 + q_lay + real + (:,:) + in + F + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + ozone_concentration_at_layer_for_radiation + ozone concentration layer + kg kg-1 + o3_lay + real + (:,:) + in + F + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + volume_mixing_ratio_co2 + volume mixing ratio co2 + kg kg-1 + vmr_co2 + real + (:,:) + in + F + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + volume_mixing_ratio_n2o + volume mixing ratio no2 + kg kg-1 + vmr_n2o + real + (:,:) + in + F + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + volume_mixing_ratio_ch4 + volume mixing ratio ch4 + kg kg-1 + vmr_ch4 + real + (:,:) + in + F + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + volume_mixing_ratio_o2 + volume mixing ratio o2 + kg kg-1 + vmr_o2 + real + (:,:) + in + F + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + volume_mixing_ratio_co + volume mixing ratio co + kg kg-1 + vmr_co + real + (:,:) + in + F + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + volume_mixing_ratio_cfc11 + volume mixing ratio cfc11 + kg kg-1 + vmr_cfc11 + real + (:,:) + in + F + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + volume_mixing_ratio_cfc12 + volume mixing ratio cfc12 + kg kg-1 + vmr_cfc12 + real + (:,:) + in + F + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + volume_mixing_ratio_cfc22 + volume mixing ratio cfc22 + kg kg-1 + vmr_cfc22 + real + (:,:) + in + F + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + volume_mixing_ratio_ccl4 + volume mixing ratio ccl4 + kg kg-1 + vmr_ccl4 + real + (:,:) + in + F + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + seed_random_numbers_sw + seed for random number generation for shortwave radiation + none + icseed + integer + (:) + in + F + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + aerosol_optical_depth_for_shortwave_bands_01-16 + aerosol optical depth for shortwave bands 01-16 + none + tau_aer + real + (:,:,:) + in + F + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + aerosol_single_scattering_albedo_for_shortwave_bands_01-16 + aerosol single scattering albedo for shortwave bands 01-16 + frac + ssa_aer + real + (:,:,:) + in + F + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + aerosol_asymmetry_parameter_for_shortwave_bands_01-16 + aerosol asymmetry paramter for shortwave bands 01-16 + none + asy_aer + real + (:,:,:) + in + F + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + surface_albedo_due_to_near_IR_direct + surface albedo due to near IR direct beam + frac + sfcalb_nir_dir + real + (:) + in + F + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + surface_albedo_due_to_near_IR_diffused + surface albedo due to near IR diffused beam + frac + sfcalb_nir_dif + real + (:) + in + F + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + surface_albedo_due_to_UV_and_VIS_direct + surface albedo due to UV+VIS direct beam + frac + sfcalb_uvis_dir + real + (:) + in + F + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + surface_albedo_due_to_UV_and_VIS_diffused + surface albedo due to UV+VIS diffused beam + frac + sfcalb_uvis_dif + real + (:) + in + F + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + layer_thickness_for_radiation + layer thickness + km + dzlyr + real + (:,:) + in + F + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + layer_pressure_thickness_for_radiation + layer pressure thickness + hPa + delpin + real + (:,:) + in + F + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + cloud_decorrelation_length + cloud decorrelation length + km + de_lgth + real + (:) + in + F + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + cosine_of_zenith_angle + cosine of the solar zenit angle + none + cossza + real + (:) + in + F + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + solar_constant + solar constant + W m-2 + solcon + real + + in + F + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + daytime_points_dimension + daytime points dimension + nday + nday + integer + + in + F + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + daytime_points + daytime points + index + idxday + integer + (:) + in + F + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + horizontal_loop_extent + horizontal dimension + count + ncol + integer + + in + F + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + adjusted_vertical_layer_dimension_for_radiation + number of vertical layers for radiation + count + nlay + integer + + in + F + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + flag_print + flag to print + flag + lprnt + logical + + in + F + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + total_cloud_fraction + total cloud fraction + frac + cldfrac + real + (:,:) + in + F + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + flag_to_calc_sw + flag to calculate SW irradiances + flag + lsswr + logical + + in + F + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step + shortwave total sky heating rate + K s-1 + hswc + real + (:,:) + inout + F + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + sw_fluxes_top_atmosphere + shortwave total sky fluxes at the top of the atm + W m-2 + topflx + topfsw_type + (:) + inout + F + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + sw_fluxes_sfc + shortwave total sky fluxes at the Earth surface + W m-2 + sfcflx + sfcfsw_type + (:) + inout + F + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + cloud_optical_depth_layers_at_0.55mu_band + approx .55mu band layer cloud optical depth + none + cldtau + real + (:,:) + inout + F + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_time_step + shortwave clear sky heating rate + K s-1 + hsw0 + real + (:,:) + inout + T + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + sw_heating_rate_spectral + shortwave total sky heating rate (spectral) + K s-1 + hswb + real + (:,:,:) + inout + T + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + sw_fluxes + sw fluxes total sky / csk and up / down at levels + W m-2 + flxprf + profsw_type + (:,:) + inout + T + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + components_of_surface_downward_shortwave_fluxes + derived type for special components of surface downward shortwave fluxes + W m-2 + fdncmp + cmpfsw_type + (:) + inout + T + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + cloud_liquid_water_path + cloud liquid water path + g m-2 + cld_lwp + real + (:,:) + in + T + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + mean_effective_radius_for_liquid_cloud + mean effective radius for liquid cloud + micron + cld_ref_liq + real + (:,:) + in + T + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + cloud_ice_water_path + cloud ice water path + g m-2 + cld_iwp + real + (:,:) + in + T + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + mean_effective_radius_for_ice_cloud + mean effective radius for ice cloud + micron + cld_ref_ice + real + (:,:) + in + T + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + cloud_rain_water_path + cloud rain water path + g m-2 + cld_rwp + real + (:,:) + in + T + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + mean_effective_radius_for_rain_drop + mean effective radius for rain drop + micron + cld_ref_rain + real + (:,:) + in + T + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + cloud_snow_water_path + cloud snow water path + g m-2 + cld_swp + real + (:,:) + in + T + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + mean_effective_radius_for_snow_flake + mean effective radius for snow flake + micron + cld_ref_snow + real + (:,:) + in + T + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + cloud_optical_depth + cloud optical depth + none + cld_od + real + (:,:) + in + T + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + cloud_single_scattering_albedo + cloud single scattering albedo + frac + cld_ssa + real + (:,:) + in + T + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + cloud_asymmetry_parameter + cloud asymmetry parameter + none + cld_asy + real + (:,:) + in + T + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + + + + diff --git a/physics/rrtmgp_sw_main.F90 b/physics/rrtmgp_sw_main.F90 index 53f1ae716..603e8b81f 100644 --- a/physics/rrtmgp_sw_main.F90 +++ b/physics/rrtmgp_sw_main.F90 @@ -873,6 +873,10 @@ subroutine rrtmgp_sw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr cld_swp(idxday,1:nLay), cld_ref_snow(idxday,1:nLay), & cldfrac(idxday,1:nLay), & tau_cld, ssa_cld, asy_cld) + write(70,*) 'rrtmgp_sw_cloud_optics' + do iLay=1,nLay + write(70,'(i10,5f12.7)') iLay,cld_lwp(idxday,iLay),cld_ref_liq(idxday,iLay),cld_iwp(idxday,iLay),cld_ref_ice(idxday,iLay),cldfrac(idxday,iLay) + enddo else ! Cloud-optical depth, single scattering albedo, and asymmetry parameter provided. do iDay=1,nDay @@ -896,8 +900,11 @@ subroutine rrtmgp_sw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr do iDay=1,nDay do iLay=1,nlay write(69,'(a5,i2,4f12.3)') '',iLay,p_lay(idxday(iDay),iLay),sum(optical_props_clr%tau(iDay,iLay,:)) + write(70,'(a5,2i8)') 'TAU: ',iDay,iLay write(70,'(16f12.3)') tau_cld(:,1,iLay) + write(70,'(a5,2i8)') 'SSA: ' write(70,'(16f12.3)') ssa_cld(:,1,iLay) + write(70,'(a5,2i8)') 'ASY: ' write(70,'(16f12.3)') asy_cld(:,1,iLay) enddo enddo From e92cd8cb84673298c12269cddec0a0d33aa835d8 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Tue, 30 Apr 2019 14:53:24 -0600 Subject: [PATCH 009/167] Housekeeping in LW. Remove diffusivity angle adjustment, Added RRTMG draw_samples, Cleaned up aerosol increment, Passing random number to RRTMGP cloud sampling. --- physics/GFS_rrtmgp_pre.F90 | 6 + physics/rrtmgp_lw_main.F90 | 254 +++++++++++++++++++------------------ 2 files changed, 136 insertions(+), 124 deletions(-) diff --git a/physics/GFS_rrtmgp_pre.F90 b/physics/GFS_rrtmgp_pre.F90 index a9669cf6d..370e5f27a 100644 --- a/physics/GFS_rrtmgp_pre.F90 +++ b/physics/GFS_rrtmgp_pre.F90 @@ -709,6 +709,7 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Sfcprop, Statein, & ! input ! DJS2019: START ! Compute layer cloud fraction. clwmin = 0.0 + cldcov(:,:) = 0.0 if (.not. Model%lmfshal) then do k = 1, LMK do i = 1, IM @@ -783,6 +784,11 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Sfcprop, Statein, & ! input write(58,*) "Model%lgfdlmprad: ",Model%lgfdlmprad write(58,*) "Model%lmfshal: ",Model%lmfshal write(58,*) "Model%lmfdeep2: ",Model%lmfdeep2 + do k = 1, LMK + do i = 1, IM + write(58,'(a19,2i8,f10.2)') " Cloud-cover: ",k,i,cldcov(i,k) + end do + enddo if (Model%imp_physics == 99 .or. Model%imp_physics == 10) then ! zhao/moorthi's prognostic cloud scheme ! or unified cloud and/or with MG microphysics diff --git a/physics/rrtmgp_lw_main.F90 b/physics/rrtmgp_lw_main.F90 index b2935087d..e723e0fcf 100644 --- a/physics/rrtmgp_lw_main.F90 +++ b/physics/rrtmgp_lw_main.F90 @@ -4,13 +4,14 @@ module rrtmgp_lw use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp use mo_gas_concentrations, only: ty_gas_concs use mo_fluxes, only: ty_fluxes_broadband + use mo_fluxes_byband, only: ty_fluxes_byband use mo_optical_props, only: ty_optical_props_1scl,ty_optical_props_2str use mo_source_functions, only: ty_source_func_lw use mo_rte_lw, only: rte_lw use mo_rte_kind, only: wl use mo_heating_rates, only: compute_heating_rate use mo_cloud_optics, only: ty_cloud_optics - use mo_cloud_sampling, only: sampled_mask_max_ran, sampled_mask_exp_ran + use mo_cloud_sampling, only: sampled_mask_max_ran, sampled_mask_exp_ran, draw_samples use machine, only: kind_phys use module_radlw_parameters, only: topflw_type, sfcflw_type, proflw_type use physparam, only: ilwcliq,isubclw,iovrlw,ilwrgas,icldflg,ilwrate @@ -18,6 +19,8 @@ module rrtmgp_lw use mo_rrtmgp_constants, only: grav, avogad use mo_rrtmgp_lw_cloud_optics, only: rrtmgp_lw_cloud_optics, diffusivityB1410,diffusivityHigh, & diffusivityLow, a0, a1, a2, cldmin, absrain, abssnow0, mcica_subcol_lw + use mersenne_twister, only: random_setseed, random_number, random_stat + implicit none ! Parameters @@ -53,7 +56,7 @@ module rrtmgp_lw ! Classes used by rte+rrtmgp type(ty_gas_optics_rrtmgp) :: & - kdist_lw_clr + kdist_lw type(ty_cloud_optics) :: & kdist_lw_cldy type(ty_gas_concs) :: & @@ -502,7 +505,7 @@ subroutine rrtmgp_lw_init(Model,mpicomm, mpirank, mpiroot, errmsg, errflg) do iGas=1,nGases call check_error_msg(gas_concs_lw%set_vmr(active_gases(iGas), 0._kind_phys)) enddo - call check_error_msg(kdist_lw_clr%load(gas_concs_lw, gas_names, key_species, band2gpt, & + call check_error_msg(kdist_lw%load(gas_concs_lw, gas_names, key_species, band2gpt, & band_lims, press_ref, press_ref_trop, temp_ref, temp_ref_p, temp_ref_t, & vmr_ref, kmajor, kminor_lower, kminor_upper, gas_minor,identifier_minor, & minor_gases_lower, minor_gases_upper, minor_limits_gpt_lower, & @@ -513,12 +516,12 @@ subroutine rrtmgp_lw_init(Model,mpicomm, mpirank, mpiroot, errmsg, errflg) totplnk, planck_frac, rayl_lower, rayl_upper)) ! Set band index by g-point array - nBandsLW = kdist_lw_clr%get_nband() - nGptsLW = kdist_lw_clr%get_ngpt() - ngb_LW = kdist_lw_clr%get_gpoint_bands() + nBandsLW = kdist_lw%get_nband() + nGptsLW = kdist_lw%get_ngpt() + ngb_LW = kdist_lw%get_gpoint_bands() ! Set initial permutation seed for McICA, initially set to number of G-points - ipsdlw0 = kdist_lw_clr%get_ngpt() + ipsdlw0 = kdist_lw%get_ngpt() ! ####################################################################################### ! If RRTMGP cloud-optics are requested, read tables and broadcast. @@ -862,23 +865,23 @@ subroutine rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr ! dnfx0 - clear sky dnward flux (W/m2) ! Local variables - integer :: iGpt,iCol,iLay,iBand + integer :: iGpt,iCol,iLay,iBand,iTOA,iSFC integer,dimension(ncol) :: ipseed real(kind_phys), dimension(nBandsLW,ncol) :: & - semiss, secdiff - real(kind_phys) :: & - tem1,tem2 - real(kind_phys), dimension(ncol) :: & - precipitableH2o + semiss real(kind_phys), dimension(ncol,nlay+1),target :: & flux_up_allSky, flux_up_clrSky, flux_dn_allSky, flux_dn_clrSky, p_lev2 + real(kind_phys), dimension(ncol,nlay+1,nBandsLW),target :: & + fluxBB_up_allSky, fluxBB_dn_allSky real(kind_phys), dimension(ncol,nlay) :: & - vmr_o3, vmr_h2o, cldfrac2, thetaTendClrSky,thetaTendAllSky, cld_ref_liq2, & - cld_ref_ice2,tau_snow,tau_rain,coldry,tem0,colamt + vmr_o3, vmr_h2o, thetaTendClrSky,thetaTendAllSky, cld_ref_liq2, & + cld_ref_ice2,tau_snow,tau_rain real(kind_phys), dimension(ncol,nlay,nBandsLW) :: & - tau_cld + tau_cld,thetaTendByBandAllSky real(kind_phys), dimension(nGptsLW,nlay,ncol) :: & - ipseeds + rng3D + real(kind_phys), dimension(nGptsLW*nLay) :: & + rng1D logical,dimension(ncol,nlay) :: & liqmask,icemask logical, dimension(ncol,nlay,nGptsLW) :: & @@ -886,6 +889,9 @@ subroutine rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr logical :: & top_at_1=.false. + ! Types used by Random Number Generator + type(random_stat) :: rng_stat + ! RTE+RRTMGP classes type(ty_optical_props_1scl) :: & optical_props_clr, & ! Optical properties for gaseous atmosphere @@ -898,6 +904,8 @@ subroutine rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr type(ty_fluxes_broadband) :: & fluxAllSky, & ! All-sky flux (W/m2) fluxClrSky ! Clear-sky flux (W/m2) + type(ty_fluxes_byband) :: & + fluxBBAllSky ! All-sky flux (in each LW band) (W/m2) ! Initialize CCPP error handling variables errmsg = '' @@ -937,6 +945,18 @@ subroutine rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr ! What is vertical ordering? top_at_1 = (p_lay(1,1) .lt. p_lay(1,nlay)) + if (top_at_1) then + iSFC = nlay+1 + iTOA = 1 + else + iSFC = 1 + iTOA = nlay+1 + endif + + ! Input model-level pressure @ the top-of-model is set to 1Pa, whereas RRTMGP minimum + ! pressure needs to be slightly greater than that, ~1.00518Pa + p_lev2 = p_lev + p_lev2(:,iTOA) = kdist_lw%get_press_min()/100._kind_phys ! Change random number seed value for each radiation invocation (isubclw =1 or 2). if(isubclw == 1) then ! advance prescribed permutation seed @@ -959,40 +979,6 @@ subroutine rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr vmr_h2o = merge((q_lay/(1-q_lay))*amdw, 0., q_lay .ne. 1.) vmr_o3 = merge(o3_lay*amdo3, 0., o3_lay .gt. 0.) - ! Input model-level pressure @ the top-of-model is set to 1Pa, whereas RRTMGP minimum - ! pressure needs to be slightly greater than that, ~1.00518Pa - p_lev2=p_lev - p_lev2(:,nlay+1) = kdist_lw_clr%get_press_min()/100. - - ! Conpute diffusivity angle adjustments. - ! First need to compute precipitable water in each column - tem0 = (1. - vmr_h2o)*amd + vmr_h2o*amw - coldry = ( 1.0e-20 * 1.0e3 *avogad)*delpin / (100.*grav*tem0*(1. + vmr_h2o)) - colamt = max(0., coldry*vmr_h2o) - tem1 = 0. - tem2 = 0. - do iCol=1,nCol - do iLay=1,nLay - tem1 = tem1 + coldry(iCol,iLay)+colamt(iCol,iLay) - tem2 = tem2 + colamt(iCol,iLay) - enddo - precipitableH2o(iCol) = p_lev(iCol,1)*(10.*tem2 / (amdw*tem1*grav)) - enddo - - ! Reset diffusivity angle for Bands 2-3 and 5-9 to vary (between 1.50 - ! and 1.80) as a function of total column water vapor. the function - ! has been defined to minimize flux and cooling rate errors in these bands - ! over a wide range of precipitable water values. - do iCol=1,nCol - do iBand = 1, nbandsLW - if (iBand==1 .or. iBand==4 .or. iBand==10) then - secdiff(iBand,iCol) = diffusivityB1410 - else - secdiff(iBand,iCol) = min( diffusivityHigh, max(diffusivityLow, a0(iBand)+a1(iBand)*exp(a2(iBand)*precipitableH2o(iCol)))) - endif - enddo - enddo - ! Compute ice/liquid cloud masks, needed by rrtmgp_cloud_optics liqmask = (cldfrac .gt. 0 .and. cld_lwp .gt. 0) icemask = (cldfrac .gt. 0 .and. cld_iwp .gt. 0) @@ -1011,17 +997,28 @@ subroutine rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr ! Call RRTMGP ! ####################################################################################### ! Allocate space for source functions and gas optical properties - call check_error_msg(sources%alloc( ncol, nlay, kdist_lw_clr)) - call check_error_msg(optical_props_clr%alloc_1scl( ncol, nlay, kdist_lw_clr)) + call check_error_msg(sources%alloc( ncol, nlay, kdist_lw)) + call check_error_msg(optical_props_clr%alloc_1scl( ncol, nlay, kdist_lw)) + call check_error_msg(optical_props_mcica%alloc_1scl(ncol, nlay, kdist_lw)) + ! DJS_asks_RP + ! Need to use kdist_lw_cldy here, otherewise if we use kdist_lw, optical_props_cldy gets + ! allocated with nBands != nGpts, which then fails when calling kdist_lw_cldy%cloud_optics call check_error_msg(optical_props_cldy%alloc_1scl( ncol, nlay, kdist_lw_cldy)) - call check_error_msg(optical_props_mcica%alloc_1scl(ncol, nlay, kdist_lw_clr)) - call check_error_msg(optical_props_aer%alloc_1scl( ncol, nlay, kdist_lw_clr)) + ! We have also have aerosol information by band, so need to allocate just like for + ! clouds, where nbands = ngpts = 16. This is problematic when not using RRTMGP cloud_optics(), + ! as kdist_lw_cldy only gets loaded, so this breaks when using rrtmg cloud_optics with rrtmgp. + call check_error_msg(optical_props_aer%alloc_1scl( ncol, nlay, kdist_lw_cldy)) ! Initialize RRTMGP files - fluxAllSky%flux_up => flux_up_allSky - fluxAllsky%flux_dn => flux_dn_allSky - fluxClrSky%flux_up => flux_up_clrSky - fluxClrsky%flux_dn => flux_dn_clrSky + fluxAllSky%flux_up => flux_up_allSky + fluxAllsky%flux_dn => flux_dn_allSky + fluxClrSky%flux_up => flux_up_clrSky + fluxClrsky%flux_dn => flux_dn_clrSky + ! Only calculate fluxes by-band, only when heating-rate profiles by band are requested. + if (l_AllSky_HR_byband) then + fluxBBAllSky%bnd_flux_up => fluxBB_up_allSky + fluxBBAllsky%bnd_flux_dn => fluxBB_dn_allSky + endif ! ####################################################################################### ! 1) Clear-sky fluxes (gaseous-atmosphere + aerosols) @@ -1039,7 +1036,7 @@ subroutine rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr ! 1b) Compute the optical properties of the atmosphere and the Planck source functions ! from pressures, temperatures, and gas concentrations... print*,'Clear-Sky(LW): Optics' - call check_error_msg(kdist_lw_clr%gas_optics( & + call check_error_msg(kdist_lw%gas_optics( & p_lay(1:ncol,1:nlay)*100., & p_lev2(1:ncol,1:nlay+1)*100., & t_lay(1:ncol,1:nlay), & @@ -1049,15 +1046,9 @@ subroutine rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr sources, & tlev = t_lev(1:ncol,1:nlay+1))) - ! 1c) Add contribution from aerosols. Also, apply diffusivity angle + ! 1c) Add contribution from aerosols. print*,'Clear-Sky(LW): Increment Aerosol' - do iCol=1,nCol - do iGpt=1,nGptsLW - iBand = kdist_lw_clr%convert_gpt2band(iGpt) - optical_props_clr%tau(iCol,1:nlay,iGpt) = optical_props_clr%tau(iCol,1:nlay,iGpt)! * secdiff(iBand,iCol) - optical_props_aer%tau(iCol,1:nlay,iGpt) = tau_aer(iCol,1:nlay,iBand) * (1. - ssa_aer(iCol,1:nlay,iBand))! * secdiff(iBand,iCol) - enddo - enddo + optical_props_aer%tau = tau_aer * (1. - ssa_aer) call check_error_msg(optical_props_aer%increment(optical_props_clr)) ! 1d) Compute the clear-sky broadband fluxes @@ -1070,20 +1061,23 @@ subroutine rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr fluxClrSky)) ! 1e) Compute heating rates - print*,'Clear-Sky(LW): Heating-rates' - call check_error_msg(compute_heating_rate( & - fluxClrSky%flux_up, & - fluxClrSky%flux_dn, & - p_lev2(1:ncol,1:nlay+1)*100., & - thetaTendClrSky)) + if (l_ClrSky_HR) then + print*,'Clear-Sky(LW): Heating-rates' + call check_error_msg(compute_heating_rate( & + fluxClrSky%flux_up, & + fluxClrSky%flux_dn, & + p_lev2(1:ncol,1:nlay+1)*100., & + thetaTendClrSky)) + endif ! ####################################################################################### ! 2) All-sky fluxes ! ####################################################################################### + ! 2a) Compute in-cloud radiative properties print*,'All-Sky(LW): Optics ' if (any(cldfrac .gt. 0)) then - ! 2a.i) RRTMG cloud optics + ! 2a.i) RRTMG cloud optics. ! If using RRTMG cloud-physics. Model can provide either cloud-optics (cld_od) or ! cloud-properties by type (cloud LWP,snow effective radius, etc...) if (rrtmgp_lw_cld_phys .eq. 0) then @@ -1099,7 +1093,7 @@ subroutine rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr do iCol=1,ncol do iLay=1,nlay if (cldfrac(iCol,iLay) .gt. cldmin) then - optical_props_cldy%tau(iCol,iLay,:) = cld_od(iCol,iLay)*secdiff(:,iCol) + optical_props_cldy%tau(iCol,iLay,:) = cld_od(iCol,iLay) else optical_props_cldy%tau(iCol,iLay,:) = 0._kind_phys endif @@ -1110,40 +1104,34 @@ subroutine rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr ! 2a.ii) Use RRTMGP cloud-optics. if (rrtmgp_lw_cld_phys .gt. 0) then - print*,'Using RRTMGP cloud-physics',optical_props_cldy%get_ngpt(),optical_props_cldy%get_nband() + print*,'Using RRTMGP cloud-physics' call check_error_msg(kdist_lw_cldy%cloud_optics(ncol, nlay, nBandsLW, nrghice, & - liqmask, icemask, cld_lwp, cld_iwp, cld_ref_liq2, cld_ref_ice2, optical_props_cldy)) - - ! Add in contributions from snow and rain (Need to revisit) - + liqmask, icemask, cld_lwp, cld_iwp, cld_ref_liq2, cld_ref_ice2, optical_props_cldy)) end if endif - ! 2c) Call McICA to generate subcolumns. + ! 2b) Call McICA to generate subcolumns. if (isubclw .gt. 0) then print*,'All-Sky(LW): McICA' - cldfrac2 = merge(cldfrac,0.,cldfrac .gt. cldmin) - !call mcica_subcol_lw(ncol, nlay, nGptsLW, cldfrac2, ipseed, dzlyr, de_lgth, cldfracMCICA) - - ipseeds(:,:,:) = ipseed(1) - !select case ( iovrlw ) - !case(2) - call check_error_msg(sampled_mask_max_ran(ipseeds,cldfrac2,cldfracMCICA)) - !end select + + ! Call RNG. Mersennse Twister accepts 1D array, so loop over columns and collapse along G-points + ! and layers. ([nGpts,nLayer,nColumn]-> [nGpts*nLayer]*nColumn) + do iCol=1,nCol + call random_setseed(ipseed(icol),rng_stat) + call random_number(rng1D,rng_stat) + rng3D(:,:,iCol) = reshape(source = rng1D,shape=[nGptsLW,nLay]) + enddo + + ! Call McICA + select case ( iovrlw ) + ! Maximumn-random + case(1) + call check_error_msg(sampled_mask_max_ran(rng3D,cldfrac,cldfracMCICA)) + end select ! Map band optical depth to each g-point using McICA - do iCol=1,ncol - do iLay=1,nLay - do iGpt=1,nGptsLW - iBand = kdist_lw_clr%convert_gpt2band(iGpt) - if (cldfracMCICA(iCol,iLay,iGpt)) then - optical_props_mcica%tau(iCol,iLay,iGpt) = optical_props_cldy%tau(iCol,iLay,iBand)!*secdiff(iBand,iCol) - else - optical_props_mcica%tau(iCol,iLay,iGpt) = 0._kind_phys - endif - enddo - enddo - enddo + call check_error_msg(draw_samples(cldfracMCICA,optical_props_cldy,optical_props_mcica)) + endif ! 2d) Add cloud contribution from the gaseous (clear-sky) atmosphere. @@ -1152,20 +1140,39 @@ subroutine rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr ! 2e) Compute broadband fluxes print*,'All-Sky(LW): Fluxes' - call check_error_msg(rte_lw( & - optical_props_mcica, & - top_at_1, & - sources, & - semiss, & - fluxAllSky)) - + if (l_AllSky_HR_byband) then + call check_error_msg(rte_lw( & + optical_props_mcica, & + top_at_1, & + sources, & + semiss, & + fluxBBAllSky)) + else + call check_error_msg(rte_lw( & + optical_props_mcica, & + top_at_1, & + sources, & + semiss, & + fluxAllSky)) + endif + ! 2f) Compute heating rates print*,'All-Sky(LW): Heating-rates' - call check_error_msg(compute_heating_rate( & - fluxAllSky%flux_up, & - fluxAllSky%flux_dn, & - p_lev(1:ncol,1:nlay+1)*100., & - thetaTendAllSky)) + if (l_AllSky_HR_byband) then + do iBand=1,nBandsLW + call check_error_msg(compute_heating_rate( & + fluxBBAllSky%bnd_flux_up(:,:,iBand), & + fluxBBAllSky%bnd_flux_dn(:,:,iBand), & + p_lev(1:ncol,1:nlay+1)*100., & + thetaTendByBandAllSky(:,:,iBand))) + enddo + else + call check_error_msg(compute_heating_rate( & + fluxAllSky%flux_up, & + fluxAllSky%flux_dn, & + p_lev(1:ncol,1:nlay+1)*100., & + thetaTendAllSky)) + endif write(59,*) "#" write(60,*) "#" @@ -1176,18 +1183,19 @@ subroutine rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr sum(fluxClrSky%flux_dn(1,iLay:iLay+1))/2.,sum(fluxAllSky%flux_up(1,iLay:iLay+1))/2.,& sum(fluxAllSky%flux_dn(1,iLay:iLay+1))/2. write(60,*) optical_props_clr%tau(1,iLay,:) - write(61,'(16f12.3)') optical_props_cldy%tau(1,iLay,:)!*secdiff(:,1) + write(61,'(16f12.3)') optical_props_cldy%tau(1,iLay,:) enddo + ! ####################################################################################### ! Copy fluxes from RRTGMP types into model radiation types. ! ####################################################################################### ! Mandatory outputs - topflx%upfxc = fluxAllSky%flux_up(:,nlay+1) - topflx%upfx0 = fluxClrSky%flux_up(:,nlay+1) - sfcflx%upfxc = fluxAllSky%flux_up(:,1) - sfcflx%upfx0 = fluxClrSky%flux_up(:,1) - sfcflx%dnfxc = fluxAllSky%flux_dn(:,1) - sfcflx%dnfx0 = fluxClrSky%flux_dn(:,1) + topflx%upfxc = fluxAllSky%flux_up(:,iTOA) + topflx%upfx0 = fluxClrSky%flux_up(:,iTOA) + sfcflx%upfxc = fluxAllSky%flux_up(:,iSFC) + sfcflx%upfx0 = fluxClrSky%flux_up(:,iSFC) + sfcflx%dnfxc = fluxAllSky%flux_dn(:,iSFC) + sfcflx%dnfx0 = fluxClrSky%flux_dn(:,iSFC) cldtau = optical_props_cldy%tau(:,:,7) hlwc = thetaTendAllSky @@ -1199,9 +1207,7 @@ subroutine rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr flxprf%dnfx0 = fluxClrSky%flux_dn endif if (l_AllSky_HR_byband) then - do iBand=1,nBandsLW - hlwb(:,:,iBand) = thetaTendAllSky - end do + hlwb = thetaTendByBandAllSky endif if (l_ClrSky_HR) then hlw0 = thetaTendClrSky From cf6bd6628be76bc64b788e270832d7586ce4357c Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Wed, 1 May 2019 09:15:21 -0600 Subject: [PATCH 010/167] Revised LW flux calculation. --- physics/rrtmgp_lw_main.F90 | 153 ++++++++++++++++++------------------- 1 file changed, 74 insertions(+), 79 deletions(-) diff --git a/physics/rrtmgp_lw_main.F90 b/physics/rrtmgp_lw_main.F90 index e723e0fcf..7ed33e450 100644 --- a/physics/rrtmgp_lw_main.F90 +++ b/physics/rrtmgp_lw_main.F90 @@ -17,8 +17,7 @@ module rrtmgp_lw use physparam, only: ilwcliq,isubclw,iovrlw,ilwrgas,icldflg,ilwrate use GFS_typedefs, only: GFS_control_type use mo_rrtmgp_constants, only: grav, avogad - use mo_rrtmgp_lw_cloud_optics, only: rrtmgp_lw_cloud_optics, diffusivityB1410,diffusivityHigh, & - diffusivityLow, a0, a1, a2, cldmin, absrain, abssnow0, mcica_subcol_lw + use mo_rrtmgp_lw_cloud_optics, only: rrtmgp_lw_cloud_optics use mersenne_twister, only: random_setseed, random_number, random_stat implicit none @@ -231,7 +230,7 @@ subroutine rrtmgp_lw_init(Model,mpicomm, mpirank, mpiroot, errmsg, errflg) endif ! How are we handling cloud-optics? - rrtmgp_lw_cld_phys = Model%rrtmgp_lw_cld_phys + rrtmgp_lw_cld_phys = Model%rrtmgp_cld_phys ! Filenames are set in the gfs_physics_nml (scm/src/GFS_typedefs.F90) kdist_file = trim(Model%rrtmgp_root)//trim(Model%kdist_lw_file_gas) @@ -293,40 +292,40 @@ subroutine rrtmgp_lw_init(Model,mpicomm, mpirank, mpiroot, errmsg, errflg) call MPI_BCAST(ninternalSourcetemps, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) #endif - ! On master processor, allocate space, read in fields, broadcast to all processors - if (mpirank .eq. mpiroot) then - ! Allocate space for arrays - allocate(gas_names(nabsorbers)) - allocate(scaling_gas_lower(nminor_absorber_intervals_lower)) - allocate(scaling_gas_upper(nminor_absorber_intervals_upper)) - allocate(gas_minor(nminorabsorbers)) - allocate(identifier_minor(nminorabsorbers)) - allocate(minor_gases_lower(nminor_absorber_intervals_lower)) - allocate(minor_gases_upper(nminor_absorber_intervals_upper)) - allocate(minor_limits_gpt_lower(npairs,nminor_absorber_intervals_lower)) - allocate(minor_limits_gpt_upper(npairs,nminor_absorber_intervals_upper)) - allocate(band2gpt(2,nbnds)) - allocate(key_species(2,nlayers,nbnds)) - allocate(band_lims(2,nbnds)) - allocate(press_ref(npress)) - allocate(temp_ref(ntemps)) - allocate(vmr_ref(nlayers, nextrabsorbers, ntemps)) - allocate(kminor_lower(ncontributors_lower, nmixingfracs, ntemps)) - allocate(kmajor(ngpts, nmixingfracs, npress+1, ntemps)) - allocate(kminor_start_lower(nminor_absorber_intervals_lower)) - allocate(kminor_upper(ncontributors_upper, nmixingfracs, ntemps)) - allocate(kminor_start_upper(nminor_absorber_intervals_upper)) - allocate(minor_scales_with_density_lower(nminor_absorber_intervals_lower)) - allocate(minor_scales_with_density_upper(nminor_absorber_intervals_upper)) - allocate(scale_by_complement_lower(nminor_absorber_intervals_lower)) - allocate(scale_by_complement_upper(nminor_absorber_intervals_upper)) - allocate(temp1(nminor_absorber_intervals_lower)) - allocate(temp2(nminor_absorber_intervals_upper)) - allocate(temp3(nminor_absorber_intervals_lower)) - allocate(temp4(nminor_absorber_intervals_upper)) - allocate(totplnk(ninternalSourcetemps, nbnds)) - allocate(planck_frac(ngpts, nmixingfracs, npress+1, ntemps)) + !if (mpirank .eq. mpiroot) then + ! Allocate space for arrays + allocate(gas_names(nabsorbers)) + allocate(scaling_gas_lower(nminor_absorber_intervals_lower)) + allocate(scaling_gas_upper(nminor_absorber_intervals_upper)) + allocate(gas_minor(nminorabsorbers)) + allocate(identifier_minor(nminorabsorbers)) + allocate(minor_gases_lower(nminor_absorber_intervals_lower)) + allocate(minor_gases_upper(nminor_absorber_intervals_upper)) + allocate(minor_limits_gpt_lower(npairs,nminor_absorber_intervals_lower)) + allocate(minor_limits_gpt_upper(npairs,nminor_absorber_intervals_upper)) + allocate(band2gpt(2,nbnds)) + allocate(key_species(2,nlayers,nbnds)) + allocate(band_lims(2,nbnds)) + allocate(press_ref(npress)) + allocate(temp_ref(ntemps)) + allocate(vmr_ref(nlayers, nextrabsorbers, ntemps)) + allocate(kminor_lower(ncontributors_lower, nmixingfracs, ntemps)) + allocate(kmajor(ngpts, nmixingfracs, npress+1, ntemps)) + allocate(kminor_start_lower(nminor_absorber_intervals_lower)) + allocate(kminor_upper(ncontributors_upper, nmixingfracs, ntemps)) + allocate(kminor_start_upper(nminor_absorber_intervals_upper)) + allocate(minor_scales_with_density_lower(nminor_absorber_intervals_lower)) + allocate(minor_scales_with_density_upper(nminor_absorber_intervals_upper)) + allocate(scale_by_complement_lower(nminor_absorber_intervals_lower)) + allocate(scale_by_complement_upper(nminor_absorber_intervals_upper)) + allocate(temp1(nminor_absorber_intervals_lower)) + allocate(temp2(nminor_absorber_intervals_upper)) + allocate(temp3(nminor_absorber_intervals_lower)) + allocate(temp4(nminor_absorber_intervals_upper)) + allocate(totplnk(ninternalSourcetemps, nbnds)) + allocate(planck_frac(ngpts, nmixingfracs, npress+1, ntemps)) + if (mpirank .eq. mpiroot) then ! Read in fields from file if(nf90_open(trim(kdist_file), NF90_WRITE, ncid_lw) .eq. NF90_NOERR) then status = nf90_inq_varid(ncid_lw,'gas_names',varID) @@ -566,17 +565,35 @@ subroutine rrtmgp_lw_init(Model,mpicomm, mpirank, mpiroot, errmsg, errflg) endif #endif + if (rrtmgp_lw_cld_phys .eq. 1) then + allocate(lut_extliq(nsize_liq, nBandLWcldy)) + allocate(lut_ssaliq(nsize_liq, nBandLWcldy)) + allocate(lut_asyliq(nsize_liq, nBandLWcldy)) + allocate(lut_extice(nsize_ice, nBandLWcldy, nrghice)) + allocate(lut_ssaice(nsize_ice, nBandLWcldy, nrghice)) + allocate(lut_asyice(nsize_ice, nBandLWcldy, nrghice)) + allocate(band_lims_cldy(2, nBandLWcldy)) + endif + if (rrtmgp_lw_cld_phys .eq. 2) then + allocate(pade_extliq(nbandLWcldy, nsizereg, ncoeff_ext )) + allocate(pade_ssaliq(nbandLWcldy, nsizereg, ncoeff_ssa_g)) + allocate(pade_asyliq(nbandLWcldy, nsizereg, ncoeff_ssa_g)) + allocate(pade_extice(nbandLWcldy, nsizereg, ncoeff_ext, nrghice)) + allocate(pade_ssaice(nbandLWcldy, nsizereg, ncoeff_ssa_g, nrghice)) + allocate(pade_asyice(nbandLWcldy, nsizereg, ncoeff_ssa_g, nrghice)) + allocate(pade_sizereg_extliq(nbound)) + allocate(pade_sizereg_ssaliq(nbound)) + allocate(pade_sizereg_asyliq(nbound)) + allocate(pade_sizereg_extice(nbound)) + allocate(pade_sizereg_ssaice(nbound)) + allocate(pade_sizereg_asyice(nbound)) + allocate(band_lims_cldy(2,nbandLWcldy)) + endif + ! On master processor, allocate space, read in fields, broadcast to all processors if (mpirank .eq. mpiroot) then ! if (rrtmgp_lw_cld_phys .eq. 1) then - allocate(lut_extliq(nsize_liq, nBandLWcldy)) - allocate(lut_ssaliq(nsize_liq, nBandLWcldy)) - allocate(lut_asyliq(nsize_liq, nBandLWcldy)) - allocate(lut_extice(nsize_ice, nBandLWcldy, nrghice)) - allocate(lut_ssaice(nsize_ice, nBandLWcldy, nrghice)) - allocate(lut_asyice(nsize_ice, nBandLWcldy, nrghice)) - allocate(band_lims_cldy(2, nBandLWcldy)) ! if(nf90_open(trim(kdist_cldy_file), NF90_WRITE, ncid_lw_clds) == NF90_NOERR) then status = nf90_inq_varid(ncid_lw_clds,'radliq_lwr',varID) @@ -610,19 +627,6 @@ subroutine rrtmgp_lw_init(Model,mpicomm, mpirank, mpiroot, errmsg, errflg) endif ! if (rrtmgp_lw_cld_phys .eq. 2) then - allocate(pade_extliq(nbandLWcldy, nsizereg, ncoeff_ext )) - allocate(pade_ssaliq(nbandLWcldy, nsizereg, ncoeff_ssa_g)) - allocate(pade_asyliq(nbandLWcldy, nsizereg, ncoeff_ssa_g)) - allocate(pade_extice(nbandLWcldy, nsizereg, ncoeff_ext, nrghice)) - allocate(pade_ssaice(nbandLWcldy, nsizereg, ncoeff_ssa_g, nrghice)) - allocate(pade_asyice(nbandLWcldy, nsizereg, ncoeff_ssa_g, nrghice)) - allocate(pade_sizereg_extliq(nbound)) - allocate(pade_sizereg_ssaliq(nbound)) - allocate(pade_sizereg_asyliq(nbound)) - allocate(pade_sizereg_extice(nbound)) - allocate(pade_sizereg_ssaice(nbound)) - allocate(pade_sizereg_asyice(nbound)) - allocate(band_lims_cldy(2,nbandLWcldy)) ! if(nf90_open(trim(kdist_cldy_file), NF90_WRITE, ncid_lw_clds) == NF90_NOERR) then status = nf90_inq_varid(ncid_lw_clds,'radliq_lwr',varID) @@ -901,11 +905,11 @@ subroutine rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr type(ty_source_func_lw) :: & sources ! source function - type(ty_fluxes_broadband) :: & + type(ty_fluxes_byband) :: & fluxAllSky, & ! All-sky flux (W/m2) fluxClrSky ! Clear-sky flux (W/m2) - type(ty_fluxes_byband) :: & - fluxBBAllSky ! All-sky flux (in each LW band) (W/m2) +! type(ty_fluxes_byband) :: & +! fluxBBAllSky ! All-sky flux (in each LW band) (W/m2) ! Initialize CCPP error handling variables errmsg = '' @@ -1016,8 +1020,8 @@ subroutine rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr fluxClrsky%flux_dn => flux_dn_clrSky ! Only calculate fluxes by-band, only when heating-rate profiles by band are requested. if (l_AllSky_HR_byband) then - fluxBBAllSky%bnd_flux_up => fluxBB_up_allSky - fluxBBAllsky%bnd_flux_dn => fluxBB_dn_allSky + fluxAllSky%bnd_flux_up => fluxBB_up_allSky + fluxAllsky%bnd_flux_dn => fluxBB_dn_allSky endif ! ####################################################################################### @@ -1092,7 +1096,7 @@ subroutine rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr ! Cloud-optical depth provided. do iCol=1,ncol do iLay=1,nlay - if (cldfrac(iCol,iLay) .gt. cldmin) then + if (cldfrac(iCol,iLay) .gt. 1e-20_kind_phys) then optical_props_cldy%tau(iCol,iLay,:) = cld_od(iCol,iLay) else optical_props_cldy%tau(iCol,iLay,:) = 0._kind_phys @@ -1140,29 +1144,20 @@ subroutine rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr ! 2e) Compute broadband fluxes print*,'All-Sky(LW): Fluxes' - if (l_AllSky_HR_byband) then - call check_error_msg(rte_lw( & - optical_props_mcica, & - top_at_1, & - sources, & - semiss, & - fluxBBAllSky)) - else - call check_error_msg(rte_lw( & - optical_props_mcica, & - top_at_1, & - sources, & - semiss, & - fluxAllSky)) - endif + call check_error_msg(rte_lw( & + optical_props_mcica, & + top_at_1, & + sources, & + semiss, & + fluxAllSky)) ! 2f) Compute heating rates print*,'All-Sky(LW): Heating-rates' if (l_AllSky_HR_byband) then do iBand=1,nBandsLW call check_error_msg(compute_heating_rate( & - fluxBBAllSky%bnd_flux_up(:,:,iBand), & - fluxBBAllSky%bnd_flux_dn(:,:,iBand), & + fluxAllSky%bnd_flux_up(:,:,iBand), & + fluxAllSky%bnd_flux_dn(:,:,iBand), & p_lev(1:ncol,1:nlay+1)*100., & thetaTendByBandAllSky(:,:,iBand))) enddo From c089f10991dd72ed0a897ecdb9349e0a0307f7d7 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Wed, 1 May 2019 15:29:19 -0600 Subject: [PATCH 011/167] Same stuff as previous commit, but for SW. --- physics/rrtmgp_lw_cloud_optics.F90 | 18 - physics/rrtmgp_lw_main.F90 | 24 +- physics/rrtmgp_sw_cloud_optics.F90 | 29 +- physics/rrtmgp_sw_main.F90 | 642 +++++++++++++++++++++-------- 4 files changed, 486 insertions(+), 227 deletions(-) diff --git a/physics/rrtmgp_lw_cloud_optics.F90 b/physics/rrtmgp_lw_cloud_optics.F90 index 4c69aa70b..995ad33a1 100644 --- a/physics/rrtmgp_lw_cloud_optics.F90 +++ b/physics/rrtmgp_lw_cloud_optics.F90 @@ -15,24 +15,6 @@ module mo_rrtmgp_lw_cloud_optics absrain = 0.33e-3, & ! Rain drop absorption coefficient \f$(m^{2}/g)\f$ . abssnow0 = 1.5, & ! Snow flake absorption coefficient (micron), fu coeff abssnow1 = 2.34e-3 ! Snow flake absorption coefficient \f$(m^{2}/g)\f$, ncar coef - real(kind_phys), parameter :: & - cldmin = 1e-20_kind_phys - - ! Reset diffusivity angle for Bands 2-3 and 5-9 to vary (between 1.50 - ! and 1.80) as a function of total column water vapor. the function - ! has been defined to minimize flux and cooling rate errors in these bands - ! over a wide range of precipitable water values. - real (kind_phys), dimension(nbandsLW_RRTMG) :: & - a0 = (/ 1.66, 1.55, 1.58, 1.66, 1.54, 1.454, 1.89, 1.33, & - 1.668, 1.66, 1.66, 1.66, 1.66, 1.66, 1.66, 1.66 /), & - a1 = (/ 0.00, 0.25, 0.22, 0.00, 0.13, 0.446, -0.10, 0.40, & - -0.006, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 /), & - a2 = (/ 0.00, -12.0, -11.7, 0.00, -0.72,-0.243, 0.19,-0.062, & - 0.414, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 /) - real(kind_phys),parameter :: & - diffusivityLow = 1.50, & ! Minimum diffusivity angle for bands 2-3 and 5-9 - diffusivityHigh = 1.80, & ! Maximum diffusivity angle for bands 2-3 and 5-9 - diffusivityB1410 = 1.66 ! Diffusivity for bands 1, 4, and 10 ! RRTMG LW cloud property coefficients real(kind_phys) , dimension(58,nBandsLW_RRTMG),parameter :: & diff --git a/physics/rrtmgp_lw_main.F90 b/physics/rrtmgp_lw_main.F90 index 7ed33e450..842fa9bba 100644 --- a/physics/rrtmgp_lw_main.F90 +++ b/physics/rrtmgp_lw_main.F90 @@ -232,6 +232,9 @@ subroutine rrtmgp_lw_init(Model,mpicomm, mpirank, mpiroot, errmsg, errflg) ! How are we handling cloud-optics? rrtmgp_lw_cld_phys = Model%rrtmgp_cld_phys + ! HACK. If using RRTMG cloud_optics w/ RRTMGP, we need to be able to define + if (Model%rrtmgp_cld_phys .eq. 0) rrtmgp_lw_cld_phys=1 + ! Filenames are set in the gfs_physics_nml (scm/src/GFS_typedefs.F90) kdist_file = trim(Model%rrtmgp_root)//trim(Model%kdist_lw_file_gas) kdist_cldy_file = trim(Model%rrtmgp_root)//trim(Model%kdist_lw_file_clouds) @@ -653,17 +656,17 @@ subroutine rrtmgp_lw_init(Model,mpicomm, mpirank, mpiroot, errmsg, errflg) status = nf90_get_var(ncid_lw_clds,varID,pade_ssaice) status = nf90_inq_varid(ncid_lw_clds,'pade_asyice',varID) status = nf90_get_var(ncid_lw_clds,varID,pade_asyice) - status = nf90_inq_varid(ncid_lw_clds,'pade_sizereg_extliq',varID) + status = nf90_inq_varid(ncid_lw_clds,'pade_sizreg_extliq',varID) status = nf90_get_var(ncid_lw_clds,varID,pade_sizereg_extliq) - status = nf90_inq_varid(ncid_lw_clds,'pade_sizereg_ssaliq',varID) + status = nf90_inq_varid(ncid_lw_clds,'pade_sizreg_ssaliq',varID) status = nf90_get_var(ncid_lw_clds,varID,pade_sizereg_ssaliq) - status = nf90_inq_varid(ncid_lw_clds,'pade_sizereg_asyliq',varID) + status = nf90_inq_varid(ncid_lw_clds,'pade_sizreg_asyliq',varID) status = nf90_get_var(ncid_lw_clds,varID,pade_sizereg_asyliq) - status = nf90_inq_varid(ncid_lw_clds,'pade_sizereg_extice',varID) + status = nf90_inq_varid(ncid_lw_clds,'pade_sizreg_extice',varID) status = nf90_get_var(ncid_lw_clds,varID,pade_sizereg_extice) - status = nf90_inq_varid(ncid_lw_clds,'pade_sizereg_ssaice',varID) + status = nf90_inq_varid(ncid_lw_clds,'pade_sizreg_ssaice',varID) status = nf90_get_var(ncid_lw_clds,varID,pade_sizereg_ssaice) - status = nf90_inq_varid(ncid_lw_clds,'pade_sizereg_asyice',varID) + status = nf90_inq_varid(ncid_lw_clds,'pade_sizreg_asyice',varID) status = nf90_get_var(ncid_lw_clds,varID,pade_sizereg_asyice) status = nf90_inq_varid(ncid_lw_clds,'bnd_limits_wavenumber',varID) status = nf90_get_var(ncid_lw_clds,varID,band_lims_cldy) @@ -708,14 +711,12 @@ subroutine rrtmgp_lw_init(Model,mpicomm, mpirank, mpiroot, errmsg, errflg) ! Load tables data for RRTGMP cloud-optics if (rrtmgp_lw_cld_phys .eq. 1) then - print*,'RRTMGP_INIT: ',shape(lut_extice) call check_error_msg(kdist_lw_cldy%set_ice_roughness(nrghice)) call check_error_msg(kdist_lw_cldy%load(band_lims_cldy, radliq_lwr, radliq_upr, & radliq_fac, radice_lwr, radice_upr, radice_fac, lut_extliq, lut_ssaliq, & lut_asyliq, lut_extice, lut_ssaice, lut_asyice)) endif if (rrtmgp_lw_cld_phys .eq. 2) then - print*,'RRTMGP_INIT: ',shape(pade_extice) call check_error_msg(kdist_lw_cldy%set_ice_roughness(nrghice)) call check_error_msg(kdist_lw_cldy%load(band_lims_cldy, pade_extliq, & pade_ssaliq, pade_asyliq, pade_extice, pade_ssaice, pade_asyice, & @@ -723,6 +724,9 @@ subroutine rrtmgp_lw_init(Model,mpicomm, mpirank, mpiroot, errmsg, errflg) pade_sizereg_extice, pade_sizereg_ssaice, pade_sizereg_asyice)) endif + ! HACK! + rrtmgp_lw_cld_phys = Model%rrtmgp_cld_phys + end subroutine rrtmgp_lw_init ! ######################################################################################### @@ -908,8 +912,6 @@ subroutine rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr type(ty_fluxes_byband) :: & fluxAllSky, & ! All-sky flux (W/m2) fluxClrSky ! Clear-sky flux (W/m2) -! type(ty_fluxes_byband) :: & -! fluxBBAllSky ! All-sky flux (in each LW band) (W/m2) ! Initialize CCPP error handling variables errmsg = '' @@ -1110,7 +1112,7 @@ subroutine rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr if (rrtmgp_lw_cld_phys .gt. 0) then print*,'Using RRTMGP cloud-physics' call check_error_msg(kdist_lw_cldy%cloud_optics(ncol, nlay, nBandsLW, nrghice, & - liqmask, icemask, cld_lwp, cld_iwp, cld_ref_liq2, cld_ref_ice2, optical_props_cldy)) + liqmask, icemask, cld_lwp, cld_iwp, cld_ref_liq2, cld_ref_ice2, optical_props_cldy)) end if endif diff --git a/physics/rrtmgp_sw_cloud_optics.F90 b/physics/rrtmgp_sw_cloud_optics.F90 index 10d4e8e4b..35e8d32b6 100644 --- a/physics/rrtmgp_sw_cloud_optics.F90 +++ b/physics/rrtmgp_sw_cloud_optics.F90 @@ -2063,7 +2063,7 @@ subroutine rrtmgp_sw_cloud_optics(ncol, nlay, nBandsSW, cld_lwp, cld_ref_liq, cl cld_ref_snow ! Effective radius (snow-flake) (micron) ! Outputs - real(kind_phys),dimension(nBandsSW,ncol,nlay),intent(out) :: & + real(kind_phys),dimension(ncol,nlay,nBandsSW),intent(out) :: & tau_cld, & ! In-cloud optical depth (1) ssa_cld, & ! In-cloud single-scattering albedo (1) asy_cld ! In-cloud asymmetry parameter (1) @@ -2234,22 +2234,17 @@ subroutine rrtmgp_sw_cloud_optics(ncol, nlay, nBandsSW, cld_lwp, cld_ref_liq, cl if (cld_frac(iCol,iLay) .gt. 0._kind_phys) then do iBand = 1,nBandsSW ! Sum up radiative properties by type. - tau_cld(iBand,iCol,iLay) = tau_liq(iBand) + tau_ice(iBand) + tau_rain + tau_snow - ssa_cld(iBand,iCol,iLay) = ssa_liq(iBand) + ssa_ice(iBand) + ssa_rain(iBand) + ssa_snow(iBand) - asy_cld(iBand,iCol,iLay) = asy_liq(iBand) + asy_ice(iBand) + asy_rain(iBand) + asy_snow(iBand) + tau_cld(iCol,iLay,iBand) = tau_liq(iBand) + tau_ice(iBand) + tau_rain + tau_snow + ssa_cld(iCol,iLay,iBand) = ssa_liq(iBand) + ssa_ice(iBand) + ssa_rain(iBand) + ssa_snow(iBand) + asy_cld(iCol,iLay,iBand) = asy_liq(iBand) + asy_ice(iBand) + asy_rain(iBand) + asy_snow(iBand) ! Delta-scale - asyw = asy_cld(iband,iCol,iLay)/max(0._kind_phys, ssa_cld(iBand,iCol,iLay)) - ssaw = min(1._kind_phys-0.000001, ssa_cld(iBand,iCol,iLay)/tau_cld(iBand,iCol,iLay)) + asyw = asy_cld(iCol,iLay,iBand)/max(0._kind_phys, ssa_cld(iCol,iLay,iBand)) + ssaw = min(1._kind_phys-0.000001, ssa_cld(iCol,iLay,iBand)/tau_cld(iCol,iLay,iBand)) za1 = asyw * asyw za2 = ssaw * za1 - tau_cld(iBand,iCol,iLay) = (1._kind_phys - za2) * tau_cld(iband,iCol,iLay) - ssa_cld(iBand,iCol,iLay) = (ssaw - za2) / (1._kind_phys - za2) - asy_cld(iBand,iCol,iLay) = (asyw - za2/ssaw)/(1-za2/ssaw) - !asy_cld(iBand,iCol,iLay) = (tau_liq(iBand)*ssa_liq(iBand)*(asycoliq(iBand)-asycoliq(iBand)**2)/& - ! (1 - asycoliq(iBand)**2) + & - ! tau_ice(iBand)*ssa_ice(iBand)*(asycoice(iBand)-forwice(iBand))/& - ! (1 - forwice(iBand)))/& - ! (tau_liq(iBand)*ssa_liq(iBand) + tau_ice(iBand)*ssa_ice(iBand)) + tau_cld(iCol,iLay,iBand) = (1._kind_phys - za2) * tau_cld(iCol,iLay,iBand) + ssa_cld(iCol,iLay,iBand) = (ssaw - za2) / (1._kind_phys - za2) + asy_cld(iCol,iLay,iBand) = (asyw - za2/ssaw)/(1-za2/ssaw) enddo ! Loop over SW bands endif ! END sum cloudy properties ! @@ -2276,7 +2271,7 @@ subroutine mcica_subcol_sw(ncol, nlay, ngpts, cld_frac, icseed, dzlyr, de_lgth, cld_frac, & ! Cloud-fraction dzlyr ! Layer thinkness (km) ! Outputs - real(kind_phys),dimension(ngpts,ncol,nlay),intent(out) :: & + logical,dimension(ncol,nlay,ngpts),intent(out) :: & cld_frac_mcica ! Local variables type(random_stat) :: stat @@ -2406,9 +2401,9 @@ subroutine mcica_subcol_sw(ncol, nlay, ngpts, cld_frac, icseed, dzlyr, de_lgth, do n = 1, ngpts lcloudy(n,k) = cdfunc(n,k) >= tem1 if (lcloudy(n,k)) then - cld_frac_mcica(n,icol,k) = 1._kind_phys + cld_frac_mcica(icol,k,n) = .true. else - cld_frac_mcica(n,icol,k) = 0._kind_phys + cld_frac_mcica(icol,k,n) = .false. endif enddo enddo diff --git a/physics/rrtmgp_sw_main.F90 b/physics/rrtmgp_sw_main.F90 index 603e8b81f..db83548ce 100644 --- a/physics/rrtmgp_sw_main.F90 +++ b/physics/rrtmgp_sw_main.F90 @@ -8,12 +8,16 @@ module rrtmgp_sw use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp use mo_gas_concentrations, only: ty_gas_concs use mo_fluxes, only: ty_fluxes_broadband + use mo_fluxes_byband, only: ty_fluxes_byband use mo_optical_props, only: ty_optical_props_1scl,ty_optical_props_2str use mo_rte_sw, only: rte_sw use mo_heating_rates, only: compute_heating_rate use mo_rrtmgp_constants, only: grav, avogad use module_radsw_parameters, only: topfsw_type, sfcfsw_type, profsw_type, cmpfsw_type - use mo_rrtmgp_sw_cloud_optics, only: rrtmgp_sw_cloud_optics, mcica_subcol_sw + use mo_rrtmgp_sw_cloud_optics, only: rrtmgp_sw_cloud_optics,mcica_subcol_sw + use mo_cloud_sampling, only: sampled_mask_max_ran, sampled_mask_exp_ran, draw_samples + use mersenne_twister, only: random_setseed, random_number, random_stat + use mo_cloud_optics, only: ty_cloud_optics implicit none @@ -44,13 +48,17 @@ module rrtmgp_sw ! Module parameters (set during rrtmgp_sw_init()) integer :: & + rrtmgp_sw_cld_phys, & ! RRTMGP cloud-physics (0-RRTMG, 1-RRTGMP(LUT), 2-RRTMGP(Pade)) nGptsSW, & ! Number of SW spectral g-points nBandsSW, & ! Number of SW bands + nrghice, & ! Number of ice roughness categories ipsdsw0 ! Initial seed for McICA ! Classes used by rte+rrtmgp type(ty_gas_optics_rrtmgp) :: & - kdist_sw_clr + kdist_sw + type(ty_cloud_optics) :: & + kdist_sw_cldy type(ty_gas_concs) :: & gas_concs_sw @@ -102,22 +110,48 @@ subroutine rrtmgp_sw_init(Model,mpicomm, mpirank, mpiroot, errmsg, errflg) real(kind_phys) :: & press_ref_trop_sw, & ! used by RRTGMP gas optics temp_ref_p_sw, & ! used by RRTGMP gas optics - temp_ref_t_sw ! used by RRTGMP gas optics + temp_ref_t_sw, & ! used by RRTGMP gas optics + radliq_lwr_sw, & ! used by RRTGMP cloud optics + radliq_upr_sw, & ! used by RRTGMP cloud optics + radliq_fac_sw, & ! used by RRTGMP cloud optics + radice_lwr_sw, & ! used by RRTGMP cloud optics + radice_upr_sw, & ! used by RRTGMP cloud optics + radice_fac_sw ! used by RRTGMP cloud optics + real(kind_phys), dimension(:), allocatable :: & press_ref_sw, & ! used by RRTGMP gas optics temp_ref_sw, & ! used by RRTGMP gas optics - solar_source_sw ! used by RRTGMP gas optics + solar_source_sw, & ! used by RRTGMP gas optics + pade_sizereg_extliq_sw, & ! used by RRTGMP cloud optics + pade_sizereg_ssaliq_sw, & ! used by RRTGMP cloud optics + pade_sizereg_asyliq_sw, & ! used by RRTGMP cloud optics + pade_sizereg_extice_sw, & ! used by RRTGMP cloud optics + pade_sizereg_ssaice_sw, & ! used by RRTGMP cloud optics + pade_sizereg_asyice_sw ! used by RRTGMP cloud optics real(kind_phys), dimension(:,:), allocatable :: & - band_lims_sw ! used by RRTGMP gas optics + band_lims_sw, & ! used by RRTGMP gas optics + lut_extliq_sw, & ! used by RRTGMP cloud optics + lut_ssaliq_sw, & ! used by RRTGMP cloud optics + lut_asyliq_sw, & ! used by RRTGMP cloud optics + band_lims_cldy_sw ! used by RRTGMP cloud optics real(kind_phys), dimension(:,:,:), allocatable :: & vmr_ref_sw, & ! used by RRTGMP gas optics kminor_lower_sw, & ! used by RRTGMP gas optics kminor_upper_sw, & ! used by RRTGMP gas optics rayl_lower_sw, & ! used by RRTGMP gas optics - rayl_upper_sw ! used by RRTGMP gas optics + rayl_upper_sw, & ! used by RRTGMP gas optics + lut_extice_sw, & ! used by RRTGMP cloud optics + lut_ssaice_sw, & ! used by RRTGMP cloud optics + lut_asyice_sw, & ! used by RRTGMP cloud optics + pade_extliq_sw, & ! used by RRTGMP cloud optics + pade_ssaliq_sw, & ! used by RRTGMP cloud optics + pade_asyliq_sw ! used by RRTGMP cloud optics real(kind_phys), dimension(:,:,:,:), allocatable :: & - kmajor_sw ! used by RRTGMP gas optics + kmajor_sw, & ! used by RRTGMP gas optics + pade_extice_sw, & ! used by RRTGMP cloud optics + pade_ssaice_sw, & ! used by RRTGMP cloud optics + pade_asyice_sw ! used by RRTGMP cloud optics character(len=32), dimension(:), allocatable :: & gas_names_sw, & ! used by RRTGMP gas optics gas_minor_sw, & ! used by RRTGMP gas optics @@ -146,11 +180,19 @@ subroutine rrtmgp_sw_init(Model,mpicomm, mpirank, mpiroot, errmsg, errflg) nminor_absorber_intervals_lower_sw, & ! used by RRTGMP gas optics nminor_absorber_intervals_upper_sw, & ! used by RRTGMP gas optics ncontributors_lower_sw, & ! used by RRTGMP gas optics - ncontributors_upper_sw ! used by RRTGMP gas optics + ncontributors_upper_sw, & ! used by RRTGMP gas optics + nbandSWcldy_sw, & ! used by RRTGMP cloud optics + nsize_liq_sw, & ! used by RRTGMP cloud optics + nsize_ice_sw, & ! used by RRTGMP cloud optics + nsizereg_sw, & ! used by RRTGMP cloud optics + ncoeff_ext_sw, & ! used by RRTGMP cloud optics + ncoeff_ssa_g_sw, & ! used by RRTGMP cloud optics + nbound_sw, & ! used by RRTGMP cloud optics + npairsSWcldy_sw ! used by RRTGMP cloud optics ! Local variables - integer :: status,ncid_sw,dimid,varID,ij,iGas - character(len=264) :: kdist_file + integer :: status,ncid_sw,ncid_sw_clds,dimid,varID,ij,iGas + character(len=264) :: kdist_file, kdist_cldy_file integer,dimension(:),allocatable :: temp1,temp2,temp3,temp4,temp_log_array1,& temp_log_array2, temp_log_array3, temp_log_array4 @@ -181,8 +223,15 @@ subroutine rrtmgp_sw_init(Model,mpicomm, mpirank, mpiroot, errmsg, errflg) iovrsw = 1 endif + ! How are we handling cloud-optics? + rrtmgp_sw_cld_phys = Model%rrtmgp_cld_phys + + ! HACK. If using RRTMG cloud_optics w/ RRTMGP, we need to be able to define + !if (Model%rrtmgp_cld_phys .eq. 0) rrtmgp_sw_cld_phys=1 + ! Filenames are set in the gfs_physics_nml (scm/src/GFS_typedefs.F90) kdist_file = trim(Model%rrtmgp_root)//trim(Model%kdist_sw_file_gas) + kdist_cldy_file = trim(Model%rrtmgp_root)//trim(Model%kdist_sw_file_clouds) ! Read dimensions for k-distribution fields (only on master processor(0)) if (mpirank .eq. mpiroot) then @@ -237,41 +286,41 @@ subroutine rrtmgp_sw_init(Model,mpicomm, mpirank, mpiroot, errmsg, errflg) call MPI_BCAST(nminor_absorber_intervals_upper_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) #endif - ! On master processor, allocate space, read in fields, broadcast to all processors - if (mpirank .eq. mpiroot) then - ! Allocate space for arrays - allocate(gas_names_sw(nabsorbers_sw)) - allocate(scaling_gas_lower_sw(nminor_absorber_intervals_lower_sw)) - allocate(scaling_gas_upper_sw(nminor_absorber_intervals_upper_sw)) - allocate(gas_minor_sw(nminorabsorbers_sw)) - allocate(identifier_minor_sw(nminorabsorbers_sw)) - allocate(minor_gases_lower_sw(nminor_absorber_intervals_lower_sw)) - allocate(minor_gases_upper_sw(nminor_absorber_intervals_upper_sw)) - allocate(minor_limits_gpt_lower_sw(npairs_sw,nminor_absorber_intervals_lower_sw)) - allocate(minor_limits_gpt_upper_sw(npairs_sw,nminor_absorber_intervals_upper_sw)) - allocate(band2gpt_sw(2,nbnds_sw)) - allocate(key_species_sw(2,nlayers_sw,nbnds_sw)) - allocate(band_lims_sw(2,nbnds_sw)) - allocate(press_ref_sw(npress_sw)) - allocate(temp_ref_sw(ntemps_sw)) - allocate(vmr_ref_sw(nlayers_sw, nextrabsorbers_sw, ntemps_sw)) - allocate(kminor_lower_sw(ncontributors_lower_sw, nmixingfracs_sw, ntemps_sw)) - allocate(kmajor_sw(ngpts_sw, nmixingfracs_sw, npress_sw+1, ntemps_sw)) - allocate(kminor_start_lower_sw(nminor_absorber_intervals_lower_sw)) - allocate(kminor_upper_sw(ncontributors_upper_sw, nmixingfracs_sw, ntemps_sw)) - allocate(kminor_start_upper_sw(nminor_absorber_intervals_upper_sw)) - allocate(minor_scales_with_density_lower_sw(nminor_absorber_intervals_lower_sw)) - allocate(minor_scales_with_density_upper_sw(nminor_absorber_intervals_upper_sw)) - allocate(scale_by_complement_lower_sw(nminor_absorber_intervals_lower_sw)) - allocate(scale_by_complement_upper_sw(nminor_absorber_intervals_upper_sw)) - allocate(rayl_upper_sw(ngpts_sw, nmixingfracs_sw, ntemps_sw)) - allocate(rayl_lower_sw(ngpts_sw, nmixingfracs_sw, ntemps_sw)) - allocate(solar_source_sw(ngpts_sw)) - allocate(temp1(nminor_absorber_intervals_lower_sw)) - allocate(temp2(nminor_absorber_intervals_upper_sw)) - allocate(temp3(nminor_absorber_intervals_lower_sw)) - allocate(temp4(nminor_absorber_intervals_upper_sw)) + ! Allocate space for arrays + allocate(gas_names_sw(nabsorbers_sw)) + allocate(scaling_gas_lower_sw(nminor_absorber_intervals_lower_sw)) + allocate(scaling_gas_upper_sw(nminor_absorber_intervals_upper_sw)) + allocate(gas_minor_sw(nminorabsorbers_sw)) + allocate(identifier_minor_sw(nminorabsorbers_sw)) + allocate(minor_gases_lower_sw(nminor_absorber_intervals_lower_sw)) + allocate(minor_gases_upper_sw(nminor_absorber_intervals_upper_sw)) + allocate(minor_limits_gpt_lower_sw(npairs_sw,nminor_absorber_intervals_lower_sw)) + allocate(minor_limits_gpt_upper_sw(npairs_sw,nminor_absorber_intervals_upper_sw)) + allocate(band2gpt_sw(2,nbnds_sw)) + allocate(key_species_sw(2,nlayers_sw,nbnds_sw)) + allocate(band_lims_sw(2,nbnds_sw)) + allocate(press_ref_sw(npress_sw)) + allocate(temp_ref_sw(ntemps_sw)) + allocate(vmr_ref_sw(nlayers_sw, nextrabsorbers_sw, ntemps_sw)) + allocate(kminor_lower_sw(ncontributors_lower_sw, nmixingfracs_sw, ntemps_sw)) + allocate(kmajor_sw(ngpts_sw, nmixingfracs_sw, npress_sw+1, ntemps_sw)) + allocate(kminor_start_lower_sw(nminor_absorber_intervals_lower_sw)) + allocate(kminor_upper_sw(ncontributors_upper_sw, nmixingfracs_sw, ntemps_sw)) + allocate(kminor_start_upper_sw(nminor_absorber_intervals_upper_sw)) + allocate(minor_scales_with_density_lower_sw(nminor_absorber_intervals_lower_sw)) + allocate(minor_scales_with_density_upper_sw(nminor_absorber_intervals_upper_sw)) + allocate(scale_by_complement_lower_sw(nminor_absorber_intervals_lower_sw)) + allocate(scale_by_complement_upper_sw(nminor_absorber_intervals_upper_sw)) + allocate(rayl_upper_sw(ngpts_sw, nmixingfracs_sw, ntemps_sw)) + allocate(rayl_lower_sw(ngpts_sw, nmixingfracs_sw, ntemps_sw)) + allocate(solar_source_sw(ngpts_sw)) + allocate(temp1(nminor_absorber_intervals_lower_sw)) + allocate(temp2(nminor_absorber_intervals_upper_sw)) + allocate(temp3(nminor_absorber_intervals_lower_sw)) + allocate(temp4(nminor_absorber_intervals_upper_sw)) + ! On master processor, read in fields, broadcast to all processors + if (mpirank .eq. mpiroot) then ! Read in fields from file if(nf90_open(trim(kdist_file), NF90_WRITE, ncid_sw) .eq. NF90_NOERR) then status = nf90_inq_varid(ncid_sw,'gas_names',varID) @@ -454,7 +503,7 @@ subroutine rrtmgp_sw_init(Model,mpicomm, mpirank, mpiroot, errmsg, errflg) do iGas=1,nGases call check_error_msg(gas_concs_sw%set_vmr(active_gases(iGas), 0._kind_phys)) enddo - call check_error_msg(kdist_sw_clr%load(gas_concs_sw, gas_names_sw, key_species_sw, band2gpt_sw, & + call check_error_msg(kdist_sw%load(gas_concs_sw, gas_names_sw, key_species_sw, band2gpt_sw, & band_lims_sw, press_ref_sw, press_ref_trop_sw, temp_ref_sw, temp_ref_p_sw, temp_ref_t_sw, & vmr_ref_sw, kmajor_sw, kminor_lower_sw, kminor_upper_sw, gas_minor_sw,identifier_minor_sw, & minor_gases_lower_sw, minor_gases_upper_sw, minor_limits_gpt_lower_sw, & @@ -465,11 +514,214 @@ subroutine rrtmgp_sw_init(Model,mpicomm, mpirank, mpiroot, errmsg, errflg) solar_source_sw, rayl_lower_sw, rayl_upper_sw)) ! Set band index by g-point array - nBandsSW = kdist_sw_clr%get_nband() - nGptsSW = kdist_sw_clr%get_ngpt() + nBandsSW = kdist_sw%get_nband() + nGptsSW = kdist_sw%get_ngpt() ! Set initial permutation seed for McICA, initially set to number of G-points - ipsdsw0 = kdist_sw_clr%get_ngpt() + ipsdsw0 = kdist_sw%get_ngpt() + + ! ####################################################################################### + ! If RRTMGP cloud-optics are requested, read tables and broadcast. + ! ####################################################################################### + ! Read dimensions for k-distribution fields (only on master processor(0)) + if (mpirank .eq. mpiroot) then + if(nf90_open(trim(kdist_cldy_file), NF90_WRITE, ncid_sw_clds) == NF90_NOERR) then + status = nf90_inq_dimid(ncid_sw_clds, 'nband', dimid) + status = nf90_inquire_dimension(ncid_sw_clds, dimid, len=nbandSWcldy_sw) + status = nf90_inq_dimid(ncid_sw_clds, 'nrghice', dimid) + status = nf90_inquire_dimension(ncid_sw_clds, dimid, len=nrghice) + status = nf90_inq_dimid(ncid_sw_clds, 'nsize_liq', dimid) + status = nf90_inquire_dimension(ncid_sw_clds, dimid, len=nsize_liq_sw) + status = nf90_inq_dimid(ncid_sw_clds, 'nsize_ice', dimid) + status = nf90_inquire_dimension(ncid_sw_clds, dimid, len=nsize_ice_sw) + status = nf90_inq_dimid(ncid_sw_clds, 'nsizereg', dimid) + status = nf90_inquire_dimension(ncid_sw_clds, dimid, len=nsizereg_sw) + status = nf90_inq_dimid(ncid_sw_clds, 'ncoeff_ext', dimid) + status = nf90_inquire_dimension(ncid_sw_clds, dimid, len=ncoeff_ext_sw) + status = nf90_inq_dimid(ncid_sw_clds, 'ncoeff_ssa_g', dimid) + status = nf90_inquire_dimension(ncid_sw_clds, dimid, len=ncoeff_ssa_g_sw) + status = nf90_inq_dimid(ncid_sw_clds, 'nbound', dimid) + status = nf90_inquire_dimension(ncid_sw_clds, dimid, len=nbound_sw) + status = nf90_inq_dimid(ncid_sw_clds, 'pair', dimid) + status = nf90_inquire_dimension(ncid_sw_clds, dimid, len=npairsSWcldy_sw) + status = nf90_close(ncid_sw_clds) + endif + endif + + ! Broadcast dimensions to all processors +#ifdef MPI + if (rrtmgp_sw_cld_phys .eq. 1 .or. rrtmgp_sw_cld_phys .eq. 2) then + call MPI_BCAST(nbandSWcldy_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nrghice, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nsize_liq_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nsize_ice_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nsizereg_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(ncoeff_ext_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(ncoeff_ssa_g_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nbound_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(npairsSWcldy_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + endif +#endif + + if (rrtmgp_sw_cld_phys .eq. 1) then + allocate(lut_extliq_sw(nsize_liq_sw, nBandSWcldy_sw)) + allocate(lut_ssaliq_sw(nsize_liq_sw, nBandSWcldy_sw)) + allocate(lut_asyliq_sw(nsize_liq_sw, nBandSWcldy_sw)) + allocate(lut_extice_sw(nsize_ice_sw, nBandSWcldy_sw, nrghice)) + allocate(lut_ssaice_sw(nsize_ice_sw, nBandSWcldy_sw, nrghice)) + allocate(lut_asyice_sw(nsize_ice_sw, nBandSWcldy_sw, nrghice)) + allocate(band_lims_cldy_sw(2, nBandSWcldy_sw)) + endif + if (rrtmgp_sw_cld_phys .eq. 2) then + allocate(pade_extliq_sw(nbandSWcldy_sw, nsizereg_sw, ncoeff_ext_sw )) + allocate(pade_ssaliq_sw(nbandSWcldy_sw, nsizereg_sw, ncoeff_ssa_g_sw)) + allocate(pade_asyliq_sw(nbandSWcldy_sw, nsizereg_sw, ncoeff_ssa_g_sw)) + allocate(pade_extice_sw(nbandSWcldy_sw, nsizereg_sw, ncoeff_ext_sw, nrghice)) + allocate(pade_ssaice_sw(nbandSWcldy_sw, nsizereg_sw, ncoeff_ssa_g_sw, nrghice)) + allocate(pade_asyice_sw(nbandSWcldy_sw, nsizereg_sw, ncoeff_ssa_g_sw, nrghice)) + allocate(pade_sizereg_extliq_sw(nbound_sw)) + allocate(pade_sizereg_ssaliq_sw(nbound_sw)) + allocate(pade_sizereg_asyliq_sw(nbound_sw)) + allocate(pade_sizereg_extice_sw(nbound_sw)) + allocate(pade_sizereg_ssaice_sw(nbound_sw)) + allocate(pade_sizereg_asyice_sw(nbound_sw)) + allocate(band_lims_cldy_sw(2,nbandSWcldy_sw)) + endif + + ! On master processor, allocate space, read in fields, broadcast to all processors + if (mpirank .eq. mpiroot) then + ! + if (rrtmgp_sw_cld_phys .eq. 1) then + ! + if(nf90_open(trim(kdist_cldy_file), NF90_WRITE, ncid_sw_clds) == NF90_NOERR) then + status = nf90_inq_varid(ncid_sw_clds,'radliq_lwr',varID) + status = nf90_get_var(ncid_sw_clds,varID,radliq_lwr_sw) + status = nf90_inq_varid(ncid_sw_clds,'radliq_upr',varID) + status = nf90_get_var(ncid_sw_clds,varID,radliq_upr_sw) + status = nf90_inq_varid(ncid_sw_clds,'radliq_fac',varID) + status = nf90_get_var(ncid_sw_clds,varID,radliq_fac_sw) + status = nf90_inq_varid(ncid_sw_clds,'radice_lwr',varID) + status = nf90_get_var(ncid_sw_clds,varID,radice_lwr_sw) + status = nf90_inq_varid(ncid_sw_clds,'radice_upr',varID) + status = nf90_get_var(ncid_sw_clds,varID,radice_upr_sw) + status = nf90_inq_varid(ncid_sw_clds,'radice_fac',varID) + status = nf90_get_var(ncid_sw_clds,varID,radice_fac_sw) + status = nf90_inq_varid(ncid_sw_clds,'lut_extliq',varID) + status = nf90_get_var(ncid_sw_clds,varID,lut_extliq_sw) + status = nf90_inq_varid(ncid_sw_clds,'lut_ssaliq',varID) + status = nf90_get_var(ncid_sw_clds,varID,lut_ssaliq_sw) + status = nf90_inq_varid(ncid_sw_clds,'lut_asyliq',varID) + status = nf90_get_var(ncid_sw_clds,varID,lut_asyliq_sw) + status = nf90_inq_varid(ncid_sw_clds,'lut_extice',varID) + status = nf90_get_var(ncid_sw_clds,varID,lut_extice_sw) + status = nf90_inq_varid(ncid_sw_clds,'lut_ssaice',varID) + status = nf90_get_var(ncid_sw_clds,varID,lut_ssaice_sw) + status = nf90_inq_varid(ncid_sw_clds,'lut_asyice',varID) + status = nf90_get_var(ncid_sw_clds,varID,lut_asyice_sw) + status = nf90_inq_varid(ncid_sw_clds,'bnd_limits_wavenumber',varID) + status = nf90_get_var(ncid_sw_clds,varID,band_lims_cldy_sw) + status = nf90_close(ncid_sw_clds) + endif + endif + ! + if (rrtmgp_sw_cld_phys .eq. 2) then + ! + if(nf90_open(trim(kdist_cldy_file), NF90_WRITE, ncid_sw_clds) == NF90_NOERR) then + status = nf90_inq_varid(ncid_sw_clds,'radliq_lwr',varID) + status = nf90_get_var(ncid_sw_clds,varID,radliq_lwr_sw) + status = nf90_inq_varid(ncid_sw_clds,'radliq_upr',varID) + status = nf90_get_var(ncid_sw_clds,varID,radliq_upr_sw) + status = nf90_inq_varid(ncid_sw_clds,'radliq_fac',varID) + status = nf90_get_var(ncid_sw_clds,varID,radliq_fac_sw) + status = nf90_inq_varid(ncid_sw_clds,'radice_lwr',varID) + status = nf90_get_var(ncid_sw_clds,varID,radice_lwr_sw) + status = nf90_inq_varid(ncid_sw_clds,'radice_upr',varID) + status = nf90_get_var(ncid_sw_clds,varID,radice_upr_sw) + status = nf90_inq_varid(ncid_sw_clds,'radice_fac',varID) + status = nf90_get_var(ncid_sw_clds,varID,radice_fac_sw) + status = nf90_inq_varid(ncid_sw_clds,'pade_extliq',varID) + status = nf90_get_var(ncid_sw_clds,varID,pade_extliq_sw) + status = nf90_inq_varid(ncid_sw_clds,'pade_ssaliq',varID) + status = nf90_get_var(ncid_sw_clds,varID,pade_ssaliq_sw) + status = nf90_inq_varid(ncid_sw_clds,'pade_asyliq',varID) + status = nf90_get_var(ncid_sw_clds,varID,pade_asyliq_sw) + status = nf90_inq_varid(ncid_sw_clds,'pade_extice',varID) + status = nf90_get_var(ncid_sw_clds,varID,pade_extice_sw) + status = nf90_inq_varid(ncid_sw_clds,'pade_ssaice',varID) + status = nf90_get_var(ncid_sw_clds,varID,pade_ssaice_sw) + status = nf90_inq_varid(ncid_sw_clds,'pade_asyice',varID) + status = nf90_get_var(ncid_sw_clds,varID,pade_asyice_sw) + status = nf90_inq_varid(ncid_sw_clds,'pade_sizreg_extliq',varID) + status = nf90_get_var(ncid_sw_clds,varID,pade_sizereg_extliq_sw) + status = nf90_inq_varid(ncid_sw_clds,'pade_sizreg_ssaliq',varID) + status = nf90_get_var(ncid_sw_clds,varID,pade_sizereg_ssaliq_sw) + status = nf90_inq_varid(ncid_sw_clds,'pade_sizreg_asyliq',varID) + status = nf90_get_var(ncid_sw_clds,varID,pade_sizereg_asyliq_sw) + status = nf90_inq_varid(ncid_sw_clds,'pade_sizreg_extice',varID) + status = nf90_get_var(ncid_sw_clds,varID,pade_sizereg_extice_sw) + status = nf90_inq_varid(ncid_sw_clds,'pade_sizreg_ssaice',varID) + status = nf90_get_var(ncid_sw_clds,varID,pade_sizereg_ssaice_sw) + status = nf90_inq_varid(ncid_sw_clds,'pade_sizreg_asyice',varID) + status = nf90_get_var(ncid_sw_clds,varID,pade_sizereg_asyice_sw) + status = nf90_inq_varid(ncid_sw_clds,'bnd_limits_wavenumber',varID) + status = nf90_get_var(ncid_sw_clds,varID,band_lims_cldy_sw) + status = nf90_close(ncid_sw_clds) + endif + endif + endif + + ! Broadcast arrays to all processors +#ifdef MPI + if (rrtmgp_sw_cld_phys .eq. 1) then + call MPI_BCAST(radliq_lwr_sw, size(radliq_lwr_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(radliq_upr_sw, size(radliq_upr_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(radliq_fac_sw, size(radliq_fac_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(radice_lwr_sw, size(radice_lwr_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(radice_upr_sw, size(radice_upr_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(radice_fac_sw, size(radice_fac_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_extliq_sw, size(lut_extliq_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_ssaliq_sw, size(lut_ssaliq_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_asyliq_sw, size(lut_asyliq_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_extice_sw, size(lut_extice_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_ssaice_sw, size(lut_ssaice_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_asyice_sw, size(lut_asyice_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(band_lims_cldy_sw), size(band_lims_cldy_sw), kind_phys, mpiroot, mpicomm, ierr) + endif + if (rrtmgp_sw_cld_phys .eq. 2) then + call MPI_BCAST(pade_extliq_sw, size(pade_extliq_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_ssaliq_sw, size(pade_ssaliq_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_asyliq_sw, size(pade_asyliq_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_extice_sw, size(pade_extice_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_ssaice_sw, size(pade_ssaice_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_asyice_sw, size(pade_asyice_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_extliq_sw), size(pade_sizereg_extliq_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_ssaliq_sw), size(pade_sizereg_ssaliq_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_asyliq_sw), size(pade_sizereg_asyliq_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_extice_sw), size(pade_sizereg_extice_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_ssaice_sw), size(pade_sizereg_ssaice_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_asyice_sw), size(pade_sizereg_asyice_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(band_lims_cldy_sw), size(band_lims_cldy_sw), kind_phys, mpiroot, mpicomm, ierr) + endif +#endif + + ! Load tables data for RRTGMP cloud-optics + if (rrtmgp_sw_cld_phys .eq. 1) then + call check_error_msg(kdist_sw_cldy%set_ice_roughness(nrghice)) + call check_error_msg(kdist_sw_cldy%load(band_lims_cldy_sw, radliq_lwr_sw, & + radliq_upr_sw, radliq_fac_sw, radice_lwr_sw, radice_upr_sw, radice_fac_sw, & + lut_extliq_sw, lut_ssaliq_sw, lut_asyliq_sw, lut_extice_sw, lut_ssaice_sw, & + lut_asyice_sw)) + endif + if (rrtmgp_sw_cld_phys .eq. 2) then + call check_error_msg(kdist_sw_cldy%set_ice_roughness(nrghice)) + call check_error_msg(kdist_sw_cldy%load(band_lims_cldy_sw, pade_extliq_sw, & + pade_ssaliq_sw, pade_asyliq_sw, pade_extice_sw, pade_ssaice_sw, pade_asyice_sw, & + pade_sizereg_extliq_sw, pade_sizereg_ssaliq_sw, pade_sizereg_asyliq_sw, & + pade_sizereg_extice_sw, pade_sizereg_ssaice_sw, pade_sizereg_asyice_sw)) + endif + + ! HACK + rrtmgp_sw_cld_phys = Model%rrtmgp_cld_phys end subroutine rrtmgp_sw_init ! ######################################################################################### @@ -649,27 +901,40 @@ subroutine rrtmgp_sw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr type(ty_optical_props_2str) :: & optical_props_clr, & ! Optical properties for gaseous atmosphere optical_props_aer, & ! Optical properties for aerosols - optical_props_cldy ! Optical properties for clouds - - type(ty_fluxes_broadband) :: & + optical_props_mcica, & ! Optical properties for clouds (sampled) + optical_props_cldy ! Optical properties for clouds (by-band) + type(ty_fluxes_byband) :: & fluxAllSky, & ! All-sky flux (W/m2) fluxClrSky ! Clear-sky flux (W/m2) + ! Types used by Random Number Generator + type(random_stat) :: rng_stat + ! Local variables - integer :: iCol, iBand, iGpt, iDay, iLay + integer :: iCol, iBand, iGpt, iDay, iLay, iTOA, iSFC integer,dimension(ncol) :: ipseed real(kind_phys) :: solAdjFac, cfrac, asyw, ssaw, za1, za2 logical :: top_at_1=.false. real(kind_phys), dimension(ncol) :: clrfracSFC, cldfracSFC - real(kind_phys), dimension(ncol,nlay) :: vmr_o3, vmr_h2o, thetaTendClrSky, & - thetaTendAllSky,coldry,tem0 - real(kind_phys), dimension(nday,nlay) :: cldfrac2, cld_lwp2 + real(kind_phys), dimension(ncol,nlay) :: vmr_o3, vmr_h2o, coldry, tem0, & + cld_ref_liq2,cld_ref_ice2 + real(kind_phys), dimension(ncol,nlay,nBandsSW) :: thetaTendByBandAllSky + real(kind_phys), dimension(nday,nlay) :: cldfrac2, cld_lwp2,thetaTendClrSky, & + thetaTendAllSky real(kind_phys), dimension(nday,nlay+1),target :: & flux_up_allSky, flux_up_clrSky, flux_dn_allSky, flux_dn_clrSky, p_lev2 + real(kind_phys), dimension(nday,nlay+1,nBandsSW),target :: & + fluxBB_up_allSky, fluxBB_dn_allSky real(kind_phys), dimension(nday,nGptsSW) :: toa_flux - real(kind_phys), dimension(nBandsSW,nday,nlay) :: tau_cld, asy_cld, ssa_cld - real(kind_phys), dimension(nGptsSW,nday,nlay) :: cldfracMCICA - real(kind_phys), dimension(:,:,:),allocatable :: tau, asy, ssa + real(kind_phys), dimension(nday,nlay,nBandsSW) :: tau_cld, asy_cld, ssa_cld + real(kind_phys), dimension(nGptsSW,nlay,ncol) :: & + rng3D + real(kind_phys), dimension(nGptsSW*nLay) :: & + rng1D + logical,dimension(ncol,nlay) :: & + liqmask,icemask + logical, dimension(ncol,nlay,nGptsSW) :: & + cldfracMCICA ! Initialize errmsg = '' @@ -711,6 +976,13 @@ subroutine rrtmgp_sw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr ! What is vertical ordering? top_at_1 = (p_lay(1,1) .lt. p_lay(1,nlay)) + if (top_at_1) then + iSFC = nlay+1 + iTOA = 1 + else + iSFC = 1 + iTOA = nlay+1 + endif ! Change random number seed value for each radiation invocation (isubcsw =1 or 2). if(isubcsw == 1) then ! advance prescribed permutation seed @@ -727,6 +999,20 @@ subroutine rrtmgp_sw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr vmr_h2o = merge((q_lay/(1-q_lay))*amdw, 0., q_lay .ne. 1.) vmr_o3 = merge(o3_lay*amdo3, 0., o3_lay .gt. 0.) + ! Compute ice/liquid cloud masks, needed by rrtmgp_cloud_optics + liqmask = (cldfrac .gt. 0 .and. cld_lwp .gt. 0) + icemask = (cldfrac .gt. 0 .and. cld_iwp .gt. 0) + + ! RRTMGP cloud_optics expects particle size to be in a certain range. bound here + if (rrtmgp_sw_cld_phys .gt. 0) then + cld_ref_ice2 = cld_ref_ice + where(cld_ref_ice2 .gt. kdist_sw_cldy%get_max_radius_ice()) cld_ref_ice2=kdist_sw_cldy%get_max_radius_ice() + where(cld_ref_ice2 .lt. kdist_sw_cldy%get_min_radius_ice()) cld_ref_ice2=kdist_sw_cldy%get_min_radius_ice() + cld_ref_liq2 = cld_ref_liq + where(cld_ref_liq2 .gt. kdist_sw_cldy%get_max_radius_liq()) cld_ref_liq2=kdist_sw_cldy%get_max_radius_liq() + where(cld_ref_liq2 .lt. kdist_sw_cldy%get_min_radius_liq()) cld_ref_liq2=kdist_sw_cldy%get_min_radius_liq() + endif + ! Compute dry air column amount tem0 = (1. - vmr_h2o)*amd + vmr_h2o*amw coldry = ( 1.0e-20 * 1.0e3 *avogad)*delpin / (100.*grav*tem0*(1. + vmr_h2o)) @@ -734,12 +1020,13 @@ subroutine rrtmgp_sw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr ! Input model-level pressure @ the top-of-model is set to 1Pa, whereas RRTMGP minimum ! pressure needs to be slightly greater than that, ~1.00518Pa p_lev2=p_lev - p_lev2(:,nlay+1) = kdist_sw_clr%get_press_min()/100. + p_lev2(:,iTOA) = kdist_sw%get_press_min()/100. ! Compute solar constant adjustment factor.. solAdjFac = solcon / s0 - ! Compute fractions of clear sky view at surface + ! Compute fractions of clear sky view at surface. *NOTE* This is only used if cloud radiative + ! properties are provided directly. clrfracSFC = 1._kind_phys cldfracSFC = 1._kind_phys if (iovrsw == 0) then ! random overlapping @@ -791,16 +1078,22 @@ subroutine rrtmgp_sw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr if (nDay .gt. 0) then ! Allocate space for source functions and gas optical properties - call check_error_msg(optical_props_clr%alloc_2str(nday, nlay, kdist_sw_clr)) - call check_error_msg(optical_props_aer%alloc_2str(nday, nlay, kdist_sw_clr)) - call check_error_msg(optical_props_cldy%alloc_2str(nday, nlay, kdist_sw_clr)) + call check_error_msg(optical_props_clr%alloc_2str( nday, nlay, kdist_sw)) + call check_error_msg(optical_props_aer%alloc_2str( nday, nlay, kdist_sw_cldy)) + call check_error_msg(optical_props_cldy%alloc_2str( nday, nlay, kdist_sw_cldy)) + call check_error_msg(optical_props_mcica%alloc_2str(nday, nlay, kdist_sw)) ! Initialize RRTMGP files fluxAllSky%flux_up => flux_up_allSky fluxAllsky%flux_dn => flux_dn_allSky fluxClrSky%flux_up => flux_up_clrSky fluxClrsky%flux_dn => flux_dn_clrSky - + ! Only calculate fluxes by-band, only when heating-rate profiles by band are requested. + if (l_AllSky_HR_byband) then + fluxAllSky%bnd_flux_up => fluxBB_up_allSky + fluxAllsky%bnd_flux_dn => fluxBB_dn_allSky + endif + ! ####################################################################################### ! 1) Clear-sky fluxes (gaseous-atmosphere + aerosols) ! ####################################################################################### @@ -817,7 +1110,7 @@ subroutine rrtmgp_sw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr ! 1b) Compute the optical properties of the atmosphere and the Planck source functions ! from pressures, temperatures, and gas concentrations... print*,'Clear-Sky(SW): Optics' - call check_error_msg(kdist_sw_clr%gas_optics( & + call check_error_msg(kdist_sw%gas_optics( & p_lay(idxday,1:nlay)*100., & p_lev2(idxday,1:nlay+1)*100., & t_lay(idxday,1:nlay), & @@ -827,15 +1120,10 @@ subroutine rrtmgp_sw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr ! 1c) Add contribution from aerosols. print*,'Clear-Sky(SW): Increment Aerosol' - do iDay=1,nDay - do iGpt=1,nGptsSW - iBand = kdist_sw_clr%convert_gpt2band(iGpt) - optical_props_aer%tau(iDay,1:nlay,iGpt) = tau_aer(idxday(iDay),1:nlay,iBand) - optical_props_aer%ssa(iDay,1:nlay,iGpt) = ssa_aer(idxday(iDay),1:nlay,iBand) - optical_props_aer%g(iDay,1:nlay,iGpt) = asy_aer(idxday(iDay),1:nlay,iBand) - enddo - enddo - !call check_error_msg(optical_props_aer%increment(optical_props_clr)) + optical_props_aer%tau = tau_aer(idxday,:,:) + optical_props_aer%ssa = ssa_aer(idxday,:,:) + optical_props_aer%g = asy_aer(idxday,:,:) + call check_error_msg(optical_props_aer%increment(optical_props_clr)) ! 1d) Compute the clear-sky broadband fluxes print*,'Clear-Sky(SW): Fluxes' @@ -845,134 +1133,129 @@ subroutine rrtmgp_sw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr fluxClrSky)) ! 1e) Compute heating rates - print*,'Clear-Sky(SW): Heating-rates' - call check_error_msg(compute_heating_rate( & - fluxClrSky%flux_up, & - fluxClrSky%flux_dn, & - p_lev2(idxday,1:nlay+1)*100., & - thetaTendClrSky)) - + if (l_ClrSky_HR) then + print*,'Clear-Sky(SW): Heating-rates' + call check_error_msg(compute_heating_rate( & + fluxClrSky%flux_up, & + fluxClrSky%flux_dn, & + p_lev2(idxday,1:nlay+1)*100., & + thetaTendClrSky)) + endif + ! #################################################################################### ! 2) Compute broadband all-sky calculation. ! #################################################################################### ! 2a) Compute in-cloud optics print*,'All-Sky(SW): Optics ' - tau_cld(:,:,:) = 0._kind_phys - asy_cld(:,:,:) = 0._kind_phys - ssa_cld(:,:,:) = 0._kind_phys cldfrac2 = merge(cldfrac(idxday,:), 0., cldfrac(idxday,:) .gt. 0._kind_phys) if (any(cldfrac(idxday,:) .gt. 0)) then + ! 2ai) RRTMG cloud optics. ! Cloud-optical properties by type provided. Compute optical-depth, single- ! scattering albedo, and asymmetry parameter - if (.not. present(cld_od)) then - call rrtmgp_sw_cloud_optics(nday, nlay, nBandsSW, & - cld_lwp(idxday,1:nLay), cld_ref_liq(idxday,1:nLay), & - cld_iwp(idxday,1:nLay), cld_ref_ice(idxday,1:nLay), & - cld_rwp(idxday,1:nLay), cld_ref_rain(idxday,1:nLay), & - cld_swp(idxday,1:nLay), cld_ref_snow(idxday,1:nLay), & - cldfrac(idxday,1:nLay), & - tau_cld, ssa_cld, asy_cld) - write(70,*) 'rrtmgp_sw_cloud_optics' - do iLay=1,nLay - write(70,'(i10,5f12.7)') iLay,cld_lwp(idxday,iLay),cld_ref_liq(idxday,iLay),cld_iwp(idxday,iLay),cld_ref_ice(idxday,iLay),cldfrac(idxday,iLay) - enddo - else - ! Cloud-optical depth, single scattering albedo, and asymmetry parameter provided. - do iDay=1,nDay - do iLay=1,nLay - if (cldfrac(iCol,iLay) .gt. 1e-20_kind_phys) then - tau_cld(:,iDay,iLay) = cld_od(idxday(iDay),iLay) - ssa_cld(:,iDay,iLay) = cld_ssa(idxday(iDay),iLay) - asy_cld(:,iDay,iLay) = cld_asy(idxday(iDay),iLay) - else - tau_cld(:,iDay,iLay) = 0. - ssa_cld(:,iDay,iLay) = 1. - asy_cld(:,iDay,iLay) = 0. - endif + if (rrtmgp_sw_cld_phys .eq. 0) then + print*,'Using RRTMG cloud-physics' + if (.not. present(cld_od)) then + print*,' Using all types too...' + call rrtmgp_sw_cloud_optics(nday, nlay, nBandsSW, & + cld_lwp(idxday,1:nLay), cld_ref_liq2(idxday,1:nLay), & + cld_iwp(idxday,1:nLay), cld_ref_ice2(idxday,1:nLay), & + cld_rwp(idxday,1:nLay), cld_ref_rain(idxday,1:nLay), & + cld_swp(idxday,1:nLay), cld_ref_snow(idxday,1:nLay), & + cldfrac(idxday,1:nLay), & + tau_cld, ssa_cld, asy_cld) + optical_props_cldy%tau = tau_cld + optical_props_cldy%ssa = ssa_cld + optical_props_cldy%g = asy_cld + else + ! Cloud-optical depth, single scattering albedo, and asymmetry parameter provided. + do iDay=1,nDay + do iLay=1,nLay + if (cldfrac(iCol,iLay) .gt. 1e-20_kind_phys) then + optical_props_cldy%tau(iDay,iLay,:) = cld_od(idxday(iDay),iLay) + optical_props_cldy%ssa(iDay,iLay,:) = cld_ssa(idxday(iDay),iLay) + optical_props_cldy%g(iDay,iLay,:) = cld_asy(idxday(iDay),iLay) + else + optical_props_cldy%tau(iDay,iLay,:) = 0. + optical_props_cldy%ssa(iDay,iLay,:) = 1. + optical_props_cldy%g(iDay,iLay,:) = 0. + endif + end do end do - end do + endif endif + + ! 2aii) Use RRTMGP cloud-optics. + if (rrtmgp_sw_cld_phys .gt. 0) then + print*,'Using RRTMGP cloud-physics' + call check_error_msg(kdist_sw_cldy%cloud_optics(nday, nlay, nBandsSW, nrghice, & + liqmask(idxday,1:nLay), icemask(idxday,1:nLay), cld_lwp(idxday,1:nLay), & + cld_iwp(idxday,1:nLay), cld_ref_liq2(idxday,1:nLay), & + cld_ref_ice2(idxday,1:nLay), optical_props_cldy)) + end if endif - write(69,'(a20)') "RRTMGP TAUs" - write(70,*) "#" - do iDay=1,nDay - do iLay=1,nlay - write(69,'(a5,i2,4f12.3)') '',iLay,p_lay(idxday(iDay),iLay),sum(optical_props_clr%tau(iDay,iLay,:)) - write(70,'(a5,2i8)') 'TAU: ',iDay,iLay - write(70,'(16f12.3)') tau_cld(:,1,iLay) - write(70,'(a5,2i8)') 'SSA: ' - write(70,'(16f12.3)') ssa_cld(:,1,iLay) - write(70,'(a5,2i8)') 'ASY: ' - write(70,'(16f12.3)') asy_cld(:,1,iLay) - enddo - enddo - ! 2b) Call McICA to sample clouds. if (isubcsw .gt. 0) then print*,'All-Sky(SW): McICA' - allocate(tau(nDay,nLay,nGptsSW),asy(nDay,nLay,nGptsSW),ssa(nDay,nLay,nGptsSW)) - call mcica_subcol_sw(nday, nlay, nGptsSW, cldfrac2, ipseed(idxday), dzlyr(idxday,:), & - de_lgth(idxday), cldfracMCICA) + ! Call RNG. Mersennse Twister accepts 1D array, so loop over columns and collapse along G-points + ! and layers. ([nGpts,nLayer,nColumn]-> [nGpts*nLayer]*nColumn) + do iCol=1,nCol + call random_setseed(ipseed(icol),rng_stat) + call random_number(rng1D,rng_stat) + rng3D(:,:,iCol) = reshape(source = rng1D,shape=[nGptsSW,nLay]) + enddo + ! Call McICA + select case ( iovrsw ) + ! Maximumn-random + case(1) + call check_error_msg(sampled_mask_max_ran(rng3D,cldfrac,cldfracMCICA)) + end select + ! Map band optical depth to each g-point using McICA - do iDay=1,nDay - do iLay=1,nLay - do iGpt=1,nGptsSW - iBand = kdist_sw_clr%convert_gpt2band(iGpt) - if (cldfracMCICA(iGpt,iDay,iLay) .gt. 0.) then - optical_props_cldy%tau(iDay,iLay,iGpt) = tau_cld(iband,iDay,iLay) - optical_props_cldy%ssa(iDay,iLay,iGpt) = ssa_cld(iBand,iDay,iLay) - optical_props_cldy%g(iDay,iLay,iGpt) = asy_cld(iBand,iDay,iLay) - else - optical_props_cldy%tau(iDay,iLay,iGpt) = 0._kind_phys - optical_props_cldy%ssa(iDay,iLay,iGpt) = 1._kind_phys - optical_props_cldy%g(iDay,iLay,iGpt) = 0._kind_phys - endif - enddo - enddo - enddo - ! 2b) Or do calcualtion by band. - else - print*,'All-Sky(SW): Not using McICA. Computing quantities by band.' - allocate(tau(nDay,nLay,nBandsSW),asy(nDay,nLay,nBandsSW),ssa(nDay,nLay,nBandsSW)) - do iDay=1,nDay - do iLay=1,nLay - cfrac = cldfrac(idxday(iDay),iLay)/cldfracSFC(idxday(iDay)) - if (cfrac .gt. 0.) then - do iBand=1,nBandsSW - optical_props_cldy%tau(iDay,iLay,iBand) = tau_cld(iBand,iDay,iLay) - optical_props_cldy%g(iDay,iLay,iBand) = asy_cld(iBand,iDay,iLay) - optical_props_cldy%ssa(iDay,iLay,iBand) = ssa_cld(iBand,iDay,iLay) - enddo - else - optical_props_cldy%tau(iDay,iLay,:) = 0._kind_phys - optical_props_cldy%g(iDay,iLay,:) = 1._kind_phys - optical_props_cldy%ssa(iDay,iLay,:) = 0._kind_phys - endif - enddo - enddo + call check_error_msg(draw_samples(cldfracMCICA,optical_props_cldy,optical_props_mcica)) endif ! 2c) Add cloud contribution from the gaseous (clear-sky) atmosphere. print*,'All-Sky(SW): Increment' - call check_error_msg(optical_props_clr%increment(optical_props_cldy)) + call check_error_msg(optical_props_clr%increment(optical_props_mcica)) ! 2d) Compute broadband fluxes print*,'All-Sky(SW): Fluxes' - call check_error_msg(rte_sw(optical_props_cldy, top_at_1, cossza(idxday), toa_flux,& + call check_error_msg(rte_sw(optical_props_mcica, top_at_1, cossza(idxday), toa_flux,& spread(sfcalb_nir_dir(idxday),1, ncopies = nBandsSW), & spread(sfcalb_nir_dif(idxday),1, ncopies = nBandsSW), & fluxAllSky)) ! 2e) Compute heating rates print*,'All-Sky(SW): Heating-rates' - call check_error_msg(compute_heating_rate( & - fluxAllSky%flux_up, & - fluxAllSky%flux_dn, & - p_lev(idxday,1:nlay+1)*100., & - thetaTendAllSky)) + if (l_AllSky_HR_byband) then + do iBand=1,nBandsSW + call check_error_msg(compute_heating_rate( & + fluxAllSky%bnd_flux_up(:,:,iBand), & + fluxAllSky%bnd_flux_dn(:,:,iBand), & + p_lev(idxday,1:nlay+1)*100., & + thetaTendByBandAllSky(:,:,iBand))) + enddo + else + call check_error_msg(compute_heating_rate( & + fluxAllSky%flux_up, & + fluxAllSky%flux_dn, & + p_lev(idxday,1:nlay+1)*100., & + thetaTendAllSky)) + endif + + write(69,'(a20)') "RRTMGP TAUs" + write(70,*) "#" + do iDay=1,nDay + do iLay=1,nlay + write(69,'(a5,i2,4f12.3)') '',iLay,p_lay(idxday(iDay),iLay),sum(optical_props_clr%tau(iDay,iLay,:)) + write(70,'(16f12.3)') optical_props_cldy%tau(1,iLay,:) + write(70,'(16f12.3)') optical_props_cldy%ssa(1,iLay,:) + write(70,'(16f12.3)') optical_props_cldy%g(1,iLay,:) + enddo + enddo end if ! Daylit days @@ -980,13 +1263,13 @@ subroutine rrtmgp_sw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr ! Copy fluxes from RRTGMP types into model radiation types. ! ####################################################################################### ! Mandatory outputs - topflx(idxday)%upfxc = fluxAllSky%flux_up(:,nlay+1) - topflx(idxday)%upfx0 = fluxClrSky%flux_up(:,nlay+1) - sfcflx(idxday)%upfxc = fluxAllSky%flux_up(:,1) - sfcflx(idxday)%upfx0 = fluxClrSky%flux_up(:,1) - sfcflx(idxday)%dnfxc = fluxAllSky%flux_dn(:,1) - sfcflx(idxday)%dnfx0 = fluxClrSky%flux_dn(:,1) - cldtau(idxday,:) = tau(:,:,10) + topflx(idxday)%upfxc = fluxAllSky%flux_up(:,iTOA) + topflx(idxday)%upfx0 = fluxClrSky%flux_up(:,iTOA) + sfcflx(idxday)%upfxc = fluxAllSky%flux_up(:,iSFC) + sfcflx(idxday)%upfx0 = fluxClrSky%flux_up(:,iSFC) + sfcflx(idxday)%dnfxc = fluxAllSky%flux_dn(:,iSFC) + sfcflx(idxday)%dnfx0 = fluxClrSky%flux_dn(:,iSFC) + cldtau(idxday,:) = optical_props_cldy%tau(:,:,10) hswc(idxday,:) = thetaTendAllSky ! Optional output @@ -997,14 +1280,11 @@ subroutine rrtmgp_sw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr flxprf(idxday,:)%dnfx0 = fluxClrSky%flux_dn endif if (l_AllSky_HR_byband) then - do iBand=1,nBandsSW - hswb(idxday,:,iBand) = thetaTendAllSky - end do + hswb(idxday,:,:) = thetaTendByBandAllSky endif if (l_ClrSky_HR) then hsw0(idxday,:) = thetaTendClrSky endif - end subroutine rrtmgp_sw_run ! ######################################################################################### ! ######################################################################################### From d14dba342a7c4f53cafa9632931d3893eb013790 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Wed, 1 May 2019 16:05:13 -0600 Subject: [PATCH 012/167] Fixd bug left in from last commit --- physics/rrtmgp_sw_main.F90 | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/physics/rrtmgp_sw_main.F90 b/physics/rrtmgp_sw_main.F90 index db83548ce..0d99e0fe6 100644 --- a/physics/rrtmgp_sw_main.F90 +++ b/physics/rrtmgp_sw_main.F90 @@ -227,7 +227,7 @@ subroutine rrtmgp_sw_init(Model,mpicomm, mpirank, mpiroot, errmsg, errflg) rrtmgp_sw_cld_phys = Model%rrtmgp_cld_phys ! HACK. If using RRTMG cloud_optics w/ RRTMGP, we need to be able to define - !if (Model%rrtmgp_cld_phys .eq. 0) rrtmgp_sw_cld_phys=1 + if (Model%rrtmgp_cld_phys .eq. 0) rrtmgp_sw_cld_phys=1 ! Filenames are set in the gfs_physics_nml (scm/src/GFS_typedefs.F90) kdist_file = trim(Model%rrtmgp_root)//trim(Model%kdist_sw_file_gas) @@ -913,13 +913,13 @@ subroutine rrtmgp_sw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr ! Local variables integer :: iCol, iBand, iGpt, iDay, iLay, iTOA, iSFC integer,dimension(ncol) :: ipseed - real(kind_phys) :: solAdjFac, cfrac, asyw, ssaw, za1, za2 + real(kind_phys) :: cfrac, asyw, ssaw, za1, za2 logical :: top_at_1=.false. real(kind_phys), dimension(ncol) :: clrfracSFC, cldfracSFC real(kind_phys), dimension(ncol,nlay) :: vmr_o3, vmr_h2o, coldry, tem0, & cld_ref_liq2,cld_ref_ice2 real(kind_phys), dimension(ncol,nlay,nBandsSW) :: thetaTendByBandAllSky - real(kind_phys), dimension(nday,nlay) :: cldfrac2, cld_lwp2,thetaTendClrSky, & + real(kind_phys), dimension(nday,nlay) :: cld_lwp2,thetaTendClrSky, & thetaTendAllSky real(kind_phys), dimension(nday,nlay+1),target :: & flux_up_allSky, flux_up_clrSky, flux_dn_allSky, flux_dn_clrSky, p_lev2 @@ -1022,13 +1022,9 @@ subroutine rrtmgp_sw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr p_lev2=p_lev p_lev2(:,iTOA) = kdist_sw%get_press_min()/100. - ! Compute solar constant adjustment factor.. - solAdjFac = solcon / s0 - ! Compute fractions of clear sky view at surface. *NOTE* This is only used if cloud radiative ! properties are provided directly. clrfracSFC = 1._kind_phys - cldfracSFC = 1._kind_phys if (iovrsw == 0) then ! random overlapping do iCol=1,nCol do iLay = 1, nlay @@ -1148,7 +1144,6 @@ subroutine rrtmgp_sw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr ! 2a) Compute in-cloud optics print*,'All-Sky(SW): Optics ' - cldfrac2 = merge(cldfrac(idxday,:), 0., cldfrac(idxday,:) .gt. 0._kind_phys) if (any(cldfrac(idxday,:) .gt. 0)) then ! 2ai) RRTMG cloud optics. ! Cloud-optical properties by type provided. Compute optical-depth, single- @@ -1158,8 +1153,8 @@ subroutine rrtmgp_sw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr if (.not. present(cld_od)) then print*,' Using all types too...' call rrtmgp_sw_cloud_optics(nday, nlay, nBandsSW, & - cld_lwp(idxday,1:nLay), cld_ref_liq2(idxday,1:nLay), & - cld_iwp(idxday,1:nLay), cld_ref_ice2(idxday,1:nLay), & + cld_lwp(idxday,1:nLay), cld_ref_liq(idxday,1:nLay), & + cld_iwp(idxday,1:nLay), cld_ref_ice(idxday,1:nLay), & cld_rwp(idxday,1:nLay), cld_ref_rain(idxday,1:nLay), & cld_swp(idxday,1:nLay), cld_ref_snow(idxday,1:nLay), & cldfrac(idxday,1:nLay), & From 6c55b934838296fbb44580ddd847681aab2286f8 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Thu, 2 May 2019 10:04:49 -0600 Subject: [PATCH 013/167] Fixed allocation for RRTMGP aerosol/cloudy optical property DDT. Adjusted SW aerosol band ordering in GFS_rrtmgp_pre.F90. --- physics/GFS_rrtmgp_pre.F90 | 16 ++++++++++------ physics/rrtmgp_lw_main.F90 | 32 ++++++++++++-------------------- physics/rrtmgp_sw_main.F90 | 17 ++++++++--------- 3 files changed, 30 insertions(+), 35 deletions(-) diff --git a/physics/GFS_rrtmgp_pre.F90 b/physics/GFS_rrtmgp_pre.F90 index 370e5f27a..357c766ba 100644 --- a/physics/GFS_rrtmgp_pre.F90 +++ b/physics/GFS_rrtmgp_pre.F90 @@ -540,14 +540,18 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Sfcprop, Statein, & ! input Model%lsswr, Model%lslwr, & faersw, faerlw, aerodp) ! --- outputs -! CCPP - do j = 1,NBDSW + + ! For RRTMGP SW the bands are now ordered from [IR(band) -> nIR -> UV], in RRTMG the + ! band ordering was [nIR -> UV -> IR(band)] + faersw1(1:IM,1:LMK,1) = faersw(1:IM,1:LMK,NBDSW,1) + faersw2(1:IM,1:LMK,1) = faersw(1:IM,1:LMK,NBDSW,2) + faersw3(1:IM,1:LMK,1) = faersw(1:IM,1:LMK,NBDSW,3) + do j = 2,NBDSW do k = 1, LMK do i = 1, IM - ! NF_AESW = 3 - faersw1(i,k,j) = faersw(i,k,j,1) - faersw2(i,k,j) = faersw(i,k,j,2) - faersw3(i,k,j) = faersw(i,k,j,3) + faersw1(i,k,j) = faersw(i,k,j-1,1) + faersw2(i,k,j) = faersw(i,k,j-1,2) + faersw3(i,k,j) = faersw(i,k,j-1,3) enddo enddo enddo diff --git a/physics/rrtmgp_lw_main.F90 b/physics/rrtmgp_lw_main.F90 index 842fa9bba..30f0485ee 100644 --- a/physics/rrtmgp_lw_main.F90 +++ b/physics/rrtmgp_lw_main.F90 @@ -232,9 +232,6 @@ subroutine rrtmgp_lw_init(Model,mpicomm, mpirank, mpiroot, errmsg, errflg) ! How are we handling cloud-optics? rrtmgp_lw_cld_phys = Model%rrtmgp_cld_phys - ! HACK. If using RRTMG cloud_optics w/ RRTMGP, we need to be able to define - if (Model%rrtmgp_cld_phys .eq. 0) rrtmgp_lw_cld_phys=1 - ! Filenames are set in the gfs_physics_nml (scm/src/GFS_typedefs.F90) kdist_file = trim(Model%rrtmgp_root)//trim(Model%kdist_lw_file_gas) kdist_cldy_file = trim(Model%rrtmgp_root)//trim(Model%kdist_lw_file_clouds) @@ -724,9 +721,6 @@ subroutine rrtmgp_lw_init(Model,mpicomm, mpirank, mpiroot, errmsg, errflg) pade_sizereg_extice, pade_sizereg_ssaice, pade_sizereg_asyice)) endif - ! HACK! - rrtmgp_lw_cld_phys = Model%rrtmgp_cld_phys - end subroutine rrtmgp_lw_init ! ######################################################################################### @@ -1002,20 +996,18 @@ subroutine rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr ! ####################################################################################### ! Call RRTMGP ! ####################################################################################### - ! Allocate space for source functions and gas optical properties - call check_error_msg(sources%alloc( ncol, nlay, kdist_lw)) - call check_error_msg(optical_props_clr%alloc_1scl( ncol, nlay, kdist_lw)) - call check_error_msg(optical_props_mcica%alloc_1scl(ncol, nlay, kdist_lw)) - ! DJS_asks_RP - ! Need to use kdist_lw_cldy here, otherewise if we use kdist_lw, optical_props_cldy gets - ! allocated with nBands != nGpts, which then fails when calling kdist_lw_cldy%cloud_optics - call check_error_msg(optical_props_cldy%alloc_1scl( ncol, nlay, kdist_lw_cldy)) - ! We have also have aerosol information by band, so need to allocate just like for - ! clouds, where nbands = ngpts = 16. This is problematic when not using RRTMGP cloud_optics(), - ! as kdist_lw_cldy only gets loaded, so this breaks when using rrtmg cloud_optics with rrtmgp. - call check_error_msg(optical_props_aer%alloc_1scl( ncol, nlay, kdist_lw_cldy)) - - ! Initialize RRTMGP files + ! Allocate space for source functions and gas optical properties [ncol,nlay,ngpts] + call check_error_msg(sources%alloc( nCol, nLay, kdist_lw)) + call check_error_msg(optical_props_clr%alloc_1scl( nCol, nLay, kdist_lw)) + call check_error_msg(optical_props_mcica%alloc_1scl(nCol, nLay, kdist_lw)) + ! Cloud optics [nCol,nLay,nBands] + call check_error_msg(optical_props_cldy%init(optical_props_clr%get_band_lims_wavenumber())) + call check_error_msg(optical_props_cldy%alloc_1scl(ncol,nlay)) + ! Aerosol optics [Ccol,nLay,nBands] + call check_error_msg(optical_props_aer%init(optical_props_clr%get_band_lims_wavenumber())) + call check_error_msg(optical_props_aer%alloc_1scl(ncol,nlay)) + + ! Initialize RRTMGP files fluxAllSky%flux_up => flux_up_allSky fluxAllsky%flux_dn => flux_dn_allSky fluxClrSky%flux_up => flux_up_clrSky diff --git a/physics/rrtmgp_sw_main.F90 b/physics/rrtmgp_sw_main.F90 index 0d99e0fe6..fc882820d 100644 --- a/physics/rrtmgp_sw_main.F90 +++ b/physics/rrtmgp_sw_main.F90 @@ -226,9 +226,6 @@ subroutine rrtmgp_sw_init(Model,mpicomm, mpirank, mpiroot, errmsg, errflg) ! How are we handling cloud-optics? rrtmgp_sw_cld_phys = Model%rrtmgp_cld_phys - ! HACK. If using RRTMG cloud_optics w/ RRTMGP, we need to be able to define - if (Model%rrtmgp_cld_phys .eq. 0) rrtmgp_sw_cld_phys=1 - ! Filenames are set in the gfs_physics_nml (scm/src/GFS_typedefs.F90) kdist_file = trim(Model%rrtmgp_root)//trim(Model%kdist_sw_file_gas) kdist_cldy_file = trim(Model%rrtmgp_root)//trim(Model%kdist_sw_file_clouds) @@ -720,9 +717,6 @@ subroutine rrtmgp_sw_init(Model,mpicomm, mpirank, mpiroot, errmsg, errflg) pade_sizereg_extice_sw, pade_sizereg_ssaice_sw, pade_sizereg_asyice_sw)) endif - ! HACK - rrtmgp_sw_cld_phys = Model%rrtmgp_cld_phys - end subroutine rrtmgp_sw_init ! ######################################################################################### ! RRTMGP_SW_RUN @@ -1073,11 +1067,16 @@ subroutine rrtmgp_sw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr ! ####################################################################################### if (nDay .gt. 0) then - ! Allocate space for source functions and gas optical properties + ! Allocate space for gas optical properties + ! Clear-sky call check_error_msg(optical_props_clr%alloc_2str( nday, nlay, kdist_sw)) - call check_error_msg(optical_props_aer%alloc_2str( nday, nlay, kdist_sw_cldy)) - call check_error_msg(optical_props_cldy%alloc_2str( nday, nlay, kdist_sw_cldy)) call check_error_msg(optical_props_mcica%alloc_2str(nday, nlay, kdist_sw)) + ! Cloud optics [nCol,nLay,nBands] + call check_error_msg(optical_props_cldy%init(optical_props_clr%get_band_lims_wavenumber())) + call check_error_msg(optical_props_cldy%alloc_2str(ncol,nlay)) + ! Aerosol optics [Ccol,nLay,nBands] + call check_error_msg(optical_props_aer%init(optical_props_clr%get_band_lims_wavenumber())) + call check_error_msg(optical_props_aer%alloc_2str(ncol,nlay)) ! Initialize RRTMGP files fluxAllSky%flux_up => flux_up_allSky From 8bbbd5b179d39380413fe7488b7bd0797cccfe75 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Thu, 2 May 2019 11:34:46 -0600 Subject: [PATCH 014/167] Cleaned up RRTGMP_pre a bit. Modified all calculations to use Pa instead of mb. --- physics/GFS_rrtmgp_pre.F90 | 1417 +++++++++++++++++------------------- physics/rrtmgp_lw_main.F90 | 19 +- physics/rrtmgp_sw_main.F90 | 17 +- 3 files changed, 664 insertions(+), 789 deletions(-) diff --git a/physics/GFS_rrtmgp_pre.F90 b/physics/GFS_rrtmgp_pre.F90 index 357c766ba..d91bc2522 100644 --- a/physics/GFS_rrtmgp_pre.F90 +++ b/physics/GFS_rrtmgp_pre.F90 @@ -80,829 +80,714 @@ end subroutine GFS_rrtmgp_pre_init ! Attention - the output arguments lm, im, lmk, lmp must not be set ! in the CCPP version - they are defined in the interstitial_create routine subroutine GFS_rrtmgp_pre_run (Model, Grid, Sfcprop, Statein, & ! input - Tbd, Cldprop, Coupling, & - Radtend, & ! input/output - lm, im, lmk, lmp, & ! input - kd, kt, kb, raddt, delp, dz, plvl, plyr, & ! output - tlvl, tlyr, tsfg, tsfa, qlyr, olyr, & - gasvmr_co2, gasvmr_n2o, gasvmr_ch4, gasvmr_o2, & - gasvmr_co, gasvmr_cfc11, gasvmr_cfc12, & - gasvmr_cfc22, gasvmr_ccl4, gasvmr_cfc113, & - faersw1, faersw2, faersw3, & - faerlw1, faerlw2, faerlw3, aerodp, & - clouds1, clouds2, clouds3, clouds4, clouds5, clouds6, & - clouds7, clouds8, clouds9, cldsa, & - mtopa, mbota, de_lgth, alb1d, errmsg, errflg) - - use machine, only: kind_phys - use GFS_typedefs, only: GFS_statein_type, & - GFS_stateout_type, & - GFS_sfcprop_type, & - GFS_coupling_type, & - GFS_control_type, & - GFS_grid_type, & - GFS_tbd_type, & - GFS_cldprop_type, & - GFS_radtend_type, & - GFS_diag_type - use physparam - use physcons, only: eps => con_eps, & - & epsm1 => con_epsm1, & - & fvirt => con_fvirt & - &, rog => con_rog & - &, rocp => con_rocp - use radcons, only: itsfc,ltp, lextop, qmin, & - qme5, qme6, epsq, prsmin - use funcphys, only: fpvs - - use module_radiation_astronomy,only: coszmn ! sol_init, sol_update - use module_radiation_gases, only: NF_VGAS, getgases, getozn ! gas_init, gas_update, - use module_radiation_aerosols, only: NF_AESW, NF_AELW, setaer, & ! aer_init, aer_update, - & NSPC1 - use module_radiation_clouds, only: NF_CLDS, & ! cld_init - & progcld1, progcld3, & - & progcld4, progcld5, & - & progclduni - use module_radsw_parameters, only: topfsw_type, sfcfsw_type, & - & profsw_type, NBDSW - use module_radlw_parameters, only: topflw_type, sfcflw_type, & - & proflw_type - use rrtmgp_lw, only: NBDLW => nBandsLW - use surface_perturbation, only: cdfnor - - implicit none - - type(GFS_control_type), intent(in) :: Model - type(GFS_grid_type), intent(in) :: Grid - type(GFS_sfcprop_type), intent(in) :: Sfcprop - type(GFS_statein_type), intent(in) :: Statein - type(GFS_radtend_type), intent(inout) :: Radtend - type(GFS_tbd_type), intent(in) :: Tbd - type(GFS_cldprop_type), intent(in) :: Cldprop - type(GFS_coupling_type), intent(in) :: Coupling - - integer, intent(in) :: im, lm, lmk, lmp - integer, intent(out) :: kd, kt, kb - real(kind=kind_phys), intent(out) :: raddt - - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: delp - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: dz - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+1+LTP), intent(out) :: plvl - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: plyr - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+1+LTP), intent(out) :: tlvl - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: tlyr - real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(out) :: tsfg - real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(out) :: tsfa - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: qlyr - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: olyr - - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: gasvmr_co2 - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: gasvmr_n2o - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: gasvmr_ch4 - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: gasvmr_o2 - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: gasvmr_co - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: gasvmr_cfc11 - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: gasvmr_cfc12 - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: gasvmr_cfc22 - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: gasvmr_ccl4 - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: gasvmr_cfc113 - - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,NBDSW), intent(out) :: faersw1 - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,NBDSW), intent(out) :: faersw2 - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,NBDSW), intent(out) :: faersw3 - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,NBDLW), intent(out) :: faerlw1 - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,NBDLW), intent(out) :: faerlw2 - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,NBDLW), intent(out) :: faerlw3 - - real(kind=kind_phys), dimension(size(Grid%xlon,1),NSPC1), intent(out) :: aerodp - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: clouds1 - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: clouds2 - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: clouds3 - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: clouds4 - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: clouds5 - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: clouds6 - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: clouds7 - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: clouds8 - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: clouds9 - real(kind=kind_phys), dimension(size(Grid%xlon,1),5), intent(out) :: cldsa - integer, dimension(size(Grid%xlon,1),3), intent(out) :: mbota - integer, dimension(size(Grid%xlon,1),3), intent(out) :: mtopa - real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(out) :: de_lgth - real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(out) :: alb1d - - character(len=*), intent(out) :: errmsg - integer, intent(out) :: errflg - - ! Local variables - integer :: me, nfxr, ntrac, ntcw, ntiw, ncld, ntrw, ntsw, ntgl - - integer :: i, j, k, k1, k2, lsk, lv, n, itop, ibtc, LP1, lla, llb, lya, lyb - - real(kind=kind_phys) :: es, qs, delt, tem0d - - real(kind=kind_phys), dimension(size(Grid%xlon,1)) :: cvt1, cvb1, tem1d, tskn - - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP) :: & - htswc, htlwc, gcice, grain, grime, htsw0, htlw0, & - rhly, tvly,qstl, vvel, clw, ciw, prslk1, tem2da, & - cldcov, deltaq, cnvc, cnvw, & - effrl, effri, effrr, effrs - real (kind=kind_phys) :: clwmin, clwm, clwt, onemrh, value, tem1, tem2, tem3 - real (kind=kind_phys), parameter :: xrc3 = 100. - - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP+1) :: tem2db -! real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP+1) :: hz - - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,Model%ncnd) :: ccnd - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,2:Model%ntrac) :: tracer1 - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,NF_CLDS) :: clouds - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,NF_VGAS) :: gasvmr - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,NBDSW,NF_AESW)::faersw - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,NBDLW,NF_AELW)::faerlw -! -!===> ... begin here -! - ! Initialize CCPP error handling variables - errmsg = '' - errflg = 0 - - if (.not. (Model%lsswr .or. Model%lslwr)) return - - !--- set commonly used integers - me = Model%me - NFXR = Model%nfxr - NTRAC = Model%ntrac ! tracers in grrad strip off sphum - start tracer1(2:NTRAC) - ntcw = Model%ntcw - ntiw = Model%ntiw - ncld = Model%ncld - ntrw = Model%ntrw - ntsw = Model%ntsw - ntgl = Model%ntgl - - LP1 = LM + 1 ! num of in/out levels - - -! --- ... set local /level/layer indexes corresponding to in/out -! variables - - if ( lextop ) then - if ( ivflip == 1 ) then ! vertical from sfc upward - kd = 0 ! index diff between in/out and local - kt = 1 ! index diff between lyr and upper bound - kb = 0 ! index diff between lyr and lower bound - lla = LMK ! local index at the 2nd level from top - llb = LMP ! local index at toa level - lya = LM ! local index for the 2nd layer from top - lyb = LP1 ! local index for the top layer - else ! vertical from toa downward - kd = 1 ! index diff between in/out and local - kt = 0 ! index diff between lyr and upper bound - kb = 1 ! index diff between lyr and lower bound - lla = 2 ! local index at the 2nd level from top - llb = 1 ! local index at toa level - lya = 2 ! local index for the 2nd layer from top - lyb = 1 ! local index for the top layer - endif ! end if_ivflip_block - else - kd = 0 - if ( ivflip == 1 ) then ! vertical from sfc upward - kt = 1 ! index diff between lyr and upper bound - kb = 0 ! index diff between lyr and lower bound - else ! vertical from toa downward - kt = 0 ! index diff between lyr and upper bound - kb = 1 ! index diff between lyr and lower bound - endif ! end if_ivflip_block - endif ! end if_lextop_block - - raddt = min(Model%fhswr, Model%fhlwr) -! print *,' in grrad : raddt=',raddt - - -!> -# Setup surface ground temperature and ground/air skin temperature -!! if required. - - if ( itsfc == 0 ) then ! use same sfc skin-air/ground temp - do i = 1, IM - tskn(i) = Sfcprop%tsfc(i) - tsfg(i) = Sfcprop%tsfc(i) - enddo - else ! use diff sfc skin-air/ground temp - do i = 1, IM - tskn(i) = Sfcprop%tsfc(i) - tsfg(i) = Sfcprop%tsfc(i) - enddo - endif - - -!> -# Prepare atmospheric profiles for radiation input. -! - - lsk = 0 - if (ivflip == 0 .and. lm < Model%levs) lsk = Model%levs - lm - -! convert pressure unit from pa to mb - do k = 1, LM - k1 = k + kd - k2 = k + lsk - do i = 1, IM - plvl(i,k1+kb) = Statein%prsi(i,k2+kb) * 0.01 ! pa to mb (hpa) - plyr(i,k1) = Statein%prsl(i,k2) * 0.01 ! pa to mb (hpa) - tlyr(i,k1) = Statein%tgrs(i,k2) - prslk1(i,k1) = Statein%prslk(i,k2) - -!> - Compute relative humidity. - es = min( Statein%prsl(i,k2), fpvs( Statein%tgrs(i,k2) ) ) ! fpvs and prsl in pa - qs = max( QMIN, eps * es / (Statein%prsl(i,k2) + epsm1*es) ) - rhly(i,k1) = max( 0.0, min( 1.0, max(QMIN, Statein%qgrs(i,k2,1))/qs ) ) - qstl(i,k1) = qs - enddo - enddo + Tbd, Cldprop, Coupling, & + Radtend, & ! input/output + lm, im, lmk, lmp, & ! input + kd, kt, kb, raddt, delp, dz, plvl, plyr, & ! output + tlvl, tlyr, tsfg, tsfa, qlyr, olyr, & + gasvmr_co2, gasvmr_n2o, gasvmr_ch4, gasvmr_o2, & + gasvmr_co, gasvmr_cfc11, gasvmr_cfc12, & + gasvmr_cfc22, gasvmr_ccl4, gasvmr_cfc113, & + faersw1, faersw2, faersw3, & + faerlw1, faerlw2, faerlw3, aerodp, & + clouds1, clouds2, clouds3, clouds4, clouds5, clouds6, & + clouds7, clouds8, clouds9, cldsa, & + mtopa, mbota, de_lgth, alb1d, errmsg, errflg) + + use machine, only: kind_phys + use GFS_typedefs, only: GFS_statein_type, & + GFS_stateout_type, & + GFS_sfcprop_type, & + GFS_coupling_type, & + GFS_control_type, & + GFS_grid_type, & + GFS_tbd_type, & + GFS_cldprop_type, & + GFS_radtend_type, & + GFS_diag_type + use physparam + use physcons, only: eps => con_eps, & + epsm1 => con_epsm1, & + fvirt => con_fvirt, & + rog => con_rog, & + rocp => con_rocp + use radcons, only: itsfc,ltp, lextop, qmin, & + qme5, qme6, epsq, prsmin + use funcphys, only: fpvs + use module_radiation_astronomy,only: coszmn + use module_radiation_gases, only: NF_VGAS, getgases, getozn + use module_radiation_aerosols, only: NF_AESW, NF_AELW, setaer, & + NSPC1 + use module_radiation_clouds, only: NF_CLDS, & + progcld1, progcld3, & + progcld4, progcld5, & + progclduni + use module_radsw_parameters, only: topfsw_type, sfcfsw_type, & + profsw_type, NBDSW + use module_radlw_parameters, only: topflw_type, sfcflw_type, & + proflw_type + use rrtmgp_lw, only: NBDLW => nBandsLW, kdist_lw + use surface_perturbation, only: cdfnor + + implicit none + + ! Inputs + type(GFS_control_type), intent(in) :: Model + type(GFS_grid_type), intent(in) :: Grid + type(GFS_sfcprop_type), intent(in) :: Sfcprop + type(GFS_statein_type), intent(in) :: Statein + type(GFS_radtend_type), intent(inout) :: Radtend + type(GFS_tbd_type), intent(in) :: Tbd + type(GFS_cldprop_type), intent(in) :: Cldprop + type(GFS_coupling_type), intent(in) :: Coupling + integer, intent(in) :: im, lm, lmk, lmp + + ! Outputs + integer, intent(out) :: kd, kt, kb + real(kind=kind_phys), intent(out) :: raddt + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: delp + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: dz + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+1+LTP), intent(out) :: plvl + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: plyr + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+1+LTP), intent(out) :: tlvl + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: tlyr + real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(out) :: tsfg + real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(out) :: tsfa + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: qlyr + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: olyr + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: gasvmr_co2 + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: gasvmr_n2o + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: gasvmr_ch4 + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: gasvmr_o2 + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: gasvmr_co + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: gasvmr_cfc11 + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: gasvmr_cfc12 + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: gasvmr_cfc22 + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: gasvmr_ccl4 + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: gasvmr_cfc113 + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,NBDSW), intent(out) :: faersw1 + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,NBDSW), intent(out) :: faersw2 + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,NBDSW), intent(out) :: faersw3 + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,NBDLW), intent(out) :: faerlw1 + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,NBDLW), intent(out) :: faerlw2 + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,NBDLW), intent(out) :: faerlw3 + real(kind=kind_phys), dimension(size(Grid%xlon,1),NSPC1), intent(out) :: aerodp + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: clouds1 + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: clouds2 + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: clouds3 + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: clouds4 + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: clouds5 + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: clouds6 + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: clouds7 + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: clouds8 + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: clouds9 + real(kind=kind_phys), dimension(size(Grid%xlon,1),5), intent(out) :: cldsa + integer, dimension(size(Grid%xlon,1),3), intent(out) :: mbota + integer, dimension(size(Grid%xlon,1),3), intent(out) :: mtopa + real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(out) :: de_lgth + real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(out) :: alb1d + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + + ! Local variables + integer :: me, nfxr, ntrac, ntcw, ntiw, ncld, ntrw, ntsw, ntgl,i, j, k, k1, k2, lsk, & + lv, n, itop, ibtc, LP1, lla, llb, lya, lyb + real(kind=kind_phys) :: es, qs, delt, tem0d + real(kind=kind_phys), dimension(size(Grid%xlon,1)) :: cvt1, cvb1, tem1d, tskn + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP) :: htswc, htlwc, & + gcice, grain, grime, htsw0, htlw0, rhly, tvly,qstl, vvel, clw, ciw, prslk1, & + tem2da, cldcov, deltaq, cnvc, cnvw, effrl, effri, effrr, effrs + real (kind=kind_phys) :: clwmin, clwm, clwt, onemrh, value, tem1, tem2, tem3 + real (kind=kind_phys), parameter :: xrc3 = 100. + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP+1) :: tem2db + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,Model%ncnd) :: ccnd + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,2:Model%ntrac) :: tracer1 + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,NF_CLDS) :: clouds + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,NF_VGAS) :: gasvmr + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,NBDSW,NF_AESW)::faersw + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,NBDLW,NF_AELW)::faerlw + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + + if (.not. (Model%lsswr .or. Model%lslwr)) return + + ! Define some commonly used integers + me = Model%me + NFXR = Model%nfxr + NTRAC = Model%ntrac ! tracers in grrad strip off sphum - start tracer1(2:NTRAC) + ntcw = Model%ntcw + ntiw = Model%ntiw + ncld = Model%ncld + ntrw = Model%ntrw + ntsw = Model%ntsw + ntgl = Model%ntgl + LP1 = LM + 1 ! num of in/out levels + + ! Set local /level/layer indexes corresponding to in/out variables + if ( lextop ) then + if ( ivflip == 1 ) then ! vertical from sfc upward + kd = 0 ! index diff between in/out and local + kt = 1 ! index diff between lyr and upper bound + kb = 0 ! index diff between lyr and lower bound + lla = LMK ! local index at the 2nd level from top + llb = LMP ! local index at toa level + lya = LM ! local index for the 2nd layer from top + lyb = LP1 ! local index for the top layer + else ! vertical from toa downward + kd = 1 ! index diff between in/out and local + kt = 0 ! index diff between lyr and upper bound + kb = 1 ! index diff between lyr and lower bound + lla = 2 ! local index at the 2nd level from top + llb = 1 ! local index at toa level + lya = 2 ! local index for the 2nd layer from top + lyb = 1 ! local index for the top layer + endif ! end if_ivflip_block + else + kd = 0 + if ( ivflip == 1 ) then ! vertical from sfc upward + kt = 1 ! index diff between lyr and upper bound + kb = 0 ! index diff between lyr and lower bound + else ! vertical from toa downward + kt = 0 ! index diff between lyr and upper bound + kb = 1 ! index diff between lyr and lower bound + endif ! end if_ivflip_block + endif ! end if_lextop_block + + raddt = min(Model%fhswr, Model%fhlwr) + + + ! Setup surface ground temperature and ground/air skin temperature if required. + if ( itsfc == 0 ) then ! use same sfc skin-air/ground temp + do i = 1, IM + tskn(i) = Sfcprop%tsfc(i) + tsfg(i) = Sfcprop%tsfc(i) + enddo + else ! use diff sfc skin-air/ground temp + do i = 1, IM + tskn(i) = Sfcprop%tsfc(i) + tsfg(i) = Sfcprop%tsfc(i) + enddo + endif - !--- recast remaining all tracers (except sphum) forcing them all to be positive - do j = 2, NTRAC + ! Prepare atmospheric profiles for radiation input. + lsk = 0 + if (ivflip == 0 .and. lm < Model%levs) lsk = Model%levs - lm + + ! Copy over state fields into fields, compute some needed quantities. do k = 1, LM - k1 = k + kd - k2 = k + lsk - tracer1(:,k1,j) = max(0.0, Statein%qgrs(:,k2,j)) + k1 = k + kd + k2 = k + lsk + do i = 1, IM + plvl(i,k1+kb) = Statein%prsi(i,k2+kb) + plyr(i,k1) = Statein%prsl(i,k2) + tlyr(i,k1) = Statein%tgrs(i,k2) + prslk1(i,k1) = Statein%prslk(i,k2) + + ! Compute relative humidity. + es = min( Statein%prsl(i,k2), fpvs( Statein%tgrs(i,k2) ) ) ! fpvs and prsl in pa + qs = max( QMIN, eps * es / (Statein%prsl(i,k2) + epsm1*es) ) + rhly(i,k1) = max( 0.0, min( 1.0, max(QMIN, Statein%qgrs(i,k2,1))/qs ) ) + qstl(i,k1) = qs + enddo + plvl(i,k1+kb) = kdist_lw%get_press_min() enddo - enddo -! - if (ivflip == 0) then ! input data from toa to sfc - do i = 1, IM - plvl(i,1+kd) = 0.01 * Statein%prsi(i,1) ! pa to mb (hpa) + + ! Recast remaining all tracers (except sphum) forcing them all to be positive + do j = 2, NTRAC + do k = 1, LM + k1 = k + kd + k2 = k + lsk + tracer1(:,k1,j) = max(0.0, Statein%qgrs(:,k2,j)) + enddo enddo - if (lsk /= 0) then - do i = 1, IM - plvl(i,1+kd) = 0.5 * (plvl(i,2+kd) + plvl(i,1+kd)) - enddo + + ! Input data from toa to sfc + if (ivflip == 0) then + do i = 1, IM + plvl(i,1+kd) = Statein%prsi(i,1) + enddo + plvl(IM,1+kd) = kdist_lw%get_press_min() + if (lsk /= 0) then + do i = 1, IM + plvl(i,1+kd) = 0.5 * (plvl(i,2+kd) + plvl(i,1+kd)) + enddo + plvl(IM,1+kd) = kdist_lw%get_press_min() + endif + ! Input data from sfc to top + else + do i = 1, IM + plvl(i,LP1+kd) = Statein%prsi(i,LP1+lsk) + enddo + plvl(IM,LP1+kd) = kdist_lw%get_press_min() + if (lsk /= 0) then + do i = 1, IM + plvl(i,LM+kd) = 0.5 * (plvl(i,LP1+kd) + plvl(i,LM+kd)) + enddo + plvl(IM,LM+kd) = kdist_lw%get_press_min() + endif endif - else ! input data from sfc to top - do i = 1, IM - plvl(i,LP1+kd) = 0.01 * Statein%prsi(i,LP1+lsk) ! pa to mb (hpa) - enddo - if (lsk /= 0) then - do i = 1, IM - plvl(i,LM+kd) = 0.5 * (plvl(i,LP1+kd) + plvl(i,LM+kd)) - enddo + + if ( lextop ) then ! values for extra top layer + do i = 1, IM + plvl(i,llb) = kdist_lw%get_press_min() + if ( plvl(i,lla) <= kdist_lw%get_press_min() ) plvl(i,lla) = 2.0* kdist_lw%get_press_min() + plyr(i,lyb) = 0.5 * plvl(i,lla) + tlyr(i,lyb) = tlyr(i,lya) + prslk1(i,lyb) = (plyr(i,lyb)*0.001) ** rocp ! plyr in Pa + rhly(i,lyb) = rhly(i,lya) + qstl(i,lyb) = qstl(i,lya) + enddo + + ! note: may need to take care the top layer amount + tracer1(:,lyb,:) = tracer1(:,lya,:) endif - endif - - if ( lextop ) then ! values for extra top layer - do i = 1, IM - plvl(i,llb) = prsmin - if ( plvl(i,lla) <= prsmin ) plvl(i,lla) = 2.0*prsmin - plyr(i,lyb) = 0.5 * plvl(i,lla) - tlyr(i,lyb) = tlyr(i,lya) - prslk1(i,lyb) = (plyr(i,lyb)*0.00001) ** rocp ! plyr in Pa - rhly(i,lyb) = rhly(i,lya) - qstl(i,lyb) = qstl(i,lya) - enddo - -! --- note: may need to take care the top layer amount - tracer1(:,lyb,:) = tracer1(:,lya,:) - endif - - -!> - Get layer ozone mass mixing ratio (if use ozone climatology data, -!! call getozn()). - - if (Model%ntoz > 0) then ! interactive ozone generation - do k=1,lmk - do i=1,im - olyr(i,k) = max( QMIN, tracer1(i,k,Model%ntoz) ) - enddo - enddo - else ! climatological ozone - call getozn (prslk1, Grid%xlat, IM, LMK, & ! --- inputs - olyr) ! --- outputs - endif ! end_if_ntoz - -!> - Call coszmn(), to compute cosine of zenith angle (only when SW is called) - if (Model%lsswr) then - call coszmn (Grid%xlon,Grid%sinlat, & ! --- inputs - Grid%coslat,Model%solhr, IM, me, & - Radtend%coszen, Radtend%coszdg) ! --- outputs - endif - -!> - Call getgases(), to set up non-prognostic gas volume mixing -!! ratioes (gasvmr). -! - gasvmr(:,:,1) - co2 volume mixing ratio -! - gasvmr(:,:,2) - n2o volume mixing ratio -! - gasvmr(:,:,3) - ch4 volume mixing ratio -! - gasvmr(:,:,4) - o2 volume mixing ratio -! - gasvmr(:,:,5) - co volume mixing ratio -! - gasvmr(:,:,6) - cf11 volume mixing ratio -! - gasvmr(:,:,7) - cf12 volume mixing ratio -! - gasvmr(:,:,8) - cf22 volume mixing ratio -! - gasvmr(:,:,9) - ccl4 volume mixing ratio -! - gasvmr(:,:,10) - cfc113 volumne mixing ratio - -! --- ... set up non-prognostic gas volume mixing ratioes - - call getgases (plvl, Grid%xlon, Grid%xlat, IM, LMK, & ! --- inputs - gasvmr) ! --- outputs - -!CCPP: re-assign gasvmr(:,:,NF_VGAS) to gasvmr_X(:,:) - do k = 1, LMK - do i = 1, IM - gasvmr_co2 (i,k) = gasvmr(i,k,1) - gasvmr_n2o (i,k) = gasvmr(i,k,2) - gasvmr_ch4 (i,k) = gasvmr(i,k,3) - gasvmr_o2 (i,k) = gasvmr(i,k,4) - gasvmr_co (i,k) = gasvmr(i,k,5) - gasvmr_cfc11 (i,k) = gasvmr(i,k,6) - gasvmr_cfc12 (i,k) = gasvmr(i,k,7) - gasvmr_cfc22 (i,k) = gasvmr(i,k,8) - gasvmr_ccl4 (i,k) = gasvmr(i,k,9) - gasvmr_cfc113 (i,k) = gasvmr(i,k,10) - enddo - enddo - -!> - Get temperature at layer interface, and layer moisture. - do k = 2, LMK - do i = 1, IM - tem2da(i,k) = log( plyr(i,k) ) - tem2db(i,k) = log( plvl(i,k) ) - enddo - enddo - - if (ivflip == 0) then ! input data from toa to sfc - do i = 1, IM - tem1d (i) = QME6 - tem2da(i,1) = log( plyr(i,1) ) - tem2db(i,1) = log( max(prsmin, plvl(i,1)) ) - tem2db(i,LMP) = log( plvl(i,LMP) ) - tsfa (i) = tlyr(i,LMK) ! sfc layer air temp - tlvl(i,1) = tlyr(i,1) - tlvl(i,LMP) = tskn(i) - enddo - - do k = 1, LM - k1 = k + kd - do i = 1, IM - qlyr(i,k1) = max( tem1d(i), Statein%qgrs(i,k,1) ) - tem1d(i) = min( QME5, qlyr(i,k1) ) - tvly(i,k1) = Statein%tgrs(i,k) * (1.0 + fvirt*qlyr(i,k1)) ! virtual T (K) - delp(i,k1) = plvl(i,k1+1) - plvl(i,k1) - enddo - enddo - - if ( lextop ) then - do i = 1, IM - qlyr(i,lyb) = qlyr(i,lya) - tvly(i,lyb) = tvly(i,lya) - delp(i,lyb) = plvl(i,lla) - plvl(i,llb) - enddo + + ! Get layer ozone mass mixing ratio + if (Model%ntoz > 0) then + do k=1,lmk + do i=1,im + olyr(i,k) = max( QMIN, tracer1(i,k,Model%ntoz) ) + enddo + enddo + ! Use climatological ozone data + else + call getozn (prslk1, Grid%xlat, IM, LMK, olyr) endif - do k = 2, LMK - do i = 1, IM - tlvl(i,k) = tlyr(i,k) + (tlyr(i,k-1) - tlyr(i,k)) & - & * (tem2db(i,k) - tem2da(i,k)) & - & / (tem2da(i,k-1) - tem2da(i,k)) - enddo - enddo - -! --- ... level height and layer thickness (km) - - tem0d = 0.001 * rog - do i = 1, IM - do k = 1, LMK - dz(i,k) = tem0d * (tem2db(i,k+1) - tem2db(i,k)) * tvly(i,k) - enddo - -! hz(i,LMP) = 0.0 -! do k = LMK, 1, -1 -! hz(i,k) = hz(i,k+1) + dz(i,k) -! enddo - enddo - - else ! input data from sfc to toa - - do i = 1, IM - tem1d (i) = QME6 - tem2da(i,1) = log( plyr(i,1) ) - tem2db(i,1) = log( plvl(i,1) ) - tem2db(i,LMP) = log( max(prsmin, plvl(i,LMP)) ) - tsfa (i) = tlyr(i,1) ! sfc layer air temp - tlvl(i,1) = tskn(i) - tlvl(i,LMP) = tlyr(i,LMK) - enddo - - do k = LM, 1, -1 - do i = 1, IM - qlyr(i,k) = max( tem1d(i), Statein%qgrs(i,k,1) ) - tem1d(i) = min( QME5, qlyr(i,k) ) - tvly(i,k) = Statein%tgrs(i,k) * (1.0 + fvirt*qlyr(i,k)) ! virtual T (K) - delp(i,k) = plvl(i,k) - plvl(i,k+1) - enddo - enddo - - if ( lextop ) then - do i = 1, IM - qlyr(i,lyb) = qlyr(i,lya) - tvly(i,lyb) = tvly(i,lya) - delp(i,lyb) = plvl(i,lla) - plvl(i,llb) - enddo + ! Compute cosine of zenith angle (only when SW is called) + if (Model%lsswr) then + call coszmn (Grid%xlon, Grid%sinlat, Grid%coslat, Model%solhr, IM, me, & + Radtend%coszen, Radtend%coszdg) endif - do k = 1, LMK-1 - do i = 1, IM - tlvl(i,k+1) = tlyr(i,k) + (tlyr(i,k+1) - tlyr(i,k)) & - & * (tem2db(i,k+1) - tem2da(i,k)) & - & / (tem2da(i,k+1) - tem2da(i,k)) - enddo + ! Call getgases(), to set up non-prognostic gas volume mixing ratios (gasvmr). + ! - gasvmr(:,:,1) - co2 volume mixing ratio + ! - gasvmr(:,:,2) - n2o volume mixing ratio + ! - gasvmr(:,:,3) - ch4 volume mixing ratio + ! - gasvmr(:,:,4) - o2 volume mixing ratio + ! - gasvmr(:,:,5) - co volume mixing ratio + ! - gasvmr(:,:,6) - cf11 volume mixing ratio + ! - gasvmr(:,:,7) - cf12 volume mixing ratio + ! - gasvmr(:,:,8) - cf22 volume mixing ratio + ! - gasvmr(:,:,9) - ccl4 volume mixing ratio + ! - gasvmr(:,:,10) - cfc113 volumne mixing ratio + call getgases (plvl/100., Grid%xlon, Grid%xlat, IM, LMK, gasvmr) + + !CCPP: re-assign gasvmr(:,:,NF_VGAS) to gasvmr_X(:,:) + do k = 1, LMK + do i = 1, IM + gasvmr_co2 (i,k) = gasvmr(i,k,1) + gasvmr_n2o (i,k) = gasvmr(i,k,2) + gasvmr_ch4 (i,k) = gasvmr(i,k,3) + gasvmr_o2 (i,k) = gasvmr(i,k,4) + gasvmr_co (i,k) = gasvmr(i,k,5) + gasvmr_cfc11 (i,k) = gasvmr(i,k,6) + gasvmr_cfc12 (i,k) = gasvmr(i,k,7) + gasvmr_cfc22 (i,k) = gasvmr(i,k,8) + gasvmr_ccl4 (i,k) = gasvmr(i,k,9) + gasvmr_cfc113 (i,k) = gasvmr(i,k,10) + enddo enddo -! --- ... level height and layer thickness (km) - - tem0d = 0.001 * rog - do i = 1, IM - do k = LMK, 1, -1 - dz(i,k) = tem0d * (tem2db(i,k) - tem2db(i,k+1)) * tvly(i,k) - enddo - -! hz(i,1) = 0.0 -! do k = 1, LMP -! hz(i,k+1) = hz(i,k) + dz(i,k) -! enddo + ! Get temperature at layer interface, and layer moisture. + do k = 2, LMK + do i = 1, IM + tem2da(i,k) = log( plyr(i,k) ) + tem2db(i,k) = log( plvl(i,k) ) + enddo enddo - endif ! end_if_ivflip + if (ivflip == 0) then ! input data from toa to sfc + do i = 1, IM + tem1d (i) = QME6 + tem2da(i,1) = log( plyr(i,1) ) + tem2db(i,1) = log( max( kdist_lw%get_press_min(), plvl(i,1)) ) + tem2db(i,LMP) = log( plvl(i,LMP) ) + tsfa (i) = tlyr(i,LMK) ! sfc layer air temp + tlvl(i,1) = tlyr(i,1) + tlvl(i,LMP) = tskn(i) + enddo + do k = 1, LM + k1 = k + kd + do i = 1, IM + qlyr(i,k1) = max( tem1d(i), Statein%qgrs(i,k,1) ) + tem1d(i) = min( QME5, qlyr(i,k1) ) + tvly(i,k1) = Statein%tgrs(i,k) * (1.0 + fvirt*qlyr(i,k1)) ! virtual T (K) + delp(i,k1) = plvl(i,k1+1) - plvl(i,k1) + enddo + enddo -!> - Call module_radiation_aerosols::setaer(),to setup aerosols -!! property profile for radiation. + if ( lextop ) then + do i = 1, IM + qlyr(i,lyb) = qlyr(i,lya) + tvly(i,lyb) = tvly(i,lya) + delp(i,lyb) = plvl(i,lla) - plvl(i,llb) + enddo + endif -!check print *,' in grrad : calling setaer ' + do k = 2, LMK + do i = 1, IM + tlvl(i,k) = tlyr(i,k) + (tlyr(i,k-1) - tlyr(i,k)) * (tem2db(i,k) - tem2da(i,k)) / & + (tem2da(i,k-1) - tem2da(i,k)) + enddo + enddo - call setaer (plvl, plyr, prslk1, tvly, rhly, Sfcprop%slmsk, & ! --- inputs - tracer1, Grid%xlon, Grid%xlat, IM, LMK, LMP, & - Model%lsswr, Model%lslwr, & - faersw, faerlw, aerodp) ! --- outputs + ! Comput lvel height and layer thickness (km) + tem0d = 0.001 * rog + do i = 1, IM + do k = 1, LMK + dz(i,k) = tem0d * (tem2db(i,k+1) - tem2db(i,k)) * tvly(i,k) + enddo + enddo + else ! input data from sfc to toa + do i = 1, IM + tem1d (i) = QME6 + tem2da(i,1) = log( plyr(i,1) ) + tem2db(i,1) = log( plvl(i,1) ) + tem2db(i,LMP) = log( max( kdist_lw%get_press_min(), plvl(i,LMP)) ) + tsfa (i) = tlyr(i,1) ! sfc layer air temp + tlvl(i,1) = tskn(i) + tlvl(i,LMP) = tlyr(i,LMK) + enddo + + do k = LM, 1, -1 + do i = 1, IM + qlyr(i,k) = max( tem1d(i), Statein%qgrs(i,k,1) ) + tem1d(i) = min( QME5, qlyr(i,k) ) + tvly(i,k) = Statein%tgrs(i,k) * (1.0 + fvirt*qlyr(i,k)) ! virtual T (K) + delp(i,k) = plvl(i,k) - plvl(i,k+1) + enddo + enddo + + if ( lextop ) then + do i = 1, IM + qlyr(i,lyb) = qlyr(i,lya) + tvly(i,lyb) = tvly(i,lya) + delp(i,lyb) = plvl(i,lla) - plvl(i,llb) + enddo + endif + + do k = 1, LMK-1 + do i = 1, IM + tlvl(i,k+1) = tlyr(i,k) + (tlyr(i,k+1) - tlyr(i,k)) * (tem2db(i,k+1) - tem2da(i,k)) / & + (tem2da(i,k+1) - tem2da(i,k)) + enddo + enddo - ! For RRTMGP SW the bands are now ordered from [IR(band) -> nIR -> UV], in RRTMG the - ! band ordering was [nIR -> UV -> IR(band)] - faersw1(1:IM,1:LMK,1) = faersw(1:IM,1:LMK,NBDSW,1) - faersw2(1:IM,1:LMK,1) = faersw(1:IM,1:LMK,NBDSW,2) - faersw3(1:IM,1:LMK,1) = faersw(1:IM,1:LMK,NBDSW,3) - do j = 2,NBDSW - do k = 1, LMK - do i = 1, IM - faersw1(i,k,j) = faersw(i,k,j-1,1) - faersw2(i,k,j) = faersw(i,k,j-1,2) - faersw3(i,k,j) = faersw(i,k,j-1,3) - enddo + ! Compute level height and layer thickness (km) + tem0d = 0.001 * rog + do i = 1, IM + do k = LMK, 1, -1 + dz(i,k) = tem0d * (tem2db(i,k) - tem2db(i,k+1)) * tvly(i,k) + enddo + enddo + endif ! end_if_ivflip + + ! Call module_radiation_aerosols::setaer(),to setup aerosols property profile for radiation. + call setaer (plvl, plyr, prslk1, tvly, rhly, Sfcprop%slmsk, tracer1, Grid%xlon, & + Grid%xlat, IM, LMK, LMP, Model%lsswr, Model%lslwr, faersw, faerlw, aerodp) + + + ! For RRTMGP SW the bands are now ordered from [IR(band) -> nIR -> UV], in RRTMG the + ! band ordering was [nIR -> UV -> IR(band)] + faersw1(1:IM,1:LMK,1) = faersw(1:IM,1:LMK,NBDSW,1) + faersw2(1:IM,1:LMK,1) = faersw(1:IM,1:LMK,NBDSW,2) + faersw3(1:IM,1:LMK,1) = faersw(1:IM,1:LMK,NBDSW,3) + do j = 2,NBDSW + do k = 1, LMK + do i = 1, IM + faersw1(i,k,j) = faersw(i,k,j-1,1) + faersw2(i,k,j) = faersw(i,k,j-1,2) + faersw3(i,k,j) = faersw(i,k,j-1,3) + enddo + enddo enddo - enddo - - do j = 1,NBDLW - do k = 1, LMK - do i = 1, IM - ! NF_AELW = 3 - faerlw1(i,k,j) = faerlw(i,k,j,1) - faerlw2(i,k,j) = faerlw(i,k,j,2) - faerlw3(i,k,j) = faerlw(i,k,j,3) - enddo + + do j = 1,NBDLW + do k = 1, LMK + do i = 1, IM + faerlw1(i,k,j) = faerlw(i,k,j,1) + faerlw2(i,k,j) = faerlw(i,k,j,2) + faerlw3(i,k,j) = faerlw(i,k,j,3) + enddo + enddo enddo - enddo - -!> - Obtain cloud information for radiation calculations -!! (clouds,cldsa,mtopa,mbota) -!!\n for prognostic cloud: -!! - For Zhao/Moorthi's prognostic cloud scheme, -!! call module_radiation_clouds::progcld1() -!! - For Zhao/Moorthi's prognostic cloud+pdfcld, -!! call module_radiation_clouds::progcld3() -!! call module_radiation_clouds::progclduni() for unified cloud and ncld=2 - -! --- ... obtain cloud information for radiation calculations - - write(58,*) "NCND: ",Model%ncnd -! if (ntcw > 0) then ! prognostic cloud schemes + + ! Obtain cloud information for radiation calculations + ! (clouds,cldsa,mtopa,mbota) + ! for prognostic cloud: + ! - For Zhao/Moorthi's prognostic cloud scheme, + ! call module_radiation_clouds::progcld1() + ! - For Zhao/Moorthi's prognostic cloud+pdfcld, + ! call module_radiation_clouds::progcld3() + ! call module_radiation_clouds::progclduni() for unified cloud and ncld=2 ccnd = 0.0_kind_phys - if (Model%ncnd == 1) then ! Zhao_Carr_Sundqvist - do k=1,LMK - do i=1,IM - ccnd(i,k,1) = tracer1(i,k,ntcw) ! liquid water/ice - enddo - enddo - elseif (Model%ncnd == 2) then ! MG - do k=1,LMK - do i=1,IM - ccnd(i,k,1) = tracer1(i,k,ntcw) ! liquid water - ccnd(i,k,2) = tracer1(i,k,ntiw) ! ice water - enddo - enddo - elseif (Model%ncnd == 4) then ! MG2 - do k=1,LMK - do i=1,IM - ccnd(i,k,1) = tracer1(i,k,ntcw) ! liquid water - ccnd(i,k,2) = tracer1(i,k,ntiw) ! ice water - ccnd(i,k,3) = tracer1(i,k,ntrw) ! rain water - ccnd(i,k,4) = tracer1(i,k,ntsw) ! snow water - enddo - enddo - elseif (Model%ncnd == 5) then ! GFDL MP, Thompson, MG3 - do k=1,LMK - do i=1,IM - ccnd(i,k,1) = tracer1(i,k,ntcw) ! liquid water - ccnd(i,k,2) = tracer1(i,k,ntiw) ! ice water - ccnd(i,k,3) = tracer1(i,k,ntrw) ! rain water - ccnd(i,k,4) = tracer1(i,k,ntsw) + tracer1(i,k,ntgl) ! snow + grapuel - enddo - enddo + if (Model%ncnd == 1) then ! Zhao_Carr_Sundqvist + do k=1,LMK + do i=1,IM + ccnd(i,k,1) = tracer1(i,k,ntcw) ! liquid water/ice + enddo + enddo + elseif (Model%ncnd == 2) then ! MG + do k=1,LMK + do i=1,IM + ccnd(i,k,1) = tracer1(i,k,ntcw) ! liquid water + ccnd(i,k,2) = tracer1(i,k,ntiw) ! ice water + enddo + enddo + elseif (Model%ncnd == 4) then ! MG2 + do k=1,LMK + do i=1,IM + ccnd(i,k,1) = tracer1(i,k,ntcw) ! liquid water + ccnd(i,k,2) = tracer1(i,k,ntiw) ! ice water + ccnd(i,k,3) = tracer1(i,k,ntrw) ! rain water + ccnd(i,k,4) = tracer1(i,k,ntsw) ! snow water + enddo + enddo + elseif (Model%ncnd == 5) then ! GFDL MP, Thompson, MG3 + do k=1,LMK + do i=1,IM + ccnd(i,k,1) = tracer1(i,k,ntcw) ! liquid water + ccnd(i,k,2) = tracer1(i,k,ntiw) ! ice water + ccnd(i,k,3) = tracer1(i,k,ntrw) ! rain water + ccnd(i,k,4) = tracer1(i,k,ntsw) + tracer1(i,k,ntgl) ! snow + grapuel + enddo + enddo endif do n=1,Model%ncnd - do k=1,LMK - do i=1,IM - if (ccnd(i,k,n) < epsq) ccnd(i,k,n) = 0.0 - enddo - enddo + do k=1,LMK + do i=1,IM + if (ccnd(i,k,n) < epsq) ccnd(i,k,n) = 0.0 + enddo + enddo enddo if (Model%imp_physics == 11 ) then - if (.not. Model%lgfdlmprad) then - - -! rsun the summation methods and order make the difference in calculation - -! clw(:,:) = clw(:,:) + tracer1(:,1:LMK,Model%ntcw) & -! + tracer1(:,1:LMK,Model%ntiw) & -! + tracer1(:,1:LMK,Model%ntrw) & -! + tracer1(:,1:LMK,Model%ntsw) & -! + tracer1(:,1:LMK,Model%ntgl) - ccnd(:,:,1) = tracer1(:,1:LMK,ntcw) - ccnd(:,:,1) = ccnd(:,:,1) + tracer1(:,1:LMK,ntrw) - ccnd(:,:,1) = ccnd(:,:,1) + tracer1(:,1:LMK,ntiw) - ccnd(:,:,1) = ccnd(:,:,1) + tracer1(:,1:LMK,ntsw) - ccnd(:,:,1) = ccnd(:,:,1) + tracer1(:,1:LMK,ntgl) - -! else -! do j=1,Model%ncld -! ccnd(:,:,1) = ccnd(:,:,1) + tracer1(:,1:LMK,ntcw+j-1) ! cloud condensate amount -! enddo - endif - do k=1,LMK - do i=1,IM - if (ccnd(i,k,1) < EPSQ ) ccnd(i,k,1) = 0.0 - enddo - enddo + if (.not. Model%lgfdlmprad) then + ccnd(:,:,1) = tracer1(:,1:LMK,ntcw) + ccnd(:,:,1) = ccnd(:,:,1) + tracer1(:,1:LMK,ntrw) + ccnd(:,:,1) = ccnd(:,:,1) + tracer1(:,1:LMK,ntiw) + ccnd(:,:,1) = ccnd(:,:,1) + tracer1(:,1:LMK,ntsw) + ccnd(:,:,1) = ccnd(:,:,1) + tracer1(:,1:LMK,ntgl) + endif + do k=1,LMK + do i=1,IM + if (ccnd(i,k,1) < EPSQ ) ccnd(i,k,1) = 0.0 + enddo + enddo endif -! - -! -! --- add suspended convective cloud water to grid-scale cloud water -! only for cloud fraction & radiation computation -! it is to enhance cloudiness due to suspended convec cloud water -! for zhao/moorthi's (imp_phys=99) & -! ferrier's (imp_phys=5) microphysics schemes + ! Add suspended convective cloud water to grid-scale cloud water + ! only for cloud fraction & radiation computation it is to enhance + ! cloudiness due to suspended convec cloud water for zhao/moorthi's + ! (imp_phys=99) & ferrier's (imp_phys=5) microphysics schemes if ((Model%num_p3d == 4) .and. (Model%npdf3d == 3)) then ! same as Model%imp_physics = 99 - do k=1,lm - k1 = k + kd - do i=1,im - deltaq(i,k1) = Tbd%phy_f3d(i,k,5) - cnvw (i,k1) = Tbd%phy_f3d(i,k,6) - cnvc (i,k1) = Tbd%phy_f3d(i,k,7) - enddo - enddo + do k=1,lm + k1 = k + kd + do i=1,im + deltaq(i,k1) = Tbd%phy_f3d(i,k,5) + cnvw (i,k1) = Tbd%phy_f3d(i,k,6) + cnvc (i,k1) = Tbd%phy_f3d(i,k,7) + enddo + enddo elseif ((Model%npdf3d == 0) .and. (Model%ncnvcld3d == 1)) then ! same as MOdel%imp_physics=98 - do k=1,lm - k1 = k + kd - do i=1,im - deltaq(i,k1) = 0.0 - cnvw (i,k1) = Tbd%phy_f3d(i,k,Model%num_p3d+1) - cnvc (i,k1) = 0.0 - enddo - enddo + do k=1,lm + k1 = k + kd + do i=1,im + deltaq(i,k1) = 0.0 + cnvw (i,k1) = Tbd%phy_f3d(i,k,Model%num_p3d+1) + cnvc (i,k1) = 0.0 + enddo + enddo else ! all the rest - do k=1,lmk - do i=1,im - deltaq(i,k) = 0.0 - cnvw (i,k) = 0.0 - cnvc (i,k) = 0.0 - enddo - enddo + do k=1,lmk + do i=1,im + deltaq(i,k) = 0.0 + cnvw (i,k) = 0.0 + cnvc (i,k) = 0.0 + enddo + enddo endif - + if (lextop) then - do i=1,im - cldcov(i,lyb) = cldcov(i,lya) - deltaq(i,lyb) = deltaq(i,lya) - cnvw (i,lyb) = cnvw (i,lya) - cnvc (i,lyb) = cnvc (i,lya) - enddo - if (Model%effr_in) then - do i=1,im - effrl(i,lyb) = effrl(i,lya) - effri(i,lyb) = effri(i,lya) - effrr(i,lyb) = effrr(i,lya) - effrs(i,lyb) = effrs(i,lya) - enddo - endif + do i=1,im + cldcov(i,lyb) = cldcov(i,lya) + deltaq(i,lyb) = deltaq(i,lya) + cnvw (i,lyb) = cnvw (i,lya) + cnvc (i,lyb) = cnvc (i,lya) + enddo + if (Model%effr_in) then + do i=1,im + effrl(i,lyb) = effrl(i,lya) + effri(i,lyb) = effri(i,lya) + effrr(i,lyb) = effrr(i,lya) + effrs(i,lyb) = effrs(i,lya) + enddo + endif endif - + if (Model%imp_physics == 99) then - ccnd(1:IM,1:LMK,1) = ccnd(1:IM,1:LMK,1) + cnvw(1:IM,1:LMK) + ccnd(1:IM,1:LMK,1) = ccnd(1:IM,1:LMK,1) + cnvw(1:IM,1:LMK) endif - + if (Model%imp_physics == 10) then - ccnd(1:IM,1:LMK,1) = ccnd(1:IM,1:LMK,1) + cnvw(1:IM,1:LMK) + ccnd(1:IM,1:LMK,2) + ccnd(1:IM,1:LMK,1) = ccnd(1:IM,1:LMK,1) + cnvw(1:IM,1:LMK) + ccnd(1:IM,1:LMK,2) endif -! DJS2019: START + ! DJS2019: START ! Compute layer cloud fraction. clwmin = 0.0 cldcov(:,:) = 0.0 if (.not. Model%lmfshal) then - do k = 1, LMK - do i = 1, IM - clwt = 1.0e-6 * (plyr(i,k)*0.001) - if (ccnd(i,k,1) > 0.) then - onemrh= max( 1.e-10, 1.0-rhly(i,k) ) - clwm = clwmin / max( 0.01, plyr(i,k)*0.001 ) - tem1 = min(max(sqrt(sqrt(onemrh*qstl(i,k))),0.0001),1.0) - tem1 = 2000.0 / tem1 - value = max( min( tem1*(ccnd(i,k,1)-clwm), 50.0 ), 0.0 ) - tem2 = sqrt( sqrt(rhly(i,k)) ) - cldcov(i,k) = max( tem2*(1.0-exp(-value)), 0.0 ) - endif - enddo - enddo - else - do k = 1, LMK - do i = 1, IM - clwt = 1.0e-6 * (plyr(i,k)*0.001) - if (ccnd(i,k,1) .gt. 0) then - onemrh= max( 1.e-10, 1.0-rhly(i,k) ) - clwm = clwmin / max( 0.01, plyr(i,k)*0.001 ) - tem1 = min(max((onemrh*qstl(i,k))**0.49,0.0001),1.0) !jhan - if (Model%lmfdeep2) then - tem1 = xrc3 / tem1 - else - tem1 = 100.0 / tem1 - endif - value = max( min( tem1*(ccnd(i,k,1)-clwm), 50.0 ), 0.0 ) - tem2 = sqrt( sqrt(rhly(i,k)) ) - cldcov(i,k) = max( tem2*(1.0-exp(-value)), 0.0 ) - endif - enddo - enddo - endif -! DJS2019: END + do k = 1, LMK + do i = 1, IM + clwt = 1.0e-6 * (plyr(i,k)*0.1) + if (ccnd(i,k,1) > 0.) then + onemrh= max( 1.e-10, 1.0-rhly(i,k) ) + clwm = clwmin / max( 0.01, plyr(i,k)*0.1 ) + tem1 = min(max(sqrt(sqrt(onemrh*qstl(i,k))),0.0001),1.0) + tem1 = 2000.0 / tem1 + value = max( min( tem1*(ccnd(i,k,1)-clwm), 50.0 ), 0.0 ) + tem2 = sqrt( sqrt(rhly(i,k)) ) + cldcov(i,k) = max( tem2*(1.0-exp(-value)), 0.0 ) + endif + enddo + enddo + else + do k = 1, LMK + do i = 1, IM + clwt = 1.0e-6 * (plyr(i,k)*0.1) + if (ccnd(i,k,1) .gt. 0) then + onemrh= max( 1.e-10, 1.0-rhly(i,k) ) + clwm = clwmin / max( 0.01, plyr(i,k)*0.1 ) + tem1 = min(max((onemrh*qstl(i,k))**0.49,0.0001),1.0) !jhan + if (Model%lmfdeep2) then + tem1 = xrc3 / tem1 + else + tem1 = 100.0 / tem1 + endif + value = max( min( tem1*(ccnd(i,k,1)-clwm), 50.0 ), 0.0 ) + tem2 = sqrt( sqrt(rhly(i,k)) ) + cldcov(i,k) = max( tem2*(1.0-exp(-value)), 0.0 ) + endif + enddo + enddo + endif + ! DJS2019: END if (Model%uni_cld) then - if (Model%effr_in) then - do k=1,lm - k1 = k + kd - do i=1,im - cldcov(i,k1) = Tbd%phy_f3d(i,k,Model%indcld) - effrl(i,k1) = Tbd%phy_f3d(i,k,2) - effri(i,k1) = Tbd%phy_f3d(i,k,3) - effrr(i,k1) = Tbd%phy_f3d(i,k,4) - effrs(i,k1) = Tbd%phy_f3d(i,k,5) + if (Model%effr_in) then + do k=1,lm + k1 = k + kd + do i=1,im + cldcov(i,k1) = Tbd%phy_f3d(i,k,Model%indcld) + effrl(i,k1) = Tbd%phy_f3d(i,k,2) + effri(i,k1) = Tbd%phy_f3d(i,k,3) + effrr(i,k1) = Tbd%phy_f3d(i,k,4) + effrs(i,k1) = Tbd%phy_f3d(i,k,5) + enddo enddo - enddo - else - do k=1,lm - k1 = k + kd - do i=1,im - !cldcov(i,k1) = Tbd%phy_f3d(i,k,Model%indcld) - !if (tracer1(i,k,ntcw) .gt. 0 .or. tracer1(i,k,ntiw) .gt. 0) then - ! cldcov(i,k1) = 0.1 - !else - ! cldcov(i,k1) = 0.0 - !endif + else + do k=1,lm + k1 = k + kd + do i=1,im + !cldcov(i,k1) = Tbd%phy_f3d(i,k,Model%indcld) + !if (tracer1(i,k,ntcw) .gt. 0 .or. tracer1(i,k,ntiw) .gt. 0) then + ! cldcov(i,k1) = 0.1 + !else + ! cldcov(i,k1) = 0.0 + !endif + enddo enddo - enddo - endif + endif elseif (Model%imp_physics == Model%imp_physics_gfdl) then ! GFDL MP cldcov(1:IM,1+kd:LM+kd) = tracer1(1:IM,1:LM,Model%ntclamt) else ! neither of the other two cases - ! cldcov = 0.0 + ! cldcov = 0.0 endif - write(58,*) "Model%imp_physics: ",Model%imp_physics - write(58,*) "Model%uni_cld: ",Model%uni_cld - write(58,*) "Model%ncld: ",Model%ncld - write(58,*) "Model%lgfdlmprad: ",Model%lgfdlmprad - write(58,*) "Model%lmfshal: ",Model%lmfshal - write(58,*) "Model%lmfdeep2: ",Model%lmfdeep2 + ! MICROPHYSICS + ! *) zhao/moorthi's prognostic cloud scheme or unified cloud and/or with MG microphysics + if (Model%imp_physics == 99 .or. Model%imp_physics == 10) then + if (Model%uni_cld .and. Model%ncld >= 2) then + call progclduni (plyr/100., plvl/100., tlyr, tvly, ccnd, Model%ncnd, & ! IN + Grid%xlat, Grid%xlon, Sfcprop%slmsk, dz, delp/100.,IM, & ! IN + LMK, LMP, cldcov, effrl, effri, effrr, effrs, Model%effr_in, & ! IN + clouds, cldsa, mtopa, mbota, de_lgth) ! OUT + else + call progcld1 (plyr/100. ,plvl/100., tlyr, tvly, qlyr, qstl, rhly, & ! IN + ccnd(1:IM,1:LMK,1), Grid%xlat,Grid%xlon,Sfcprop%slmsk, dz, & ! IN + delp/100., IM, LMK, LMP, Model%uni_cld, Model%lmfshal, & ! IN + Model%lmfdeep2, cldcov, effrl, effri, effrr, effrs, & ! IN + Model%effr_in, & ! IN + clouds, cldsa, mtopa, mbota, de_lgth) ! OUT + endif + ! *) zhao/moorthi's prognostic cloud+pdfcld + elseif(Model%imp_physics == 98) then + call progcld3 (plyr/100., plvl/100., tlyr, tvly, qlyr, qstl, rhly, & ! IN + ccnd(1:IM,1:LMK,1), cnvw, cnvc, Grid%xlat, Grid%xlon, & ! IN + Sfcprop%slmsk, dz, delp/100., im, lmk, lmp, deltaq, Model%sup, & ! IN + Model%kdt, me, & ! IN + clouds, cldsa, mtopa, mbota, de_lgth) ! OUT + ! *) GFDL cloud scheme + elseif (Model%imp_physics == 11) then + if (.not.Model%lgfdlmprad) then + call progcld4 (plyr/100., plvl/100., tlyr, tvly, qlyr, qstl, rhly, & ! IN + ccnd(1:IM,1:LMK,1), cnvw, cnvc,Grid%xlat, Grid%xlon, & ! IN + Sfcprop%slmsk, cldcov, dz, delp/100., im, lmk, lmp, & ! IN + clouds, cldsa, mtopa, mbota, de_lgth) ! OUT + else + call progclduni (plyr/100., plvl/100., tlyr, tvly, ccnd, Model%ncnd, & ! IN + Grid%xlat, Grid%xlon, Sfcprop%slmsk, dz,delp/100., IM, LMK, & ! IN + LMP, cldcov, effrl, effri, effrr, effrs, Model%effr_in, & ! IN + clouds, cldsa, mtopa, mbota, de_lgth) ! OUT + endif + ! *) Thompson / WSM6 cloud micrphysics scheme + elseif(Model%imp_physics == 8 .or. Model%imp_physics == 6) then + if (Model%kdt == 1) then + Tbd%phy_f3d(:,:,1) = 10. + Tbd%phy_f3d(:,:,2) = 50. + Tbd%phy_f3d(:,:,3) = 250. + endif + + call progcld5 (plyr/100., plvl/100., tlyr, qlyr, qstl, rhly, tracer1, Grid%xlat, & ! IN + Grid%xlon,Sfcprop%slmsk,dz,delp/100., ntrac-1, ntcw-1, ntiw-1, & ! IN + ntrw-1, ntsw-1, ntgl-1, im, lmk, lmp, Model%uni_cld, Model%lmfshal,& ! IN + Model%lmfdeep2, cldcov(:,1:LMK),Tbd%phy_f3d(:,:,1), & ! IN + Tbd%phy_f3d(:,:,2), Tbd%phy_f3d(:,:,3), & ! IN + clouds,cldsa,mtopa,mbota, de_lgth) ! OUT + endif ! end if_imp_physics + + ! CCPP do k = 1, LMK do i = 1, IM - write(58,'(a19,2i8,f10.2)') " Cloud-cover: ",k,i,cldcov(i,k) - end do + clouds1(i,k) = clouds(i,k,1) + clouds2(i,k) = clouds(i,k,2) + clouds3(i,k) = clouds(i,k,3) + clouds4(i,k) = clouds(i,k,4) + clouds5(i,k) = clouds(i,k,5) + clouds6(i,k) = clouds(i,k,6) + clouds7(i,k) = clouds(i,k,7) + clouds8(i,k) = clouds(i,k,8) + clouds9(i,k) = clouds(i,k,9) + enddo enddo - if (Model%imp_physics == 99 .or. Model%imp_physics == 10) then ! zhao/moorthi's prognostic cloud scheme - ! or unified cloud and/or with MG microphysics - - if (Model%uni_cld .and. Model%ncld >= 2) then - call progclduni (plyr, plvl, tlyr, tvly, ccnd, Model%ncnd, & ! --- inputs - Grid%xlat, Grid%xlon, Sfcprop%slmsk,dz,delp, & - IM, LMK, LMP, cldcov, & - effrl, effri, effrr, effrs, Model%effr_in, & - clouds, cldsa, mtopa, mbota, de_lgth) ! --- outputs - else - call progcld1 (plyr ,plvl, tlyr, tvly, qlyr, qstl, rhly, & ! --- inputs - ccnd(1:IM,1:LMK,1), Grid%xlat,Grid%xlon, & - Sfcprop%slmsk, dz, delp, IM, LMK, LMP, & - Model%uni_cld, Model%lmfshal, & - Model%lmfdeep2, cldcov, & - effrl, effri, effrr, effrs, Model%effr_in, & - clouds, cldsa, mtopa, mbota, de_lgth) ! --- outputs - endif - - elseif(Model%imp_physics == 98) then ! zhao/moorthi's prognostic cloud+pdfcld - - call progcld3 (plyr, plvl, tlyr, tvly, qlyr, qstl, rhly, & ! --- inputs - ccnd(1:IM,1:LMK,1), & - cnvw, cnvc, Grid%xlat, Grid%xlon, & - Sfcprop%slmsk, dz, delp, im, lmk, lmp, deltaq, & - Model%sup, Model%kdt, me, & - clouds, cldsa, mtopa, mbota, de_lgth) ! --- outputs - - elseif (Model%imp_physics == 11) then ! GFDL cloud scheme - - if (.not.Model%lgfdlmprad) then - call progcld4 (plyr, plvl, tlyr, tvly, qlyr, qstl, rhly, & ! --- inputs - ccnd(1:IM,1:LMK,1), cnvw, cnvc, & - Grid%xlat, Grid%xlon, Sfcprop%slmsk, & - cldcov, dz, delp, im, lmk, lmp, & - clouds, cldsa, mtopa, mbota, de_lgth) ! --- outputs - else - - call progclduni (plyr, plvl, tlyr, tvly, ccnd, Model%ncnd, & ! --- inputs - Grid%xlat, Grid%xlon, Sfcprop%slmsk, dz,delp, & - IM, LMK, LMP, cldcov, & - effrl, effri, effrr, effrs, Model%effr_in, & - clouds, cldsa, mtopa, mbota, de_lgth) ! --- outputs -! call progcld4o (plyr, plvl, tlyr, tvly, qlyr, qstl, rhly, & ! --- inputs -! tracer1, Grid%xlat, Grid%xlon, Sfcprop%slmsk, & -! dz, delp, & -! ntrac-1, Model%ntcw-1,Model%ntiw-1,Model%ntrw-1,& -! Model%ntsw-1,Model%ntgl-1,Model%ntclamt-1, & -! im, lmk, lmp, & -! clouds, cldsa, mtopa, mbota, de_lgth) ! --- outputs - endif - - elseif(Model%imp_physics == 8 .or. Model%imp_physics == 6) then ! Thompson / WSM6 cloud micrphysics scheme - - if (Model%kdt == 1) then - Tbd%phy_f3d(:,:,1) = 10. - Tbd%phy_f3d(:,:,2) = 50. - Tbd%phy_f3d(:,:,3) = 250. - endif - - call progcld5 (plyr,plvl,tlyr,qlyr,qstl,rhly,tracer1, & ! --- inputs - Grid%xlat,Grid%xlon,Sfcprop%slmsk,dz,delp, & - ntrac-1, ntcw-1,ntiw-1,ntrw-1, & - ntsw-1,ntgl-1, & - im, lmk, lmp, Model%uni_cld, & - Model%lmfshal,Model%lmfdeep2, & - cldcov(:,1:LMK),Tbd%phy_f3d(:,:,1), & - Tbd%phy_f3d(:,:,2), Tbd%phy_f3d(:,:,3), & - clouds,cldsa,mtopa,mbota, de_lgth) ! --- outputs - - endif ! end if_imp_physics - -! endif ! end_if_ntcw - -! CCPP - do k = 1, LMK - do i = 1, IM - clouds1(i,k) = clouds(i,k,1) - clouds2(i,k) = clouds(i,k,2) - clouds3(i,k) = clouds(i,k,3) - clouds4(i,k) = clouds(i,k,4) - clouds5(i,k) = clouds(i,k,5) - clouds6(i,k) = clouds(i,k,6) - clouds7(i,k) = clouds(i,k,7) - clouds8(i,k) = clouds(i,k,8) - clouds9(i,k) = clouds(i,k,9) - enddo - enddo - - write(58,*) "#" - do k=1,Model%levr+LTP - write(58,"(5F15.8)") plyr(1,k),tlyr(1,k),clouds2(1,k), & - & clouds4(1,k), clouds1(1,k) - enddo - - -! mg, sfc-perts -! --- scale random patterns for surface perturbations with -! perturbation size -! --- turn vegetation fraction pattern into percentile pattern - alb1d(:) = 0. - if (Model%do_sfcperts) then - if (Model%pertalb(1) > 0.) then - do i=1,im - call cdfnor(Coupling%sfc_wts(i,5),alb1d(i)) - enddo + ! mg, sfc-perts + ! --- scale random patterns for surface perturbations with + ! perturbation size + ! --- turn vegetation fraction pattern into percentile pattern + alb1d(:) = 0. + if (Model%do_sfcperts) then + if (Model%pertalb(1) > 0.) then + do i=1,im + call cdfnor(Coupling%sfc_wts(i,5),alb1d(i)) + enddo + endif endif - endif -! mg, sfc-perts + ! mg, sfc-perts end subroutine GFS_rrtmgp_pre_run diff --git a/physics/rrtmgp_lw_main.F90 b/physics/rrtmgp_lw_main.F90 index 30f0485ee..805041008 100644 --- a/physics/rrtmgp_lw_main.F90 +++ b/physics/rrtmgp_lw_main.F90 @@ -872,7 +872,7 @@ subroutine rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr real(kind_phys), dimension(nBandsLW,ncol) :: & semiss real(kind_phys), dimension(ncol,nlay+1),target :: & - flux_up_allSky, flux_up_clrSky, flux_dn_allSky, flux_dn_clrSky, p_lev2 + flux_up_allSky, flux_up_clrSky, flux_dn_allSky, flux_dn_clrSky real(kind_phys), dimension(ncol,nlay+1,nBandsLW),target :: & fluxBB_up_allSky, fluxBB_dn_allSky real(kind_phys), dimension(ncol,nlay) :: & @@ -953,11 +953,6 @@ subroutine rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr iTOA = nlay+1 endif - ! Input model-level pressure @ the top-of-model is set to 1Pa, whereas RRTMGP minimum - ! pressure needs to be slightly greater than that, ~1.00518Pa - p_lev2 = p_lev - p_lev2(:,iTOA) = kdist_lw%get_press_min()/100._kind_phys - ! Change random number seed value for each radiation invocation (isubclw =1 or 2). if(isubclw == 1) then ! advance prescribed permutation seed do iCol = 1, ncol @@ -1035,8 +1030,8 @@ subroutine rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr ! from pressures, temperatures, and gas concentrations... print*,'Clear-Sky(LW): Optics' call check_error_msg(kdist_lw%gas_optics( & - p_lay(1:ncol,1:nlay)*100., & - p_lev2(1:ncol,1:nlay+1)*100., & + p_lay(1:ncol,1:nlay), & + p_lev(1:ncol,1:nlay+1), & t_lay(1:ncol,1:nlay), & skt(1:ncol), & gas_concs_lw, & @@ -1064,7 +1059,7 @@ subroutine rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr call check_error_msg(compute_heating_rate( & fluxClrSky%flux_up, & fluxClrSky%flux_dn, & - p_lev2(1:ncol,1:nlay+1)*100., & + p_lev(1:ncol,1:nlay+1), & thetaTendClrSky)) endif @@ -1152,14 +1147,14 @@ subroutine rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr call check_error_msg(compute_heating_rate( & fluxAllSky%bnd_flux_up(:,:,iBand), & fluxAllSky%bnd_flux_dn(:,:,iBand), & - p_lev(1:ncol,1:nlay+1)*100., & + p_lev(1:ncol,1:nlay+1), & thetaTendByBandAllSky(:,:,iBand))) enddo else call check_error_msg(compute_heating_rate( & fluxAllSky%flux_up, & fluxAllSky%flux_dn, & - p_lev(1:ncol,1:nlay+1)*100., & + p_lev(1:ncol,1:nlay+1), & thetaTendAllSky)) endif @@ -1167,7 +1162,7 @@ subroutine rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr write(60,*) "#" write(61,*) "#" do iLay=1,nLay - write(59,"(9F10.3)") p_lay(1,iLay)*100.,t_lay(1,iLay),cld_lwp(1,iLay),cld_iwp(1,iLay),& + write(59,"(9F10.3)") p_lay(1,iLay),t_lay(1,iLay),cld_lwp(1,iLay),cld_iwp(1,iLay),& cldfrac(1,iLay),sum(fluxClrSky%flux_up(1,iLay:iLay+1))/2.,& sum(fluxClrSky%flux_dn(1,iLay:iLay+1))/2.,sum(fluxAllSky%flux_up(1,iLay:iLay+1))/2.,& sum(fluxAllSky%flux_dn(1,iLay:iLay+1))/2. diff --git a/physics/rrtmgp_sw_main.F90 b/physics/rrtmgp_sw_main.F90 index fc882820d..468602455 100644 --- a/physics/rrtmgp_sw_main.F90 +++ b/physics/rrtmgp_sw_main.F90 @@ -916,7 +916,7 @@ subroutine rrtmgp_sw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr real(kind_phys), dimension(nday,nlay) :: cld_lwp2,thetaTendClrSky, & thetaTendAllSky real(kind_phys), dimension(nday,nlay+1),target :: & - flux_up_allSky, flux_up_clrSky, flux_dn_allSky, flux_dn_clrSky, p_lev2 + flux_up_allSky, flux_up_clrSky, flux_dn_allSky, flux_dn_clrSky real(kind_phys), dimension(nday,nlay+1,nBandsSW),target :: & fluxBB_up_allSky, fluxBB_dn_allSky real(kind_phys), dimension(nday,nGptsSW) :: toa_flux @@ -1011,11 +1011,6 @@ subroutine rrtmgp_sw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr tem0 = (1. - vmr_h2o)*amd + vmr_h2o*amw coldry = ( 1.0e-20 * 1.0e3 *avogad)*delpin / (100.*grav*tem0*(1. + vmr_h2o)) - ! Input model-level pressure @ the top-of-model is set to 1Pa, whereas RRTMGP minimum - ! pressure needs to be slightly greater than that, ~1.00518Pa - p_lev2=p_lev - p_lev2(:,iTOA) = kdist_sw%get_press_min()/100. - ! Compute fractions of clear sky view at surface. *NOTE* This is only used if cloud radiative ! properties are provided directly. clrfracSFC = 1._kind_phys @@ -1106,8 +1101,8 @@ subroutine rrtmgp_sw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr ! from pressures, temperatures, and gas concentrations... print*,'Clear-Sky(SW): Optics' call check_error_msg(kdist_sw%gas_optics( & - p_lay(idxday,1:nlay)*100., & - p_lev2(idxday,1:nlay+1)*100., & + p_lay(idxday,1:nlay), & + p_lev(idxday,1:nlay+1), & t_lay(idxday,1:nlay), & gas_concs_sw, & optical_props_clr, & @@ -1133,7 +1128,7 @@ subroutine rrtmgp_sw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr call check_error_msg(compute_heating_rate( & fluxClrSky%flux_up, & fluxClrSky%flux_dn, & - p_lev2(idxday,1:nlay+1)*100., & + p_lev(idxday,1:nlay+1), & thetaTendClrSky)) endif @@ -1229,14 +1224,14 @@ subroutine rrtmgp_sw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr call check_error_msg(compute_heating_rate( & fluxAllSky%bnd_flux_up(:,:,iBand), & fluxAllSky%bnd_flux_dn(:,:,iBand), & - p_lev(idxday,1:nlay+1)*100., & + p_lev(idxday,1:nlay+1), & thetaTendByBandAllSky(:,:,iBand))) enddo else call check_error_msg(compute_heating_rate( & fluxAllSky%flux_up, & fluxAllSky%flux_dn, & - p_lev(idxday,1:nlay+1)*100., & + p_lev(idxday,1:nlay+1), & thetaTendAllSky)) endif From 33e087f9eadc95faffeee35ea7b248d2b23f15e8 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Thu, 2 May 2019 15:23:26 -0600 Subject: [PATCH 015/167] Cleaned up, added detailed comments, vectorized loops. --- physics/GFS_rrtmgp_pre.F90 | 506 ++++++++++++++++--------------------- 1 file changed, 214 insertions(+), 292 deletions(-) diff --git a/physics/GFS_rrtmgp_pre.F90 b/physics/GFS_rrtmgp_pre.F90 index d91bc2522..07c760e42 100644 --- a/physics/GFS_rrtmgp_pre.F90 +++ b/physics/GFS_rrtmgp_pre.F90 @@ -79,56 +79,80 @@ end subroutine GFS_rrtmgp_pre_init !! ! Attention - the output arguments lm, im, lmk, lmp must not be set ! in the CCPP version - they are defined in the interstitial_create routine - subroutine GFS_rrtmgp_pre_run (Model, Grid, Sfcprop, Statein, & ! input - Tbd, Cldprop, Coupling, & - Radtend, & ! input/output - lm, im, lmk, lmp, & ! input - kd, kt, kb, raddt, delp, dz, plvl, plyr, & ! output - tlvl, tlyr, tsfg, tsfa, qlyr, olyr, & - gasvmr_co2, gasvmr_n2o, gasvmr_ch4, gasvmr_o2, & - gasvmr_co, gasvmr_cfc11, gasvmr_cfc12, & - gasvmr_cfc22, gasvmr_ccl4, gasvmr_cfc113, & - faersw1, faersw2, faersw3, & - faerlw1, faerlw2, faerlw3, aerodp, & - clouds1, clouds2, clouds3, clouds4, clouds5, clouds6, & - clouds7, clouds8, clouds9, cldsa, & - mtopa, mbota, de_lgth, alb1d, errmsg, errflg) - - use machine, only: kind_phys - use GFS_typedefs, only: GFS_statein_type, & - GFS_stateout_type, & - GFS_sfcprop_type, & - GFS_coupling_type, & - GFS_control_type, & - GFS_grid_type, & - GFS_tbd_type, & - GFS_cldprop_type, & - GFS_radtend_type, & - GFS_diag_type - use physparam - use physcons, only: eps => con_eps, & - epsm1 => con_epsm1, & - fvirt => con_fvirt, & - rog => con_rog, & - rocp => con_rocp - use radcons, only: itsfc,ltp, lextop, qmin, & - qme5, qme6, epsq, prsmin - use funcphys, only: fpvs - use module_radiation_astronomy,only: coszmn - use module_radiation_gases, only: NF_VGAS, getgases, getozn - use module_radiation_aerosols, only: NF_AESW, NF_AELW, setaer, & - NSPC1 - use module_radiation_clouds, only: NF_CLDS, & - progcld1, progcld3, & - progcld4, progcld5, & - progclduni - use module_radsw_parameters, only: topfsw_type, sfcfsw_type, & - profsw_type, NBDSW - use module_radlw_parameters, only: topflw_type, sfcflw_type, & - proflw_type - use rrtmgp_lw, only: NBDLW => nBandsLW, kdist_lw - use surface_perturbation, only: cdfnor + ! ######################################################################################### + subroutine GFS_rrtmgp_pre_run (Model, Grid, Sfcprop, Statein, Tbd, Cldprop, Coupling, & ! IN + Radtend, & ! INOUT + lm, im, lmk, lmp, & ! IN + kd, kt, kb, raddt, delp, dz, plvl, plyr, tlvl, tlyr, tsfg, tsfa, qlyr, olyr, & ! OUT + gasvmr_co2, gasvmr_n2o, gasvmr_ch4, gasvmr_o2, gasvmr_co, gasvmr_cfc11, & ! OUT + gasvmr_cfc12, gasvmr_cfc22, gasvmr_ccl4, gasvmr_cfc113, faersw1, faersw2, faersw3, & ! OUT + faerlw1, faerlw2, faerlw3, aerodp, clouds1, clouds2, clouds3, clouds4, clouds5, & ! OUT + clouds6, clouds7, clouds8, clouds9, cldsa, mtopa, mbota, de_lgth, alb1d, & ! OUT + errmsg, errflg) + use physparam + use machine, only: & + kind_phys ! Working type + use GFS_typedefs, only: & + GFS_statein_type, & ! Prognostic state data in from dycore + GFS_stateout_type, & ! Prognostic state or tendencies return to dycore + GFS_sfcprop_type, & ! Surface fields + GFS_coupling_type, & ! Fields to/from coupling with other components (e.g. land/ice/ocean/etc.) + GFS_control_type, & ! Model control parameters + GFS_grid_type, & ! Grid and interpolation related data + GFS_tbd_type, & ! To-Be-Determined data that doesn't fit in any one container + GFS_cldprop_type, & ! Cloud fields needed by radiation from physics + GFS_radtend_type, & ! Radiation tendencies needed in physics + GFS_diag_type ! Fields targetted for diagnostic output + use physcons, only: & + eps => con_eps, & ! Rd/Rv + epsm1 => con_epsm1, & ! Rd/Rv-1 + fvirt => con_fvirt, & ! Rv/Rd-1 + rog => con_rog, & ! Rd/g + rocp => con_rocp ! Rd/cp + use radcons, only: & + itsfc, & ! Flag for LW sfc. temp. + ltp, & ! 1-add extra-top layer; 0-no extra layer + lextop, & ! ltp > 0 + qmin,qme5, qme6, epsq ! Minimum vlaues for varius calculations + use funcphys, only: & + fpvs ! Function ot compute sat. vapor pressure over liq. + use module_radiation_astronomy,only: & + coszmn ! Function to compute cos(SZA) + use module_radiation_gases, only: & + NF_VGAS, & ! Number of active gas species + getgases, & ! Routine to setup trace gases + getozn ! Routine to setup ozone + use module_radiation_aerosols, only: & + NF_AESW, & ! Number of optical-fields in SW output (3=tau+g+omega) + NF_AELW, & ! Number of optical-fields in LW output (3=tau+g+omega) + setaer, & ! Routine to compute aerosol radiative properties (tau,g,omega) + NSPC1 ! Number of species for vertically integrated aerosol optical-depth + use module_radiation_clouds, only: & + NF_CLDS, & ! Number of fields in "clouds" array (e.g. (cloud(1)=lwp,clouds(2)=ReffLiq,...) + progcld1, & ! Zhao/Moorthi's prognostic cloud scheme + progcld3, & ! Zhao/Moorthi's prognostic cloud+pdfcld + progcld4, & ! GFDL cloud scheme + progcld5, & ! Thompson / WSM6 cloud micrphysics scheme + progclduni ! Unified cloud-scheme + use surface_perturbation, only: & + cdfnor ! Routine to compute CDF (used to compute percentiles) + ! *NOTE* Ultimately these can be replaced with RRTMGP DDTs + use module_radsw_parameters, only: & + topfsw_type, & ! DDT containing SW TOA fluxes + sfcfsw_type, & ! DDT containing SW SFC fluxes + profsw_type ! DDT containing SW 2D flux profiles + use module_radlw_parameters, only: & + topflw_type, & ! DDT containing LW TOA fluxes + sfcflw_type, & ! DDT containing LW SFC fluxes + proflw_type ! DDT containing LW 2D flux profiles + ! RRTMGP stuff + use rrtmgp_lw, only: & + nBandsLW, & ! Number of LW bands in RRTMGP + kdist_lw ! DDT contining LW spectral information + use rrtmgp_sw, only: & + nBandsSW, & ! Number of SW bands in RRTMGP + kdist_sw ! DDT contining SW spectral information implicit none ! Inputs @@ -143,69 +167,47 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Sfcprop, Statein, & ! input integer, intent(in) :: im, lm, lmk, lmp ! Outputs - integer, intent(out) :: kd, kt, kb - real(kind=kind_phys), intent(out) :: raddt - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: delp - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: dz - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+1+LTP), intent(out) :: plvl - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: plyr - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+1+LTP), intent(out) :: tlvl - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: tlyr - real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(out) :: tsfg - real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(out) :: tsfa - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: qlyr - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: olyr - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: gasvmr_co2 - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: gasvmr_n2o - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: gasvmr_ch4 - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: gasvmr_o2 - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: gasvmr_co - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: gasvmr_cfc11 - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: gasvmr_cfc12 - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: gasvmr_cfc22 - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: gasvmr_ccl4 - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: gasvmr_cfc113 - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,NBDSW), intent(out) :: faersw1 - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,NBDSW), intent(out) :: faersw2 - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,NBDSW), intent(out) :: faersw3 - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,NBDLW), intent(out) :: faerlw1 - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,NBDLW), intent(out) :: faerlw2 - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,NBDLW), intent(out) :: faerlw3 - real(kind=kind_phys), dimension(size(Grid%xlon,1),NSPC1), intent(out) :: aerodp - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: clouds1 - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: clouds2 - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: clouds3 - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: clouds4 - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: clouds5 - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: clouds6 - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: clouds7 - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: clouds8 - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: clouds9 - real(kind=kind_phys), dimension(size(Grid%xlon,1),5), intent(out) :: cldsa - integer, dimension(size(Grid%xlon,1),3), intent(out) :: mbota - integer, dimension(size(Grid%xlon,1),3), intent(out) :: mtopa - real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(out) :: de_lgth - real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(out) :: alb1d + integer, intent(out) :: kd, kt, kb + real(kind_phys), intent(out) :: raddt + real(kind_phys), dimension(size(Grid%xlon,1)), intent(out) :: & + tsfg, tsfa + real(kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: & + delp, dz, plyr, tlyr, qlyr, olyr, gasvmr_co2, gasvmr_n2o, gasvmr_ch4, & + gasvmr_o2, gasvmr_co, gasvmr_cfc11, gasvmr_cfc12, gasvmr_cfc22, & + gasvmr_ccl4, gasvmr_cfc113, clouds1, clouds2, clouds3, clouds4, clouds5, & + clouds6, clouds7, clouds8, clouds9 + real(kind_phys), dimension(size(Grid%xlon,1),Model%levr+1+LTP), intent(out) :: & + plvl, tlvl + real(kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,nBandsSW), intent(out) :: & + faersw1, faersw2, faersw3 + real(kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,nBandsLW), intent(out) :: & + faerlw1, faerlw2, faerlw3 + real(kind_phys), dimension(size(Grid%xlon,1),NSPC1), intent(out) :: & + aerodp + + real(kind_phys), dimension(size(Grid%xlon,1),5), intent(out) :: cldsa + integer, dimension(size(Grid%xlon,1),3), intent(out) :: mbota,mtopa + real(kind_phys), dimension(size(Grid%xlon,1)), intent(out) :: de_lgth,alb1d character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg ! Local variables integer :: me, nfxr, ntrac, ntcw, ntiw, ncld, ntrw, ntsw, ntgl,i, j, k, k1, k2, lsk, & lv, n, itop, ibtc, LP1, lla, llb, lya, lyb - real(kind=kind_phys) :: es, qs, delt, tem0d - real(kind=kind_phys), dimension(size(Grid%xlon,1)) :: cvt1, cvb1, tem1d, tskn - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP) :: htswc, htlwc, & + real(kind_phys) :: es, qs, delt, tem0d + real(kind_phys), dimension(size(Grid%xlon,1)) :: cvt1, cvb1, tem1d, tskn + real(kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP) :: htswc, htlwc, & gcice, grain, grime, htsw0, htlw0, rhly, tvly,qstl, vvel, clw, ciw, prslk1, & tem2da, cldcov, deltaq, cnvc, cnvw, effrl, effri, effrr, effrs - real (kind=kind_phys) :: clwmin, clwm, clwt, onemrh, value, tem1, tem2, tem3 - real (kind=kind_phys), parameter :: xrc3 = 100. - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP+1) :: tem2db - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,Model%ncnd) :: ccnd - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,2:Model%ntrac) :: tracer1 - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,NF_CLDS) :: clouds - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,NF_VGAS) :: gasvmr - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,NBDSW,NF_AESW)::faersw - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,NBDLW,NF_AELW)::faerlw + real (kind_phys) :: clwmin, clwm, clwt, onemrh, value, tem1, tem2, tem3 + real (kind_phys), parameter :: xrc3 = 100. + real(kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP+1) :: tem2db + real(kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,Model%ncnd) :: ccnd + real(kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,2:Model%ntrac) :: tracer1 + real(kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,NF_CLDS) :: clouds + real(kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,NF_VGAS) :: gasvmr + real(kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,nBandsSW,NF_AESW)::faersw + real(kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,nBandsLW,NF_AELW)::faerlw ! Initialize CCPP error handling variables errmsg = '' @@ -214,16 +216,16 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Sfcprop, Statein, & ! input if (.not. (Model%lsswr .or. Model%lslwr)) return ! Define some commonly used integers - me = Model%me - NFXR = Model%nfxr - NTRAC = Model%ntrac ! tracers in grrad strip off sphum - start tracer1(2:NTRAC) - ntcw = Model%ntcw - ntiw = Model%ntiw - ncld = Model%ncld - ntrw = Model%ntrw - ntsw = Model%ntsw - ntgl = Model%ntgl - LP1 = LM + 1 ! num of in/out levels + me = Model%me ! MPI rank designator + NFXR = Model%nfxr ! second dimension for fluxr diagnostic variable (radiation) + NTRAC = Model%ntrac ! Number of tracers + ntcw = Model%ntcw ! Tracer index for cloud condensate (or liquid water) + ntiw = Model%ntiw ! Tracer index for ice + ncld = Model%ncld ! Cloud scheme + ntrw = Model%ntrw ! Tracer index for rain + ntsw = Model%ntsw ! Tracer index for snow + ntgl = Model%ntgl ! Tracer index for groupel + LP1 = LM + 1 ! num of in/out levels ! Set local /level/layer indexes corresponding to in/out variables if ( lextop ) then @@ -255,20 +257,24 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Sfcprop, Statein, & ! input endif ! end if_ivflip_block endif ! end if_lextop_block + ! Radiation time step (output) raddt = min(Model%fhswr, Model%fhlwr) - ! Setup surface ground temperature and ground/air skin temperature if required. if ( itsfc == 0 ) then ! use same sfc skin-air/ground temp - do i = 1, IM - tskn(i) = Sfcprop%tsfc(i) - tsfg(i) = Sfcprop%tsfc(i) - enddo + tskn(1:IM) = Sfcprop%tsfc(1:IM) + tsfg(1:IM) = Sfcprop%tsfc(1:IM) +! do i = 1, IM +! tskn(i) = Sfcprop%tsfc(i) +! tsfg(i) = Sfcprop%tsfc(i) +! enddo else ! use diff sfc skin-air/ground temp - do i = 1, IM - tskn(i) = Sfcprop%tsfc(i) - tsfg(i) = Sfcprop%tsfc(i) - enddo + tskn(1:IM) = Sfcprop%tsfc(1:IM) + tsfg(1:IM) = Sfcprop%tsfc(1:IM) +! do i = 1, IM +! tskn(i) = Sfcprop%tsfc(i) +! tsfg(i) = Sfcprop%tsfc(i) +! enddo endif ! Prepare atmospheric profiles for radiation input. @@ -305,27 +311,19 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Sfcprop, Statein, & ! input ! Input data from toa to sfc if (ivflip == 0) then - do i = 1, IM - plvl(i,1+kd) = Statein%prsi(i,1) - enddo - plvl(IM,1+kd) = kdist_lw%get_press_min() + plvl(1:IM-1,1+kd) = Statein%prsi(1:IM-1,1) + plvl(IM,1+kd) = kdist_lw%get_press_min() if (lsk /= 0) then - do i = 1, IM - plvl(i,1+kd) = 0.5 * (plvl(i,2+kd) + plvl(i,1+kd)) - enddo - plvl(IM,1+kd) = kdist_lw%get_press_min() + plvl(1:IM-1,1+kd) = 0.5 * (plvl(1:IM-1,2+kd) + plvl(1:IM-1,1+kd)) + plvl(IM,1+kd) = kdist_lw%get_press_min() endif ! Input data from sfc to top else - do i = 1, IM - plvl(i,LP1+kd) = Statein%prsi(i,LP1+lsk) - enddo - plvl(IM,LP1+kd) = kdist_lw%get_press_min() + plvl(1:IM-1,LP1+kd) = Statein%prsi(1:IM-1,LP1+lsk) + plvl(IM,LP1+kd) = kdist_lw%get_press_min() if (lsk /= 0) then - do i = 1, IM - plvl(i,LM+kd) = 0.5 * (plvl(i,LP1+kd) + plvl(i,LM+kd)) - enddo - plvl(IM,LM+kd) = kdist_lw%get_press_min() + plvl(1:IM-1,LM+kd) = 0.5 * (plvl(1:IM-1,LP1+kd) + plvl(1:IM-1,LM+kd)) + plvl(IM,LM+kd) = kdist_lw%get_press_min() endif endif @@ -363,41 +361,23 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Sfcprop, Statein, & ! input endif ! Call getgases(), to set up non-prognostic gas volume mixing ratios (gasvmr). - ! - gasvmr(:,:,1) - co2 volume mixing ratio - ! - gasvmr(:,:,2) - n2o volume mixing ratio - ! - gasvmr(:,:,3) - ch4 volume mixing ratio - ! - gasvmr(:,:,4) - o2 volume mixing ratio - ! - gasvmr(:,:,5) - co volume mixing ratio - ! - gasvmr(:,:,6) - cf11 volume mixing ratio - ! - gasvmr(:,:,7) - cf12 volume mixing ratio - ! - gasvmr(:,:,8) - cf22 volume mixing ratio - ! - gasvmr(:,:,9) - ccl4 volume mixing ratio - ! - gasvmr(:,:,10) - cfc113 volumne mixing ratio call getgases (plvl/100., Grid%xlon, Grid%xlat, IM, LMK, gasvmr) - - !CCPP: re-assign gasvmr(:,:,NF_VGAS) to gasvmr_X(:,:) - do k = 1, LMK - do i = 1, IM - gasvmr_co2 (i,k) = gasvmr(i,k,1) - gasvmr_n2o (i,k) = gasvmr(i,k,2) - gasvmr_ch4 (i,k) = gasvmr(i,k,3) - gasvmr_o2 (i,k) = gasvmr(i,k,4) - gasvmr_co (i,k) = gasvmr(i,k,5) - gasvmr_cfc11 (i,k) = gasvmr(i,k,6) - gasvmr_cfc12 (i,k) = gasvmr(i,k,7) - gasvmr_cfc22 (i,k) = gasvmr(i,k,8) - gasvmr_ccl4 (i,k) = gasvmr(i,k,9) - gasvmr_cfc113 (i,k) = gasvmr(i,k,10) - enddo - enddo - + + ! Assign to gasvmr_XXXX + gasvmr_co2 (1:IM,1:LMK) = gasvmr(1:IM,1:LMK,1) + gasvmr_n2o (1:IM,1:LMK) = gasvmr(1:IM,1:LMK,2) + gasvmr_ch4 (1:IM,1:LMK) = gasvmr(1:IM,1:LMK,3) + gasvmr_o2 (1:IM,1:LMK) = gasvmr(1:IM,1:LMK,4) + gasvmr_co (1:IM,1:LMK) = gasvmr(1:IM,1:LMK,5) + gasvmr_cfc11 (1:IM,1:LMK) = gasvmr(1:IM,1:LMK,6) + gasvmr_cfc12 (1:IM,1:LMK) = gasvmr(1:IM,1:LMK,7) + gasvmr_cfc22 (1:IM,1:LMK) = gasvmr(1:IM,1:LMK,8) + gasvmr_ccl4 (1:IM,1:LMK) = gasvmr(1:IM,1:LMK,9) + gasvmr_cfc113 (1:IM,1:LMK) = gasvmr(1:IM,1:LMK,10) + ! Get temperature at layer interface, and layer moisture. - do k = 2, LMK - do i = 1, IM - tem2da(i,k) = log( plyr(i,k) ) - tem2db(i,k) = log( plvl(i,k) ) - enddo - enddo + tem2da(1:IM,2:LMK) = log( plyr(1:IM,2:LMK) ) + tem2db(1:IM,2:LMK) = log( plvl(1:IM,2:LMK) ) if (ivflip == 0) then ! input data from toa to sfc do i = 1, IM @@ -490,32 +470,21 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Sfcprop, Statein, & ! input call setaer (plvl, plyr, prslk1, tvly, rhly, Sfcprop%slmsk, tracer1, Grid%xlon, & Grid%xlat, IM, LMK, LMP, Model%lsswr, Model%lslwr, faersw, faerlw, aerodp) - + ! Store aerosol optical properties + ! SW. ! For RRTMGP SW the bands are now ordered from [IR(band) -> nIR -> UV], in RRTMG the ! band ordering was [nIR -> UV -> IR(band)] - faersw1(1:IM,1:LMK,1) = faersw(1:IM,1:LMK,NBDSW,1) - faersw2(1:IM,1:LMK,1) = faersw(1:IM,1:LMK,NBDSW,2) - faersw3(1:IM,1:LMK,1) = faersw(1:IM,1:LMK,NBDSW,3) - do j = 2,NBDSW - do k = 1, LMK - do i = 1, IM - faersw1(i,k,j) = faersw(i,k,j-1,1) - faersw2(i,k,j) = faersw(i,k,j-1,2) - faersw3(i,k,j) = faersw(i,k,j-1,3) - enddo - enddo - enddo - - do j = 1,NBDLW - do k = 1, LMK - do i = 1, IM - faerlw1(i,k,j) = faerlw(i,k,j,1) - faerlw2(i,k,j) = faerlw(i,k,j,2) - faerlw3(i,k,j) = faerlw(i,k,j,3) - enddo - enddo - enddo - + faersw1(1:IM,1:LMK,1) = faersw(1:IM,1:LMK,nBandsSW,1) + faersw2(1:IM,1:LMK,1) = faersw(1:IM,1:LMK,nBandsSW,2) + faersw3(1:IM,1:LMK,1) = faersw(1:IM,1:LMK,nBandsSW,3) + faersw1(1:IM,1:LMK,2:nBandsSW) = faersw(1:IM,1:LMK,1:nBandsSW-1,1) + faersw2(1:IM,1:LMK,2:nBandsSW) = faersw(1:IM,1:LMK,1:nBandsSW-1,2) + faersw3(1:IM,1:LMK,2:nBandsSW) = faersw(1:IM,1:LMK,1:nBandsSW-1,3) + ! LW + faerlw1(1:IM,1:LMK,1:nBandsLW) = faerlw(1:IM,1:LMK,1:nBandsLW,1) + faerlw2(1:IM,1:LMK,1:nBandsLW) = faerlw(1:IM,1:LMK,1:nBandsLW,2) + faerlw3(1:IM,1:LMK,1:nBandsLW) = faerlw(1:IM,1:LMK,1:nBandsLW,3) + ! Obtain cloud information for radiation calculations ! (clouds,cldsa,mtopa,mbota) ! for prognostic cloud: @@ -525,45 +494,25 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Sfcprop, Statein, & ! input ! call module_radiation_clouds::progcld3() ! call module_radiation_clouds::progclduni() for unified cloud and ncld=2 ccnd = 0.0_kind_phys - if (Model%ncnd == 1) then ! Zhao_Carr_Sundqvist - do k=1,LMK - do i=1,IM - ccnd(i,k,1) = tracer1(i,k,ntcw) ! liquid water/ice - enddo - enddo - elseif (Model%ncnd == 2) then ! MG - do k=1,LMK - do i=1,IM - ccnd(i,k,1) = tracer1(i,k,ntcw) ! liquid water - ccnd(i,k,2) = tracer1(i,k,ntiw) ! ice water - enddo - enddo - elseif (Model%ncnd == 4) then ! MG2 - do k=1,LMK - do i=1,IM - ccnd(i,k,1) = tracer1(i,k,ntcw) ! liquid water - ccnd(i,k,2) = tracer1(i,k,ntiw) ! ice water - ccnd(i,k,3) = tracer1(i,k,ntrw) ! rain water - ccnd(i,k,4) = tracer1(i,k,ntsw) ! snow water - enddo - enddo - elseif (Model%ncnd == 5) then ! GFDL MP, Thompson, MG3 - do k=1,LMK - do i=1,IM - ccnd(i,k,1) = tracer1(i,k,ntcw) ! liquid water - ccnd(i,k,2) = tracer1(i,k,ntiw) ! ice water - ccnd(i,k,3) = tracer1(i,k,ntrw) ! rain water - ccnd(i,k,4) = tracer1(i,k,ntsw) + tracer1(i,k,ntgl) ! snow + grapuel - enddo - enddo + if (Model%ncnd == 1) then ! Zhao_Carr_Sundqvist + ccnd(1:IM,1:LMK,1) = tracer1(1:IM,1:LMK,ntcw) ! -liquid water/ice + elseif (Model%ncnd == 2) then ! MG + ccnd(1:IM,1:LMK,1) = tracer1(1:IM,1:LMK,ntcw) ! -liquid water + ccnd(1:IM,1:LMK,2) = tracer1(1:IM,1:LMK,ntiw) ! -ice water + elseif (Model%ncnd == 4) then ! MG2 + ccnd(1:IM,1:LMK,1) = tracer1(1:IM,1:LMK,ntcw) ! -liquid water + ccnd(1:IM,1:LMK,2) = tracer1(1:IM,1:LMK,ntiw) ! -ice water + ccnd(1:IM,1:LMK,3) = tracer1(1:IM,1:LMK,ntrw) ! -rain water + ccnd(1:IM,1:LMK,4) = tracer1(1:IM,1:LMK,ntsw) ! -snow water + elseif (Model%ncnd == 5) then ! GFDL MP, Thompson, MG3 + ccnd(1:IM,1:LMK,1) = tracer1(1:IM,1:LMK,ntcw) ! -liquid water + ccnd(1:IM,1:LMK,2) = tracer1(1:IM,1:LMK,ntiw) ! -ice water + ccnd(1:IM,1:LMK,3) = tracer1(1:IM,1:LMK,ntrw) ! -rain water + ccnd(1:IM,1:LMK,4) = tracer1(1:IM,1:LMK,ntsw) + & ! -snow + grapuel + tracer1(1:IM,1:LMK,ntgl) endif - do n=1,Model%ncnd - do k=1,LMK - do i=1,IM - if (ccnd(i,k,n) < epsq) ccnd(i,k,n) = 0.0 - enddo - enddo - enddo + where(ccnd < epsq) ccnd = 0.0 + if (Model%imp_physics == 11 ) then if (.not. Model%lgfdlmprad) then ccnd(:,:,1) = tracer1(:,1:LMK,ntcw) @@ -584,47 +533,29 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Sfcprop, Statein, & ! input ! cloudiness due to suspended convec cloud water for zhao/moorthi's ! (imp_phys=99) & ferrier's (imp_phys=5) microphysics schemes if ((Model%num_p3d == 4) .and. (Model%npdf3d == 3)) then ! same as Model%imp_physics = 99 - do k=1,lm - k1 = k + kd - do i=1,im - deltaq(i,k1) = Tbd%phy_f3d(i,k,5) - cnvw (i,k1) = Tbd%phy_f3d(i,k,6) - cnvc (i,k1) = Tbd%phy_f3d(i,k,7) - enddo - enddo + deltaq(1:im,1+kd:lm+kd) = Tbd%phy_f3d(1:im,1:lm,5) + cnvw (1:im,1+kd:lm+kd) = Tbd%phy_f3d(1:im,1:lm,6) + cnvc (1:im,1+kd:lm+kd) = Tbd%phy_f3d(1:im,1:lm,7) elseif ((Model%npdf3d == 0) .and. (Model%ncnvcld3d == 1)) then ! same as MOdel%imp_physics=98 - do k=1,lm - k1 = k + kd - do i=1,im - deltaq(i,k1) = 0.0 - cnvw (i,k1) = Tbd%phy_f3d(i,k,Model%num_p3d+1) - cnvc (i,k1) = 0.0 - enddo - enddo + deltaq(1:im,1+kd:lm+kd) = 0.0 + cnvw (1:im,1+kd:lm+kd) = Tbd%phy_f3d(1:im,1:lm,Model%num_p3d+1) + cnvc (1:im,1+kd:lm+kd) = 0.0 else ! all the rest - do k=1,lmk - do i=1,im - deltaq(i,k) = 0.0 - cnvw (i,k) = 0.0 - cnvc (i,k) = 0.0 - enddo - enddo + deltaq(1:im,1:lmk) = 0.0 + cnvw (1:im,1:lmk) = 0.0 + cnvc (1:im,1:lmk) = 0.0 endif if (lextop) then - do i=1,im - cldcov(i,lyb) = cldcov(i,lya) - deltaq(i,lyb) = deltaq(i,lya) - cnvw (i,lyb) = cnvw (i,lya) - cnvc (i,lyb) = cnvc (i,lya) - enddo + cldcov(1:im,lyb) = cldcov(1:im,lya) + deltaq(1:im,lyb) = deltaq(1:im,lya) + cnvw (1:im,lyb) = cnvw (1:im,lya) + cnvc (1:im,lyb) = cnvc (1:im,lya) if (Model%effr_in) then - do i=1,im - effrl(i,lyb) = effrl(i,lya) - effri(i,lyb) = effri(i,lya) - effrr(i,lyb) = effrr(i,lya) - effrs(i,lyb) = effrs(i,lya) - enddo + effrl(1:im,lyb) = effrl(1:im,lya) + effri(1:im,lyb) = effri(1:im,lya) + effrr(1:im,lyb) = effrr(1:im,lya) + effrs(1:im,lyb) = effrs(1:im,lya) endif endif @@ -679,16 +610,11 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Sfcprop, Statein, & ! input if (Model%uni_cld) then if (Model%effr_in) then - do k=1,lm - k1 = k + kd - do i=1,im - cldcov(i,k1) = Tbd%phy_f3d(i,k,Model%indcld) - effrl(i,k1) = Tbd%phy_f3d(i,k,2) - effri(i,k1) = Tbd%phy_f3d(i,k,3) - effrr(i,k1) = Tbd%phy_f3d(i,k,4) - effrs(i,k1) = Tbd%phy_f3d(i,k,5) - enddo - enddo + cldcov(1:im,1+kd:lm+kd) = Tbd%phy_f3d(1:im,1:lm,Model%indcld) + effrl(1:im,1+kd:lm+kd) = Tbd%phy_f3d(1:im,1:lm,2) + effri(1:im,1+kd:lm+kd) = Tbd%phy_f3d(1:im,1:lm,3) + effrr(1:im,1+kd:lm+kd) = Tbd%phy_f3d(1:im,1:lm,4) + effrs(1:im,1+kd:lm+kd) = Tbd%phy_f3d(1:im,1:lm,5) else do k=1,lm k1 = k + kd @@ -761,19 +687,15 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Sfcprop, Statein, & ! input endif ! end if_imp_physics ! CCPP - do k = 1, LMK - do i = 1, IM - clouds1(i,k) = clouds(i,k,1) - clouds2(i,k) = clouds(i,k,2) - clouds3(i,k) = clouds(i,k,3) - clouds4(i,k) = clouds(i,k,4) - clouds5(i,k) = clouds(i,k,5) - clouds6(i,k) = clouds(i,k,6) - clouds7(i,k) = clouds(i,k,7) - clouds8(i,k) = clouds(i,k,8) - clouds9(i,k) = clouds(i,k,9) - enddo - enddo + clouds1(1:IM,1:LMK) = clouds(1:IM,1:LMK,1) + clouds2(1:IM,1:LMK) = clouds(1:IM,1:LMK,2) + clouds3(1:IM,1:LMK) = clouds(1:IM,1:LMK,3) + clouds4(1:IM,1:LMK) = clouds(1:IM,1:LMK,4) + clouds5(1:IM,1:LMK) = clouds(1:IM,1:LMK,5) + clouds6(1:IM,1:LMK) = clouds(1:IM,1:LMK,6) + clouds7(1:IM,1:LMK) = clouds(1:IM,1:LMK,7) + clouds8(1:IM,1:LMK) = clouds(1:IM,1:LMK,8) + clouds9(1:IM,1:LMK) = clouds(1:IM,1:LMK,9) ! mg, sfc-perts ! --- scale random patterns for surface perturbations with From 6557c76fe80f88c5af896548d4a5bab2e9c90e6e Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Tue, 7 May 2019 15:12:14 -0600 Subject: [PATCH 016/167] Moved RRTMGP code to suite-level. --- .../{rrtmgp_lw_main.F90 => GFS_rrtmgp_lw.F90} | 29 ++--- physics/{rrtmgp_lw.xml => GFS_rrtmgp_lw.xml} | 106 ++++++++-------- ...mgp_lw_post.F90 => GFS_rrtmgp_lw_post.F90} | 26 ++-- ...mgp_lw_post.xml => GFS_rrtmgp_lw_post.xml} | 34 ++--- ...rtmgp_lw_pre.F90 => GFS_rrtmgp_lw_pre.F90} | 26 ++-- ...rtmgp_lw_pre.xml => GFS_rrtmgp_lw_pre.xml} | 26 ++-- physics/GFS_rrtmgp_pre.F90 | 13 +- .../{rrtmgp_sw_main.F90 => GFS_rrtmgp_sw.F90} | 32 ++--- physics/{rrtmgp_sw.xml => GFS_rrtmgp_sw.xml} | 120 +++++++++--------- ...mgp_sw_post.F90 => GFS_rrtmgp_sw_post.F90} | 26 ++-- ...mgp_sw_post.xml => GFS_rrtmgp_sw_post.xml} | 46 +++---- ...rtmgp_sw_pre.F90 => GFS_rrtmgp_sw_pre.F90} | 26 ++-- ...rtmgp_sw_pre.xml => GFS_rrtmgp_sw_pre.xml} | 40 +++--- 13 files changed, 270 insertions(+), 280 deletions(-) rename physics/{rrtmgp_lw_main.F90 => GFS_rrtmgp_lw.F90} (99%) rename physics/{rrtmgp_lw.xml => GFS_rrtmgp_lw.xml} (77%) rename physics/{rrtmgp_lw_post.F90 => GFS_rrtmgp_lw_post.F90} (91%) rename physics/{rrtmgp_lw_post.xml => GFS_rrtmgp_lw_post.xml} (75%) rename physics/{rrtmgp_lw_pre.F90 => GFS_rrtmgp_lw_pre.F90} (85%) rename physics/{rrtmgp_lw_pre.xml => GFS_rrtmgp_lw_pre.xml} (73%) rename physics/{rrtmgp_sw_main.F90 => GFS_rrtmgp_sw.F90} (99%) rename physics/{rrtmgp_sw.xml => GFS_rrtmgp_sw.xml} (78%) rename physics/{rrtmgp_sw_post.F90 => GFS_rrtmgp_sw_post.F90} (93%) rename physics/{rrtmgp_sw_post.xml => GFS_rrtmgp_sw_post.xml} (75%) rename physics/{rrtmgp_sw_pre.F90 => GFS_rrtmgp_sw_pre.F90} (91%) rename physics/{rrtmgp_sw_pre.xml => GFS_rrtmgp_sw_pre.xml} (75%) diff --git a/physics/rrtmgp_lw_main.F90 b/physics/GFS_rrtmgp_lw.F90 similarity index 99% rename from physics/rrtmgp_lw_main.F90 rename to physics/GFS_rrtmgp_lw.F90 index 805041008..11fc29b22 100644 --- a/physics/rrtmgp_lw_main.F90 +++ b/physics/GFS_rrtmgp_lw.F90 @@ -1,6 +1,6 @@ ! ########################################################################################### ! ########################################################################################### -module rrtmgp_lw +module GFS_rrtmgp_lw use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp use mo_gas_concentrations, only: ty_gas_concs use mo_fluxes, only: ty_fluxes_broadband @@ -61,12 +61,12 @@ module rrtmgp_lw type(ty_gas_concs) :: & gas_concs_lw - public rrtmgp_lw_init, rrtmgp_lw_run, rrtmgp_lw_finalize + public GFS_rrtmgp_lw_init, GFS_rrtmgp_lw_run, GFS_rrtmgp_lw_finalize contains ! ######################################################################################### - ! rrtmgp_lw_init + ! GFS_rrtmgp_lw_init ! ######################################################################################### -!! \section arg_table_rrtmgp_lw_init Argument Table +!! \section arg_table_GFS_rrtmgp_lw_init Argument Table !! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | !! |-----------------|---------------------------|---------------------------------------------------------|-------|------|------------------|-----------|--------|----------| !! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | @@ -77,7 +77,7 @@ module rrtmgp_lw !! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | !! ! ######################################################################################### - subroutine rrtmgp_lw_init(Model,mpicomm, mpirank, mpiroot, errmsg, errflg) + subroutine GFS_rrtmgp_lw_init(Model,mpicomm, mpirank, mpiroot, errmsg, errflg) use netcdf #ifdef MPI @@ -97,7 +97,6 @@ subroutine rrtmgp_lw_init(Model,mpicomm, mpirank, mpiroot, errmsg, errflg) integer, intent(out) :: & errflg ! Error code - ! Variables that will be passed to gas_optics%load() integer, dimension(:), allocatable :: & kminor_start_lower, & ! used by RRTGMP gas optics @@ -721,12 +720,12 @@ subroutine rrtmgp_lw_init(Model,mpicomm, mpirank, mpiroot, errmsg, errflg) pade_sizereg_extice, pade_sizereg_ssaice, pade_sizereg_asyice)) endif - end subroutine rrtmgp_lw_init + end subroutine GFS_rrtmgp_lw_init ! ######################################################################################### ! rrtmg_lw_run ! ######################################################################################### -!! \section arg_table_rrtmgp_lw_run Argument Table +!! \section arg_table_GFS_rrtmgp_lw_run Argument Table !! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | !! |-----------------|-----------------------------------------------------------------------------------------------|-----------------------------------------------------------|---------|------|-------------|-----------|--------|----------| !! | p_lay | air_pressure_at_layer_for_radiation_in_hPa | air pressure layer | hPa | 2 | real | kind_phys | in | F | @@ -777,7 +776,7 @@ end subroutine rrtmgp_lw_init !! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | !! ! ######################################################################################### - subroutine rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr_n2o, & ! IN + subroutine GFS_rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr_n2o, & ! IN vmr_ch4, vmr_o2, vmr_co, vmr_cfc11, vmr_cfc12, vmr_cfc22, vmr_ccl4, icseed, tau_aer, & ! IN ssa_aer, sfc_emiss, skt, dzlyr, delpin, de_lgth, ncol, nlay, lprint, cldfrac, lslwr, & ! IN hlwc, topflx, sfcflx, cldtau, & ! OUT @@ -796,7 +795,7 @@ subroutine rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr ! random numbers. when isubclw /=2, it will not be used. logical,intent(in) :: & lprint, & ! Control flag for diagnostics - lslwr ! Flag to calculate RRTMGP LW? + lslwr ! Flag to calculate RRTMGP LW? (1) real(kind_phys), dimension(ncol), intent(in) :: & sfc_emiss, & ! Surface emissivity (1) skt, & ! Surface(skin) temperature (K) @@ -1197,13 +1196,13 @@ subroutine rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr hlw0 = thetaTendClrSky endif - end subroutine rrtmgp_lw_run + end subroutine GFS_rrtmgp_lw_run ! - subroutine rrtmgp_lw_finalize() + subroutine GFS_rrtmgp_lw_finalize() close(59) close(60) close(61) - end subroutine rrtmgp_lw_finalize + end subroutine GFS_rrtmgp_lw_finalize ! ######################################################################################### ! Ancillary functions @@ -1212,11 +1211,11 @@ subroutine check_error_msg(error_msg) character(len=*), intent(in) :: error_msg if(error_msg /= "") then - print*,"ERROR(rrtmgp_lw_main.F90): " + print*,"ERROR(GFS_rrtmgp_lw_main.F90): " print*,trim(error_msg) return end if end subroutine check_error_msg -end module rrtmgp_lw +end module GFS_rrtmgp_lw diff --git a/physics/rrtmgp_lw.xml b/physics/GFS_rrtmgp_lw.xml similarity index 77% rename from physics/rrtmgp_lw.xml rename to physics/GFS_rrtmgp_lw.xml index 618dd72a0..4d8cd78a7 100644 --- a/physics/rrtmgp_lw.xml +++ b/physics/GFS_rrtmgp_lw.xml @@ -1,7 +1,7 @@ - - - + + + GFS_control_type_instance Fortran DDT containing FV3-GFS model control parameters @@ -11,7 +11,7 @@ in F - MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_init + MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_init mpi_rank @@ -22,7 +22,7 @@ in F - MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_init + MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_init mpi_root @@ -33,7 +33,7 @@ in F - MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_init + MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_init mpi_comm @@ -44,7 +44,7 @@ in F - MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_init + MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_init ccpp_error_message @@ -55,7 +55,7 @@ out F - MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_init + MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_init ccpp_error_flag @@ -66,10 +66,10 @@ out F - MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_init + MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_init - + air_pressure_at_layer_for_radiation_in_hPa air pressure layer @@ -79,7 +79,7 @@ (:,:) in F - MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_run + MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_run air_pressure_at_interface_for_radiation_in_hPa @@ -90,7 +90,7 @@ (:,:) in F - MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_run + MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_run air_temperature_at_layer_for_radiation @@ -101,7 +101,7 @@ (:,:) in F - MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_run + MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_run air_temperature_at_interface_for_radiation @@ -112,7 +112,7 @@ (:,:) in F - MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_run + MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_run water_vapor_specific_humidity_at_layer_for_radiation @@ -123,7 +123,7 @@ (:,:) in F - MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_run + MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_run ozone_concentration_at_layer_for_radiation @@ -134,7 +134,7 @@ (:,:) in F - MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_run + MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_run volume_mixing_ratio_co2 @@ -145,7 +145,7 @@ (:,:) in F - MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_run + MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_run volume_mixing_ratio_n2o @@ -156,7 +156,7 @@ (:,:) in F - MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_run + MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_run volume_mixing_ratio_ch4 @@ -167,7 +167,7 @@ (:,:) in F - MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_run + MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_run volume_mixing_ratio_o2 @@ -178,7 +178,7 @@ (:,:) in F - MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_run + MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_run volume_mixing_ratio_co @@ -189,7 +189,7 @@ (:,:) in F - MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_run + MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_run volume_mixing_ratio_cfc11 @@ -200,7 +200,7 @@ (:,:) in F - MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_run + MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_run volume_mixing_ratio_cfc12 @@ -211,7 +211,7 @@ (:,:) in F - MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_run + MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_run volume_mixing_ratio_cfc22 @@ -222,7 +222,7 @@ (:,:) in F - MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_run + MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_run volume_mixing_ratio_ccl4 @@ -233,7 +233,7 @@ (:,:) in F - MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_run + MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_run seed_random_numbers_lw @@ -244,7 +244,7 @@ (:) in F - MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_run + MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_run aerosol_optical_depth_for_longwave_bands_01-16 @@ -255,7 +255,7 @@ (:,:,:) in F - MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_run + MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_run aerosol_single_scattering_albedo_for_longwave_bands_01-16 @@ -266,7 +266,7 @@ (:,:,:) in F - MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_run + MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_run surface_longwave_emissivity @@ -277,7 +277,7 @@ (:) in F - MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_run + MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_run surface_ground_temperature_for_radiation @@ -288,7 +288,7 @@ (:) in F - MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_run + MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_run horizontal_loop_extent @@ -299,7 +299,7 @@ in F - MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_run + MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_run adjusted_vertical_layer_dimension_for_radiation @@ -310,7 +310,7 @@ in F - MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_run + MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_run flag_print @@ -321,7 +321,7 @@ in F - MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_run + MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_run total_cloud_fraction @@ -332,7 +332,7 @@ (:,:) in F - MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_run + MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_run flag_to_calc_lw @@ -343,7 +343,7 @@ in F - MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_run + MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_run tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_step @@ -354,7 +354,7 @@ (:,:) out F - MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_run + MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_run lw_fluxes_top_atmosphere @@ -365,7 +365,7 @@ (:) inout F - MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_run + MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_run lw_fluxes_sfc @@ -376,7 +376,7 @@ (:) inout F - MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_run + MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_run ccpp_error_message @@ -387,7 +387,7 @@ out F - MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_run + MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_run ccpp_error_flag @@ -398,7 +398,7 @@ out F - MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_run + MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_run tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_time_step @@ -409,7 +409,7 @@ (:,:) inout T - MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_run + MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_run lw_fluxes @@ -420,7 +420,7 @@ (:,:) in F - MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_run + MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_run lw_heating_rate_spectral @@ -431,7 +431,7 @@ (:,:,:) inout T - MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_run + MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_run lw_fluxes @@ -442,7 +442,7 @@ (:,:) inout T - MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_run + MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_run cloud_liquid_water_path @@ -453,7 +453,7 @@ (:,:) in T - MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_run + MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_run mean_effective_radius_for_liquid_cloud @@ -464,7 +464,7 @@ (:,:) in T - MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_run + MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_run cloud_ice_water_path @@ -475,7 +475,7 @@ (:,:) in T - MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_run + MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_run mean_effective_radius_for_ice_cloud @@ -486,7 +486,7 @@ (:,:) in T - MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_run + MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_run cloud_rain_water_path @@ -497,7 +497,7 @@ (:,:) in T - MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_run + MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_run mean_effective_radius_for_rain_drop @@ -508,7 +508,7 @@ (:,:) in T - MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_run + MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_run cloud_snow_water_path @@ -519,7 +519,7 @@ (:,:) in T - MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_run + MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_run mean_effective_radius_for_snow_flake @@ -530,7 +530,7 @@ (:,:) in T - MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_run + MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_run cloud_optical_depth @@ -541,7 +541,7 @@ (:,:) in T - MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_run + MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_run diff --git a/physics/rrtmgp_lw_post.F90 b/physics/GFS_rrtmgp_lw_post.F90 similarity index 91% rename from physics/rrtmgp_lw_post.F90 rename to physics/GFS_rrtmgp_lw_post.F90 index 63a39e721..65b761089 100644 --- a/physics/rrtmgp_lw_post.F90 +++ b/physics/GFS_rrtmgp_lw_post.F90 @@ -1,18 +1,18 @@ -!>\file rrtmgp_lw_post +!>\file GFS_rrtmgp_lw_post !!This file contains - module rrtmgp_lw_post + module GFS_rrtmgp_lw_post contains -!>\defgroup rrtmgp_lw_post GFS RRTMGP scheme post +!>\defgroup GFS_rrtmgp_lw_post GFS RRTMGP scheme post !! @{ -!> \section arg_table_rrtmgp_lw_post_init Argument Table +!> \section arg_table_GFS_rrtmgp_lw_post_init Argument Table !! - subroutine rrtmgp_lw_post_init() - end subroutine rrtmgp_lw_post_init + subroutine GFS_rrtmgp_lw_post_init() + end subroutine GFS_rrtmgp_lw_post_init ! PGI compiler does not accept lines longer than 264 characters, remove during pre-processing #ifndef __PGI -!> \section arg_table_rrtmgp_lw_post_run Argument Table +!> \section arg_table_GFS_rrtmgp_lw_post_run Argument Table !! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | !! |-----------------|-----------------------------------------------------------------------------------------------|------------------------------------------------------------------------------|----------|------|-----------------------|-----------|-----------|----------| !! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | @@ -30,7 +30,7 @@ end subroutine rrtmgp_lw_post_init !! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | !! #endif - subroutine rrtmgp_lw_post_run (Model, Grid, Radtend, Coupling, & + subroutine GFS_rrtmgp_lw_post_run (Model, Grid, Radtend, Coupling, & im, ltp, lm, kd, tsfa, htlwc, htlw0, errmsg, errflg) use machine, only: kind_phys @@ -91,12 +91,12 @@ subroutine rrtmgp_lw_post_run (Model, Grid, Radtend, Coupling, & endif ! end_if_lslwr - end subroutine rrtmgp_lw_post_run + end subroutine GFS_rrtmgp_lw_post_run -!> \section arg_table_rrtmgp_lw_post_finalize Argument Table +!> \section arg_table_GFS_rrtmgp_lw_post_finalize Argument Table !! - subroutine rrtmgp_lw_post_finalize () - end subroutine rrtmgp_lw_post_finalize + subroutine GFS_rrtmgp_lw_post_finalize () + end subroutine GFS_rrtmgp_lw_post_finalize !! @} - end module rrtmgp_lw_post + end module GFS_rrtmgp_lw_post diff --git a/physics/rrtmgp_lw_post.xml b/physics/GFS_rrtmgp_lw_post.xml similarity index 75% rename from physics/rrtmgp_lw_post.xml rename to physics/GFS_rrtmgp_lw_post.xml index be983ff27..ee9de302d 100644 --- a/physics/rrtmgp_lw_post.xml +++ b/physics/GFS_rrtmgp_lw_post.xml @@ -1,8 +1,8 @@ - - - - + + + + GFS_control_type_instance Fortran DDT containing FV3-GFS model control parameters @@ -12,7 +12,7 @@ in F - MODULE_rrtmgp_lw_post SCHEME_rrtmgp_lw_post SUBROUTINE_rrtmgp_lw_post_run + MODULE_GFS_rrtmgp_lw_post SCHEME_GFS_rrtmgp_lw_post SUBROUTINE_GFS_rrtmgp_lw_post_run GFS_grid_type_instance @@ -23,7 +23,7 @@ in F - MODULE_rrtmgp_lw_post SCHEME_rrtmgp_lw_post SUBROUTINE_rrtmgp_lw_post_run + MODULE_GFS_rrtmgp_lw_post SCHEME_GFS_rrtmgp_lw_post SUBROUTINE_GFS_rrtmgp_lw_post_run GFS_radtend_type_instance @@ -34,7 +34,7 @@ inout F - MODULE_rrtmgp_lw_post SCHEME_rrtmgp_lw_post SUBROUTINE_rrtmgp_lw_post_run + MODULE_GFS_rrtmgp_lw_post SCHEME_GFS_rrtmgp_lw_post SUBROUTINE_GFS_rrtmgp_lw_post_run GFS_coupling_type_instance @@ -45,7 +45,7 @@ inout F - MODULE_rrtmgp_lw_post SCHEME_rrtmgp_lw_post SUBROUTINE_rrtmgp_lw_post_run + MODULE_GFS_rrtmgp_lw_post SCHEME_GFS_rrtmgp_lw_post SUBROUTINE_GFS_rrtmgp_lw_post_run horizontal_loop_extent @@ -56,7 +56,7 @@ in F - MODULE_rrtmgp_lw_post SCHEME_rrtmgp_lw_post SUBROUTINE_rrtmgp_lw_post_run + MODULE_GFS_rrtmgp_lw_post SCHEME_GFS_rrtmgp_lw_post SUBROUTINE_GFS_rrtmgp_lw_post_run extra_top_layer @@ -67,7 +67,7 @@ in F - MODULE_rrtmgp_lw_post SCHEME_rrtmgp_lw_post SUBROUTINE_rrtmgp_lw_post_run + MODULE_GFS_rrtmgp_lw_post SCHEME_GFS_rrtmgp_lw_post SUBROUTINE_GFS_rrtmgp_lw_post_run vertical_layer_dimension_for_radiation @@ -78,7 +78,7 @@ in F - MODULE_rrtmgp_lw_post SCHEME_rrtmgp_lw_post SUBROUTINE_rrtmgp_lw_post_run + MODULE_GFS_rrtmgp_lw_post SCHEME_GFS_rrtmgp_lw_post SUBROUTINE_GFS_rrtmgp_lw_post_run vertical_index_difference_between_inout_and_local @@ -89,7 +89,7 @@ in F - MODULE_rrtmgp_lw_post SCHEME_rrtmgp_lw_post SUBROUTINE_rrtmgp_lw_post_run + MODULE_GFS_rrtmgp_lw_post SCHEME_GFS_rrtmgp_lw_post SUBROUTINE_GFS_rrtmgp_lw_post_run surface_air_temperature_for_radiation @@ -100,7 +100,7 @@ (:) in F - MODULE_rrtmgp_lw_post SCHEME_rrtmgp_lw_post SUBROUTINE_rrtmgp_lw_post_run + MODULE_GFS_rrtmgp_lw_post SCHEME_GFS_rrtmgp_lw_post SUBROUTINE_GFS_rrtmgp_lw_post_run tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_step @@ -111,7 +111,7 @@ (:,:) in F - MODULE_rrtmgp_lw_post SCHEME_rrtmgp_lw_post SUBROUTINE_rrtmgp_lw_post_run + MODULE_GFS_rrtmgp_lw_post SCHEME_GFS_rrtmgp_lw_post SUBROUTINE_GFS_rrtmgp_lw_post_run tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_time_step @@ -122,7 +122,7 @@ (:,:) in F - MODULE_rrtmgp_lw_post SCHEME_rrtmgp_lw_post SUBROUTINE_rrtmgp_lw_post_run + MODULE_GFS_rrtmgp_lw_post SCHEME_GFS_rrtmgp_lw_post SUBROUTINE_GFS_rrtmgp_lw_post_run ccpp_error_message @@ -133,7 +133,7 @@ out F - MODULE_rrtmgp_lw_post SCHEME_rrtmgp_lw_post SUBROUTINE_rrtmgp_lw_post_run + MODULE_GFS_rrtmgp_lw_post SCHEME_GFS_rrtmgp_lw_post SUBROUTINE_GFS_rrtmgp_lw_post_run ccpp_error_flag @@ -144,7 +144,7 @@ out F - MODULE_rrtmgp_lw_post SCHEME_rrtmgp_lw_post SUBROUTINE_rrtmgp_lw_post_run + MODULE_GFS_rrtmgp_lw_post SCHEME_GFS_rrtmgp_lw_post SUBROUTINE_GFS_rrtmgp_lw_post_run diff --git a/physics/rrtmgp_lw_pre.F90 b/physics/GFS_rrtmgp_lw_pre.F90 similarity index 85% rename from physics/rrtmgp_lw_pre.F90 rename to physics/GFS_rrtmgp_lw_pre.F90 index 50940595b..95ffc41a7 100644 --- a/physics/rrtmgp_lw_pre.F90 +++ b/physics/GFS_rrtmgp_lw_pre.F90 @@ -1,17 +1,17 @@ -!>\file rrtmgp_lw_pre.f90 +!>\file GFS_rrtmgp_lw_pre.f90 !! This file contains a call to module_radiation_surface::setemis() to !! setup surface emissivity for LW radiation. - module rrtmgp_lw_pre + module GFS_rrtmgp_lw_pre contains -!>\defgroup rrtmgp_lw_pre GFS RRTMGP scheme pre +!>\defgroup GFS_rrtmgp_lw_pre GFS RRTMGP scheme pre !! @{ -!> \section arg_table_rrtmgp_lw_pre_init Argument Table +!> \section arg_table_GFS_rrtmgp_lw_pre_init Argument Table !! - subroutine rrtmgp_lw_pre_init () - end subroutine rrtmgp_lw_pre_init + subroutine GFS_rrtmgp_lw_pre_init () + end subroutine GFS_rrtmgp_lw_pre_init -!> \section arg_table_rrtmgp_lw_pre_run Argument Table +!> \section arg_table_GFS_rrtmgp_lw_pre_run Argument Table !! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | !! |----------------|-------------------------------------------|--------------------------------------------------------------------|----------|------|-----------------------|-----------|--------|----------| !! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | @@ -24,7 +24,7 @@ end subroutine rrtmgp_lw_pre_init !! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | !! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | !! - subroutine rrtmgp_lw_pre_run (Model, Grid, Sfcprop, Radtend, im, tsfg, tsfa, errmsg, errflg) + subroutine GFS_rrtmgp_lw_pre_run (Model, Grid, Sfcprop, Radtend, im, tsfg, tsfa, errmsg, errflg) use machine, only: kind_phys @@ -57,11 +57,11 @@ subroutine rrtmgp_lw_pre_run (Model, Grid, Sfcprop, Radtend, im, tsfg, tsfa, err Radtend%semis) ! --- outputs endif - end subroutine rrtmgp_lw_pre_run + end subroutine GFS_rrtmgp_lw_pre_run -!> \section arg_table_rrtmgp_lw_pre_finalize Argument Table +!> \section arg_table_GFS_rrtmgp_lw_pre_finalize Argument Table !! - subroutine rrtmgp_lw_pre_finalize () - end subroutine rrtmgp_lw_pre_finalize + subroutine GFS_rrtmgp_lw_pre_finalize () + end subroutine GFS_rrtmgp_lw_pre_finalize !! @} - end module rrtmgp_lw_pre + end module GFS_rrtmgp_lw_pre diff --git a/physics/rrtmgp_lw_pre.xml b/physics/GFS_rrtmgp_lw_pre.xml similarity index 73% rename from physics/rrtmgp_lw_pre.xml rename to physics/GFS_rrtmgp_lw_pre.xml index 1972f8b60..6007cd7d4 100644 --- a/physics/rrtmgp_lw_pre.xml +++ b/physics/GFS_rrtmgp_lw_pre.xml @@ -1,8 +1,8 @@ - - - - + + + + GFS_control_type_instance Fortran DDT containing FV3-GFS model control parameters @@ -12,7 +12,7 @@ in F - MODULE_rrtmgp_lw_pre SCHEME_rrtmgp_lw_pre SUBROUTINE_rrtmgp_lw_pre_run + MODULE_GFS_rrtmgp_lw_pre SCHEME_GFS_rrtmgp_lw_pre SUBROUTINE_GFS_rrtmgp_lw_pre_run GFS_grid_type_instance @@ -23,7 +23,7 @@ in F - MODULE_rrtmgp_lw_pre SCHEME_rrtmgp_lw_pre SUBROUTINE_rrtmgp_lw_pre_run + MODULE_GFS_rrtmgp_lw_pre SCHEME_GFS_rrtmgp_lw_pre SUBROUTINE_GFS_rrtmgp_lw_pre_run GFS_sfcprop_type_instance @@ -34,7 +34,7 @@ in F - MODULE_rrtmgp_lw_pre SCHEME_rrtmgp_lw_pre SUBROUTINE_rrtmgp_lw_pre_run + MODULE_GFS_rrtmgp_lw_pre SCHEME_GFS_rrtmgp_lw_pre SUBROUTINE_GFS_rrtmgp_lw_pre_run GFS_radtend_type_instance @@ -45,7 +45,7 @@ inout F - MODULE_rrtmgp_lw_pre SCHEME_rrtmgp_lw_pre SUBROUTINE_rrtmgp_lw_pre_run + MODULE_GFS_rrtmgp_lw_pre SCHEME_GFS_rrtmgp_lw_pre SUBROUTINE_GFS_rrtmgp_lw_pre_run horizontal_loop_extent @@ -56,7 +56,7 @@ in F - MODULE_rrtmgp_lw_pre SCHEME_rrtmgp_lw_pre SUBROUTINE_rrtmgp_lw_pre_run + MODULE_GFS_rrtmgp_lw_pre SCHEME_GFS_rrtmgp_lw_pre SUBROUTINE_GFS_rrtmgp_lw_pre_run surface_ground_temperature_for_radiation @@ -67,7 +67,7 @@ (:) in F - MODULE_rrtmgp_lw_pre SCHEME_rrtmgp_lw_pre SUBROUTINE_rrtmgp_lw_pre_run + MODULE_GFS_rrtmgp_lw_pre SCHEME_GFS_rrtmgp_lw_pre SUBROUTINE_GFS_rrtmgp_lw_pre_run surface_air_temperature_for_radiation @@ -78,7 +78,7 @@ (:) in F - MODULE_rrtmgp_lw_pre SCHEME_rrtmgp_lw_pre SUBROUTINE_rrtmgp_lw_pre_run + MODULE_GFS_rrtmgp_lw_pre SCHEME_GFS_rrtmgp_lw_pre SUBROUTINE_GFS_rrtmgp_lw_pre_run ccpp_error_message @@ -89,7 +89,7 @@ out F - MODULE_rrtmgp_lw_pre SCHEME_rrtmgp_lw_pre SUBROUTINE_rrtmgp_lw_pre_run + MODULE_GFS_rrtmgp_lw_pre SCHEME_GFS_rrtmgp_lw_pre SUBROUTINE_GFS_rrtmgp_lw_pre_run ccpp_error_flag @@ -100,7 +100,7 @@ out F - MODULE_rrtmgp_lw_pre SCHEME_rrtmgp_lw_pre SUBROUTINE_rrtmgp_lw_pre_run + MODULE_GFS_rrtmgp_lw_pre SCHEME_GFS_rrtmgp_lw_pre SUBROUTINE_GFS_rrtmgp_lw_pre_run diff --git a/physics/GFS_rrtmgp_pre.F90 b/physics/GFS_rrtmgp_pre.F90 index 07c760e42..7e1663c60 100644 --- a/physics/GFS_rrtmgp_pre.F90 +++ b/physics/GFS_rrtmgp_pre.F90 @@ -137,20 +137,11 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Sfcprop, Statein, Tbd, Cldprop, Coup progclduni ! Unified cloud-scheme use surface_perturbation, only: & cdfnor ! Routine to compute CDF (used to compute percentiles) - ! *NOTE* Ultimately these can be replaced with RRTMGP DDTs - use module_radsw_parameters, only: & - topfsw_type, & ! DDT containing SW TOA fluxes - sfcfsw_type, & ! DDT containing SW SFC fluxes - profsw_type ! DDT containing SW 2D flux profiles - use module_radlw_parameters, only: & - topflw_type, & ! DDT containing LW TOA fluxes - sfcflw_type, & ! DDT containing LW SFC fluxes - proflw_type ! DDT containing LW 2D flux profiles ! RRTMGP stuff - use rrtmgp_lw, only: & + use GFS_rrtmgp_lw, only: & nBandsLW, & ! Number of LW bands in RRTMGP kdist_lw ! DDT contining LW spectral information - use rrtmgp_sw, only: & + use GFS_rrtmgp_sw, only: & nBandsSW, & ! Number of SW bands in RRTMGP kdist_sw ! DDT contining SW spectral information implicit none diff --git a/physics/rrtmgp_sw_main.F90 b/physics/GFS_rrtmgp_sw.F90 similarity index 99% rename from physics/rrtmgp_sw_main.F90 rename to physics/GFS_rrtmgp_sw.F90 index 468602455..a3aef41a9 100644 --- a/physics/rrtmgp_sw_main.F90 +++ b/physics/GFS_rrtmgp_sw.F90 @@ -1,6 +1,6 @@ ! ########################################################################################### ! ########################################################################################### -module rrtmgp_sw +module GFS_rrtmgp_sw use GFS_typedefs, only: GFS_control_type use physparam, only: iovrsw, icldflg, iswcliq, isubcsw use machine, only: kind_phys @@ -39,14 +39,14 @@ module rrtmgp_sw real (kind_phys), parameter :: & s0 = 1368.22 ! Solar constant (W/m2) - ! Logical flags for optional output fields in rrtmgp_sw_run(), default=.false. + ! Logical flags for optional output fields in GFS_rrtmgp_sw_run(), default=.false. logical :: & l_AllSky_HR_byband = .false., & ! 2D [ncol,nlay] all-sky heating rates, in each band [ncol,nlay,nBandsSW]? l_ClrSky_HR = .false., & ! 2D [ncol,nlay] clear-sky heating rate? l_fluxes2D = .false., & ! 2D [ncol,nlay] radiative fluxes *Note* fluxes is a DDT w/ 4 fields. l_sfcFluxes1D = .false. ! 1D [ncol] surface fluxes *Note* fluxes is a DDT w/ 6 fields. - ! Module parameters (set during rrtmgp_sw_init()) + ! Module parameters (set during GFS_rrtmgp_sw_init()) integer :: & rrtmgp_sw_cld_phys, & ! RRTMGP cloud-physics (0-RRTMG, 1-RRTGMP(LUT), 2-RRTMGP(Pade)) nGptsSW, & ! Number of SW spectral g-points @@ -62,12 +62,12 @@ module rrtmgp_sw type(ty_gas_concs) :: & gas_concs_sw - public rrtmgp_sw_init, rrtmgp_sw_run, rrtmgp_sw_finalize + public GFS_rrtmgp_sw_init, GFS_rrtmgp_sw_run, GFS_rrtmgp_sw_finalize contains ! ######################################################################################### - ! rrtmgp_sw_init + ! GFS_rrtmgp_sw_init ! ######################################################################################### -!! \section arg_table_rrtmgp_sw_init Argument Table +!! \section arg_table_GFS_rrtmgp_sw_init Argument Table !! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | !! |-----------------|---------------------------|---------------------------------------------------------|-------|------|------------------|-----------|--------|----------| !! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | @@ -78,7 +78,7 @@ module rrtmgp_sw !! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | !! ! ######################################################################################### - subroutine rrtmgp_sw_init(Model,mpicomm, mpirank, mpiroot, errmsg, errflg) + subroutine GFS_rrtmgp_sw_init(Model,mpicomm, mpirank, mpiroot, errmsg, errflg) use netcdf #ifdef MPI use mpi @@ -717,11 +717,11 @@ subroutine rrtmgp_sw_init(Model,mpicomm, mpirank, mpiroot, errmsg, errflg) pade_sizereg_extice_sw, pade_sizereg_ssaice_sw, pade_sizereg_asyice_sw)) endif - end subroutine rrtmgp_sw_init + end subroutine GFS_rrtmgp_sw_init ! ######################################################################################### - ! RRTMGP_SW_RUN + ! GFS_RRTMGP_SW_RUN ! ######################################################################################### -!! \section arg_table_rrtmgp_sw_run Argument Table +!! \section arg_table_GFS_rrtmgp_sw_run Argument Table !! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | !! |-----------------|------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------|---------|------|-------------|-----------|--------|----------| !! | p_lay | air_pressure_at_layer_for_radiation_in_hPa | air pressure layer | hPa | 2 | real | kind_phys | in | F | @@ -781,7 +781,7 @@ end subroutine rrtmgp_sw_init !! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | !! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | !! - subroutine rrtmgp_sw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr_n2o, & ! IN + subroutine GFS_rrtmgp_sw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr_n2o, & ! IN vmr_ch4, vmr_o2, vmr_co, vmr_cfc11, vmr_cfc12, vmr_cfc22, vmr_ccl4, icseed, tau_aer, & ! IN ssa_aer, asy_aer, sfcalb_nir_dir, sfcalb_nir_dif, sfcalb_uvis_dir, sfcalb_uvis_dif, & ! IN dzlyr, delpin, de_lgth, cossza, solcon, nday, idxday, ncol, nlay, lprint, cldfrac, & ! IN @@ -1274,13 +1274,13 @@ subroutine rrtmgp_sw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr if (l_ClrSky_HR) then hsw0(idxday,:) = thetaTendClrSky endif - end subroutine rrtmgp_sw_run + end subroutine GFS_rrtmgp_sw_run ! ######################################################################################### ! ######################################################################################### - subroutine rrtmgp_sw_finalize() + subroutine GFS_rrtmgp_sw_finalize() close(69) close(70) - end subroutine rrtmgp_sw_finalize + end subroutine GFS_rrtmgp_sw_finalize ! ######################################################################################### ! Ancillary functions @@ -1289,11 +1289,11 @@ subroutine check_error_msg(error_msg) character(len=*), intent(in) :: error_msg if(error_msg /= "") then - print*,"ERROR(rrtmgp_sw_main.F90): " + print*,"ERROR(GFS_rrtmgp_sw_main.F90): " print*,trim(error_msg) return end if end subroutine check_error_msg ! ######################################################################################### ! ######################################################################################### -end module rrtmgp_sw +end module GFS_rrtmgp_sw diff --git a/physics/rrtmgp_sw.xml b/physics/GFS_rrtmgp_sw.xml similarity index 78% rename from physics/rrtmgp_sw.xml rename to physics/GFS_rrtmgp_sw.xml index 392894a39..de4025645 100644 --- a/physics/rrtmgp_sw.xml +++ b/physics/GFS_rrtmgp_sw.xml @@ -1,7 +1,7 @@ - - - + + + air_pressure_at_layer_for_radiation_in_hPa air pressure layer @@ -11,7 +11,7 @@ (:,:) in F - MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run air_pressure_at_interface_for_radiation_in_hPa @@ -22,7 +22,7 @@ (:,:) in F - MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run air_temperature_at_layer_for_radiation @@ -33,7 +33,7 @@ (:,:) in F - MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run air_temperature_at_interface_for_radiation @@ -44,7 +44,7 @@ (:,:) in F - MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run water_vapor_specific_humidity_at_layer_for_radiation @@ -55,7 +55,7 @@ (:,:) in F - MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run ozone_concentration_at_layer_for_radiation @@ -66,7 +66,7 @@ (:,:) in F - MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run volume_mixing_ratio_co2 @@ -77,7 +77,7 @@ (:,:) in F - MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run volume_mixing_ratio_n2o @@ -88,7 +88,7 @@ (:,:) in F - MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run volume_mixing_ratio_ch4 @@ -99,7 +99,7 @@ (:,:) in F - MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run volume_mixing_ratio_o2 @@ -110,7 +110,7 @@ (:,:) in F - MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run volume_mixing_ratio_co @@ -121,7 +121,7 @@ (:,:) in F - MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run volume_mixing_ratio_cfc11 @@ -132,7 +132,7 @@ (:,:) in F - MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run volume_mixing_ratio_cfc12 @@ -143,7 +143,7 @@ (:,:) in F - MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run volume_mixing_ratio_cfc22 @@ -154,7 +154,7 @@ (:,:) in F - MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run volume_mixing_ratio_ccl4 @@ -165,7 +165,7 @@ (:,:) in F - MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run seed_random_numbers_sw @@ -176,7 +176,7 @@ (:) in F - MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run aerosol_optical_depth_for_shortwave_bands_01-16 @@ -187,7 +187,7 @@ (:,:,:) in F - MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run aerosol_single_scattering_albedo_for_shortwave_bands_01-16 @@ -198,7 +198,7 @@ (:,:,:) in F - MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run aerosol_asymmetry_parameter_for_shortwave_bands_01-16 @@ -209,7 +209,7 @@ (:,:,:) in F - MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run surface_albedo_due_to_near_IR_direct @@ -220,7 +220,7 @@ (:) in F - MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run surface_albedo_due_to_near_IR_diffused @@ -231,7 +231,7 @@ (:) in F - MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run surface_albedo_due_to_UV_and_VIS_direct @@ -242,7 +242,7 @@ (:) in F - MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run surface_albedo_due_to_UV_and_VIS_diffused @@ -253,7 +253,7 @@ (:) in F - MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run layer_thickness_for_radiation @@ -264,7 +264,7 @@ (:,:) in F - MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run layer_pressure_thickness_for_radiation @@ -275,7 +275,7 @@ (:,:) in F - MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run cloud_decorrelation_length @@ -286,7 +286,7 @@ (:) in F - MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run cosine_of_zenith_angle @@ -297,7 +297,7 @@ (:) in F - MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run solar_constant @@ -308,7 +308,7 @@ in F - MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run daytime_points_dimension @@ -319,7 +319,7 @@ in F - MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run daytime_points @@ -330,7 +330,7 @@ (:) in F - MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run horizontal_loop_extent @@ -341,7 +341,7 @@ in F - MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run adjusted_vertical_layer_dimension_for_radiation @@ -352,7 +352,7 @@ in F - MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run flag_print @@ -363,7 +363,7 @@ in F - MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run total_cloud_fraction @@ -374,7 +374,7 @@ (:,:) in F - MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run flag_to_calc_sw @@ -385,7 +385,7 @@ in F - MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step @@ -396,7 +396,7 @@ (:,:) inout F - MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run sw_fluxes_top_atmosphere @@ -407,7 +407,7 @@ (:) inout F - MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run sw_fluxes_sfc @@ -418,7 +418,7 @@ (:) inout F - MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run cloud_optical_depth_layers_at_0.55mu_band @@ -429,7 +429,7 @@ (:,:) inout F - MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_time_step @@ -440,7 +440,7 @@ (:,:) inout T - MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run sw_heating_rate_spectral @@ -451,7 +451,7 @@ (:,:,:) inout T - MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run sw_fluxes @@ -462,7 +462,7 @@ (:,:) inout T - MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run components_of_surface_downward_shortwave_fluxes @@ -473,7 +473,7 @@ (:) inout T - MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run cloud_liquid_water_path @@ -484,7 +484,7 @@ (:,:) in T - MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run mean_effective_radius_for_liquid_cloud @@ -495,7 +495,7 @@ (:,:) in T - MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run cloud_ice_water_path @@ -506,7 +506,7 @@ (:,:) in T - MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run mean_effective_radius_for_ice_cloud @@ -517,7 +517,7 @@ (:,:) in T - MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run cloud_rain_water_path @@ -528,7 +528,7 @@ (:,:) in T - MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run mean_effective_radius_for_rain_drop @@ -539,7 +539,7 @@ (:,:) in T - MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run cloud_snow_water_path @@ -550,7 +550,7 @@ (:,:) in T - MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run mean_effective_radius_for_snow_flake @@ -561,7 +561,7 @@ (:,:) in T - MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run cloud_optical_depth @@ -572,7 +572,7 @@ (:,:) in T - MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run cloud_single_scattering_albedo @@ -583,7 +583,7 @@ (:,:) in T - MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run cloud_asymmetry_parameter @@ -594,7 +594,7 @@ (:,:) in T - MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run ccpp_error_message @@ -605,7 +605,7 @@ out F - MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run ccpp_error_flag @@ -616,8 +616,8 @@ out F - MODULE_rrtmgp_sw SCHEME_rrtmgp_sw SUBROUTINE_rrtmgp_sw_run + MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run - + diff --git a/physics/rrtmgp_sw_post.F90 b/physics/GFS_rrtmgp_sw_post.F90 similarity index 93% rename from physics/rrtmgp_sw_post.F90 rename to physics/GFS_rrtmgp_sw_post.F90 index 2d17a1226..44508e697 100644 --- a/physics/rrtmgp_sw_post.F90 +++ b/physics/GFS_rrtmgp_sw_post.F90 @@ -1,17 +1,17 @@ -!>\file rrtmgp_sw_post +!>\file GFS_rrtmgp_sw_post !! This file contains - module rrtmgp_sw_post + module GFS_rrtmgp_sw_post contains -!>\defgroup rrtmgp_sw_post GFS RRTMGP scheme post +!>\defgroup GFS_rrtmgp_sw_post GFS RRTMGP scheme post !! @{ -!> \section arg_table_rrtmgp_sw_post_init Argument Table +!> \section arg_table_GFS_rrtmgp_sw_post_init Argument Table !! - subroutine rrtmgp_sw_post_init () - end subroutine rrtmgp_sw_post_init + subroutine GFS_rrtmgp_sw_post_init () + end subroutine GFS_rrtmgp_sw_post_init ! PGI compiler does not accept lines longer than 264 characters, remove during pre-processing #ifndef __PGI -!> \section arg_table_rrtmgp_sw_post_run Argument Table +!> \section arg_table_GFS_rrtmgp_sw_post_run Argument Table !! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | !! |----------------|------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------|----------|------|-----------------------|-----------|--------|----------| !! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | @@ -35,7 +35,7 @@ end subroutine rrtmgp_sw_post_init !! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | !! #endif - subroutine rrtmgp_sw_post_run (Model, Grid, Diag, Radtend, Coupling, & + subroutine GFS_rrtmgp_sw_post_run (Model, Grid, Diag, Radtend, Coupling, & im, ltp, nday, lm, kd, htswc, htsw0, & sfcalb1, sfcalb2, sfcalb3, sfcalb4, scmpsw, errmsg, errflg) @@ -144,11 +144,11 @@ subroutine rrtmgp_sw_post_run (Model, Grid, Diag, Radtend, Coupling, & endif ! end_if_lsswr - end subroutine rrtmgp_sw_post_run + end subroutine GFS_rrtmgp_sw_post_run -!> \section arg_table_rrtmgp_sw_post_finalize Argument Table +!> \section arg_table_GFS_rrtmgp_sw_post_finalize Argument Table !! - subroutine rrtmgp_sw_post_finalize () - end subroutine rrtmgp_sw_post_finalize + subroutine GFS_rrtmgp_sw_post_finalize () + end subroutine GFS_rrtmgp_sw_post_finalize !! @} - end module rrtmgp_sw_post + end module GFS_rrtmgp_sw_post diff --git a/physics/rrtmgp_sw_post.xml b/physics/GFS_rrtmgp_sw_post.xml similarity index 75% rename from physics/rrtmgp_sw_post.xml rename to physics/GFS_rrtmgp_sw_post.xml index bab6c6892..695ab6d73 100644 --- a/physics/rrtmgp_sw_post.xml +++ b/physics/GFS_rrtmgp_sw_post.xml @@ -1,8 +1,8 @@ - - - - + + + + GFS_control_type_instance Fortran DDT containing FV3-GFS model control parameters @@ -12,7 +12,7 @@ in F - MODULE_rrtmgp_sw_post SCHEME_rrtmgp_sw_post SUBROUTINE_rrtmgp_sw_post_run + MODULE_GFS_rrtmgp_sw_post SCHEME_GFS_rrtmgp_sw_post SUBROUTINE_GFS_rrtmgp_sw_post_run GFS_grid_type_instance @@ -23,7 +23,7 @@ in F - MODULE_rrtmgp_sw_post SCHEME_rrtmgp_sw_post SUBROUTINE_rrtmgp_sw_post_run + MODULE_GFS_rrtmgp_sw_post SCHEME_GFS_rrtmgp_sw_post SUBROUTINE_GFS_rrtmgp_sw_post_run GFS_diag_type_instance @@ -34,7 +34,7 @@ inout F - MODULE_rrtmgp_sw_post SCHEME_rrtmgp_sw_post SUBROUTINE_rrtmgp_sw_post_run + MODULE_GFS_rrtmgp_sw_post SCHEME_GFS_rrtmgp_sw_post SUBROUTINE_GFS_rrtmgp_sw_post_run GFS_radtend_type_instance @@ -45,7 +45,7 @@ inout F - MODULE_rrtmgp_sw_post SCHEME_rrtmgp_sw_post SUBROUTINE_rrtmgp_sw_post_run + MODULE_GFS_rrtmgp_sw_post SCHEME_GFS_rrtmgp_sw_post SUBROUTINE_GFS_rrtmgp_sw_post_run GFS_coupling_type_instance @@ -56,7 +56,7 @@ inout F - MODULE_rrtmgp_sw_post SCHEME_rrtmgp_sw_post SUBROUTINE_rrtmgp_sw_post_run + MODULE_GFS_rrtmgp_sw_post SCHEME_GFS_rrtmgp_sw_post SUBROUTINE_GFS_rrtmgp_sw_post_run horizontal_loop_extent @@ -67,7 +67,7 @@ in F - MODULE_rrtmgp_sw_post SCHEME_rrtmgp_sw_post SUBROUTINE_rrtmgp_sw_post_run + MODULE_GFS_rrtmgp_sw_post SCHEME_GFS_rrtmgp_sw_post SUBROUTINE_GFS_rrtmgp_sw_post_run extra_top_layer @@ -78,7 +78,7 @@ in F - MODULE_rrtmgp_sw_post SCHEME_rrtmgp_sw_post SUBROUTINE_rrtmgp_sw_post_run + MODULE_GFS_rrtmgp_sw_post SCHEME_GFS_rrtmgp_sw_post SUBROUTINE_GFS_rrtmgp_sw_post_run daytime_points_dimension @@ -89,7 +89,7 @@ in F - MODULE_rrtmgp_sw_post SCHEME_rrtmgp_sw_post SUBROUTINE_rrtmgp_sw_post_run + MODULE_GFS_rrtmgp_sw_post SCHEME_GFS_rrtmgp_sw_post SUBROUTINE_GFS_rrtmgp_sw_post_run vertical_layer_dimension_for_radiation @@ -100,7 +100,7 @@ in F - MODULE_rrtmgp_sw_post SCHEME_rrtmgp_sw_post SUBROUTINE_rrtmgp_sw_post_run + MODULE_GFS_rrtmgp_sw_post SCHEME_GFS_rrtmgp_sw_post SUBROUTINE_GFS_rrtmgp_sw_post_run vertical_index_difference_between_inout_and_local @@ -111,7 +111,7 @@ in F - MODULE_rrtmgp_sw_post SCHEME_rrtmgp_sw_post SUBROUTINE_rrtmgp_sw_post_run + MODULE_GFS_rrtmgp_sw_post SCHEME_GFS_rrtmgp_sw_post SUBROUTINE_GFS_rrtmgp_sw_post_run tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step @@ -122,7 +122,7 @@ (:,:) in F - MODULE_rrtmgp_sw_post SCHEME_rrtmgp_sw_post SUBROUTINE_rrtmgp_sw_post_run + MODULE_GFS_rrtmgp_sw_post SCHEME_GFS_rrtmgp_sw_post SUBROUTINE_GFS_rrtmgp_sw_post_run tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_time_step @@ -133,7 +133,7 @@ (:,:) in F - MODULE_rrtmgp_sw_post SCHEME_rrtmgp_sw_post SUBROUTINE_rrtmgp_sw_post_run + MODULE_GFS_rrtmgp_sw_post SCHEME_GFS_rrtmgp_sw_post SUBROUTINE_GFS_rrtmgp_sw_post_run surface_albedo_due_to_near_IR_direct @@ -144,7 +144,7 @@ (:) in F - MODULE_rrtmgp_sw_post SCHEME_rrtmgp_sw_post SUBROUTINE_rrtmgp_sw_post_run + MODULE_GFS_rrtmgp_sw_post SCHEME_GFS_rrtmgp_sw_post SUBROUTINE_GFS_rrtmgp_sw_post_run surface_albedo_due_to_near_IR_diffused @@ -155,7 +155,7 @@ (:) in F - MODULE_rrtmgp_sw_post SCHEME_rrtmgp_sw_post SUBROUTINE_rrtmgp_sw_post_run + MODULE_GFS_rrtmgp_sw_post SCHEME_GFS_rrtmgp_sw_post SUBROUTINE_GFS_rrtmgp_sw_post_run surface_albedo_due_to_UV_and_VIS_direct @@ -166,7 +166,7 @@ (:) in F - MODULE_rrtmgp_sw_post SCHEME_rrtmgp_sw_post SUBROUTINE_rrtmgp_sw_post_run + MODULE_GFS_rrtmgp_sw_post SCHEME_GFS_rrtmgp_sw_post SUBROUTINE_GFS_rrtmgp_sw_post_run surface_albedo_due_to_UV_and_VIS_diffused @@ -177,7 +177,7 @@ (:) in F - MODULE_rrtmgp_sw_post SCHEME_rrtmgp_sw_post SUBROUTINE_rrtmgp_sw_post_run + MODULE_GFS_rrtmgp_sw_post SCHEME_GFS_rrtmgp_sw_post SUBROUTINE_GFS_rrtmgp_sw_post_run components_of_surface_downward_shortwave_fluxes @@ -188,7 +188,7 @@ (:) inout F - MODULE_rrtmgp_sw_post SCHEME_rrtmgp_sw_post SUBROUTINE_rrtmgp_sw_post_run + MODULE_GFS_rrtmgp_sw_post SCHEME_GFS_rrtmgp_sw_post SUBROUTINE_GFS_rrtmgp_sw_post_run ccpp_error_message @@ -199,7 +199,7 @@ out F - MODULE_rrtmgp_sw_post SCHEME_rrtmgp_sw_post SUBROUTINE_rrtmgp_sw_post_run + MODULE_GFS_rrtmgp_sw_post SCHEME_GFS_rrtmgp_sw_post SUBROUTINE_GFS_rrtmgp_sw_post_run ccpp_error_flag @@ -210,7 +210,7 @@ out F - MODULE_rrtmgp_sw_post SCHEME_rrtmgp_sw_post SUBROUTINE_rrtmgp_sw_post_run + MODULE_GFS_rrtmgp_sw_post SCHEME_GFS_rrtmgp_sw_post SUBROUTINE_GFS_rrtmgp_sw_post_run diff --git a/physics/rrtmgp_sw_pre.F90 b/physics/GFS_rrtmgp_sw_pre.F90 similarity index 91% rename from physics/rrtmgp_sw_pre.F90 rename to physics/GFS_rrtmgp_sw_pre.F90 index ba9b1d054..3ca2c3910 100644 --- a/physics/rrtmgp_sw_pre.F90 +++ b/physics/GFS_rrtmgp_sw_pre.F90 @@ -1,17 +1,17 @@ -!>\file rrtmgp_sw_pre.f90 +!>\file GFS_rrtmgp_sw_pre.f90 !! This file contains a subroutine to module_radiation_surface::setalb() to !! setup surface albedo for SW radiation. - module rrtmgp_sw_pre + module GFS_rrtmgp_sw_pre contains -!>\defgroup rrtmgp_sw_pre GFS RRTMGP scheme Pre +!>\defgroup GFS_rrtmgp_sw_pre GFS RRTMGP scheme Pre !! @{ -!> \section arg_table_rrtmgp_sw_pre_init Argument Table +!> \section arg_table_GFS_rrtmgp_sw_pre_init Argument Table !! - subroutine rrtmgp_sw_pre_init () - end subroutine rrtmgp_sw_pre_init + subroutine GFS_rrtmgp_sw_pre_init () + end subroutine GFS_rrtmgp_sw_pre_init -!> \section arg_table_rrtmgp_sw_pre_run Argument Table +!> \section arg_table_GFS_rrtmgp_sw_pre_run Argument Table !! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | !! |----------------|-------------------------------------------|--------------------------------------------------------------------|----------|------|------------------|-----------|--------|----------| !! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | @@ -31,7 +31,7 @@ end subroutine rrtmgp_sw_pre_init !! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | !! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | !! - subroutine rrtmgp_sw_pre_run (Model, Grid, Sfcprop, Radtend, im, & + subroutine GFS_rrtmgp_sw_pre_run (Model, Grid, Sfcprop, Radtend, im, & nday, idxday, tsfg, tsfa, sfcalb1, sfcalb2, sfcalb3, sfcalb4, & alb1d, errmsg, errflg) @@ -107,12 +107,12 @@ subroutine rrtmgp_sw_pre_run (Model, Grid, Sfcprop, Radtend, im, & sfcalb4(i) = sfcalb(i,4) enddo - end subroutine rrtmgp_sw_pre_run + end subroutine GFS_rrtmgp_sw_pre_run -!> \section arg_table_rrtmgp_sw_pre_finalize Argument Table +!> \section arg_table_GFS_rrtmgp_sw_pre_finalize Argument Table !! - subroutine rrtmgp_sw_pre_finalize () - end subroutine rrtmgp_sw_pre_finalize + subroutine GFS_rrtmgp_sw_pre_finalize () + end subroutine GFS_rrtmgp_sw_pre_finalize !! @} - end module rrtmgp_sw_pre + end module GFS_rrtmgp_sw_pre diff --git a/physics/rrtmgp_sw_pre.xml b/physics/GFS_rrtmgp_sw_pre.xml similarity index 75% rename from physics/rrtmgp_sw_pre.xml rename to physics/GFS_rrtmgp_sw_pre.xml index 7bbb578d0..00f2a3164 100644 --- a/physics/rrtmgp_sw_pre.xml +++ b/physics/GFS_rrtmgp_sw_pre.xml @@ -1,8 +1,8 @@ - - - - + + + + GFS_control_type_instance Fortran DDT containing FV3-GFS model control parameters @@ -12,7 +12,7 @@ in F - MODULE_rrtmgp_sw_pre SCHEME_rrtmgp_sw_pre SUBROUTINE_rrtmgp_sw_pre_run + MODULE_GFS_rrtmgp_sw_pre SCHEME_GFS_rrtmgp_sw_pre SUBROUTINE_GFS_rrtmgp_sw_pre_run GFS_grid_type_instance @@ -23,7 +23,7 @@ in F - MODULE_rrtmgp_sw_pre SCHEME_rrtmgp_sw_pre SUBROUTINE_rrtmgp_sw_pre_run + MODULE_GFS_rrtmgp_sw_pre SCHEME_GFS_rrtmgp_sw_pre SUBROUTINE_GFS_rrtmgp_sw_pre_run GFS_sfcprop_type_instance @@ -34,7 +34,7 @@ in F - MODULE_rrtmgp_sw_pre SCHEME_rrtmgp_sw_pre SUBROUTINE_rrtmgp_sw_pre_run + MODULE_GFS_rrtmgp_sw_pre SCHEME_GFS_rrtmgp_sw_pre SUBROUTINE_GFS_rrtmgp_sw_pre_run GFS_radtend_type_instance @@ -45,7 +45,7 @@ inout F - MODULE_rrtmgp_sw_pre SCHEME_rrtmgp_sw_pre SUBROUTINE_rrtmgp_sw_pre_run + MODULE_GFS_rrtmgp_sw_pre SCHEME_GFS_rrtmgp_sw_pre SUBROUTINE_GFS_rrtmgp_sw_pre_run horizontal_loop_extent @@ -56,7 +56,7 @@ in F - MODULE_rrtmgp_sw_pre SCHEME_rrtmgp_sw_pre SUBROUTINE_rrtmgp_sw_pre_run + MODULE_GFS_rrtmgp_sw_pre SCHEME_GFS_rrtmgp_sw_pre SUBROUTINE_GFS_rrtmgp_sw_pre_run daytime_points_dimension @@ -67,7 +67,7 @@ out F - MODULE_rrtmgp_sw_pre SCHEME_rrtmgp_sw_pre SUBROUTINE_rrtmgp_sw_pre_run + MODULE_GFS_rrtmgp_sw_pre SCHEME_GFS_rrtmgp_sw_pre SUBROUTINE_GFS_rrtmgp_sw_pre_run daytime_points @@ -78,7 +78,7 @@ (:) out F - MODULE_rrtmgp_sw_pre SCHEME_rrtmgp_sw_pre SUBROUTINE_rrtmgp_sw_pre_run + MODULE_GFS_rrtmgp_sw_pre SCHEME_GFS_rrtmgp_sw_pre SUBROUTINE_GFS_rrtmgp_sw_pre_run surface_ground_temperature_for_radiation @@ -89,7 +89,7 @@ (:) in F - MODULE_rrtmgp_sw_pre SCHEME_rrtmgp_sw_pre SUBROUTINE_rrtmgp_sw_pre_run + MODULE_GFS_rrtmgp_sw_pre SCHEME_GFS_rrtmgp_sw_pre SUBROUTINE_GFS_rrtmgp_sw_pre_run surface_air_temperature_for_radiation @@ -100,7 +100,7 @@ (:) in F - MODULE_rrtmgp_sw_pre SCHEME_rrtmgp_sw_pre SUBROUTINE_rrtmgp_sw_pre_run + MODULE_GFS_rrtmgp_sw_pre SCHEME_GFS_rrtmgp_sw_pre SUBROUTINE_GFS_rrtmgp_sw_pre_run surface_albedo_due_to_near_IR_direct @@ -111,7 +111,7 @@ (:) out F - MODULE_rrtmgp_sw_pre SCHEME_rrtmgp_sw_pre SUBROUTINE_rrtmgp_sw_pre_run + MODULE_GFS_rrtmgp_sw_pre SCHEME_GFS_rrtmgp_sw_pre SUBROUTINE_GFS_rrtmgp_sw_pre_run surface_albedo_due_to_near_IR_diffused @@ -122,7 +122,7 @@ (:) out F - MODULE_rrtmgp_sw_pre SCHEME_rrtmgp_sw_pre SUBROUTINE_rrtmgp_sw_pre_run + MODULE_GFS_rrtmgp_sw_pre SCHEME_GFS_rrtmgp_sw_pre SUBROUTINE_GFS_rrtmgp_sw_pre_run surface_albedo_due_to_UV_and_VIS_direct @@ -133,7 +133,7 @@ (:) out F - MODULE_rrtmgp_sw_pre SCHEME_rrtmgp_sw_pre SUBROUTINE_rrtmgp_sw_pre_run + MODULE_GFS_rrtmgp_sw_pre SCHEME_GFS_rrtmgp_sw_pre SUBROUTINE_GFS_rrtmgp_sw_pre_run surface_albedo_due_to_UV_and_VIS_diffused @@ -144,7 +144,7 @@ (:) out F - MODULE_rrtmgp_sw_pre SCHEME_rrtmgp_sw_pre SUBROUTINE_rrtmgp_sw_pre_run + MODULE_GFS_rrtmgp_sw_pre SCHEME_GFS_rrtmgp_sw_pre SUBROUTINE_GFS_rrtmgp_sw_pre_run surface_albedo_perturbation @@ -155,7 +155,7 @@ (:) in F - MODULE_rrtmgp_sw_pre SCHEME_rrtmgp_sw_pre SUBROUTINE_rrtmgp_sw_pre_run + MODULE_GFS_rrtmgp_sw_pre SCHEME_GFS_rrtmgp_sw_pre SUBROUTINE_GFS_rrtmgp_sw_pre_run ccpp_error_message @@ -166,7 +166,7 @@ out F - MODULE_rrtmgp_sw_pre SCHEME_rrtmgp_sw_pre SUBROUTINE_rrtmgp_sw_pre_run + MODULE_GFS_rrtmgp_sw_pre SCHEME_GFS_rrtmgp_sw_pre SUBROUTINE_GFS_rrtmgp_sw_pre_run ccpp_error_flag @@ -177,7 +177,7 @@ out F - MODULE_rrtmgp_sw_pre SCHEME_rrtmgp_sw_pre SUBROUTINE_rrtmgp_sw_pre_run + MODULE_GFS_rrtmgp_sw_pre SCHEME_GFS_rrtmgp_sw_pre SUBROUTINE_GFS_rrtmgp_sw_pre_run From 0a40aaa2ce2bc66c636fa7dcbcbe23b316dc253b Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Tue, 7 May 2019 15:54:57 -0600 Subject: [PATCH 017/167] Moved to using extension/mo_rrtmgp_clr_all_sky.F90 routines to compute fluxes. --- physics/GFS_rrtmgp_lw.F90 | 132 +++++++++++++------------------------- physics/GFS_rrtmgp_sw.F90 | 111 +++++++++++--------------------- 2 files changed, 81 insertions(+), 162 deletions(-) diff --git a/physics/GFS_rrtmgp_lw.F90 b/physics/GFS_rrtmgp_lw.F90 index 11fc29b22..d82917649 100644 --- a/physics/GFS_rrtmgp_lw.F90 +++ b/physics/GFS_rrtmgp_lw.F90 @@ -7,7 +7,6 @@ module GFS_rrtmgp_lw use mo_fluxes_byband, only: ty_fluxes_byband use mo_optical_props, only: ty_optical_props_1scl,ty_optical_props_2str use mo_source_functions, only: ty_source_func_lw - use mo_rte_lw, only: rte_lw use mo_rte_kind, only: wl use mo_heating_rates, only: compute_heating_rate use mo_cloud_optics, only: ty_cloud_optics @@ -18,7 +17,8 @@ module GFS_rrtmgp_lw use GFS_typedefs, only: GFS_control_type use mo_rrtmgp_constants, only: grav, avogad use mo_rrtmgp_lw_cloud_optics, only: rrtmgp_lw_cloud_optics - use mersenne_twister, only: random_setseed, random_number, random_stat + use mersenne_twister, only: random_setseed, random_number, random_stat + use mo_rrtmgp_clr_all_sky, only: rte_lw implicit none @@ -199,10 +199,6 @@ subroutine GFS_rrtmgp_lw_init(Model,mpicomm, mpirank, mpiroot, errmsg, errflg) character(len=264) :: kdist_file,kdist_cldy_file integer,parameter :: max_strlen=256 - open(59,file='rrtmgp_aux_dump.txt',status='unknown') - open(60,file='rrtmgp_aux_tautot.txt',status='unknown') - open(61,file='rrtmgp_lw_aux_taucld.txt',status='unknown') - ! Initialize errmsg = '' errflg = 0 @@ -1013,10 +1009,8 @@ subroutine GFS_rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, endif ! ####################################################################################### - ! 1) Clear-sky fluxes (gaseous-atmosphere + aerosols) + ! Set gas concentrations ! ####################################################################################### - ! 1a) Set gas concentrations - print*,'Clear-Sky(LW): Set Gas Concentrations' call gas_concs_lw%reset() call check_error_msg(gas_concs_lw%set_vmr('o2', vmr_o2)) call check_error_msg(gas_concs_lw%set_vmr('co2', vmr_co2)) @@ -1025,58 +1019,23 @@ subroutine GFS_rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, call check_error_msg(gas_concs_lw%set_vmr('h2o', vmr_h2o)) call check_error_msg(gas_concs_lw%set_vmr('o3', vmr_o3)) - ! 1b) Compute the optical properties of the atmosphere and the Planck source functions - ! from pressures, temperatures, and gas concentrations... - print*,'Clear-Sky(LW): Optics' - call check_error_msg(kdist_lw%gas_optics( & - p_lay(1:ncol,1:nlay), & - p_lev(1:ncol,1:nlay+1), & - t_lay(1:ncol,1:nlay), & - skt(1:ncol), & - gas_concs_lw, & - optical_props_clr, & - sources, & - tlev = t_lev(1:ncol,1:nlay+1))) - - ! 1c) Add contribution from aerosols. - print*,'Clear-Sky(LW): Increment Aerosol' + ! ####################################################################################### + ! Copy aerosol to RRTMGP DDT + ! ####################################################################################### optical_props_aer%tau = tau_aer * (1. - ssa_aer) - call check_error_msg(optical_props_aer%increment(optical_props_clr)) - - ! 1d) Compute the clear-sky broadband fluxes - print*,'Clear-Sky(LW): Fluxes' - call check_error_msg(rte_lw( & - optical_props_clr, & - top_at_1, & - sources, & - semiss, & - fluxClrSky)) - - ! 1e) Compute heating rates - if (l_ClrSky_HR) then - print*,'Clear-Sky(LW): Heating-rates' - call check_error_msg(compute_heating_rate( & - fluxClrSky%flux_up, & - fluxClrSky%flux_dn, & - p_lev(1:ncol,1:nlay+1), & - thetaTendClrSky)) - endif ! ####################################################################################### - ! 2) All-sky fluxes + ! Compute cloud-optics for RTE. ! ####################################################################################### - ! 2a) Compute in-cloud radiative properties - print*,'All-Sky(LW): Optics ' + ! Compute in-cloud radiative properties if (any(cldfrac .gt. 0)) then - ! 2a.i) RRTMG cloud optics. + ! i) RRTMG cloud optics. ! If using RRTMG cloud-physics. Model can provide either cloud-optics (cld_od) or ! cloud-properties by type (cloud LWP,snow effective radius, etc...) if (rrtmgp_lw_cld_phys .eq. 0) then - print*,'Using RRTMG cloud-physics' ! Cloud-optical properties by type provided. if (.not. present(cld_od)) then - print*,' Using all types too...' call rrtmgp_lw_cloud_optics(ncol, nlay, nBandsLW, cld_lwp, cld_ref_liq, cld_iwp, & cld_ref_ice, cld_rwp, cld_ref_rain, cld_swp, cld_ref_snow, cldfrac, tau_cld) optical_props_cldy%tau = tau_cld @@ -1094,17 +1053,17 @@ subroutine GFS_rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, endif endif - ! 2a.ii) Use RRTMGP cloud-optics. + ! ii) Use RRTMGP cloud-optics. if (rrtmgp_lw_cld_phys .gt. 0) then - print*,'Using RRTMGP cloud-physics' call check_error_msg(kdist_lw_cldy%cloud_optics(ncol, nlay, nBandsLW, nrghice, & liqmask, icemask, cld_lwp, cld_iwp, cld_ref_liq2, cld_ref_ice2, optical_props_cldy)) end if endif - ! 2b) Call McICA to generate subcolumns. + ! ####################################################################################### + ! Call McICA to generate subcolumns. + ! ####################################################################################### if (isubclw .gt. 0) then - print*,'All-Sky(LW): McICA' ! Call RNG. Mersennse Twister accepts 1D array, so loop over columns and collapse along G-points ! and layers. ([nGpts,nLayer,nColumn]-> [nGpts*nLayer]*nColumn) @@ -1123,52 +1082,50 @@ subroutine GFS_rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, ! Map band optical depth to each g-point using McICA call check_error_msg(draw_samples(cldfracMCICA,optical_props_cldy,optical_props_mcica)) - endif - ! 2d) Add cloud contribution from the gaseous (clear-sky) atmosphere. - print*,'All-Sky(LW): Increment' - call check_error_msg(optical_props_clr%increment(optical_props_mcica)) - - ! 2e) Compute broadband fluxes - print*,'All-Sky(LW): Fluxes' - call check_error_msg(rte_lw( & - optical_props_mcica, & - top_at_1, & - sources, & - semiss, & - fluxAllSky)) - - ! 2f) Compute heating rates - print*,'All-Sky(LW): Heating-rates' + ! ####################################################################################### + ! Compute fluxes + ! ####################################################################################### + call check_error_msg(rte_lw( & + kdist_lw, & + gas_concs_lw, & + p_lay(1:ncol,1:nlay), & + t_lay(1:ncol,1:nlay), & + p_lev(1:ncol,1:nlay+1), & + skt(1:ncol), & + semiss, & + optical_props_mcica, & + fluxAllSky, & + fluxClrSky, & + aer_props = optical_props_aer)) + + ! ####################################################################################### + ! Compute heating rates + ! ####################################################################################### + if (l_ClrSky_HR) then + call check_error_msg(compute_heating_rate( & + fluxClrSky%flux_up, & + fluxClrSky%flux_dn, & + p_lev(1:ncol,1:nlay+1), & + thetaTendClrSky)) + endif if (l_AllSky_HR_byband) then do iBand=1,nBandsLW call check_error_msg(compute_heating_rate( & - fluxAllSky%bnd_flux_up(:,:,iBand), & - fluxAllSky%bnd_flux_dn(:,:,iBand), & - p_lev(1:ncol,1:nlay+1), & + fluxAllSky%bnd_flux_up(:,:,iBand), & + fluxAllSky%bnd_flux_dn(:,:,iBand), & + p_lev(1:ncol,1:nlay+1), & thetaTendByBandAllSky(:,:,iBand))) enddo else call check_error_msg(compute_heating_rate( & fluxAllSky%flux_up, & fluxAllSky%flux_dn, & - p_lev(1:ncol,1:nlay+1), & + p_lev(1:ncol,1:nlay+1), & thetaTendAllSky)) endif - write(59,*) "#" - write(60,*) "#" - write(61,*) "#" - do iLay=1,nLay - write(59,"(9F10.3)") p_lay(1,iLay),t_lay(1,iLay),cld_lwp(1,iLay),cld_iwp(1,iLay),& - cldfrac(1,iLay),sum(fluxClrSky%flux_up(1,iLay:iLay+1))/2.,& - sum(fluxClrSky%flux_dn(1,iLay:iLay+1))/2.,sum(fluxAllSky%flux_up(1,iLay:iLay+1))/2.,& - sum(fluxAllSky%flux_dn(1,iLay:iLay+1))/2. - write(60,*) optical_props_clr%tau(1,iLay,:) - write(61,'(16f12.3)') optical_props_cldy%tau(1,iLay,:) - enddo - ! ####################################################################################### ! Copy fluxes from RRTGMP types into model radiation types. ! ####################################################################################### @@ -1199,9 +1156,6 @@ subroutine GFS_rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, end subroutine GFS_rrtmgp_lw_run ! subroutine GFS_rrtmgp_lw_finalize() - close(59) - close(60) - close(61) end subroutine GFS_rrtmgp_lw_finalize ! ######################################################################################### diff --git a/physics/GFS_rrtmgp_sw.F90 b/physics/GFS_rrtmgp_sw.F90 index a3aef41a9..e4aa55b4b 100644 --- a/physics/GFS_rrtmgp_sw.F90 +++ b/physics/GFS_rrtmgp_sw.F90 @@ -10,7 +10,6 @@ module GFS_rrtmgp_sw use mo_fluxes, only: ty_fluxes_broadband use mo_fluxes_byband, only: ty_fluxes_byband use mo_optical_props, only: ty_optical_props_1scl,ty_optical_props_2str - use mo_rte_sw, only: rte_sw use mo_heating_rates, only: compute_heating_rate use mo_rrtmgp_constants, only: grav, avogad use module_radsw_parameters, only: topfsw_type, sfcfsw_type, profsw_type, cmpfsw_type @@ -18,6 +17,7 @@ module GFS_rrtmgp_sw use mo_cloud_sampling, only: sampled_mask_max_ran, sampled_mask_exp_ran, draw_samples use mersenne_twister, only: random_setseed, random_number, random_stat use mo_cloud_optics, only: ty_cloud_optics + use mo_rrtmgp_clr_all_sky, only: rte_sw implicit none @@ -196,9 +196,6 @@ subroutine GFS_rrtmgp_sw_init(Model,mpicomm, mpirank, mpiroot, errmsg, errflg) integer,dimension(:),allocatable :: temp1,temp2,temp3,temp4,temp_log_array1,& temp_log_array2, temp_log_array3, temp_log_array4 - open(69,file='rrtmgp_sw_aux_dump.txt',status='unknown') - open(70,file='rrtmgp_sw_aux_taucld.txt',status='unknown') - ! Initialize errmsg = '' errflg = 0 @@ -1085,10 +1082,8 @@ subroutine GFS_rrtmgp_sw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, endif ! ####################################################################################### - ! 1) Clear-sky fluxes (gaseous-atmosphere + aerosols) + ! Set gas concentrations ! ####################################################################################### - ! 1a) Set gas concentrations - print*,'Clear-Sky(SW): Set Gas Concentrations' call gas_concs_sw%reset() call check_error_msg(gas_concs_sw%set_vmr('o2', vmr_o2(idxday,1:nlay))) call check_error_msg(gas_concs_sw%set_vmr('co2', vmr_co2(idxday,1:nlay))) @@ -1096,56 +1091,25 @@ subroutine GFS_rrtmgp_sw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, call check_error_msg(gas_concs_sw%set_vmr('n2o', vmr_n2o(idxday,1:nlay))) call check_error_msg(gas_concs_sw%set_vmr('h2o', vmr_h2o(idxday,1:nlay))) call check_error_msg(gas_concs_sw%set_vmr('o3', vmr_o3(idxday,1:nlay))) - - ! 1b) Compute the optical properties of the atmosphere and the Planck source functions - ! from pressures, temperatures, and gas concentrations... - print*,'Clear-Sky(SW): Optics' - call check_error_msg(kdist_sw%gas_optics( & - p_lay(idxday,1:nlay), & - p_lev(idxday,1:nlay+1), & - t_lay(idxday,1:nlay), & - gas_concs_sw, & - optical_props_clr, & - toa_flux)) - ! 1c) Add contribution from aerosols. - print*,'Clear-Sky(SW): Increment Aerosol' + ! ####################################################################################### + ! Copy aerosol to RRTMG DDT + ! ####################################################################################### optical_props_aer%tau = tau_aer(idxday,:,:) optical_props_aer%ssa = ssa_aer(idxday,:,:) optical_props_aer%g = asy_aer(idxday,:,:) - call check_error_msg(optical_props_aer%increment(optical_props_clr)) - ! 1d) Compute the clear-sky broadband fluxes - print*,'Clear-Sky(SW): Fluxes' - call check_error_msg(rte_sw(optical_props_clr, top_at_1, cossza(idxday), toa_flux,& - spread(sfcalb_nir_dir(idxday),1, ncopies = nBandsSW), & - spread(sfcalb_nir_dif(idxday),1, ncopies = nBandsSW), & - fluxClrSky)) - - ! 1e) Compute heating rates - if (l_ClrSky_HR) then - print*,'Clear-Sky(SW): Heating-rates' - call check_error_msg(compute_heating_rate( & - fluxClrSky%flux_up, & - fluxClrSky%flux_dn, & - p_lev(idxday,1:nlay+1), & - thetaTendClrSky)) - endif - ! #################################################################################### - ! 2) Compute broadband all-sky calculation. + ! Compute cloud-optics for RTE. ! #################################################################################### - ! 2a) Compute in-cloud optics - print*,'All-Sky(SW): Optics ' + ! Compute in-cloud radiative properties. if (any(cldfrac(idxday,:) .gt. 0)) then - ! 2ai) RRTMG cloud optics. + ! i) RRTMG cloud optics. ! Cloud-optical properties by type provided. Compute optical-depth, single- ! scattering albedo, and asymmetry parameter if (rrtmgp_sw_cld_phys .eq. 0) then - print*,'Using RRTMG cloud-physics' if (.not. present(cld_od)) then - print*,' Using all types too...' call rrtmgp_sw_cloud_optics(nday, nlay, nBandsSW, & cld_lwp(idxday,1:nLay), cld_ref_liq(idxday,1:nLay), & cld_iwp(idxday,1:nLay), cld_ref_ice(idxday,1:nLay), & @@ -1174,9 +1138,8 @@ subroutine GFS_rrtmgp_sw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, endif endif - ! 2aii) Use RRTMGP cloud-optics. + ! ii) Use RRTMGP cloud-optics. if (rrtmgp_sw_cld_phys .gt. 0) then - print*,'Using RRTMGP cloud-physics' call check_error_msg(kdist_sw_cldy%cloud_optics(nday, nlay, nBandsSW, nrghice, & liqmask(idxday,1:nLay), icemask(idxday,1:nLay), cld_lwp(idxday,1:nLay), & cld_iwp(idxday,1:nLay), cld_ref_liq2(idxday,1:nLay), & @@ -1184,9 +1147,10 @@ subroutine GFS_rrtmgp_sw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, end if endif - ! 2b) Call McICA to sample clouds. + ! ####################################################################################### + ! Call McICA to sample clouds. + ! ####################################################################################### if (isubcsw .gt. 0) then - print*,'All-Sky(SW): McICA' ! Call RNG. Mersennse Twister accepts 1D array, so loop over columns and collapse along G-points ! and layers. ([nGpts,nLayer,nColumn]-> [nGpts*nLayer]*nColumn) do iCol=1,nCol @@ -1206,46 +1170,49 @@ subroutine GFS_rrtmgp_sw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, call check_error_msg(draw_samples(cldfracMCICA,optical_props_cldy,optical_props_mcica)) endif - ! 2c) Add cloud contribution from the gaseous (clear-sky) atmosphere. - print*,'All-Sky(SW): Increment' - call check_error_msg(optical_props_clr%increment(optical_props_mcica)) - - ! 2d) Compute broadband fluxes - print*,'All-Sky(SW): Fluxes' - call check_error_msg(rte_sw(optical_props_mcica, top_at_1, cossza(idxday), toa_flux,& + ! ####################################################################################### + ! Compute fluxes + ! ####################################################################################### + call check_error_msg(rte_sw( & + kdist_sw, & + gas_concs_sw, & + p_lay(idxday,1:nlay), & + t_lay(idxday,1:nlay), & + p_lev(idxday,1:nlay+1), & + cossza(idxday), & spread(sfcalb_nir_dir(idxday),1, ncopies = nBandsSW), & spread(sfcalb_nir_dif(idxday),1, ncopies = nBandsSW), & - fluxAllSky)) + optical_props_mcica, & + fluxAllSky, & + fluxClrSky, & + aer_props = optical_props_aer)) - ! 2e) Compute heating rates - print*,'All-Sky(SW): Heating-rates' + ! ####################################################################################### + ! Compute heating rates + ! ####################################################################################### + if (l_ClrSky_HR) then + call check_error_msg(compute_heating_rate( & + fluxClrSky%flux_up, & + fluxClrSky%flux_dn, & + p_lev(idxday,1:nlay+1), & + thetaTendClrSky)) + endif if (l_AllSky_HR_byband) then do iBand=1,nBandsSW call check_error_msg(compute_heating_rate( & fluxAllSky%bnd_flux_up(:,:,iBand), & fluxAllSky%bnd_flux_dn(:,:,iBand), & - p_lev(idxday,1:nlay+1), & + p_lev(idxday,1:nlay+1), & thetaTendByBandAllSky(:,:,iBand))) enddo else call check_error_msg(compute_heating_rate( & fluxAllSky%flux_up, & fluxAllSky%flux_dn, & - p_lev(idxday,1:nlay+1), & + p_lev(idxday,1:nlay+1), & thetaTendAllSky)) endif - write(69,'(a20)') "RRTMGP TAUs" - write(70,*) "#" - do iDay=1,nDay - do iLay=1,nlay - write(69,'(a5,i2,4f12.3)') '',iLay,p_lay(idxday(iDay),iLay),sum(optical_props_clr%tau(iDay,iLay,:)) - write(70,'(16f12.3)') optical_props_cldy%tau(1,iLay,:) - write(70,'(16f12.3)') optical_props_cldy%ssa(1,iLay,:) - write(70,'(16f12.3)') optical_props_cldy%g(1,iLay,:) - enddo - enddo - end if ! Daylit days ! ####################################################################################### @@ -1278,8 +1245,6 @@ end subroutine GFS_rrtmgp_sw_run ! ######################################################################################### ! ######################################################################################### subroutine GFS_rrtmgp_sw_finalize() - close(69) - close(70) end subroutine GFS_rrtmgp_sw_finalize ! ######################################################################################### From 81f256d0f58353a656acc678593a776e2bbe6586 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Wed, 8 May 2019 13:48:36 -0600 Subject: [PATCH 018/167] Add rte-rrtmgp DDTs to CCPP --- physics/GFS_rrtmgp_lw.F90 | 31 +++++++++++++++++++------------ physics/GFS_rrtmgp_pre.F90 | 11 +++++++---- physics/rte-rrtmgp | 2 +- 3 files changed, 27 insertions(+), 17 deletions(-) diff --git a/physics/GFS_rrtmgp_lw.F90 b/physics/GFS_rrtmgp_lw.F90 index d82917649..7f426fe4e 100644 --- a/physics/GFS_rrtmgp_lw.F90 +++ b/physics/GFS_rrtmgp_lw.F90 @@ -54,8 +54,8 @@ module GFS_rrtmgp_lw ngb_LW ! Band index for each g-points ! Classes used by rte+rrtmgp - type(ty_gas_optics_rrtmgp) :: & - kdist_lw + !type(ty_gas_optics_rrtmgp) :: & + ! kdist_lw type(ty_cloud_optics) :: & kdist_lw_cldy type(ty_gas_concs) :: & @@ -67,17 +67,18 @@ module GFS_rrtmgp_lw ! GFS_rrtmgp_lw_init ! ######################################################################################### !! \section arg_table_GFS_rrtmgp_lw_init Argument Table -!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | -!! |-----------------|---------------------------|---------------------------------------------------------|-------|------|------------------|-----------|--------|----------| -!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | -!! | mpirank | mpi_rank | current MPI rank | index | 0 | integer | | in | F | -!! | mpiroot | mpi_root | master MPI rank | index | 0 | integer | | in | F | -!! | mpicomm | mpi_comm | MPI communicator | index | 0 | integer | | in | F | -!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | -!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | +!! |-----------------|------------------------------------------|--------------------------------------------------------------------|-------|------|----------------------|-----------|--------|----------| +!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | +!! | mpirank | mpi_rank | current MPI rank | index | 0 | integer | | in | F | +!! | mpiroot | mpi_root | master MPI rank | index | 0 | integer | | in | F | +!! | mpicomm | mpi_comm | MPI communicator | index | 0 | integer | | in | F | +!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | +!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! | kdist_lw | K_distribution_file_for_RRTMGP_LW_scheme | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | inout | F | !! ! ######################################################################################### - subroutine GFS_rrtmgp_lw_init(Model,mpicomm, mpirank, mpiroot, errmsg, errflg) + subroutine GFS_rrtmgp_lw_init(Model,mpicomm, mpirank, mpiroot, kdist_lw, errmsg, errflg) use netcdf #ifdef MPI @@ -91,6 +92,8 @@ subroutine GFS_rrtmgp_lw_init(Model,mpicomm, mpirank, mpiroot, errmsg, errflg) mpicomm, & ! MPI communicator mpirank, & ! Current MPI rank mpiroot ! Master MPI rank + type(ty_gas_optics_rrtmgp),intent(inout) :: & + kdist_lw ! Outputs character(len=*), intent(out) :: & errmsg ! Error message @@ -770,11 +773,13 @@ end subroutine GFS_rrtmgp_lw_init !! | cld_od | cloud_optical_depth | cloud optical depth | none | 2 | real | kind_phys | in | T | !! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | !! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! | kdist_lw | K_distribution_file_for_RRTMGP_LW_scheme | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | !! ! ######################################################################################### subroutine GFS_rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr_n2o, & ! IN vmr_ch4, vmr_o2, vmr_co, vmr_cfc11, vmr_cfc12, vmr_cfc22, vmr_ccl4, icseed, tau_aer, & ! IN ssa_aer, sfc_emiss, skt, dzlyr, delpin, de_lgth, ncol, nlay, lprint, cldfrac, lslwr, & ! IN + kdist_lw, & hlwc, topflx, sfcflx, cldtau, & ! OUT hlw0, hlwb, flxprf, & ! OPT(out) cld_lwp, cld_ref_liq, cld_iwp, cld_ref_ice, cld_rwp, cld_ref_rain, cld_swp, & ! OPT(in) @@ -791,7 +796,9 @@ subroutine GFS_rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, ! random numbers. when isubclw /=2, it will not be used. logical,intent(in) :: & lprint, & ! Control flag for diagnostics - lslwr ! Flag to calculate RRTMGP LW? (1) + lslwr ! Flag to calculate RRTMGP LW? (1) + type(ty_gas_optics_rrtmgp),intent(in) :: & + kdist_lw ! DDT containing LW spectral information real(kind_phys), dimension(ncol), intent(in) :: & sfc_emiss, & ! Surface emissivity (1) skt, & ! Surface(skin) temperature (K) diff --git a/physics/GFS_rrtmgp_pre.F90 b/physics/GFS_rrtmgp_pre.F90 index 7e1663c60..6da3f99a0 100644 --- a/physics/GFS_rrtmgp_pre.F90 +++ b/physics/GFS_rrtmgp_pre.F90 @@ -76,13 +76,14 @@ end subroutine GFS_rrtmgp_pre_init !! | alb1d | surface_albedo_perturbation | surface albedo perturbation | frac | 1 | real | kind_phys | out | F | !! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | !! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! | kdist_lw | K_distribution_file_for_RRTMGP_LW_scheme | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | !! ! Attention - the output arguments lm, im, lmk, lmp must not be set ! in the CCPP version - they are defined in the interstitial_create routine ! ######################################################################################### subroutine GFS_rrtmgp_pre_run (Model, Grid, Sfcprop, Statein, Tbd, Cldprop, Coupling, & ! IN Radtend, & ! INOUT - lm, im, lmk, lmp, & ! IN + lm, im, lmk, lmp, kdist_lw, & ! IN kd, kt, kb, raddt, delp, dz, plvl, plyr, tlvl, tlyr, tsfg, tsfa, qlyr, olyr, & ! OUT gasvmr_co2, gasvmr_n2o, gasvmr_ch4, gasvmr_o2, gasvmr_co, gasvmr_cfc11, & ! OUT gasvmr_cfc12, gasvmr_cfc22, gasvmr_ccl4, gasvmr_cfc113, faersw1, faersw2, faersw3, & ! OUT @@ -138,9 +139,10 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Sfcprop, Statein, Tbd, Cldprop, Coup use surface_perturbation, only: & cdfnor ! Routine to compute CDF (used to compute percentiles) ! RRTMGP stuff + use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp use GFS_rrtmgp_lw, only: & - nBandsLW, & ! Number of LW bands in RRTMGP - kdist_lw ! DDT contining LW spectral information + nBandsLW!, & ! Number of LW bands in RRTMGP + !kdist_lw ! DDT contining LW spectral information use GFS_rrtmgp_sw, only: & nBandsSW, & ! Number of SW bands in RRTMGP kdist_sw ! DDT contining SW spectral information @@ -156,7 +158,8 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Sfcprop, Statein, Tbd, Cldprop, Coup type(GFS_cldprop_type), intent(in) :: Cldprop type(GFS_coupling_type), intent(in) :: Coupling integer, intent(in) :: im, lm, lmk, lmp - + type(ty_gas_optics_rrtmgp),intent(in) :: kdist_lw + ! Outputs integer, intent(out) :: kd, kt, kb real(kind_phys), intent(out) :: raddt diff --git a/physics/rte-rrtmgp b/physics/rte-rrtmgp index fa305df4d..f0748ad17 160000 --- a/physics/rte-rrtmgp +++ b/physics/rte-rrtmgp @@ -1 +1 @@ -Subproject commit fa305df4d3d88467e541f14db869f42c157013a7 +Subproject commit f0748ad17030875a1acb9013139b679a8c5262f1 From 232545f63715b03064d687bdc6811d5974672e6c Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Wed, 8 May 2019 14:02:45 -0600 Subject: [PATCH 019/167] Added _type to all instances of ty_gas_optics_rrtmgp --- physics/GFS_rrtmgp_lw.F90 | 26 +++++++++++++------------- physics/GFS_rrtmgp_pre.F90 | 6 +++--- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/physics/GFS_rrtmgp_lw.F90 b/physics/GFS_rrtmgp_lw.F90 index 7f426fe4e..d8e2d0336 100644 --- a/physics/GFS_rrtmgp_lw.F90 +++ b/physics/GFS_rrtmgp_lw.F90 @@ -1,7 +1,7 @@ ! ########################################################################################### ! ########################################################################################### module GFS_rrtmgp_lw - use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp + use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp_type use mo_gas_concentrations, only: ty_gas_concs use mo_fluxes, only: ty_fluxes_broadband use mo_fluxes_byband, only: ty_fluxes_byband @@ -67,15 +67,15 @@ module GFS_rrtmgp_lw ! GFS_rrtmgp_lw_init ! ######################################################################################### !! \section arg_table_GFS_rrtmgp_lw_init Argument Table -!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | -!! |-----------------|------------------------------------------|--------------------------------------------------------------------|-------|------|----------------------|-----------|--------|----------| -!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | -!! | mpirank | mpi_rank | current MPI rank | index | 0 | integer | | in | F | -!! | mpiroot | mpi_root | master MPI rank | index | 0 | integer | | in | F | -!! | mpicomm | mpi_comm | MPI communicator | index | 0 | integer | | in | F | -!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | -!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | -!! | kdist_lw | K_distribution_file_for_RRTMGP_LW_scheme | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | inout | F | +!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | +!! |-----------------|------------------------------------------|--------------------------------------------------------------------|-------|------|---------------------------|-----------|--------|----------| +!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | +!! | mpirank | mpi_rank | current MPI rank | index | 0 | integer | | in | F | +!! | mpiroot | mpi_root | master MPI rank | index | 0 | integer | | in | F | +!! | mpicomm | mpi_comm | MPI communicator | index | 0 | integer | | in | F | +!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | +!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! | kdist_lw | K_distribution_file_for_RRTMGP_LW_scheme | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp_type | | inout | F | !! ! ######################################################################################### subroutine GFS_rrtmgp_lw_init(Model,mpicomm, mpirank, mpiroot, kdist_lw, errmsg, errflg) @@ -92,7 +92,7 @@ subroutine GFS_rrtmgp_lw_init(Model,mpicomm, mpirank, mpiroot, kdist_lw, errmsg, mpicomm, & ! MPI communicator mpirank, & ! Current MPI rank mpiroot ! Master MPI rank - type(ty_gas_optics_rrtmgp),intent(inout) :: & + type(ty_gas_optics_rrtmgp_type),intent(inout) :: & kdist_lw ! Outputs character(len=*), intent(out) :: & @@ -773,7 +773,7 @@ end subroutine GFS_rrtmgp_lw_init !! | cld_od | cloud_optical_depth | cloud optical depth | none | 2 | real | kind_phys | in | T | !! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | !! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | -!! | kdist_lw | K_distribution_file_for_RRTMGP_LW_scheme | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | +!! | kdist_lw | K_distribution_file_for_RRTMGP_LW_scheme | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp_type | | in | F | !! ! ######################################################################################### subroutine GFS_rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr_n2o, & ! IN @@ -797,7 +797,7 @@ subroutine GFS_rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, logical,intent(in) :: & lprint, & ! Control flag for diagnostics lslwr ! Flag to calculate RRTMGP LW? (1) - type(ty_gas_optics_rrtmgp),intent(in) :: & + type(ty_gas_optics_rrtmgp_type),intent(in) :: & kdist_lw ! DDT containing LW spectral information real(kind_phys), dimension(ncol), intent(in) :: & sfc_emiss, & ! Surface emissivity (1) diff --git a/physics/GFS_rrtmgp_pre.F90 b/physics/GFS_rrtmgp_pre.F90 index 6da3f99a0..6d6916b8b 100644 --- a/physics/GFS_rrtmgp_pre.F90 +++ b/physics/GFS_rrtmgp_pre.F90 @@ -76,7 +76,7 @@ end subroutine GFS_rrtmgp_pre_init !! | alb1d | surface_albedo_perturbation | surface albedo perturbation | frac | 1 | real | kind_phys | out | F | !! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | !! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | -!! | kdist_lw | K_distribution_file_for_RRTMGP_LW_scheme | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | +!! | kdist_lw | K_distribution_file_for_RRTMGP_LW_scheme | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp_type | | in | F | !! ! Attention - the output arguments lm, im, lmk, lmp must not be set ! in the CCPP version - they are defined in the interstitial_create routine @@ -139,7 +139,7 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Sfcprop, Statein, Tbd, Cldprop, Coup use surface_perturbation, only: & cdfnor ! Routine to compute CDF (used to compute percentiles) ! RRTMGP stuff - use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp + use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp_type use GFS_rrtmgp_lw, only: & nBandsLW!, & ! Number of LW bands in RRTMGP !kdist_lw ! DDT contining LW spectral information @@ -158,7 +158,7 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Sfcprop, Statein, Tbd, Cldprop, Coup type(GFS_cldprop_type), intent(in) :: Cldprop type(GFS_coupling_type), intent(in) :: Coupling integer, intent(in) :: im, lm, lmk, lmp - type(ty_gas_optics_rrtmgp),intent(in) :: kdist_lw + type(ty_gas_optics_rrtmgp_type),intent(in) :: kdist_lw ! Outputs integer, intent(out) :: kd, kt, kb From 25b237274ae59fd2af3a185708ec019c3bd41ab9 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Thu, 9 May 2019 15:19:04 -0600 Subject: [PATCH 020/167] Added metadata tables to DDT definitions. --- physics/GFS_rrtmgp_lw.F90 | 64 ++++++++----- physics/GFS_rrtmgp_pre.F90 | 42 ++++----- physics/GFS_rrtmgp_sw.F90 | 189 ++++++++++++++++++++----------------- physics/rte-rrtmgp | 2 +- 4 files changed, 162 insertions(+), 135 deletions(-) diff --git a/physics/GFS_rrtmgp_lw.F90 b/physics/GFS_rrtmgp_lw.F90 index d8e2d0336..c14481543 100644 --- a/physics/GFS_rrtmgp_lw.F90 +++ b/physics/GFS_rrtmgp_lw.F90 @@ -1,7 +1,6 @@ ! ########################################################################################### ! ########################################################################################### module GFS_rrtmgp_lw - use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp_type use mo_gas_concentrations, only: ty_gas_concs use mo_fluxes, only: ty_fluxes_broadband use mo_fluxes_byband, only: ty_fluxes_byband @@ -9,7 +8,8 @@ module GFS_rrtmgp_lw use mo_source_functions, only: ty_source_func_lw use mo_rte_kind, only: wl use mo_heating_rates, only: compute_heating_rate - use mo_cloud_optics, only: ty_cloud_optics + use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp_type + use mo_cloud_optics, only: ty_cloud_optics_type use mo_cloud_sampling, only: sampled_mask_max_ran, sampled_mask_exp_ran, draw_samples use machine, only: kind_phys use module_radlw_parameters, only: topflw_type, sfcflw_type, proflw_type @@ -56,10 +56,10 @@ module GFS_rrtmgp_lw ! Classes used by rte+rrtmgp !type(ty_gas_optics_rrtmgp) :: & ! kdist_lw - type(ty_cloud_optics) :: & - kdist_lw_cldy + !type(ty_cloud_optics) :: & + ! kdist_lw_cldy type(ty_gas_concs) :: & - gas_concs_lw + gas_concentrations public GFS_rrtmgp_lw_init, GFS_rrtmgp_lw_run, GFS_rrtmgp_lw_finalize contains @@ -67,18 +67,20 @@ module GFS_rrtmgp_lw ! GFS_rrtmgp_lw_init ! ######################################################################################### !! \section arg_table_GFS_rrtmgp_lw_init Argument Table -!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | -!! |-----------------|------------------------------------------|--------------------------------------------------------------------|-------|------|---------------------------|-----------|--------|----------| -!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | -!! | mpirank | mpi_rank | current MPI rank | index | 0 | integer | | in | F | -!! | mpiroot | mpi_root | master MPI rank | index | 0 | integer | | in | F | -!! | mpicomm | mpi_comm | MPI communicator | index | 0 | integer | | in | F | -!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | -!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | -!! | kdist_lw | K_distribution_file_for_RRTMGP_LW_scheme | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp_type | | inout | F | +!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | +!! |--------------------|-------------------------------------------------|---------------------------------------------------------------------------|-------|------|---------------------------|-----------|--------|----------| +!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | +!! | mpirank | mpi_rank | current MPI rank | index | 0 | integer | | in | F | +!! | mpiroot | mpi_root | master MPI rank | index | 0 | integer | | in | F | +!! | mpicomm | mpi_comm | MPI communicator | index | 0 | integer | | in | F | +!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | +!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! | kdist_lw | K_distribution_file_for_RRTMGP_LW_scheme | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp_type | | inout | F | +!! | kdist_lw_cldy | K_distribution_file_for_cloudy_RRTMGP_LW_scheme | DDT containing spectral information for cloudy RRTMGP LW radiation scheme | DDT | 0 | ty_cloud_optics_type | | inout | F | !! ! ######################################################################################### - subroutine GFS_rrtmgp_lw_init(Model,mpicomm, mpirank, mpiroot, kdist_lw, errmsg, errflg) + subroutine GFS_rrtmgp_lw_init(Model,mpicomm, mpirank, mpiroot, kdist_lw, kdist_lw_cldy, & + errmsg, errflg) use netcdf #ifdef MPI @@ -94,6 +96,11 @@ subroutine GFS_rrtmgp_lw_init(Model,mpicomm, mpirank, mpiroot, kdist_lw, errmsg, mpiroot ! Master MPI rank type(ty_gas_optics_rrtmgp_type),intent(inout) :: & kdist_lw + type(ty_cloud_optics_type),intent(inout) :: & + kdist_lw_cldy +! type(ty_gas_concs_type),intent(inout) :: & +! gas_concentrations + ! Outputs character(len=*), intent(out) :: & errmsg ! Error message @@ -500,9 +507,9 @@ subroutine GFS_rrtmgp_lw_init(Model,mpicomm, mpirank, mpiroot, kdist_lw, errmsg, ! Initialize gas concentrations and gas optics class with data do iGas=1,nGases - call check_error_msg(gas_concs_lw%set_vmr(active_gases(iGas), 0._kind_phys)) + call check_error_msg(gas_concentrations%set_vmr(active_gases(iGas), 0._kind_phys)) enddo - call check_error_msg(kdist_lw%load(gas_concs_lw, gas_names, key_species, band2gpt, & + call check_error_msg(kdist_lw%load(gas_concentrations, gas_names, key_species, band2gpt, & band_lims, press_ref, press_ref_trop, temp_ref, temp_ref_p, temp_ref_t, & vmr_ref, kmajor, kminor_lower, kminor_upper, gas_minor,identifier_minor, & minor_gases_lower, minor_gases_upper, minor_limits_gpt_lower, & @@ -774,12 +781,13 @@ end subroutine GFS_rrtmgp_lw_init !! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | !! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | !! | kdist_lw | K_distribution_file_for_RRTMGP_LW_scheme | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp_type | | in | F | +!! | kdist_lw_cldy | K_distribution_file_for_cloudy_RRTMGP_LW_scheme | DDT containing spectral information for cloudy RRTMGP LW radiation scheme | DDT | 0 | ty_cloud_optics_type | | inout | F | !! ! ######################################################################################### subroutine GFS_rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr_n2o, & ! IN vmr_ch4, vmr_o2, vmr_co, vmr_cfc11, vmr_cfc12, vmr_cfc22, vmr_ccl4, icseed, tau_aer, & ! IN ssa_aer, sfc_emiss, skt, dzlyr, delpin, de_lgth, ncol, nlay, lprint, cldfrac, lslwr, & ! IN - kdist_lw, & + kdist_lw, kdist_lw_cldy, & hlwc, topflx, sfcflx, cldtau, & ! OUT hlw0, hlwb, flxprf, & ! OPT(out) cld_lwp, cld_ref_liq, cld_iwp, cld_ref_ice, cld_rwp, cld_ref_rain, cld_swp, & ! OPT(in) @@ -799,6 +807,10 @@ subroutine GFS_rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, lslwr ! Flag to calculate RRTMGP LW? (1) type(ty_gas_optics_rrtmgp_type),intent(in) :: & kdist_lw ! DDT containing LW spectral information + type(ty_cloud_optics_type),intent(in) :: & + kdist_lw_cldy +! type(ty_gas_concs_type),intent(inout) :: & +! gas_concentrations real(kind_phys), dimension(ncol), intent(in) :: & sfc_emiss, & ! Surface emissivity (1) skt, & ! Surface(skin) temperature (K) @@ -1018,13 +1030,13 @@ subroutine GFS_rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, ! ####################################################################################### ! Set gas concentrations ! ####################################################################################### - call gas_concs_lw%reset() - call check_error_msg(gas_concs_lw%set_vmr('o2', vmr_o2)) - call check_error_msg(gas_concs_lw%set_vmr('co2', vmr_co2)) - call check_error_msg(gas_concs_lw%set_vmr('ch4', vmr_ch4)) - call check_error_msg(gas_concs_lw%set_vmr('n2o', vmr_n2o)) - call check_error_msg(gas_concs_lw%set_vmr('h2o', vmr_h2o)) - call check_error_msg(gas_concs_lw%set_vmr('o3', vmr_o3)) + call gas_concentrations%reset() + call check_error_msg(gas_concentrations%set_vmr('o2', vmr_o2)) + call check_error_msg(gas_concentrations%set_vmr('co2', vmr_co2)) + call check_error_msg(gas_concentrations%set_vmr('ch4', vmr_ch4)) + call check_error_msg(gas_concentrations%set_vmr('n2o', vmr_n2o)) + call check_error_msg(gas_concentrations%set_vmr('h2o', vmr_h2o)) + call check_error_msg(gas_concentrations%set_vmr('o3', vmr_o3)) ! ####################################################################################### ! Copy aerosol to RRTMGP DDT @@ -1096,7 +1108,7 @@ subroutine GFS_rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, ! ####################################################################################### call check_error_msg(rte_lw( & kdist_lw, & - gas_concs_lw, & + gas_concentrations, & p_lay(1:ncol,1:nlay), & t_lay(1:ncol,1:nlay), & p_lev(1:ncol,1:nlay+1), & diff --git a/physics/GFS_rrtmgp_pre.F90 b/physics/GFS_rrtmgp_pre.F90 index 6d6916b8b..fcc4cf0fe 100644 --- a/physics/GFS_rrtmgp_pre.F90 +++ b/physics/GFS_rrtmgp_pre.F90 @@ -77,13 +77,14 @@ end subroutine GFS_rrtmgp_pre_init !! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | !! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | !! | kdist_lw | K_distribution_file_for_RRTMGP_LW_scheme | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp_type | | in | F | +!! | kdist_sw | K_distribution_file_for_RRTMGP_SW_scheme | DDT containing spectral information for RRTMGP SW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp_type | | in | F | !! ! Attention - the output arguments lm, im, lmk, lmp must not be set ! in the CCPP version - they are defined in the interstitial_create routine ! ######################################################################################### subroutine GFS_rrtmgp_pre_run (Model, Grid, Sfcprop, Statein, Tbd, Cldprop, Coupling, & ! IN Radtend, & ! INOUT - lm, im, lmk, lmp, kdist_lw, & ! IN + lm, im, lmk, lmp, kdist_lw, kdist_sw, & ! IN kd, kt, kb, raddt, delp, dz, plvl, plyr, tlvl, tlyr, tsfg, tsfa, qlyr, olyr, & ! OUT gasvmr_co2, gasvmr_n2o, gasvmr_ch4, gasvmr_o2, gasvmr_co, gasvmr_cfc11, & ! OUT gasvmr_cfc12, gasvmr_cfc22, gasvmr_ccl4, gasvmr_cfc113, faersw1, faersw2, faersw3, & ! OUT @@ -138,14 +139,9 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Sfcprop, Statein, Tbd, Cldprop, Coup progclduni ! Unified cloud-scheme use surface_perturbation, only: & cdfnor ! Routine to compute CDF (used to compute percentiles) - ! RRTMGP stuff + ! RRTMGP types use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp_type - use GFS_rrtmgp_lw, only: & - nBandsLW!, & ! Number of LW bands in RRTMGP - !kdist_lw ! DDT contining LW spectral information - use GFS_rrtmgp_sw, only: & - nBandsSW, & ! Number of SW bands in RRTMGP - kdist_sw ! DDT contining SW spectral information + implicit none ! Inputs @@ -158,7 +154,9 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Sfcprop, Statein, Tbd, Cldprop, Coup type(GFS_cldprop_type), intent(in) :: Cldprop type(GFS_coupling_type), intent(in) :: Coupling integer, intent(in) :: im, lm, lmk, lmp - type(ty_gas_optics_rrtmgp_type),intent(in) :: kdist_lw + type(ty_gas_optics_rrtmgp_type),intent(in) :: & + kdist_lw, & ! RRTMGP DDT containing spectral information for LW calculation + kdist_sw ! RRTMGP DDT containing spectral information for SW calculation ! Outputs integer, intent(out) :: kd, kt, kb @@ -172,9 +170,9 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Sfcprop, Statein, Tbd, Cldprop, Coup clouds6, clouds7, clouds8, clouds9 real(kind_phys), dimension(size(Grid%xlon,1),Model%levr+1+LTP), intent(out) :: & plvl, tlvl - real(kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,nBandsSW), intent(out) :: & + real(kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,kdist_sw%get_nband()), intent(out) :: & faersw1, faersw2, faersw3 - real(kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,nBandsLW), intent(out) :: & + real(kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,kdist_lw%get_nband()), intent(out) :: & faerlw1, faerlw2, faerlw3 real(kind_phys), dimension(size(Grid%xlon,1),NSPC1), intent(out) :: & aerodp @@ -200,8 +198,8 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Sfcprop, Statein, Tbd, Cldprop, Coup real(kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,2:Model%ntrac) :: tracer1 real(kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,NF_CLDS) :: clouds real(kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,NF_VGAS) :: gasvmr - real(kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,nBandsSW,NF_AESW)::faersw - real(kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,nBandsLW,NF_AELW)::faerlw + real(kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,kdist_sw%get_nband(),NF_AESW)::faersw + real(kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,kdist_lw%get_nband(),NF_AELW)::faerlw ! Initialize CCPP error handling variables errmsg = '' @@ -468,16 +466,16 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Sfcprop, Statein, Tbd, Cldprop, Coup ! SW. ! For RRTMGP SW the bands are now ordered from [IR(band) -> nIR -> UV], in RRTMG the ! band ordering was [nIR -> UV -> IR(band)] - faersw1(1:IM,1:LMK,1) = faersw(1:IM,1:LMK,nBandsSW,1) - faersw2(1:IM,1:LMK,1) = faersw(1:IM,1:LMK,nBandsSW,2) - faersw3(1:IM,1:LMK,1) = faersw(1:IM,1:LMK,nBandsSW,3) - faersw1(1:IM,1:LMK,2:nBandsSW) = faersw(1:IM,1:LMK,1:nBandsSW-1,1) - faersw2(1:IM,1:LMK,2:nBandsSW) = faersw(1:IM,1:LMK,1:nBandsSW-1,2) - faersw3(1:IM,1:LMK,2:nBandsSW) = faersw(1:IM,1:LMK,1:nBandsSW-1,3) + faersw1(1:IM,1:LMK,1) = faersw(1:IM,1:LMK,kdist_sw%get_nband(),1) + faersw2(1:IM,1:LMK,1) = faersw(1:IM,1:LMK,kdist_sw%get_nband(),2) + faersw3(1:IM,1:LMK,1) = faersw(1:IM,1:LMK,kdist_sw%get_nband(),3) + faersw1(1:IM,1:LMK,2:kdist_sw%get_nband()) = faersw(1:IM,1:LMK,1:kdist_sw%get_nband()-1,1) + faersw2(1:IM,1:LMK,2:kdist_sw%get_nband()) = faersw(1:IM,1:LMK,1:kdist_sw%get_nband()-1,2) + faersw3(1:IM,1:LMK,2:kdist_sw%get_nband()) = faersw(1:IM,1:LMK,1:kdist_sw%get_nband()-1,3) ! LW - faerlw1(1:IM,1:LMK,1:nBandsLW) = faerlw(1:IM,1:LMK,1:nBandsLW,1) - faerlw2(1:IM,1:LMK,1:nBandsLW) = faerlw(1:IM,1:LMK,1:nBandsLW,2) - faerlw3(1:IM,1:LMK,1:nBandsLW) = faerlw(1:IM,1:LMK,1:nBandsLW,3) + faerlw1(1:IM,1:LMK,1:kdist_lw%get_nband()) = faerlw(1:IM,1:LMK,1:kdist_lw%get_nband(),1) + faerlw2(1:IM,1:LMK,1:kdist_lw%get_nband()) = faerlw(1:IM,1:LMK,1:kdist_lw%get_nband(),2) + faerlw3(1:IM,1:LMK,1:kdist_lw%get_nband()) = faerlw(1:IM,1:LMK,1:kdist_lw%get_nband(),3) ! Obtain cloud information for radiation calculations ! (clouds,cldsa,mtopa,mbota) diff --git a/physics/GFS_rrtmgp_sw.F90 b/physics/GFS_rrtmgp_sw.F90 index e4aa55b4b..f761306db 100644 --- a/physics/GFS_rrtmgp_sw.F90 +++ b/physics/GFS_rrtmgp_sw.F90 @@ -5,7 +5,8 @@ module GFS_rrtmgp_sw use physparam, only: iovrsw, icldflg, iswcliq, isubcsw use machine, only: kind_phys use mo_rte_kind, only: wl - use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp + use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp_type + use mo_cloud_optics, only: ty_cloud_optics_type use mo_gas_concentrations, only: ty_gas_concs use mo_fluxes, only: ty_fluxes_broadband use mo_fluxes_byband, only: ty_fluxes_byband @@ -16,7 +17,6 @@ module GFS_rrtmgp_sw use mo_rrtmgp_sw_cloud_optics, only: rrtmgp_sw_cloud_optics,mcica_subcol_sw use mo_cloud_sampling, only: sampled_mask_max_ran, sampled_mask_exp_ran, draw_samples use mersenne_twister, only: random_setseed, random_number, random_stat - use mo_cloud_optics, only: ty_cloud_optics use mo_rrtmgp_clr_all_sky, only: rte_sw implicit none @@ -55,12 +55,12 @@ module GFS_rrtmgp_sw ipsdsw0 ! Initial seed for McICA ! Classes used by rte+rrtmgp - type(ty_gas_optics_rrtmgp) :: & - kdist_sw - type(ty_cloud_optics) :: & - kdist_sw_cldy +! type(ty_gas_optics_rrtmgp_type) :: & +! kdist_sw +! type(ty_cloud_optics) :: & +! kdist_sw_cldy type(ty_gas_concs) :: & - gas_concs_sw + gas_concentrations public GFS_rrtmgp_sw_init, GFS_rrtmgp_sw_run, GFS_rrtmgp_sw_finalize contains @@ -68,17 +68,20 @@ module GFS_rrtmgp_sw ! GFS_rrtmgp_sw_init ! ######################################################################################### !! \section arg_table_GFS_rrtmgp_sw_init Argument Table -!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | -!! |-----------------|---------------------------|---------------------------------------------------------|-------|------|------------------|-----------|--------|----------| -!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | -!! | mpirank | mpi_rank | current MPI rank | index | 0 | integer | | in | F | -!! | mpiroot | mpi_root | master MPI rank | index | 0 | integer | | in | F | -!! | mpicomm | mpi_comm | MPI communicator | index | 0 | integer | | in | F | -!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | -!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | +!! |-----------------|-------------------------------------------------|--------------------------------------------------------------------|-------|------|---------------------------|-----------|--------|----------| +!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | +!! | mpirank | mpi_rank | current MPI rank | index | 0 | integer | | in | F | +!! | mpiroot | mpi_root | master MPI rank | index | 0 | integer | | in | F | +!! | mpicomm | mpi_comm | MPI communicator | index | 0 | integer | | in | F | +!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | +!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! | kdist_sw | K_distribution_file_for_RRTMGP_SW_scheme | DDT containing spectral information for RRTMGP SW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp_type | | inout | F | +!! | kdist_sw_cldy | K_distribution_file_for_cloudy_RRTMGP_SW_scheme | DDT containing spectral information for cloudy RRTMGP SW radiation scheme | DDT | 0 | ty_cloud_optics_type | | inout | F | !! ! ######################################################################################### - subroutine GFS_rrtmgp_sw_init(Model,mpicomm, mpirank, mpiroot, errmsg, errflg) + subroutine GFS_rrtmgp_sw_init(Model,mpicomm, mpirank, mpiroot, kdist_sw, kdist_sw_cldy, & + errmsg, errflg) use netcdf #ifdef MPI use mpi @@ -90,6 +93,12 @@ subroutine GFS_rrtmgp_sw_init(Model,mpicomm, mpirank, mpiroot, errmsg, errflg) mpicomm, & ! MPI communicator mpirank, & ! Current MPI rank mpiroot ! Master MPI rank + type(ty_gas_optics_rrtmgp_type) :: & + kdist_sw ! RRTMGP DDT containing SW spectral information + type(ty_cloud_optics_type) :: & + kdist_sw_cldy +! type(ty_gas_concs_type),intent(inout) :: & +! gas_concentrations ! Outputs character(len=*), intent(out) :: & errmsg ! Error message @@ -495,9 +504,9 @@ subroutine GFS_rrtmgp_sw_init(Model,mpicomm, mpirank, mpiroot, errmsg, errflg) ! Initialize gas concentrations and gas optics class with data do iGas=1,nGases - call check_error_msg(gas_concs_sw%set_vmr(active_gases(iGas), 0._kind_phys)) + call check_error_msg(gas_concentrations%set_vmr(active_gases(iGas), 0._kind_phys)) enddo - call check_error_msg(kdist_sw%load(gas_concs_sw, gas_names_sw, key_species_sw, band2gpt_sw, & + call check_error_msg(kdist_sw%load(gas_concentrations, gas_names_sw, key_species_sw, band2gpt_sw, & band_lims_sw, press_ref_sw, press_ref_trop_sw, temp_ref_sw, temp_ref_p_sw, temp_ref_t_sw, & vmr_ref_sw, kmajor_sw, kminor_lower_sw, kminor_upper_sw, gas_minor_sw,identifier_minor_sw, & minor_gases_lower_sw, minor_gases_upper_sw, minor_limits_gpt_lower_sw, & @@ -719,70 +728,72 @@ end subroutine GFS_rrtmgp_sw_init ! GFS_RRTMGP_SW_RUN ! ######################################################################################### !! \section arg_table_GFS_rrtmgp_sw_run Argument Table -!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | -!! |-----------------|------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------|---------|------|-------------|-----------|--------|----------| -!! | p_lay | air_pressure_at_layer_for_radiation_in_hPa | air pressure layer | hPa | 2 | real | kind_phys | in | F | -!! | p_lev | air_pressure_at_interface_for_radiation_in_hPa | air pressure level | hPa | 2 | real | kind_phys | in | F | -!! | t_lay | air_temperature_at_layer_for_radiation | air temperature layer | K | 2 | real | kind_phys | in | F | -!! | t_lev | air_temperature_at_interface_for_radiation | air temperature level | K | 2 | real | kind_phys | in | F | -!! | q_lay | water_vapor_specific_humidity_at_layer_for_radiation | specific humidity layer | kg kg-1 | 2 | real | kind_phys | in | F | -!! | o3_lay | ozone_concentration_at_layer_for_radiation | ozone concentration layer | kg kg-1 | 2 | real | kind_phys | in | F | -!! | vmr_co2 | volume_mixing_ratio_co2 | volume mixing ratio co2 | kg kg-1 | 2 | real | kind_phys | in | F | -!! | vmr_n2o | volume_mixing_ratio_n2o | volume mixing ratio no2 | kg kg-1 | 2 | real | kind_phys | in | F | -!! | vmr_ch4 | volume_mixing_ratio_ch4 | volume mixing ratio ch4 | kg kg-1 | 2 | real | kind_phys | in | F | -!! | vmr_o2 | volume_mixing_ratio_o2 | volume mixing ratio o2 | kg kg-1 | 2 | real | kind_phys | in | F | -!! | vmr_co | volume_mixing_ratio_co | volume mixing ratio co | kg kg-1 | 2 | real | kind_phys | in | F | -!! | vmr_cfc11 | volume_mixing_ratio_cfc11 | volume mixing ratio cfc11 | kg kg-1 | 2 | real | kind_phys | in | F | -!! | vmr_cfc12 | volume_mixing_ratio_cfc12 | volume mixing ratio cfc12 | kg kg-1 | 2 | real | kind_phys | in | F | -!! | vmr_cfc22 | volume_mixing_ratio_cfc22 | volume mixing ratio cfc22 | kg kg-1 | 2 | real | kind_phys | in | F | -!! | vmr_ccl4 | volume_mixing_ratio_ccl4 | volume mixing ratio ccl4 | kg kg-1 | 2 | real | kind_phys | in | F | -!! | icseed | seed_random_numbers_sw | seed for random number generation for shortwave radiation | none | 1 | integer | | in | F | -!! | tau_aer | aerosol_optical_depth_for_longwave_bands_01-16 | aerosol optical depth for shortwave bands 01-16 | none | 3 | real | kind_phys | in | F | -!! | ssa_aer | aerosol_single_scattering_albedo_for_longwave_bands_01-16 | aerosol single scattering albedo for shortwave bands 01-16 | frac | 3 | real | kind_phys | in | F | -!! | asy_aer | aerosol_asymmetry_parameter_for_shortwave_bands_01-16 | aerosol asymmetry paramter for shortwave bands 01-16 | none | 3 | real | kind_phys | in | F | -!! | sfcalb_nir_dir | surface_albedo_due_to_near_IR_direct | surface albedo due to near IR direct beam | frac | 1 | real | kind_phys | in | F | -!! | sfcalb_nir_dif | surface_albedo_due_to_near_IR_diffused | surface albedo due to near IR diffused beam | frac | 1 | real | kind_phys | in | F | -!! | sfcalb_uvis_dir | surface_albedo_due_to_UV_and_VIS_direct | surface albedo due to UV+VIS direct beam | frac | 1 | real | kind_phys | in | F | -!! | sfcalb_uvis_dif | surface_albedo_due_to_UV_and_VIS_diffused | surface albedo due to UV+VIS diffused beam | frac | 1 | real | kind_phys | in | F | -!! | dzlyr | layer_thickness_for_radiation | layer thickness | km | 2 | real | kind_phys | in | F | -!! | delpin | layer_pressure_thickness_for_radiation | layer pressure thickness | hPa | 2 | real | kind_phys | in | F | -!! | de_lgth | cloud_decorrelation_length | cloud decorrelation length | km | 1 | real | kind_phys | in | F | -!! | cossza | cosine_of_zenith_angle | cosine of the solar zenit angle | none | 1 | real | kind_phys | in | F | -!! | solcon | solar_constant | solar constant | W m-2 | 0 | real | kind_phys | in | F | -!! | nday | daytime_points_dimension | daytime points dimension | count | 0 | integer | | in | F | -!! | idxday | daytime_points | daytime points | index | 1 | integer | | in | F | -!! | ncol | horizontal_loop_extent | horizontal dimension | count | 0 | integer | | in | F | -!! | nlay | adjusted_vertical_layer_dimension_for_radiation | number of vertical layers for radiation | count | 0 | integer | | in | F | -!! | lprint | flag_print | flag to print | flag | 0 | logical | | in | F | -!! | cldfrac | total_cloud_fraction | total cloud fraction | frac | 2 | real | kind_phys | in | F | -!! | lsswr | flag_to_calc_sw | flag to calculate SW irradiances | flag | 0 | logical | | in | F | -!! | hswc | tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step | shortwave total sky heating rate | K s-1 | 2 | real | kind_phys | inout | F | -!! | topflx | sw_fluxes_top_atmosphere | shortwave total sky fluxes at the top of the atm | W m-2 | 1 | topfsw_type | | inout | F | -!! | sfcflx | sw_fluxes_sfc | shortwave total sky fluxes at the Earth surface | W m-2 | 1 | sfcfsw_type | | inout | F | -!! | cldtau | cloud_optical_depth_layers_at_0.55mu_band | approx .55mu band layer cloud optical depth | none | 2 | real | kind_phys | inout | F | -!! | hsw0 | tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_time_step | shortwave clear sky heating rate | K s-1 | 2 | real | kind_phys | inout | T | -!! | hswb | sw_heating_rate_spectral | shortwave total sky heating rate (spectral) | K s-1 | 3 | real | kind_phys | inout | T | -!! | flxprf | sw_fluxes | sw fluxes total sky / csk and up / down at levels | W m-2 | 2 | profsw_type | | inout | T | -!! | fdncmp | components_of_surface_downward_shortwave_fluxes | derived type for special components of surface downward shortwave fluxes | W m-2 | 1 | cmpfsw_type | | inout | T | -!! | cld_lwp | cloud_liquid_water_path | cloud liquid water path | g m-2 | 2 | real | kind_phys | in | T | -!! | cld_ref_liq | mean_effective_radius_for_liquid_cloud | mean effective radius for liquid cloud | micron | 2 | real | kind_phys | in | T | -!! | cld_iwp | cloud_ice_water_path | cloud ice water path | g m-2 | 2 | real | kind_phys | in | T | -!! | cld_ref_ice | mean_effective_radius_for_ice_cloud | mean effective radius for ice cloud | micron | 2 | real | kind_phys | in | T | -!! | cld_rwp | cloud_rain_water_path | cloud rain water path | g m-2 | 2 | real | kind_phys | in | T | -!! | cld_ref_rain | mean_effective_radius_for_rain_drop | mean effective radius for rain drop | micron | 2 | real | kind_phys | in | T | -!! | cld_swp | cloud_snow_water_path | cloud snow water path | g m-2 | 2 | real | kind_phys | in | T | -!! | cld_ref_snow | mean_effective_radius_for_snow_flake | mean effective radius for snow flake | micron | 2 | real | kind_phys | in | T | -!! | cld_od | cloud_optical_depth | cloud optical depth | none | 2 | real | kind_phys | in | T | -!! | cld_ssa | cloud_single_scattering_albedo | cloud single scattering albedo | frac | 2 | real | kind_phys | in | T | -!! | cld_asy | cloud_asymmetry_parameter | cloud asymmetry parameter | none | 2 | real | kind_phys | in | T | -!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | -!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | +!! |-----------------|------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------|---------|------|---------------------------|-----------|--------|----------| +!! | p_lay | air_pressure_at_layer_for_radiation_in_hPa | air pressure layer | hPa | 2 | real | kind_phys | in | F | +!! | p_lev | air_pressure_at_interface_for_radiation_in_hPa | air pressure level | hPa | 2 | real | kind_phys | in | F | +!! | t_lay | air_temperature_at_layer_for_radiation | air temperature layer | K | 2 | real | kind_phys | in | F | +!! | t_lev | air_temperature_at_interface_for_radiation | air temperature level | K | 2 | real | kind_phys | in | F | +!! | q_lay | water_vapor_specific_humidity_at_layer_for_radiation | specific humidity layer | kg kg-1 | 2 | real | kind_phys | in | F | +!! | o3_lay | ozone_concentration_at_layer_for_radiation | ozone concentration layer | kg kg-1 | 2 | real | kind_phys | in | F | +!! | vmr_co2 | volume_mixing_ratio_co2 | volume mixing ratio co2 | kg kg-1 | 2 | real | kind_phys | in | F | +!! | vmr_n2o | volume_mixing_ratio_n2o | volume mixing ratio no2 | kg kg-1 | 2 | real | kind_phys | in | F | +!! | vmr_ch4 | volume_mixing_ratio_ch4 | volume mixing ratio ch4 | kg kg-1 | 2 | real | kind_phys | in | F | +!! | vmr_o2 | volume_mixing_ratio_o2 | volume mixing ratio o2 | kg kg-1 | 2 | real | kind_phys | in | F | +!! | vmr_co | volume_mixing_ratio_co | volume mixing ratio co | kg kg-1 | 2 | real | kind_phys | in | F | +!! | vmr_cfc11 | volume_mixing_ratio_cfc11 | volume mixing ratio cfc11 | kg kg-1 | 2 | real | kind_phys | in | F | +!! | vmr_cfc12 | volume_mixing_ratio_cfc12 | volume mixing ratio cfc12 | kg kg-1 | 2 | real | kind_phys | in | F | +!! | vmr_cfc22 | volume_mixing_ratio_cfc22 | volume mixing ratio cfc22 | kg kg-1 | 2 | real | kind_phys | in | F | +!! | vmr_ccl4 | volume_mixing_ratio_ccl4 | volume mixing ratio ccl4 | kg kg-1 | 2 | real | kind_phys | in | F | +!! | icseed | seed_random_numbers_sw | seed for random number generation for shortwave radiation | none | 1 | integer | | in | F | +!! | tau_aer | aerosol_optical_depth_for_longwave_bands_01-16 | aerosol optical depth for shortwave bands 01-16 | none | 3 | real | kind_phys | in | F | +!! | ssa_aer | aerosol_single_scattering_albedo_for_longwave_bands_01-16 | aerosol single scattering albedo for shortwave bands 01-16 | frac | 3 | real | kind_phys | in | F | +!! | asy_aer | aerosol_asymmetry_parameter_for_shortwave_bands_01-16 | aerosol asymmetry paramter for shortwave bands 01-16 | none | 3 | real | kind_phys | in | F | +!! | sfcalb_nir_dir | surface_albedo_due_to_near_IR_direct | surface albedo due to near IR direct beam | frac | 1 | real | kind_phys | in | F | +!! | sfcalb_nir_dif | surface_albedo_due_to_near_IR_diffused | surface albedo due to near IR diffused beam | frac | 1 | real | kind_phys | in | F | +!! | sfcalb_uvis_dir | surface_albedo_due_to_UV_and_VIS_direct | surface albedo due to UV+VIS direct beam | frac | 1 | real | kind_phys | in | F | +!! | sfcalb_uvis_dif | surface_albedo_due_to_UV_and_VIS_diffused | surface albedo due to UV+VIS diffused beam | frac | 1 | real | kind_phys | in | F | +!! | dzlyr | layer_thickness_for_radiation | layer thickness | km | 2 | real | kind_phys | in | F | +!! | delpin | layer_pressure_thickness_for_radiation | layer pressure thickness | hPa | 2 | real | kind_phys | in | F | +!! | de_lgth | cloud_decorrelation_length | cloud decorrelation length | km | 1 | real | kind_phys | in | F | +!! | cossza | cosine_of_zenith_angle | cosine of the solar zenit angle | none | 1 | real | kind_phys | in | F | +!! | solcon | solar_constant | solar constant | W m-2 | 0 | real | kind_phys | in | F | +!! | nday | daytime_points_dimension | daytime points dimension | count | 0 | integer | | in | F | +!! | idxday | daytime_points | daytime points | index | 1 | integer | | in | F | +!! | ncol | horizontal_loop_extent | horizontal dimension | count | 0 | integer | | in | F | +!! | nlay | adjusted_vertical_layer_dimension_for_radiation | number of vertical layers for radiation | count | 0 | integer | | in | F | +!! | lprint | flag_print | flag to print | flag | 0 | logical | | in | F | +!! | cldfrac | total_cloud_fraction | total cloud fraction | frac | 2 | real | kind_phys | in | F | +!! | lsswr | flag_to_calc_sw | flag to calculate SW irradiances | flag | 0 | logical | | in | F | +!! | hswc | tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step | shortwave total sky heating rate | K s-1 | 2 | real | kind_phys | inout | F | +!! | topflx | sw_fluxes_top_atmosphere | shortwave total sky fluxes at the top of the atm | W m-2 | 1 | topfsw_type | | inout | F | +!! | sfcflx | sw_fluxes_sfc | shortwave total sky fluxes at the Earth surface | W m-2 | 1 | sfcfsw_type | | inout | F | +!! | cldtau | cloud_optical_depth_layers_at_0.55mu_band | approx .55mu band layer cloud optical depth | none | 2 | real | kind_phys | inout | F | +!! | hsw0 | tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_time_step | shortwave clear sky heating rate | K s-1 | 2 | real | kind_phys | inout | T | +!! | hswb | sw_heating_rate_spectral | shortwave total sky heating rate (spectral) | K s-1 | 3 | real | kind_phys | inout | T | +!! | flxprf | sw_fluxes | sw fluxes total sky / csk and up / down at levels | W m-2 | 2 | profsw_type | | inout | T | +!! | fdncmp | components_of_surface_downward_shortwave_fluxes | derived type for special components of surface downward shortwave fluxes | W m-2 | 1 | cmpfsw_type | | inout | T | +!! | cld_lwp | cloud_liquid_water_path | cloud liquid water path | g m-2 | 2 | real | kind_phys | in | T | +!! | cld_ref_liq | mean_effective_radius_for_liquid_cloud | mean effective radius for liquid cloud | micron | 2 | real | kind_phys | in | T | +!! | cld_iwp | cloud_ice_water_path | cloud ice water path | g m-2 | 2 | real | kind_phys | in | T | +!! | cld_ref_ice | mean_effective_radius_for_ice_cloud | mean effective radius for ice cloud | micron | 2 | real | kind_phys | in | T | +!! | cld_rwp | cloud_rain_water_path | cloud rain water path | g m-2 | 2 | real | kind_phys | in | T | +!! | cld_ref_rain | mean_effective_radius_for_rain_drop | mean effective radius for rain drop | micron | 2 | real | kind_phys | in | T | +!! | cld_swp | cloud_snow_water_path | cloud snow water path | g m-2 | 2 | real | kind_phys | in | T | +!! | cld_ref_snow | mean_effective_radius_for_snow_flake | mean effective radius for snow flake | micron | 2 | real | kind_phys | in | T | +!! | cld_od | cloud_optical_depth | cloud optical depth | none | 2 | real | kind_phys | in | T | +!! | cld_ssa | cloud_single_scattering_albedo | cloud single scattering albedo | frac | 2 | real | kind_phys | in | T | +!! | cld_asy | cloud_asymmetry_parameter | cloud asymmetry parameter | none | 2 | real | kind_phys | in | T | +!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | +!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! | kdist_sw | K_distribution_file_for_RRTMGP_SW_scheme | DDT containing spectral information for RRTMGP SW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp_type | | in | F | +!! | kdist_sw_cldy | K_distribution_file_for_cloudy_RRTMGP_SW_scheme | DDT containing spectral information for cloudy RRTMGP SW radiation scheme | DDT | 0 | ty_cloud_optics_type | | inout | F | !! - subroutine GFS_rrtmgp_sw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr_n2o, & ! IN + subroutine GFS_rrtmgp_sw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr_n2o, & ! IN vmr_ch4, vmr_o2, vmr_co, vmr_cfc11, vmr_cfc12, vmr_cfc22, vmr_ccl4, icseed, tau_aer, & ! IN ssa_aer, asy_aer, sfcalb_nir_dir, sfcalb_nir_dif, sfcalb_uvis_dir, sfcalb_uvis_dif, & ! IN dzlyr, delpin, de_lgth, cossza, solcon, nday, idxday, ncol, nlay, lprint, cldfrac, & ! IN - lsswr, & ! IN + lsswr, kdist_sw, kdist_sw_cldy, & ! IN hswc, topflx, sfcflx, cldtau, & ! OUT hsw0, hswB, flxprf, fdncmp, cld_lwp, cld_ref_liq, cld_iwp, cld_ref_ice, cld_rwp, & ! OUT(optional) cld_ref_rain, cld_swp, cld_ref_snow, cld_od, cld_ssa, cld_asy, & ! OUT(optional) @@ -803,6 +814,12 @@ subroutine GFS_rrtmgp_sw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, logical, intent(in) :: & lprint, & ! Control flag for diagnostics lsswr ! Flag to calculate RRTMGP SW? + type(ty_gas_optics_rrtmgp_type),intent(in) :: & + kdist_sw ! DDT containing LW spectral information + type(ty_cloud_optics_type),intent(in) :: & + kdist_sw_cldy +! type(ty_gas_concs_type),intent(inout) :: & +! gas_concentrations real(kind_phys), intent(in) :: & solcon ! Solar constant (W/m2) real(kind_phys), dimension(ncol), intent(in) :: & @@ -1084,13 +1101,13 @@ subroutine GFS_rrtmgp_sw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, ! ####################################################################################### ! Set gas concentrations ! ####################################################################################### - call gas_concs_sw%reset() - call check_error_msg(gas_concs_sw%set_vmr('o2', vmr_o2(idxday,1:nlay))) - call check_error_msg(gas_concs_sw%set_vmr('co2', vmr_co2(idxday,1:nlay))) - call check_error_msg(gas_concs_sw%set_vmr('ch4', vmr_ch4(idxday,1:nlay))) - call check_error_msg(gas_concs_sw%set_vmr('n2o', vmr_n2o(idxday,1:nlay))) - call check_error_msg(gas_concs_sw%set_vmr('h2o', vmr_h2o(idxday,1:nlay))) - call check_error_msg(gas_concs_sw%set_vmr('o3', vmr_o3(idxday,1:nlay))) + call gas_concentrations%reset() + call check_error_msg(gas_concentrations%set_vmr('o2', vmr_o2(idxday,1:nlay))) + call check_error_msg(gas_concentrations%set_vmr('co2', vmr_co2(idxday,1:nlay))) + call check_error_msg(gas_concentrations%set_vmr('ch4', vmr_ch4(idxday,1:nlay))) + call check_error_msg(gas_concentrations%set_vmr('n2o', vmr_n2o(idxday,1:nlay))) + call check_error_msg(gas_concentrations%set_vmr('h2o', vmr_h2o(idxday,1:nlay))) + call check_error_msg(gas_concentrations%set_vmr('o3', vmr_o3(idxday,1:nlay))) ! ####################################################################################### ! Copy aerosol to RRTMG DDT @@ -1175,7 +1192,7 @@ subroutine GFS_rrtmgp_sw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, ! ####################################################################################### call check_error_msg(rte_sw( & kdist_sw, & - gas_concs_sw, & + gas_concentrations, & p_lay(idxday,1:nlay), & t_lay(idxday,1:nlay), & p_lev(idxday,1:nlay+1), & diff --git a/physics/rte-rrtmgp b/physics/rte-rrtmgp index f0748ad17..43b02b7ba 160000 --- a/physics/rte-rrtmgp +++ b/physics/rte-rrtmgp @@ -1 +1 @@ -Subproject commit f0748ad17030875a1acb9013139b679a8c5262f1 +Subproject commit 43b02b7ba21f5e2ef31da4f2411a519caf1546a3 From e0ca27264d26464241429da466ca5bf49ca20c9a Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Fri, 10 May 2019 10:58:06 -0600 Subject: [PATCH 021/167] Added metadata tables for DDTs. In CCPP/physics, started seperating pieces from suite-level to scheme level. --- physics/GFS_rrtmgp_lw.F90 | 143 +++++++++++++++++----------------- physics/GFS_rrtmgp_pre.F90 | 8 +- physics/GFS_rrtmgp_sw.F90 | 154 ++++++++++++++++++------------------- physics/rrtmgp_lw_main.F90 | 68 ++++++++++++++++ physics/rrtmgp_lw_pre.F90 | 78 +++++++++++++++++++ 5 files changed, 299 insertions(+), 152 deletions(-) create mode 100644 physics/rrtmgp_lw_main.F90 create mode 100644 physics/rrtmgp_lw_pre.F90 diff --git a/physics/GFS_rrtmgp_lw.F90 b/physics/GFS_rrtmgp_lw.F90 index c14481543..5004e419b 100644 --- a/physics/GFS_rrtmgp_lw.F90 +++ b/physics/GFS_rrtmgp_lw.F90 @@ -8,8 +8,8 @@ module GFS_rrtmgp_lw use mo_source_functions, only: ty_source_func_lw use mo_rte_kind, only: wl use mo_heating_rates, only: compute_heating_rate - use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp_type - use mo_cloud_optics, only: ty_cloud_optics_type + use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp + use mo_cloud_optics, only: ty_cloud_optics use mo_cloud_sampling, only: sampled_mask_max_ran, sampled_mask_exp_ran, draw_samples use machine, only: kind_phys use module_radlw_parameters, only: topflw_type, sfcflw_type, proflw_type @@ -67,16 +67,16 @@ module GFS_rrtmgp_lw ! GFS_rrtmgp_lw_init ! ######################################################################################### !! \section arg_table_GFS_rrtmgp_lw_init Argument Table -!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | -!! |--------------------|-------------------------------------------------|---------------------------------------------------------------------------|-------|------|---------------------------|-----------|--------|----------| -!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | -!! | mpirank | mpi_rank | current MPI rank | index | 0 | integer | | in | F | -!! | mpiroot | mpi_root | master MPI rank | index | 0 | integer | | in | F | -!! | mpicomm | mpi_comm | MPI communicator | index | 0 | integer | | in | F | -!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | -!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | -!! | kdist_lw | K_distribution_file_for_RRTMGP_LW_scheme | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp_type | | inout | F | -!! | kdist_lw_cldy | K_distribution_file_for_cloudy_RRTMGP_LW_scheme | DDT containing spectral information for cloudy RRTMGP LW radiation scheme | DDT | 0 | ty_cloud_optics_type | | inout | F | +!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | +!! |--------------------|-------------------------------------------------|---------------------------------------------------------------------------|-------|------|----------------------|-----------|--------|----------| +!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | +!! | mpirank | mpi_rank | current MPI rank | index | 0 | integer | | in | F | +!! | mpiroot | mpi_root | master MPI rank | index | 0 | integer | | in | F | +!! | mpicomm | mpi_comm | MPI communicator | index | 0 | integer | | in | F | +!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | +!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! | kdist_lw | K_distribution_file_for_RRTMGP_LW_scheme | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | inout | F | +!! | kdist_lw_cldy | K_distribution_file_for_cloudy_RRTMGP_LW_scheme | DDT containing spectral information for cloudy RRTMGP LW radiation scheme | DDT | 0 | ty_cloud_optics | | inout | F | !! ! ######################################################################################### subroutine GFS_rrtmgp_lw_init(Model,mpicomm, mpirank, mpiroot, kdist_lw, kdist_lw_cldy, & @@ -94,9 +94,9 @@ subroutine GFS_rrtmgp_lw_init(Model,mpicomm, mpirank, mpiroot, kdist_lw, kdist_l mpicomm, & ! MPI communicator mpirank, & ! Current MPI rank mpiroot ! Master MPI rank - type(ty_gas_optics_rrtmgp_type),intent(inout) :: & + type(ty_gas_optics_rrtmgp),intent(inout) :: & kdist_lw - type(ty_cloud_optics_type),intent(inout) :: & + type(ty_cloud_optics),intent(inout) :: & kdist_lw_cldy ! type(ty_gas_concs_type),intent(inout) :: & ! gas_concentrations @@ -732,59 +732,59 @@ end subroutine GFS_rrtmgp_lw_init ! rrtmg_lw_run ! ######################################################################################### !! \section arg_table_GFS_rrtmgp_lw_run Argument Table -!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | -!! |-----------------|-----------------------------------------------------------------------------------------------|-----------------------------------------------------------|---------|------|-------------|-----------|--------|----------| -!! | p_lay | air_pressure_at_layer_for_radiation_in_hPa | air pressure layer | hPa | 2 | real | kind_phys | in | F | -!! | p_lev | air_pressure_at_interface_for_radiation_in_hPa | air pressure level | hPa | 2 | real | kind_phys | in | F | -!! | t_lay | air_temperature_at_layer_for_radiation | air temperature layer | K | 2 | real | kind_phys | in | F | -!! | t_lev | air_temperature_at_interface_for_radiation | air temperature level | K | 2 | real | kind_phys | in | F | -!! | q_lay | water_vapor_specific_humidity_at_layer_for_radiation | specific humidity layer | kg kg-1 | 2 | real | kind_phys | in | F | -!! | o3_lay | ozone_concentration_at_layer_for_radiation | ozone concentration layer | kg kg-1 | 2 | real | kind_phys | in | F | -!! | vmr_co2 | volume_mixing_ratio_co2 | volume mixing ratio co2 | kg kg-1 | 2 | real | kind_phys | in | F | -!! | vmr_n2o | volume_mixing_ratio_n2o | volume mixing ratio no2 | kg kg-1 | 2 | real | kind_phys | in | F | -!! | vmr_ch4 | volume_mixing_ratio_ch4 | volume mixing ratio ch4 | kg kg-1 | 2 | real | kind_phys | in | F | -!! | vmr_o2 | volume_mixing_ratio_o2 | volume mixing ratio o2 | kg kg-1 | 2 | real | kind_phys | in | F | -!! | vmr_co | volume_mixing_ratio_co | volume mixing ratio co | kg kg-1 | 2 | real | kind_phys | in | F | -!! | vmr_cfc11 | volume_mixing_ratio_cfc11 | volume mixing ratio cfc11 | kg kg-1 | 2 | real | kind_phys | in | F | -!! | vmr_cfc12 | volume_mixing_ratio_cfc12 | volume mixing ratio cfc12 | kg kg-1 | 2 | real | kind_phys | in | F | -!! | vmr_cfc22 | volume_mixing_ratio_cfc22 | volume mixing ratio cfc22 | kg kg-1 | 2 | real | kind_phys | in | F | -!! | vmr_ccl4 | volume_mixing_ratio_ccl4 | volume mixing ratio ccl4 | kg kg-1 | 2 | real | kind_phys | in | F | -!! | icseed | seed_random_numbers_lw | seed for random number generation for longwave radiation | none | 1 | integer | | in | F | -!! | tau_aer | aerosol_optical_depth_for_longwave_bands_01-16 | aerosol optical depth for longwave bands 01-16 | none | 3 | real | kind_phys | in | F | -!! | ssa_aer | aerosol_single_scattering_albedo_for_longwave_bands_01-16 | aerosol single scattering albedo for longwave bands 01-16 | frac | 3 | real | kind_phys | in | F | -!! | sfc_emiss | surface_longwave_emissivity | surface emissivity | frac | 1 | real | kind_phys | in | F | -!! | skt | surface_ground_temperature_for_radiation | surface ground temperature for radiation | K | 1 | real | kind_phys | in | F | -!! | dzlyr | layer_thickness_for_radiation | layer thickness | km | 2 | real | kind_phys | in | F | -!! | delpin | layer_pressure_thickness_for_radiation | layer pressure thickness | hPa | 2 | real | kind_phys | in | F | -!! | de_lgth | cloud_decorrelation_length | cloud decorrelation length | km | 1 | real | kind_phys | in | F | -!! | ncol | horizontal_loop_extent | horizontal dimension | count | 0 | integer | | in | F | -!! | nlay | adjusted_vertical_layer_dimension_for_radiation | number of vertical layers for radiation | count | 0 | integer | | in | F | -!! | lprint | flag_print | flag to print | flag | 0 | logical | | in | F | -!! | cldfrac | total_cloud_fraction | total cloud fraction | frac | 2 | real | kind_phys | in | F | -!! | lslwr | flag_to_calc_lw | flag to calculate LW irradiances | flag | 0 | logical | | in | F | -!! | hlwc | tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_step | longwave total sky heating rate | K s-1 | 2 | real | kind_phys | out | F | -!! | topflx | lw_fluxes_top_atmosphere | longwave total sky fluxes at the top of the atm | W m-2 | 1 | topflw_type | | inout | F | -!! | sfcflx | lw_fluxes_sfc | longwave total sky fluxes at the Earth surface | W m-2 | 1 | sfcflw_type | | inout | F | -!! | cldtau | cloud_optical_depth_layers_at_10mu_band | approx 10mu band layer cloud optical depth | none | 2 | real | kind_phys | inout | F | -!! | hlw0 | tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_time_step | longwave clear sky heating rate | K s-1 | 2 | real | kind_phys | inout | T | -!! | hlwb | lw_heating_rate_spectral | longwave total sky heating rate (spectral) | K s-1 | 3 | real | kind_phys | inout | T | -!! | flxprf | lw_fluxes | lw fluxes total sky / csk and up / down at levels | W m-2 | 2 | proflw_type | | inout | T | -!! | cld_lwp | cloud_liquid_water_path | cloud liquid water path | g m-2 | 2 | real | kind_phys | in | T | -!! | cld_ref_liq | mean_effective_radius_for_liquid_cloud | mean effective radius for liquid cloud | micron | 2 | real | kind_phys | in | T | -!! | cld_iwp | cloud_ice_water_path | cloud ice water path | g m-2 | 2 | real | kind_phys | in | T | -!! | cld_ref_ice | mean_effective_radius_for_ice_cloud | mean effective radius for ice cloud | micron | 2 | real | kind_phys | in | T | -!! | cld_rwp | cloud_rain_water_path | cloud ice water path | g m-2 | 2 | real | kind_phys | in | T | -!! | cld_ref_rain | mean_effective_radius_for_rain_drop | mean effective radius for rain drop | micron | 2 | real | kind_phys | in | T | -!! | cld_swp | cloud_snow_water_path | cloud snow water path | g m-2 | 2 | real | kind_phys | in | T | -!! | cld_ref_snow | mean_effective_radius_for_snow_flake | mean effective radius for snow flake | micron | 2 | real | kind_phys | in | T | -!! | cld_od | cloud_optical_depth | cloud optical depth | none | 2 | real | kind_phys | in | T | -!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | -!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | -!! | kdist_lw | K_distribution_file_for_RRTMGP_LW_scheme | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp_type | | in | F | -!! | kdist_lw_cldy | K_distribution_file_for_cloudy_RRTMGP_LW_scheme | DDT containing spectral information for cloudy RRTMGP LW radiation scheme | DDT | 0 | ty_cloud_optics_type | | inout | F | +!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | +!! |------------------|-----------------------------------------------------------------------------------------------|---------------------------------------------------------------------------|---------|------|----------------------|-----------|--------|----------| +!! | p_lay | air_pressure_at_layer_for_radiation_in_hPa | air pressure layer | hPa | 2 | real | kind_phys | in | F | +!! | p_lev | air_pressure_at_interface_for_radiation_in_hPa | air pressure level | hPa | 2 | real | kind_phys | in | F | +!! | t_lay | air_temperature_at_layer_for_radiation | air temperature layer | K | 2 | real | kind_phys | in | F | +!! | t_lev | air_temperature_at_interface_for_radiation | air temperature level | K | 2 | real | kind_phys | in | F | +!! | q_lay | water_vapor_specific_humidity_at_layer_for_radiation | specific humidity layer | kg kg-1 | 2 | real | kind_phys | in | F | +!! | o3_lay | ozone_concentration_at_layer_for_radiation | ozone concentration layer | kg kg-1 | 2 | real | kind_phys | in | F | +!! | vmr_co2 | volume_mixing_ratio_co2 | volume mixing ratio co2 | kg kg-1 | 2 | real | kind_phys | in | F | +!! | vmr_n2o | volume_mixing_ratio_n2o | volume mixing ratio no2 | kg kg-1 | 2 | real | kind_phys | in | F | +!! | vmr_ch4 | volume_mixing_ratio_ch4 | volume mixing ratio ch4 | kg kg-1 | 2 | real | kind_phys | in | F | +!! | vmr_o2 | volume_mixing_ratio_o2 | volume mixing ratio o2 | kg kg-1 | 2 | real | kind_phys | in | F | +!! | vmr_co | volume_mixing_ratio_co | volume mixing ratio co | kg kg-1 | 2 | real | kind_phys | in | F | +!! | vmr_cfc11 | volume_mixing_ratio_cfc11 | volume mixing ratio cfc11 | kg kg-1 | 2 | real | kind_phys | in | F | +!! | vmr_cfc12 | volume_mixing_ratio_cfc12 | volume mixing ratio cfc12 | kg kg-1 | 2 | real | kind_phys | in | F | +!! | vmr_cfc22 | volume_mixing_ratio_cfc22 | volume mixing ratio cfc22 | kg kg-1 | 2 | real | kind_phys | in | F | +!! | vmr_ccl4 | volume_mixing_ratio_ccl4 | volume mixing ratio ccl4 | kg kg-1 | 2 | real | kind_phys | in | F | +!! | icseed | seed_random_numbers_lw | seed for random number generation for longwave radiation | none | 1 | integer | | in | F | +!! | tau_aer | aerosol_optical_depth_for_longwave_bands_01-16 | aerosol optical depth for longwave bands 01-16 | none | 3 | real | kind_phys | in | F | +!! | ssa_aer | aerosol_single_scattering_albedo_for_longwave_bands_01-16 | aerosol single scattering albedo for longwave bands 01-16 | frac | 3 | real | kind_phys | in | F | +!! | sfc_emiss | surface_longwave_emissivity | surface emissivity | frac | 1 | real | kind_phys | in | F | +!! | skt | surface_ground_temperature_for_radiation | surface ground temperature for radiation | K | 1 | real | kind_phys | in | F | +!! | dzlyr | layer_thickness_for_radiation | layer thickness | km | 2 | real | kind_phys | in | F | +!! | delpin | layer_pressure_thickness_for_radiation | layer pressure thickness | hPa | 2 | real | kind_phys | in | F | +!! | de_lgth | cloud_decorrelation_length | cloud decorrelation length | km | 1 | real | kind_phys | in | F | +!! | ncol | horizontal_loop_extent | horizontal dimension | count | 0 | integer | | in | F | +!! | nlay | adjusted_vertical_layer_dimension_for_radiation | number of vertical layers for radiation | count | 0 | integer | | in | F | +!! | lprint | flag_print | flag to print | flag | 0 | logical | | in | F | +!! | cldfrac | total_cloud_fraction | total cloud fraction | frac | 2 | real | kind_phys | in | F | +!! | lslwr | flag_to_calc_lw | flag to calculate LW irradiances | flag | 0 | logical | | in | F | +!! | hlwc | tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_step | longwave total sky heating rate | K s-1 | 2 | real | kind_phys | out | F | +!! | topflx | lw_fluxes_top_atmosphere | longwave total sky fluxes at the top of the atm | W m-2 | 1 | topflw_type | | inout | F | +!! | sfcflx | lw_fluxes_sfc | longwave total sky fluxes at the Earth surface | W m-2 | 1 | sfcflw_type | | inout | F | +!! | cldtau | cloud_optical_depth_layers_at_10mu_band | approx 10mu band layer cloud optical depth | none | 2 | real | kind_phys | inout | F | +!! | hlw0 | tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_time_step | longwave clear sky heating rate | K s-1 | 2 | real | kind_phys | inout | T | +!! | hlwb | lw_heating_rate_spectral | longwave total sky heating rate (spectral) | K s-1 | 3 | real | kind_phys | inout | T | +!! | flxprf | lw_fluxes | lw fluxes total sky / csk and up / down at levels | W m-2 | 2 | proflw_type | | inout | T | +!! | cld_lwp | cloud_liquid_water_path | cloud liquid water path | g m-2 | 2 | real | kind_phys | in | T | +!! | cld_ref_liq | mean_effective_radius_for_liquid_cloud | mean effective radius for liquid cloud | micron | 2 | real | kind_phys | in | T | +!! | cld_iwp | cloud_ice_water_path | cloud ice water path | g m-2 | 2 | real | kind_phys | in | T | +!! | cld_ref_ice | mean_effective_radius_for_ice_cloud | mean effective radius for ice cloud | micron | 2 | real | kind_phys | in | T | +!! | cld_rwp | cloud_rain_water_path | cloud ice water path | g m-2 | 2 | real | kind_phys | in | T | +!! | cld_ref_rain | mean_effective_radius_for_rain_drop | mean effective radius for rain drop | micron | 2 | real | kind_phys | in | T | +!! | cld_swp | cloud_snow_water_path | cloud snow water path | g m-2 | 2 | real | kind_phys | in | T | +!! | cld_ref_snow | mean_effective_radius_for_snow_flake | mean effective radius for snow flake | micron | 2 | real | kind_phys | in | T | +!! | cld_od | cloud_optical_depth | cloud optical depth | none | 2 | real | kind_phys | in | T | +!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | +!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! | kdist_lw | K_distribution_file_for_RRTMGP_LW_scheme | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | +!! | kdist_lw_cldy | K_distribution_file_for_cloudy_RRTMGP_LW_scheme | DDT containing spectral information for cloudy RRTMGP LW radiation scheme | DDT | 0 | ty_cloud_optics | | inout | F | !! ! ######################################################################################### - subroutine GFS_rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr_n2o, & ! IN + subroutine GFS_rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr_n2o, & ! IN vmr_ch4, vmr_o2, vmr_co, vmr_cfc11, vmr_cfc12, vmr_cfc22, vmr_ccl4, icseed, tau_aer, & ! IN ssa_aer, sfc_emiss, skt, dzlyr, delpin, de_lgth, ncol, nlay, lprint, cldfrac, lslwr, & ! IN kdist_lw, kdist_lw_cldy, & @@ -805,9 +805,9 @@ subroutine GFS_rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, logical,intent(in) :: & lprint, & ! Control flag for diagnostics lslwr ! Flag to calculate RRTMGP LW? (1) - type(ty_gas_optics_rrtmgp_type),intent(in) :: & + type(ty_gas_optics_rrtmgp),intent(in) :: & kdist_lw ! DDT containing LW spectral information - type(ty_cloud_optics_type),intent(in) :: & + type(ty_cloud_optics),intent(in) :: & kdist_lw_cldy ! type(ty_gas_concs_type),intent(inout) :: & ! gas_concentrations @@ -868,6 +868,7 @@ subroutine GFS_rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, ! upfx0 - clear sky upward flux at sfc (w/m2) ! dnfxc - total sky downward flux at sfc (w/m2) ! dnfx0 - clear sky downward flux at sfc (w/m2) + ! Outputs (optional) real(kind_phys), dimension(ncol,nlay,nbandsLW), optional, intent(inout) :: & hlwb ! All-sky heating rate, in each band (K/sec) @@ -884,7 +885,7 @@ subroutine GFS_rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, integer :: iGpt,iCol,iLay,iBand,iTOA,iSFC integer,dimension(ncol) :: ipseed real(kind_phys), dimension(nBandsLW,ncol) :: & - semiss + sfc_emiss_byband real(kind_phys), dimension(ncol,nlay+1),target :: & flux_up_allSky, flux_up_clrSky, flux_dn_allSky, flux_dn_clrSky real(kind_phys), dimension(ncol,nlay+1,nBandsLW),target :: & @@ -979,9 +980,9 @@ subroutine GFS_rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, endif ! Surface emissivity - semiss(:,:) = 1. + sfc_emiss_byband(:,:) = 1. do iBand=1,nBandsLW - where(sfc_emiss .gt. epsilon .and. sfc_emiss .le. 1) semiss(iBand,:) = sfc_emiss + where(sfc_emiss .gt. epsilon .and. sfc_emiss .le. 1) sfc_emiss_byband(iBand,:) = sfc_emiss enddo ! Compute volume mixing-ratios for ozone (mmr) and specific-humidity. @@ -1113,7 +1114,7 @@ subroutine GFS_rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, t_lay(1:ncol,1:nlay), & p_lev(1:ncol,1:nlay+1), & skt(1:ncol), & - semiss, & + sfc_emiss_byband, & optical_props_mcica, & fluxAllSky, & fluxClrSky, & diff --git a/physics/GFS_rrtmgp_pre.F90 b/physics/GFS_rrtmgp_pre.F90 index fcc4cf0fe..6bfd47ee8 100644 --- a/physics/GFS_rrtmgp_pre.F90 +++ b/physics/GFS_rrtmgp_pre.F90 @@ -76,8 +76,8 @@ end subroutine GFS_rrtmgp_pre_init !! | alb1d | surface_albedo_perturbation | surface albedo perturbation | frac | 1 | real | kind_phys | out | F | !! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | !! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | -!! | kdist_lw | K_distribution_file_for_RRTMGP_LW_scheme | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp_type | | in | F | -!! | kdist_sw | K_distribution_file_for_RRTMGP_SW_scheme | DDT containing spectral information for RRTMGP SW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp_type | | in | F | +!! | kdist_lw | K_distribution_file_for_RRTMGP_LW_scheme | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | +!! | kdist_sw | K_distribution_file_for_RRTMGP_SW_scheme | DDT containing spectral information for RRTMGP SW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | !! ! Attention - the output arguments lm, im, lmk, lmp must not be set ! in the CCPP version - they are defined in the interstitial_create routine @@ -140,7 +140,7 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Sfcprop, Statein, Tbd, Cldprop, Coup use surface_perturbation, only: & cdfnor ! Routine to compute CDF (used to compute percentiles) ! RRTMGP types - use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp_type + use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp implicit none @@ -154,7 +154,7 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Sfcprop, Statein, Tbd, Cldprop, Coup type(GFS_cldprop_type), intent(in) :: Cldprop type(GFS_coupling_type), intent(in) :: Coupling integer, intent(in) :: im, lm, lmk, lmp - type(ty_gas_optics_rrtmgp_type),intent(in) :: & + type(ty_gas_optics_rrtmgp),intent(in) :: & kdist_lw, & ! RRTMGP DDT containing spectral information for LW calculation kdist_sw ! RRTMGP DDT containing spectral information for SW calculation diff --git a/physics/GFS_rrtmgp_sw.F90 b/physics/GFS_rrtmgp_sw.F90 index f761306db..b0cc94e32 100644 --- a/physics/GFS_rrtmgp_sw.F90 +++ b/physics/GFS_rrtmgp_sw.F90 @@ -5,8 +5,8 @@ module GFS_rrtmgp_sw use physparam, only: iovrsw, icldflg, iswcliq, isubcsw use machine, only: kind_phys use mo_rte_kind, only: wl - use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp_type - use mo_cloud_optics, only: ty_cloud_optics_type + use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp + use mo_cloud_optics, only: ty_cloud_optics use mo_gas_concentrations, only: ty_gas_concs use mo_fluxes, only: ty_fluxes_broadband use mo_fluxes_byband, only: ty_fluxes_byband @@ -55,7 +55,7 @@ module GFS_rrtmgp_sw ipsdsw0 ! Initial seed for McICA ! Classes used by rte+rrtmgp -! type(ty_gas_optics_rrtmgp_type) :: & +! type(ty_gas_optics_rrtmgp) :: & ! kdist_sw ! type(ty_cloud_optics) :: & ! kdist_sw_cldy @@ -68,16 +68,16 @@ module GFS_rrtmgp_sw ! GFS_rrtmgp_sw_init ! ######################################################################################### !! \section arg_table_GFS_rrtmgp_sw_init Argument Table -!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | -!! |-----------------|-------------------------------------------------|--------------------------------------------------------------------|-------|------|---------------------------|-----------|--------|----------| -!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | -!! | mpirank | mpi_rank | current MPI rank | index | 0 | integer | | in | F | -!! | mpiroot | mpi_root | master MPI rank | index | 0 | integer | | in | F | -!! | mpicomm | mpi_comm | MPI communicator | index | 0 | integer | | in | F | -!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | -!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | -!! | kdist_sw | K_distribution_file_for_RRTMGP_SW_scheme | DDT containing spectral information for RRTMGP SW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp_type | | inout | F | -!! | kdist_sw_cldy | K_distribution_file_for_cloudy_RRTMGP_SW_scheme | DDT containing spectral information for cloudy RRTMGP SW radiation scheme | DDT | 0 | ty_cloud_optics_type | | inout | F | +!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | +!! |-----------------|-------------------------------------------------|---------------------------------------------------------------------------|-------|------|----------------------|-----------|--------|----------| +!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | +!! | mpirank | mpi_rank | current MPI rank | index | 0 | integer | | in | F | +!! | mpiroot | mpi_root | master MPI rank | index | 0 | integer | | in | F | +!! | mpicomm | mpi_comm | MPI communicator | index | 0 | integer | | in | F | +!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | +!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! | kdist_sw | K_distribution_file_for_RRTMGP_SW_scheme | DDT containing spectral information for RRTMGP SW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | inout | F | +!! | kdist_sw_cldy | K_distribution_file_for_cloudy_RRTMGP_SW_scheme | DDT containing spectral information for cloudy RRTMGP SW radiation scheme | DDT | 0 | ty_cloud_optics | | inout | F | !! ! ######################################################################################### subroutine GFS_rrtmgp_sw_init(Model,mpicomm, mpirank, mpiroot, kdist_sw, kdist_sw_cldy, & @@ -93,9 +93,9 @@ subroutine GFS_rrtmgp_sw_init(Model,mpicomm, mpirank, mpiroot, kdist_sw, kdist_s mpicomm, & ! MPI communicator mpirank, & ! Current MPI rank mpiroot ! Master MPI rank - type(ty_gas_optics_rrtmgp_type) :: & + type(ty_gas_optics_rrtmgp) :: & kdist_sw ! RRTMGP DDT containing SW spectral information - type(ty_cloud_optics_type) :: & + type(ty_cloud_optics) :: & kdist_sw_cldy ! type(ty_gas_concs_type),intent(inout) :: & ! gas_concentrations @@ -728,66 +728,66 @@ end subroutine GFS_rrtmgp_sw_init ! GFS_RRTMGP_SW_RUN ! ######################################################################################### !! \section arg_table_GFS_rrtmgp_sw_run Argument Table -!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | -!! |-----------------|------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------|---------|------|---------------------------|-----------|--------|----------| -!! | p_lay | air_pressure_at_layer_for_radiation_in_hPa | air pressure layer | hPa | 2 | real | kind_phys | in | F | -!! | p_lev | air_pressure_at_interface_for_radiation_in_hPa | air pressure level | hPa | 2 | real | kind_phys | in | F | -!! | t_lay | air_temperature_at_layer_for_radiation | air temperature layer | K | 2 | real | kind_phys | in | F | -!! | t_lev | air_temperature_at_interface_for_radiation | air temperature level | K | 2 | real | kind_phys | in | F | -!! | q_lay | water_vapor_specific_humidity_at_layer_for_radiation | specific humidity layer | kg kg-1 | 2 | real | kind_phys | in | F | -!! | o3_lay | ozone_concentration_at_layer_for_radiation | ozone concentration layer | kg kg-1 | 2 | real | kind_phys | in | F | -!! | vmr_co2 | volume_mixing_ratio_co2 | volume mixing ratio co2 | kg kg-1 | 2 | real | kind_phys | in | F | -!! | vmr_n2o | volume_mixing_ratio_n2o | volume mixing ratio no2 | kg kg-1 | 2 | real | kind_phys | in | F | -!! | vmr_ch4 | volume_mixing_ratio_ch4 | volume mixing ratio ch4 | kg kg-1 | 2 | real | kind_phys | in | F | -!! | vmr_o2 | volume_mixing_ratio_o2 | volume mixing ratio o2 | kg kg-1 | 2 | real | kind_phys | in | F | -!! | vmr_co | volume_mixing_ratio_co | volume mixing ratio co | kg kg-1 | 2 | real | kind_phys | in | F | -!! | vmr_cfc11 | volume_mixing_ratio_cfc11 | volume mixing ratio cfc11 | kg kg-1 | 2 | real | kind_phys | in | F | -!! | vmr_cfc12 | volume_mixing_ratio_cfc12 | volume mixing ratio cfc12 | kg kg-1 | 2 | real | kind_phys | in | F | -!! | vmr_cfc22 | volume_mixing_ratio_cfc22 | volume mixing ratio cfc22 | kg kg-1 | 2 | real | kind_phys | in | F | -!! | vmr_ccl4 | volume_mixing_ratio_ccl4 | volume mixing ratio ccl4 | kg kg-1 | 2 | real | kind_phys | in | F | -!! | icseed | seed_random_numbers_sw | seed for random number generation for shortwave radiation | none | 1 | integer | | in | F | -!! | tau_aer | aerosol_optical_depth_for_longwave_bands_01-16 | aerosol optical depth for shortwave bands 01-16 | none | 3 | real | kind_phys | in | F | -!! | ssa_aer | aerosol_single_scattering_albedo_for_longwave_bands_01-16 | aerosol single scattering albedo for shortwave bands 01-16 | frac | 3 | real | kind_phys | in | F | -!! | asy_aer | aerosol_asymmetry_parameter_for_shortwave_bands_01-16 | aerosol asymmetry paramter for shortwave bands 01-16 | none | 3 | real | kind_phys | in | F | -!! | sfcalb_nir_dir | surface_albedo_due_to_near_IR_direct | surface albedo due to near IR direct beam | frac | 1 | real | kind_phys | in | F | -!! | sfcalb_nir_dif | surface_albedo_due_to_near_IR_diffused | surface albedo due to near IR diffused beam | frac | 1 | real | kind_phys | in | F | -!! | sfcalb_uvis_dir | surface_albedo_due_to_UV_and_VIS_direct | surface albedo due to UV+VIS direct beam | frac | 1 | real | kind_phys | in | F | -!! | sfcalb_uvis_dif | surface_albedo_due_to_UV_and_VIS_diffused | surface albedo due to UV+VIS diffused beam | frac | 1 | real | kind_phys | in | F | -!! | dzlyr | layer_thickness_for_radiation | layer thickness | km | 2 | real | kind_phys | in | F | -!! | delpin | layer_pressure_thickness_for_radiation | layer pressure thickness | hPa | 2 | real | kind_phys | in | F | -!! | de_lgth | cloud_decorrelation_length | cloud decorrelation length | km | 1 | real | kind_phys | in | F | -!! | cossza | cosine_of_zenith_angle | cosine of the solar zenit angle | none | 1 | real | kind_phys | in | F | -!! | solcon | solar_constant | solar constant | W m-2 | 0 | real | kind_phys | in | F | -!! | nday | daytime_points_dimension | daytime points dimension | count | 0 | integer | | in | F | -!! | idxday | daytime_points | daytime points | index | 1 | integer | | in | F | -!! | ncol | horizontal_loop_extent | horizontal dimension | count | 0 | integer | | in | F | -!! | nlay | adjusted_vertical_layer_dimension_for_radiation | number of vertical layers for radiation | count | 0 | integer | | in | F | -!! | lprint | flag_print | flag to print | flag | 0 | logical | | in | F | -!! | cldfrac | total_cloud_fraction | total cloud fraction | frac | 2 | real | kind_phys | in | F | -!! | lsswr | flag_to_calc_sw | flag to calculate SW irradiances | flag | 0 | logical | | in | F | -!! | hswc | tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step | shortwave total sky heating rate | K s-1 | 2 | real | kind_phys | inout | F | -!! | topflx | sw_fluxes_top_atmosphere | shortwave total sky fluxes at the top of the atm | W m-2 | 1 | topfsw_type | | inout | F | -!! | sfcflx | sw_fluxes_sfc | shortwave total sky fluxes at the Earth surface | W m-2 | 1 | sfcfsw_type | | inout | F | -!! | cldtau | cloud_optical_depth_layers_at_0.55mu_band | approx .55mu band layer cloud optical depth | none | 2 | real | kind_phys | inout | F | -!! | hsw0 | tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_time_step | shortwave clear sky heating rate | K s-1 | 2 | real | kind_phys | inout | T | -!! | hswb | sw_heating_rate_spectral | shortwave total sky heating rate (spectral) | K s-1 | 3 | real | kind_phys | inout | T | -!! | flxprf | sw_fluxes | sw fluxes total sky / csk and up / down at levels | W m-2 | 2 | profsw_type | | inout | T | -!! | fdncmp | components_of_surface_downward_shortwave_fluxes | derived type for special components of surface downward shortwave fluxes | W m-2 | 1 | cmpfsw_type | | inout | T | -!! | cld_lwp | cloud_liquid_water_path | cloud liquid water path | g m-2 | 2 | real | kind_phys | in | T | -!! | cld_ref_liq | mean_effective_radius_for_liquid_cloud | mean effective radius for liquid cloud | micron | 2 | real | kind_phys | in | T | -!! | cld_iwp | cloud_ice_water_path | cloud ice water path | g m-2 | 2 | real | kind_phys | in | T | -!! | cld_ref_ice | mean_effective_radius_for_ice_cloud | mean effective radius for ice cloud | micron | 2 | real | kind_phys | in | T | -!! | cld_rwp | cloud_rain_water_path | cloud rain water path | g m-2 | 2 | real | kind_phys | in | T | -!! | cld_ref_rain | mean_effective_radius_for_rain_drop | mean effective radius for rain drop | micron | 2 | real | kind_phys | in | T | -!! | cld_swp | cloud_snow_water_path | cloud snow water path | g m-2 | 2 | real | kind_phys | in | T | -!! | cld_ref_snow | mean_effective_radius_for_snow_flake | mean effective radius for snow flake | micron | 2 | real | kind_phys | in | T | -!! | cld_od | cloud_optical_depth | cloud optical depth | none | 2 | real | kind_phys | in | T | -!! | cld_ssa | cloud_single_scattering_albedo | cloud single scattering albedo | frac | 2 | real | kind_phys | in | T | -!! | cld_asy | cloud_asymmetry_parameter | cloud asymmetry parameter | none | 2 | real | kind_phys | in | T | -!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | -!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | -!! | kdist_sw | K_distribution_file_for_RRTMGP_SW_scheme | DDT containing spectral information for RRTMGP SW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp_type | | in | F | -!! | kdist_sw_cldy | K_distribution_file_for_cloudy_RRTMGP_SW_scheme | DDT containing spectral information for cloudy RRTMGP SW radiation scheme | DDT | 0 | ty_cloud_optics_type | | inout | F | +!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | +!! |-----------------|------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------|---------|------|---------------------------|-----------|--------|----------| +!! | p_lay | air_pressure_at_layer_for_radiation_in_hPa | air pressure layer | hPa | 2 | real | kind_phys | in | F | +!! | p_lev | air_pressure_at_interface_for_radiation_in_hPa | air pressure level | hPa | 2 | real | kind_phys | in | F | +!! | t_lay | air_temperature_at_layer_for_radiation | air temperature layer | K | 2 | real | kind_phys | in | F | +!! | t_lev | air_temperature_at_interface_for_radiation | air temperature level | K | 2 | real | kind_phys | in | F | +!! | q_lay | water_vapor_specific_humidity_at_layer_for_radiation | specific humidity layer | kg kg-1 | 2 | real | kind_phys | in | F | +!! | o3_lay | ozone_concentration_at_layer_for_radiation | ozone concentration layer | kg kg-1 | 2 | real | kind_phys | in | F | +!! | vmr_co2 | volume_mixing_ratio_co2 | volume mixing ratio co2 | kg kg-1 | 2 | real | kind_phys | in | F | +!! | vmr_n2o | volume_mixing_ratio_n2o | volume mixing ratio no2 | kg kg-1 | 2 | real | kind_phys | in | F | +!! | vmr_ch4 | volume_mixing_ratio_ch4 | volume mixing ratio ch4 | kg kg-1 | 2 | real | kind_phys | in | F | +!! | vmr_o2 | volume_mixing_ratio_o2 | volume mixing ratio o2 | kg kg-1 | 2 | real | kind_phys | in | F | +!! | vmr_co | volume_mixing_ratio_co | volume mixing ratio co | kg kg-1 | 2 | real | kind_phys | in | F | +!! | vmr_cfc11 | volume_mixing_ratio_cfc11 | volume mixing ratio cfc11 | kg kg-1 | 2 | real | kind_phys | in | F | +!! | vmr_cfc12 | volume_mixing_ratio_cfc12 | volume mixing ratio cfc12 | kg kg-1 | 2 | real | kind_phys | in | F | +!! | vmr_cfc22 | volume_mixing_ratio_cfc22 | volume mixing ratio cfc22 | kg kg-1 | 2 | real | kind_phys | in | F | +!! | vmr_ccl4 | volume_mixing_ratio_ccl4 | volume mixing ratio ccl4 | kg kg-1 | 2 | real | kind_phys | in | F | +!! | icseed | seed_random_numbers_sw | seed for random number generation for shortwave radiation | none | 1 | integer | | in | F | +!! | tau_aer | aerosol_optical_depth_for_longwave_bands_01-16 | aerosol optical depth for shortwave bands 01-16 | none | 3 | real | kind_phys | in | F | +!! | ssa_aer | aerosol_single_scattering_albedo_for_longwave_bands_01-16 | aerosol single scattering albedo for shortwave bands 01-16 | frac | 3 | real | kind_phys | in | F | +!! | asy_aer | aerosol_asymmetry_parameter_for_shortwave_bands_01-16 | aerosol asymmetry paramter for shortwave bands 01-16 | none | 3 | real | kind_phys | in | F | +!! | sfcalb_nir_dir | surface_albedo_due_to_near_IR_direct | surface albedo due to near IR direct beam | frac | 1 | real | kind_phys | in | F | +!! | sfcalb_nir_dif | surface_albedo_due_to_near_IR_diffused | surface albedo due to near IR diffused beam | frac | 1 | real | kind_phys | in | F | +!! | sfcalb_uvis_dir | surface_albedo_due_to_UV_and_VIS_direct | surface albedo due to UV+VIS direct beam | frac | 1 | real | kind_phys | in | F | +!! | sfcalb_uvis_dif | surface_albedo_due_to_UV_and_VIS_diffused | surface albedo due to UV+VIS diffused beam | frac | 1 | real | kind_phys | in | F | +!! | dzlyr | layer_thickness_for_radiation | layer thickness | km | 2 | real | kind_phys | in | F | +!! | delpin | layer_pressure_thickness_for_radiation | layer pressure thickness | hPa | 2 | real | kind_phys | in | F | +!! | de_lgth | cloud_decorrelation_length | cloud decorrelation length | km | 1 | real | kind_phys | in | F | +!! | cossza | cosine_of_zenith_angle | cosine of the solar zenit angle | none | 1 | real | kind_phys | in | F | +!! | solcon | solar_constant | solar constant | W m-2 | 0 | real | kind_phys | in | F | +!! | nday | daytime_points_dimension | daytime points dimension | count | 0 | integer | | in | F | +!! | idxday | daytime_points | daytime points | index | 1 | integer | | in | F | +!! | ncol | horizontal_loop_extent | horizontal dimension | count | 0 | integer | | in | F | +!! | nlay | adjusted_vertical_layer_dimension_for_radiation | number of vertical layers for radiation | count | 0 | integer | | in | F | +!! | lprint | flag_print | flag to print | flag | 0 | logical | | in | F | +!! | cldfrac | total_cloud_fraction | total cloud fraction | frac | 2 | real | kind_phys | in | F | +!! | lsswr | flag_to_calc_sw | flag to calculate SW irradiances | flag | 0 | logical | | in | F | +!! | hswc | tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step | shortwave total sky heating rate | K s-1 | 2 | real | kind_phys | inout | F | +!! | topflx | sw_fluxes_top_atmosphere | shortwave total sky fluxes at the top of the atm | W m-2 | 1 | topfsw_type | | inout | F | +!! | sfcflx | sw_fluxes_sfc | shortwave total sky fluxes at the Earth surface | W m-2 | 1 | sfcfsw_type | | inout | F | +!! | cldtau | cloud_optical_depth_layers_at_0.55mu_band | approx .55mu band layer cloud optical depth | none | 2 | real | kind_phys | inout | F | +!! | hsw0 | tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_time_step | shortwave clear sky heating rate | K s-1 | 2 | real | kind_phys | inout | T | +!! | hswb | sw_heating_rate_spectral | shortwave total sky heating rate (spectral) | K s-1 | 3 | real | kind_phys | inout | T | +!! | flxprf | sw_fluxes | sw fluxes total sky / csk and up / down at levels | W m-2 | 2 | profsw_type | | inout | T | +!! | fdncmp | components_of_surface_downward_shortwave_fluxes | derived type for special components of surface downward shortwave fluxes | W m-2 | 1 | cmpfsw_type | | inout | T | +!! | cld_lwp | cloud_liquid_water_path | cloud liquid water path | g m-2 | 2 | real | kind_phys | in | T | +!! | cld_ref_liq | mean_effective_radius_for_liquid_cloud | mean effective radius for liquid cloud | micron | 2 | real | kind_phys | in | T | +!! | cld_iwp | cloud_ice_water_path | cloud ice water path | g m-2 | 2 | real | kind_phys | in | T | +!! | cld_ref_ice | mean_effective_radius_for_ice_cloud | mean effective radius for ice cloud | micron | 2 | real | kind_phys | in | T | +!! | cld_rwp | cloud_rain_water_path | cloud rain water path | g m-2 | 2 | real | kind_phys | in | T | +!! | cld_ref_rain | mean_effective_radius_for_rain_drop | mean effective radius for rain drop | micron | 2 | real | kind_phys | in | T | +!! | cld_swp | cloud_snow_water_path | cloud snow water path | g m-2 | 2 | real | kind_phys | in | T | +!! | cld_ref_snow | mean_effective_radius_for_snow_flake | mean effective radius for snow flake | micron | 2 | real | kind_phys | in | T | +!! | cld_od | cloud_optical_depth | cloud optical depth | none | 2 | real | kind_phys | in | T | +!! | cld_ssa | cloud_single_scattering_albedo | cloud single scattering albedo | frac | 2 | real | kind_phys | in | T | +!! | cld_asy | cloud_asymmetry_parameter | cloud asymmetry parameter | none | 2 | real | kind_phys | in | T | +!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | +!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! | kdist_sw | K_distribution_file_for_RRTMGP_SW_scheme | DDT containing spectral information for RRTMGP SW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | +!! | kdist_sw_cldy | K_distribution_file_for_cloudy_RRTMGP_SW_scheme | DDT containing spectral information for cloudy RRTMGP SW radiation scheme | DDT | 0 | ty_cloud_optics | | inout | F | !! subroutine GFS_rrtmgp_sw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr_n2o, & ! IN vmr_ch4, vmr_o2, vmr_co, vmr_cfc11, vmr_cfc12, vmr_cfc22, vmr_ccl4, icseed, tau_aer, & ! IN @@ -814,9 +814,9 @@ subroutine GFS_rrtmgp_sw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, logical, intent(in) :: & lprint, & ! Control flag for diagnostics lsswr ! Flag to calculate RRTMGP SW? - type(ty_gas_optics_rrtmgp_type),intent(in) :: & + type(ty_gas_optics_rrtmgp),intent(in) :: & kdist_sw ! DDT containing LW spectral information - type(ty_cloud_optics_type),intent(in) :: & + type(ty_cloud_optics),intent(in) :: & kdist_sw_cldy ! type(ty_gas_concs_type),intent(inout) :: & ! gas_concentrations diff --git a/physics/rrtmgp_lw_main.F90 b/physics/rrtmgp_lw_main.F90 new file mode 100644 index 000000000..cfb5da060 --- /dev/null +++ b/physics/rrtmgp_lw_main.F90 @@ -0,0 +1,68 @@ +! ########################################################################################### +! ########################################################################################### +module rrtmgp_lw_main + use machine, only: kind_phys + use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp + use mo_cloud_optics, only: ty_cloud_optics + use mo_optical_props, only: ty_optical_props_1scl + + public rrtmgp_lw_main_init, rrtmgp_lw_main_run, rrtmgp_lw_main_finalize +contains + + subroutine rrtmgp_lw_main_init() + end subroutine rrtmgp_lw_main_init + + ! ######################################################################################### + ! ######################################################################################### +!! \section arg_table_rrtmgp_lw_main_run Argument Table +!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | +!! |--------------------|-------------------------------------------------|--------------------------------------------------------------------|-------|------|-----------------------|-----------|--------|----------| +!! | ncol | horizontal_loop_extent | horizontal dimension | count | 0 | integer | | in | F | +!! | nlay | adjusted_vertical_layer_dimension_for_radiation | number of vertical layers for radiation | count | 0 | integer | | in | F | +!! | p_lay | air_pressure_at_layer_for_radiation_in_hPa | air pressure layer | hPa | 2 | real | kind_phys | in | F | +!! | p_lev | air_pressure_at_interface_for_radiation_in_hPa | air pressure level | hPa | 2 | real | kind_phys | in | F | +!! | t_lay | air_temperature_at_layer_for_radiation | air temperature layer | K | 2 | real | kind_phys | in | F | +!! | skt | surface_ground_temperature_for_radiation | surface ground temperature for radiation | K | 1 | real | kind_phys | in | F | +!! | sfc_emiss | surface_longwave_emissivity_in_each_band | surface lw emissivity in fraction in each LW band | frac | 2 | real | kind_phys | in | F | +!! | kdist_lw | K_distribution_file_for_RRTMGP_LW_scheme | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | +!! | optical_props_clds | optical_properties_for_cloudy_atmosphere | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_1scl | | in | F | +!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | +!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! + subroutine rrtmgp_lw_main_run(ncol, nlay, kdist_lw, p_lay, t_lay, & + p_lev, skt, sfc_emiss, optical_props_clds, errmsg, errflg) + + ! Inputs + integer, intent(in) :: & + ncol, & ! Number of horizontal gridpoints + nlay ! Number of vertical layers + real(kind_phys), dimension(ncol,nlay), intent(in) :: & + p_lay, & ! Pressure @ model layer-centers (hPa) + t_lay ! Temperature (K) + real(kind_phys), dimension(ncol,nlay+1), intent(in) :: & + p_lev ! Pressure @ model layer-interfaces (hPa) + real(kind_phys), dimension(ncol), intent(in) :: & + skt ! Surface(skin) temperature (K) + type(ty_gas_optics_rrtmgp),intent(in) :: & + kdist_lw ! DDT containing LW spectral information + real(kind_phys), dimension(kdist_lw%get_nband(),ncol) :: & + sfc_emiss ! Surface emissivity (1) + type(ty_optical_props_1scl),intent(in) :: & + optical_props_clds + + ! Outputs + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + + end subroutine rrtmgp_lw_main_run + + subroutine rrtmgp_lw_main_finalize() + end subroutine rrtmgp_lw_main_finalize + + + +end module rrtmgp_lw_main diff --git a/physics/rrtmgp_lw_pre.F90 b/physics/rrtmgp_lw_pre.F90 new file mode 100644 index 000000000..4a553b84b --- /dev/null +++ b/physics/rrtmgp_lw_pre.F90 @@ -0,0 +1,78 @@ +!>\file rrtmgp_lw_pre.f90 +!! This file contains a call to module_radiation_surface::setemis() to +!! setup surface emissivity for LW radiation. + module rrtmgp_lw_pre + contains + +!>\defgroup rrtmgp_lw_pre GFS RRTMGP scheme pre +!! @{ +!> \section arg_table_rrtmgp_lw_pre_init Argument Table +!! + subroutine rrtmgp_lw_pre_init () + end subroutine rrtmgp_lw_pre_init + +!> \section arg_table_rrtmgp_lw_pre_run Argument Table +!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | +!! |------------------|-------------------------------------------|--------------------------------------------------------------------|----------|------|-----------------------|-----------|--------|----------| +!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | +!! | Grid | GFS_grid_type_instance | Fortran DDT containing FV3-GFS grid and interpolation related data | DDT | 0 | GFS_grid_type | | in | F | +!! | Sfcprop | GFS_sfcprop_type_instance | Fortran DDT containing FV3-GFS surface fields | DDT | 0 | GFS_sfcprop_type | | in | F | +!! | Radtend | GFS_radtend_type_instance | Fortran DDT containing FV3-GFS radiation tendencies | DDT | 0 | GFS_radtend_type | | inout | F | +!! | im | horizontal_loop_extent | horizontal loop extent | count | 0 | integer | | in | F | +!! | tsfg | surface_ground_temperature_for_radiation | surface ground temperature for radiation | K | 1 | real | kind_phys | in | F | +!! | tsfa | surface_air_temperature_for_radiation | lowest model layer air temperature for radiation | K | 1 | real | kind_phys | in | F | +!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | +!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! | kdist_lw | K_distribution_file_for_RRTMGP_LW_scheme | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | +!! | sfc_emiss_byband | surface_longwave_emissivity_in_each_band | surface lw emissivity in fraction in each LW band | frac | 2 | real | kind_phys | out | F | +!! + + subroutine rrtmgp_lw_pre_run (Model, Grid, Sfcprop, Radtend, im, tsfg, tsfa, kdist_lw, sfc_emiss_byband, errmsg, errflg) + + use machine, only: kind_phys + + use GFS_typedefs, only: GFS_control_type, & + GFS_grid_type, & + GFS_radtend_type, & + GFS_sfcprop_type + use module_radiation_surface, only: setemis + use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp + + implicit none + type(GFS_control_type), intent(in) :: Model + type(GFS_radtend_type), intent(inout) :: Radtend + type(GFS_sfcprop_type), intent(in) :: Sfcprop + type(GFS_grid_type), intent(in) :: Grid + integer, intent(in) :: im + real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(in) :: tsfa, tsfg + type(ty_gas_optics_rrtmgp),intent(in) :: & + kdist_lw ! DDT containing LW spectral information + real(kind_phyd),dimension(kdist_lw%get_nband(),im),intent(out) :: sfc_emiss_byband + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + integer :: ij + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + + if (Model%lslwr) then +!> - Call module_radiation_surface::setemis(),to setup surface +!! emissivity for LW radiation. + call setemis (Grid%xlon, Grid%xlat, Sfcprop%slmsk, & ! --- inputs + Sfcprop%snowd, Sfcprop%sncovr, Sfcprop%zorl, & + tsfg, tsfa, Sfcprop%hprim, IM, & + Radtend%semis) ! --- outputs + do ij=1,kdist_lw%get_nband() + sfc_emiss_byband(ij,:) = Radtend%semis + enddo + endif + + end subroutine rrtmgp_lw_pre_run + +!> \section arg_table_rrtmgp_lw_pre_finalize Argument Table +!! + subroutine rrtmgp_lw_pre_finalize () + end subroutine rrtmgp_lw_pre_finalize +!! @} + end module rrtmgp_lw_pre From 3beeb50f57710c07697c72e65df4f0018b8f1a20 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Mon, 13 May 2019 11:55:41 -0600 Subject: [PATCH 022/167] Changes for RRTMGP DDTs to be used in CCPP. --- physics/GFS_rrtmgp_lw.F90 | 260 ++++++++----------------------------- physics/GFS_rrtmgp_lw.xml | 77 ----------- physics/rrtmgp_lw_main.F90 | 73 +++++++---- physics/rrtmgp_lw_main.xml | 173 ++++++++++++++++++++++++ physics/rrtmgp_lw_post.F90 | 174 +++++++++++++++++++++++++ physics/rrtmgp_lw_post.xml | 162 +++++++++++++++++++++++ physics/rrtmgp_lw_pre.F90 | 10 +- physics/rrtmgp_lw_pre.xml | 128 ++++++++++++++++++ physics/rte-rrtmgp | 2 +- 9 files changed, 748 insertions(+), 311 deletions(-) create mode 100644 physics/rrtmgp_lw_main.xml create mode 100644 physics/rrtmgp_lw_post.F90 create mode 100644 physics/rrtmgp_lw_post.xml create mode 100644 physics/rrtmgp_lw_pre.xml diff --git a/physics/GFS_rrtmgp_lw.F90 b/physics/GFS_rrtmgp_lw.F90 index 5004e419b..7c88c20c3 100644 --- a/physics/GFS_rrtmgp_lw.F90 +++ b/physics/GFS_rrtmgp_lw.F90 @@ -36,12 +36,6 @@ module GFS_rrtmgp_lw amdw = amd/amw, & ! Molecular weight of dry air / water vapor amdo3 = amd/amo3 ! Molecular weight of dry air / ozone - ! Logical flags for optional output fields in rrtmgp_lw_run(), default=.false. - logical :: & - l_AllSky_HR_byband = .false., & ! 2D [ncol,nlay] all-sky heating rates, in each band [ncol,nlay,nBandsLW]? - l_ClrSky_HR = .false., & ! 2D [ncol,nlay] clear-sky heating rate? - l_fluxes2D = .false. ! 2D [ncol,nlay] radiative fluxes? *Note* fluxes is a DDT w/ 4 fields. - ! Module parameters (set during rrtmgp_lw_init()) integer :: & rrtmgp_lw_cld_phys, & ! RRTMGP cloud-physics (0-RRTMG, 1-RRTGMP(LUT), 2-RRTMGP(Pade)) @@ -53,14 +47,6 @@ module GFS_rrtmgp_lw integer,allocatable,dimension(:) :: & ngb_LW ! Band index for each g-points - ! Classes used by rte+rrtmgp - !type(ty_gas_optics_rrtmgp) :: & - ! kdist_lw - !type(ty_cloud_optics) :: & - ! kdist_lw_cldy - type(ty_gas_concs) :: & - gas_concentrations - public GFS_rrtmgp_lw_init, GFS_rrtmgp_lw_run, GFS_rrtmgp_lw_finalize contains ! ######################################################################################### @@ -77,10 +63,11 @@ module GFS_rrtmgp_lw !! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | !! | kdist_lw | K_distribution_file_for_RRTMGP_LW_scheme | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | inout | F | !! | kdist_lw_cldy | K_distribution_file_for_cloudy_RRTMGP_LW_scheme | DDT containing spectral information for cloudy RRTMGP LW radiation scheme | DDT | 0 | ty_cloud_optics | | inout | F | +!! | gas_concentrations | Gas_concentrations_for_RRTMGP_suite | DDT containing gas concentrations for RRTMGP radiation scheme | DDT | 0 | ty_gas_concs | | inout | F | !! ! ######################################################################################### subroutine GFS_rrtmgp_lw_init(Model,mpicomm, mpirank, mpiroot, kdist_lw, kdist_lw_cldy, & - errmsg, errflg) + gas_concentrations, errmsg, errflg) use netcdf #ifdef MPI @@ -98,8 +85,8 @@ subroutine GFS_rrtmgp_lw_init(Model,mpicomm, mpirank, mpiroot, kdist_lw, kdist_l kdist_lw type(ty_cloud_optics),intent(inout) :: & kdist_lw_cldy -! type(ty_gas_concs_type),intent(inout) :: & -! gas_concentrations + type(ty_gas_concs),intent(inout) :: & + gas_concentrations ! Outputs character(len=*), intent(out) :: & @@ -732,64 +719,56 @@ end subroutine GFS_rrtmgp_lw_init ! rrtmg_lw_run ! ######################################################################################### !! \section arg_table_GFS_rrtmgp_lw_run Argument Table -!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | -!! |------------------|-----------------------------------------------------------------------------------------------|---------------------------------------------------------------------------|---------|------|----------------------|-----------|--------|----------| -!! | p_lay | air_pressure_at_layer_for_radiation_in_hPa | air pressure layer | hPa | 2 | real | kind_phys | in | F | -!! | p_lev | air_pressure_at_interface_for_radiation_in_hPa | air pressure level | hPa | 2 | real | kind_phys | in | F | -!! | t_lay | air_temperature_at_layer_for_radiation | air temperature layer | K | 2 | real | kind_phys | in | F | -!! | t_lev | air_temperature_at_interface_for_radiation | air temperature level | K | 2 | real | kind_phys | in | F | -!! | q_lay | water_vapor_specific_humidity_at_layer_for_radiation | specific humidity layer | kg kg-1 | 2 | real | kind_phys | in | F | -!! | o3_lay | ozone_concentration_at_layer_for_radiation | ozone concentration layer | kg kg-1 | 2 | real | kind_phys | in | F | -!! | vmr_co2 | volume_mixing_ratio_co2 | volume mixing ratio co2 | kg kg-1 | 2 | real | kind_phys | in | F | -!! | vmr_n2o | volume_mixing_ratio_n2o | volume mixing ratio no2 | kg kg-1 | 2 | real | kind_phys | in | F | -!! | vmr_ch4 | volume_mixing_ratio_ch4 | volume mixing ratio ch4 | kg kg-1 | 2 | real | kind_phys | in | F | -!! | vmr_o2 | volume_mixing_ratio_o2 | volume mixing ratio o2 | kg kg-1 | 2 | real | kind_phys | in | F | -!! | vmr_co | volume_mixing_ratio_co | volume mixing ratio co | kg kg-1 | 2 | real | kind_phys | in | F | -!! | vmr_cfc11 | volume_mixing_ratio_cfc11 | volume mixing ratio cfc11 | kg kg-1 | 2 | real | kind_phys | in | F | -!! | vmr_cfc12 | volume_mixing_ratio_cfc12 | volume mixing ratio cfc12 | kg kg-1 | 2 | real | kind_phys | in | F | -!! | vmr_cfc22 | volume_mixing_ratio_cfc22 | volume mixing ratio cfc22 | kg kg-1 | 2 | real | kind_phys | in | F | -!! | vmr_ccl4 | volume_mixing_ratio_ccl4 | volume mixing ratio ccl4 | kg kg-1 | 2 | real | kind_phys | in | F | -!! | icseed | seed_random_numbers_lw | seed for random number generation for longwave radiation | none | 1 | integer | | in | F | -!! | tau_aer | aerosol_optical_depth_for_longwave_bands_01-16 | aerosol optical depth for longwave bands 01-16 | none | 3 | real | kind_phys | in | F | -!! | ssa_aer | aerosol_single_scattering_albedo_for_longwave_bands_01-16 | aerosol single scattering albedo for longwave bands 01-16 | frac | 3 | real | kind_phys | in | F | -!! | sfc_emiss | surface_longwave_emissivity | surface emissivity | frac | 1 | real | kind_phys | in | F | -!! | skt | surface_ground_temperature_for_radiation | surface ground temperature for radiation | K | 1 | real | kind_phys | in | F | -!! | dzlyr | layer_thickness_for_radiation | layer thickness | km | 2 | real | kind_phys | in | F | -!! | delpin | layer_pressure_thickness_for_radiation | layer pressure thickness | hPa | 2 | real | kind_phys | in | F | -!! | de_lgth | cloud_decorrelation_length | cloud decorrelation length | km | 1 | real | kind_phys | in | F | -!! | ncol | horizontal_loop_extent | horizontal dimension | count | 0 | integer | | in | F | -!! | nlay | adjusted_vertical_layer_dimension_for_radiation | number of vertical layers for radiation | count | 0 | integer | | in | F | -!! | lprint | flag_print | flag to print | flag | 0 | logical | | in | F | -!! | cldfrac | total_cloud_fraction | total cloud fraction | frac | 2 | real | kind_phys | in | F | -!! | lslwr | flag_to_calc_lw | flag to calculate LW irradiances | flag | 0 | logical | | in | F | -!! | hlwc | tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_step | longwave total sky heating rate | K s-1 | 2 | real | kind_phys | out | F | -!! | topflx | lw_fluxes_top_atmosphere | longwave total sky fluxes at the top of the atm | W m-2 | 1 | topflw_type | | inout | F | -!! | sfcflx | lw_fluxes_sfc | longwave total sky fluxes at the Earth surface | W m-2 | 1 | sfcflw_type | | inout | F | -!! | cldtau | cloud_optical_depth_layers_at_10mu_band | approx 10mu band layer cloud optical depth | none | 2 | real | kind_phys | inout | F | -!! | hlw0 | tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_time_step | longwave clear sky heating rate | K s-1 | 2 | real | kind_phys | inout | T | -!! | hlwb | lw_heating_rate_spectral | longwave total sky heating rate (spectral) | K s-1 | 3 | real | kind_phys | inout | T | -!! | flxprf | lw_fluxes | lw fluxes total sky / csk and up / down at levels | W m-2 | 2 | proflw_type | | inout | T | -!! | cld_lwp | cloud_liquid_water_path | cloud liquid water path | g m-2 | 2 | real | kind_phys | in | T | -!! | cld_ref_liq | mean_effective_radius_for_liquid_cloud | mean effective radius for liquid cloud | micron | 2 | real | kind_phys | in | T | -!! | cld_iwp | cloud_ice_water_path | cloud ice water path | g m-2 | 2 | real | kind_phys | in | T | -!! | cld_ref_ice | mean_effective_radius_for_ice_cloud | mean effective radius for ice cloud | micron | 2 | real | kind_phys | in | T | -!! | cld_rwp | cloud_rain_water_path | cloud ice water path | g m-2 | 2 | real | kind_phys | in | T | -!! | cld_ref_rain | mean_effective_radius_for_rain_drop | mean effective radius for rain drop | micron | 2 | real | kind_phys | in | T | -!! | cld_swp | cloud_snow_water_path | cloud snow water path | g m-2 | 2 | real | kind_phys | in | T | -!! | cld_ref_snow | mean_effective_radius_for_snow_flake | mean effective radius for snow flake | micron | 2 | real | kind_phys | in | T | -!! | cld_od | cloud_optical_depth | cloud optical depth | none | 2 | real | kind_phys | in | T | -!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | -!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | -!! | kdist_lw | K_distribution_file_for_RRTMGP_LW_scheme | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | -!! | kdist_lw_cldy | K_distribution_file_for_cloudy_RRTMGP_LW_scheme | DDT containing spectral information for cloudy RRTMGP LW radiation scheme | DDT | 0 | ty_cloud_optics | | inout | F | +!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | +!! |--------------------|-----------------------------------------------------------------------------------------------|---------------------------------------------------------------------------|---------|------|----------------------|-----------|--------|----------| +!! | p_lay | air_pressure_at_layer_for_radiation_in_hPa | air pressure layer | hPa | 2 | real | kind_phys | in | F | +!! | p_lev | air_pressure_at_interface_for_radiation_in_hPa | air pressure level | hPa | 2 | real | kind_phys | in | F | +!! | t_lay | air_temperature_at_layer_for_radiation | air temperature layer | K | 2 | real | kind_phys | in | F | +!! | t_lev | air_temperature_at_interface_for_radiation | air temperature level | K | 2 | real | kind_phys | in | F | +!! | q_lay | water_vapor_specific_humidity_at_layer_for_radiation | specific humidity layer | kg kg-1 | 2 | real | kind_phys | in | F | +!! | o3_lay | ozone_concentration_at_layer_for_radiation | ozone concentration layer | kg kg-1 | 2 | real | kind_phys | in | F | +!! | vmr_co2 | volume_mixing_ratio_co2 | volume mixing ratio co2 | kg kg-1 | 2 | real | kind_phys | in | F | +!! | vmr_n2o | volume_mixing_ratio_n2o | volume mixing ratio no2 | kg kg-1 | 2 | real | kind_phys | in | F | +!! | vmr_ch4 | volume_mixing_ratio_ch4 | volume mixing ratio ch4 | kg kg-1 | 2 | real | kind_phys | in | F | +!! | vmr_o2 | volume_mixing_ratio_o2 | volume mixing ratio o2 | kg kg-1 | 2 | real | kind_phys | in | F | +!! | vmr_co | volume_mixing_ratio_co | volume mixing ratio co | kg kg-1 | 2 | real | kind_phys | in | F | +!! | vmr_cfc11 | volume_mixing_ratio_cfc11 | volume mixing ratio cfc11 | kg kg-1 | 2 | real | kind_phys | in | F | +!! | vmr_cfc12 | volume_mixing_ratio_cfc12 | volume mixing ratio cfc12 | kg kg-1 | 2 | real | kind_phys | in | F | +!! | vmr_cfc22 | volume_mixing_ratio_cfc22 | volume mixing ratio cfc22 | kg kg-1 | 2 | real | kind_phys | in | F | +!! | vmr_ccl4 | volume_mixing_ratio_ccl4 | volume mixing ratio ccl4 | kg kg-1 | 2 | real | kind_phys | in | F | +!! | icseed | seed_random_numbers_lw | seed for random number generation for longwave radiation | none | 1 | integer | | in | F | +!! | tau_aer | aerosol_optical_depth_for_longwave_bands_01-16 | aerosol optical depth for longwave bands 01-16 | none | 3 | real | kind_phys | in | F | +!! | ssa_aer | aerosol_single_scattering_albedo_for_longwave_bands_01-16 | aerosol single scattering albedo for longwave bands 01-16 | frac | 3 | real | kind_phys | in | F | +!! | sfc_emiss | surface_longwave_emissivity | surface emissivity | frac | 1 | real | kind_phys | in | F | +!! | skt | surface_ground_temperature_for_radiation | surface ground temperature for radiation | K | 1 | real | kind_phys | in | F | +!! | dzlyr | layer_thickness_for_radiation | layer thickness | km | 2 | real | kind_phys | in | F | +!! | delpin | layer_pressure_thickness_for_radiation | layer pressure thickness | hPa | 2 | real | kind_phys | in | F | +!! | de_lgth | cloud_decorrelation_length | cloud decorrelation length | km | 1 | real | kind_phys | in | F | +!! | ncol | horizontal_loop_extent | horizontal dimension | count | 0 | integer | | in | F | +!! | nlay | adjusted_vertical_layer_dimension_for_radiation | number of vertical layers for radiation | count | 0 | integer | | in | F | +!! | lprint | flag_print | flag to print | flag | 0 | logical | | in | F | +!! | cldfrac | total_cloud_fraction | total cloud fraction | frac | 2 | real | kind_phys | in | F | +!! | lslwr | flag_to_calc_lw | flag to calculate LW irradiances | flag | 0 | logical | | in | F | +!! | cld_lwp | cloud_liquid_water_path | cloud liquid water path | g m-2 | 2 | real | kind_phys | in | T | +!! | cld_ref_liq | mean_effective_radius_for_liquid_cloud | mean effective radius for liquid cloud | micron | 2 | real | kind_phys | in | T | +!! | cld_iwp | cloud_ice_water_path | cloud ice water path | g m-2 | 2 | real | kind_phys | in | T | +!! | cld_ref_ice | mean_effective_radius_for_ice_cloud | mean effective radius for ice cloud | micron | 2 | real | kind_phys | in | T | +!! | cld_rwp | cloud_rain_water_path | cloud ice water path | g m-2 | 2 | real | kind_phys | in | T | +!! | cld_ref_rain | mean_effective_radius_for_rain_drop | mean effective radius for rain drop | micron | 2 | real | kind_phys | in | T | +!! | cld_swp | cloud_snow_water_path | cloud snow water path | g m-2 | 2 | real | kind_phys | in | T | +!! | cld_ref_snow | mean_effective_radius_for_snow_flake | mean effective radius for snow flake | micron | 2 | real | kind_phys | in | T | +!! | cld_od | cloud_optical_depth | cloud optical depth | none | 2 | real | kind_phys | in | T | +!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | +!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! | kdist_lw | K_distribution_file_for_RRTMGP_LW_scheme | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | +!! | kdist_lw_cldy | K_distribution_file_for_cloudy_RRTMGP_LW_scheme | DDT containing spectral information for cloudy RRTMGP LW radiation scheme | DDT | 0 | ty_cloud_optics | | in | F | +!! | gas_concentrations | Gas_concentrations_for_RRTMGP_suite | DDT containing gas concentrations for RRTMGP radiation scheme | DDT | 0 | ty_gas_concs | | inout | F | !! ! ######################################################################################### subroutine GFS_rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr_n2o, & ! IN vmr_ch4, vmr_o2, vmr_co, vmr_cfc11, vmr_cfc12, vmr_cfc22, vmr_ccl4, icseed, tau_aer, & ! IN ssa_aer, sfc_emiss, skt, dzlyr, delpin, de_lgth, ncol, nlay, lprint, cldfrac, lslwr, & ! IN - kdist_lw, kdist_lw_cldy, & - hlwc, topflx, sfcflx, cldtau, & ! OUT - hlw0, hlwb, flxprf, & ! OPT(out) + kdist_lw, kdist_lw_cldy, gas_concentrations, & ! OUT cld_lwp, cld_ref_liq, cld_iwp, cld_ref_ice, cld_rwp, cld_ref_rain, cld_swp, & ! OPT(in) cld_ref_snow, cld_od, errmsg, errflg) ! OPT(in) @@ -809,8 +788,8 @@ subroutine GFS_rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, kdist_lw ! DDT containing LW spectral information type(ty_cloud_optics),intent(in) :: & kdist_lw_cldy -! type(ty_gas_concs_type),intent(inout) :: & -! gas_concentrations + type(ty_gas_concs),intent(inout) :: & + gas_concentrations real(kind_phys), dimension(ncol), intent(in) :: & sfc_emiss, & ! Surface emissivity (1) skt, & ! Surface(skin) temperature (K) @@ -855,37 +834,10 @@ subroutine GFS_rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, errmsg ! Error message integer, intent(out) :: & errflg ! Error code - real(kind_phys),dimension(ncol,nlay),intent(inout) :: & - hlwc, & ! All-sky heating-rate (K/sec) - cldtau ! ~10mu band layer tau (1) - type(topflw_type), dimension(ncol), intent(inout) :: & - topflx ! radiation fluxes at top, components: - ! upfxc - total sky upward flux at top (w/m2) - ! upfx0 - clear sky upward flux at top (w/m2) - type(sfcflw_type), dimension(ncol), intent(inout) :: & - sfcflx ! radiation fluxes at sfc, components: - ! upfxc - total sky upward flux at sfc (w/m2) - ! upfx0 - clear sky upward flux at sfc (w/m2) - ! dnfxc - total sky downward flux at sfc (w/m2) - ! dnfx0 - clear sky downward flux at sfc (w/m2) - - ! Outputs (optional) - real(kind_phys), dimension(ncol,nlay,nbandsLW), optional, intent(inout) :: & - hlwb ! All-sky heating rate, in each band (K/sec) - real(kind_phys), dimension(ncol,nlay), optional, intent(inout) :: & - hlw0 ! Clear-sky heating rate (K/sec) - type(proflw_type), dimension(ncol,nlay+1), optional, intent(inout) :: & - flxprf ! 2D radiative fluxes, components: - ! upfxc - total sky upward flux (W/m2) - ! dnfxc - total sky dnward flux (W/m2) - ! upfx0 - clear sky upward flux (W/m2) - ! dnfx0 - clear sky dnward flux (W/m2) ! Local variables integer :: iGpt,iCol,iLay,iBand,iTOA,iSFC - integer,dimension(ncol) :: ipseed - real(kind_phys), dimension(nBandsLW,ncol) :: & - sfc_emiss_byband + integer,dimension(ncol) :: ipseed real(kind_phys), dimension(ncol,nlay+1),target :: & flux_up_allSky, flux_up_clrSky, flux_dn_allSky, flux_dn_clrSky real(kind_phys), dimension(ncol,nlay+1,nBandsLW),target :: & @@ -916,12 +868,6 @@ subroutine GFS_rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, optical_props_mcica,& ! Optical properties for clouds (sampled) optical_props_aer ! Optical properties for aerosols - type(ty_source_func_lw) :: & - sources ! source function - type(ty_fluxes_byband) :: & - fluxAllSky, & ! All-sky flux (W/m2) - fluxClrSky ! Clear-sky flux (W/m2) - ! Initialize CCPP error handling variables errmsg = '' errflg = 0 @@ -929,11 +875,6 @@ subroutine GFS_rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, ! Some consistency checks... - ! Are any optional outputs requested? - l_ClrSky_HR = present(hlw0) - l_AllSky_HR_byband = present(hlwb) - l_fluxes2D = present(flxprf) - ! Check for optional input arguments, this depends on cloud method if (ilwcliq > 0) then ! use prognostic cloud method if (.not. present(cld_lwp) .or. .not. present(cld_ref_liq) .or. & @@ -958,16 +899,6 @@ subroutine GFS_rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, end if end if - ! What is vertical ordering? - top_at_1 = (p_lay(1,1) .lt. p_lay(1,nlay)) - if (top_at_1) then - iSFC = nlay+1 - iTOA = 1 - else - iSFC = 1 - iTOA = nlay+1 - endif - ! Change random number seed value for each radiation invocation (isubclw =1 or 2). if(isubclw == 1) then ! advance prescribed permutation seed do iCol = 1, ncol @@ -979,12 +910,6 @@ subroutine GFS_rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, enddo endif - ! Surface emissivity - sfc_emiss_byband(:,:) = 1. - do iBand=1,nBandsLW - where(sfc_emiss .gt. epsilon .and. sfc_emiss .le. 1) sfc_emiss_byband(iBand,:) = sfc_emiss - enddo - ! Compute volume mixing-ratios for ozone (mmr) and specific-humidity. vmr_h2o = merge((q_lay/(1-q_lay))*amdw, 0., q_lay .ne. 1.) vmr_o3 = merge(o3_lay*amdo3, 0., o3_lay .gt. 0.) @@ -1007,7 +932,6 @@ subroutine GFS_rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, ! Call RRTMGP ! ####################################################################################### ! Allocate space for source functions and gas optical properties [ncol,nlay,ngpts] - call check_error_msg(sources%alloc( nCol, nLay, kdist_lw)) call check_error_msg(optical_props_clr%alloc_1scl( nCol, nLay, kdist_lw)) call check_error_msg(optical_props_mcica%alloc_1scl(nCol, nLay, kdist_lw)) ! Cloud optics [nCol,nLay,nBands] @@ -1017,17 +941,6 @@ subroutine GFS_rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, call check_error_msg(optical_props_aer%init(optical_props_clr%get_band_lims_wavenumber())) call check_error_msg(optical_props_aer%alloc_1scl(ncol,nlay)) - ! Initialize RRTMGP files - fluxAllSky%flux_up => flux_up_allSky - fluxAllsky%flux_dn => flux_dn_allSky - fluxClrSky%flux_up => flux_up_clrSky - fluxClrsky%flux_dn => flux_dn_clrSky - ! Only calculate fluxes by-band, only when heating-rate profiles by band are requested. - if (l_AllSky_HR_byband) then - fluxAllSky%bnd_flux_up => fluxBB_up_allSky - fluxAllsky%bnd_flux_dn => fluxBB_dn_allSky - endif - ! ####################################################################################### ! Set gas concentrations ! ####################################################################################### @@ -1104,75 +1017,6 @@ subroutine GFS_rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, call check_error_msg(draw_samples(cldfracMCICA,optical_props_cldy,optical_props_mcica)) endif - ! ####################################################################################### - ! Compute fluxes - ! ####################################################################################### - call check_error_msg(rte_lw( & - kdist_lw, & - gas_concentrations, & - p_lay(1:ncol,1:nlay), & - t_lay(1:ncol,1:nlay), & - p_lev(1:ncol,1:nlay+1), & - skt(1:ncol), & - sfc_emiss_byband, & - optical_props_mcica, & - fluxAllSky, & - fluxClrSky, & - aer_props = optical_props_aer)) - - ! ####################################################################################### - ! Compute heating rates - ! ####################################################################################### - if (l_ClrSky_HR) then - call check_error_msg(compute_heating_rate( & - fluxClrSky%flux_up, & - fluxClrSky%flux_dn, & - p_lev(1:ncol,1:nlay+1), & - thetaTendClrSky)) - endif - if (l_AllSky_HR_byband) then - do iBand=1,nBandsLW - call check_error_msg(compute_heating_rate( & - fluxAllSky%bnd_flux_up(:,:,iBand), & - fluxAllSky%bnd_flux_dn(:,:,iBand), & - p_lev(1:ncol,1:nlay+1), & - thetaTendByBandAllSky(:,:,iBand))) - enddo - else - call check_error_msg(compute_heating_rate( & - fluxAllSky%flux_up, & - fluxAllSky%flux_dn, & - p_lev(1:ncol,1:nlay+1), & - thetaTendAllSky)) - endif - - ! ####################################################################################### - ! Copy fluxes from RRTGMP types into model radiation types. - ! ####################################################################################### - ! Mandatory outputs - topflx%upfxc = fluxAllSky%flux_up(:,iTOA) - topflx%upfx0 = fluxClrSky%flux_up(:,iTOA) - sfcflx%upfxc = fluxAllSky%flux_up(:,iSFC) - sfcflx%upfx0 = fluxClrSky%flux_up(:,iSFC) - sfcflx%dnfxc = fluxAllSky%flux_dn(:,iSFC) - sfcflx%dnfx0 = fluxClrSky%flux_dn(:,iSFC) - cldtau = optical_props_cldy%tau(:,:,7) - hlwc = thetaTendAllSky - - ! Optional output - if(l_fluxes2D) then - flxprf%upfxc = fluxAllSky%flux_up - flxprf%dnfxc = fluxAllSky%flux_dn - flxprf%upfx0 = fluxClrSky%flux_up - flxprf%dnfx0 = fluxClrSky%flux_dn - endif - if (l_AllSky_HR_byband) then - hlwb = thetaTendByBandAllSky - endif - if (l_ClrSky_HR) then - hlw0 = thetaTendClrSky - endif - end subroutine GFS_rrtmgp_lw_run ! subroutine GFS_rrtmgp_lw_finalize() diff --git a/physics/GFS_rrtmgp_lw.xml b/physics/GFS_rrtmgp_lw.xml index 4d8cd78a7..6016a67a1 100644 --- a/physics/GFS_rrtmgp_lw.xml +++ b/physics/GFS_rrtmgp_lw.xml @@ -345,39 +345,6 @@ F MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_run - - tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_step - longwave total sky heating rate - K s-1 - hlwc - real - (:,:) - out - F - MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_run - - - lw_fluxes_top_atmosphere - longwave total sky fluxes at the top of the atm - W m-2 - topflx - topflw_type - (:) - inout - F - MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_run - - - lw_fluxes_sfc - longwave total sky fluxes at the Earth surface - W m-2 - sfcflx - sfcflw_type - (:) - inout - F - MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_run - ccpp_error_message error message for error handling in CCPP @@ -400,50 +367,6 @@ F MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_run - - tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_time_step - longwave clear sky heating rate - K s-1 - hlw0 - real - (:,:) - inout - T - MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_run - - - lw_fluxes - lw fluxes total sky / csk and up / down at levels - W m-2 - flxprf - proflw_type - (:,:) - in - F - MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_run - - - lw_heating_rate_spectral - longwave total sky heating rate (spectral) - K s-1 - hlwb - real - (:,:,:) - inout - T - MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_run - - - lw_fluxes - lw fluxes total sky / csk and up / down at levels - W m-2 - flxprf - proflw_type - (:,:) - inout - T - MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_run - cloud_liquid_water_path cloud liquid water path diff --git a/physics/rrtmgp_lw_main.F90 b/physics/rrtmgp_lw_main.F90 index cfb5da060..f0e688f98 100644 --- a/physics/rrtmgp_lw_main.F90 +++ b/physics/rrtmgp_lw_main.F90 @@ -1,10 +1,14 @@ ! ########################################################################################### ! ########################################################################################### module rrtmgp_lw_main - use machine, only: kind_phys - use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp - use mo_cloud_optics, only: ty_cloud_optics - use mo_optical_props, only: ty_optical_props_1scl + use machine, only: kind_phys + use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp + use mo_cloud_optics, only: ty_cloud_optics + use mo_optical_props, only: ty_optical_props_1scl + use mo_rrtmgp_clr_all_sky, only: rte_lw + use mo_gas_concentrations, only: ty_gas_concs + use mo_fluxes_byband, only: ty_fluxes_byband + use GFS_rrtmgp_lw, only: check_error_msg public rrtmgp_lw_main_init, rrtmgp_lw_main_run, rrtmgp_lw_main_finalize contains @@ -15,22 +19,27 @@ end subroutine rrtmgp_lw_main_init ! ######################################################################################### ! ######################################################################################### !! \section arg_table_rrtmgp_lw_main_run Argument Table -!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | -!! |--------------------|-------------------------------------------------|--------------------------------------------------------------------|-------|------|-----------------------|-----------|--------|----------| -!! | ncol | horizontal_loop_extent | horizontal dimension | count | 0 | integer | | in | F | -!! | nlay | adjusted_vertical_layer_dimension_for_radiation | number of vertical layers for radiation | count | 0 | integer | | in | F | -!! | p_lay | air_pressure_at_layer_for_radiation_in_hPa | air pressure layer | hPa | 2 | real | kind_phys | in | F | -!! | p_lev | air_pressure_at_interface_for_radiation_in_hPa | air pressure level | hPa | 2 | real | kind_phys | in | F | -!! | t_lay | air_temperature_at_layer_for_radiation | air temperature layer | K | 2 | real | kind_phys | in | F | -!! | skt | surface_ground_temperature_for_radiation | surface ground temperature for radiation | K | 1 | real | kind_phys | in | F | -!! | sfc_emiss | surface_longwave_emissivity_in_each_band | surface lw emissivity in fraction in each LW band | frac | 2 | real | kind_phys | in | F | -!! | kdist_lw | K_distribution_file_for_RRTMGP_LW_scheme | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | -!! | optical_props_clds | optical_properties_for_cloudy_atmosphere | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_1scl | | in | F | -!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | -!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | +!! |-----------------------|-------------------------------------------------|--------------------------------------------------------------------|-------|------|-----------------------|-----------|--------|----------| +!! | ncol | horizontal_loop_extent | horizontal dimension | count | 0 | integer | | in | F | +!! | nlay | adjusted_vertical_layer_dimension_for_radiation | number of vertical layers for radiation | count | 0 | integer | | in | F | +!! | p_lay | air_pressure_at_layer_for_radiation_in_hPa | air pressure layer | hPa | 2 | real | kind_phys | in | F | +!! | p_lev | air_pressure_at_interface_for_radiation_in_hPa | air pressure level | hPa | 2 | real | kind_phys | in | F | +!! | t_lay | air_temperature_at_layer_for_radiation | air temperature layer | K | 2 | real | kind_phys | in | F | +!! | skt | surface_ground_temperature_for_radiation | surface ground temperature for radiation | K | 1 | real | kind_phys | in | F | +!! | sfc_emiss | surface_longwave_emissivity_in_each_band | surface lw emissivity in fraction in each LW band | frac | 2 | real | kind_phys | in | F | +!! | kdist_lw | K_distribution_file_for_RRTMGP_LW_scheme | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | +!! | optical_props_clds | optical_properties_for_cloudy_atmosphere | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_1scl | | in | F | +!! | optical_props_aerosol | optical_properties_for_aerosols | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_1scl | | in | F | +!! | gas_concentrations | Gas_concentrations_for_RRTMGP_suite | DDT containing gas concentrations for RRTMGP radiation scheme | DDT | 0 | ty_gas_concs | | in | F | +!! | fluxLW_allsky | lw_flux_profiles_byband_allsky | Fortran DDT containing RRTMGP 3D fluxes | DDT | 0 | ty_fluxes_byband | | out | F | +!! | fluxLW_clrsky | lw_flux_profiles_byband_clrsky | Fortran DDT containing RRTMGP 3D fluxes | DDT | 0 | ty_fluxes_byband | | out | F | +!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | +!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | !! - subroutine rrtmgp_lw_main_run(ncol, nlay, kdist_lw, p_lay, t_lay, & - p_lev, skt, sfc_emiss, optical_props_clds, errmsg, errflg) + subroutine rrtmgp_lw_main_run(ncol, nlay, kdist_lw, p_lay, t_lay, p_lev, skt, & + sfc_emiss, gas_concentrations, optical_props_clds, optical_props_aerosol,& + fluxLW_allsky, fluxLW_clrsky, errmsg, errflg) ! Inputs integer, intent(in) :: & @@ -48,15 +57,35 @@ subroutine rrtmgp_lw_main_run(ncol, nlay, kdist_lw, p_lay, t_lay, & real(kind_phys), dimension(kdist_lw%get_nband(),ncol) :: & sfc_emiss ! Surface emissivity (1) type(ty_optical_props_1scl),intent(in) :: & - optical_props_clds - + optical_props_clds, & + optical_props_aerosol + type(ty_gas_concs),intent(in) :: & + gas_concentrations + type(ty_fluxes_byband) :: & + fluxLW_allsky, & ! All-sky flux (W/m2) + fluxLW_clrsky ! Clear-sky flux (W/m2) + ! Outputs character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg - + ! Initialize CCPP error handling variables errmsg = '' errflg = 0 + + ! Call RRTMGP LW scheme + call check_error_msg(rte_lw( & + kdist_lw, & ! IN - spectral information + gas_concentrations, & ! IN - gas concentrations (vmr) + p_lay, & ! IN - pressure at layer interfaces (Pa) + t_lay, & ! IN - temperature at layer interfaes (K) + p_lev, & ! IN - pressure at layer centers (Pa) + skt, & ! IN - skin temperature (K) + sfc_emiss, & ! IN - surface emissivity in each LW band + optical_props_clds, & ! IN - DDT containing cloud optical information + fluxLW_allsky, & ! OUT - Fluxes, all-sky, 3D (nCol,nLay,nBand) + fluxLW_clrsky, & ! OUT - Fluxes, clear-sky, 3D (nCol,nLay,nBand) + aer_props = optical_props_aerosol)) ! IN(optional) - DDT containing aerosol optical information end subroutine rrtmgp_lw_main_run diff --git a/physics/rrtmgp_lw_main.xml b/physics/rrtmgp_lw_main.xml new file mode 100644 index 000000000..04ac5c73e --- /dev/null +++ b/physics/rrtmgp_lw_main.xml @@ -0,0 +1,173 @@ + + + + + + + horizontal_loop_extent + horizontal dimension + count + ncol + integer + + in + F + MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_main_run + + + adjusted_vertical_layer_dimension_for_radiation + number of vertical layers for radiation + count + nlay + integer + + in + F + MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_main_run + + + + air_pressure_at_layer_for_radiation_in_hPa + air pressure layer + hPa + p_lay + real + (:,:) + in + F + MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_main_run + + + air_pressure_at_interface_for_radiation_in_hPa + air pressure level + hPa + p_lev + real + (:,:) + in + F + MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_main_run + + + air_temperature_at_layer_for_radiation + air temperature layer + K + t_lay + real + (:,:) + in + F + MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_main_run + + + surface_ground_temperature_for_radiation + surface ground temperature for radiation + K + skt + real + (:) + in + F + MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_main_run + + + surface_longwave_emissivity + surface emissivity + frac + sfc_emiss + real + (:) + in + F + MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_main_run + + + K_distribution_file_for_RRTMGP_LW_scheme + DDT containing spectral information for RRTMGP LW radiation scheme + DDT + kdist_lw + ty_gas_optics_rrtmgp_type + + in + F + MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_main_run + + + optical_properties_for_cloudy_atmosphere + Fortran DDT containing RRTMGP optical properties + DDT + optical_props_clds + ty_optical_props_1scl + + in + F + MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_main_run + + + optical_properties_for_aerosols + Fortran DDT containing RRTMGP optical properties + DDT + optical_props_aerosol + ty_optical_props_1scl + + in + F + MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_main_run + + + Gas_concentrations_for_RRTMGP_suite + Fortran DDT containing gas concentrations for RRTMGP radiation scheme + DDT + gas_concentrations + ty_gas_concs + + in + F + MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_main_run + + + lw_flux_profiles_byband_allsky + Fortran DDT containing RRTMGP 3D fluxes + DDT + fluxLW_allsky + ty_fluxes_byband + + in + F + MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_main_run + + + lw_flux_profiles_byband_clrsky + Fortran DDT containing RRTMGP 3D fluxes + DDT + fluxLW_clrsky + ty_fluxes_byband + + in + F + MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_main_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_main_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_main_run + + + diff --git a/physics/rrtmgp_lw_post.F90 b/physics/rrtmgp_lw_post.F90 new file mode 100644 index 000000000..9743b5b22 --- /dev/null +++ b/physics/rrtmgp_lw_post.F90 @@ -0,0 +1,174 @@ +! ########################################################################################### +! ########################################################################################### +module rrtmgp_lw_post + use machine, only: kind_phys + use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp + use mo_fluxes_byband, only: ty_fluxes_byband + use mo_heating_rates, only: compute_heating_rate + use GFS_rrtmgp_lw, only: check_error_msg + use module_radlw_parameters, only: topflw_type, sfcflw_type, proflw_type + + implicit none + + ! Logical flags for optional output fields in rrtmgp_lw_post_run(), default=.false. + logical :: & + l_AllSky_HR_byband = .false., & ! 2D [ncol,nlay] all-sky heating rates, in each band [ncol,nlay,nBandsLW]? + l_ClrSky_HR = .false., & ! 2D [ncol,nlay] clear-sky heating rate? + l_fluxes2D = .false. ! 2D [ncol,nlay] radiative fluxes? *Note* fluxes is a DDT w/ 4 fields. + + public rrtmgp_lw_post_init, rrtmgp_lw_post_run, rrtmgp_lw_post_finalize +contains + + subroutine rrtmgp_lw_post_init() + end subroutine rrtmgp_lw_post_init + + ! ######################################################################################### + ! ######################################################################################### +!! \section arg_table_rrtmgp_lw_post_run Argument Table +!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | +!! |-----------------------|-----------------------------------------------------------------------------------------------|--------------------------------------------------------------------|-------|------|-----------------------|-----------|--------|----------| +!! | ncol | horizontal_loop_extent | horizontal dimension | count | 0 | integer | | in | F | +!! | nlay | adjusted_vertical_layer_dimension_for_radiation | number of vertical layers for radiation | count | 0 | integer | | in | F | +!! | p_lev | air_pressure_at_interface_for_radiation_in_hPa | air pressure level | hPa | 2 | real | kind_phys | in | F | +!! | fluxLW_allsky | lw_flux_profiles_byband_allsky | Fortran DDT containing RRTMGP 3D fluxes | DDT | 0 | ty_fluxes_byband | | in | F | +!! | fluxLW_clrsky | lw_flux_profiles_byband_clrsky | Fortran DDT containing RRTMGP 3D fluxes | DDT | 0 | ty_fluxes_byband | | in | F | +!! | kdist_lw | K_distribution_file_for_RRTMGP_LW_scheme | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | +!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | +!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! | hlwc | tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_step | longwave total sky heating rate | K s-1 | 2 | real | kind_phys | out | F | +!! | topflx | lw_fluxes_top_atmosphere | longwave total sky fluxes at the top of the atm | W m-2 | 1 | topflw_type | | inout | F | +!! | sfcflx | lw_fluxes_sfc | longwave total sky fluxes at the Earth surface | W m-2 | 1 | sfcflw_type | | inout | F | +!! | hlw0 | tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_time_step | longwave clear sky heating rate | K s-1 | 2 | real | kind_phys | inout | T | +!! | hlwb | lw_heating_rate_spectral | longwave total sky heating rate (spectral) | K s-1 | 3 | real | kind_phys | inout | T | +!! | flxprf | lw_fluxes | lw fluxes total sky / csk and up / down at levels | W m-2 | 2 | proflw_type | | inout | T | +!! + subroutine rrtmgp_lw_post_run(ncol, nlay, p_lev, kdist_lw, fluxLW_allsky, fluxLW_clrsky, & + hlwc, topflx, sfcflx, hlw0, hlwb, flxprf, errmsg, errflg) + + ! Inputs + integer, intent(in) :: & + ncol, & ! Number of horizontal gridpoints + nlay ! Number of vertical layers + real(kind_phys), dimension(ncol,nlay+1), intent(in) :: & + p_lev ! Pressure @ model layer-interfaces (hPa) + type(ty_gas_optics_rrtmgp),intent(in) :: & + kdist_lw ! DDT containing LW spectral information + type(ty_fluxes_byband),intent(in) :: & + fluxLW_allsky, & ! All-sky flux (W/m2) + fluxLW_clrsky ! Clear-sky flux (W/m2) + + ! Outputs + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + real(kind_phys),dimension(ncol,nlay),intent(inout) :: & + hlwc ! All-sky heating-rate (K/sec) + type(topflw_type), dimension(ncol), intent(inout) :: & + topflx ! radiation fluxes at top, components: + ! upfxc - total sky upward flux at top (w/m2) + ! upfx0 - clear sky upward flux at top (w/m2) + type(sfcflw_type), dimension(ncol), intent(inout) :: & + sfcflx ! radiation fluxes at sfc, components: + ! upfxc - total sky upward flux at sfc (w/m2) + ! upfx0 - clear sky upward flux at sfc (w/m2) + ! dnfxc - total sky downward flux at sfc (w/m2) + ! dnfx0 - clear sky downward flux at sfc (w/m2) + + ! Outputs (optional) + real(kind_phys), dimension(ncol,nlay,kdist_lw%get_nband()), optional, intent(inout) :: & + hlwb ! All-sky heating rate, by band (K/sec) + real(kind_phys), dimension(ncol,nlay), optional, intent(inout) :: & + hlw0 ! Clear-sky heating rate (K/sec) + type(proflw_type), dimension(ncol,nlay+1), optional, intent(inout) :: & + flxprf ! 2D radiative fluxes, components: + ! upfxc - total sky upward flux (W/m2) + ! dnfxc - total sky dnward flux (W/m2) + ! upfx0 - clear sky upward flux (W/m2) + ! dnfx0 - clear sky dnward flux (W/m2) + + ! Local variables + integer :: iBand, iTOA, iSFC + logical :: top_at_1 + real(kind_phys), dimension(ncol,nlay) :: thetaTendClrSky, thetaTendAllSky + real(kind_phys), dimension(ncol,nlay,kdist_lw%get_nband()) :: thetaTendByBandAllSky + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + + ! What is vertical ordering? + top_at_1 = (p_lev(1,1) .lt. p_lev(1,nlay)) + if (top_at_1) then + iSFC = nlay+1 + iTOA = 1 + else + iSFC = 1 + iTOA = nlay+1 + endif + + ! Are any optional outputs requested? + l_ClrSky_HR = present(hlw0) + l_AllSky_HR_byband = present(hlwb) + l_fluxes2D = present(flxprf) + + ! ####################################################################################### + ! Compute heating rates + ! ####################################################################################### + if (l_ClrSky_HR) then + call check_error_msg(compute_heating_rate( & + fluxLW_clrsky%flux_up, & + fluxLW_clrsky%flux_dn, & + p_lev(1:ncol,1:nlay+1), & + thetaTendClrSky)) + endif + if (l_AllSky_HR_byband) then + do iBand=1,kdist_lw%get_nband() + call check_error_msg(compute_heating_rate( & + fluxLW_allsky%bnd_flux_up(:,:,iBand), & + fluxLW_allsky%bnd_flux_dn(:,:,iBand), & + p_lev(1:ncol,1:nlay+1), & + thetaTendByBandAllSky(:,:,iBand))) + enddo + else + call check_error_msg(compute_heating_rate( & + fluxLW_allsky%flux_up, & + fluxLW_allsky%flux_dn, & + p_lev(1:ncol,1:nlay+1), & + thetaTendAllSky)) + endif + + ! ####################################################################################### + ! Copy fluxes from RRTGMP types into model radiation types. + ! ####################################################################################### + ! Mandatory outputs + topflx%upfxc = fluxLW_allsky%flux_up(:,iTOA) + topflx%upfx0 = fluxLW_clrsky%flux_up(:,iTOA) + sfcflx%upfxc = fluxLW_allsky%flux_up(:,iSFC) + sfcflx%upfx0 = fluxLW_clrsky%flux_up(:,iSFC) + sfcflx%dnfxc = fluxLW_allsky%flux_dn(:,iSFC) + sfcflx%dnfx0 = fluxLW_clrsky%flux_dn(:,iSFC) + !cldtau = optical_props_cldy%tau(:,:,7) + hlwc = thetaTendAllSky + + ! Optional output + if(l_fluxes2D) then + flxprf%upfxc = fluxLW_allsky%flux_up + flxprf%dnfxc = fluxLW_allsky%flux_dn + flxprf%upfx0 = fluxLW_clrsky%flux_up + flxprf%dnfx0 = fluxLW_clrsky%flux_dn + endif + if (l_AllSky_HR_byband) then + hlwb = thetaTendByBandAllSky + endif + if (l_ClrSky_HR) then + hlw0 = thetaTendClrSky + endif + + + end subroutine rrtmgp_lw_post_run + + subroutine rrtmgp_lw_post_finalize() + end subroutine rrtmgp_lw_post_finalize + + + +end module rrtmgp_lw_post diff --git a/physics/rrtmgp_lw_post.xml b/physics/rrtmgp_lw_post.xml new file mode 100644 index 000000000..84d3b4108 --- /dev/null +++ b/physics/rrtmgp_lw_post.xml @@ -0,0 +1,162 @@ + + + + + + horizontal_loop_extent + horizontal dimension + count + ncol + integer + + in + F + MODULE_rrtmgp_lw_post SCHEME_rrtmgp_lw_post SUBROUTINE_rrtmgp_lw_post_run + + + adjusted_vertical_layer_dimension_for_radiation + number of vertical layers for radiation + count + nlay + integer + + in + F + MODULE_rrtmgp_lw_post SCHEME_rrtmgp_lw_post SUBROUTINE_rrtmgp_lw_post_run + + + air_pressure_at_interface_for_radiation_in_hPa + air pressure level + hPa + p_lev + real + (:,:) + in + F + MODULE_rrtmgp_lw_post SCHEME_rrtmgp_lw_post SUBROUTINE_rrtmgp_lw_post_run + + + lw_flux_profiles_byband_allsky + Fortran DDT containing RRTMGP 3D fluxes + DDT + fluxLW_allsky + ty_fluxes_byband + + in + F + MODULE_rrtmgp_lw_post SCHEME_rrtmgp_lw_post SUBROUTINE_rrtmgp_lw_post_run + + + lw_flux_profiles_byband_clrsky + Fortran DDT containing RRTMGP 3D fluxes + DDT + fluxLW_clrsky + ty_fluxes_byband + + in + F + MODULE_rrtmgp_lw_post SCHEME_rrtmgp_lw_post SUBROUTINE_rrtmgp_lw_post_run + + + K_distribution_file_for_RRTMGP_LW_POST_scheme + DDT containing spectral information for RRTMGP LW radiation scheme + DDT + kdist_lw + ty_gas_optics_rrtmgp_type + + in + F + MODULE_rrtmgp_lw_post SCHEME_rrtmgp_lw_post SUBROUTINE_rrtmgp_lw_post_run + + + K_distribution_file_for_RRTMGP_LW_POST_scheme + DDT containing spectral information for RRTMGP LW radiation scheme + DDT + kdist_lw + ty_gas_optics_rrtmgp_type + + in + F + MODULE_rrtmgp_lw_post SCHEME_rrtmgp_lw_post SUBROUTINE_rrtmgp_lw_post_run + + + + tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_step + longwave total sky heating rate + K s-1 + hlwc + real + (:,:) + out + F + MODULE_rrtmgp_lw_post SCHEME_rrtmgp_lw_post SUBROUTINE_rrtmgp_lw_post_run + + + lw_fluxes_top_atmosphere + longwave total sky fluxes at the top of the atm + W m-2 + topflx + topflw_type + (:) + inout + F + MODULE_rrtmgp_lw_post SCHEME_rrtmgp_lw_post SUBROUTINE_rrtmgp_lw_post_run + + + lw_fluxes_sfc + longwave total sky fluxes at the Earth surface + W m-2 + sfcflx + sfcflw_type + (:) + inout + F + MODULE_rrtmgp_lw_post SCHEME_rrtmgp_lw_post SUBROUTINE_rrtmgp_lw_post_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_rrtmgp_lw_post SCHEME_rrtmgp_lw_post SUBROUTINE_rrtmgp_lw_post_run + + + + tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_time_step + longwave clear sky heating rate + K s-1 + hlw0 + real + (:,:) + inout + T + MODULE_rrtmgp_lw_post SCHEME_rrtmgp_lw_post SUBROUTINE_rrtmgp_lw_post_run + + + lw_fluxes + lw fluxes total sky / csk and up / down at levels + W m-2 + flxprf + proflw_type + (:,:) + in + F + MODULE_rrtmgp_lw_post SCHEME_rrtmgp_lw_post SUBROUTINE_rrtmgp_lw_post_run + + + lw_heating_rate_spectral + longwave total sky heating rate (spectral) + K s-1 + hlwb + real + (:,:,:) + inout + T + MODULE_rrtmgp_lw_post SCHEME_rrtmgp_lw_post SUBROUTINE_rrtmgp_lw_post_run + + + diff --git a/physics/rrtmgp_lw_pre.F90 b/physics/rrtmgp_lw_pre.F90 index 4a553b84b..c71b096b7 100644 --- a/physics/rrtmgp_lw_pre.F90 +++ b/physics/rrtmgp_lw_pre.F90 @@ -24,7 +24,7 @@ end subroutine rrtmgp_lw_pre_init !! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | !! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | !! | kdist_lw | K_distribution_file_for_RRTMGP_LW_scheme | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | -!! | sfc_emiss_byband | surface_longwave_emissivity_in_each_band | surface lw emissivity in fraction in each LW band | frac | 2 | real | kind_phys | out | F | +!! | sfc_emiss_byband | surface_longwave_emissivity_in_each_band | surface lw emissivity in fraction in each LW band | frac | 2 | real | kind_phys | inout | F | !! subroutine rrtmgp_lw_pre_run (Model, Grid, Sfcprop, Radtend, im, tsfg, tsfa, kdist_lw, sfc_emiss_byband, errmsg, errflg) @@ -47,7 +47,7 @@ subroutine rrtmgp_lw_pre_run (Model, Grid, Sfcprop, Radtend, im, tsfg, tsfa, kdi real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(in) :: tsfa, tsfg type(ty_gas_optics_rrtmgp),intent(in) :: & kdist_lw ! DDT containing LW spectral information - real(kind_phyd),dimension(kdist_lw%get_nband(),im),intent(out) :: sfc_emiss_byband + real(kind_phys),dimension(kdist_lw%get_nband(),im),intent(inout) :: sfc_emiss_byband character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg integer :: ij @@ -56,6 +56,8 @@ subroutine rrtmgp_lw_pre_run (Model, Grid, Sfcprop, Radtend, im, tsfg, tsfa, kdi errmsg = '' errflg = 0 + print*,'In RRTMGP_lW_PRE_RUN(): top',shape(sfc_emiss_byband),im + print*,'In RRTMGP_lW_PRE_RUN(): top',shape(Radtend%semis) if (Model%lslwr) then !> - Call module_radiation_surface::setemis(),to setup surface !! emissivity for LW radiation. @@ -64,9 +66,11 @@ subroutine rrtmgp_lw_pre_run (Model, Grid, Sfcprop, Radtend, im, tsfg, tsfa, kdi tsfg, tsfa, Sfcprop%hprim, IM, & Radtend%semis) ! --- outputs do ij=1,kdist_lw%get_nband() - sfc_emiss_byband(ij,:) = Radtend%semis + print*,ij + sfc_emiss_byband(ij,1:im) = Radtend%semis(1:im) enddo endif + print*,'In RRTMGP_lW_PRE_RUN(): bottom' end subroutine rrtmgp_lw_pre_run diff --git a/physics/rrtmgp_lw_pre.xml b/physics/rrtmgp_lw_pre.xml new file mode 100644 index 000000000..4750cd469 --- /dev/null +++ b/physics/rrtmgp_lw_pre.xml @@ -0,0 +1,128 @@ + + + + + GFS_control_type_instance + Fortran DDT containing FV3-GFS model control parameters + DDT + Model + GFS_control_type + + in + F + MODULE_rrtmgp_lw_pre SCHEME_rrtmgp_lw_pre SUBROUTINE_rrtmgp_lw_pre_run + + + GFS_grid_type_instance + Fortran DDT containing FV3-GFS grid and interpolation related data + DDT + Grid + GFS_grid_type + + in + F + MODULE_rrtmgp_lw_pre SCHEME_rrtmgp_lw_pre SUBROUTINE_rrtmgp_lw_pre_run + + + GFS_sfcprop_type_instance + Fortran DDT containing FV3-GFS surface fields + DDT + Sfcprop + GFS_sfcprop_type + + in + F + MODULE_rrtmgp_lw_pre SCHEME_rrtmgp_lw_pre SUBROUTINE_rrtmgp_lw_pre_run + + + GFS_radtend_type_instance + Fortran DDT containing FV3-GFS radiation tendencies + DDT + Radtend + GFS_radtend_type + + inout + F + MODULE_rrtmgp_lw_pre SCHEME_rrtmgp_lw_pre SUBROUTINE_rrtmgp_lw_pre_run + + + horizontal_loop_extent + horizontal loop extent + count + im + integer + + in + F + MODULE_rrtmgp_lw_pre SCHEME_rrtmgp_lw_pre SUBROUTINE_rrtmgp_lw_pre_run + + + surface_ground_temperature_for_radiation + surface ground temperature for radiation + K + tsfg + real + (:) + in + F + MODULE_rrtmgp_lw_pre SCHEME_rrtmgp_lw_pre SUBROUTINE_rrtmgp_lw_pre_run + + + surface_air_temperature_for_radiation + lowest model layer air temperature for radiation + K + tsfa + real + (:) + in + F + MODULE_rrtmgp_lw_pre SCHEME_rrtmgp_lw_pre SUBROUTINE_rrtmgp_lw_pre_run + + + ccpp_error_message + error message for error handling in CCPP + none + errmsg + character + + out + F + MODULE_rrtmgp_lw_pre SCHEME_rrtmgp_lw_pre SUBROUTINE_rrtmgp_lw_pre_run + + + ccpp_error_flag + error flag for error handling in CCPP + flag + errflg + integer + + out + F + MODULE_rrtmgp_lw_pre SCHEME_rrtmgp_lw_pre SUBROUTINE_rrtmgp_lw_pre_run + + + K_distribution_file_for_RRTMGP_LW_scheme + DDT containing spectral information for RRTMGP LW radiation scheme + DDT + physics%kdist_lw + ty_gas_optics_rrtmgp_type + + in + F + MODULE_rrtmgp_lw_pre SCHEME_rrtmgp_lw_pre SUBROUTINE_rrtmgp_lw_pre_run + + + surface_longwave_emissivity_in_each_band + surface lw emissivity in fraction in each LW band + DDT + physics%sfc_emiss_byband + real + (:,:) + out + F + MODULE_rrtmgp_lw_pre SCHEME_rrtmgp_lw_pre SUBROUTINE_rrtmgp_lw_pre_run + + + + + diff --git a/physics/rte-rrtmgp b/physics/rte-rrtmgp index 43b02b7ba..929bf9df4 160000 --- a/physics/rte-rrtmgp +++ b/physics/rte-rrtmgp @@ -1 +1 @@ -Subproject commit 43b02b7ba21f5e2ef31da4f2411a519caf1546a3 +Subproject commit 929bf9df4983d1721270826a9b32b123ead1f48c From f99255df6af91ae5f9345484949c3f6f8b8cad75 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Thu, 16 May 2019 15:26:34 -0600 Subject: [PATCH 023/167] Commit for Robert to view. --- physics/GFS_rrtmgp_lw.F90 | 1039 ----------------- physics/GFS_rrtmgp_lw.xml | 470 -------- physics/GFS_rrtmgp_lw_post.F90 | 102 -- physics/GFS_rrtmgp_lw_post.xml | 150 --- physics/GFS_rrtmgp_lw_pre.F90 | 67 -- physics/GFS_rrtmgp_sw.xml | 623 ---------- physics/GFS_rrtmgp_sw_post.xml | 216 ---- physics/GFS_rrtmgp_sw_pre.xml | 183 --- physics/rrtmgp_lw.F90 | 104 ++ physics/rrtmgp_lw_main.xml | 173 --- physics/rrtmgp_lw_post.F90 | 2 +- physics/{GFS_rrtmgp_sw.F90 => rrtmgp_sw.F90} | 30 +- ..._rrtmgp_sw_post.F90 => rrtmgp_sw_post.F90} | 28 +- physics/rrtmgp_sw_pre.F90 | 118 ++ 14 files changed, 252 insertions(+), 3053 deletions(-) delete mode 100644 physics/GFS_rrtmgp_lw.F90 delete mode 100644 physics/GFS_rrtmgp_lw.xml delete mode 100644 physics/GFS_rrtmgp_lw_post.F90 delete mode 100644 physics/GFS_rrtmgp_lw_post.xml delete mode 100644 physics/GFS_rrtmgp_lw_pre.F90 delete mode 100644 physics/GFS_rrtmgp_sw.xml delete mode 100644 physics/GFS_rrtmgp_sw_post.xml delete mode 100644 physics/GFS_rrtmgp_sw_pre.xml create mode 100644 physics/rrtmgp_lw.F90 delete mode 100644 physics/rrtmgp_lw_main.xml rename physics/{GFS_rrtmgp_sw.F90 => rrtmgp_sw.F90} (99%) rename physics/{GFS_rrtmgp_sw_post.F90 => rrtmgp_sw_post.F90} (93%) create mode 100644 physics/rrtmgp_sw_pre.F90 diff --git a/physics/GFS_rrtmgp_lw.F90 b/physics/GFS_rrtmgp_lw.F90 deleted file mode 100644 index 7c88c20c3..000000000 --- a/physics/GFS_rrtmgp_lw.F90 +++ /dev/null @@ -1,1039 +0,0 @@ -! ########################################################################################### -! ########################################################################################### -module GFS_rrtmgp_lw - use mo_gas_concentrations, only: ty_gas_concs - use mo_fluxes, only: ty_fluxes_broadband - use mo_fluxes_byband, only: ty_fluxes_byband - use mo_optical_props, only: ty_optical_props_1scl,ty_optical_props_2str - use mo_source_functions, only: ty_source_func_lw - use mo_rte_kind, only: wl - use mo_heating_rates, only: compute_heating_rate - use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp - use mo_cloud_optics, only: ty_cloud_optics - use mo_cloud_sampling, only: sampled_mask_max_ran, sampled_mask_exp_ran, draw_samples - use machine, only: kind_phys - use module_radlw_parameters, only: topflw_type, sfcflw_type, proflw_type - use physparam, only: ilwcliq,isubclw,iovrlw,ilwrgas,icldflg,ilwrate - use GFS_typedefs, only: GFS_control_type - use mo_rrtmgp_constants, only: grav, avogad - use mo_rrtmgp_lw_cloud_optics, only: rrtmgp_lw_cloud_optics - use mersenne_twister, only: random_setseed, random_number, random_stat - use mo_rrtmgp_clr_all_sky, only: rte_lw - - implicit none - - ! Parameters - integer,parameter :: nGases = 6 - real(kind_phys),parameter :: epsilon=1.0e-6 - character(len=3),parameter, dimension(nGases) :: & - active_gases = (/ 'h2o', 'co2', 'o3 ', 'n2o', 'ch4', 'o2 '/) - - ! Molecular weight ratios (for converting mmr to vmr) - real(kind_phys), parameter :: & - amd = 28.9644_kind_phys, & ! Molecular weight of dry-air (g/mol) - amw = 18.0154_kind_phys, & ! Molecular weight of water vapor (g/mol) - amo3 = 47.9982_kind_phys, & ! Modelular weight of ozone (g/mol) - amdw = amd/amw, & ! Molecular weight of dry air / water vapor - amdo3 = amd/amo3 ! Molecular weight of dry air / ozone - - ! Module parameters (set during rrtmgp_lw_init()) - integer :: & - rrtmgp_lw_cld_phys, & ! RRTMGP cloud-physics (0-RRTMG, 1-RRTGMP(LUT), 2-RRTMGP(Pade)) - nGptsLW, & ! Number of LW spectral g-points - nBandsLW, & ! Number of LW bands - nrghice, & ! Number of ice roughness categories - ipsdlw0 ! Initial see for McICA - - integer,allocatable,dimension(:) :: & - ngb_LW ! Band index for each g-points - - public GFS_rrtmgp_lw_init, GFS_rrtmgp_lw_run, GFS_rrtmgp_lw_finalize -contains - ! ######################################################################################### - ! GFS_rrtmgp_lw_init - ! ######################################################################################### -!! \section arg_table_GFS_rrtmgp_lw_init Argument Table -!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | -!! |--------------------|-------------------------------------------------|---------------------------------------------------------------------------|-------|------|----------------------|-----------|--------|----------| -!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | -!! | mpirank | mpi_rank | current MPI rank | index | 0 | integer | | in | F | -!! | mpiroot | mpi_root | master MPI rank | index | 0 | integer | | in | F | -!! | mpicomm | mpi_comm | MPI communicator | index | 0 | integer | | in | F | -!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | -!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | -!! | kdist_lw | K_distribution_file_for_RRTMGP_LW_scheme | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | inout | F | -!! | kdist_lw_cldy | K_distribution_file_for_cloudy_RRTMGP_LW_scheme | DDT containing spectral information for cloudy RRTMGP LW radiation scheme | DDT | 0 | ty_cloud_optics | | inout | F | -!! | gas_concentrations | Gas_concentrations_for_RRTMGP_suite | DDT containing gas concentrations for RRTMGP radiation scheme | DDT | 0 | ty_gas_concs | | inout | F | -!! - ! ######################################################################################### - subroutine GFS_rrtmgp_lw_init(Model,mpicomm, mpirank, mpiroot, kdist_lw, kdist_lw_cldy, & - gas_concentrations, errmsg, errflg) - use netcdf - -#ifdef MPI - use mpi -#endif - - ! Inputs - type(GFS_control_type), intent(in) :: & - Model ! DDT containing model control parameters - integer,intent(in) :: & - mpicomm, & ! MPI communicator - mpirank, & ! Current MPI rank - mpiroot ! Master MPI rank - type(ty_gas_optics_rrtmgp),intent(inout) :: & - kdist_lw - type(ty_cloud_optics),intent(inout) :: & - kdist_lw_cldy - type(ty_gas_concs),intent(inout) :: & - gas_concentrations - - ! Outputs - character(len=*), intent(out) :: & - errmsg ! Error message - integer, intent(out) :: & - errflg ! Error code - - ! Variables that will be passed to gas_optics%load() - integer, dimension(:), allocatable :: & - kminor_start_lower, & ! used by RRTGMP gas optics - kminor_start_upper ! used by RRTGMP gas optics - integer, dimension(:,:), allocatable :: & - band2gpt, & ! used by RRTGMP gas optics - minor_limits_gpt_lower, & ! used by RRTGMP gas optics - minor_limits_gpt_upper ! used by RRTGMP gas optics - integer, dimension(:,:,:), allocatable :: & - key_species ! used by RRTGMP gas optics - real(kind_phys) :: & - press_ref_trop, & ! used by RRTGMP gas optics - temp_ref_p, & ! used by RRTGMP gas optics - temp_ref_t, & ! used by RRTGMP gas optics - radliq_lwr, & ! used by RRTGMP cloud optics - radliq_upr, & ! used by RRTGMP cloud optics - radliq_fac, & ! used by RRTGMP cloud optics - radice_lwr, & ! used by RRTGMP cloud optics - radice_upr, & ! used by RRTGMP cloud optics - radice_fac ! used by RRTGMP cloud optics - real(kind_phys), dimension(:), allocatable :: & - press_ref, & ! used by RRTGMP gas optics - temp_ref, & ! used by RRTGMP gas optics - pade_sizereg_extliq, & ! used by RRTGMP cloud optics - pade_sizereg_ssaliq, & ! used by RRTGMP cloud optics - pade_sizereg_asyliq, & ! used by RRTGMP cloud optics - pade_sizereg_extice, & ! used by RRTGMP cloud optics - pade_sizereg_ssaice, & ! used by RRTGMP cloud optics - pade_sizereg_asyice ! used by RRTGMP cloud optics - real(kind_phys), dimension(:,:), allocatable :: & - band_lims, & ! used by RRTGMP gas optics - totplnk, & ! used by RRTGMP gas optics - lut_extliq, & ! used by RRTGMP cloud optics - lut_ssaliq, & ! used by RRTGMP cloud optics - lut_asyliq, & ! used by RRTGMP cloud optics - band_lims_cldy ! used by RRTGMP cloud optics - - real(kind_phys), dimension(:,:,:), allocatable :: & - vmr_ref, & ! used by RRTGMP gas optics - kminor_lower, & ! used by RRTGMP gas optics - kminor_upper, & ! used by RRTGMP gas optics - rayl_lower, & ! used by RRTGMP gas optics - rayl_upper, & ! used by RRTGMP gas optics - lut_extice, & ! used by RRTGMP cloud optics - lut_ssaice, & ! used by RRTGMP cloud optics - lut_asyice, & ! used by RRTGMP cloud optics - pade_extliq, & ! used by RRTGMP cloud optics - pade_ssaliq, & ! used by RRTGMP cloud optics - pade_asyliq ! used by RRTGMP cloud optics - real(kind_phys), dimension(:,:,:,:), allocatable :: & - kmajor, & ! used by RRTGMP gas optics - planck_frac, & ! used by RRTGMP gas optics - pade_extice, & ! used by RRTGMP cloud optics - pade_ssaice, & ! used by RRTGMP cloud optics - pade_asyice ! used by RRTGMP cloud optics - character(len=32), dimension(:), allocatable :: & - gas_names, & ! used by RRTGMP gas optics - gas_minor, & ! used by RRTGMP gas optics - identifier_minor, & ! used by RRTGMP gas optics - minor_gases_lower, & ! used by RRTGMP gas optics - minor_gases_upper, & ! used by RRTGMP gas optics - scaling_gas_lower, & ! used by RRTGMP gas optics - scaling_gas_upper ! used by RRTGMP gas optics - logical(wl), dimension(:), allocatable :: & - minor_scales_with_density_lower, & ! used by RRTGMP gas optics - minor_scales_with_density_upper, & ! used by RRTGMP gas optics - scale_by_complement_lower, & ! used by RRTGMP gas optics - scale_by_complement_upper ! used by RRTGMP gas optics - - ! Dimensions (to be broadcast across all processors) - integer :: & - ntemps, & ! used by RRTGMP gas optics - npress, & ! used by RRTGMP gas optics - nabsorbers, & ! used by RRTGMP gas optics - nextrabsorbers, & ! used by RRTGMP gas optics - nminorabsorbers, & ! used by RRTGMP gas optics - nmixingfracs, & ! used by RRTGMP gas optics - nlayers, & ! used by RRTGMP gas optics - nbnds, & ! used by RRTGMP gas optics - ngpts, & ! used by RRTGMP gas optics - npairs, & ! used by RRTGMP gas optics - ninternalSourcetemps, & ! used by RRTGMP gas optics - nminor_absorber_intervals_lower, & ! used by RRTGMP gas optics - nminor_absorber_intervals_upper, & ! used by RRTGMP gas optics - ncontributors_lower, & ! used by RRTGMP gas optics - ncontributors_upper, & ! used by RRTGMP gas optics - nbandLWcldy, & ! used by RRTGMP cloud optics - nsize_liq, & ! used by RRTGMP cloud optics - nsize_ice, & ! used by RRTGMP cloud optics - nsizereg, & ! used by RRTGMP cloud optics - ncoeff_ext, & ! used by RRTGMP cloud optics - ncoeff_ssa_g, & ! used by RRTGMP cloud optics - nbound, & ! used by RRTGMP cloud optics - npairsLWcldy ! used by RRTGMP cloud optics - - ! Local variables - integer :: ncid_lw,dimID,varID,status,igpt,iGas,ij,ierr,ncid_lw_clds - integer,dimension(:),allocatable :: temp1,temp2,temp3,temp4,temp_log_array1,& - temp_log_array2, temp_log_array3, temp_log_array4 - character(len=264) :: kdist_file,kdist_cldy_file - integer,parameter :: max_strlen=256 - - ! Initialize - errmsg = '' - errflg = 0 - - ! Ensure that requested cloud overlap is reasonable. - if ( iovrlw .lt. 0 .or. iovrlw .gt. 3 ) then - print *,' *** Error in specification of cloud overlap flag', & - ' IOVRLW=',iovrlw,' in RLWINIT !!' - stop - elseif ( iovrlw .ge. 2 .and. isubclw .eq. 0 ) then - print *,' *** IOVRLW=',iovrlw,' is not available for', & - ' ISUBCLW=0 setting!!' - print *,' The program uses maximum/random overlap', & - ' instead.' - iovrlw = 1 - endif - - ! Check cloud flags for consistency. - if ((icldflg .eq. 0 .and. ilwcliq .ne. 0) .or. & - (icldflg .eq. 1 .and. ilwcliq .eq. 0)) then - print *,' *** Model cloud scheme inconsistent with LW', & - ' radiation cloud radiative property setup !!' - stop - endif - - ! How are we handling cloud-optics? - rrtmgp_lw_cld_phys = Model%rrtmgp_cld_phys - - ! Filenames are set in the gfs_physics_nml (scm/src/GFS_typedefs.F90) - kdist_file = trim(Model%rrtmgp_root)//trim(Model%kdist_lw_file_gas) - kdist_cldy_file = trim(Model%rrtmgp_root)//trim(Model%kdist_lw_file_clouds) - - ! Read dimensions for k-distribution fields (only on master processor(0)) - if (mpirank .eq. mpiroot) then - if(nf90_open(trim(kdist_file), NF90_WRITE, ncid_lw) .eq. NF90_NOERR) then - status = nf90_inq_dimid(ncid_lw, 'temperature', dimid) - status = nf90_inquire_dimension(ncid_lw, dimid, len=ntemps) - status = nf90_inq_dimid(ncid_lw, 'pressure', dimid) - status = nf90_inquire_dimension(ncid_lw, dimid, len=npress) - status = nf90_inq_dimid(ncid_lw, 'absorber', dimid) - status = nf90_inquire_dimension(ncid_lw, dimid, len=nabsorbers) - status = nf90_inq_dimid(ncid_lw, 'minor_absorber', dimid) - status = nf90_inquire_dimension(ncid_lw, dimid, len=nminorabsorbers) - status = nf90_inq_dimid(ncid_lw, 'absorber_ext', dimid) - status = nf90_inquire_dimension(ncid_lw, dimid, len=nextrabsorbers) - status = nf90_inq_dimid(ncid_lw, 'mixing_fraction', dimid) - status = nf90_inquire_dimension(ncid_lw, dimid, len=nmixingfracs) - status = nf90_inq_dimid(ncid_lw, 'atmos_layer', dimid) - status = nf90_inquire_dimension(ncid_lw, dimid, len=nlayers) - status = nf90_inq_dimid(ncid_lw, 'bnd', dimid) - status = nf90_inquire_dimension(ncid_lw, dimid, len=nbnds) - status = nf90_inq_dimid(ncid_lw, 'gpt', dimid) - status = nf90_inquire_dimension(ncid_lw, dimid, len=ngpts) - status = nf90_inq_dimid(ncid_lw, 'pair', dimid) - status = nf90_inquire_dimension(ncid_lw, dimid, len=npairs) - status = nf90_inq_dimid(ncid_lw, 'contributors_lower', dimid) - status = nf90_inquire_dimension(ncid_lw, dimid, len=ncontributors_lower) - status = nf90_inq_dimid(ncid_lw, 'contributors_upper', dimid) - status = nf90_inquire_dimension(ncid_lw, dimid, len=ncontributors_upper) - status = nf90_inq_dimid(ncid_lw, 'minor_absorber_intervals_lower', dimid) - status = nf90_inquire_dimension(ncid_lw, dimid, len=nminor_absorber_intervals_lower) - status = nf90_inq_dimid(ncid_lw, 'minor_absorber_intervals_upper', dimid) - status = nf90_inquire_dimension(ncid_lw, dimid, len=nminor_absorber_intervals_upper) - status = nf90_inq_dimid(ncid_lw, 'temperature_Planck', dimid) - status = nf90_inquire_dimension(ncid_lw, dimid, len=ninternalSourcetemps) - status = nf90_close(ncid_lw) - endif - endif - - ! Broadcast dimensions to all processors -#ifdef MPI - call MPI_BCAST(ntemps, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(npress, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nminorabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nextraabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nmixingfracs, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nlayers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nbnds, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(ngpts, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(npairs, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(ncontributors_lower, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(ncontributors_upper, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nminor_absorber_intervals_lower, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nminor_absorber_intervals_upper, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(ninternalSourcetemps, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -#endif - - !if (mpirank .eq. mpiroot) then - ! Allocate space for arrays - allocate(gas_names(nabsorbers)) - allocate(scaling_gas_lower(nminor_absorber_intervals_lower)) - allocate(scaling_gas_upper(nminor_absorber_intervals_upper)) - allocate(gas_minor(nminorabsorbers)) - allocate(identifier_minor(nminorabsorbers)) - allocate(minor_gases_lower(nminor_absorber_intervals_lower)) - allocate(minor_gases_upper(nminor_absorber_intervals_upper)) - allocate(minor_limits_gpt_lower(npairs,nminor_absorber_intervals_lower)) - allocate(minor_limits_gpt_upper(npairs,nminor_absorber_intervals_upper)) - allocate(band2gpt(2,nbnds)) - allocate(key_species(2,nlayers,nbnds)) - allocate(band_lims(2,nbnds)) - allocate(press_ref(npress)) - allocate(temp_ref(ntemps)) - allocate(vmr_ref(nlayers, nextrabsorbers, ntemps)) - allocate(kminor_lower(ncontributors_lower, nmixingfracs, ntemps)) - allocate(kmajor(ngpts, nmixingfracs, npress+1, ntemps)) - allocate(kminor_start_lower(nminor_absorber_intervals_lower)) - allocate(kminor_upper(ncontributors_upper, nmixingfracs, ntemps)) - allocate(kminor_start_upper(nminor_absorber_intervals_upper)) - allocate(minor_scales_with_density_lower(nminor_absorber_intervals_lower)) - allocate(minor_scales_with_density_upper(nminor_absorber_intervals_upper)) - allocate(scale_by_complement_lower(nminor_absorber_intervals_lower)) - allocate(scale_by_complement_upper(nminor_absorber_intervals_upper)) - allocate(temp1(nminor_absorber_intervals_lower)) - allocate(temp2(nminor_absorber_intervals_upper)) - allocate(temp3(nminor_absorber_intervals_lower)) - allocate(temp4(nminor_absorber_intervals_upper)) - allocate(totplnk(ninternalSourcetemps, nbnds)) - allocate(planck_frac(ngpts, nmixingfracs, npress+1, ntemps)) - - if (mpirank .eq. mpiroot) then - ! Read in fields from file - if(nf90_open(trim(kdist_file), NF90_WRITE, ncid_lw) .eq. NF90_NOERR) then - status = nf90_inq_varid(ncid_lw,'gas_names',varID) - status = nf90_get_var(ncid_lw,varID,gas_names) - ! - status = nf90_inq_varid(ncid_lw,'scaling_gas_lower',varID) - status = nf90_get_var(ncid_lw,varID,scaling_gas_lower) - ! - status = nf90_inq_varid(ncid_lw,'scaling_gas_upper',varID) - status = nf90_get_var(ncid_lw,varID,scaling_gas_upper) - ! - status = nf90_inq_varid(ncid_lw,'gas_minor',varID) - status = nf90_get_var(ncid_lw,varID,gas_minor) - ! - status = nf90_inq_varid(ncid_lw,'identifier_minor',varID) - status = nf90_get_var(ncid_lw,varID,identifier_minor) - ! - status = nf90_inq_varid(ncid_lw,'minor_gases_lower',varID) - status = nf90_get_var(ncid_lw,varID,minor_gases_lower) - ! - status = nf90_inq_varid(ncid_lw,'minor_gases_upper',varID) - status = nf90_get_var(ncid_lw,varID,minor_gases_upper) - ! - status = nf90_inq_varid(ncid_lw,'minor_limits_gpt_lower',varID) - status = nf90_get_var(ncid_lw,varID,minor_limits_gpt_lower) - ! - status = nf90_inq_varid(ncid_lw,'minor_limits_gpt_upper',varID) - status = nf90_get_var(ncid_lw,varID,minor_limits_gpt_upper) - ! - status = nf90_inq_varid(ncid_lw,'bnd_limits_gpt',varID) - status = nf90_get_var(ncid_lw,varID,band2gpt) - ! - status = nf90_inq_varid(ncid_lw,'key_species',varID) - status = nf90_get_var(ncid_lw,varID,key_species) - ! - status = nf90_inq_varid(ncid_lw,'bnd_limits_wavenumber',varID) - status = nf90_get_var(ncid_lw,varID,band_lims) - ! - status = nf90_inq_varid(ncid_lw,'press_ref',varID) - status = nf90_get_var(ncid_lw,varID,press_ref) - ! - status = nf90_inq_varid(ncid_lw,'temp_ref',varID) - status = nf90_get_var(ncid_lw,varID,temp_ref) - ! - status = nf90_inq_varid(ncid_lw,'absorption_coefficient_ref_P',varID) - status = nf90_get_var(ncid_lw,varID,temp_ref_p) - ! - status = nf90_inq_varid(ncid_lw,'absorption_coefficient_ref_T',varID) - status = nf90_get_var(ncid_lw,varID,temp_ref_t) - ! - status = nf90_inq_varid(ncid_lw,'press_ref_trop',varID) - status = nf90_get_var(ncid_lw,varID,press_ref_trop) - ! - status = nf90_inq_varid(ncid_lw,'kminor_lower',varID) - status = nf90_get_var(ncid_lw,varID,kminor_lower) - ! - status = nf90_inq_varid(ncid_lw,'kminor_upper',varID) - status = nf90_get_var(ncid_lw,varID,kminor_upper) - ! - status = nf90_inq_varid(ncid_lw,'vmr_ref',varID) - status = nf90_get_var(ncid_lw,varID,vmr_ref) - ! - status = nf90_inq_varid(ncid_lw,'kmajor',varID) - status = nf90_get_var(ncid_lw,varID,kmajor) - ! - status = nf90_inq_varid(ncid_lw,'kminor_start_lower',varID) - status = nf90_get_var(ncid_lw,varID,kminor_start_lower) - ! - status = nf90_inq_varid(ncid_lw,'kminor_start_upper',varID) - status = nf90_get_var(ncid_lw,varID,kminor_start_upper) - ! - status = nf90_inq_varid(ncid_lw,'totplnk',varID) - status = nf90_get_var(ncid_lw,varID,totplnk) - ! - status = nf90_inq_varid(ncid_lw,'plank_fraction',varID) - status = nf90_get_var(ncid_lw,varID,planck_frac) - - ! Logical fields are read in as integers and then converted to logicals. - status = nf90_inq_varid(ncid_lw,'minor_scales_with_density_lower',varID) - status = nf90_get_var(ncid_lw,varID,temp1) - minor_scales_with_density_lower(:) = .false. - where(temp1 .eq. 1) minor_scales_with_density_lower(:) = .true. - ! - status = nf90_inq_varid(ncid_lw,'minor_scales_with_density_upper',varID) - status = nf90_get_var(ncid_lw,varID,temp2) - minor_scales_with_density_upper(:) = .false. - where(temp2 .eq. 1) minor_scales_with_density_upper(:) = .true. - ! - status = nf90_inq_varid(ncid_lw,'scale_by_complement_lower',varID) - status = nf90_get_var(ncid_lw,varID,temp3) - scale_by_complement_lower(:) = .false. - where(temp3 .eq. 1) scale_by_complement_lower(:) = .true. - ! - status = nf90_inq_varid(ncid_lw,'scale_by_complement_upper',varID) - status = nf90_get_var(ncid_lw,varID,temp4) - scale_by_complement_upper(:) = .false. - where(temp4 .eq. 1) scale_by_complement_upper(:) = .true. - - ! Close - status = nf90_close(ncid_lw) - endif - endif - - ! Broadcast arrays to all processors -#ifdef MPI - call MPI_BCAST(minor_limits_gpt_upper, size(minor_limits_gpt_upper), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(minor_limits_gpt_lower, size(minor_limits_gpt_lower), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(kminor_start_upper, size(kminor_start_upper), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(kminor_start_lower, size(kminor_start_lower), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(key_species, size(key_species), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(band2gpt, size(band2gpt), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(band_lims, size(band_lims), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(press_ref, size(press_ref), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(temp_ref, size(temp_ref), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(kminor_lower, size(kminor_lower), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(kminor_upper, size(kminor_upper), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(scaling_gas_lower, size(scaling_gas_lower), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(scaling_gas_upper, size(scaling_gas_upper), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(vmr_ref, size(vmr_ref), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(kmajor, size(kmajor), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(temp_ref_p, 1, kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(temp_ref_t, 1, kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(press_ref_trop, 1, kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(totplnk, size(totplnk), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(planck_frac, size(planck_frac), kind_phys, mpiroot, mpicomm, ierr) - ! Character arrays - do ij=1,nabsorbers - call MPI_BCAST(gas_names(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) - enddo - do ij=1,nminorabsorbers - call MPI_BCAST(gas_minor(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) - call MPI_BCAST(identifier_minor(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) - enddo - do ij=1,nminor_absorber_intervals_lower - call MPI_BCAST(minor_gases_lower(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) - enddo - do ij=1,nminor_absorber_intervals_upper - call MPI_BCAST(minor_gases_upper(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) - enddo - ! Logical arrays (First convert to integer-array, then broadcast) - ! - allocate(temp_log_array1(nminor_absorber_intervals_lower)) - where(minor_scales_with_density_lower) - temp_log_array1 = 1 - elsewhere - temp_log_array1 = 0 - end where - call MPI_BCAST(temp_log_array1, size(temp_log_array1), MPI_INTEGER, mpiroot, mpicomm, ierr) - ! - allocate(temp_log_array2(nminor_absorber_intervals_lower)) - where(scale_by_complement_lower) - temp_log_array2 = 1 - elsewhere - temp_log_array2 = 0 - end where - call MPI_BCAST(temp_log_array2, size(temp_log_array2), MPI_INTEGER, mpiroot, mpicomm, ierr) - ! - allocate(temp_log_array3(nminor_absorber_intervals_upper)) - where(minor_scales_with_density_upper) - temp_log_array3 = 1 - elsewhere - temp_log_array3 = 0 - end where - call MPI_BCAST(temp_log_array3, size(temp_log_array3), MPI_INTEGER, mpiroot, mpicomm, ierr) - ! - allocate(temp_log_array4(nminor_absorber_intervals_upper)) - where(scale_by_complement_upper) - temp_log_array4 = 1 - elsewhere - temp_log_array4 = 0 - end where - call MPI_BCAST(temp_log_array4, size(temp_log_array4), MPI_INTEGER, mpiroot, mpicomm, ierr) -#endif - - ! Initialize gas concentrations and gas optics class with data - do iGas=1,nGases - call check_error_msg(gas_concentrations%set_vmr(active_gases(iGas), 0._kind_phys)) - enddo - call check_error_msg(kdist_lw%load(gas_concentrations, gas_names, key_species, band2gpt, & - band_lims, press_ref, press_ref_trop, temp_ref, temp_ref_p, temp_ref_t, & - vmr_ref, kmajor, kminor_lower, kminor_upper, gas_minor,identifier_minor, & - minor_gases_lower, minor_gases_upper, minor_limits_gpt_lower, & - minor_limits_gpt_upper, minor_scales_with_density_lower, & - minor_scales_with_density_upper, scaling_gas_lower, & - scaling_gas_upper, scale_by_complement_lower, & - scale_by_complement_upper, kminor_start_lower, kminor_start_upper, & - totplnk, planck_frac, rayl_lower, rayl_upper)) - - ! Set band index by g-point array - nBandsLW = kdist_lw%get_nband() - nGptsLW = kdist_lw%get_ngpt() - ngb_LW = kdist_lw%get_gpoint_bands() - - ! Set initial permutation seed for McICA, initially set to number of G-points - ipsdlw0 = kdist_lw%get_ngpt() - - ! ####################################################################################### - ! If RRTMGP cloud-optics are requested, read tables and broadcast. - ! ####################################################################################### - ! Read dimensions for k-distribution fields (only on master processor(0)) - if (mpirank .eq. mpiroot) then - if(nf90_open(trim(kdist_cldy_file), NF90_WRITE, ncid_lw_clds) == NF90_NOERR) then - status = nf90_inq_dimid(ncid_lw_clds, 'nband', dimid) - status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=nbandLWcldy) - status = nf90_inq_dimid(ncid_lw_clds, 'nrghice', dimid) - status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=nrghice) - status = nf90_inq_dimid(ncid_lw_clds, 'nsize_liq', dimid) - status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=nsize_liq) - status = nf90_inq_dimid(ncid_lw_clds, 'nsize_ice', dimid) - status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=nsize_ice) - status = nf90_inq_dimid(ncid_lw_clds, 'nsizereg', dimid) - status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=nsizereg) - status = nf90_inq_dimid(ncid_lw_clds, 'ncoeff_ext', dimid) - status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=ncoeff_ext) - status = nf90_inq_dimid(ncid_lw_clds, 'ncoeff_ssa_g', dimid) - status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=ncoeff_ssa_g) - status = nf90_inq_dimid(ncid_lw_clds, 'nbound', dimid) - status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=nbound) - status = nf90_inq_dimid(ncid_lw_clds, 'pair', dimid) - status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=npairsLWcldy) - status = nf90_close(ncid_lw_clds) - endif - endif - - ! Broadcast dimensions to all processors -#ifdef MPI - if (rrtmgp_lw_cld_phys .eq. 1 .or. rrtmgp_lw_cld_phys .eq. 2) then - call MPI_BCAST(nbandLWcldy, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nrghice, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nsize_liq, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nsize_ice, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nsizereg, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(ncoeff_ext, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(ncoeff_ssa_g, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nbound, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(npairsLWcldy, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - endif -#endif - - if (rrtmgp_lw_cld_phys .eq. 1) then - allocate(lut_extliq(nsize_liq, nBandLWcldy)) - allocate(lut_ssaliq(nsize_liq, nBandLWcldy)) - allocate(lut_asyliq(nsize_liq, nBandLWcldy)) - allocate(lut_extice(nsize_ice, nBandLWcldy, nrghice)) - allocate(lut_ssaice(nsize_ice, nBandLWcldy, nrghice)) - allocate(lut_asyice(nsize_ice, nBandLWcldy, nrghice)) - allocate(band_lims_cldy(2, nBandLWcldy)) - endif - if (rrtmgp_lw_cld_phys .eq. 2) then - allocate(pade_extliq(nbandLWcldy, nsizereg, ncoeff_ext )) - allocate(pade_ssaliq(nbandLWcldy, nsizereg, ncoeff_ssa_g)) - allocate(pade_asyliq(nbandLWcldy, nsizereg, ncoeff_ssa_g)) - allocate(pade_extice(nbandLWcldy, nsizereg, ncoeff_ext, nrghice)) - allocate(pade_ssaice(nbandLWcldy, nsizereg, ncoeff_ssa_g, nrghice)) - allocate(pade_asyice(nbandLWcldy, nsizereg, ncoeff_ssa_g, nrghice)) - allocate(pade_sizereg_extliq(nbound)) - allocate(pade_sizereg_ssaliq(nbound)) - allocate(pade_sizereg_asyliq(nbound)) - allocate(pade_sizereg_extice(nbound)) - allocate(pade_sizereg_ssaice(nbound)) - allocate(pade_sizereg_asyice(nbound)) - allocate(band_lims_cldy(2,nbandLWcldy)) - endif - - ! On master processor, allocate space, read in fields, broadcast to all processors - if (mpirank .eq. mpiroot) then - ! - if (rrtmgp_lw_cld_phys .eq. 1) then - ! - if(nf90_open(trim(kdist_cldy_file), NF90_WRITE, ncid_lw_clds) == NF90_NOERR) then - status = nf90_inq_varid(ncid_lw_clds,'radliq_lwr',varID) - status = nf90_get_var(ncid_lw_clds,varID,radliq_lwr) - status = nf90_inq_varid(ncid_lw_clds,'radliq_upr',varID) - status = nf90_get_var(ncid_lw_clds,varID,radliq_upr) - status = nf90_inq_varid(ncid_lw_clds,'radliq_fac',varID) - status = nf90_get_var(ncid_lw_clds,varID,radliq_fac) - status = nf90_inq_varid(ncid_lw_clds,'radice_lwr',varID) - status = nf90_get_var(ncid_lw_clds,varID,radice_lwr) - status = nf90_inq_varid(ncid_lw_clds,'radice_upr',varID) - status = nf90_get_var(ncid_lw_clds,varID,radice_upr) - status = nf90_inq_varid(ncid_lw_clds,'radice_fac',varID) - status = nf90_get_var(ncid_lw_clds,varID,radice_fac) - status = nf90_inq_varid(ncid_lw_clds,'lut_extliq',varID) - status = nf90_get_var(ncid_lw_clds,varID,lut_extliq) - status = nf90_inq_varid(ncid_lw_clds,'lut_ssaliq',varID) - status = nf90_get_var(ncid_lw_clds,varID,lut_ssaliq) - status = nf90_inq_varid(ncid_lw_clds,'lut_asyliq',varID) - status = nf90_get_var(ncid_lw_clds,varID,lut_asyliq) - status = nf90_inq_varid(ncid_lw_clds,'lut_extice',varID) - status = nf90_get_var(ncid_lw_clds,varID,lut_extice) - status = nf90_inq_varid(ncid_lw_clds,'lut_ssaice',varID) - status = nf90_get_var(ncid_lw_clds,varID,lut_ssaice) - status = nf90_inq_varid(ncid_lw_clds,'lut_asyice',varID) - status = nf90_get_var(ncid_lw_clds,varID,lut_asyice) - status = nf90_inq_varid(ncid_lw_clds,'bnd_limits_wavenumber',varID) - status = nf90_get_var(ncid_lw_clds,varID,band_lims_cldy) - status = nf90_close(ncid_lw_clds) - endif - endif - ! - if (rrtmgp_lw_cld_phys .eq. 2) then - ! - if(nf90_open(trim(kdist_cldy_file), NF90_WRITE, ncid_lw_clds) == NF90_NOERR) then - status = nf90_inq_varid(ncid_lw_clds,'radliq_lwr',varID) - status = nf90_get_var(ncid_lw_clds,varID,radliq_lwr) - status = nf90_inq_varid(ncid_lw_clds,'radliq_upr',varID) - status = nf90_get_var(ncid_lw_clds,varID,radliq_upr) - status = nf90_inq_varid(ncid_lw_clds,'radliq_fac',varID) - status = nf90_get_var(ncid_lw_clds,varID,radliq_fac) - status = nf90_inq_varid(ncid_lw_clds,'radice_lwr',varID) - status = nf90_get_var(ncid_lw_clds,varID,radice_lwr) - status = nf90_inq_varid(ncid_lw_clds,'radice_upr',varID) - status = nf90_get_var(ncid_lw_clds,varID,radice_upr) - status = nf90_inq_varid(ncid_lw_clds,'radice_fac',varID) - status = nf90_get_var(ncid_lw_clds,varID,radice_fac) - status = nf90_inq_varid(ncid_lw_clds,'pade_extliq',varID) - status = nf90_get_var(ncid_lw_clds,varID,pade_extliq) - status = nf90_inq_varid(ncid_lw_clds,'pade_ssaliq',varID) - status = nf90_get_var(ncid_lw_clds,varID,pade_ssaliq) - status = nf90_inq_varid(ncid_lw_clds,'pade_asyliq',varID) - status = nf90_get_var(ncid_lw_clds,varID,pade_asyliq) - status = nf90_inq_varid(ncid_lw_clds,'pade_extice',varID) - status = nf90_get_var(ncid_lw_clds,varID,pade_extice) - status = nf90_inq_varid(ncid_lw_clds,'pade_ssaice',varID) - status = nf90_get_var(ncid_lw_clds,varID,pade_ssaice) - status = nf90_inq_varid(ncid_lw_clds,'pade_asyice',varID) - status = nf90_get_var(ncid_lw_clds,varID,pade_asyice) - status = nf90_inq_varid(ncid_lw_clds,'pade_sizreg_extliq',varID) - status = nf90_get_var(ncid_lw_clds,varID,pade_sizereg_extliq) - status = nf90_inq_varid(ncid_lw_clds,'pade_sizreg_ssaliq',varID) - status = nf90_get_var(ncid_lw_clds,varID,pade_sizereg_ssaliq) - status = nf90_inq_varid(ncid_lw_clds,'pade_sizreg_asyliq',varID) - status = nf90_get_var(ncid_lw_clds,varID,pade_sizereg_asyliq) - status = nf90_inq_varid(ncid_lw_clds,'pade_sizreg_extice',varID) - status = nf90_get_var(ncid_lw_clds,varID,pade_sizereg_extice) - status = nf90_inq_varid(ncid_lw_clds,'pade_sizreg_ssaice',varID) - status = nf90_get_var(ncid_lw_clds,varID,pade_sizereg_ssaice) - status = nf90_inq_varid(ncid_lw_clds,'pade_sizreg_asyice',varID) - status = nf90_get_var(ncid_lw_clds,varID,pade_sizereg_asyice) - status = nf90_inq_varid(ncid_lw_clds,'bnd_limits_wavenumber',varID) - status = nf90_get_var(ncid_lw_clds,varID,band_lims_cldy) - status = nf90_close(ncid_lw_clds) - endif - endif - endif - - ! Broadcast arrays to all processors -#ifdef MPI - if (rrtmgp_lw_cld_phys .eq. 1) then - call MPI_BCAST(radliq_lwr, size(radliq_lwr), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(radliq_upr, size(radliq_upr), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(radliq_fac, size(radliq_fac), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(radice_lwr, size(radice_lwr), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(radice_upr, size(radice_upr), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(radice_fac, size(radice_fac), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_extliq, size(lut_extliq), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_ssaliq, size(lut_ssaliq), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_asyliq, size(lut_asyliq), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_extice, size(lut_extice), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_ssaice, size(lut_ssaice), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_asyice, size(lut_asyice), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(band_lims_cldy), size(band_lims_cldy), kind_phys, mpiroot, mpicomm, ierr) - endif - if (rrtmgp_lw_cld_phys .eq. 2) then - call MPI_BCAST(pade_extliq, size(pade_extliq), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_ssaliq, size(pade_ssaliq), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_asyliq, size(pade_asyliq), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_extice, size(pade_extice), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_ssaice, size(pade_ssaice), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_asyice, size(pade_asyice), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_extliq), size(pade_sizereg_extliq), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_ssaliq), size(pade_sizereg_ssaliq), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_asyliq), size(pade_sizereg_asyliq), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_extice), size(pade_sizereg_extice), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_ssaice), size(pade_sizereg_ssaice), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_asyice), size(pade_sizereg_asyice), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(band_lims_cldy), size(band_lims_cldy), kind_phys, mpiroot, mpicomm, ierr) - endif -#endif - - ! Load tables data for RRTGMP cloud-optics - if (rrtmgp_lw_cld_phys .eq. 1) then - call check_error_msg(kdist_lw_cldy%set_ice_roughness(nrghice)) - call check_error_msg(kdist_lw_cldy%load(band_lims_cldy, radliq_lwr, radliq_upr, & - radliq_fac, radice_lwr, radice_upr, radice_fac, lut_extliq, lut_ssaliq, & - lut_asyliq, lut_extice, lut_ssaice, lut_asyice)) - endif - if (rrtmgp_lw_cld_phys .eq. 2) then - call check_error_msg(kdist_lw_cldy%set_ice_roughness(nrghice)) - call check_error_msg(kdist_lw_cldy%load(band_lims_cldy, pade_extliq, & - pade_ssaliq, pade_asyliq, pade_extice, pade_ssaice, pade_asyice, & - pade_sizereg_extliq, pade_sizereg_ssaliq, pade_sizereg_asyliq, & - pade_sizereg_extice, pade_sizereg_ssaice, pade_sizereg_asyice)) - endif - - end subroutine GFS_rrtmgp_lw_init - - ! ######################################################################################### - ! rrtmg_lw_run - ! ######################################################################################### -!! \section arg_table_GFS_rrtmgp_lw_run Argument Table -!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | -!! |--------------------|-----------------------------------------------------------------------------------------------|---------------------------------------------------------------------------|---------|------|----------------------|-----------|--------|----------| -!! | p_lay | air_pressure_at_layer_for_radiation_in_hPa | air pressure layer | hPa | 2 | real | kind_phys | in | F | -!! | p_lev | air_pressure_at_interface_for_radiation_in_hPa | air pressure level | hPa | 2 | real | kind_phys | in | F | -!! | t_lay | air_temperature_at_layer_for_radiation | air temperature layer | K | 2 | real | kind_phys | in | F | -!! | t_lev | air_temperature_at_interface_for_radiation | air temperature level | K | 2 | real | kind_phys | in | F | -!! | q_lay | water_vapor_specific_humidity_at_layer_for_radiation | specific humidity layer | kg kg-1 | 2 | real | kind_phys | in | F | -!! | o3_lay | ozone_concentration_at_layer_for_radiation | ozone concentration layer | kg kg-1 | 2 | real | kind_phys | in | F | -!! | vmr_co2 | volume_mixing_ratio_co2 | volume mixing ratio co2 | kg kg-1 | 2 | real | kind_phys | in | F | -!! | vmr_n2o | volume_mixing_ratio_n2o | volume mixing ratio no2 | kg kg-1 | 2 | real | kind_phys | in | F | -!! | vmr_ch4 | volume_mixing_ratio_ch4 | volume mixing ratio ch4 | kg kg-1 | 2 | real | kind_phys | in | F | -!! | vmr_o2 | volume_mixing_ratio_o2 | volume mixing ratio o2 | kg kg-1 | 2 | real | kind_phys | in | F | -!! | vmr_co | volume_mixing_ratio_co | volume mixing ratio co | kg kg-1 | 2 | real | kind_phys | in | F | -!! | vmr_cfc11 | volume_mixing_ratio_cfc11 | volume mixing ratio cfc11 | kg kg-1 | 2 | real | kind_phys | in | F | -!! | vmr_cfc12 | volume_mixing_ratio_cfc12 | volume mixing ratio cfc12 | kg kg-1 | 2 | real | kind_phys | in | F | -!! | vmr_cfc22 | volume_mixing_ratio_cfc22 | volume mixing ratio cfc22 | kg kg-1 | 2 | real | kind_phys | in | F | -!! | vmr_ccl4 | volume_mixing_ratio_ccl4 | volume mixing ratio ccl4 | kg kg-1 | 2 | real | kind_phys | in | F | -!! | icseed | seed_random_numbers_lw | seed for random number generation for longwave radiation | none | 1 | integer | | in | F | -!! | tau_aer | aerosol_optical_depth_for_longwave_bands_01-16 | aerosol optical depth for longwave bands 01-16 | none | 3 | real | kind_phys | in | F | -!! | ssa_aer | aerosol_single_scattering_albedo_for_longwave_bands_01-16 | aerosol single scattering albedo for longwave bands 01-16 | frac | 3 | real | kind_phys | in | F | -!! | sfc_emiss | surface_longwave_emissivity | surface emissivity | frac | 1 | real | kind_phys | in | F | -!! | skt | surface_ground_temperature_for_radiation | surface ground temperature for radiation | K | 1 | real | kind_phys | in | F | -!! | dzlyr | layer_thickness_for_radiation | layer thickness | km | 2 | real | kind_phys | in | F | -!! | delpin | layer_pressure_thickness_for_radiation | layer pressure thickness | hPa | 2 | real | kind_phys | in | F | -!! | de_lgth | cloud_decorrelation_length | cloud decorrelation length | km | 1 | real | kind_phys | in | F | -!! | ncol | horizontal_loop_extent | horizontal dimension | count | 0 | integer | | in | F | -!! | nlay | adjusted_vertical_layer_dimension_for_radiation | number of vertical layers for radiation | count | 0 | integer | | in | F | -!! | lprint | flag_print | flag to print | flag | 0 | logical | | in | F | -!! | cldfrac | total_cloud_fraction | total cloud fraction | frac | 2 | real | kind_phys | in | F | -!! | lslwr | flag_to_calc_lw | flag to calculate LW irradiances | flag | 0 | logical | | in | F | -!! | cld_lwp | cloud_liquid_water_path | cloud liquid water path | g m-2 | 2 | real | kind_phys | in | T | -!! | cld_ref_liq | mean_effective_radius_for_liquid_cloud | mean effective radius for liquid cloud | micron | 2 | real | kind_phys | in | T | -!! | cld_iwp | cloud_ice_water_path | cloud ice water path | g m-2 | 2 | real | kind_phys | in | T | -!! | cld_ref_ice | mean_effective_radius_for_ice_cloud | mean effective radius for ice cloud | micron | 2 | real | kind_phys | in | T | -!! | cld_rwp | cloud_rain_water_path | cloud ice water path | g m-2 | 2 | real | kind_phys | in | T | -!! | cld_ref_rain | mean_effective_radius_for_rain_drop | mean effective radius for rain drop | micron | 2 | real | kind_phys | in | T | -!! | cld_swp | cloud_snow_water_path | cloud snow water path | g m-2 | 2 | real | kind_phys | in | T | -!! | cld_ref_snow | mean_effective_radius_for_snow_flake | mean effective radius for snow flake | micron | 2 | real | kind_phys | in | T | -!! | cld_od | cloud_optical_depth | cloud optical depth | none | 2 | real | kind_phys | in | T | -!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | -!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | -!! | kdist_lw | K_distribution_file_for_RRTMGP_LW_scheme | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | -!! | kdist_lw_cldy | K_distribution_file_for_cloudy_RRTMGP_LW_scheme | DDT containing spectral information for cloudy RRTMGP LW radiation scheme | DDT | 0 | ty_cloud_optics | | in | F | -!! | gas_concentrations | Gas_concentrations_for_RRTMGP_suite | DDT containing gas concentrations for RRTMGP radiation scheme | DDT | 0 | ty_gas_concs | | inout | F | -!! - ! ######################################################################################### - subroutine GFS_rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr_n2o, & ! IN - vmr_ch4, vmr_o2, vmr_co, vmr_cfc11, vmr_cfc12, vmr_cfc22, vmr_ccl4, icseed, tau_aer, & ! IN - ssa_aer, sfc_emiss, skt, dzlyr, delpin, de_lgth, ncol, nlay, lprint, cldfrac, lslwr, & ! IN - kdist_lw, kdist_lw_cldy, gas_concentrations, & ! OUT - cld_lwp, cld_ref_liq, cld_iwp, cld_ref_ice, cld_rwp, cld_ref_rain, cld_swp, & ! OPT(in) - cld_ref_snow, cld_od, errmsg, errflg) ! OPT(in) - - ! Inputs - integer,intent(in) :: & - ncol, & ! Number of horizontal grid-points - nlay ! Number of vertical layers - integer,intent(in),dimension(ncol) :: & - icseed ! auxiliary special cloud related array when module - ! variable isubclw=2, it provides permutation seed - ! for each column profile that are used for generating - ! random numbers. when isubclw /=2, it will not be used. - logical,intent(in) :: & - lprint, & ! Control flag for diagnostics - lslwr ! Flag to calculate RRTMGP LW? (1) - type(ty_gas_optics_rrtmgp),intent(in) :: & - kdist_lw ! DDT containing LW spectral information - type(ty_cloud_optics),intent(in) :: & - kdist_lw_cldy - type(ty_gas_concs),intent(inout) :: & - gas_concentrations - real(kind_phys), dimension(ncol), intent(in) :: & - sfc_emiss, & ! Surface emissivity (1) - skt, & ! Surface(skin) temperature (K) - de_lgth ! Cloud decorrelation length (km) - real(kind_phys), dimension(ncol,nlay), intent(in) :: & - dzlyr, & ! layer thinkness (km) - delpin, & ! layer thickness (mb) - cldfrac, & ! Cloud-fraction (1) - p_lay, & ! Pressure @ model layer-centers (mb) - t_lay, & ! Temperature (K) - q_lay, & ! Specific humidity (kg/kg) - o3_lay, & ! O3 mass mixing-ratio (kg/kg) - vmr_co2, & ! Co2 volume-mixing ratio (kg/kg) - vmr_n2o, & ! N2o volume-mixing ratio (kg/kg) - vmr_ch4, & ! Ch4 volume-mixing ratio (kg/kg) - vmr_o2, & ! O2 volume-mixing ratio (kg/kg) - vmr_co, & ! Co volume-mixing ratio (kg/kg) - vmr_cfc11, & ! CFC11 volume-mixing ratio (kg/kg) - vmr_cfc12, & ! CFC12 volume-mixing ratio (kg/kg) - vmr_cfc22, & ! CFC22 volume-mixing ratio (kg/kg) - vmr_ccl4 ! CCl4 volume-mixing ratio (kg/kg) - real(kind_phys), dimension(ncol,nlay+1), intent(in) :: & - p_lev, & ! Pressure @ model layer-interfaces (mb) - t_lev ! Temperature (K) - real(kind_phys), dimension(ncol,nlay,nbandsLW),intent(in) :: & - tau_aer, & ! Aerosol optical depth (1) - ssa_aer ! Aerosol single-scattering albedo (1) - ! Inputs (optional) - real(kind_phys), dimension(ncol,nlay), intent(in), optional:: & - cld_lwp, & ! Cloud liquid water path (g/m2) - cld_ref_liq, & ! Effective radius (liquid) (micron) - cld_iwp, & ! Cloud ice water path (g/m2) - cld_ref_ice, & ! Effective radius (ice) (micron) - cld_rwp, & ! Cloud rain water path (g/m2) - cld_ref_rain, & ! Effective radius (rain-drop) (micron) - cld_swp, & ! Cloud snow-water path (g/m2) - cld_ref_snow, & ! Effective radius (snow-flake) (micron) - cld_od ! Cloud optical-depth (1) - - ! Outputs (mandatory) - character(len=*), intent(out) :: & - errmsg ! Error message - integer, intent(out) :: & - errflg ! Error code - - ! Local variables - integer :: iGpt,iCol,iLay,iBand,iTOA,iSFC - integer,dimension(ncol) :: ipseed - real(kind_phys), dimension(ncol,nlay+1),target :: & - flux_up_allSky, flux_up_clrSky, flux_dn_allSky, flux_dn_clrSky - real(kind_phys), dimension(ncol,nlay+1,nBandsLW),target :: & - fluxBB_up_allSky, fluxBB_dn_allSky - real(kind_phys), dimension(ncol,nlay) :: & - vmr_o3, vmr_h2o, thetaTendClrSky,thetaTendAllSky, cld_ref_liq2, & - cld_ref_ice2,tau_snow,tau_rain - real(kind_phys), dimension(ncol,nlay,nBandsLW) :: & - tau_cld,thetaTendByBandAllSky - real(kind_phys), dimension(nGptsLW,nlay,ncol) :: & - rng3D - real(kind_phys), dimension(nGptsLW*nLay) :: & - rng1D - logical,dimension(ncol,nlay) :: & - liqmask,icemask - logical, dimension(ncol,nlay,nGptsLW) :: & - cldfracMCICA - logical :: & - top_at_1=.false. - - ! Types used by Random Number Generator - type(random_stat) :: rng_stat - - ! RTE+RRTMGP classes - type(ty_optical_props_1scl) :: & - optical_props_clr, & ! Optical properties for gaseous atmosphere - optical_props_cldy, & ! Optical properties for clouds (by band) - optical_props_mcica,& ! Optical properties for clouds (sampled) - optical_props_aer ! Optical properties for aerosols - - ! Initialize CCPP error handling variables - errmsg = '' - errflg = 0 - if (.not. lslwr) return - - ! Some consistency checks... - - ! Check for optional input arguments, this depends on cloud method - if (ilwcliq > 0) then ! use prognostic cloud method - if (.not. present(cld_lwp) .or. .not. present(cld_ref_liq) .or. & - .not. present(cld_iwp) .or. .not. present(cld_ref_ice) .or. & - .not. present(cld_rwp) .or. .not. present(cld_ref_rain) .or. & - .not. present(cld_swp) .or. .not. present(cld_ref_snow)) then - write(errmsg,'(*(a))') & - 'Logic error: ilwcliq>0 requires the following', & - ' optional arguments to be present:', & - ' cld_lwp, cld_ref_liq, cld_iwp, cld_ref_ice,', & - ' cld_rwp, cld_ref_rain, cld_swp, cld_ref_snow' - errflg = 1 - return - end if - else ! use diagnostic cloud method - if (.not. present(cld_od) ) then - write(errmsg,'(*(a))') & - 'Logic error: ilwcliq<=0 requires the following', & - ' optional argument to be present: cld_od' - errflg = 1 - return - end if - end if - - ! Change random number seed value for each radiation invocation (isubclw =1 or 2). - if(isubclw == 1) then ! advance prescribed permutation seed - do iCol = 1, ncol - ipseed(iCol) = ipsdlw0 + iCol - enddo - elseif (isubclw == 2) then ! use input array of permutaion seeds - do iCol = 1, ncol - ipseed(iCol) = icseed(iCol) - enddo - endif - - ! Compute volume mixing-ratios for ozone (mmr) and specific-humidity. - vmr_h2o = merge((q_lay/(1-q_lay))*amdw, 0., q_lay .ne. 1.) - vmr_o3 = merge(o3_lay*amdo3, 0., o3_lay .gt. 0.) - - ! Compute ice/liquid cloud masks, needed by rrtmgp_cloud_optics - liqmask = (cldfrac .gt. 0 .and. cld_lwp .gt. 0) - icemask = (cldfrac .gt. 0 .and. cld_iwp .gt. 0) - - ! RRTMGP cloud_optics expects particle size to be in a certain range. bound here - if (rrtmgp_lw_cld_phys .gt. 0) then - cld_ref_ice2 = cld_ref_ice - where(cld_ref_ice2 .gt. kdist_lw_cldy%get_max_radius_ice()) cld_ref_ice2=kdist_lw_cldy%get_max_radius_ice() - where(cld_ref_ice2 .lt. kdist_lw_cldy%get_min_radius_ice()) cld_ref_ice2=kdist_lw_cldy%get_min_radius_ice() - cld_ref_liq2 = cld_ref_liq - where(cld_ref_liq2 .gt. kdist_lw_cldy%get_max_radius_liq()) cld_ref_liq2=kdist_lw_cldy%get_max_radius_liq() - where(cld_ref_liq2 .lt. kdist_lw_cldy%get_min_radius_liq()) cld_ref_liq2=kdist_lw_cldy%get_min_radius_liq() - endif - - ! ####################################################################################### - ! Call RRTMGP - ! ####################################################################################### - ! Allocate space for source functions and gas optical properties [ncol,nlay,ngpts] - call check_error_msg(optical_props_clr%alloc_1scl( nCol, nLay, kdist_lw)) - call check_error_msg(optical_props_mcica%alloc_1scl(nCol, nLay, kdist_lw)) - ! Cloud optics [nCol,nLay,nBands] - call check_error_msg(optical_props_cldy%init(optical_props_clr%get_band_lims_wavenumber())) - call check_error_msg(optical_props_cldy%alloc_1scl(ncol,nlay)) - ! Aerosol optics [Ccol,nLay,nBands] - call check_error_msg(optical_props_aer%init(optical_props_clr%get_band_lims_wavenumber())) - call check_error_msg(optical_props_aer%alloc_1scl(ncol,nlay)) - - ! ####################################################################################### - ! Set gas concentrations - ! ####################################################################################### - call gas_concentrations%reset() - call check_error_msg(gas_concentrations%set_vmr('o2', vmr_o2)) - call check_error_msg(gas_concentrations%set_vmr('co2', vmr_co2)) - call check_error_msg(gas_concentrations%set_vmr('ch4', vmr_ch4)) - call check_error_msg(gas_concentrations%set_vmr('n2o', vmr_n2o)) - call check_error_msg(gas_concentrations%set_vmr('h2o', vmr_h2o)) - call check_error_msg(gas_concentrations%set_vmr('o3', vmr_o3)) - - ! ####################################################################################### - ! Copy aerosol to RRTMGP DDT - ! ####################################################################################### - optical_props_aer%tau = tau_aer * (1. - ssa_aer) - - ! ####################################################################################### - ! Compute cloud-optics for RTE. - ! ####################################################################################### - - ! Compute in-cloud radiative properties - if (any(cldfrac .gt. 0)) then - ! i) RRTMG cloud optics. - ! If using RRTMG cloud-physics. Model can provide either cloud-optics (cld_od) or - ! cloud-properties by type (cloud LWP,snow effective radius, etc...) - if (rrtmgp_lw_cld_phys .eq. 0) then - ! Cloud-optical properties by type provided. - if (.not. present(cld_od)) then - call rrtmgp_lw_cloud_optics(ncol, nlay, nBandsLW, cld_lwp, cld_ref_liq, cld_iwp, & - cld_ref_ice, cld_rwp, cld_ref_rain, cld_swp, cld_ref_snow, cldfrac, tau_cld) - optical_props_cldy%tau = tau_cld - else - ! Cloud-optical depth provided. - do iCol=1,ncol - do iLay=1,nlay - if (cldfrac(iCol,iLay) .gt. 1e-20_kind_phys) then - optical_props_cldy%tau(iCol,iLay,:) = cld_od(iCol,iLay) - else - optical_props_cldy%tau(iCol,iLay,:) = 0._kind_phys - endif - end do - end do - endif - endif - - ! ii) Use RRTMGP cloud-optics. - if (rrtmgp_lw_cld_phys .gt. 0) then - call check_error_msg(kdist_lw_cldy%cloud_optics(ncol, nlay, nBandsLW, nrghice, & - liqmask, icemask, cld_lwp, cld_iwp, cld_ref_liq2, cld_ref_ice2, optical_props_cldy)) - end if - endif - - ! ####################################################################################### - ! Call McICA to generate subcolumns. - ! ####################################################################################### - if (isubclw .gt. 0) then - - ! Call RNG. Mersennse Twister accepts 1D array, so loop over columns and collapse along G-points - ! and layers. ([nGpts,nLayer,nColumn]-> [nGpts*nLayer]*nColumn) - do iCol=1,nCol - call random_setseed(ipseed(icol),rng_stat) - call random_number(rng1D,rng_stat) - rng3D(:,:,iCol) = reshape(source = rng1D,shape=[nGptsLW,nLay]) - enddo - - ! Call McICA - select case ( iovrlw ) - ! Maximumn-random - case(1) - call check_error_msg(sampled_mask_max_ran(rng3D,cldfrac,cldfracMCICA)) - end select - - ! Map band optical depth to each g-point using McICA - call check_error_msg(draw_samples(cldfracMCICA,optical_props_cldy,optical_props_mcica)) - endif - - end subroutine GFS_rrtmgp_lw_run - ! - subroutine GFS_rrtmgp_lw_finalize() - end subroutine GFS_rrtmgp_lw_finalize - - ! ######################################################################################### - ! Ancillary functions - ! ######################################################################################### - subroutine check_error_msg(error_msg) - character(len=*), intent(in) :: error_msg - - if(error_msg /= "") then - print*,"ERROR(GFS_rrtmgp_lw_main.F90): " - print*,trim(error_msg) - return - end if - end subroutine check_error_msg - - -end module GFS_rrtmgp_lw diff --git a/physics/GFS_rrtmgp_lw.xml b/physics/GFS_rrtmgp_lw.xml deleted file mode 100644 index 6016a67a1..000000000 --- a/physics/GFS_rrtmgp_lw.xml +++ /dev/null @@ -1,470 +0,0 @@ - - - - - - GFS_control_type_instance - Fortran DDT containing FV3-GFS model control parameters - DDT - Model - GFS_control_type - - in - F - MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_init - - - mpi_rank - current MPI rank - index - mpirank - integer - - in - F - MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_init - - - mpi_root - master MPI rank - index - mpiroot - integer - - in - F - MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_init - - - mpi_comm - MPI communicator - index - mpicomm - integer - - in - F - MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_init - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_init - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_init - - - - - air_pressure_at_layer_for_radiation_in_hPa - air pressure layer - hPa - p_lay - real - (:,:) - in - F - MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_run - - - air_pressure_at_interface_for_radiation_in_hPa - air pressure level - hPa - p_lev - real - (:,:) - in - F - MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_run - - - air_temperature_at_layer_for_radiation - air temperature layer - K - t_lay - real - (:,:) - in - F - MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_run - - - air_temperature_at_interface_for_radiation - air temperature level - K - t_lev - real - (:,:) - in - F - MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_run - - - water_vapor_specific_humidity_at_layer_for_radiation - specific humidity layer - kg kg-1 - q_lay - real - (:,:) - in - F - MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_run - - - ozone_concentration_at_layer_for_radiation - ozone concentration layer - kg kg-1 - o3_lay - real - (:,:) - in - F - MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_run - - - volume_mixing_ratio_co2 - volume mixing ratio co2 - kg kg-1 - vmr_co2 - real - (:,:) - in - F - MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_run - - - volume_mixing_ratio_n2o - volume mixing ratio no2 - kg kg-1 - vmr_n2o - real - (:,:) - in - F - MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_run - - - volume_mixing_ratio_ch4 - volume mixing ratio ch4 - kg kg-1 - vmr_ch4 - real - (:,:) - in - F - MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_run - - - volume_mixing_ratio_o2 - volume mixing ratio o2 - kg kg-1 - vmr_o2 - real - (:,:) - in - F - MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_run - - - volume_mixing_ratio_co - volume mixing ratio co - kg kg-1 - vmr_co - real - (:,:) - in - F - MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_run - - - volume_mixing_ratio_cfc11 - volume mixing ratio cfc11 - kg kg-1 - vmr_cfc11 - real - (:,:) - in - F - MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_run - - - volume_mixing_ratio_cfc12 - volume mixing ratio cfc12 - kg kg-1 - vmr_cfc12 - real - (:,:) - in - F - MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_run - - - volume_mixing_ratio_cfc22 - volume mixing ratio cfc22 - kg kg-1 - vmr_cfc22 - real - (:,:) - in - F - MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_run - - - volume_mixing_ratio_ccl4 - volume mixing ratio ccl4 - kg kg-1 - vmr_ccl4 - real - (:,:) - in - F - MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_run - - - seed_random_numbers_lw - seed for random number generation for longwave radiation - none - icseed - integer - (:) - in - F - MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_run - - - aerosol_optical_depth_for_longwave_bands_01-16 - aerosol optical depth for longwave bands 01-16 - none - tau_aer - real - (:,:,:) - in - F - MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_run - - - aerosol_single_scattering_albedo_for_longwave_bands_01-16 - aerosol single scattering albedo for longwave bands 01-16 - frac - ssa_aer - real - (:,:,:) - in - F - MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_run - - - surface_longwave_emissivity - surface emissivity - frac - sfc_emiss - real - (:) - in - F - MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_run - - - surface_ground_temperature_for_radiation - surface ground temperature for radiation - K - skt - real - (:) - in - F - MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_run - - - horizontal_loop_extent - horizontal dimension - count - ncol - integer - - in - F - MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_run - - - adjusted_vertical_layer_dimension_for_radiation - number of vertical layers for radiation - count - nlay - integer - - in - F - MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_run - - - flag_print - flag to print - flag - lprint - logical - - in - F - MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_run - - - total_cloud_fraction - total cloud fraction - frac - cldfrac - real - (:,:) - in - F - MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_run - - - flag_to_calc_lw - flag to calculate LW irradiances - flag - lslwr - logical - - in - F - MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_run - - - cloud_liquid_water_path - cloud liquid water path - g m-2 - cld_lwp - real - (:,:) - in - T - MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_run - - - mean_effective_radius_for_liquid_cloud - mean effective radius for liquid cloud - micron - cld_ref_liq - real - (:,:) - in - T - MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_run - - - cloud_ice_water_path - cloud ice water path - g m-2 - cld_iwp - real - (:,:) - in - T - MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_run - - - mean_effective_radius_for_ice_cloud - mean effective radius for ice cloud - micron - cld_ref_ice - real - (:,:) - in - T - MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_run - - - cloud_rain_water_path - cloud ice water path - g m-2 - cld_rwp - real - (:,:) - in - T - MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_run - - - mean_effective_radius_for_rain_drop - mean effective radius for rain drop - micron - cld_ref_rain - real - (:,:) - in - T - MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_run - - - cloud_snow_water_path - cloud snow water path - g m-2 - cld_swp - real - (:,:) - in - T - MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_run - - - mean_effective_radius_for_snow_flake - mean effective radius for snow flake - micron - cld_ref_snow - real - (:,:) - in - T - MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_run - - - cloud_optical_depth - cloud optical depth - none - cld_od - real - (:,:) - in - T - MODULE_GFS_rrtmgp_lw SCHEME_GFS_rrtmgp_lw SUBROUTINE_GFS_rrtmgp_lw_run - - - diff --git a/physics/GFS_rrtmgp_lw_post.F90 b/physics/GFS_rrtmgp_lw_post.F90 deleted file mode 100644 index 65b761089..000000000 --- a/physics/GFS_rrtmgp_lw_post.F90 +++ /dev/null @@ -1,102 +0,0 @@ -!>\file GFS_rrtmgp_lw_post -!!This file contains - module GFS_rrtmgp_lw_post - contains - -!>\defgroup GFS_rrtmgp_lw_post GFS RRTMGP scheme post -!! @{ -!> \section arg_table_GFS_rrtmgp_lw_post_init Argument Table -!! - subroutine GFS_rrtmgp_lw_post_init() - end subroutine GFS_rrtmgp_lw_post_init - -! PGI compiler does not accept lines longer than 264 characters, remove during pre-processing -#ifndef __PGI -!> \section arg_table_GFS_rrtmgp_lw_post_run Argument Table -!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | -!! |-----------------|-----------------------------------------------------------------------------------------------|------------------------------------------------------------------------------|----------|------|-----------------------|-----------|-----------|----------| -!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | -!! | Grid | GFS_grid_type_instance | Fortran DDT containing FV3-GFS grid and interpolation related data | DDT | 0 | GFS_grid_type | | in | F | -!! | Radtend | GFS_radtend_type_instance | Fortran DDT containing FV3-GFS fields targetted for diagnostic output | DDT | 0 | GFS_radtend_type | | inout | F | -!! | Coupling | GFS_coupling_type_instance | Fortran DDT containing FV3-GFS fields to/from coupling with other components | DDT | 0 | GFS_coupling_type | | inout | F | -!! | im | horizontal_loop_extent | horizontal loop extent | count | 0 | integer | | in | F | -!! | ltp | extra_top_layer | extra top layers | none | 0 | integer | | in | F | -!! | lm | vertical_layer_dimension_for_radiation | number of vertical layers for radiation calculation | count | 0 | integer | | in | F | -!! | kd | vertical_index_difference_between_inout_and_local | vertical index difference between in/out and local | index | 0 | integer | | in | F | -!! | tsfa | surface_air_temperature_for_radiation | lowest model layer air temperature for radiation | K | 1 | real | kind_phys | in | F | -!! | htlwc | tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_step | total sky heating rate due to longwave radiation | K s-1 | 2 | real | kind_phys | in | F | -!! | htlw0 | tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_time_step | clear sky heating rate due to longwave radiation | K s-1 | 2 | real | kind_phys | in | F | -!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | -!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | -!! -#endif - subroutine GFS_rrtmgp_lw_post_run (Model, Grid, Radtend, Coupling, & - im, ltp, lm, kd, tsfa, htlwc, htlw0, errmsg, errflg) - - use machine, only: kind_phys - use GFS_typedefs, only: GFS_coupling_type, & - GFS_control_type, & - GFS_grid_type, & - GFS_radtend_type - implicit none - type(GFS_control_type), intent(in) :: Model - type(GFS_coupling_type), intent(inout) :: Coupling - type(GFS_grid_type), intent(in) :: Grid - type(GFS_radtend_type), intent(inout) :: Radtend - integer, intent(in) :: im, ltp, LM, kd - real(kind=kind_phys), dimension(size(Grid%xlon,1), Model%levr+LTP), intent(in) :: htlwc - real(kind=kind_phys), dimension(size(Grid%xlon,1), Model%levr+LTP), intent(in) :: htlw0 - real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(in) :: tsfa - character(len=*), intent(out) :: errmsg - integer, intent(out) :: errflg - ! local variables - integer :: k1, k - - ! Initialize CCPP error handling variables - errmsg = '' - errflg = 0 - - if (Model%lslwr) then -!> -# Save calculation results -!> - Save surface air temp for diurnal adjustment at model t-steps - - Radtend%tsflw (:) = tsfa(:) - - do k = 1, LM - k1 = k + kd - Radtend%htrlw(1:im,k) = htlwc(1:im,k1) - enddo - ! --- repopulate the points above levr - if (lm < Model%levs) then - do k = lm,Model%levs - Radtend%htrlw (1:im,k) = Radtend%htrlw (1:im,LM) - enddo - endif - - if (Model%lwhtr) then - do k = 1, lm - k1 = k + kd - Radtend%lwhc(1:im,k) = htlw0(1:im,k1) - enddo - ! --- repopulate the points above levr - if (lm < Model%levs) then - do k = lm,Model%levs - Radtend%lwhc(1:im,k) = Radtend%lwhc(1:im,LM) - enddo - endif - endif - -! --- radiation fluxes for other physics processes - Coupling%sfcdlw(:) = Radtend%sfcflw(:)%dnfxc - - endif ! end_if_lslwr - - end subroutine GFS_rrtmgp_lw_post_run - -!> \section arg_table_GFS_rrtmgp_lw_post_finalize Argument Table -!! - subroutine GFS_rrtmgp_lw_post_finalize () - end subroutine GFS_rrtmgp_lw_post_finalize - -!! @} - end module GFS_rrtmgp_lw_post diff --git a/physics/GFS_rrtmgp_lw_post.xml b/physics/GFS_rrtmgp_lw_post.xml deleted file mode 100644 index ee9de302d..000000000 --- a/physics/GFS_rrtmgp_lw_post.xml +++ /dev/null @@ -1,150 +0,0 @@ - - - - - - - GFS_control_type_instance - Fortran DDT containing FV3-GFS model control parameters - DDT - Model - GFS_control_type - - in - F - MODULE_GFS_rrtmgp_lw_post SCHEME_GFS_rrtmgp_lw_post SUBROUTINE_GFS_rrtmgp_lw_post_run - - - GFS_grid_type_instance - Fortran DDT containing FV3-GFS grid and interpolation related data - DDT - Grid - GFS_grid_type - - in - F - MODULE_GFS_rrtmgp_lw_post SCHEME_GFS_rrtmgp_lw_post SUBROUTINE_GFS_rrtmgp_lw_post_run - - - GFS_radtend_type_instance - Fortran DDT containing FV3-GFS fields targetted for diagnostic output - DDT - Radtend - GFS_radtend_type - - inout - F - MODULE_GFS_rrtmgp_lw_post SCHEME_GFS_rrtmgp_lw_post SUBROUTINE_GFS_rrtmgp_lw_post_run - - - GFS_coupling_type_instance - Fortran DDT containing FV3-GFS fields to/from coupling with other components - DDT - Coupling - GFS_coupling_type - - inout - F - MODULE_GFS_rrtmgp_lw_post SCHEME_GFS_rrtmgp_lw_post SUBROUTINE_GFS_rrtmgp_lw_post_run - - - horizontal_loop_extent - horizontal loop extent - count - im - integer - - in - F - MODULE_GFS_rrtmgp_lw_post SCHEME_GFS_rrtmgp_lw_post SUBROUTINE_GFS_rrtmgp_lw_post_run - - - extra_top_layer - extra top layers - none - ltp - integer - - in - F - MODULE_GFS_rrtmgp_lw_post SCHEME_GFS_rrtmgp_lw_post SUBROUTINE_GFS_rrtmgp_lw_post_run - - - vertical_layer_dimension_for_radiation - number of vertical layers for radiation calculation - count - lm - integer - - in - F - MODULE_GFS_rrtmgp_lw_post SCHEME_GFS_rrtmgp_lw_post SUBROUTINE_GFS_rrtmgp_lw_post_run - - - vertical_index_difference_between_inout_and_local - vertical index difference between in/out and local - index - kd - integer - - in - F - MODULE_GFS_rrtmgp_lw_post SCHEME_GFS_rrtmgp_lw_post SUBROUTINE_GFS_rrtmgp_lw_post_run - - - surface_air_temperature_for_radiation - lowest model layer air temperature for radiation - K - tsfa - real - (:) - in - F - MODULE_GFS_rrtmgp_lw_post SCHEME_GFS_rrtmgp_lw_post SUBROUTINE_GFS_rrtmgp_lw_post_run - - - tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_step - total sky heating rate due to longwave radiation - K s-1 - htlwc - real - (:,:) - in - F - MODULE_GFS_rrtmgp_lw_post SCHEME_GFS_rrtmgp_lw_post SUBROUTINE_GFS_rrtmgp_lw_post_run - - - tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_time_step - clear sky heating rate due to longwave radiation - K s-1 - htlw0 - real - (:,:) - in - F - MODULE_GFS_rrtmgp_lw_post SCHEME_GFS_rrtmgp_lw_post SUBROUTINE_GFS_rrtmgp_lw_post_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_GFS_rrtmgp_lw_post SCHEME_GFS_rrtmgp_lw_post SUBROUTINE_GFS_rrtmgp_lw_post_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_GFS_rrtmgp_lw_post SCHEME_GFS_rrtmgp_lw_post SUBROUTINE_GFS_rrtmgp_lw_post_run - - - diff --git a/physics/GFS_rrtmgp_lw_pre.F90 b/physics/GFS_rrtmgp_lw_pre.F90 deleted file mode 100644 index 95ffc41a7..000000000 --- a/physics/GFS_rrtmgp_lw_pre.F90 +++ /dev/null @@ -1,67 +0,0 @@ -!>\file GFS_rrtmgp_lw_pre.f90 -!! This file contains a call to module_radiation_surface::setemis() to -!! setup surface emissivity for LW radiation. - module GFS_rrtmgp_lw_pre - contains - -!>\defgroup GFS_rrtmgp_lw_pre GFS RRTMGP scheme pre -!! @{ -!> \section arg_table_GFS_rrtmgp_lw_pre_init Argument Table -!! - subroutine GFS_rrtmgp_lw_pre_init () - end subroutine GFS_rrtmgp_lw_pre_init - -!> \section arg_table_GFS_rrtmgp_lw_pre_run Argument Table -!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | -!! |----------------|-------------------------------------------|--------------------------------------------------------------------|----------|------|-----------------------|-----------|--------|----------| -!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | -!! | Grid | GFS_grid_type_instance | Fortran DDT containing FV3-GFS grid and interpolation related data | DDT | 0 | GFS_grid_type | | in | F | -!! | Sfcprop | GFS_sfcprop_type_instance | Fortran DDT containing FV3-GFS surface fields | DDT | 0 | GFS_sfcprop_type | | in | F | -!! | Radtend | GFS_radtend_type_instance | Fortran DDT containing FV3-GFS radiation tendencies | DDT | 0 | GFS_radtend_type | | inout | F | -!! | im | horizontal_loop_extent | horizontal loop extent | count | 0 | integer | | in | F | -!! | tsfg | surface_ground_temperature_for_radiation | surface ground temperature for radiation | K | 1 | real | kind_phys | in | F | -!! | tsfa | surface_air_temperature_for_radiation | lowest model layer air temperature for radiation | K | 1 | real | kind_phys | in | F | -!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | -!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | -!! - subroutine GFS_rrtmgp_lw_pre_run (Model, Grid, Sfcprop, Radtend, im, tsfg, tsfa, errmsg, errflg) - - use machine, only: kind_phys - - use GFS_typedefs, only: GFS_control_type, & - GFS_grid_type, & - GFS_radtend_type, & - GFS_sfcprop_type - use module_radiation_surface, only: setemis - - implicit none - type(GFS_control_type), intent(in) :: Model - type(GFS_radtend_type), intent(inout) :: Radtend - type(GFS_sfcprop_type), intent(in) :: Sfcprop - type(GFS_grid_type), intent(in) :: Grid - integer, intent(in) :: im - real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(in) :: tsfa, tsfg - character(len=*), intent(out) :: errmsg - integer, intent(out) :: errflg - - ! Initialize CCPP error handling variables - errmsg = '' - errflg = 0 - - if (Model%lslwr) then -!> - Call module_radiation_surface::setemis(),to setup surface -!! emissivity for LW radiation. - call setemis (Grid%xlon, Grid%xlat, Sfcprop%slmsk, & ! --- inputs - Sfcprop%snowd, Sfcprop%sncovr, Sfcprop%zorl, & - tsfg, tsfa, Sfcprop%hprim, IM, & - Radtend%semis) ! --- outputs - endif - - end subroutine GFS_rrtmgp_lw_pre_run - -!> \section arg_table_GFS_rrtmgp_lw_pre_finalize Argument Table -!! - subroutine GFS_rrtmgp_lw_pre_finalize () - end subroutine GFS_rrtmgp_lw_pre_finalize -!! @} - end module GFS_rrtmgp_lw_pre diff --git a/physics/GFS_rrtmgp_sw.xml b/physics/GFS_rrtmgp_sw.xml deleted file mode 100644 index de4025645..000000000 --- a/physics/GFS_rrtmgp_sw.xml +++ /dev/null @@ -1,623 +0,0 @@ - - - - - - air_pressure_at_layer_for_radiation_in_hPa - air pressure layer - hPa - p_lay - real - (:,:) - in - F - MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run - - - air_pressure_at_interface_for_radiation_in_hPa - air pressure level - hPa - p_lev - real - (:,:) - in - F - MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run - - - air_temperature_at_layer_for_radiation - air temperature layer - K - t_lay - real - (:,:) - in - F - MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run - - - air_temperature_at_interface_for_radiation - air temperature level - K - t_lev - real - (:,:) - in - F - MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run - - - water_vapor_specific_humidity_at_layer_for_radiation - specific humidity layer - kg kg-1 - q_lay - real - (:,:) - in - F - MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run - - - ozone_concentration_at_layer_for_radiation - ozone concentration layer - kg kg-1 - o3_lay - real - (:,:) - in - F - MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run - - - volume_mixing_ratio_co2 - volume mixing ratio co2 - kg kg-1 - vmr_co2 - real - (:,:) - in - F - MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run - - - volume_mixing_ratio_n2o - volume mixing ratio no2 - kg kg-1 - vmr_n2o - real - (:,:) - in - F - MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run - - - volume_mixing_ratio_ch4 - volume mixing ratio ch4 - kg kg-1 - vmr_ch4 - real - (:,:) - in - F - MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run - - - volume_mixing_ratio_o2 - volume mixing ratio o2 - kg kg-1 - vmr_o2 - real - (:,:) - in - F - MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run - - - volume_mixing_ratio_co - volume mixing ratio co - kg kg-1 - vmr_co - real - (:,:) - in - F - MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run - - - volume_mixing_ratio_cfc11 - volume mixing ratio cfc11 - kg kg-1 - vmr_cfc11 - real - (:,:) - in - F - MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run - - - volume_mixing_ratio_cfc12 - volume mixing ratio cfc12 - kg kg-1 - vmr_cfc12 - real - (:,:) - in - F - MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run - - - volume_mixing_ratio_cfc22 - volume mixing ratio cfc22 - kg kg-1 - vmr_cfc22 - real - (:,:) - in - F - MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run - - - volume_mixing_ratio_ccl4 - volume mixing ratio ccl4 - kg kg-1 - vmr_ccl4 - real - (:,:) - in - F - MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run - - - seed_random_numbers_sw - seed for random number generation for shortwave radiation - none - icseed - integer - (:) - in - F - MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run - - - aerosol_optical_depth_for_shortwave_bands_01-16 - aerosol optical depth for shortwave bands 01-16 - none - tau_aer - real - (:,:,:) - in - F - MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run - - - aerosol_single_scattering_albedo_for_shortwave_bands_01-16 - aerosol single scattering albedo for shortwave bands 01-16 - frac - ssa_aer - real - (:,:,:) - in - F - MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run - - - aerosol_asymmetry_parameter_for_shortwave_bands_01-16 - aerosol asymmetry paramter for shortwave bands 01-16 - none - asy_aer - real - (:,:,:) - in - F - MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run - - - surface_albedo_due_to_near_IR_direct - surface albedo due to near IR direct beam - frac - sfcalb_nir_dir - real - (:) - in - F - MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run - - - surface_albedo_due_to_near_IR_diffused - surface albedo due to near IR diffused beam - frac - sfcalb_nir_dif - real - (:) - in - F - MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run - - - surface_albedo_due_to_UV_and_VIS_direct - surface albedo due to UV+VIS direct beam - frac - sfcalb_uvis_dir - real - (:) - in - F - MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run - - - surface_albedo_due_to_UV_and_VIS_diffused - surface albedo due to UV+VIS diffused beam - frac - sfcalb_uvis_dif - real - (:) - in - F - MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run - - - layer_thickness_for_radiation - layer thickness - km - dzlyr - real - (:,:) - in - F - MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run - - - layer_pressure_thickness_for_radiation - layer pressure thickness - hPa - delpin - real - (:,:) - in - F - MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run - - - cloud_decorrelation_length - cloud decorrelation length - km - de_lgth - real - (:) - in - F - MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run - - - cosine_of_zenith_angle - cosine of the solar zenit angle - none - cossza - real - (:) - in - F - MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run - - - solar_constant - solar constant - W m-2 - solcon - real - - in - F - MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run - - - daytime_points_dimension - daytime points dimension - nday - nday - integer - - in - F - MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run - - - daytime_points - daytime points - index - idxday - integer - (:) - in - F - MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run - - - horizontal_loop_extent - horizontal dimension - count - ncol - integer - - in - F - MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run - - - adjusted_vertical_layer_dimension_for_radiation - number of vertical layers for radiation - count - nlay - integer - - in - F - MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run - - - flag_print - flag to print - flag - lprnt - logical - - in - F - MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run - - - total_cloud_fraction - total cloud fraction - frac - cldfrac - real - (:,:) - in - F - MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run - - - flag_to_calc_sw - flag to calculate SW irradiances - flag - lsswr - logical - - in - F - MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run - - - tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step - shortwave total sky heating rate - K s-1 - hswc - real - (:,:) - inout - F - MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run - - - sw_fluxes_top_atmosphere - shortwave total sky fluxes at the top of the atm - W m-2 - topflx - topfsw_type - (:) - inout - F - MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run - - - sw_fluxes_sfc - shortwave total sky fluxes at the Earth surface - W m-2 - sfcflx - sfcfsw_type - (:) - inout - F - MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run - - - cloud_optical_depth_layers_at_0.55mu_band - approx .55mu band layer cloud optical depth - none - cldtau - real - (:,:) - inout - F - MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run - - - tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_time_step - shortwave clear sky heating rate - K s-1 - hsw0 - real - (:,:) - inout - T - MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run - - - sw_heating_rate_spectral - shortwave total sky heating rate (spectral) - K s-1 - hswb - real - (:,:,:) - inout - T - MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run - - - sw_fluxes - sw fluxes total sky / csk and up / down at levels - W m-2 - flxprf - profsw_type - (:,:) - inout - T - MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run - - - components_of_surface_downward_shortwave_fluxes - derived type for special components of surface downward shortwave fluxes - W m-2 - fdncmp - cmpfsw_type - (:) - inout - T - MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run - - - cloud_liquid_water_path - cloud liquid water path - g m-2 - cld_lwp - real - (:,:) - in - T - MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run - - - mean_effective_radius_for_liquid_cloud - mean effective radius for liquid cloud - micron - cld_ref_liq - real - (:,:) - in - T - MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run - - - cloud_ice_water_path - cloud ice water path - g m-2 - cld_iwp - real - (:,:) - in - T - MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run - - - mean_effective_radius_for_ice_cloud - mean effective radius for ice cloud - micron - cld_ref_ice - real - (:,:) - in - T - MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run - - - cloud_rain_water_path - cloud rain water path - g m-2 - cld_rwp - real - (:,:) - in - T - MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run - - - mean_effective_radius_for_rain_drop - mean effective radius for rain drop - micron - cld_ref_rain - real - (:,:) - in - T - MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run - - - cloud_snow_water_path - cloud snow water path - g m-2 - cld_swp - real - (:,:) - in - T - MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run - - - mean_effective_radius_for_snow_flake - mean effective radius for snow flake - micron - cld_ref_snow - real - (:,:) - in - T - MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run - - - cloud_optical_depth - cloud optical depth - none - cld_od - real - (:,:) - in - T - MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run - - - cloud_single_scattering_albedo - cloud single scattering albedo - frac - cld_ssa - real - (:,:) - in - T - MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run - - - cloud_asymmetry_parameter - cloud asymmetry parameter - none - cld_asy - real - (:,:) - in - T - MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_GFS_rrtmgp_sw SCHEME_GFS_rrtmgp_sw SUBROUTINE_GFS_rrtmgp_sw_run - - - - diff --git a/physics/GFS_rrtmgp_sw_post.xml b/physics/GFS_rrtmgp_sw_post.xml deleted file mode 100644 index 695ab6d73..000000000 --- a/physics/GFS_rrtmgp_sw_post.xml +++ /dev/null @@ -1,216 +0,0 @@ - - - - - - - GFS_control_type_instance - Fortran DDT containing FV3-GFS model control parameters - DDT - Model - GFS_control_type - - in - F - MODULE_GFS_rrtmgp_sw_post SCHEME_GFS_rrtmgp_sw_post SUBROUTINE_GFS_rrtmgp_sw_post_run - - - GFS_grid_type_instance - Fortran DDT containing FV3-GFS grid and interpolation related data - DDT - Grid - GFS_grid_type - - in - F - MODULE_GFS_rrtmgp_sw_post SCHEME_GFS_rrtmgp_sw_post SUBROUTINE_GFS_rrtmgp_sw_post_run - - - GFS_diag_type_instance - Fortran DDT containing FV3-GFS diagnotics data - DDT - Diag - GFS_diag_type - - inout - F - MODULE_GFS_rrtmgp_sw_post SCHEME_GFS_rrtmgp_sw_post SUBROUTINE_GFS_rrtmgp_sw_post_run - - - GFS_radtend_type_instance - Fortran DDT containing FV3-GFS fields targetted for diagnostic output - DDT - Radtend - GFS_radtend_type - - inout - F - MODULE_GFS_rrtmgp_sw_post SCHEME_GFS_rrtmgp_sw_post SUBROUTINE_GFS_rrtmgp_sw_post_run - - - GFS_coupling_type_instance - Fortran DDT containing FV3-GFS fields to/from coupling with other components - DDT - Coupling - GFS_coupling_type - - inout - F - MODULE_GFS_rrtmgp_sw_post SCHEME_GFS_rrtmgp_sw_post SUBROUTINE_GFS_rrtmgp_sw_post_run - - - horizontal_loop_extent - horizontal loop extent - count - im - integer - - in - F - MODULE_GFS_rrtmgp_sw_post SCHEME_GFS_rrtmgp_sw_post SUBROUTINE_GFS_rrtmgp_sw_post_run - - - extra_top_layer - extra top layers - none - ltp - integer - - in - F - MODULE_GFS_rrtmgp_sw_post SCHEME_GFS_rrtmgp_sw_post SUBROUTINE_GFS_rrtmgp_sw_post_run - - - daytime_points_dimension - daytime points dimension - count - nday - integer - - in - F - MODULE_GFS_rrtmgp_sw_post SCHEME_GFS_rrtmgp_sw_post SUBROUTINE_GFS_rrtmgp_sw_post_run - - - vertical_layer_dimension_for_radiation - number of vertical layers for radiation calculation - count - lm - integer - - in - F - MODULE_GFS_rrtmgp_sw_post SCHEME_GFS_rrtmgp_sw_post SUBROUTINE_GFS_rrtmgp_sw_post_run - - - vertical_index_difference_between_inout_and_local - vertical index difference between in/out and local - index - kd - integer - - in - F - MODULE_GFS_rrtmgp_sw_post SCHEME_GFS_rrtmgp_sw_post SUBROUTINE_GFS_rrtmgp_sw_post_run - - - tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step - total sky heating rate due to shortwave radiation - K s-1 - htswc - real - (:,:) - in - F - MODULE_GFS_rrtmgp_sw_post SCHEME_GFS_rrtmgp_sw_post SUBROUTINE_GFS_rrtmgp_sw_post_run - - - tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_time_step - clear sky heating rates due to shortwave radiation - K s-1 - htsw0 - real - (:,:) - in - F - MODULE_GFS_rrtmgp_sw_post SCHEME_GFS_rrtmgp_sw_post SUBROUTINE_GFS_rrtmgp_sw_post_run - - - surface_albedo_due_to_near_IR_direct - surface albedo due to near IR direct beam - frac - sfcalb1 - real - (:) - in - F - MODULE_GFS_rrtmgp_sw_post SCHEME_GFS_rrtmgp_sw_post SUBROUTINE_GFS_rrtmgp_sw_post_run - - - surface_albedo_due_to_near_IR_diffused - surface albedo due to near IR diffused beam - frac - sfcalb2 - real - (:) - in - F - MODULE_GFS_rrtmgp_sw_post SCHEME_GFS_rrtmgp_sw_post SUBROUTINE_GFS_rrtmgp_sw_post_run - - - surface_albedo_due_to_UV_and_VIS_direct - surface albedo due to UV+VIS direct beam - frac - sfcalb3 - real - (:) - in - F - MODULE_GFS_rrtmgp_sw_post SCHEME_GFS_rrtmgp_sw_post SUBROUTINE_GFS_rrtmgp_sw_post_run - - - surface_albedo_due_to_UV_and_VIS_diffused - surface albedo due to UV+VIS diffused beam - frac - sfcalb4 - real - (:) - in - F - MODULE_GFS_rrtmgp_sw_post SCHEME_GFS_rrtmgp_sw_post SUBROUTINE_GFS_rrtmgp_sw_post_run - - - components_of_surface_downward_shortwave_fluxes - derived type for special components of surface downward shortwave fluxes - W m-2 - scmpsw - cmpfsw_type - (:) - inout - F - MODULE_GFS_rrtmgp_sw_post SCHEME_GFS_rrtmgp_sw_post SUBROUTINE_GFS_rrtmgp_sw_post_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_GFS_rrtmgp_sw_post SCHEME_GFS_rrtmgp_sw_post SUBROUTINE_GFS_rrtmgp_sw_post_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_GFS_rrtmgp_sw_post SCHEME_GFS_rrtmgp_sw_post SUBROUTINE_GFS_rrtmgp_sw_post_run - - - diff --git a/physics/GFS_rrtmgp_sw_pre.xml b/physics/GFS_rrtmgp_sw_pre.xml deleted file mode 100644 index 00f2a3164..000000000 --- a/physics/GFS_rrtmgp_sw_pre.xml +++ /dev/null @@ -1,183 +0,0 @@ - - - - - - - GFS_control_type_instance - Fortran DDT containing FV3-GFS model control parameters - DDT - Model - GFS_control_type - - in - F - MODULE_GFS_rrtmgp_sw_pre SCHEME_GFS_rrtmgp_sw_pre SUBROUTINE_GFS_rrtmgp_sw_pre_run - - - GFS_grid_type_instance - Fortran DDT containing FV3-GFS grid and interpolation related data - DDT - Grid - GFS_grid_type - - in - F - MODULE_GFS_rrtmgp_sw_pre SCHEME_GFS_rrtmgp_sw_pre SUBROUTINE_GFS_rrtmgp_sw_pre_run - - - GFS_sfcprop_type_instance - Fortran DDT containing FV3-GFS surface fields - DDT - Sfcprop - GFS_sfcprop_type - - in - F - MODULE_GFS_rrtmgp_sw_pre SCHEME_GFS_rrtmgp_sw_pre SUBROUTINE_GFS_rrtmgp_sw_pre_run - - - GFS_radtend_type_instance - Fortran DDT containing FV3-GFS radiation tendencies - DDT - Radtend - GFS_radtend_type - - inout - F - MODULE_GFS_rrtmgp_sw_pre SCHEME_GFS_rrtmgp_sw_pre SUBROUTINE_GFS_rrtmgp_sw_pre_run - - - horizontal_loop_extent - horizontal loop extent - count - im - integer - - in - F - MODULE_GFS_rrtmgp_sw_pre SCHEME_GFS_rrtmgp_sw_pre SUBROUTINE_GFS_rrtmgp_sw_pre_run - - - daytime_points_dimension - daytime points dimension - count - nday - integer - - out - F - MODULE_GFS_rrtmgp_sw_pre SCHEME_GFS_rrtmgp_sw_pre SUBROUTINE_GFS_rrtmgp_sw_pre_run - - - daytime_points - daytime points - index - idxday - integer - (:) - out - F - MODULE_GFS_rrtmgp_sw_pre SCHEME_GFS_rrtmgp_sw_pre SUBROUTINE_GFS_rrtmgp_sw_pre_run - - - surface_ground_temperature_for_radiation - surface ground temperature for radiation - K - tsfg - real - (:) - in - F - MODULE_GFS_rrtmgp_sw_pre SCHEME_GFS_rrtmgp_sw_pre SUBROUTINE_GFS_rrtmgp_sw_pre_run - - - surface_air_temperature_for_radiation - lowest model layer air temperature for radiation - K - tsfa - real - (:) - in - F - MODULE_GFS_rrtmgp_sw_pre SCHEME_GFS_rrtmgp_sw_pre SUBROUTINE_GFS_rrtmgp_sw_pre_run - - - surface_albedo_due_to_near_IR_direct - surface albedo due to near IR direct beam - frac - sfcalb1 - real - (:) - out - F - MODULE_GFS_rrtmgp_sw_pre SCHEME_GFS_rrtmgp_sw_pre SUBROUTINE_GFS_rrtmgp_sw_pre_run - - - surface_albedo_due_to_near_IR_diffused - surface albedo due to near IR diffused beam - frac - sfcalb2 - real - (:) - out - F - MODULE_GFS_rrtmgp_sw_pre SCHEME_GFS_rrtmgp_sw_pre SUBROUTINE_GFS_rrtmgp_sw_pre_run - - - surface_albedo_due_to_UV_and_VIS_direct - surface albedo due to UV+VIS direct beam - frac - sfcalb3 - real - (:) - out - F - MODULE_GFS_rrtmgp_sw_pre SCHEME_GFS_rrtmgp_sw_pre SUBROUTINE_GFS_rrtmgp_sw_pre_run - - - surface_albedo_due_to_UV_and_VIS_diffused - surface albedo due to UV+VIS diffused beam - frac - sfcalb4 - real - (:) - out - F - MODULE_GFS_rrtmgp_sw_pre SCHEME_GFS_rrtmgp_sw_pre SUBROUTINE_GFS_rrtmgp_sw_pre_run - - - surface_albedo_perturbation - surface albedo perturbation - frac - alb1d - real - (:) - in - F - MODULE_GFS_rrtmgp_sw_pre SCHEME_GFS_rrtmgp_sw_pre SUBROUTINE_GFS_rrtmgp_sw_pre_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_GFS_rrtmgp_sw_pre SCHEME_GFS_rrtmgp_sw_pre SUBROUTINE_GFS_rrtmgp_sw_pre_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_GFS_rrtmgp_sw_pre SCHEME_GFS_rrtmgp_sw_pre SUBROUTINE_GFS_rrtmgp_sw_pre_run - - - diff --git a/physics/rrtmgp_lw.F90 b/physics/rrtmgp_lw.F90 new file mode 100644 index 000000000..6140924fe --- /dev/null +++ b/physics/rrtmgp_lw.F90 @@ -0,0 +1,104 @@ +! ########################################################################################### +! ########################################################################################### +module rrtmgp_lw + use machine, only: kind_phys + use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp + use mo_cloud_optics, only: ty_cloud_optics + use mo_optical_props, only: ty_optical_props_1scl + use mo_rrtmgp_clr_all_sky, only: rte_lw + use mo_gas_concentrations, only: ty_gas_concs + use mo_fluxes_byband, only: ty_fluxes_byband + + public rrtmgp_lw_init, rrtmgp_lw_run, rrtmgp_lw_finalize +contains + + subroutine rrtmgp_lw_init() + end subroutine rrtmgp_lw_init + + ! ######################################################################################### + ! ######################################################################################### +!! \section arg_table_rrtmgp_lw_run Argument Table +!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | +!! |-----------------------|-------------------------------------------------|--------------------------------------------------------------------|-------|------|-----------------------|-----------|--------|----------| +!! | ncol | horizontal_loop_extent | horizontal dimension | count | 0 | integer | | in | F | +!! | nlay | adjusted_vertical_layer_dimension_for_radiation | number of vertical layers for radiation | count | 0 | integer | | in | F | +!! | p_lay | air_pressure_at_layer_for_radiation_in_hPa | air pressure layer | hPa | 2 | real | kind_phys | in | F | +!! | p_lev | air_pressure_at_interface_for_radiation_in_hPa | air pressure level | hPa | 2 | real | kind_phys | in | F | +!! | t_lay | air_temperature_at_layer_for_radiation | air temperature layer | K | 2 | real | kind_phys | in | F | +!! | skt | surface_ground_temperature_for_radiation | surface ground temperature for radiation | K | 1 | real | kind_phys | in | F | +!! | sfc_emiss | surface_longwave_emissivity_in_each_band | surface lw emissivity in fraction in each LW band | frac | 2 | real | kind_phys | in | F | +!! | kdist_lw | K_distribution_file_for_RRTMGP_LW_scheme | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | +!! | optical_props_clds | optical_properties_for_cloudy_atmosphere | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_1scl | | in | F | +!! | optical_props_aerosol | optical_properties_for_aerosols | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_1scl | | in | F | +!! | gas_concentrations | Gas_concentrations_for_RRTMGP_suite | DDT containing gas concentrations for RRTMGP radiation scheme | DDT | 0 | ty_gas_concs | | in | F | +!! | fluxLW_allsky | lw_flux_profiles_byband_allsky | Fortran DDT containing RRTMGP 3D fluxes | DDT | 0 | ty_fluxes_byband | | out | F | +!! | fluxLW_clrsky | lw_flux_profiles_byband_clrsky | Fortran DDT containing RRTMGP 3D fluxes | DDT | 0 | ty_fluxes_byband | | out | F | +!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | +!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! + subroutine rrtmgp_lw_run(ncol, nlay, kdist_lw, p_lay, t_lay, p_lev, skt, & + sfc_emiss, gas_concentrations, optical_props_clds, optical_props_aerosol,& + fluxLW_allsky, fluxLW_clrsky, errmsg, errflg) + + ! Inputs + integer, intent(in) :: & + ncol, & ! Number of horizontal gridpoints + nlay ! Number of vertical layers + real(kind_phys), dimension(ncol,nlay), intent(in) :: & + p_lay, & ! Pressure @ model layer-centers (hPa) + t_lay ! Temperature (K) + real(kind_phys), dimension(ncol,nlay+1), intent(in) :: & + p_lev ! Pressure @ model layer-interfaces (hPa) + real(kind_phys), dimension(ncol), intent(in) :: & + skt ! Surface(skin) temperature (K) + type(ty_gas_optics_rrtmgp),intent(in) :: & + kdist_lw ! DDT containing LW spectral information + real(kind_phys), dimension(kdist_lw%get_nband(),ncol) :: & + sfc_emiss ! Surface emissivity (1) + type(ty_optical_props_1scl),intent(in) :: & + optical_props_clds, & + optical_props_aerosol + type(ty_gas_concs),intent(in) :: & + gas_concentrations + type(ty_fluxes_byband),intent(out) :: & + fluxLW_allsky, & ! All-sky flux (W/m2) + fluxLW_clrsky ! Clear-sky flux (W/m2) + + ! Outputs + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + + ! Call RRTMGP LW scheme + call check_error_msg(rte_lw( & + kdist_lw, & ! IN - spectral information + gas_concentrations, & ! IN - gas concentrations (vmr) + p_lay, & ! IN - pressure at layer interfaces (Pa) + t_lay, & ! IN - temperature at layer interfaes (K) + p_lev, & ! IN - pressure at layer centers (Pa) + skt, & ! IN - skin temperature (K) + sfc_emiss, & ! IN - surface emissivity in each LW band + optical_props_clds, & ! IN - DDT containing cloud optical information + fluxLW_allsky, & ! OUT - Fluxes, all-sky, 3D (nCol,nLay,nBand) + fluxLW_clrsky, & ! OUT - Fluxes, clear-sky, 3D (nCol,nLay,nBand) + aer_props = optical_props_aerosol)) ! IN(optional) - DDT containing aerosol optical information + + end subroutine rrtmgp_lw_run + + subroutine rrtmgp_lw_finalize() + end subroutine rrtmgp_lw_finalize + subroutine check_error_msg(error_msg) + character(len=*), intent(in) :: error_msg + + if(error_msg /= "") then + print*,"ERROR(rrtmgp_sw_main.F90): " + print*,trim(error_msg) + return + end if + end subroutine check_error_msg + + +end module rrtmgp_lw diff --git a/physics/rrtmgp_lw_main.xml b/physics/rrtmgp_lw_main.xml deleted file mode 100644 index 04ac5c73e..000000000 --- a/physics/rrtmgp_lw_main.xml +++ /dev/null @@ -1,173 +0,0 @@ - - - - - - - horizontal_loop_extent - horizontal dimension - count - ncol - integer - - in - F - MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_main_run - - - adjusted_vertical_layer_dimension_for_radiation - number of vertical layers for radiation - count - nlay - integer - - in - F - MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_main_run - - - - air_pressure_at_layer_for_radiation_in_hPa - air pressure layer - hPa - p_lay - real - (:,:) - in - F - MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_main_run - - - air_pressure_at_interface_for_radiation_in_hPa - air pressure level - hPa - p_lev - real - (:,:) - in - F - MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_main_run - - - air_temperature_at_layer_for_radiation - air temperature layer - K - t_lay - real - (:,:) - in - F - MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_main_run - - - surface_ground_temperature_for_radiation - surface ground temperature for radiation - K - skt - real - (:) - in - F - MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_main_run - - - surface_longwave_emissivity - surface emissivity - frac - sfc_emiss - real - (:) - in - F - MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_main_run - - - K_distribution_file_for_RRTMGP_LW_scheme - DDT containing spectral information for RRTMGP LW radiation scheme - DDT - kdist_lw - ty_gas_optics_rrtmgp_type - - in - F - MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_main_run - - - optical_properties_for_cloudy_atmosphere - Fortran DDT containing RRTMGP optical properties - DDT - optical_props_clds - ty_optical_props_1scl - - in - F - MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_main_run - - - optical_properties_for_aerosols - Fortran DDT containing RRTMGP optical properties - DDT - optical_props_aerosol - ty_optical_props_1scl - - in - F - MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_main_run - - - Gas_concentrations_for_RRTMGP_suite - Fortran DDT containing gas concentrations for RRTMGP radiation scheme - DDT - gas_concentrations - ty_gas_concs - - in - F - MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_main_run - - - lw_flux_profiles_byband_allsky - Fortran DDT containing RRTMGP 3D fluxes - DDT - fluxLW_allsky - ty_fluxes_byband - - in - F - MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_main_run - - - lw_flux_profiles_byband_clrsky - Fortran DDT containing RRTMGP 3D fluxes - DDT - fluxLW_clrsky - ty_fluxes_byband - - in - F - MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_main_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_main_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_rrtmgp_lw SCHEME_rrtmgp_lw SUBROUTINE_rrtmgp_lw_main_run - - - diff --git a/physics/rrtmgp_lw_post.F90 b/physics/rrtmgp_lw_post.F90 index 9743b5b22..797c28de5 100644 --- a/physics/rrtmgp_lw_post.F90 +++ b/physics/rrtmgp_lw_post.F90 @@ -5,7 +5,7 @@ module rrtmgp_lw_post use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp use mo_fluxes_byband, only: ty_fluxes_byband use mo_heating_rates, only: compute_heating_rate - use GFS_rrtmgp_lw, only: check_error_msg + use rrtmgp_lw, only: check_error_msg use module_radlw_parameters, only: topflw_type, sfcflw_type, proflw_type implicit none diff --git a/physics/GFS_rrtmgp_sw.F90 b/physics/rrtmgp_sw.F90 similarity index 99% rename from physics/GFS_rrtmgp_sw.F90 rename to physics/rrtmgp_sw.F90 index b0cc94e32..9b1d66a42 100644 --- a/physics/GFS_rrtmgp_sw.F90 +++ b/physics/rrtmgp_sw.F90 @@ -1,6 +1,6 @@ ! ########################################################################################### ! ########################################################################################### -module GFS_rrtmgp_sw +module rrtmgp_sw use GFS_typedefs, only: GFS_control_type use physparam, only: iovrsw, icldflg, iswcliq, isubcsw use machine, only: kind_phys @@ -39,14 +39,14 @@ module GFS_rrtmgp_sw real (kind_phys), parameter :: & s0 = 1368.22 ! Solar constant (W/m2) - ! Logical flags for optional output fields in GFS_rrtmgp_sw_run(), default=.false. + ! Logical flags for optional output fields in rrtmgp_sw_run(), default=.false. logical :: & l_AllSky_HR_byband = .false., & ! 2D [ncol,nlay] all-sky heating rates, in each band [ncol,nlay,nBandsSW]? l_ClrSky_HR = .false., & ! 2D [ncol,nlay] clear-sky heating rate? l_fluxes2D = .false., & ! 2D [ncol,nlay] radiative fluxes *Note* fluxes is a DDT w/ 4 fields. l_sfcFluxes1D = .false. ! 1D [ncol] surface fluxes *Note* fluxes is a DDT w/ 6 fields. - ! Module parameters (set during GFS_rrtmgp_sw_init()) + ! Module parameters (set during rrtmgp_sw_init()) integer :: & rrtmgp_sw_cld_phys, & ! RRTMGP cloud-physics (0-RRTMG, 1-RRTGMP(LUT), 2-RRTMGP(Pade)) nGptsSW, & ! Number of SW spectral g-points @@ -62,12 +62,12 @@ module GFS_rrtmgp_sw type(ty_gas_concs) :: & gas_concentrations - public GFS_rrtmgp_sw_init, GFS_rrtmgp_sw_run, GFS_rrtmgp_sw_finalize + public rrtmgp_sw_init, rrtmgp_sw_run, rrtmgp_sw_finalize contains ! ######################################################################################### - ! GFS_rrtmgp_sw_init + ! rrtmgp_sw_init ! ######################################################################################### -!! \section arg_table_GFS_rrtmgp_sw_init Argument Table +!! \section arg_table_rrtmgp_sw_init Argument Table !! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | !! |-----------------|-------------------------------------------------|---------------------------------------------------------------------------|-------|------|----------------------|-----------|--------|----------| !! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | @@ -80,7 +80,7 @@ module GFS_rrtmgp_sw !! | kdist_sw_cldy | K_distribution_file_for_cloudy_RRTMGP_SW_scheme | DDT containing spectral information for cloudy RRTMGP SW radiation scheme | DDT | 0 | ty_cloud_optics | | inout | F | !! ! ######################################################################################### - subroutine GFS_rrtmgp_sw_init(Model,mpicomm, mpirank, mpiroot, kdist_sw, kdist_sw_cldy, & + subroutine rrtmgp_sw_init(Model,mpicomm, mpirank, mpiroot, kdist_sw, kdist_sw_cldy, & errmsg, errflg) use netcdf #ifdef MPI @@ -723,11 +723,11 @@ subroutine GFS_rrtmgp_sw_init(Model,mpicomm, mpirank, mpiroot, kdist_sw, kdist_s pade_sizereg_extice_sw, pade_sizereg_ssaice_sw, pade_sizereg_asyice_sw)) endif - end subroutine GFS_rrtmgp_sw_init + end subroutine rrtmgp_sw_init ! ######################################################################################### ! GFS_RRTMGP_SW_RUN ! ######################################################################################### -!! \section arg_table_GFS_rrtmgp_sw_run Argument Table +!! \section arg_table_rrtmgp_sw_run Argument Table !! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | !! |-----------------|------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------|---------|------|---------------------------|-----------|--------|----------| !! | p_lay | air_pressure_at_layer_for_radiation_in_hPa | air pressure layer | hPa | 2 | real | kind_phys | in | F | @@ -789,7 +789,7 @@ end subroutine GFS_rrtmgp_sw_init !! | kdist_sw | K_distribution_file_for_RRTMGP_SW_scheme | DDT containing spectral information for RRTMGP SW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | !! | kdist_sw_cldy | K_distribution_file_for_cloudy_RRTMGP_SW_scheme | DDT containing spectral information for cloudy RRTMGP SW radiation scheme | DDT | 0 | ty_cloud_optics | | inout | F | !! - subroutine GFS_rrtmgp_sw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr_n2o, & ! IN + subroutine rrtmgp_sw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr_n2o, & ! IN vmr_ch4, vmr_o2, vmr_co, vmr_cfc11, vmr_cfc12, vmr_cfc22, vmr_ccl4, icseed, tau_aer, & ! IN ssa_aer, asy_aer, sfcalb_nir_dir, sfcalb_nir_dif, sfcalb_uvis_dir, sfcalb_uvis_dif, & ! IN dzlyr, delpin, de_lgth, cossza, solcon, nday, idxday, ncol, nlay, lprint, cldfrac, & ! IN @@ -1258,11 +1258,11 @@ subroutine GFS_rrtmgp_sw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, if (l_ClrSky_HR) then hsw0(idxday,:) = thetaTendClrSky endif - end subroutine GFS_rrtmgp_sw_run + end subroutine rrtmgp_sw_run ! ######################################################################################### ! ######################################################################################### - subroutine GFS_rrtmgp_sw_finalize() - end subroutine GFS_rrtmgp_sw_finalize + subroutine rrtmgp_sw_finalize() + end subroutine rrtmgp_sw_finalize ! ######################################################################################### ! Ancillary functions @@ -1271,11 +1271,11 @@ subroutine check_error_msg(error_msg) character(len=*), intent(in) :: error_msg if(error_msg /= "") then - print*,"ERROR(GFS_rrtmgp_sw_main.F90): " + print*,"ERROR(rrtmgp_sw_main.F90): " print*,trim(error_msg) return end if end subroutine check_error_msg ! ######################################################################################### ! ######################################################################################### -end module GFS_rrtmgp_sw +end module rrtmgp_sw diff --git a/physics/GFS_rrtmgp_sw_post.F90 b/physics/rrtmgp_sw_post.F90 similarity index 93% rename from physics/GFS_rrtmgp_sw_post.F90 rename to physics/rrtmgp_sw_post.F90 index 44508e697..d5bc2692e 100644 --- a/physics/GFS_rrtmgp_sw_post.F90 +++ b/physics/rrtmgp_sw_post.F90 @@ -1,17 +1,17 @@ -!>\file GFS_rrtmgp_sw_post +!>\file rrtmgp_sw_post !! This file contains - module GFS_rrtmgp_sw_post - contains + module rrtmgp_sw_post + contains -!>\defgroup GFS_rrtmgp_sw_post GFS RRTMGP scheme post +!>\defgroup rrtmgp_sw_post GFS RRTMGP scheme post !! @{ -!> \section arg_table_GFS_rrtmgp_sw_post_init Argument Table +!> \section arg_table_rrtmgp_sw_post_init Argument Table !! - subroutine GFS_rrtmgp_sw_post_init () - end subroutine GFS_rrtmgp_sw_post_init + subroutine rrtmgp_sw_post_init () + end subroutine rrtmgp_sw_post_init ! PGI compiler does not accept lines longer than 264 characters, remove during pre-processing #ifndef __PGI -!> \section arg_table_GFS_rrtmgp_sw_post_run Argument Table +!> \section arg_table_rrtmgp_sw_post_run Argument Table !! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | !! |----------------|------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------|----------|------|-----------------------|-----------|--------|----------| !! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | @@ -35,7 +35,7 @@ end subroutine GFS_rrtmgp_sw_post_init !! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | !! #endif - subroutine GFS_rrtmgp_sw_post_run (Model, Grid, Diag, Radtend, Coupling, & + subroutine rrtmgp_sw_post_run (Model, Grid, Diag, Radtend, Coupling, & im, ltp, nday, lm, kd, htswc, htsw0, & sfcalb1, sfcalb2, sfcalb3, sfcalb4, scmpsw, errmsg, errflg) @@ -144,11 +144,11 @@ subroutine GFS_rrtmgp_sw_post_run (Model, Grid, Diag, Radtend, Coupling, & endif ! end_if_lsswr - end subroutine GFS_rrtmgp_sw_post_run + end subroutine rrtmgp_sw_post_run -!> \section arg_table_GFS_rrtmgp_sw_post_finalize Argument Table +!> \section arg_table_rrtmgp_sw_post_finalize Argument Table !! - subroutine GFS_rrtmgp_sw_post_finalize () - end subroutine GFS_rrtmgp_sw_post_finalize + subroutine rrtmgp_sw_post_finalize () + end subroutine rrtmgp_sw_post_finalize !! @} - end module GFS_rrtmgp_sw_post + end module rrtmgp_sw_post diff --git a/physics/rrtmgp_sw_pre.F90 b/physics/rrtmgp_sw_pre.F90 new file mode 100644 index 000000000..ba9b1d054 --- /dev/null +++ b/physics/rrtmgp_sw_pre.F90 @@ -0,0 +1,118 @@ +!>\file rrtmgp_sw_pre.f90 +!! This file contains a subroutine to module_radiation_surface::setalb() to +!! setup surface albedo for SW radiation. + module rrtmgp_sw_pre + contains + +!>\defgroup rrtmgp_sw_pre GFS RRTMGP scheme Pre +!! @{ +!> \section arg_table_rrtmgp_sw_pre_init Argument Table +!! + subroutine rrtmgp_sw_pre_init () + end subroutine rrtmgp_sw_pre_init + +!> \section arg_table_rrtmgp_sw_pre_run Argument Table +!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | +!! |----------------|-------------------------------------------|--------------------------------------------------------------------|----------|------|------------------|-----------|--------|----------| +!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | +!! | Grid | GFS_grid_type_instance | Fortran DDT containing FV3-GFS grid and interpolation related data | DDT | 0 | GFS_grid_type | | in | F | +!! | Sfcprop | GFS_sfcprop_type_instance | Fortran DDT containing FV3-GFS surface fields | DDT | 0 | GFS_sfcprop_type | | in | F | +!! | Radtend | GFS_radtend_type_instance | Fortran DDT containing FV3-GFS radiation tendencies | DDT | 0 | GFS_radtend_type | | inout | F | +!! | im | horizontal_loop_extent | horizontal loop extent | count | 0 | integer | | in | F | +!! | nday | daytime_points_dimension | daytime points dimension | count | 0 | integer | | out | F | +!! | idxday | daytime_points | daytime points | index | 1 | integer | | out | F | +!! | tsfg | surface_ground_temperature_for_radiation | surface ground temperature for radiation | K | 1 | real | kind_phys | in | F | +!! | tsfa | surface_air_temperature_for_radiation | lowest model layer air temperature for radiation | K | 1 | real | kind_phys | in | F | +!! | sfcalb1 | surface_albedo_due_to_near_IR_direct | surface albedo due to near IR direct beam | frac | 1 | real | kind_phys | out | F | +!! | sfcalb2 | surface_albedo_due_to_near_IR_diffused | surface albedo due to near IR diffused beam | frac | 1 | real | kind_phys | out | F | +!! | sfcalb3 | surface_albedo_due_to_UV_and_VIS_direct | surface albedo due to UV+VIS direct beam | frac | 1 | real | kind_phys | out | F | +!! | sfcalb4 | surface_albedo_due_to_UV_and_VIS_diffused | surface albedo due to UV+VIS diffused beam | frac | 1 | real | kind_phys | out | F | +!! | alb1d | surface_albedo_perturbation | surface albedo perturbation | frac | 1 | real | kind_phys | in | F | +!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | +!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! + subroutine rrtmgp_sw_pre_run (Model, Grid, Sfcprop, Radtend, im, & + nday, idxday, tsfg, tsfa, sfcalb1, sfcalb2, sfcalb3, sfcalb4, & + alb1d, errmsg, errflg) + + use machine, only: kind_phys + + use GFS_typedefs, only: GFS_control_type, & + GFS_grid_type, & + GFS_radtend_type, & + GFS_sfcprop_type + use module_radiation_surface, only: NF_ALBD, setalb + + implicit none + + type(GFS_control_type), intent(in) :: Model + type(GFS_radtend_type), intent(inout) :: Radtend + type(GFS_sfcprop_type), intent(in) :: Sfcprop + type(GFS_grid_type), intent(in) :: Grid + integer, intent(in) :: im + integer, intent(out) :: nday + integer, dimension(size(Grid%xlon,1)), intent(out) :: idxday + real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(in) :: tsfa, tsfg + real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(out) :: sfcalb1, sfcalb2, sfcalb3, sfcalb4 + real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(in) :: alb1d + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + ! Local variables + integer :: i + real(kind=kind_phys), dimension(size(Grid%xlon,1),NF_ALBD) :: sfcalb + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + +! --- ... start radiation calculations +! remember to set heating rate unit to k/sec! +!> -# Start SW radiation calculations + if (Model%lsswr) then + +!> - Check for daytime points for SW radiation. + nday = 0 + idxday = 0 + do i = 1, IM + if (Radtend%coszen(i) >= 0.0001) then + nday = nday + 1 + idxday(nday) = i + endif + enddo + +!> - Call module_radiation_surface::setalb() to setup surface albedo. +!! for SW radiation. + + call setalb (Sfcprop%slmsk, Sfcprop%snowd, Sfcprop%sncovr,& ! --- inputs: + Sfcprop%snoalb, Sfcprop%zorl, Radtend%coszen,& + tsfg, tsfa, Sfcprop%hprim, Sfcprop%alvsf, & + Sfcprop%alnsf, Sfcprop%alvwf, Sfcprop%alnwf, & + Sfcprop%facsf, Sfcprop%facwf, Sfcprop%fice, & + Sfcprop%tisfc, IM, & + alb1d, Model%pertalb, & ! mg, sfc-perts + sfcalb) ! --- outputs + +!> -# Approximate mean surface albedo from vis- and nir- diffuse values. + Radtend%sfalb(:) = max(0.01, 0.5 * (sfcalb(:,2) + sfcalb(:,4))) + else + nday = 0 + idxday = 0 + sfcalb = 0.0 + endif + + do i = 1, im + sfcalb1(i) = sfcalb(i,1) + sfcalb2(i) = sfcalb(i,2) + sfcalb3(i) = sfcalb(i,3) + sfcalb4(i) = sfcalb(i,4) + enddo + + end subroutine rrtmgp_sw_pre_run + +!> \section arg_table_rrtmgp_sw_pre_finalize Argument Table +!! + subroutine rrtmgp_sw_pre_finalize () + end subroutine rrtmgp_sw_pre_finalize + +!! @} + end module rrtmgp_sw_pre From 9157959def8d8e4a5263a04361646bb746740c2d Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Thu, 16 May 2019 17:29:33 -0600 Subject: [PATCH 024/167] Move computation of RRTMGP cloud optics to suite level, only for LW. --- physics/GFS_rrtmgp_pre.F90 | 273 +++++++++++---- physics/rrtmgp_lw_pre.F90 | 680 ++++++++++++++++++++++++++++++++++++- 2 files changed, 875 insertions(+), 78 deletions(-) diff --git a/physics/GFS_rrtmgp_pre.F90 b/physics/GFS_rrtmgp_pre.F90 index 6bfd47ee8..428d72337 100644 --- a/physics/GFS_rrtmgp_pre.F90 +++ b/physics/GFS_rrtmgp_pre.F90 @@ -1,8 +1,16 @@ !> \file GFS_rrtmgp_pre.f90 !! This file contains module GFS_rrtmgp_pre + use machine, only: kind_phys - public GFS_rrtmgp_pre_run + real(kind_phys), parameter :: & + amd = 28.9644_kind_phys, & ! Molecular weight of dry-air (g/mol) + amw = 18.0154_kind_phys, & ! Molecular weight of water vapor (g/mol) + amo3 = 47.9982_kind_phys, & ! Modelular weight of ozone (g/mol) + amdw = amd/amw, & ! Molecular weight of dry air / water vapor + amdo3 = amd/amo3 ! Molecular weight of dry air / ozone + + public GFS_rrtmgp_pre_run,GFS_rrtmgp_pre_init,GFS_rrtmgp_pre_finalize contains @@ -15,82 +23,88 @@ subroutine GFS_rrtmgp_pre_init () end subroutine GFS_rrtmgp_pre_init !> \section arg_table_GFS_rrtmgp_pre_run Argument Table -!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | -!! |-------------------|---------------------------------------------------------------|-------------------------------------------------------------------------------|----------|------|------------------|-----------|--------|----------| -!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | -!! | Grid | GFS_grid_type_instance | Fortran DDT containing FV3-GFS grid and interpolation related data | DDT | 0 | GFS_grid_type | | in | F | -!! | Sfcprop | GFS_sfcprop_type_instance | Fortran DDT containing FV3-GFS surface fields | DDT | 0 | GFS_sfcprop_type | | in | F | -!! | Statein | GFS_statein_type_instance | Fortran DDT containing FV3-GFS prognostic state data in from dycore | DDT | 0 | GFS_statein_type | | in | F | -!! | Tbd | GFS_tbd_type_instance | Fortran DDT containing FV3-GFS data not yet assigned to a defined container | DDT | 0 | GFS_tbd_type | | in | F | -!! | Cldprop | GFS_cldprop_type_instance | Fortran DDT containing FV3-GFS cloud fields needed by radiation from physics | DDT | 0 | GFS_cldprop_type | | in | F | -!! | Coupling | GFS_coupling_type_instance | Fortran DDT containing FV3-GFS fields needed for coupling | DDT | 0 | GFS_coupling_type| | in | F | -!! | Radtend | GFS_radtend_type_instance | Fortran DDT containing FV3-GFS radiation tendencies | DDT | 0 | GFS_radtend_type | | inout | F | -!! | lm | vertical_layer_dimension_for_radiation | number of vertical layers for radiation calculation | count | 0 | integer | | in | F | -!! | im | horizontal_loop_extent | horizontal loop extent | count | 0 | integer | | in | F | -!! | lmk | adjusted_vertical_layer_dimension_for_radiation | number of vertical layers for radiation | count | 0 | integer | | in | F | -!! | lmp | adjusted_vertical_level_dimension_for_radiation | number of vertical levels for radiation | count | 0 | integer | | in | F | -!! | kd | vertical_index_difference_between_inout_and_local | vertical index difference between in/out and local | index | 0 | integer | | out | F | -!! | kt | vertical_index_difference_between_layer_and_upper_bound | vertical index difference between layer and upper bound | index | 0 | integer | | out | F | -!! | kb | vertical_index_difference_between_layer_and_lower_bound | vertical index difference between layer and lower bound | index | 0 | integer | | out | F | -!! | raddt | time_step_for_radiation | radiation time step | s | 0 | real | kind_phys | out | F | -!! | delp | layer_pressure_thickness_for_radiation | layer pressure thickness on radiation levels | hPa | 2 | real | kind_phys | out | F | -!! | dz | layer_thickness_for_radiation | layer thickness on radiation levels | km | 2 | real | kind_phys | out | F | -!! | plvl | air_pressure_at_interface_for_radiation_in_hPa | air pressure at vertical interface for radiation calculation | hPa | 2 | real | kind_phys | out | F | -!! | plyr | air_pressure_at_layer_for_radiation_in_hPa | air pressure at vertical layer for radiation calculation | hPa | 2 | real | kind_phys | out | F | -!! | tlvl | air_temperature_at_interface_for_radiation | air temperature at vertical interface for radiation calculation | K | 2 | real | kind_phys | out | F | -!! | tlyr | air_temperature_at_layer_for_radiation | air temperature at vertical layer for radiation calculation | K | 2 | real | kind_phys | out | F | -!! | tsfg | surface_ground_temperature_for_radiation | surface ground temperature for radiation | K | 1 | real | kind_phys | out | F | -!! | tsfa | surface_air_temperature_for_radiation | lowest model layer air temperature for radiation | K | 1 | real | kind_phys | out | F | -!! | qlyr | water_vapor_specific_humidity_at_layer_for_radiation | water vapor specific humidity at vertical layer for radiation calculation | kg kg-1 | 2 | real | kind_phys | out | F | -!! | olyr | ozone_concentration_at_layer_for_radiation | ozone concentration | kg kg-1 | 2 | real | kind_phys | out | F | -!! | gasvmr_co2 | volume_mixing_ratio_co2 | CO2 volume mixing ratio | kg kg-1 | 2 | real | kind_phys | out | F | -!! | gasvmr_n2o | volume_mixing_ratio_n2o | N2O volume mixing ratio | kg kg-1 | 2 | real | kind_phys | out | F | -!! | gasvmr_ch4 | volume_mixing_ratio_ch4 | CH4 volume mixing ratio | kg kg-1 | 2 | real | kind_phys | out | F | -!! | gasvmr_o2 | volume_mixing_ratio_o2 | O2 volume mixing ratio | kg kg-1 | 2 | real | kind_phys | out | F | -!! | gasvmr_co | volume_mixing_ratio_co | CO volume mixing ratio | kg kg-1 | 2 | real | kind_phys | out | F | -!! | gasvmr_cfc11 | volume_mixing_ratio_cfc11 | CFC11 volume mixing ratio | kg kg-1 | 2 | real | kind_phys | out | F | -!! | gasvmr_cfc12 | volume_mixing_ratio_cfc12 | CFC12 volume mixing ratio | kg kg-1 | 2 | real | kind_phys | out | F | -!! | gasvmr_cfc22 | volume_mixing_ratio_cfc22 | CFC22 volume mixing ratio | kg kg-1 | 2 | real | kind_phys | out | F | -!! | gasvmr_ccl4 | volume_mixing_ratio_ccl4 | CCL4 volume mixing ratio | kg kg-1 | 2 | real | kind_phys | out | F | -!! | gasvmr_cfc113 | volume_mixing_ratio_cfc113 | CFC113 volume mixing ratio | kg kg-1 | 2 | real | kind_phys | out | F | -!! | faersw1 | aerosol_optical_depth_for_shortwave_bands_01-16 | aerosol optical depth for shortwave bands 01-16 | none | 3 | real | kind_phys | out | F | -!! | faersw2 | aerosol_single_scattering_albedo_for_shortwave_bands_01-16 | aerosol single scattering albedo for shortwave bands 01-16 | frac | 3 | real | kind_phys | out | F | -!! | faersw3 | aerosol_asymmetry_parameter_for_shortwave_bands_01-16 | aerosol asymmetry parameter for shortwave bands 01-16 | none | 3 | real | kind_phys | out | F | -!! | faerlw1 | aerosol_optical_depth_for_longwave_bands_01-16 | aerosol optical depth for longwave bands 01-16 | none | 3 | real | kind_phys | out | F | -!! | faerlw2 | aerosol_single_scattering_albedo_for_longwave_bands_01-16 | aerosol single scattering albedo for longwave bands 01-16 | frac | 3 | real | kind_phys | out | F | -!! | faerlw3 | aerosol_asymmetry_parameter_for_longwave_bands_01-16 | aerosol asymmetry parameter for longwave bands 01-16 | none | 3 | real | kind_phys | out | F | -!! | aerodp | atmosphere_optical_thickness_due_to_ambient_aerosol_particles | vertical integrated optical depth for various aerosol species | none | 2 | real | kind_phys | out | F | -!! | clouds1 | total_cloud_fraction | layer total cloud fraction | frac | 2 | real | kind_phys | out | F | -!! | clouds2 | cloud_liquid_water_path | layer cloud liquid water path | g m-2 | 2 | real | kind_phys | out | F | -!! | clouds3 | mean_effective_radius_for_liquid_cloud | mean effective radius for liquid cloud | micron | 2 | real | kind_phys | out | F | -!! | clouds4 | cloud_ice_water_path | layer cloud ice water path | g m-2 | 2 | real | kind_phys | out | F | -!! | clouds5 | mean_effective_radius_for_ice_cloud | mean effective radius for ice cloud | micron | 2 | real | kind_phys | out | F | -!! | clouds6 | cloud_rain_water_path | cloud rain water path | g m-2 | 2 | real | kind_phys | out | F | -!! | clouds7 | mean_effective_radius_for_rain_drop | mean effective radius for rain drop | micron | 2 | real | kind_phys | out | F | -!! | clouds8 | cloud_snow_water_path | cloud snow water path | g m-2 | 2 | real | kind_phys | out | F | -!! | clouds9 | mean_effective_radius_for_snow_flake | mean effective radius for snow flake | micron | 2 | real | kind_phys | out | F | -!! | cldsa | cloud_area_fraction_for_radiation | fraction of clouds for low, middle,high, total and BL | frac | 2 | real | kind_phys | out | F | -!! | mtopa | model_layer_number_at_cloud_top | vertical indices for low, middle and high cloud tops | index | 2 | integer | | out | F | -!! | mbota | model_layer_number_at_cloud_base | vertical indices for low, middle and high cloud bases | index | 2 | integer | | out | F | -!! | de_lgth | cloud_decorrelation_length | cloud decorrelation length | km | 1 | real | kind_phys | out | F | -!! | alb1d | surface_albedo_perturbation | surface albedo perturbation | frac | 1 | real | kind_phys | out | F | -!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | -!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | -!! | kdist_lw | K_distribution_file_for_RRTMGP_LW_scheme | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | -!! | kdist_sw | K_distribution_file_for_RRTMGP_SW_scheme | DDT containing spectral information for RRTMGP SW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | +!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | +!! |-----------------------|---------------------------------------------------------------|-------------------------------------------------------------------------------|----------|------|------------------|-----------|--------|----------| +!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | +!! | Grid | GFS_grid_type_instance | Fortran DDT containing FV3-GFS grid and interpolation related data | DDT | 0 | GFS_grid_type | | in | F | +!! | Sfcprop | GFS_sfcprop_type_instance | Fortran DDT containing FV3-GFS surface fields | DDT | 0 | GFS_sfcprop_type | | in | F | +!! | Statein | GFS_statein_type_instance | Fortran DDT containing FV3-GFS prognostic state data in from dycore | DDT | 0 | GFS_statein_type | | in | F | +!! | Tbd | GFS_tbd_type_instance | Fortran DDT containing FV3-GFS data not yet assigned to a defined container | DDT | 0 | GFS_tbd_type | | in | F | +!! | Cldprop | GFS_cldprop_type_instance | Fortran DDT containing FV3-GFS cloud fields needed by radiation from physics | DDT | 0 | GFS_cldprop_type | | in | F | +!! | Coupling | GFS_coupling_type_instance | Fortran DDT containing FV3-GFS fields needed for coupling | DDT | 0 | GFS_coupling_type| | in | F | +!! | Radtend | GFS_radtend_type_instance | Fortran DDT containing FV3-GFS radiation tendencies | DDT | 0 | GFS_radtend_type | | inout | F | +!! | lm | vertical_layer_dimension_for_radiation | number of vertical layers for radiation calculation | count | 0 | integer | | in | F | +!! | im | horizontal_loop_extent | horizontal loop extent | count | 0 | integer | | in | F | +!! | lmk | adjusted_vertical_layer_dimension_for_radiation | number of vertical layers for radiation | count | 0 | integer | | in | F | +!! | lmp | adjusted_vertical_level_dimension_for_radiation | number of vertical levels for radiation | count | 0 | integer | | in | F | +!! | kd | vertical_index_difference_between_inout_and_local | vertical index difference between in/out and local | index | 0 | integer | | out | F | +!! | kt | vertical_index_difference_between_layer_and_upper_bound | vertical index difference between layer and upper bound | index | 0 | integer | | out | F | +!! | kb | vertical_index_difference_between_layer_and_lower_bound | vertical index difference between layer and lower bound | index | 0 | integer | | out | F | +!! | raddt | time_step_for_radiation | radiation time step | s | 0 | real | kind_phys | out | F | +!! | delp | layer_pressure_thickness_for_radiation | layer pressure thickness on radiation levels | hPa | 2 | real | kind_phys | out | F | +!! | dz | layer_thickness_for_radiation | layer thickness on radiation levels | km | 2 | real | kind_phys | out | F | +!! | plvl | air_pressure_at_interface_for_radiation_in_hPa | air pressure at vertical interface for radiation calculation | hPa | 2 | real | kind_phys | out | F | +!! | plyr | air_pressure_at_layer_for_radiation_in_hPa | air pressure at vertical layer for radiation calculation | hPa | 2 | real | kind_phys | out | F | +!! | tlvl | air_temperature_at_interface_for_radiation | air temperature at vertical interface for radiation calculation | K | 2 | real | kind_phys | out | F | +!! | tlyr | air_temperature_at_layer_for_radiation | air temperature at vertical layer for radiation calculation | K | 2 | real | kind_phys | out | F | +!! | tsfg | surface_ground_temperature_for_radiation | surface ground temperature for radiation | K | 1 | real | kind_phys | out | F | +!! | tsfa | surface_air_temperature_for_radiation | lowest model layer air temperature for radiation | K | 1 | real | kind_phys | out | F | +!! | qlyr | water_vapor_specific_humidity_at_layer_for_radiation | water vapor specific humidity at vertical layer for radiation calculation | kg kg-1 | 2 | real | kind_phys | out | F | +!! | olyr | ozone_concentration_at_layer_for_radiation | ozone concentration | kg kg-1 | 2 | real | kind_phys | out | F | +!! | icseed | seed_random_numbers_lw | seed for random number generation for longwave radiation | none | 1 | integer | | in | F | +!! | gasvmr_co2 | volume_mixing_ratio_co2 | CO2 volume mixing ratio | kg kg-1 | 2 | real | kind_phys | out | F | +!! | gasvmr_n2o | volume_mixing_ratio_n2o | N2O volume mixing ratio | kg kg-1 | 2 | real | kind_phys | out | F | +!! | gasvmr_ch4 | volume_mixing_ratio_ch4 | CH4 volume mixing ratio | kg kg-1 | 2 | real | kind_phys | out | F | +!! | gasvmr_o2 | volume_mixing_ratio_o2 | O2 volume mixing ratio | kg kg-1 | 2 | real | kind_phys | out | F | +!! | gasvmr_co | volume_mixing_ratio_co | CO volume mixing ratio | kg kg-1 | 2 | real | kind_phys | out | F | +!! | gasvmr_cfc11 | volume_mixing_ratio_cfc11 | CFC11 volume mixing ratio | kg kg-1 | 2 | real | kind_phys | out | F | +!! | gasvmr_cfc12 | volume_mixing_ratio_cfc12 | CFC12 volume mixing ratio | kg kg-1 | 2 | real | kind_phys | out | F | +!! | gasvmr_cfc22 | volume_mixing_ratio_cfc22 | CFC22 volume mixing ratio | kg kg-1 | 2 | real | kind_phys | out | F | +!! | gasvmr_ccl4 | volume_mixing_ratio_ccl4 | CCL4 volume mixing ratio | kg kg-1 | 2 | real | kind_phys | out | F | +!! | gasvmr_cfc113 | volume_mixing_ratio_cfc113 | CFC113 volume mixing ratio | kg kg-1 | 2 | real | kind_phys | out | F | +!! | faersw1 | aerosol_optical_depth_for_shortwave_bands_01-16 | aerosol optical depth for shortwave bands 01-16 | none | 3 | real | kind_phys | out | F | +!! | faersw2 | aerosol_single_scattering_albedo_for_shortwave_bands_01-16 | aerosol single scattering albedo for shortwave bands 01-16 | frac | 3 | real | kind_phys | out | F | +!! | faersw3 | aerosol_asymmetry_parameter_for_shortwave_bands_01-16 | aerosol asymmetry parameter for shortwave bands 01-16 | none | 3 | real | kind_phys | out | F | +!! | faerlw1 | aerosol_optical_depth_for_longwave_bands_01-16 | aerosol optical depth for longwave bands 01-16 | none | 3 | real | kind_phys | out | F | +!! | faerlw2 | aerosol_single_scattering_albedo_for_longwave_bands_01-16 | aerosol single scattering albedo for longwave bands 01-16 | frac | 3 | real | kind_phys | out | F | +!! | faerlw3 | aerosol_asymmetry_parameter_for_longwave_bands_01-16 | aerosol asymmetry parameter for longwave bands 01-16 | none | 3 | real | kind_phys | out | F | +!! | aerodp | atmosphere_optical_thickness_due_to_ambient_aerosol_particles | vertical integrated optical depth for various aerosol species | none | 2 | real | kind_phys | out | F | +!! | clouds1 | total_cloud_fraction | layer total cloud fraction | frac | 2 | real | kind_phys | out | F | +!! | clouds2 | cloud_liquid_water_path | layer cloud liquid water path | g m-2 | 2 | real | kind_phys | out | F | +!! | clouds3 | mean_effective_radius_for_liquid_cloud | mean effective radius for liquid cloud | micron | 2 | real | kind_phys | out | F | +!! | clouds4 | cloud_ice_water_path | layer cloud ice water path | g m-2 | 2 | real | kind_phys | out | F | +!! | clouds5 | mean_effective_radius_for_ice_cloud | mean effective radius for ice cloud | micron | 2 | real | kind_phys | out | F | +!! | clouds6 | cloud_rain_water_path | cloud rain water path | g m-2 | 2 | real | kind_phys | out | F | +!! | clouds7 | mean_effective_radius_for_rain_drop | mean effective radius for rain drop | micron | 2 | real | kind_phys | out | F | +!! | clouds8 | cloud_snow_water_path | cloud snow water path | g m-2 | 2 | real | kind_phys | out | F | +!! | clouds9 | mean_effective_radius_for_snow_flake | mean effective radius for snow flake | micron | 2 | real | kind_phys | out | F | +!! | cldsa | cloud_area_fraction_for_radiation | fraction of clouds for low, middle,high, total and BL | frac | 2 | real | kind_phys | out | F | +!! | mtopa | model_layer_number_at_cloud_top | vertical indices for low, middle and high cloud tops | index | 2 | integer | | out | F | +!! | mbota | model_layer_number_at_cloud_base | vertical indices for low, middle and high cloud bases | index | 2 | integer | | out | F | +!! | de_lgth | cloud_decorrelation_length | cloud decorrelation length | km | 1 | real | kind_phys | out | F | +!! | alb1d | surface_albedo_perturbation | surface albedo perturbation | frac | 1 | real | kind_phys | out | F | +!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | +!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! | kdist_lw | K_distribution_file_for_RRTMGP_LW_scheme | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | +!! | kdist_sw | K_distribution_file_for_RRTMGP_SW_scheme | DDT containing spectral information for RRTMGP SW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | +!! | kdist_cldy_lw | K_distribution_file_for_cloudy_RRTMGP_LW_scheme | DDT containing spectral information for cloudy RRTMGP LW radiation scheme | DDT | 0 | ty_cloud_optics | | in | F | +!! | kdist_cldy_sw | K_distribution_file_for_cloudy_RRTMGP_SW_scheme | DDT containing spectral information for cloudy RRTMGP SW radiation scheme | DDT | 0 | ty_cloud_optics | | in | F | +!! | optical_props_clouds | optical_properties_for_cloudy_atmosphere | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_1scl | | out | F | +!! | optical_props_aerosol | optical_properties_for_aerosols | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_1scl | | out | F | +!! | gas_concentrations | Gas_concentrations_for_RRTMGP_suite | DDT containing gas concentrations for RRTMGP radiation scheme | DDT | 0 | ty_gas_concs | | inout | F | !! ! Attention - the output arguments lm, im, lmk, lmp must not be set ! in the CCPP version - they are defined in the interstitial_create routine ! ######################################################################################### subroutine GFS_rrtmgp_pre_run (Model, Grid, Sfcprop, Statein, Tbd, Cldprop, Coupling, & ! IN Radtend, & ! INOUT - lm, im, lmk, lmp, kdist_lw, kdist_sw, & ! IN - kd, kt, kb, raddt, delp, dz, plvl, plyr, tlvl, tlyr, tsfg, tsfa, qlyr, olyr, & ! OUT + lm, im, lmk, lmp, kdist_lw, kdist_sw, kdist_cldy_lw, kdist_cldy_sw, & ! IN + kd, kt, kb, raddt, delp, dz, plvl, plyr, tlvl, tlyr, tsfg, tsfa, qlyr, olyr, icseed, & ! OUT gasvmr_co2, gasvmr_n2o, gasvmr_ch4, gasvmr_o2, gasvmr_co, gasvmr_cfc11, & ! OUT gasvmr_cfc12, gasvmr_cfc22, gasvmr_ccl4, gasvmr_cfc113, faersw1, faersw2, faersw3, & ! OUT faerlw1, faerlw2, faerlw3, aerodp, clouds1, clouds2, clouds3, clouds4, clouds5, & ! OUT clouds6, clouds7, clouds8, clouds9, cldsa, mtopa, mbota, de_lgth, alb1d, & ! OUT - errmsg, errflg) + optical_props_clouds, optical_props_aerosol, gas_concentrations, errmsg, errflg) use physparam use machine, only: & @@ -139,9 +153,20 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Sfcprop, Statein, Tbd, Cldprop, Coup progclduni ! Unified cloud-scheme use surface_perturbation, only: & cdfnor ! Routine to compute CDF (used to compute percentiles) + use rrtmgp_lw_pre, only: & + nrghice, ipsdlw0 + use rrtmgp_lw, only: check_error_msg + use mersenne_twister, only: & + random_setseed, & + random_number, & + random_stat ! RRTMGP types - use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp - + use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp + use mo_cloud_optics, only: ty_cloud_optics + use mo_optical_props, only: ty_optical_props_1scl + use mo_cloud_sampling, only: sampled_mask_max_ran, sampled_mask_exp_ran, draw_samples + use mo_gas_concentrations, only: ty_gas_concs + implicit none ! Inputs @@ -157,6 +182,16 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Sfcprop, Statein, Tbd, Cldprop, Coup type(ty_gas_optics_rrtmgp),intent(in) :: & kdist_lw, & ! RRTMGP DDT containing spectral information for LW calculation kdist_sw ! RRTMGP DDT containing spectral information for SW calculation + type(ty_cloud_optics),intent(in) :: & + kdist_cldy_lw, & + kdist_cldy_sw + type(ty_gas_concs),intent(inout) :: & + gas_concentrations + integer,intent(in),dimension(IM) :: & + icseed ! auxiliary special cloud related array when module + ! variable isubclw=2, it provides permutation seed + ! for each column profile that are used for generating + ! random numbers. when isubclw /=2, it will not be used. ! Outputs integer, intent(out) :: kd, kt, kb @@ -182,10 +217,18 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Sfcprop, Statein, Tbd, Cldprop, Coup real(kind_phys), dimension(size(Grid%xlon,1)), intent(out) :: de_lgth,alb1d character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg + type(ty_optical_props_1scl),intent(out) :: & + optical_props_clouds, & + optical_props_aerosol ! Local variables integer :: me, nfxr, ntrac, ntcw, ntiw, ncld, ntrw, ntsw, ntgl,i, j, k, k1, k2, lsk, & - lv, n, itop, ibtc, LP1, lla, llb, lya, lyb + lv, n, itop, ibtc, LP1, lla, llb, lya, lyb, iCol + integer,dimension(IM) :: ipseed + logical,dimension(IM,LMK) :: & + liqmask,icemask + real(kind_phys),dimension(IM,LMK) :: & + cld_ref_ice2,cld_ref_liq2, vmr_o3, vmr_h2o real(kind_phys) :: es, qs, delt, tem0d real(kind_phys), dimension(size(Grid%xlon,1)) :: cvt1, cvb1, tem1d, tskn real(kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP) :: htswc, htlwc, & @@ -200,6 +243,14 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Sfcprop, Statein, Tbd, Cldprop, Coup real(kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,NF_VGAS) :: gasvmr real(kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,kdist_sw%get_nband(),NF_AESW)::faersw real(kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,kdist_lw%get_nband(),NF_AELW)::faerlw + type(ty_optical_props_1scl) :: optical_props_clear, optical_props_cloudsByBand + real(kind_phys), dimension(kdist_lw%get_nband(),LMK,IM) :: & + rng3D + real(kind_phys), dimension(kdist_lw%get_nband()*LMK) :: & + rng1D + logical, dimension(IM,LMK,kdist_lw%get_nband()) :: & + cldfracMCICA + type(random_stat) :: rng_stat ! Initialize CCPP error handling variables errmsg = '' @@ -703,6 +754,88 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Sfcprop, Statein, Tbd, Cldprop, Coup endif ! mg, sfc-perts + ! ####################################################################################### + ! Compute radiative properties needed for RRTMGP + ! ####################################################################################### + + ! Change random number seed value for each radiation invocation (isubclw =1 or 2). + if(isubclw == 1) then ! advance prescribed permutation seed + do iCol = 1, IM + ipseed(iCol) = ipsdlw0 + iCol + enddo + elseif (isubclw == 2) then ! use input array of permutaion seeds + do iCol = 1, IM + ipseed(iCol) = icseed(iCol) + enddo + endif + + ! Compute volume mixing-ratios for ozone (mmr) and specific-humidity. + vmr_h2o = merge((qlyr/(1-qlyr))*amdw, 0., qlyr .ne. 1.) + vmr_o3 = merge(olyr*amdo3, 0., olyr .gt. 0.) + + ! Compute ice/liquid cloud masks, needed by rrtmgp_cloud_optics + liqmask = (clouds1 .gt. 0 .and. clouds2 .gt. 0) + icemask = (clouds1 .gt. 0 .and. clouds4 .gt. 0) + + ! RRTMGP cloud_optics expects particle size to be in a certain range. bound here + cld_ref_ice2 = clouds5 + where(cld_ref_ice2 .gt. kdist_cldy_lw%get_max_radius_ice()) cld_ref_ice2=kdist_cldy_lw%get_max_radius_ice() + where(cld_ref_ice2 .lt. kdist_cldy_lw%get_min_radius_ice()) cld_ref_ice2=kdist_cldy_lw%get_min_radius_ice() + cld_ref_liq2 = clouds5 + where(cld_ref_liq2 .gt. kdist_cldy_lw%get_max_radius_liq()) cld_ref_liq2=kdist_cldy_lw%get_max_radius_liq() + where(cld_ref_liq2 .lt. kdist_cldy_lw%get_min_radius_liq()) cld_ref_liq2=kdist_cldy_lw%get_min_radius_liq() + + ! Allocate space for gas optical properties [ncol,nlay,ngpts] + call check_error_msg(optical_props_clear%alloc_1scl( IM, LMK, kdist_lw)) + ! Cloud optics [nCol,nLay,nBands] + call check_error_msg(optical_props_cloudsByBand%init(optical_props_clear%get_band_lims_wavenumber())) + call check_error_msg(optical_props_cloudsByBand%alloc_1scl(IM, LMK)) + ! Aerosol optics [Ccol,nLay,nBands] + call check_error_msg(optical_props_aerosol%init(optical_props_clear%get_band_lims_wavenumber())) + call check_error_msg(optical_props_aerosol%alloc_1scl(IM, LMK)) + ! Cloud optics [nCol,nLay,nGpts] + call check_error_msg(optical_props_clouds%alloc_1scl(IM, LMK, kdist_lw)) + + ! Set gas concentrations + call gas_concentrations%reset() + call check_error_msg(gas_concentrations%set_vmr('o2', gasvmr_o2)) + call check_error_msg(gas_concentrations%set_vmr('co2', gasvmr_co2)) + call check_error_msg(gas_concentrations%set_vmr('ch4', gasvmr_ch4)) + call check_error_msg(gas_concentrations%set_vmr('n2o', gasvmr_n2o)) + call check_error_msg(gas_concentrations%set_vmr('h2o', vmr_h2o)) + call check_error_msg(gas_concentrations%set_vmr('o3', vmr_o3)) + + ! Copy aerosol to RRTMGP DDT + optical_props_aerosol%tau = faerlw1 * (1. - faerlw2) + + ! Compute cloud-optics for RTE. + call check_error_msg(kdist_cldy_lw%cloud_optics(IM, LMK, kdist_lw%get_nband(), nrghice, & + liqmask, icemask, clouds2, clouds4, clouds3, clouds5, optical_props_cloudsByBand)) + + ! Call McICA to generate subcolumns. + if (isubclw .gt. 0) then + + ! Call RNG. Mersennse Twister accepts 1D array, so loop over columns and collapse along G-points + ! and layers. ([nGpts,nLayer,nColumn]-> [nGpts*nLayer]*nColumn) + do iCol=1,IM + call random_setseed(ipseed(icol),rng_stat) + call random_number(rng1D,rng_stat) + rng3D(:,:,iCol) = reshape(source = rng1D,shape=[kdist_lw%get_ngpt(),LMK]) + enddo + + ! Call McICA + select case ( iovrlw ) + ! Maximumn-random + case(1) + call check_error_msg(sampled_mask_max_ran(rng3D,clouds1,cldfracMCICA)) + end select + + ! Map band optical depth to each g-point using McICA + call check_error_msg(draw_samples(cldfracMCICA,optical_props_cloudsByBand,optical_props_clouds)) + endif + + + end subroutine GFS_rrtmgp_pre_run !> \section arg_table_GFS_rrtmgp_pre_finalize Argument Table diff --git a/physics/rrtmgp_lw_pre.F90 b/physics/rrtmgp_lw_pre.F90 index c71b096b7..58a0f8df4 100644 --- a/physics/rrtmgp_lw_pre.F90 +++ b/physics/rrtmgp_lw_pre.F90 @@ -1,15 +1,680 @@ !>\file rrtmgp_lw_pre.f90 !! This file contains a call to module_radiation_surface::setemis() to !! setup surface emissivity for LW radiation. - module rrtmgp_lw_pre - contains +module rrtmgp_lw_pre + use machine, only: kind_phys + use GFS_typedefs, only: GFS_control_type + use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp + use mo_gas_concentrations, only: ty_gas_concs + use mo_cloud_optics, only: ty_cloud_optics + use mo_rte_kind, only: wl + use rrtmgp_lw, only: check_error_msg + + ! Parameters + integer,parameter :: nGases = 6 + real(kind_phys),parameter :: epsilon=1.0e-6 + character(len=3),parameter, dimension(nGases) :: & + active_gases = (/ 'h2o', 'co2', 'o3 ', 'n2o', 'ch4', 'o2 '/) + integer :: nrghice, ipsdlw0 + +contains -!>\defgroup rrtmgp_lw_pre GFS RRTMGP scheme pre -!! @{ -!> \section arg_table_rrtmgp_lw_pre_init Argument Table +!! \section arg_table_rrtmgp_lw_pre_init Argument Table +!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | +!! |--------------------|-------------------------------------------------|---------------------------------------------------------------------------|-------|------|----------------------|-----------|--------|----------| +!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | +!! | mpirank | mpi_rank | current MPI rank | index | 0 | integer | | in | F | +!! | mpiroot | mpi_root | master MPI rank | index | 0 | integer | | in | F | +!! | mpicomm | mpi_comm | MPI communicator | index | 0 | integer | | in | F | +!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | +!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! | kdist_lw | K_distribution_file_for_RRTMGP_LW_scheme | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | out | F | +!! | kdist_cldy_lw | K_distribution_file_for_cloudy_RRTMGP_LW_scheme | DDT containing spectral information for cloudy RRTMGP LW radiation scheme | DDT | 0 | ty_cloud_optics | | out | F | +!! | gas_concentrations | Gas_concentrations_for_RRTMGP_suite | DDT containing gas concentrations for RRTMGP radiation scheme | DDT | 0 | ty_gas_concs | | out | F | !! - subroutine rrtmgp_lw_pre_init () - end subroutine rrtmgp_lw_pre_init + ! ######################################################################################### + subroutine rrtmgp_lw_pre_init(Model,mpicomm, mpirank, mpiroot, kdist_lw, kdist_cldy_lw, & + gas_concentrations, errmsg, errflg) + use netcdf + +#ifdef MPI + use mpi +#endif + + ! Inputs + type(GFS_control_type), intent(in) :: & + Model ! DDT containing model control parameters + integer,intent(in) :: & + mpicomm, & ! MPI communicator + mpirank, & ! Current MPI rank + mpiroot ! Master MPI rank + type(ty_gas_optics_rrtmgp),intent(out) :: & + kdist_lw + type(ty_cloud_optics),intent(out) :: & + kdist_cldy_lw + type(ty_gas_concs),intent(out) :: & + gas_concentrations + ! Outputs + character(len=*), intent(out) :: & + errmsg ! Error message + integer, intent(out) :: & + errflg ! Error code + + ! Variables that will be passed to gas_optics%load() + integer, dimension(:), allocatable :: & + kminor_start_lower, & ! used by RRTGMP gas optics + kminor_start_upper ! used by RRTGMP gas optics + integer, dimension(:,:), allocatable :: & + band2gpt, & ! used by RRTGMP gas optics + minor_limits_gpt_lower, & ! used by RRTGMP gas optics + minor_limits_gpt_upper ! used by RRTGMP gas optics + integer, dimension(:,:,:), allocatable :: & + key_species ! used by RRTGMP gas optics + real(kind_phys) :: & + press_ref_trop, & ! used by RRTGMP gas optics + temp_ref_p, & ! used by RRTGMP gas optics + temp_ref_t, & ! used by RRTGMP gas optics + radliq_lwr, & ! used by RRTGMP cloud optics + radliq_upr, & ! used by RRTGMP cloud optics + radliq_fac, & ! used by RRTGMP cloud optics + radice_lwr, & ! used by RRTGMP cloud optics + radice_upr, & ! used by RRTGMP cloud optics + radice_fac ! used by RRTGMP cloud optics + real(kind_phys), dimension(:), allocatable :: & + press_ref, & ! used by RRTGMP gas optics + temp_ref, & ! used by RRTGMP gas optics + pade_sizereg_extliq, & ! used by RRTGMP cloud optics + pade_sizereg_ssaliq, & ! used by RRTGMP cloud optics + pade_sizereg_asyliq, & ! used by RRTGMP cloud optics + pade_sizereg_extice, & ! used by RRTGMP cloud optics + pade_sizereg_ssaice, & ! used by RRTGMP cloud optics + pade_sizereg_asyice ! used by RRTGMP cloud optics + real(kind_phys), dimension(:,:), allocatable :: & + band_lims, & ! used by RRTGMP gas optics + totplnk, & ! used by RRTGMP gas optics + lut_extliq, & ! used by RRTGMP cloud optics + lut_ssaliq, & ! used by RRTGMP cloud optics + lut_asyliq, & ! used by RRTGMP cloud optics + band_lims_cldy ! used by RRTGMP cloud optics + + real(kind_phys), dimension(:,:,:), allocatable :: & + vmr_ref, & ! used by RRTGMP gas optics + kminor_lower, & ! used by RRTGMP gas optics + kminor_upper, & ! used by RRTGMP gas optics + rayl_lower, & ! used by RRTGMP gas optics + rayl_upper, & ! used by RRTGMP gas optics + lut_extice, & ! used by RRTGMP cloud optics + lut_ssaice, & ! used by RRTGMP cloud optics + lut_asyice, & ! used by RRTGMP cloud optics + pade_extliq, & ! used by RRTGMP cloud optics + pade_ssaliq, & ! used by RRTGMP cloud optics + pade_asyliq ! used by RRTGMP cloud optics + real(kind_phys), dimension(:,:,:,:), allocatable :: & + kmajor, & ! used by RRTGMP gas optics + planck_frac, & ! used by RRTGMP gas optics + pade_extice, & ! used by RRTGMP cloud optics + pade_ssaice, & ! used by RRTGMP cloud optics + pade_asyice ! used by RRTGMP cloud optics + character(len=32), dimension(:), allocatable :: & + gas_names, & ! used by RRTGMP gas optics + gas_minor, & ! used by RRTGMP gas optics + identifier_minor, & ! used by RRTGMP gas optics + minor_gases_lower, & ! used by RRTGMP gas optics + minor_gases_upper, & ! used by RRTGMP gas optics + scaling_gas_lower, & ! used by RRTGMP gas optics + scaling_gas_upper ! used by RRTGMP gas optics + logical(wl), dimension(:), allocatable :: & + minor_scales_with_density_lower, & ! used by RRTGMP gas optics + minor_scales_with_density_upper, & ! used by RRTGMP gas optics + scale_by_complement_lower, & ! used by RRTGMP gas optics + scale_by_complement_upper ! used by RRTGMP gas optics + + ! Dimensions (to be broadcast across all processors) + integer :: & + ntemps, & ! used by RRTGMP gas optics + npress, & ! used by RRTGMP gas optics + nabsorbers, & ! used by RRTGMP gas optics + nextrabsorbers, & ! used by RRTGMP gas optics + nminorabsorbers, & ! used by RRTGMP gas optics + nmixingfracs, & ! used by RRTGMP gas optics + nlayers, & ! used by RRTGMP gas optics + nbnds, & ! used by RRTGMP gas optics + ngpts, & ! used by RRTGMP gas optics + npairs, & ! used by RRTGMP gas optics + ninternalSourcetemps, & ! used by RRTGMP gas optics + nminor_absorber_intervals_lower, & ! used by RRTGMP gas optics + nminor_absorber_intervals_upper, & ! used by RRTGMP gas optics + ncontributors_lower, & ! used by RRTGMP gas optics + ncontributors_upper, & ! used by RRTGMP gas optics + nbandLWcldy, & ! used by RRTGMP cloud optics + nsize_liq, & ! used by RRTGMP cloud optics + nsize_ice, & ! used by RRTGMP cloud optics + nsizereg, & ! used by RRTGMP cloud optics + ncoeff_ext, & ! used by RRTGMP cloud optics + ncoeff_ssa_g, & ! used by RRTGMP cloud optics + nbound, & ! used by RRTGMP cloud optics + npairsLWcldy ! used by RRTGMP cloud optics + + ! Local variables + integer :: ncid_lw,dimID,varID,status,igpt,iGas,ij,ierr,ncid_lw_clds + integer,dimension(:),allocatable :: temp1,temp2,temp3,temp4,temp_log_array1,& + temp_log_array2, temp_log_array3, temp_log_array4 + character(len=264) :: kdist_file,kdist_cldy_file + integer,parameter :: max_strlen=256 + + ! Initialize + errmsg = '' + errflg = 0 + + ! Ensure that requested cloud overlap is reasonable. + if ( iovrlw .lt. 0 .or. iovrlw .gt. 3 ) then + print *,' *** Error in specification of cloud overlap flag', & + ' IOVRLW=',iovrlw,' in RLWINIT !!' + stop + elseif ( iovrlw .ge. 2 .and. isubclw .eq. 0 ) then + print *,' *** IOVRLW=',iovrlw,' is not available for', & + ' ISUBCLW=0 setting!!' + print *,' The program uses maximum/random overlap', & + ' instead.' + iovrlw = 1 + endif + + ! Check cloud flags for consistency. + if ((icldflg .eq. 0 .and. ilwcliq .ne. 0) .or. & + (icldflg .eq. 1 .and. ilwcliq .eq. 0)) then + print *,' *** Model cloud scheme inconsistent with LW', & + ' radiation cloud radiative property setup !!' + stop + endif + + ! How are we handling cloud-optics? + rrtmgp_lw_cld_phys = Model%rrtmgp_cld_phys + + ! Filenames are set in the gfs_physics_nml (scm/src/GFS_typedefs.F90) + kdist_file = trim(Model%rrtmgp_root)//trim(Model%kdist_lw_file_gas) + kdist_cldy_file = trim(Model%rrtmgp_root)//trim(Model%kdist_lw_file_clouds) + + ! Read dimensions for k-distribution fields (only on master processor(0)) + if (mpirank .eq. mpiroot) then + if(nf90_open(trim(kdist_file), NF90_WRITE, ncid_lw) .eq. NF90_NOERR) then + status = nf90_inq_dimid(ncid_lw, 'temperature', dimid) + status = nf90_inquire_dimension(ncid_lw, dimid, len=ntemps) + status = nf90_inq_dimid(ncid_lw, 'pressure', dimid) + status = nf90_inquire_dimension(ncid_lw, dimid, len=npress) + status = nf90_inq_dimid(ncid_lw, 'absorber', dimid) + status = nf90_inquire_dimension(ncid_lw, dimid, len=nabsorbers) + status = nf90_inq_dimid(ncid_lw, 'minor_absorber', dimid) + status = nf90_inquire_dimension(ncid_lw, dimid, len=nminorabsorbers) + status = nf90_inq_dimid(ncid_lw, 'absorber_ext', dimid) + status = nf90_inquire_dimension(ncid_lw, dimid, len=nextrabsorbers) + status = nf90_inq_dimid(ncid_lw, 'mixing_fraction', dimid) + status = nf90_inquire_dimension(ncid_lw, dimid, len=nmixingfracs) + status = nf90_inq_dimid(ncid_lw, 'atmos_layer', dimid) + status = nf90_inquire_dimension(ncid_lw, dimid, len=nlayers) + status = nf90_inq_dimid(ncid_lw, 'bnd', dimid) + status = nf90_inquire_dimension(ncid_lw, dimid, len=nbnds) + status = nf90_inq_dimid(ncid_lw, 'gpt', dimid) + status = nf90_inquire_dimension(ncid_lw, dimid, len=ngpts) + status = nf90_inq_dimid(ncid_lw, 'pair', dimid) + status = nf90_inquire_dimension(ncid_lw, dimid, len=npairs) + status = nf90_inq_dimid(ncid_lw, 'contributors_lower', dimid) + status = nf90_inquire_dimension(ncid_lw, dimid, len=ncontributors_lower) + status = nf90_inq_dimid(ncid_lw, 'contributors_upper', dimid) + status = nf90_inquire_dimension(ncid_lw, dimid, len=ncontributors_upper) + status = nf90_inq_dimid(ncid_lw, 'minor_absorber_intervals_lower', dimid) + status = nf90_inquire_dimension(ncid_lw, dimid, len=nminor_absorber_intervals_lower) + status = nf90_inq_dimid(ncid_lw, 'minor_absorber_intervals_upper', dimid) + status = nf90_inquire_dimension(ncid_lw, dimid, len=nminor_absorber_intervals_upper) + status = nf90_inq_dimid(ncid_lw, 'temperature_Planck', dimid) + status = nf90_inquire_dimension(ncid_lw, dimid, len=ninternalSourcetemps) + status = nf90_close(ncid_lw) + endif + endif + + ! Broadcast dimensions to all processors +#ifdef MPI + call MPI_BCAST(ntemps, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(npress, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nminorabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nextraabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nmixingfracs, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nlayers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nbnds, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(ngpts, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(npairs, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(ncontributors_lower, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(ncontributors_upper, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nminor_absorber_intervals_lower, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nminor_absorber_intervals_upper, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(ninternalSourcetemps, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +#endif + + !if (mpirank .eq. mpiroot) then + ! Allocate space for arrays + allocate(gas_names(nabsorbers)) + allocate(scaling_gas_lower(nminor_absorber_intervals_lower)) + allocate(scaling_gas_upper(nminor_absorber_intervals_upper)) + allocate(gas_minor(nminorabsorbers)) + allocate(identifier_minor(nminorabsorbers)) + allocate(minor_gases_lower(nminor_absorber_intervals_lower)) + allocate(minor_gases_upper(nminor_absorber_intervals_upper)) + allocate(minor_limits_gpt_lower(npairs,nminor_absorber_intervals_lower)) + allocate(minor_limits_gpt_upper(npairs,nminor_absorber_intervals_upper)) + allocate(band2gpt(2,nbnds)) + allocate(key_species(2,nlayers,nbnds)) + allocate(band_lims(2,nbnds)) + allocate(press_ref(npress)) + allocate(temp_ref(ntemps)) + allocate(vmr_ref(nlayers, nextrabsorbers, ntemps)) + allocate(kminor_lower(ncontributors_lower, nmixingfracs, ntemps)) + allocate(kmajor(ngpts, nmixingfracs, npress+1, ntemps)) + allocate(kminor_start_lower(nminor_absorber_intervals_lower)) + allocate(kminor_upper(ncontributors_upper, nmixingfracs, ntemps)) + allocate(kminor_start_upper(nminor_absorber_intervals_upper)) + allocate(minor_scales_with_density_lower(nminor_absorber_intervals_lower)) + allocate(minor_scales_with_density_upper(nminor_absorber_intervals_upper)) + allocate(scale_by_complement_lower(nminor_absorber_intervals_lower)) + allocate(scale_by_complement_upper(nminor_absorber_intervals_upper)) + allocate(temp1(nminor_absorber_intervals_lower)) + allocate(temp2(nminor_absorber_intervals_upper)) + allocate(temp3(nminor_absorber_intervals_lower)) + allocate(temp4(nminor_absorber_intervals_upper)) + allocate(totplnk(ninternalSourcetemps, nbnds)) + allocate(planck_frac(ngpts, nmixingfracs, npress+1, ntemps)) + + if (mpirank .eq. mpiroot) then + ! Read in fields from file + if(nf90_open(trim(kdist_file), NF90_WRITE, ncid_lw) .eq. NF90_NOERR) then + status = nf90_inq_varid(ncid_lw,'gas_names',varID) + status = nf90_get_var(ncid_lw,varID,gas_names) + ! + status = nf90_inq_varid(ncid_lw,'scaling_gas_lower',varID) + status = nf90_get_var(ncid_lw,varID,scaling_gas_lower) + ! + status = nf90_inq_varid(ncid_lw,'scaling_gas_upper',varID) + status = nf90_get_var(ncid_lw,varID,scaling_gas_upper) + ! + status = nf90_inq_varid(ncid_lw,'gas_minor',varID) + status = nf90_get_var(ncid_lw,varID,gas_minor) + ! + status = nf90_inq_varid(ncid_lw,'identifier_minor',varID) + status = nf90_get_var(ncid_lw,varID,identifier_minor) + ! + status = nf90_inq_varid(ncid_lw,'minor_gases_lower',varID) + status = nf90_get_var(ncid_lw,varID,minor_gases_lower) + ! + status = nf90_inq_varid(ncid_lw,'minor_gases_upper',varID) + status = nf90_get_var(ncid_lw,varID,minor_gases_upper) + ! + status = nf90_inq_varid(ncid_lw,'minor_limits_gpt_lower',varID) + status = nf90_get_var(ncid_lw,varID,minor_limits_gpt_lower) + ! + status = nf90_inq_varid(ncid_lw,'minor_limits_gpt_upper',varID) + status = nf90_get_var(ncid_lw,varID,minor_limits_gpt_upper) + ! + status = nf90_inq_varid(ncid_lw,'bnd_limits_gpt',varID) + status = nf90_get_var(ncid_lw,varID,band2gpt) + ! + status = nf90_inq_varid(ncid_lw,'key_species',varID) + status = nf90_get_var(ncid_lw,varID,key_species) + ! + status = nf90_inq_varid(ncid_lw,'bnd_limits_wavenumber',varID) + status = nf90_get_var(ncid_lw,varID,band_lims) + ! + status = nf90_inq_varid(ncid_lw,'press_ref',varID) + status = nf90_get_var(ncid_lw,varID,press_ref) + ! + status = nf90_inq_varid(ncid_lw,'temp_ref',varID) + status = nf90_get_var(ncid_lw,varID,temp_ref) + ! + status = nf90_inq_varid(ncid_lw,'absorption_coefficient_ref_P',varID) + status = nf90_get_var(ncid_lw,varID,temp_ref_p) + ! + status = nf90_inq_varid(ncid_lw,'absorption_coefficient_ref_T',varID) + status = nf90_get_var(ncid_lw,varID,temp_ref_t) + ! + status = nf90_inq_varid(ncid_lw,'press_ref_trop',varID) + status = nf90_get_var(ncid_lw,varID,press_ref_trop) + ! + status = nf90_inq_varid(ncid_lw,'kminor_lower',varID) + status = nf90_get_var(ncid_lw,varID,kminor_lower) + ! + status = nf90_inq_varid(ncid_lw,'kminor_upper',varID) + status = nf90_get_var(ncid_lw,varID,kminor_upper) + ! + status = nf90_inq_varid(ncid_lw,'vmr_ref',varID) + status = nf90_get_var(ncid_lw,varID,vmr_ref) + ! + status = nf90_inq_varid(ncid_lw,'kmajor',varID) + status = nf90_get_var(ncid_lw,varID,kmajor) + ! + status = nf90_inq_varid(ncid_lw,'kminor_start_lower',varID) + status = nf90_get_var(ncid_lw,varID,kminor_start_lower) + ! + status = nf90_inq_varid(ncid_lw,'kminor_start_upper',varID) + status = nf90_get_var(ncid_lw,varID,kminor_start_upper) + ! + status = nf90_inq_varid(ncid_lw,'totplnk',varID) + status = nf90_get_var(ncid_lw,varID,totplnk) + ! + status = nf90_inq_varid(ncid_lw,'plank_fraction',varID) + status = nf90_get_var(ncid_lw,varID,planck_frac) + + ! Logical fields are read in as integers and then converted to logicals. + status = nf90_inq_varid(ncid_lw,'minor_scales_with_density_lower',varID) + status = nf90_get_var(ncid_lw,varID,temp1) + minor_scales_with_density_lower(:) = .false. + where(temp1 .eq. 1) minor_scales_with_density_lower(:) = .true. + ! + status = nf90_inq_varid(ncid_lw,'minor_scales_with_density_upper',varID) + status = nf90_get_var(ncid_lw,varID,temp2) + minor_scales_with_density_upper(:) = .false. + where(temp2 .eq. 1) minor_scales_with_density_upper(:) = .true. + ! + status = nf90_inq_varid(ncid_lw,'scale_by_complement_lower',varID) + status = nf90_get_var(ncid_lw,varID,temp3) + scale_by_complement_lower(:) = .false. + where(temp3 .eq. 1) scale_by_complement_lower(:) = .true. + ! + status = nf90_inq_varid(ncid_lw,'scale_by_complement_upper',varID) + status = nf90_get_var(ncid_lw,varID,temp4) + scale_by_complement_upper(:) = .false. + where(temp4 .eq. 1) scale_by_complement_upper(:) = .true. + + ! Close + status = nf90_close(ncid_lw) + endif + endif + + ! Broadcast arrays to all processors +#ifdef MPI + call MPI_BCAST(minor_limits_gpt_upper, size(minor_limits_gpt_upper), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(minor_limits_gpt_lower, size(minor_limits_gpt_lower), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(kminor_start_upper, size(kminor_start_upper), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(kminor_start_lower, size(kminor_start_lower), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(key_species, size(key_species), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(band2gpt, size(band2gpt), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(band_lims, size(band_lims), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(press_ref, size(press_ref), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(temp_ref, size(temp_ref), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(kminor_lower, size(kminor_lower), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(kminor_upper, size(kminor_upper), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(scaling_gas_lower, size(scaling_gas_lower), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(scaling_gas_upper, size(scaling_gas_upper), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(vmr_ref, size(vmr_ref), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(kmajor, size(kmajor), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(temp_ref_p, 1, kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(temp_ref_t, 1, kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(press_ref_trop, 1, kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(totplnk, size(totplnk), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(planck_frac, size(planck_frac), kind_phys, mpiroot, mpicomm, ierr) + ! Character arrays + do ij=1,nabsorbers + call MPI_BCAST(gas_names(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) + enddo + do ij=1,nminorabsorbers + call MPI_BCAST(gas_minor(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) + call MPI_BCAST(identifier_minor(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) + enddo + do ij=1,nminor_absorber_intervals_lower + call MPI_BCAST(minor_gases_lower(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) + enddo + do ij=1,nminor_absorber_intervals_upper + call MPI_BCAST(minor_gases_upper(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) + enddo + ! Logical arrays (First convert to integer-array, then broadcast) + ! + allocate(temp_log_array1(nminor_absorber_intervals_lower)) + where(minor_scales_with_density_lower) + temp_log_array1 = 1 + elsewhere + temp_log_array1 = 0 + end where + call MPI_BCAST(temp_log_array1, size(temp_log_array1), MPI_INTEGER, mpiroot, mpicomm, ierr) + ! + allocate(temp_log_array2(nminor_absorber_intervals_lower)) + where(scale_by_complement_lower) + temp_log_array2 = 1 + elsewhere + temp_log_array2 = 0 + end where + call MPI_BCAST(temp_log_array2, size(temp_log_array2), MPI_INTEGER, mpiroot, mpicomm, ierr) + ! + allocate(temp_log_array3(nminor_absorber_intervals_upper)) + where(minor_scales_with_density_upper) + temp_log_array3 = 1 + elsewhere + temp_log_array3 = 0 + end where + call MPI_BCAST(temp_log_array3, size(temp_log_array3), MPI_INTEGER, mpiroot, mpicomm, ierr) + ! + allocate(temp_log_array4(nminor_absorber_intervals_upper)) + where(scale_by_complement_upper) + temp_log_array4 = 1 + elsewhere + temp_log_array4 = 0 + end where + call MPI_BCAST(temp_log_array4, size(temp_log_array4), MPI_INTEGER, mpiroot, mpicomm, ierr) +#endif + + ! Initialize gas concentrations and gas optics class with data + do iGas=1,nGases + call check_error_msg(gas_concentrations%set_vmr(active_gases(iGas), 0._kind_phys)) + enddo + call check_error_msg(kdist_lw%load(gas_concentrations, gas_names, key_species, band2gpt, & + band_lims, press_ref, press_ref_trop, temp_ref, temp_ref_p, temp_ref_t, & + vmr_ref, kmajor, kminor_lower, kminor_upper, gas_minor,identifier_minor, & + minor_gases_lower, minor_gases_upper, minor_limits_gpt_lower, & + minor_limits_gpt_upper, minor_scales_with_density_lower, & + minor_scales_with_density_upper, scaling_gas_lower, & + scaling_gas_upper, scale_by_complement_lower, & + scale_by_complement_upper, kminor_start_lower, kminor_start_upper, & + totplnk, planck_frac, rayl_lower, rayl_upper)) + + ! Set initial permutation seed for McICA, initially set to number of G-points + ipsdlw0 = kdist_lw%get_ngpt() + + ! ####################################################################################### + ! If RRTMGP cloud-optics are requested, read tables and broadcast. + ! ####################################################################################### + ! Read dimensions for k-distribution fields (only on master processor(0)) + if (mpirank .eq. mpiroot) then + if(nf90_open(trim(kdist_cldy_file), NF90_WRITE, ncid_lw_clds) == NF90_NOERR) then + status = nf90_inq_dimid(ncid_lw_clds, 'nband', dimid) + status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=nbandLWcldy) + status = nf90_inq_dimid(ncid_lw_clds, 'nrghice', dimid) + status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=nrghice) + status = nf90_inq_dimid(ncid_lw_clds, 'nsize_liq', dimid) + status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=nsize_liq) + status = nf90_inq_dimid(ncid_lw_clds, 'nsize_ice', dimid) + status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=nsize_ice) + status = nf90_inq_dimid(ncid_lw_clds, 'nsizereg', dimid) + status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=nsizereg) + status = nf90_inq_dimid(ncid_lw_clds, 'ncoeff_ext', dimid) + status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=ncoeff_ext) + status = nf90_inq_dimid(ncid_lw_clds, 'ncoeff_ssa_g', dimid) + status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=ncoeff_ssa_g) + status = nf90_inq_dimid(ncid_lw_clds, 'nbound', dimid) + status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=nbound) + status = nf90_inq_dimid(ncid_lw_clds, 'pair', dimid) + status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=npairsLWcldy) + status = nf90_close(ncid_lw_clds) + endif + endif + + ! Broadcast dimensions to all processors +#ifdef MPI + if (rrtmgp_lw_cld_phys .eq. 1 .or. rrtmgp_lw_cld_phys .eq. 2) then + call MPI_BCAST(nbandLWcldy, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nrghice, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nsize_liq, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nsize_ice, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nsizereg, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(ncoeff_ext, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(ncoeff_ssa_g, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nbound, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(npairsLWcldy, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + endif +#endif + + if (rrtmgp_lw_cld_phys .eq. 1) then + allocate(lut_extliq(nsize_liq, nBandLWcldy)) + allocate(lut_ssaliq(nsize_liq, nBandLWcldy)) + allocate(lut_asyliq(nsize_liq, nBandLWcldy)) + allocate(lut_extice(nsize_ice, nBandLWcldy, nrghice)) + allocate(lut_ssaice(nsize_ice, nBandLWcldy, nrghice)) + allocate(lut_asyice(nsize_ice, nBandLWcldy, nrghice)) + allocate(band_lims_cldy(2, nBandLWcldy)) + endif + if (rrtmgp_lw_cld_phys .eq. 2) then + allocate(pade_extliq(nbandLWcldy, nsizereg, ncoeff_ext )) + allocate(pade_ssaliq(nbandLWcldy, nsizereg, ncoeff_ssa_g)) + allocate(pade_asyliq(nbandLWcldy, nsizereg, ncoeff_ssa_g)) + allocate(pade_extice(nbandLWcldy, nsizereg, ncoeff_ext, nrghice)) + allocate(pade_ssaice(nbandLWcldy, nsizereg, ncoeff_ssa_g, nrghice)) + allocate(pade_asyice(nbandLWcldy, nsizereg, ncoeff_ssa_g, nrghice)) + allocate(pade_sizereg_extliq(nbound)) + allocate(pade_sizereg_ssaliq(nbound)) + allocate(pade_sizereg_asyliq(nbound)) + allocate(pade_sizereg_extice(nbound)) + allocate(pade_sizereg_ssaice(nbound)) + allocate(pade_sizereg_asyice(nbound)) + allocate(band_lims_cldy(2,nbandLWcldy)) + endif + + ! On master processor, allocate space, read in fields, broadcast to all processors + if (mpirank .eq. mpiroot) then + ! + if (rrtmgp_lw_cld_phys .eq. 1) then + ! + if(nf90_open(trim(kdist_cldy_file), NF90_WRITE, ncid_lw_clds) == NF90_NOERR) then + status = nf90_inq_varid(ncid_lw_clds,'radliq_lwr',varID) + status = nf90_get_var(ncid_lw_clds,varID,radliq_lwr) + status = nf90_inq_varid(ncid_lw_clds,'radliq_upr',varID) + status = nf90_get_var(ncid_lw_clds,varID,radliq_upr) + status = nf90_inq_varid(ncid_lw_clds,'radliq_fac',varID) + status = nf90_get_var(ncid_lw_clds,varID,radliq_fac) + status = nf90_inq_varid(ncid_lw_clds,'radice_lwr',varID) + status = nf90_get_var(ncid_lw_clds,varID,radice_lwr) + status = nf90_inq_varid(ncid_lw_clds,'radice_upr',varID) + status = nf90_get_var(ncid_lw_clds,varID,radice_upr) + status = nf90_inq_varid(ncid_lw_clds,'radice_fac',varID) + status = nf90_get_var(ncid_lw_clds,varID,radice_fac) + status = nf90_inq_varid(ncid_lw_clds,'lut_extliq',varID) + status = nf90_get_var(ncid_lw_clds,varID,lut_extliq) + status = nf90_inq_varid(ncid_lw_clds,'lut_ssaliq',varID) + status = nf90_get_var(ncid_lw_clds,varID,lut_ssaliq) + status = nf90_inq_varid(ncid_lw_clds,'lut_asyliq',varID) + status = nf90_get_var(ncid_lw_clds,varID,lut_asyliq) + status = nf90_inq_varid(ncid_lw_clds,'lut_extice',varID) + status = nf90_get_var(ncid_lw_clds,varID,lut_extice) + status = nf90_inq_varid(ncid_lw_clds,'lut_ssaice',varID) + status = nf90_get_var(ncid_lw_clds,varID,lut_ssaice) + status = nf90_inq_varid(ncid_lw_clds,'lut_asyice',varID) + status = nf90_get_var(ncid_lw_clds,varID,lut_asyice) + status = nf90_inq_varid(ncid_lw_clds,'bnd_limits_wavenumber',varID) + status = nf90_get_var(ncid_lw_clds,varID,band_lims_cldy) + status = nf90_close(ncid_lw_clds) + endif + endif + ! + if (rrtmgp_lw_cld_phys .eq. 2) then + ! + if(nf90_open(trim(kdist_cldy_file), NF90_WRITE, ncid_lw_clds) == NF90_NOERR) then + status = nf90_inq_varid(ncid_lw_clds,'radliq_lwr',varID) + status = nf90_get_var(ncid_lw_clds,varID,radliq_lwr) + status = nf90_inq_varid(ncid_lw_clds,'radliq_upr',varID) + status = nf90_get_var(ncid_lw_clds,varID,radliq_upr) + status = nf90_inq_varid(ncid_lw_clds,'radliq_fac',varID) + status = nf90_get_var(ncid_lw_clds,varID,radliq_fac) + status = nf90_inq_varid(ncid_lw_clds,'radice_lwr',varID) + status = nf90_get_var(ncid_lw_clds,varID,radice_lwr) + status = nf90_inq_varid(ncid_lw_clds,'radice_upr',varID) + status = nf90_get_var(ncid_lw_clds,varID,radice_upr) + status = nf90_inq_varid(ncid_lw_clds,'radice_fac',varID) + status = nf90_get_var(ncid_lw_clds,varID,radice_fac) + status = nf90_inq_varid(ncid_lw_clds,'pade_extliq',varID) + status = nf90_get_var(ncid_lw_clds,varID,pade_extliq) + status = nf90_inq_varid(ncid_lw_clds,'pade_ssaliq',varID) + status = nf90_get_var(ncid_lw_clds,varID,pade_ssaliq) + status = nf90_inq_varid(ncid_lw_clds,'pade_asyliq',varID) + status = nf90_get_var(ncid_lw_clds,varID,pade_asyliq) + status = nf90_inq_varid(ncid_lw_clds,'pade_extice',varID) + status = nf90_get_var(ncid_lw_clds,varID,pade_extice) + status = nf90_inq_varid(ncid_lw_clds,'pade_ssaice',varID) + status = nf90_get_var(ncid_lw_clds,varID,pade_ssaice) + status = nf90_inq_varid(ncid_lw_clds,'pade_asyice',varID) + status = nf90_get_var(ncid_lw_clds,varID,pade_asyice) + status = nf90_inq_varid(ncid_lw_clds,'pade_sizreg_extliq',varID) + status = nf90_get_var(ncid_lw_clds,varID,pade_sizereg_extliq) + status = nf90_inq_varid(ncid_lw_clds,'pade_sizreg_ssaliq',varID) + status = nf90_get_var(ncid_lw_clds,varID,pade_sizereg_ssaliq) + status = nf90_inq_varid(ncid_lw_clds,'pade_sizreg_asyliq',varID) + status = nf90_get_var(ncid_lw_clds,varID,pade_sizereg_asyliq) + status = nf90_inq_varid(ncid_lw_clds,'pade_sizreg_extice',varID) + status = nf90_get_var(ncid_lw_clds,varID,pade_sizereg_extice) + status = nf90_inq_varid(ncid_lw_clds,'pade_sizreg_ssaice',varID) + status = nf90_get_var(ncid_lw_clds,varID,pade_sizereg_ssaice) + status = nf90_inq_varid(ncid_lw_clds,'pade_sizreg_asyice',varID) + status = nf90_get_var(ncid_lw_clds,varID,pade_sizereg_asyice) + status = nf90_inq_varid(ncid_lw_clds,'bnd_limits_wavenumber',varID) + status = nf90_get_var(ncid_lw_clds,varID,band_lims_cldy) + status = nf90_close(ncid_lw_clds) + endif + endif + endif + + ! Broadcast arrays to all processors +#ifdef MPI + if (rrtmgp_lw_cld_phys .eq. 1) then + call MPI_BCAST(radliq_lwr, size(radliq_lwr), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(radliq_upr, size(radliq_upr), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(radliq_fac, size(radliq_fac), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(radice_lwr, size(radice_lwr), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(radice_upr, size(radice_upr), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(radice_fac, size(radice_fac), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_extliq, size(lut_extliq), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_ssaliq, size(lut_ssaliq), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_asyliq, size(lut_asyliq), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_extice, size(lut_extice), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_ssaice, size(lut_ssaice), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_asyice, size(lut_asyice), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(band_lims_cldy), size(band_lims_cldy), kind_phys, mpiroot, mpicomm, ierr) + endif + if (rrtmgp_lw_cld_phys .eq. 2) then + call MPI_BCAST(pade_extliq, size(pade_extliq), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_ssaliq, size(pade_ssaliq), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_asyliq, size(pade_asyliq), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_extice, size(pade_extice), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_ssaice, size(pade_ssaice), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_asyice, size(pade_asyice), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_extliq), size(pade_sizereg_extliq), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_ssaliq), size(pade_sizereg_ssaliq), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_asyliq), size(pade_sizereg_asyliq), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_extice), size(pade_sizereg_extice), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_ssaice), size(pade_sizereg_ssaice), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_asyice), size(pade_sizereg_asyice), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(band_lims_cldy), size(band_lims_cldy), kind_phys, mpiroot, mpicomm, ierr) + endif +#endif + + ! Load tables data for RRTGMP cloud-optics + if (rrtmgp_lw_cld_phys .eq. 1) then + call check_error_msg(kdist_cldy_lw%set_ice_roughness(nrghice)) + call check_error_msg(kdist_cldy_lw%load(band_lims_cldy, radliq_lwr, radliq_upr, & + radliq_fac, radice_lwr, radice_upr, radice_fac, lut_extliq, lut_ssaliq, & + lut_asyliq, lut_extice, lut_ssaice, lut_asyice)) + endif + if (rrtmgp_lw_cld_phys .eq. 2) then + call check_error_msg(kdist_cldy_lw%set_ice_roughness(nrghice)) + call check_error_msg(kdist_cldy_lw%load(band_lims_cldy, pade_extliq, & + pade_ssaliq, pade_asyliq, pade_extice, pade_ssaice, pade_asyice, & + pade_sizereg_extliq, pade_sizereg_ssaliq, pade_sizereg_asyliq, & + pade_sizereg_extice, pade_sizereg_ssaice, pade_sizereg_asyice)) + endif + + end subroutine rrtmgp_lw_pre_init !> \section arg_table_rrtmgp_lw_pre_run Argument Table !! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | @@ -26,7 +691,6 @@ end subroutine rrtmgp_lw_pre_init !! | kdist_lw | K_distribution_file_for_RRTMGP_LW_scheme | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | !! | sfc_emiss_byband | surface_longwave_emissivity_in_each_band | surface lw emissivity in fraction in each LW band | frac | 2 | real | kind_phys | inout | F | !! - subroutine rrtmgp_lw_pre_run (Model, Grid, Sfcprop, Radtend, im, tsfg, tsfa, kdist_lw, sfc_emiss_byband, errmsg, errflg) use machine, only: kind_phys From a60e1e1fa4388e222dbc9771a20d315290ce7493 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Tue, 21 May 2019 16:23:01 -0600 Subject: [PATCH 025/167] RRTMGP DDTs working! --- physics/GFS_rrtmgp_post.F90 | 518 ++++++++++++++++--------- physics/GFS_rrtmgp_pre.F90 | 55 +-- physics/rrtmgp_lw.F90 | 729 +++++++++++++++++++++++++++++++++-- physics/rrtmgp_lw_post.F90 | 174 --------- physics/rrtmgp_lw_pre.F90 | 746 ------------------------------------ physics/rrtmgp_sw.F90 | 98 +++-- 6 files changed, 1119 insertions(+), 1201 deletions(-) delete mode 100644 physics/rrtmgp_lw_post.F90 delete mode 100644 physics/rrtmgp_lw_pre.F90 diff --git a/physics/GFS_rrtmgp_post.F90 b/physics/GFS_rrtmgp_post.F90 index 3f8d0c1d8..1d5002b93 100644 --- a/physics/GFS_rrtmgp_post.F90 +++ b/physics/GFS_rrtmgp_post.F90 @@ -1,210 +1,370 @@ !>\file GFS_rrtmgp_post.f90 !! This file contains - module GFS_rrtmgp_post - contains +module GFS_rrtmgp_post + use machine, only: kind_phys + use GFS_typedefs, only: GFS_statein_type, & + GFS_coupling_type, & + GFS_control_type, & + GFS_grid_type, & + GFS_radtend_type, & + GFS_diag_type + use module_radiation_aerosols, only: NSPC1 + use module_radsw_parameters, only: cmpfsw_type + use module_radlw_parameters, only: topflw_type, sfcflw_type, proflw_type + use module_radsw_parameters, only: topfsw_type, sfcfsw_type, profsw_type + ! RRTMGP DDT's + use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp + use mo_fluxes_byband, only: ty_fluxes_byband + use mo_heating_rates, only: compute_heating_rate + use rrtmgp_lw, only: check_error_msg + + implicit none +contains !>\defgroup GFS_rrtmgp_post GFS RRTMGP Scheme Post !! @{ !> \section arg_table_GFS_rrtmgp_post_init Argument Table !! - subroutine GFS_rrtmgp_post_init () - end subroutine GFS_rrtmgp_post_init + subroutine GFS_rrtmgp_post_init () + end subroutine GFS_rrtmgp_post_init !> \section arg_table_GFS_rrtmgp_post_run Argument Table -!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | -!! |----------------|---------------------------------------------------------------|-------------------------------------------------------------------------------|----------|------|-------------------|-----------|--------|----------| -!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | -!! | Grid | GFS_grid_type_instance | Fortran DDT containing FV3-GFS grid and interpolation related data | DDT | 0 | GFS_grid_type | | in | F | -!! | Diag | GFS_diag_type_instance | Fortran DDT containing FV3-GFS diagnotics data | DDT | 0 | GFS_diag_type | | inout | F | -!! | Radtend | GFS_radtend_type_instance | Fortran DDT containing FV3-GFS radiation tendencies | DDT | 0 | GFS_radtend_type | | in | F | -!! | Statein | GFS_statein_type_instance | Fortran DDT containing FV3-GFS prognostic state data in from dycore | DDT | 0 | GFS_statein_type | | in | F | -!! | Coupling | GFS_coupling_type_instance | Fortran DDT containing FV3-GFS fields to/from coupling with other components | DDT | 0 | GFS_coupling_type | | inout | F | -!! | scmpsw | components_of_surface_downward_shortwave_fluxes | derived type for special components of surface downward shortwave fluxes | W m-2 | 1 | cmpfsw_type | | in | F | -!! | im | horizontal_loop_extent | horizontal loop extent | count | 0 | integer | | in | F | -!! | lm | vertical_layer_dimension_for_radiation | number of vertical layers for radiation calculation | count | 0 | integer | | in | F | -!! | ltp | extra_top_layer | extra top layers | none | 0 | integer | | in | F | -!! | kt | vertical_index_difference_between_layer_and_upper_bound | vertical index difference between layer and upper bound | index | 0 | integer | | in | F | -!! | kb | vertical_index_difference_between_layer_and_lower_bound | vertical index difference between layer and lower bound | index | 0 | integer | | in | F | -!! | kd | vertical_index_difference_between_inout_and_local | vertical index difference between in/out and local | index | 0 | integer | | in | F | -!! | raddt | time_step_for_radiation | radiation time step | s | 0 | real | kind_phys | in | F | -!! | aerodp | atmosphere_optical_thickness_due_to_ambient_aerosol_particles | vertical integrated optical depth for various aerosol species | none | 2 | real | kind_phys | in | F | -!! | cldsa | cloud_area_fraction_for_radiation | fraction of clouds for low, middle, high, total and BL | frac | 2 | real | kind_phys | in | F | -!! | mtopa | model_layer_number_at_cloud_top | vertical indices for low, middle and high cloud tops | index | 2 | integer | | in | F | -!! | mbota | model_layer_number_at_cloud_base | vertical indices for low, middle and high cloud bases | index | 2 | integer | | in | F | -!! | clouds1 | total_cloud_fraction | layer total cloud fraction | frac | 2 | real | kind_phys | in | F | -!! | cldtaulw | cloud_optical_depth_layers_at_10mu_band | approx 10mu band layer cloud optical depth | none | 2 | real | kind_phys | in | F | -!! | cldtausw | cloud_optical_depth_layers_at_0.55mu_band | approx .55mu band layer cloud optical depth | none | 2 | real | kind_phys | in | F | -!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | -!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | +!! |----------------|-----------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------|----------|------|----------------------|-----------|--------|----------| +!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | +!! | Grid | GFS_grid_type_instance | Fortran DDT containing FV3-GFS grid and interpolation related data | DDT | 0 | GFS_grid_type | | in | F | +!! | Diag | GFS_diag_type_instance | Fortran DDT containing FV3-GFS diagnotics data | DDT | 0 | GFS_diag_type | | inout | F | +!! | Radtend | GFS_radtend_type_instance | Fortran DDT containing FV3-GFS radiation tendencies | DDT | 0 | GFS_radtend_type | | inout | F | +!! | Statein | GFS_statein_type_instance | Fortran DDT containing FV3-GFS prognostic state data in from dycore | DDT | 0 | GFS_statein_type | | in | F | +!! | Coupling | GFS_coupling_type_instance | Fortran DDT containing FV3-GFS fields to/from coupling with other components | DDT | 0 | GFS_coupling_type | | inout | F | +!! | scmpsw | components_of_surface_downward_shortwave_fluxes | derived type for special components of surface downward shortwave fluxes | W m-2 | 1 | cmpfsw_type | | in | F | +!! | im | horizontal_loop_extent | horizontal loop extent | count | 0 | integer | | in | F | +!! | lm | vertical_layer_dimension_for_radiation | number of vertical layers for radiation calculation | count | 0 | integer | | in | F | +!! | ltp | extra_top_layer | extra top layers | none | 0 | integer | | in | F | +!! | kt | vertical_index_difference_between_layer_and_upper_bound | vertical index difference between layer and upper bound | index | 0 | integer | | in | F | +!! | kb | vertical_index_difference_between_layer_and_lower_bound | vertical index difference between layer and lower bound | index | 0 | integer | | in | F | +!! | kd | vertical_index_difference_between_inout_and_local | vertical index difference between in/out and local | index | 0 | integer | | in | F | +!! | raddt | time_step_for_radiation | radiation time step | s | 0 | real | kind_phys | in | F | +!! | aerodp | atmosphere_optical_thickness_due_to_ambient_aerosol_particles | vertical integrated optical depth for various aerosol species | none | 2 | real | kind_phys | in | F | +!! | cldsa | cloud_area_fraction_for_radiation | fraction of clouds for low, middle, high, total and BL | frac | 2 | real | kind_phys | in | F | +!! | mtopa | model_layer_number_at_cloud_top | vertical indices for low, middle and high cloud tops | index | 2 | integer | | in | F | +!! | mbota | model_layer_number_at_cloud_base | vertical indices for low, middle and high cloud bases | index | 2 | integer | | in | F | +!! | cloud_fraction | total_cloud_fraction | layer total cloud fraction | frac | 2 | real | kind_phys | in | F | +!! | cldtaulw | cloud_optical_depth_layers_at_10mu_band | approx 10mu band layer cloud optical depth | none | 2 | real | kind_phys | in | F | +!! | cldtausw | cloud_optical_depth_layers_at_0.55mu_band | approx .55mu band layer cloud optical depth | none | 2 | real | kind_phys | in | F | +!! | tsfa | surface_air_temperature_for_radiation | lowest model layer air temperature for radiation | K | 1 | real | kind_phys | in | F | +!! | p_lev | air_pressure_at_interface_for_radiation_in_hPa | air pressure level | hPa | 2 | real | kind_phys | in | F | +!! | fluxLW_allsky | lw_flux_profiles_byband_allsky | Fortran DDT containing RRTMGP 3D fluxes | DDT | 0 | ty_fluxes_byband | | in | F | +!! | fluxLW_clrsky | lw_flux_profiles_byband_clrsky | Fortran DDT containing RRTMGP 3D fluxes | DDT | 0 | ty_fluxes_byband | | in | F | +!! | kdist_lw | K_distribution_file_for_RRTMGP_LW_scheme | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | +!! | hlwc | tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_step | longwave total sky heating rate | K s-1 | 2 | real | kind_phys | out | F | +!! | topflx | lw_fluxes_top_atmosphere | longwave total sky fluxes at the top of the atm | W m-2 | 1 | topflw_type | | inout | F | +!! | sfcflx | lw_fluxes_sfc | longwave total sky fluxes at the Earth surface | W m-2 | 1 | sfcflw_type | | inout | F | +!! | hlw0 | tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_time_step | longwave clear sky heating rate | K s-1 | 2 | real | kind_phys | inout | T | +!! | flxprf | lw_fluxes | lw fluxes total sky / csk and up / down at levels | W m-2 | 2 | proflw_type | | inout | T | +!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | +!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | !! - subroutine GFS_rrtmgp_post_run (Model, Grid, Diag, Radtend, Statein, & + subroutine GFS_rrtmgp_post_run (Model, Grid, Diag, Radtend, Statein, & Coupling, scmpsw, im, lm, ltp, kt, kb, kd, raddt, aerodp, & - cldsa, mtopa, mbota, clouds1, cldtaulw, cldtausw, & - errmsg, errflg) - - use machine, only: kind_phys - use GFS_typedefs, only: GFS_statein_type, & - GFS_coupling_type, & - GFS_control_type, & - GFS_grid_type, & - GFS_radtend_type, & - GFS_diag_type - use module_radiation_aerosols, only: NSPC1 - use module_radsw_parameters, only: cmpfsw_type - use module_radlw_parameters, only: topflw_type, sfcflw_type - use module_radsw_parameters, only: topfsw_type, sfcfsw_type - - implicit none - - ! Interface variables - type(GFS_control_type), intent(in) :: Model - type(GFS_grid_type), intent(in) :: Grid - type(GFS_statein_type), intent(in) :: Statein - type(GFS_coupling_type), intent(inout) :: Coupling - type(GFS_radtend_type), intent(in) :: Radtend - type(GFS_diag_type), intent(inout) :: Diag - type(cmpfsw_type), dimension(size(Grid%xlon,1)), intent(in) :: scmpsw - - integer, intent(in) :: im, lm, ltp, kt, kb, kd - real(kind=kind_phys), intent(in) :: raddt - - real(kind=kind_phys), dimension(size(Grid%xlon,1),NSPC1), intent(in) :: aerodp - real(kind=kind_phys), dimension(size(Grid%xlon,1),5), intent(in) :: cldsa - integer, dimension(size(Grid%xlon,1),3), intent(in) :: mbota, mtopa - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(in) :: clouds1 - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(in) :: cldtausw - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(in) :: cldtaulw - - character(len=*), intent(out) :: errmsg - integer, intent(out) :: errflg - - ! Local variables - integer :: i, j, k, k1, itop, ibtc - real(kind=kind_phys) :: tem0d, tem1, tem2 - - ! Initialize CCPP error handling variables - errmsg = '' - errflg = 0 - - if (.not. (Model%lsswr .or. Model%lslwr)) return + cldsa, mtopa, mbota, cloud_fraction, cldtaulw, cldtausw, p_lev, kdist_lw, & + tsfa, fluxLW_allsky, fluxLW_clrsky, hlwc, topflx, sfcflx, hlw0, flxprf,errmsg, errflg) -!> - For time averaged output quantities (including total-sky and -!! clear-sky SW and LW fluxes at TOA and surface; conventional -!! 3-domain cloud amount, cloud top and base pressure, and cloud top -!! temperature; aerosols AOD, etc.), store computed results in -!! corresponding slots of array fluxr with appropriate time weights. + ! Inputs + type(GFS_control_type), intent(in) :: & + Model ! Fortran DDT containing FV3-GFS model control parameters + type(GFS_grid_type), intent(in) :: & + Grid ! Fortran DDT containing FV3-GFS grid and interpolation related data + type(GFS_statein_type), intent(in) :: & + Statein ! Fortran DDT containing FV3-GFS prognostic state data in from dycore + type(GFS_coupling_type), intent(inout) :: & + Coupling ! Fortran DDT containing FV3-GFS fields to/from coupling with other components + type(GFS_radtend_type), intent(inout) :: & + Radtend ! Fortran DDT containing FV3-GFS radiation tendencies + type(GFS_diag_type), intent(inout) :: & + Diag ! Fortran DDT containing FV3-GFS diagnotics data + type(cmpfsw_type), dimension(size(Grid%xlon,1)), intent(in) :: & + scmpsw ! derived type for special components of surface downward shortwave fluxes + integer, intent(in) :: & + im, & ! Horizontal loop extent + lm, & ! Number of vertical layers for radiation calculation + ltp, & ! Extra-top-layers + kt, & ! Vertical index difference between layer and upper bound + kb, & ! Vertical index difference between layer and upper bound + kd ! Vertical index difference between in/out and local + real(kind_phys), intent(in) :: & + raddt ! Radiation time step + real(kind_phys), dimension(size(Grid%xlon,1)), intent(in) :: & + tsfa ! Lowest model layer air temperature for radiation + real(kind_phys), dimension(size(Grid%xlon,1),NSPC1), intent(in) :: & + aerodp ! Vertical integrated optical depth for various aerosol species + real(kind_phys), dimension(size(Grid%xlon,1),5), intent(in) :: & + cldsa ! Fraction of clouds for low, middle, high, total and BL + integer, dimension(size(Grid%xlon,1),3), intent(in) ::& + mbota, & ! vertical indices for low, middle and high cloud tops + mtopa ! vertical indices for low, middle and high cloud bases + real(kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(in) :: & + cloud_fraction, & ! Total cloud fraction in each layer + cldtausw, & ! approx .55mu band layer cloud optical depth + cldtaulw ! approx 10mu band layer cloud optical depth + type(ty_gas_optics_rrtmgp),intent(in) :: & + kdist_lw ! DDT containing LW spectral information + real(kind_phys), dimension(size(Grid%xlon,1), Model%levr+LTP+1), intent(in) :: & + p_lev ! Pressure @ model layer-interfaces (hPa) + type(ty_fluxes_byband),intent(in) :: & + fluxLW_allsky, & ! All-sky flux (W/m2) + fluxLW_clrsky ! Clear-sky flux (W/m2) + + ! Outputs + character(len=*), intent(out) :: & + errmsg + integer, intent(out) :: & + errflg + real(kind_phys),dimension(size(Grid%xlon,1), Model%levr+LTP),intent(out) :: & + hlwc ! All-sky heating-rate (K/sec) + type(topflw_type), dimension(size(Grid%xlon,1)), intent(inout) :: & + topflx ! radiation fluxes at top, components: + ! upfxc - total sky upward flux at top (w/m2) + ! upfx0 - clear sky upward flux at top (w/m2) + type(sfcflw_type), dimension(size(Grid%xlon,1)), intent(inout) :: & + sfcflx ! radiation fluxes at sfc, components: + ! upfxc - total sky upward flux at sfc (w/m2) + ! upfx0 - clear sky upward flux at sfc (w/m2) + ! dnfxc - total sky downward flux at sfc (w/m2) + ! dnfx0 - clear sky downward flux at sfc (w/m2) + + ! Outputs (optional) + real(kind_phys), dimension(size(Grid%xlon,1), Model%levr+LTP), optional, intent(inout) :: & + hlw0 ! Clear-sky heating rate (K/sec) + type(proflw_type), dimension(size(Grid%xlon,1), Model%levr+LTP+1), optional, intent(inout) :: & + flxprf ! 2D radiative fluxes, components: + ! upfxc - total sky upward flux (W/m2) + ! dnfxc - total sky dnward flux (W/m2) + ! upfx0 - clear sky upward flux (W/m2) + ! dnfx0 - clear sky dnward flux (W/m2) -! --- ... collect the fluxr data for wrtsfc + ! Local variables + integer :: i, j, k, k1, itop, ibtc, iBand, iSFC, iTOA + real(kind_phys) :: tem0d, tem1, tem2 + real(kind_phys), dimension(size(Grid%xlon,1), Model%levr+LTP) :: thetaTendClrSky, thetaTendAllSky + logical :: l_ClrSky_HR, l_fluxes2D, top_at_1 + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + + if (.not. (Model%lsswr .or. Model%lslwr)) return + + ! Are any optional outputs requested? + l_ClrSky_HR = present(hlw0) + l_fluxes2D = present(flxprf) - if (Model%lssav) then - if (Model%lsswr) then + ! What is vertical ordering? + top_at_1 = (p_lev(1,1) .lt. p_lev(1, Model%levr+LTP)) + if (top_at_1) then + iSFC = Model%levr+LTP+1 + iTOA = 1 + else + iSFC = 1 + iTOA = Model%levr+LTP+1 + endif + + ! ####################################################################################### + ! Compute LW heating-rates. (Note. This piece was originally in rrtmg_lw.F90:_run()) + ! ####################################################################################### + if (Model%lslwr) then + ! Clear-sky heating-rate (optional) + if (l_ClrSky_HR) then + call check_error_msg(compute_heating_rate( & + fluxLW_clrsky%flux_up, & + fluxLW_clrsky%flux_dn, & + p_lev, & + thetaTendClrSky)) + endif + ! All-sky heating-rate (mandatory) + call check_error_msg(compute_heating_rate( & + fluxLW_allsky%flux_up, & + fluxLW_allsky%flux_dn, & + p_lev, & + thetaTendAllSky)) + + ! Copy fluxes from RRTGMP types into model radiation types. + ! Mandatory outputs + topflx%upfxc = fluxLW_allsky%flux_up(:,iTOA) + topflx%upfx0 = fluxLW_clrsky%flux_up(:,iTOA) + sfcflx%upfxc = fluxLW_allsky%flux_up(:,iSFC) + sfcflx%upfx0 = fluxLW_clrsky%flux_up(:,iSFC) + sfcflx%dnfxc = fluxLW_allsky%flux_dn(:,iSFC) + sfcflx%dnfx0 = fluxLW_clrsky%flux_dn(:,iSFC) + hlwc = thetaTendAllSky + + ! Optional outputs + if(l_fluxes2D) then + flxprf%upfxc = fluxLW_allsky%flux_up + flxprf%dnfxc = fluxLW_allsky%flux_dn + flxprf%upfx0 = fluxLW_clrsky%flux_up + flxprf%dnfx0 = fluxLW_clrsky%flux_dn + endif + if (l_ClrSky_HR) then + hlw0 = thetaTendClrSky + endif + endif + + ! ####################################################################################### + ! Save LW heating-rates (Note. This piece was originally in rrtmg_lw_post.F90:_run()) + ! ####################################################################################### + if (Model%lslwr) then + !> -# Save calculation results + !> - Save surface air temp for diurnal adjustment at model t-steps + + Radtend%tsflw (:) = tsfa(:) + + do k = 1, LM + k1 = k + kd + Radtend%htrlw(1:im,k) = hlwc(1:im,k1) + enddo + ! --- repopulate the points above levr + if (lm < Model%levs) then + do k = lm,Model%levs + Radtend%htrlw (1:im,k) = Radtend%htrlw (1:im,LM) + enddo + endif + + if (Model%lwhtr) then + do k = 1, lm + k1 = k + kd + Radtend%lwhc(1:im,k) = hlw0(1:im,k1) + enddo + ! --- repopulate the points above levr + if (lm < Model%levs) then + do k = lm,Model%levs + Radtend%lwhc(1:im,k) = Radtend%lwhc(1:im,LM) + enddo + endif + endif + + ! --- radiation fluxes for other physics processes + Coupling%sfcdlw(:) = Radtend%sfcflw(:)%dnfxc + + endif ! end_if_lslwr + + !> - For time averaged output quantities (including total-sky and + !! clear-sky SW and LW fluxes at TOA and surface; conventional + !! 3-domain cloud amount, cloud top and base pressure, and cloud top + !! temperature; aerosols AOD, etc.), store computed results in + !! corresponding slots of array fluxr with appropriate time weights. + + ! --- ... collect the fluxr data for wrtsfc + + if (Model%lssav) then + if (Model%lsswr) then do i=1,im - Diag%fluxr(i,34) = Diag%fluxr(i,34) + Model%fhswr*aerodp(i,1) ! total aod at 550nm - Diag%fluxr(i,35) = Diag%fluxr(i,35) + Model%fhswr*aerodp(i,2) ! DU aod at 550nm - Diag%fluxr(i,36) = Diag%fluxr(i,36) + Model%fhswr*aerodp(i,3) ! BC aod at 550nm - Diag%fluxr(i,37) = Diag%fluxr(i,37) + Model%fhswr*aerodp(i,4) ! OC aod at 550nm - Diag%fluxr(i,38) = Diag%fluxr(i,38) + Model%fhswr*aerodp(i,5) ! SU aod at 550nm - Diag%fluxr(i,39) = Diag%fluxr(i,39) + Model%fhswr*aerodp(i,6) ! SS aod at 550nm + Diag%fluxr(i,34) = Diag%fluxr(i,34) + Model%fhswr*aerodp(i,1) ! total aod at 550nm + Diag%fluxr(i,35) = Diag%fluxr(i,35) + Model%fhswr*aerodp(i,2) ! DU aod at 550nm + Diag%fluxr(i,36) = Diag%fluxr(i,36) + Model%fhswr*aerodp(i,3) ! BC aod at 550nm + Diag%fluxr(i,37) = Diag%fluxr(i,37) + Model%fhswr*aerodp(i,4) ! OC aod at 550nm + Diag%fluxr(i,38) = Diag%fluxr(i,38) + Model%fhswr*aerodp(i,5) ! SU aod at 550nm + Diag%fluxr(i,39) = Diag%fluxr(i,39) + Model%fhswr*aerodp(i,6) ! SS aod at 550nm enddo - endif - -! --- save lw toa and sfc fluxes - if (Model%lslwr) then + endif + + ! --- save lw toa and sfc fluxes + if (Model%lslwr) then do i=1,im -! --- lw total-sky fluxes - Diag%fluxr(i,1 ) = Diag%fluxr(i,1 ) + Model%fhlwr * Diag%topflw(i)%upfxc ! total sky top lw up - Diag%fluxr(i,19) = Diag%fluxr(i,19) + Model%fhlwr * Radtend%sfcflw(i)%dnfxc ! total sky sfc lw dn - Diag%fluxr(i,20) = Diag%fluxr(i,20) + Model%fhlwr * Radtend%sfcflw(i)%upfxc ! total sky sfc lw up -! --- lw clear-sky fluxes - Diag%fluxr(i,28) = Diag%fluxr(i,28) + Model%fhlwr * Diag%topflw(i)%upfx0 ! clear sky top lw up - Diag%fluxr(i,30) = Diag%fluxr(i,30) + Model%fhlwr * Radtend%sfcflw(i)%dnfx0 ! clear sky sfc lw dn - Diag%fluxr(i,33) = Diag%fluxr(i,33) + Model%fhlwr * Radtend%sfcflw(i)%upfx0 ! clear sky sfc lw up + ! --- lw total-sky fluxes + Diag%fluxr(i,1 ) = Diag%fluxr(i,1 ) + Model%fhlwr * Diag%topflw(i)%upfxc ! total sky top lw up + Diag%fluxr(i,19) = Diag%fluxr(i,19) + Model%fhlwr * Radtend%sfcflw(i)%dnfxc ! total sky sfc lw dn + Diag%fluxr(i,20) = Diag%fluxr(i,20) + Model%fhlwr * Radtend%sfcflw(i)%upfxc ! total sky sfc lw up + ! --- lw clear-sky fluxes + Diag%fluxr(i,28) = Diag%fluxr(i,28) + Model%fhlwr * Diag%topflw(i)%upfx0 ! clear sky top lw up + Diag%fluxr(i,30) = Diag%fluxr(i,30) + Model%fhlwr * Radtend%sfcflw(i)%dnfx0 ! clear sky sfc lw dn + Diag%fluxr(i,33) = Diag%fluxr(i,33) + Model%fhlwr * Radtend%sfcflw(i)%upfx0 ! clear sky sfc lw up enddo - endif - -! --- save sw toa and sfc fluxes with proper diurnal sw wgt. coszen=mean cosz over daylight -! part of sw calling interval, while coszdg= mean cosz over entire interval - if (Model%lsswr) then + endif + + ! --- save sw toa and sfc fluxes with proper diurnal sw wgt. coszen=mean cosz over daylight + ! part of sw calling interval, while coszdg= mean cosz over entire interval + if (Model%lsswr) then do i = 1, IM - if (Radtend%coszen(i) > 0.) then -! --- sw total-sky fluxes -! ------------------- - tem0d = Model%fhswr * Radtend%coszdg(i) / Radtend%coszen(i) - Diag%fluxr(i,2 ) = Diag%fluxr(i,2) + Diag%topfsw(i)%upfxc * tem0d ! total sky top sw up - Diag%fluxr(i,3 ) = Diag%fluxr(i,3) + Radtend%sfcfsw(i)%upfxc * tem0d ! total sky sfc sw up - Diag%fluxr(i,4 ) = Diag%fluxr(i,4) + Radtend%sfcfsw(i)%dnfxc * tem0d ! total sky sfc sw dn -! --- sw uv-b fluxes -! -------------- - Diag%fluxr(i,21) = Diag%fluxr(i,21) + scmpsw(i)%uvbfc * tem0d ! total sky uv-b sw dn - Diag%fluxr(i,22) = Diag%fluxr(i,22) + scmpsw(i)%uvbf0 * tem0d ! clear sky uv-b sw dn -! --- sw toa incoming fluxes -! ---------------------- - Diag%fluxr(i,23) = Diag%fluxr(i,23) + Diag%topfsw(i)%dnfxc * tem0d ! top sw dn -! --- sw sfc flux components -! ---------------------- - Diag%fluxr(i,24) = Diag%fluxr(i,24) + scmpsw(i)%visbm * tem0d ! uv/vis beam sw dn - Diag%fluxr(i,25) = Diag%fluxr(i,25) + scmpsw(i)%visdf * tem0d ! uv/vis diff sw dn - Diag%fluxr(i,26) = Diag%fluxr(i,26) + scmpsw(i)%nirbm * tem0d ! nir beam sw dn - Diag%fluxr(i,27) = Diag%fluxr(i,27) + scmpsw(i)%nirdf * tem0d ! nir diff sw dn -! --- sw clear-sky fluxes -! ------------------- - Diag%fluxr(i,29) = Diag%fluxr(i,29) + Diag%topfsw(i)%upfx0 * tem0d ! clear sky top sw up - Diag%fluxr(i,31) = Diag%fluxr(i,31) + Radtend%sfcfsw(i)%upfx0 * tem0d ! clear sky sfc sw up - Diag%fluxr(i,32) = Diag%fluxr(i,32) + Radtend%sfcfsw(i)%dnfx0 * tem0d ! clear sky sfc sw dn - endif + if (Radtend%coszen(i) > 0.) then + ! --- sw total-sky fluxes + ! ------------------- + tem0d = Model%fhswr * Radtend%coszdg(i) / Radtend%coszen(i) + Diag%fluxr(i,2 ) = Diag%fluxr(i,2) + Diag%topfsw(i)%upfxc * tem0d ! total sky top sw up + Diag%fluxr(i,3 ) = Diag%fluxr(i,3) + Radtend%sfcfsw(i)%upfxc * tem0d ! total sky sfc sw up + Diag%fluxr(i,4 ) = Diag%fluxr(i,4) + Radtend%sfcfsw(i)%dnfxc * tem0d ! total sky sfc sw dn + ! --- sw uv-b fluxes + ! -------------- + Diag%fluxr(i,21) = Diag%fluxr(i,21) + scmpsw(i)%uvbfc * tem0d ! total sky uv-b sw dn + Diag%fluxr(i,22) = Diag%fluxr(i,22) + scmpsw(i)%uvbf0 * tem0d ! clear sky uv-b sw dn + ! --- sw toa incoming fluxes + ! ---------------------- + Diag%fluxr(i,23) = Diag%fluxr(i,23) + Diag%topfsw(i)%dnfxc * tem0d ! top sw dn + ! --- sw sfc flux components + ! ---------------------- + Diag%fluxr(i,24) = Diag%fluxr(i,24) + scmpsw(i)%visbm * tem0d ! uv/vis beam sw dn + Diag%fluxr(i,25) = Diag%fluxr(i,25) + scmpsw(i)%visdf * tem0d ! uv/vis diff sw dn + Diag%fluxr(i,26) = Diag%fluxr(i,26) + scmpsw(i)%nirbm * tem0d ! nir beam sw dn + Diag%fluxr(i,27) = Diag%fluxr(i,27) + scmpsw(i)%nirdf * tem0d ! nir diff sw dn + ! --- sw clear-sky fluxes + ! ------------------- + Diag%fluxr(i,29) = Diag%fluxr(i,29) + Diag%topfsw(i)%upfx0 * tem0d ! clear sky top sw up + Diag%fluxr(i,31) = Diag%fluxr(i,31) + Radtend%sfcfsw(i)%upfx0 * tem0d ! clear sky sfc sw up + Diag%fluxr(i,32) = Diag%fluxr(i,32) + Radtend%sfcfsw(i)%dnfx0 * tem0d ! clear sky sfc sw dn + endif enddo - endif - -! --- save total and boundary layer clouds - - if (Model%lsswr .or. Model%lslwr) then + endif + + ! --- save total and boundary layer clouds + + if (Model%lsswr .or. Model%lslwr) then do i=1,im - Diag%fluxr(i,17) = Diag%fluxr(i,17) + raddt * cldsa(i,4) - Diag%fluxr(i,18) = Diag%fluxr(i,18) + raddt * cldsa(i,5) + Diag%fluxr(i,17) = Diag%fluxr(i,17) + raddt * cldsa(i,4) + Diag%fluxr(i,18) = Diag%fluxr(i,18) + raddt * cldsa(i,5) enddo - -! --- save cld frac,toplyr,botlyr and top temp, note that the order -! of h,m,l cloud is reversed for the fluxr output. -! --- save interface pressure (pa) of top/bot - + + ! --- save cld frac,toplyr,botlyr and top temp, note that the order + ! of h,m,l cloud is reversed for the fluxr output. + ! --- save interface pressure (pa) of top/bot + do j = 1, 3 - do i = 1, IM - tem0d = raddt * cldsa(i,j) - itop = mtopa(i,j) - kd - ibtc = mbota(i,j) - kd - Diag%fluxr(i, 8-j) = Diag%fluxr(i, 8-j) + tem0d - Diag%fluxr(i,11-j) = Diag%fluxr(i,11-j) + tem0d * Statein%prsi(i,itop+kt) - Diag%fluxr(i,14-j) = Diag%fluxr(i,14-j) + tem0d * Statein%prsi(i,ibtc+kb) - Diag%fluxr(i,17-j) = Diag%fluxr(i,17-j) + tem0d * Statein%tgrs(i,itop) - -! Anning adds optical depth and emissivity output - tem1 = 0. - tem2 = 0. - do k=ibtc,itop - tem1 = tem1 + cldtausw(i,k) ! approx .55 mu channel - tem2 = tem2 + cldtaulw(i,k) ! approx 10. mu channel - enddo - Diag%fluxr(i,43-j) = Diag%fluxr(i,43-j) + tem0d * tem1 - Diag%fluxr(i,46-j) = Diag%fluxr(i,46-j) + tem0d * (1.0-exp(-tem2)) - enddo + do i = 1, IM + tem0d = raddt * cldsa(i,j) + itop = mtopa(i,j) - kd + ibtc = mbota(i,j) - kd + Diag%fluxr(i, 8-j) = Diag%fluxr(i, 8-j) + tem0d + Diag%fluxr(i,11-j) = Diag%fluxr(i,11-j) + tem0d * Statein%prsi(i,itop+kt) + Diag%fluxr(i,14-j) = Diag%fluxr(i,14-j) + tem0d * Statein%prsi(i,ibtc+kb) + Diag%fluxr(i,17-j) = Diag%fluxr(i,17-j) + tem0d * Statein%tgrs(i,itop) + + ! Anning adds optical depth and emissivity output + tem1 = 0. + tem2 = 0. + do k=ibtc,itop + tem1 = tem1 + cldtausw(i,k) ! approx .55 mu channel + tem2 = tem2 + cldtaulw(i,k) ! approx 10. mu channel + enddo + Diag%fluxr(i,43-j) = Diag%fluxr(i,43-j) + tem0d * tem1 + Diag%fluxr(i,46-j) = Diag%fluxr(i,46-j) + tem0d * (1.0-exp(-tem2)) + enddo enddo - endif - -! if (.not. Model%uni_cld) then - if (Model%lgocart .or. Model%ldiag3d) then + endif + + ! if (.not. Model%uni_cld) then + if (Model%lgocart .or. Model%ldiag3d) then do k = 1, LM - k1 = k + kd - Coupling%cldcovi(1:im,k) = clouds1(1:im,k1) + k1 = k + kd + Coupling%cldcovi(1:im,k) = cloud_fraction(1:im,k1) enddo - endif - endif ! end_if_lssav -! - end subroutine GFS_rrtmgp_post_run + endif + endif ! end_if_lssav + ! + end subroutine GFS_rrtmgp_post_run !> \section arg_table_GFS_rrtmgp_post_finalize Argument Table !! - subroutine GFS_rrtmgp_post_finalize () - end subroutine GFS_rrtmgp_post_finalize + subroutine GFS_rrtmgp_post_finalize () + end subroutine GFS_rrtmgp_post_finalize !! @} - end module GFS_rrtmgp_post +end module GFS_rrtmgp_post diff --git a/physics/GFS_rrtmgp_pre.F90 b/physics/GFS_rrtmgp_pre.F90 index 428d72337..07cc4d9de 100644 --- a/physics/GFS_rrtmgp_pre.F90 +++ b/physics/GFS_rrtmgp_pre.F90 @@ -91,7 +91,8 @@ end subroutine GFS_rrtmgp_pre_init !! | kdist_cldy_sw | K_distribution_file_for_cloudy_RRTMGP_SW_scheme | DDT containing spectral information for cloudy RRTMGP SW radiation scheme | DDT | 0 | ty_cloud_optics | | in | F | !! | optical_props_clouds | optical_properties_for_cloudy_atmosphere | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_1scl | | out | F | !! | optical_props_aerosol | optical_properties_for_aerosols | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_1scl | | out | F | -!! | gas_concentrations | Gas_concentrations_for_RRTMGP_suite | DDT containing gas concentrations for RRTMGP radiation scheme | DDT | 0 | ty_gas_concs | | inout | F | +!! | gas_concentrations | Gas_concentrations_for_RRTMGP_suite | DDT containing gas concentrations for RRTMGP radiation scheme | DDT | 0 | ty_gas_concs | | out | F | +!! | sfc_emiss_byband | surface_longwave_emissivity_in_each_band | surface lw emissivity in fraction in each LW band | frac | 2 | real | kind_phys | out | F | !! ! Attention - the output arguments lm, im, lmk, lmp must not be set ! in the CCPP version - they are defined in the interstitial_create routine @@ -104,7 +105,7 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Sfcprop, Statein, Tbd, Cldprop, Coup gasvmr_cfc12, gasvmr_cfc22, gasvmr_ccl4, gasvmr_cfc113, faersw1, faersw2, faersw3, & ! OUT faerlw1, faerlw2, faerlw3, aerodp, clouds1, clouds2, clouds3, clouds4, clouds5, & ! OUT clouds6, clouds7, clouds8, clouds9, cldsa, mtopa, mbota, de_lgth, alb1d, & ! OUT - optical_props_clouds, optical_props_aerosol, gas_concentrations, errmsg, errflg) + optical_props_clouds, optical_props_aerosol, gas_concentrations, sfc_emiss_byband, errmsg, errflg) use physparam use machine, only: & @@ -153,9 +154,9 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Sfcprop, Statein, Tbd, Cldprop, Coup progclduni ! Unified cloud-scheme use surface_perturbation, only: & cdfnor ! Routine to compute CDF (used to compute percentiles) - use rrtmgp_lw_pre, only: & - nrghice, ipsdlw0 - use rrtmgp_lw, only: check_error_msg + use module_radiation_surface, only: & + setemis ! Routine to compute surface-emissivity + use rrtmgp_lw, only: check_error_msg, nrghice, ipsdlw0 use mersenne_twister, only: & random_setseed, & random_number, & @@ -185,7 +186,7 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Sfcprop, Statein, Tbd, Cldprop, Coup type(ty_cloud_optics),intent(in) :: & kdist_cldy_lw, & kdist_cldy_sw - type(ty_gas_concs),intent(inout) :: & + type(ty_gas_concs),intent(out) :: & gas_concentrations integer,intent(in),dimension(IM) :: & icseed ! auxiliary special cloud related array when module @@ -220,14 +221,15 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Sfcprop, Statein, Tbd, Cldprop, Coup type(ty_optical_props_1scl),intent(out) :: & optical_props_clouds, & optical_props_aerosol + real(kind_phys),dimension(kdist_lw%get_nband(),Model%levr+LTP),intent(out) :: sfc_emiss_byband ! Local variables integer :: me, nfxr, ntrac, ntcw, ntiw, ncld, ntrw, ntsw, ntgl,i, j, k, k1, k2, lsk, & - lv, n, itop, ibtc, LP1, lla, llb, lya, lyb, iCol + lv, n, itop, ibtc, LP1, lla, llb, lya, lyb, iCol, iBand integer,dimension(IM) :: ipseed - logical,dimension(IM,LMK) :: & + logical,dimension(IM,Model%levr+LTP) :: & liqmask,icemask - real(kind_phys),dimension(IM,LMK) :: & + real(kind_phys),dimension(IM,Model%levr+LTP) :: & cld_ref_ice2,cld_ref_liq2, vmr_o3, vmr_h2o real(kind_phys) :: es, qs, delt, tem0d real(kind_phys), dimension(size(Grid%xlon,1)) :: cvt1, cvb1, tem1d, tskn @@ -244,11 +246,11 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Sfcprop, Statein, Tbd, Cldprop, Coup real(kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,kdist_sw%get_nband(),NF_AESW)::faersw real(kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,kdist_lw%get_nband(),NF_AELW)::faerlw type(ty_optical_props_1scl) :: optical_props_clear, optical_props_cloudsByBand - real(kind_phys), dimension(kdist_lw%get_nband(),LMK,IM) :: & + real(kind_phys), dimension(kdist_lw%get_ngpt(),Model%levr+LTP,IM) :: & rng3D - real(kind_phys), dimension(kdist_lw%get_nband()*LMK) :: & + real(kind_phys), dimension(kdist_lw%get_ngpt()*(Model%levr+LTP)) :: & rng1D - logical, dimension(IM,LMK,kdist_lw%get_nband()) :: & + logical, dimension(IM,Model%levr+LTP,kdist_lw%get_ngpt()) :: & cldfracMCICA type(random_stat) :: rng_stat @@ -307,17 +309,9 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Sfcprop, Statein, Tbd, Cldprop, Coup if ( itsfc == 0 ) then ! use same sfc skin-air/ground temp tskn(1:IM) = Sfcprop%tsfc(1:IM) tsfg(1:IM) = Sfcprop%tsfc(1:IM) -! do i = 1, IM -! tskn(i) = Sfcprop%tsfc(i) -! tsfg(i) = Sfcprop%tsfc(i) -! enddo else ! use diff sfc skin-air/ground temp tskn(1:IM) = Sfcprop%tsfc(1:IM) tsfg(1:IM) = Sfcprop%tsfc(1:IM) -! do i = 1, IM -! tskn(i) = Sfcprop%tsfc(i) -! tsfg(i) = Sfcprop%tsfc(i) -! enddo endif ! Prepare atmospheric profiles for radiation input. @@ -754,6 +748,17 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Sfcprop, Statein, Tbd, Cldprop, Coup endif ! mg, sfc-perts + ! ####################################################################################### + ! Call module_radiation_surface::setemis(),to setup surface emissivity for LW radiation. + ! ####################################################################################### + if (Model%lslwr) then + call setemis (Grid%xlon, Grid%xlat, Sfcprop%slmsk, Sfcprop%snowd, Sfcprop%sncovr, & + Sfcprop%zorl, tsfg, tsfa, Sfcprop%hprim, IM, Radtend%semis) + do iBand=1,kdist_lw%get_nband() + sfc_emiss_byband(iBand,1:IM) = Radtend%semis(1:IM) + enddo + endif + ! ####################################################################################### ! Compute radiative properties needed for RRTMGP ! ####################################################################################### @@ -786,16 +791,16 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Sfcprop, Statein, Tbd, Cldprop, Coup where(cld_ref_liq2 .lt. kdist_cldy_lw%get_min_radius_liq()) cld_ref_liq2=kdist_cldy_lw%get_min_radius_liq() ! Allocate space for gas optical properties [ncol,nlay,ngpts] - call check_error_msg(optical_props_clear%alloc_1scl( IM, LMK, kdist_lw)) ! Cloud optics [nCol,nLay,nBands] - call check_error_msg(optical_props_cloudsByBand%init(optical_props_clear%get_band_lims_wavenumber())) + print*,'In GFS_rrtmgp_pre: ' + call check_error_msg(optical_props_cloudsByBand%init(kdist_lw%get_band_lims_wavenumber())) call check_error_msg(optical_props_cloudsByBand%alloc_1scl(IM, LMK)) ! Aerosol optics [Ccol,nLay,nBands] - call check_error_msg(optical_props_aerosol%init(optical_props_clear%get_band_lims_wavenumber())) + call check_error_msg(optical_props_aerosol%init(kdist_lw%get_band_lims_wavenumber())) call check_error_msg(optical_props_aerosol%alloc_1scl(IM, LMK)) ! Cloud optics [nCol,nLay,nGpts] call check_error_msg(optical_props_clouds%alloc_1scl(IM, LMK, kdist_lw)) - + ! Set gas concentrations call gas_concentrations%reset() call check_error_msg(gas_concentrations%set_vmr('o2', gasvmr_o2)) @@ -834,8 +839,6 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Sfcprop, Statein, Tbd, Cldprop, Coup call check_error_msg(draw_samples(cldfracMCICA,optical_props_cloudsByBand,optical_props_clouds)) endif - - end subroutine GFS_rrtmgp_pre_run !> \section arg_table_GFS_rrtmgp_pre_finalize Argument Table diff --git a/physics/rrtmgp_lw.F90 b/physics/rrtmgp_lw.F90 index 6140924fe..183bc8db6 100644 --- a/physics/rrtmgp_lw.F90 +++ b/physics/rrtmgp_lw.F90 @@ -2,6 +2,8 @@ ! ########################################################################################### module rrtmgp_lw use machine, only: kind_phys + use GFS_typedefs, only: GFS_control_type + use mo_rte_kind, only: wl use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp use mo_cloud_optics, only: ty_cloud_optics use mo_optical_props, only: ty_optical_props_1scl @@ -9,36 +11,679 @@ module rrtmgp_lw use mo_gas_concentrations, only: ty_gas_concs use mo_fluxes_byband, only: ty_fluxes_byband + ! Parameters + integer,parameter :: nGases = 6 + real(kind_phys),parameter :: epsilon=1.0e-6 + character(len=3),parameter, dimension(nGases) :: & + active_gases = (/ 'h2o', 'co2', 'o3 ', 'n2o', 'ch4', 'o2 '/) + integer :: nrghice, ipsdlw0 + public rrtmgp_lw_init, rrtmgp_lw_run, rrtmgp_lw_finalize contains - subroutine rrtmgp_lw_init() +!! \section arg_table_rrtmgp_lw_init Argument Table +!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | +!! |--------------------|-------------------------------------------------|---------------------------------------------------------------------------|-------|------|----------------------|-----------|--------|----------| +!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | +!! | mpirank | mpi_rank | current MPI rank | index | 0 | integer | | in | F | +!! | mpiroot | mpi_root | master MPI rank | index | 0 | integer | | in | F | +!! | mpicomm | mpi_comm | MPI communicator | index | 0 | integer | | in | F | +!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | +!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! | kdist_lw | K_distribution_file_for_RRTMGP_LW_scheme | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | inout | F | +!! | kdist_cldy_lw | K_distribution_file_for_cloudy_RRTMGP_LW_scheme | DDT containing spectral information for cloudy RRTMGP LW radiation scheme | DDT | 0 | ty_cloud_optics | | inout | F | +!! + ! ######################################################################################### + subroutine rrtmgp_lw_init(Model, mpicomm, mpirank, mpiroot, kdist_lw, kdist_cldy_lw, & + errmsg, errflg) + use netcdf + +#ifdef MPI + use mpi +#endif + + ! Inputs + type(GFS_control_type), intent(in) :: & + Model ! DDT containing model control parameters + integer,intent(in) :: & + mpicomm, & ! MPI communicator + mpirank, & ! Current MPI rank + mpiroot ! Master MPI rank + type(ty_gas_optics_rrtmgp),intent(inout) :: & + kdist_lw + type(ty_cloud_optics),intent(inout) :: & + kdist_cldy_lw + + ! Outputs + character(len=*), intent(out) :: & + errmsg ! Error message + integer, intent(out) :: & + errflg ! Error code + + ! Variables that will be passed to gas_optics%load() + type(ty_gas_concs) :: & + gas_concentrations + integer, dimension(:), allocatable :: & + kminor_start_lower, & ! used by RRTGMP gas optics + kminor_start_upper ! used by RRTGMP gas optics + integer, dimension(:,:), allocatable :: & + band2gpt, & ! used by RRTGMP gas optics + minor_limits_gpt_lower, & ! used by RRTGMP gas optics + minor_limits_gpt_upper ! used by RRTGMP gas optics + integer, dimension(:,:,:), allocatable :: & + key_species ! used by RRTGMP gas optics + real(kind_phys) :: & + press_ref_trop, & ! used by RRTGMP gas optics + temp_ref_p, & ! used by RRTGMP gas optics + temp_ref_t, & ! used by RRTGMP gas optics + radliq_lwr, & ! used by RRTGMP cloud optics + radliq_upr, & ! used by RRTGMP cloud optics + radliq_fac, & ! used by RRTGMP cloud optics + radice_lwr, & ! used by RRTGMP cloud optics + radice_upr, & ! used by RRTGMP cloud optics + radice_fac ! used by RRTGMP cloud optics + real(kind_phys), dimension(:), allocatable :: & + press_ref, & ! used by RRTGMP gas optics + temp_ref, & ! used by RRTGMP gas optics + pade_sizereg_extliq, & ! used by RRTGMP cloud optics + pade_sizereg_ssaliq, & ! used by RRTGMP cloud optics + pade_sizereg_asyliq, & ! used by RRTGMP cloud optics + pade_sizereg_extice, & ! used by RRTGMP cloud optics + pade_sizereg_ssaice, & ! used by RRTGMP cloud optics + pade_sizereg_asyice ! used by RRTGMP cloud optics + real(kind_phys), dimension(:,:), allocatable :: & + band_lims, & ! used by RRTGMP gas optics + totplnk, & ! used by RRTGMP gas optics + lut_extliq, & ! used by RRTGMP cloud optics + lut_ssaliq, & ! used by RRTGMP cloud optics + lut_asyliq, & ! used by RRTGMP cloud optics + band_lims_cldy ! used by RRTGMP cloud optics + + real(kind_phys), dimension(:,:,:), allocatable :: & + vmr_ref, & ! used by RRTGMP gas optics + kminor_lower, & ! used by RRTGMP gas optics + kminor_upper, & ! used by RRTGMP gas optics + rayl_lower, & ! used by RRTGMP gas optics + rayl_upper, & ! used by RRTGMP gas optics + lut_extice, & ! used by RRTGMP cloud optics + lut_ssaice, & ! used by RRTGMP cloud optics + lut_asyice, & ! used by RRTGMP cloud optics + pade_extliq, & ! used by RRTGMP cloud optics + pade_ssaliq, & ! used by RRTGMP cloud optics + pade_asyliq ! used by RRTGMP cloud optics + real(kind_phys), dimension(:,:,:,:), allocatable :: & + kmajor, & ! used by RRTGMP gas optics + planck_frac, & ! used by RRTGMP gas optics + pade_extice, & ! used by RRTGMP cloud optics + pade_ssaice, & ! used by RRTGMP cloud optics + pade_asyice ! used by RRTGMP cloud optics + character(len=32), dimension(:), allocatable :: & + gas_names, & ! used by RRTGMP gas optics + gas_minor, & ! used by RRTGMP gas optics + identifier_minor, & ! used by RRTGMP gas optics + minor_gases_lower, & ! used by RRTGMP gas optics + minor_gases_upper, & ! used by RRTGMP gas optics + scaling_gas_lower, & ! used by RRTGMP gas optics + scaling_gas_upper ! used by RRTGMP gas optics + logical(wl), dimension(:), allocatable :: & + minor_scales_with_density_lower, & ! used by RRTGMP gas optics + minor_scales_with_density_upper, & ! used by RRTGMP gas optics + scale_by_complement_lower, & ! used by RRTGMP gas optics + scale_by_complement_upper ! used by RRTGMP gas optics + + ! Dimensions (to be broadcast across all processors) + integer :: & + ntemps, & ! used by RRTGMP gas optics + npress, & ! used by RRTGMP gas optics + nabsorbers, & ! used by RRTGMP gas optics + nextrabsorbers, & ! used by RRTGMP gas optics + nminorabsorbers, & ! used by RRTGMP gas optics + nmixingfracs, & ! used by RRTGMP gas optics + nlayers, & ! used by RRTGMP gas optics + nbnds, & ! used by RRTGMP gas optics + ngpts, & ! used by RRTGMP gas optics + npairs, & ! used by RRTGMP gas optics + ninternalSourcetemps, & ! used by RRTGMP gas optics + nminor_absorber_intervals_lower, & ! used by RRTGMP gas optics + nminor_absorber_intervals_upper, & ! used by RRTGMP gas optics + ncontributors_lower, & ! used by RRTGMP gas optics + ncontributors_upper, & ! used by RRTGMP gas optics + nbandLWcldy, & ! used by RRTGMP cloud optics + nsize_liq, & ! used by RRTGMP cloud optics + nsize_ice, & ! used by RRTGMP cloud optics + nsizereg, & ! used by RRTGMP cloud optics + ncoeff_ext, & ! used by RRTGMP cloud optics + ncoeff_ssa_g, & ! used by RRTGMP cloud optics + nbound, & ! used by RRTGMP cloud optics + npairsLWcldy ! used by RRTGMP cloud optics + + ! Local variables + integer :: ncid_lw,dimID,varID,status,igpt,iGas,ij,ierr,ncid_lw_clds + integer,dimension(:),allocatable :: temp1,temp2,temp3,temp4,temp_log_array1,& + temp_log_array2, temp_log_array3, temp_log_array4 + character(len=264) :: kdist_file,kdist_cldy_file + integer,parameter :: max_strlen=256 + + ! Initialize + errmsg = '' + errflg = 0 + + ! How are we handling cloud-optics? + rrtmgp_lw_cld_phys = Model%rrtmgp_cld_phys + + ! Filenames are set in the gfs_physics_nml (scm/src/GFS_typedefs.F90) + kdist_file = trim(Model%rrtmgp_root)//trim(Model%kdist_lw_file_gas) + kdist_cldy_file = trim(Model%rrtmgp_root)//trim(Model%kdist_lw_file_clouds) + + ! Read dimensions for k-distribution fields (only on master processor(0)) + if (mpirank .eq. mpiroot) then + if(nf90_open(trim(kdist_file), NF90_WRITE, ncid_lw) .eq. NF90_NOERR) then + status = nf90_inq_dimid(ncid_lw, 'temperature', dimid) + status = nf90_inquire_dimension(ncid_lw, dimid, len=ntemps) + status = nf90_inq_dimid(ncid_lw, 'pressure', dimid) + status = nf90_inquire_dimension(ncid_lw, dimid, len=npress) + status = nf90_inq_dimid(ncid_lw, 'absorber', dimid) + status = nf90_inquire_dimension(ncid_lw, dimid, len=nabsorbers) + status = nf90_inq_dimid(ncid_lw, 'minor_absorber', dimid) + status = nf90_inquire_dimension(ncid_lw, dimid, len=nminorabsorbers) + status = nf90_inq_dimid(ncid_lw, 'absorber_ext', dimid) + status = nf90_inquire_dimension(ncid_lw, dimid, len=nextrabsorbers) + status = nf90_inq_dimid(ncid_lw, 'mixing_fraction', dimid) + status = nf90_inquire_dimension(ncid_lw, dimid, len=nmixingfracs) + status = nf90_inq_dimid(ncid_lw, 'atmos_layer', dimid) + status = nf90_inquire_dimension(ncid_lw, dimid, len=nlayers) + status = nf90_inq_dimid(ncid_lw, 'bnd', dimid) + status = nf90_inquire_dimension(ncid_lw, dimid, len=nbnds) + status = nf90_inq_dimid(ncid_lw, 'gpt', dimid) + status = nf90_inquire_dimension(ncid_lw, dimid, len=ngpts) + status = nf90_inq_dimid(ncid_lw, 'pair', dimid) + status = nf90_inquire_dimension(ncid_lw, dimid, len=npairs) + status = nf90_inq_dimid(ncid_lw, 'contributors_lower', dimid) + status = nf90_inquire_dimension(ncid_lw, dimid, len=ncontributors_lower) + status = nf90_inq_dimid(ncid_lw, 'contributors_upper', dimid) + status = nf90_inquire_dimension(ncid_lw, dimid, len=ncontributors_upper) + status = nf90_inq_dimid(ncid_lw, 'minor_absorber_intervals_lower', dimid) + status = nf90_inquire_dimension(ncid_lw, dimid, len=nminor_absorber_intervals_lower) + status = nf90_inq_dimid(ncid_lw, 'minor_absorber_intervals_upper', dimid) + status = nf90_inquire_dimension(ncid_lw, dimid, len=nminor_absorber_intervals_upper) + status = nf90_inq_dimid(ncid_lw, 'temperature_Planck', dimid) + status = nf90_inquire_dimension(ncid_lw, dimid, len=ninternalSourcetemps) + status = nf90_close(ncid_lw) + endif + endif + + ! Broadcast dimensions to all processors +#ifdef MPI + call MPI_BCAST(ntemps, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(npress, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nminorabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nextraabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nmixingfracs, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nlayers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nbnds, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(ngpts, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(npairs, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(ncontributors_lower, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(ncontributors_upper, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nminor_absorber_intervals_lower, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nminor_absorber_intervals_upper, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(ninternalSourcetemps, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +#endif + + !if (mpirank .eq. mpiroot) then + ! Allocate space for arrays + allocate(gas_names(nabsorbers)) + allocate(scaling_gas_lower(nminor_absorber_intervals_lower)) + allocate(scaling_gas_upper(nminor_absorber_intervals_upper)) + allocate(gas_minor(nminorabsorbers)) + allocate(identifier_minor(nminorabsorbers)) + allocate(minor_gases_lower(nminor_absorber_intervals_lower)) + allocate(minor_gases_upper(nminor_absorber_intervals_upper)) + allocate(minor_limits_gpt_lower(npairs,nminor_absorber_intervals_lower)) + allocate(minor_limits_gpt_upper(npairs,nminor_absorber_intervals_upper)) + allocate(band2gpt(2,nbnds)) + allocate(key_species(2,nlayers,nbnds)) + allocate(band_lims(2,nbnds)) + allocate(press_ref(npress)) + allocate(temp_ref(ntemps)) + allocate(vmr_ref(nlayers, nextrabsorbers, ntemps)) + allocate(kminor_lower(ncontributors_lower, nmixingfracs, ntemps)) + allocate(kmajor(ngpts, nmixingfracs, npress+1, ntemps)) + allocate(kminor_start_lower(nminor_absorber_intervals_lower)) + allocate(kminor_upper(ncontributors_upper, nmixingfracs, ntemps)) + allocate(kminor_start_upper(nminor_absorber_intervals_upper)) + allocate(minor_scales_with_density_lower(nminor_absorber_intervals_lower)) + allocate(minor_scales_with_density_upper(nminor_absorber_intervals_upper)) + allocate(scale_by_complement_lower(nminor_absorber_intervals_lower)) + allocate(scale_by_complement_upper(nminor_absorber_intervals_upper)) + allocate(temp1(nminor_absorber_intervals_lower)) + allocate(temp2(nminor_absorber_intervals_upper)) + allocate(temp3(nminor_absorber_intervals_lower)) + allocate(temp4(nminor_absorber_intervals_upper)) + allocate(totplnk(ninternalSourcetemps, nbnds)) + allocate(planck_frac(ngpts, nmixingfracs, npress+1, ntemps)) + + if (mpirank .eq. mpiroot) then + ! Read in fields from file + if(nf90_open(trim(kdist_file), NF90_WRITE, ncid_lw) .eq. NF90_NOERR) then + status = nf90_inq_varid(ncid_lw,'gas_names',varID) + status = nf90_get_var(ncid_lw,varID,gas_names) + ! + status = nf90_inq_varid(ncid_lw,'scaling_gas_lower',varID) + status = nf90_get_var(ncid_lw,varID,scaling_gas_lower) + ! + status = nf90_inq_varid(ncid_lw,'scaling_gas_upper',varID) + status = nf90_get_var(ncid_lw,varID,scaling_gas_upper) + ! + status = nf90_inq_varid(ncid_lw,'gas_minor',varID) + status = nf90_get_var(ncid_lw,varID,gas_minor) + ! + status = nf90_inq_varid(ncid_lw,'identifier_minor',varID) + status = nf90_get_var(ncid_lw,varID,identifier_minor) + ! + status = nf90_inq_varid(ncid_lw,'minor_gases_lower',varID) + status = nf90_get_var(ncid_lw,varID,minor_gases_lower) + ! + status = nf90_inq_varid(ncid_lw,'minor_gases_upper',varID) + status = nf90_get_var(ncid_lw,varID,minor_gases_upper) + ! + status = nf90_inq_varid(ncid_lw,'minor_limits_gpt_lower',varID) + status = nf90_get_var(ncid_lw,varID,minor_limits_gpt_lower) + ! + status = nf90_inq_varid(ncid_lw,'minor_limits_gpt_upper',varID) + status = nf90_get_var(ncid_lw,varID,minor_limits_gpt_upper) + ! + status = nf90_inq_varid(ncid_lw,'bnd_limits_gpt',varID) + status = nf90_get_var(ncid_lw,varID,band2gpt) + ! + status = nf90_inq_varid(ncid_lw,'key_species',varID) + status = nf90_get_var(ncid_lw,varID,key_species) + ! + status = nf90_inq_varid(ncid_lw,'bnd_limits_wavenumber',varID) + status = nf90_get_var(ncid_lw,varID,band_lims) + ! + status = nf90_inq_varid(ncid_lw,'press_ref',varID) + status = nf90_get_var(ncid_lw,varID,press_ref) + ! + status = nf90_inq_varid(ncid_lw,'temp_ref',varID) + status = nf90_get_var(ncid_lw,varID,temp_ref) + ! + status = nf90_inq_varid(ncid_lw,'absorption_coefficient_ref_P',varID) + status = nf90_get_var(ncid_lw,varID,temp_ref_p) + ! + status = nf90_inq_varid(ncid_lw,'absorption_coefficient_ref_T',varID) + status = nf90_get_var(ncid_lw,varID,temp_ref_t) + ! + status = nf90_inq_varid(ncid_lw,'press_ref_trop',varID) + status = nf90_get_var(ncid_lw,varID,press_ref_trop) + ! + status = nf90_inq_varid(ncid_lw,'kminor_lower',varID) + status = nf90_get_var(ncid_lw,varID,kminor_lower) + ! + status = nf90_inq_varid(ncid_lw,'kminor_upper',varID) + status = nf90_get_var(ncid_lw,varID,kminor_upper) + ! + status = nf90_inq_varid(ncid_lw,'vmr_ref',varID) + status = nf90_get_var(ncid_lw,varID,vmr_ref) + ! + status = nf90_inq_varid(ncid_lw,'kmajor',varID) + status = nf90_get_var(ncid_lw,varID,kmajor) + ! + status = nf90_inq_varid(ncid_lw,'kminor_start_lower',varID) + status = nf90_get_var(ncid_lw,varID,kminor_start_lower) + ! + status = nf90_inq_varid(ncid_lw,'kminor_start_upper',varID) + status = nf90_get_var(ncid_lw,varID,kminor_start_upper) + ! + status = nf90_inq_varid(ncid_lw,'totplnk',varID) + status = nf90_get_var(ncid_lw,varID,totplnk) + ! + status = nf90_inq_varid(ncid_lw,'plank_fraction',varID) + status = nf90_get_var(ncid_lw,varID,planck_frac) + + ! Logical fields are read in as integers and then converted to logicals. + status = nf90_inq_varid(ncid_lw,'minor_scales_with_density_lower',varID) + status = nf90_get_var(ncid_lw,varID,temp1) + minor_scales_with_density_lower(:) = .false. + where(temp1 .eq. 1) minor_scales_with_density_lower(:) = .true. + ! + status = nf90_inq_varid(ncid_lw,'minor_scales_with_density_upper',varID) + status = nf90_get_var(ncid_lw,varID,temp2) + minor_scales_with_density_upper(:) = .false. + where(temp2 .eq. 1) minor_scales_with_density_upper(:) = .true. + ! + status = nf90_inq_varid(ncid_lw,'scale_by_complement_lower',varID) + status = nf90_get_var(ncid_lw,varID,temp3) + scale_by_complement_lower(:) = .false. + where(temp3 .eq. 1) scale_by_complement_lower(:) = .true. + ! + status = nf90_inq_varid(ncid_lw,'scale_by_complement_upper',varID) + status = nf90_get_var(ncid_lw,varID,temp4) + scale_by_complement_upper(:) = .false. + where(temp4 .eq. 1) scale_by_complement_upper(:) = .true. + + ! Close + status = nf90_close(ncid_lw) + endif + endif + + ! Broadcast arrays to all processors +#ifdef MPI + call MPI_BCAST(minor_limits_gpt_upper, size(minor_limits_gpt_upper), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(minor_limits_gpt_lower, size(minor_limits_gpt_lower), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(kminor_start_upper, size(kminor_start_upper), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(kminor_start_lower, size(kminor_start_lower), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(key_species, size(key_species), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(band2gpt, size(band2gpt), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(band_lims, size(band_lims), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(press_ref, size(press_ref), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(temp_ref, size(temp_ref), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(kminor_lower, size(kminor_lower), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(kminor_upper, size(kminor_upper), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(scaling_gas_lower, size(scaling_gas_lower), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(scaling_gas_upper, size(scaling_gas_upper), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(vmr_ref, size(vmr_ref), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(kmajor, size(kmajor), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(temp_ref_p, 1, kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(temp_ref_t, 1, kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(press_ref_trop, 1, kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(totplnk, size(totplnk), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(planck_frac, size(planck_frac), kind_phys, mpiroot, mpicomm, ierr) + ! Character arrays + do ij=1,nabsorbers + call MPI_BCAST(gas_names(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) + enddo + do ij=1,nminorabsorbers + call MPI_BCAST(gas_minor(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) + call MPI_BCAST(identifier_minor(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) + enddo + do ij=1,nminor_absorber_intervals_lower + call MPI_BCAST(minor_gases_lower(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) + enddo + do ij=1,nminor_absorber_intervals_upper + call MPI_BCAST(minor_gases_upper(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) + enddo + ! Logical arrays (First convert to integer-array, then broadcast) + ! + allocate(temp_log_array1(nminor_absorber_intervals_lower)) + where(minor_scales_with_density_lower) + temp_log_array1 = 1 + elsewhere + temp_log_array1 = 0 + end where + call MPI_BCAST(temp_log_array1, size(temp_log_array1), MPI_INTEGER, mpiroot, mpicomm, ierr) + ! + allocate(temp_log_array2(nminor_absorber_intervals_lower)) + where(scale_by_complement_lower) + temp_log_array2 = 1 + elsewhere + temp_log_array2 = 0 + end where + call MPI_BCAST(temp_log_array2, size(temp_log_array2), MPI_INTEGER, mpiroot, mpicomm, ierr) + ! + allocate(temp_log_array3(nminor_absorber_intervals_upper)) + where(minor_scales_with_density_upper) + temp_log_array3 = 1 + elsewhere + temp_log_array3 = 0 + end where + call MPI_BCAST(temp_log_array3, size(temp_log_array3), MPI_INTEGER, mpiroot, mpicomm, ierr) + ! + allocate(temp_log_array4(nminor_absorber_intervals_upper)) + where(scale_by_complement_upper) + temp_log_array4 = 1 + elsewhere + temp_log_array4 = 0 + end where + call MPI_BCAST(temp_log_array4, size(temp_log_array4), MPI_INTEGER, mpiroot, mpicomm, ierr) +#endif + + ! Initialize gas concentrations and gas optics class with data + do iGas=1,nGases + call check_error_msg(gas_concentrations%set_vmr(active_gases(iGas), 0._kind_phys)) + enddo + call check_error_msg(kdist_lw%load(gas_concentrations, gas_names, key_species, band2gpt, & + band_lims, press_ref, press_ref_trop, temp_ref, temp_ref_p, temp_ref_t, & + vmr_ref, kmajor, kminor_lower, kminor_upper, gas_minor,identifier_minor, & + minor_gases_lower, minor_gases_upper, minor_limits_gpt_lower, & + minor_limits_gpt_upper, minor_scales_with_density_lower, & + minor_scales_with_density_upper, scaling_gas_lower, & + scaling_gas_upper, scale_by_complement_lower, & + scale_by_complement_upper, kminor_start_lower, kminor_start_upper, & + totplnk, planck_frac, rayl_lower, rayl_upper)) + + ! Set initial permutation seed for McICA, initially set to number of G-points + ipsdlw0 = kdist_lw%get_ngpt() + + ! ####################################################################################### + ! If RRTMGP cloud-optics are requested, read tables and broadcast. + ! ####################################################################################### + ! Read dimensions for k-distribution fields (only on master processor(0)) + if (mpirank .eq. mpiroot) then + if(nf90_open(trim(kdist_cldy_file), NF90_WRITE, ncid_lw_clds) == NF90_NOERR) then + status = nf90_inq_dimid(ncid_lw_clds, 'nband', dimid) + status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=nbandLWcldy) + status = nf90_inq_dimid(ncid_lw_clds, 'nrghice', dimid) + status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=nrghice) + status = nf90_inq_dimid(ncid_lw_clds, 'nsize_liq', dimid) + status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=nsize_liq) + status = nf90_inq_dimid(ncid_lw_clds, 'nsize_ice', dimid) + status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=nsize_ice) + status = nf90_inq_dimid(ncid_lw_clds, 'nsizereg', dimid) + status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=nsizereg) + status = nf90_inq_dimid(ncid_lw_clds, 'ncoeff_ext', dimid) + status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=ncoeff_ext) + status = nf90_inq_dimid(ncid_lw_clds, 'ncoeff_ssa_g', dimid) + status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=ncoeff_ssa_g) + status = nf90_inq_dimid(ncid_lw_clds, 'nbound', dimid) + status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=nbound) + status = nf90_inq_dimid(ncid_lw_clds, 'pair', dimid) + status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=npairsLWcldy) + status = nf90_close(ncid_lw_clds) + endif + endif + + ! Broadcast dimensions to all processors +#ifdef MPI + if (rrtmgp_lw_cld_phys .eq. 1 .or. rrtmgp_lw_cld_phys .eq. 2) then + call MPI_BCAST(nbandLWcldy, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nrghice, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nsize_liq, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nsize_ice, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nsizereg, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(ncoeff_ext, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(ncoeff_ssa_g, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nbound, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(npairsLWcldy, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + endif +#endif + + if (rrtmgp_lw_cld_phys .eq. 1) then + allocate(lut_extliq(nsize_liq, nBandLWcldy)) + allocate(lut_ssaliq(nsize_liq, nBandLWcldy)) + allocate(lut_asyliq(nsize_liq, nBandLWcldy)) + allocate(lut_extice(nsize_ice, nBandLWcldy, nrghice)) + allocate(lut_ssaice(nsize_ice, nBandLWcldy, nrghice)) + allocate(lut_asyice(nsize_ice, nBandLWcldy, nrghice)) + allocate(band_lims_cldy(2, nBandLWcldy)) + endif + if (rrtmgp_lw_cld_phys .eq. 2) then + allocate(pade_extliq(nbandLWcldy, nsizereg, ncoeff_ext )) + allocate(pade_ssaliq(nbandLWcldy, nsizereg, ncoeff_ssa_g)) + allocate(pade_asyliq(nbandLWcldy, nsizereg, ncoeff_ssa_g)) + allocate(pade_extice(nbandLWcldy, nsizereg, ncoeff_ext, nrghice)) + allocate(pade_ssaice(nbandLWcldy, nsizereg, ncoeff_ssa_g, nrghice)) + allocate(pade_asyice(nbandLWcldy, nsizereg, ncoeff_ssa_g, nrghice)) + allocate(pade_sizereg_extliq(nbound)) + allocate(pade_sizereg_ssaliq(nbound)) + allocate(pade_sizereg_asyliq(nbound)) + allocate(pade_sizereg_extice(nbound)) + allocate(pade_sizereg_ssaice(nbound)) + allocate(pade_sizereg_asyice(nbound)) + allocate(band_lims_cldy(2,nbandLWcldy)) + endif + + ! On master processor, allocate space, read in fields, broadcast to all processors + if (mpirank .eq. mpiroot) then + ! + if (rrtmgp_lw_cld_phys .eq. 1) then + ! + if(nf90_open(trim(kdist_cldy_file), NF90_WRITE, ncid_lw_clds) == NF90_NOERR) then + status = nf90_inq_varid(ncid_lw_clds,'radliq_lwr',varID) + status = nf90_get_var(ncid_lw_clds,varID,radliq_lwr) + status = nf90_inq_varid(ncid_lw_clds,'radliq_upr',varID) + status = nf90_get_var(ncid_lw_clds,varID,radliq_upr) + status = nf90_inq_varid(ncid_lw_clds,'radliq_fac',varID) + status = nf90_get_var(ncid_lw_clds,varID,radliq_fac) + status = nf90_inq_varid(ncid_lw_clds,'radice_lwr',varID) + status = nf90_get_var(ncid_lw_clds,varID,radice_lwr) + status = nf90_inq_varid(ncid_lw_clds,'radice_upr',varID) + status = nf90_get_var(ncid_lw_clds,varID,radice_upr) + status = nf90_inq_varid(ncid_lw_clds,'radice_fac',varID) + status = nf90_get_var(ncid_lw_clds,varID,radice_fac) + status = nf90_inq_varid(ncid_lw_clds,'lut_extliq',varID) + status = nf90_get_var(ncid_lw_clds,varID,lut_extliq) + status = nf90_inq_varid(ncid_lw_clds,'lut_ssaliq',varID) + status = nf90_get_var(ncid_lw_clds,varID,lut_ssaliq) + status = nf90_inq_varid(ncid_lw_clds,'lut_asyliq',varID) + status = nf90_get_var(ncid_lw_clds,varID,lut_asyliq) + status = nf90_inq_varid(ncid_lw_clds,'lut_extice',varID) + status = nf90_get_var(ncid_lw_clds,varID,lut_extice) + status = nf90_inq_varid(ncid_lw_clds,'lut_ssaice',varID) + status = nf90_get_var(ncid_lw_clds,varID,lut_ssaice) + status = nf90_inq_varid(ncid_lw_clds,'lut_asyice',varID) + status = nf90_get_var(ncid_lw_clds,varID,lut_asyice) + status = nf90_inq_varid(ncid_lw_clds,'bnd_limits_wavenumber',varID) + status = nf90_get_var(ncid_lw_clds,varID,band_lims_cldy) + status = nf90_close(ncid_lw_clds) + endif + endif + ! + if (rrtmgp_lw_cld_phys .eq. 2) then + ! + if(nf90_open(trim(kdist_cldy_file), NF90_WRITE, ncid_lw_clds) == NF90_NOERR) then + status = nf90_inq_varid(ncid_lw_clds,'radliq_lwr',varID) + status = nf90_get_var(ncid_lw_clds,varID,radliq_lwr) + status = nf90_inq_varid(ncid_lw_clds,'radliq_upr',varID) + status = nf90_get_var(ncid_lw_clds,varID,radliq_upr) + status = nf90_inq_varid(ncid_lw_clds,'radliq_fac',varID) + status = nf90_get_var(ncid_lw_clds,varID,radliq_fac) + status = nf90_inq_varid(ncid_lw_clds,'radice_lwr',varID) + status = nf90_get_var(ncid_lw_clds,varID,radice_lwr) + status = nf90_inq_varid(ncid_lw_clds,'radice_upr',varID) + status = nf90_get_var(ncid_lw_clds,varID,radice_upr) + status = nf90_inq_varid(ncid_lw_clds,'radice_fac',varID) + status = nf90_get_var(ncid_lw_clds,varID,radice_fac) + status = nf90_inq_varid(ncid_lw_clds,'pade_extliq',varID) + status = nf90_get_var(ncid_lw_clds,varID,pade_extliq) + status = nf90_inq_varid(ncid_lw_clds,'pade_ssaliq',varID) + status = nf90_get_var(ncid_lw_clds,varID,pade_ssaliq) + status = nf90_inq_varid(ncid_lw_clds,'pade_asyliq',varID) + status = nf90_get_var(ncid_lw_clds,varID,pade_asyliq) + status = nf90_inq_varid(ncid_lw_clds,'pade_extice',varID) + status = nf90_get_var(ncid_lw_clds,varID,pade_extice) + status = nf90_inq_varid(ncid_lw_clds,'pade_ssaice',varID) + status = nf90_get_var(ncid_lw_clds,varID,pade_ssaice) + status = nf90_inq_varid(ncid_lw_clds,'pade_asyice',varID) + status = nf90_get_var(ncid_lw_clds,varID,pade_asyice) + status = nf90_inq_varid(ncid_lw_clds,'pade_sizreg_extliq',varID) + status = nf90_get_var(ncid_lw_clds,varID,pade_sizereg_extliq) + status = nf90_inq_varid(ncid_lw_clds,'pade_sizreg_ssaliq',varID) + status = nf90_get_var(ncid_lw_clds,varID,pade_sizereg_ssaliq) + status = nf90_inq_varid(ncid_lw_clds,'pade_sizreg_asyliq',varID) + status = nf90_get_var(ncid_lw_clds,varID,pade_sizereg_asyliq) + status = nf90_inq_varid(ncid_lw_clds,'pade_sizreg_extice',varID) + status = nf90_get_var(ncid_lw_clds,varID,pade_sizereg_extice) + status = nf90_inq_varid(ncid_lw_clds,'pade_sizreg_ssaice',varID) + status = nf90_get_var(ncid_lw_clds,varID,pade_sizereg_ssaice) + status = nf90_inq_varid(ncid_lw_clds,'pade_sizreg_asyice',varID) + status = nf90_get_var(ncid_lw_clds,varID,pade_sizereg_asyice) + status = nf90_inq_varid(ncid_lw_clds,'bnd_limits_wavenumber',varID) + status = nf90_get_var(ncid_lw_clds,varID,band_lims_cldy) + status = nf90_close(ncid_lw_clds) + endif + endif + endif + + ! Broadcast arrays to all processors +#ifdef MPI + if (rrtmgp_lw_cld_phys .eq. 1) then + call MPI_BCAST(radliq_lwr, size(radliq_lwr), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(radliq_upr, size(radliq_upr), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(radliq_fac, size(radliq_fac), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(radice_lwr, size(radice_lwr), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(radice_upr, size(radice_upr), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(radice_fac, size(radice_fac), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_extliq, size(lut_extliq), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_ssaliq, size(lut_ssaliq), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_asyliq, size(lut_asyliq), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_extice, size(lut_extice), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_ssaice, size(lut_ssaice), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_asyice, size(lut_asyice), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(band_lims_cldy), size(band_lims_cldy), kind_phys, mpiroot, mpicomm, ierr) + endif + if (rrtmgp_lw_cld_phys .eq. 2) then + call MPI_BCAST(pade_extliq, size(pade_extliq), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_ssaliq, size(pade_ssaliq), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_asyliq, size(pade_asyliq), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_extice, size(pade_extice), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_ssaice, size(pade_ssaice), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_asyice, size(pade_asyice), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_extliq), size(pade_sizereg_extliq), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_ssaliq), size(pade_sizereg_ssaliq), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_asyliq), size(pade_sizereg_asyliq), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_extice), size(pade_sizereg_extice), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_ssaice), size(pade_sizereg_ssaice), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_asyice), size(pade_sizereg_asyice), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(band_lims_cldy), size(band_lims_cldy), kind_phys, mpiroot, mpicomm, ierr) + endif +#endif + + ! Load tables data for RRTGMP cloud-optics + if (rrtmgp_lw_cld_phys .eq. 1) then + call check_error_msg(kdist_cldy_lw%set_ice_roughness(nrghice)) + call check_error_msg(kdist_cldy_lw%load(band_lims_cldy, radliq_lwr, radliq_upr, & + radliq_fac, radice_lwr, radice_upr, radice_fac, lut_extliq, lut_ssaliq, & + lut_asyliq, lut_extice, lut_ssaice, lut_asyice)) + endif + if (rrtmgp_lw_cld_phys .eq. 2) then + call check_error_msg(kdist_cldy_lw%set_ice_roughness(nrghice)) + call check_error_msg(kdist_cldy_lw%load(band_lims_cldy, pade_extliq, & + pade_ssaliq, pade_asyliq, pade_extice, pade_ssaice, pade_asyice, & + pade_sizereg_extliq, pade_sizereg_ssaliq, pade_sizereg_asyliq, & + pade_sizereg_extice, pade_sizereg_ssaice, pade_sizereg_asyice)) + endif + end subroutine rrtmgp_lw_init ! ######################################################################################### ! ######################################################################################### !! \section arg_table_rrtmgp_lw_run Argument Table -!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | -!! |-----------------------|-------------------------------------------------|--------------------------------------------------------------------|-------|------|-----------------------|-----------|--------|----------| -!! | ncol | horizontal_loop_extent | horizontal dimension | count | 0 | integer | | in | F | -!! | nlay | adjusted_vertical_layer_dimension_for_radiation | number of vertical layers for radiation | count | 0 | integer | | in | F | -!! | p_lay | air_pressure_at_layer_for_radiation_in_hPa | air pressure layer | hPa | 2 | real | kind_phys | in | F | -!! | p_lev | air_pressure_at_interface_for_radiation_in_hPa | air pressure level | hPa | 2 | real | kind_phys | in | F | -!! | t_lay | air_temperature_at_layer_for_radiation | air temperature layer | K | 2 | real | kind_phys | in | F | -!! | skt | surface_ground_temperature_for_radiation | surface ground temperature for radiation | K | 1 | real | kind_phys | in | F | -!! | sfc_emiss | surface_longwave_emissivity_in_each_band | surface lw emissivity in fraction in each LW band | frac | 2 | real | kind_phys | in | F | -!! | kdist_lw | K_distribution_file_for_RRTMGP_LW_scheme | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | -!! | optical_props_clds | optical_properties_for_cloudy_atmosphere | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_1scl | | in | F | -!! | optical_props_aerosol | optical_properties_for_aerosols | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_1scl | | in | F | -!! | gas_concentrations | Gas_concentrations_for_RRTMGP_suite | DDT containing gas concentrations for RRTMGP radiation scheme | DDT | 0 | ty_gas_concs | | in | F | -!! | fluxLW_allsky | lw_flux_profiles_byband_allsky | Fortran DDT containing RRTMGP 3D fluxes | DDT | 0 | ty_fluxes_byband | | out | F | -!! | fluxLW_clrsky | lw_flux_profiles_byband_clrsky | Fortran DDT containing RRTMGP 3D fluxes | DDT | 0 | ty_fluxes_byband | | out | F | -!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | -!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | +!! |-----------------------|-----------------------------------------------------------------------------------------------|--------------------------------------------------------------------|-------|------|-----------------------|-----------|--------|----------| +!! | ncol | horizontal_loop_extent | horizontal dimension | count | 0 | integer | | in | F | +!! | nlay | adjusted_vertical_layer_dimension_for_radiation | number of vertical layers for radiation | count | 0 | integer | | in | F | +!! | p_lay | air_pressure_at_layer_for_radiation_in_hPa | air pressure layer | hPa | 2 | real | kind_phys | in | F | +!! | p_lev | air_pressure_at_interface_for_radiation_in_hPa | air pressure level | hPa | 2 | real | kind_phys | in | F | +!! | t_lay | air_temperature_at_layer_for_radiation | air temperature layer | K | 2 | real | kind_phys | in | F | +!! | skt | surface_ground_temperature_for_radiation | surface ground temperature for radiation | K | 1 | real | kind_phys | in | F | +!! | sfc_emiss | surface_longwave_emissivity_in_each_band | surface lw emissivity in fraction in each LW band | frac | 2 | real | kind_phys | in | F | +!! | kdist_lw | K_distribution_file_for_RRTMGP_LW_scheme | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | +!! | optical_props_clds | optical_properties_for_cloudy_atmosphere | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_1scl | | in | F | +!! | optical_props_aerosol | optical_properties_for_aerosols | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_1scl | | in | F | +!! | gas_concentrations | Gas_concentrations_for_RRTMGP_suite | DDT containing gas concentrations for RRTMGP radiation scheme | DDT | 0 | ty_gas_concs | | in | F | +!! | lslwr | flag_to_calc_lw | flag to calculate LW irradiances | flag | 0 | logical | | in | F | +!! | fluxLW_allsky | lw_flux_profiles_byband_allsky | Fortran DDT containing RRTMGP 3D fluxes | DDT | 0 | ty_fluxes_byband | | out | F | +!! | fluxLW_clrsky | lw_flux_profiles_byband_clrsky | Fortran DDT containing RRTMGP 3D fluxes | DDT | 0 | ty_fluxes_byband | | out | F | +!! | hlw0 | tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_time_step | longwave clear sky heating rate | K s-1 | 2 | real | kind_phys | inout | T | +!! | hlwb | lw_heating_rate_spectral | longwave total sky heating rate (spectral) | K s-1 | 3 | real | kind_phys | inout | T | +!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | +!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | !! subroutine rrtmgp_lw_run(ncol, nlay, kdist_lw, p_lay, t_lay, p_lev, skt, & sfc_emiss, gas_concentrations, optical_props_clds, optical_props_aerosol,& - fluxLW_allsky, fluxLW_clrsky, errmsg, errflg) + lslwr, fluxLW_allsky, fluxLW_clrsky, hlw0, hlwb, errmsg, errflg) ! Inputs integer, intent(in) :: & @@ -56,21 +701,53 @@ subroutine rrtmgp_lw_run(ncol, nlay, kdist_lw, p_lay, t_lay, p_lev, skt, & real(kind_phys), dimension(kdist_lw%get_nband(),ncol) :: & sfc_emiss ! Surface emissivity (1) type(ty_optical_props_1scl),intent(in) :: & - optical_props_clds, & - optical_props_aerosol + optical_props_clds, & ! RRTMGP DDT: cloud radiative properties + optical_props_aerosol ! RRTMGP DDT: aerosol radiative properties type(ty_gas_concs),intent(in) :: & - gas_concentrations - type(ty_fluxes_byband),intent(out) :: & - fluxLW_allsky, & ! All-sky flux (W/m2) - fluxLW_clrsky ! Clear-sky flux (W/m2) + gas_concentrations ! RRTMGP DDT: trace gas concentrations (vmr) + logical, intent(in) :: & + lslwr ! Flag to calculate LW irradiances ! Outputs character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg + + type(ty_fluxes_byband),intent(out) :: & + fluxLW_allsky, & ! All-sky flux (W/m2) + fluxLW_clrsky ! Clear-sky flux (W/m2) + ! Outputs (optional) + real(kind_phys), dimension(ncol,nlay,kdist_lw%get_nband()), optional, intent(inout) :: & + hlwb ! All-sky heating rate, by band (K/sec) + real(kind_phys), dimension(ncol,nlay), optional, intent(inout) :: & + hlw0 ! Clear-sky heating rate (K/sec) + + ! Local variables + real(kind_phys), dimension(ncol,nlay+1),target :: & + flux_up_allsky, flux_up_clrsky, flux_dn_allsky, flux_dn_clrsky + real(kind_phys), dimension(ncol,nlay+1,kdist_lw%get_nband()),target :: & + fluxBB_up_allsky, fluxBB_dn_allsky + logical :: l_ClrSky_HR, l_AllSky_HR_byband + ! Initialize CCPP error handling variables errmsg = '' errflg = 0 + if (.not. lslwr) return + + ! Are any optional outputs requested? Need to know now to compute correct fluxes. + l_ClrSky_HR = present(hlw0) + l_AllSky_HR_byband = present(hlwb) + + ! Initialize RRTMGP DDT containing 2D(3D) fluxes + fluxLW_allsky%flux_up => flux_up_allsky + fluxLW_allsky%flux_dn => flux_dn_allsky + fluxLW_clrsky%flux_up => flux_up_clrsky + fluxLW_clrsky%flux_dn => flux_dn_clrsky + ! Only calculate fluxes by-band, only when heating-rate profiles by band are requested. + if (l_AllSky_HR_byband) then + fluxLW_allsky%bnd_flux_up => fluxBB_up_allsky + fluxLW_allsky%bnd_flux_dn => fluxBB_dn_allsky + endif ! Call RRTMGP LW scheme call check_error_msg(rte_lw( & @@ -94,7 +771,7 @@ subroutine check_error_msg(error_msg) character(len=*), intent(in) :: error_msg if(error_msg /= "") then - print*,"ERROR(rrtmgp_sw_main.F90): " + print*,"ERROR(rrtmgp_lw.F90): " print*,trim(error_msg) return end if diff --git a/physics/rrtmgp_lw_post.F90 b/physics/rrtmgp_lw_post.F90 deleted file mode 100644 index 797c28de5..000000000 --- a/physics/rrtmgp_lw_post.F90 +++ /dev/null @@ -1,174 +0,0 @@ -! ########################################################################################### -! ########################################################################################### -module rrtmgp_lw_post - use machine, only: kind_phys - use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp - use mo_fluxes_byband, only: ty_fluxes_byband - use mo_heating_rates, only: compute_heating_rate - use rrtmgp_lw, only: check_error_msg - use module_radlw_parameters, only: topflw_type, sfcflw_type, proflw_type - - implicit none - - ! Logical flags for optional output fields in rrtmgp_lw_post_run(), default=.false. - logical :: & - l_AllSky_HR_byband = .false., & ! 2D [ncol,nlay] all-sky heating rates, in each band [ncol,nlay,nBandsLW]? - l_ClrSky_HR = .false., & ! 2D [ncol,nlay] clear-sky heating rate? - l_fluxes2D = .false. ! 2D [ncol,nlay] radiative fluxes? *Note* fluxes is a DDT w/ 4 fields. - - public rrtmgp_lw_post_init, rrtmgp_lw_post_run, rrtmgp_lw_post_finalize -contains - - subroutine rrtmgp_lw_post_init() - end subroutine rrtmgp_lw_post_init - - ! ######################################################################################### - ! ######################################################################################### -!! \section arg_table_rrtmgp_lw_post_run Argument Table -!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | -!! |-----------------------|-----------------------------------------------------------------------------------------------|--------------------------------------------------------------------|-------|------|-----------------------|-----------|--------|----------| -!! | ncol | horizontal_loop_extent | horizontal dimension | count | 0 | integer | | in | F | -!! | nlay | adjusted_vertical_layer_dimension_for_radiation | number of vertical layers for radiation | count | 0 | integer | | in | F | -!! | p_lev | air_pressure_at_interface_for_radiation_in_hPa | air pressure level | hPa | 2 | real | kind_phys | in | F | -!! | fluxLW_allsky | lw_flux_profiles_byband_allsky | Fortran DDT containing RRTMGP 3D fluxes | DDT | 0 | ty_fluxes_byband | | in | F | -!! | fluxLW_clrsky | lw_flux_profiles_byband_clrsky | Fortran DDT containing RRTMGP 3D fluxes | DDT | 0 | ty_fluxes_byband | | in | F | -!! | kdist_lw | K_distribution_file_for_RRTMGP_LW_scheme | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | -!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | -!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | -!! | hlwc | tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_step | longwave total sky heating rate | K s-1 | 2 | real | kind_phys | out | F | -!! | topflx | lw_fluxes_top_atmosphere | longwave total sky fluxes at the top of the atm | W m-2 | 1 | topflw_type | | inout | F | -!! | sfcflx | lw_fluxes_sfc | longwave total sky fluxes at the Earth surface | W m-2 | 1 | sfcflw_type | | inout | F | -!! | hlw0 | tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_time_step | longwave clear sky heating rate | K s-1 | 2 | real | kind_phys | inout | T | -!! | hlwb | lw_heating_rate_spectral | longwave total sky heating rate (spectral) | K s-1 | 3 | real | kind_phys | inout | T | -!! | flxprf | lw_fluxes | lw fluxes total sky / csk and up / down at levels | W m-2 | 2 | proflw_type | | inout | T | -!! - subroutine rrtmgp_lw_post_run(ncol, nlay, p_lev, kdist_lw, fluxLW_allsky, fluxLW_clrsky, & - hlwc, topflx, sfcflx, hlw0, hlwb, flxprf, errmsg, errflg) - - ! Inputs - integer, intent(in) :: & - ncol, & ! Number of horizontal gridpoints - nlay ! Number of vertical layers - real(kind_phys), dimension(ncol,nlay+1), intent(in) :: & - p_lev ! Pressure @ model layer-interfaces (hPa) - type(ty_gas_optics_rrtmgp),intent(in) :: & - kdist_lw ! DDT containing LW spectral information - type(ty_fluxes_byband),intent(in) :: & - fluxLW_allsky, & ! All-sky flux (W/m2) - fluxLW_clrsky ! Clear-sky flux (W/m2) - - ! Outputs - character(len=*), intent(out) :: errmsg - integer, intent(out) :: errflg - real(kind_phys),dimension(ncol,nlay),intent(inout) :: & - hlwc ! All-sky heating-rate (K/sec) - type(topflw_type), dimension(ncol), intent(inout) :: & - topflx ! radiation fluxes at top, components: - ! upfxc - total sky upward flux at top (w/m2) - ! upfx0 - clear sky upward flux at top (w/m2) - type(sfcflw_type), dimension(ncol), intent(inout) :: & - sfcflx ! radiation fluxes at sfc, components: - ! upfxc - total sky upward flux at sfc (w/m2) - ! upfx0 - clear sky upward flux at sfc (w/m2) - ! dnfxc - total sky downward flux at sfc (w/m2) - ! dnfx0 - clear sky downward flux at sfc (w/m2) - - ! Outputs (optional) - real(kind_phys), dimension(ncol,nlay,kdist_lw%get_nband()), optional, intent(inout) :: & - hlwb ! All-sky heating rate, by band (K/sec) - real(kind_phys), dimension(ncol,nlay), optional, intent(inout) :: & - hlw0 ! Clear-sky heating rate (K/sec) - type(proflw_type), dimension(ncol,nlay+1), optional, intent(inout) :: & - flxprf ! 2D radiative fluxes, components: - ! upfxc - total sky upward flux (W/m2) - ! dnfxc - total sky dnward flux (W/m2) - ! upfx0 - clear sky upward flux (W/m2) - ! dnfx0 - clear sky dnward flux (W/m2) - - ! Local variables - integer :: iBand, iTOA, iSFC - logical :: top_at_1 - real(kind_phys), dimension(ncol,nlay) :: thetaTendClrSky, thetaTendAllSky - real(kind_phys), dimension(ncol,nlay,kdist_lw%get_nband()) :: thetaTendByBandAllSky - - ! Initialize CCPP error handling variables - errmsg = '' - errflg = 0 - - ! What is vertical ordering? - top_at_1 = (p_lev(1,1) .lt. p_lev(1,nlay)) - if (top_at_1) then - iSFC = nlay+1 - iTOA = 1 - else - iSFC = 1 - iTOA = nlay+1 - endif - - ! Are any optional outputs requested? - l_ClrSky_HR = present(hlw0) - l_AllSky_HR_byband = present(hlwb) - l_fluxes2D = present(flxprf) - - ! ####################################################################################### - ! Compute heating rates - ! ####################################################################################### - if (l_ClrSky_HR) then - call check_error_msg(compute_heating_rate( & - fluxLW_clrsky%flux_up, & - fluxLW_clrsky%flux_dn, & - p_lev(1:ncol,1:nlay+1), & - thetaTendClrSky)) - endif - if (l_AllSky_HR_byband) then - do iBand=1,kdist_lw%get_nband() - call check_error_msg(compute_heating_rate( & - fluxLW_allsky%bnd_flux_up(:,:,iBand), & - fluxLW_allsky%bnd_flux_dn(:,:,iBand), & - p_lev(1:ncol,1:nlay+1), & - thetaTendByBandAllSky(:,:,iBand))) - enddo - else - call check_error_msg(compute_heating_rate( & - fluxLW_allsky%flux_up, & - fluxLW_allsky%flux_dn, & - p_lev(1:ncol,1:nlay+1), & - thetaTendAllSky)) - endif - - ! ####################################################################################### - ! Copy fluxes from RRTGMP types into model radiation types. - ! ####################################################################################### - ! Mandatory outputs - topflx%upfxc = fluxLW_allsky%flux_up(:,iTOA) - topflx%upfx0 = fluxLW_clrsky%flux_up(:,iTOA) - sfcflx%upfxc = fluxLW_allsky%flux_up(:,iSFC) - sfcflx%upfx0 = fluxLW_clrsky%flux_up(:,iSFC) - sfcflx%dnfxc = fluxLW_allsky%flux_dn(:,iSFC) - sfcflx%dnfx0 = fluxLW_clrsky%flux_dn(:,iSFC) - !cldtau = optical_props_cldy%tau(:,:,7) - hlwc = thetaTendAllSky - - ! Optional output - if(l_fluxes2D) then - flxprf%upfxc = fluxLW_allsky%flux_up - flxprf%dnfxc = fluxLW_allsky%flux_dn - flxprf%upfx0 = fluxLW_clrsky%flux_up - flxprf%dnfx0 = fluxLW_clrsky%flux_dn - endif - if (l_AllSky_HR_byband) then - hlwb = thetaTendByBandAllSky - endif - if (l_ClrSky_HR) then - hlw0 = thetaTendClrSky - endif - - - end subroutine rrtmgp_lw_post_run - - subroutine rrtmgp_lw_post_finalize() - end subroutine rrtmgp_lw_post_finalize - - - -end module rrtmgp_lw_post diff --git a/physics/rrtmgp_lw_pre.F90 b/physics/rrtmgp_lw_pre.F90 deleted file mode 100644 index 58a0f8df4..000000000 --- a/physics/rrtmgp_lw_pre.F90 +++ /dev/null @@ -1,746 +0,0 @@ -!>\file rrtmgp_lw_pre.f90 -!! This file contains a call to module_radiation_surface::setemis() to -!! setup surface emissivity for LW radiation. -module rrtmgp_lw_pre - use machine, only: kind_phys - use GFS_typedefs, only: GFS_control_type - use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp - use mo_gas_concentrations, only: ty_gas_concs - use mo_cloud_optics, only: ty_cloud_optics - use mo_rte_kind, only: wl - use rrtmgp_lw, only: check_error_msg - - ! Parameters - integer,parameter :: nGases = 6 - real(kind_phys),parameter :: epsilon=1.0e-6 - character(len=3),parameter, dimension(nGases) :: & - active_gases = (/ 'h2o', 'co2', 'o3 ', 'n2o', 'ch4', 'o2 '/) - integer :: nrghice, ipsdlw0 - -contains - -!! \section arg_table_rrtmgp_lw_pre_init Argument Table -!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | -!! |--------------------|-------------------------------------------------|---------------------------------------------------------------------------|-------|------|----------------------|-----------|--------|----------| -!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | -!! | mpirank | mpi_rank | current MPI rank | index | 0 | integer | | in | F | -!! | mpiroot | mpi_root | master MPI rank | index | 0 | integer | | in | F | -!! | mpicomm | mpi_comm | MPI communicator | index | 0 | integer | | in | F | -!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | -!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | -!! | kdist_lw | K_distribution_file_for_RRTMGP_LW_scheme | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | out | F | -!! | kdist_cldy_lw | K_distribution_file_for_cloudy_RRTMGP_LW_scheme | DDT containing spectral information for cloudy RRTMGP LW radiation scheme | DDT | 0 | ty_cloud_optics | | out | F | -!! | gas_concentrations | Gas_concentrations_for_RRTMGP_suite | DDT containing gas concentrations for RRTMGP radiation scheme | DDT | 0 | ty_gas_concs | | out | F | -!! - ! ######################################################################################### - subroutine rrtmgp_lw_pre_init(Model,mpicomm, mpirank, mpiroot, kdist_lw, kdist_cldy_lw, & - gas_concentrations, errmsg, errflg) - use netcdf - -#ifdef MPI - use mpi -#endif - - ! Inputs - type(GFS_control_type), intent(in) :: & - Model ! DDT containing model control parameters - integer,intent(in) :: & - mpicomm, & ! MPI communicator - mpirank, & ! Current MPI rank - mpiroot ! Master MPI rank - type(ty_gas_optics_rrtmgp),intent(out) :: & - kdist_lw - type(ty_cloud_optics),intent(out) :: & - kdist_cldy_lw - type(ty_gas_concs),intent(out) :: & - gas_concentrations - ! Outputs - character(len=*), intent(out) :: & - errmsg ! Error message - integer, intent(out) :: & - errflg ! Error code - - ! Variables that will be passed to gas_optics%load() - integer, dimension(:), allocatable :: & - kminor_start_lower, & ! used by RRTGMP gas optics - kminor_start_upper ! used by RRTGMP gas optics - integer, dimension(:,:), allocatable :: & - band2gpt, & ! used by RRTGMP gas optics - minor_limits_gpt_lower, & ! used by RRTGMP gas optics - minor_limits_gpt_upper ! used by RRTGMP gas optics - integer, dimension(:,:,:), allocatable :: & - key_species ! used by RRTGMP gas optics - real(kind_phys) :: & - press_ref_trop, & ! used by RRTGMP gas optics - temp_ref_p, & ! used by RRTGMP gas optics - temp_ref_t, & ! used by RRTGMP gas optics - radliq_lwr, & ! used by RRTGMP cloud optics - radliq_upr, & ! used by RRTGMP cloud optics - radliq_fac, & ! used by RRTGMP cloud optics - radice_lwr, & ! used by RRTGMP cloud optics - radice_upr, & ! used by RRTGMP cloud optics - radice_fac ! used by RRTGMP cloud optics - real(kind_phys), dimension(:), allocatable :: & - press_ref, & ! used by RRTGMP gas optics - temp_ref, & ! used by RRTGMP gas optics - pade_sizereg_extliq, & ! used by RRTGMP cloud optics - pade_sizereg_ssaliq, & ! used by RRTGMP cloud optics - pade_sizereg_asyliq, & ! used by RRTGMP cloud optics - pade_sizereg_extice, & ! used by RRTGMP cloud optics - pade_sizereg_ssaice, & ! used by RRTGMP cloud optics - pade_sizereg_asyice ! used by RRTGMP cloud optics - real(kind_phys), dimension(:,:), allocatable :: & - band_lims, & ! used by RRTGMP gas optics - totplnk, & ! used by RRTGMP gas optics - lut_extliq, & ! used by RRTGMP cloud optics - lut_ssaliq, & ! used by RRTGMP cloud optics - lut_asyliq, & ! used by RRTGMP cloud optics - band_lims_cldy ! used by RRTGMP cloud optics - - real(kind_phys), dimension(:,:,:), allocatable :: & - vmr_ref, & ! used by RRTGMP gas optics - kminor_lower, & ! used by RRTGMP gas optics - kminor_upper, & ! used by RRTGMP gas optics - rayl_lower, & ! used by RRTGMP gas optics - rayl_upper, & ! used by RRTGMP gas optics - lut_extice, & ! used by RRTGMP cloud optics - lut_ssaice, & ! used by RRTGMP cloud optics - lut_asyice, & ! used by RRTGMP cloud optics - pade_extliq, & ! used by RRTGMP cloud optics - pade_ssaliq, & ! used by RRTGMP cloud optics - pade_asyliq ! used by RRTGMP cloud optics - real(kind_phys), dimension(:,:,:,:), allocatable :: & - kmajor, & ! used by RRTGMP gas optics - planck_frac, & ! used by RRTGMP gas optics - pade_extice, & ! used by RRTGMP cloud optics - pade_ssaice, & ! used by RRTGMP cloud optics - pade_asyice ! used by RRTGMP cloud optics - character(len=32), dimension(:), allocatable :: & - gas_names, & ! used by RRTGMP gas optics - gas_minor, & ! used by RRTGMP gas optics - identifier_minor, & ! used by RRTGMP gas optics - minor_gases_lower, & ! used by RRTGMP gas optics - minor_gases_upper, & ! used by RRTGMP gas optics - scaling_gas_lower, & ! used by RRTGMP gas optics - scaling_gas_upper ! used by RRTGMP gas optics - logical(wl), dimension(:), allocatable :: & - minor_scales_with_density_lower, & ! used by RRTGMP gas optics - minor_scales_with_density_upper, & ! used by RRTGMP gas optics - scale_by_complement_lower, & ! used by RRTGMP gas optics - scale_by_complement_upper ! used by RRTGMP gas optics - - ! Dimensions (to be broadcast across all processors) - integer :: & - ntemps, & ! used by RRTGMP gas optics - npress, & ! used by RRTGMP gas optics - nabsorbers, & ! used by RRTGMP gas optics - nextrabsorbers, & ! used by RRTGMP gas optics - nminorabsorbers, & ! used by RRTGMP gas optics - nmixingfracs, & ! used by RRTGMP gas optics - nlayers, & ! used by RRTGMP gas optics - nbnds, & ! used by RRTGMP gas optics - ngpts, & ! used by RRTGMP gas optics - npairs, & ! used by RRTGMP gas optics - ninternalSourcetemps, & ! used by RRTGMP gas optics - nminor_absorber_intervals_lower, & ! used by RRTGMP gas optics - nminor_absorber_intervals_upper, & ! used by RRTGMP gas optics - ncontributors_lower, & ! used by RRTGMP gas optics - ncontributors_upper, & ! used by RRTGMP gas optics - nbandLWcldy, & ! used by RRTGMP cloud optics - nsize_liq, & ! used by RRTGMP cloud optics - nsize_ice, & ! used by RRTGMP cloud optics - nsizereg, & ! used by RRTGMP cloud optics - ncoeff_ext, & ! used by RRTGMP cloud optics - ncoeff_ssa_g, & ! used by RRTGMP cloud optics - nbound, & ! used by RRTGMP cloud optics - npairsLWcldy ! used by RRTGMP cloud optics - - ! Local variables - integer :: ncid_lw,dimID,varID,status,igpt,iGas,ij,ierr,ncid_lw_clds - integer,dimension(:),allocatable :: temp1,temp2,temp3,temp4,temp_log_array1,& - temp_log_array2, temp_log_array3, temp_log_array4 - character(len=264) :: kdist_file,kdist_cldy_file - integer,parameter :: max_strlen=256 - - ! Initialize - errmsg = '' - errflg = 0 - - ! Ensure that requested cloud overlap is reasonable. - if ( iovrlw .lt. 0 .or. iovrlw .gt. 3 ) then - print *,' *** Error in specification of cloud overlap flag', & - ' IOVRLW=',iovrlw,' in RLWINIT !!' - stop - elseif ( iovrlw .ge. 2 .and. isubclw .eq. 0 ) then - print *,' *** IOVRLW=',iovrlw,' is not available for', & - ' ISUBCLW=0 setting!!' - print *,' The program uses maximum/random overlap', & - ' instead.' - iovrlw = 1 - endif - - ! Check cloud flags for consistency. - if ((icldflg .eq. 0 .and. ilwcliq .ne. 0) .or. & - (icldflg .eq. 1 .and. ilwcliq .eq. 0)) then - print *,' *** Model cloud scheme inconsistent with LW', & - ' radiation cloud radiative property setup !!' - stop - endif - - ! How are we handling cloud-optics? - rrtmgp_lw_cld_phys = Model%rrtmgp_cld_phys - - ! Filenames are set in the gfs_physics_nml (scm/src/GFS_typedefs.F90) - kdist_file = trim(Model%rrtmgp_root)//trim(Model%kdist_lw_file_gas) - kdist_cldy_file = trim(Model%rrtmgp_root)//trim(Model%kdist_lw_file_clouds) - - ! Read dimensions for k-distribution fields (only on master processor(0)) - if (mpirank .eq. mpiroot) then - if(nf90_open(trim(kdist_file), NF90_WRITE, ncid_lw) .eq. NF90_NOERR) then - status = nf90_inq_dimid(ncid_lw, 'temperature', dimid) - status = nf90_inquire_dimension(ncid_lw, dimid, len=ntemps) - status = nf90_inq_dimid(ncid_lw, 'pressure', dimid) - status = nf90_inquire_dimension(ncid_lw, dimid, len=npress) - status = nf90_inq_dimid(ncid_lw, 'absorber', dimid) - status = nf90_inquire_dimension(ncid_lw, dimid, len=nabsorbers) - status = nf90_inq_dimid(ncid_lw, 'minor_absorber', dimid) - status = nf90_inquire_dimension(ncid_lw, dimid, len=nminorabsorbers) - status = nf90_inq_dimid(ncid_lw, 'absorber_ext', dimid) - status = nf90_inquire_dimension(ncid_lw, dimid, len=nextrabsorbers) - status = nf90_inq_dimid(ncid_lw, 'mixing_fraction', dimid) - status = nf90_inquire_dimension(ncid_lw, dimid, len=nmixingfracs) - status = nf90_inq_dimid(ncid_lw, 'atmos_layer', dimid) - status = nf90_inquire_dimension(ncid_lw, dimid, len=nlayers) - status = nf90_inq_dimid(ncid_lw, 'bnd', dimid) - status = nf90_inquire_dimension(ncid_lw, dimid, len=nbnds) - status = nf90_inq_dimid(ncid_lw, 'gpt', dimid) - status = nf90_inquire_dimension(ncid_lw, dimid, len=ngpts) - status = nf90_inq_dimid(ncid_lw, 'pair', dimid) - status = nf90_inquire_dimension(ncid_lw, dimid, len=npairs) - status = nf90_inq_dimid(ncid_lw, 'contributors_lower', dimid) - status = nf90_inquire_dimension(ncid_lw, dimid, len=ncontributors_lower) - status = nf90_inq_dimid(ncid_lw, 'contributors_upper', dimid) - status = nf90_inquire_dimension(ncid_lw, dimid, len=ncontributors_upper) - status = nf90_inq_dimid(ncid_lw, 'minor_absorber_intervals_lower', dimid) - status = nf90_inquire_dimension(ncid_lw, dimid, len=nminor_absorber_intervals_lower) - status = nf90_inq_dimid(ncid_lw, 'minor_absorber_intervals_upper', dimid) - status = nf90_inquire_dimension(ncid_lw, dimid, len=nminor_absorber_intervals_upper) - status = nf90_inq_dimid(ncid_lw, 'temperature_Planck', dimid) - status = nf90_inquire_dimension(ncid_lw, dimid, len=ninternalSourcetemps) - status = nf90_close(ncid_lw) - endif - endif - - ! Broadcast dimensions to all processors -#ifdef MPI - call MPI_BCAST(ntemps, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(npress, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nminorabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nextraabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nmixingfracs, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nlayers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nbnds, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(ngpts, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(npairs, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(ncontributors_lower, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(ncontributors_upper, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nminor_absorber_intervals_lower, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nminor_absorber_intervals_upper, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(ninternalSourcetemps, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -#endif - - !if (mpirank .eq. mpiroot) then - ! Allocate space for arrays - allocate(gas_names(nabsorbers)) - allocate(scaling_gas_lower(nminor_absorber_intervals_lower)) - allocate(scaling_gas_upper(nminor_absorber_intervals_upper)) - allocate(gas_minor(nminorabsorbers)) - allocate(identifier_minor(nminorabsorbers)) - allocate(minor_gases_lower(nminor_absorber_intervals_lower)) - allocate(minor_gases_upper(nminor_absorber_intervals_upper)) - allocate(minor_limits_gpt_lower(npairs,nminor_absorber_intervals_lower)) - allocate(minor_limits_gpt_upper(npairs,nminor_absorber_intervals_upper)) - allocate(band2gpt(2,nbnds)) - allocate(key_species(2,nlayers,nbnds)) - allocate(band_lims(2,nbnds)) - allocate(press_ref(npress)) - allocate(temp_ref(ntemps)) - allocate(vmr_ref(nlayers, nextrabsorbers, ntemps)) - allocate(kminor_lower(ncontributors_lower, nmixingfracs, ntemps)) - allocate(kmajor(ngpts, nmixingfracs, npress+1, ntemps)) - allocate(kminor_start_lower(nminor_absorber_intervals_lower)) - allocate(kminor_upper(ncontributors_upper, nmixingfracs, ntemps)) - allocate(kminor_start_upper(nminor_absorber_intervals_upper)) - allocate(minor_scales_with_density_lower(nminor_absorber_intervals_lower)) - allocate(minor_scales_with_density_upper(nminor_absorber_intervals_upper)) - allocate(scale_by_complement_lower(nminor_absorber_intervals_lower)) - allocate(scale_by_complement_upper(nminor_absorber_intervals_upper)) - allocate(temp1(nminor_absorber_intervals_lower)) - allocate(temp2(nminor_absorber_intervals_upper)) - allocate(temp3(nminor_absorber_intervals_lower)) - allocate(temp4(nminor_absorber_intervals_upper)) - allocate(totplnk(ninternalSourcetemps, nbnds)) - allocate(planck_frac(ngpts, nmixingfracs, npress+1, ntemps)) - - if (mpirank .eq. mpiroot) then - ! Read in fields from file - if(nf90_open(trim(kdist_file), NF90_WRITE, ncid_lw) .eq. NF90_NOERR) then - status = nf90_inq_varid(ncid_lw,'gas_names',varID) - status = nf90_get_var(ncid_lw,varID,gas_names) - ! - status = nf90_inq_varid(ncid_lw,'scaling_gas_lower',varID) - status = nf90_get_var(ncid_lw,varID,scaling_gas_lower) - ! - status = nf90_inq_varid(ncid_lw,'scaling_gas_upper',varID) - status = nf90_get_var(ncid_lw,varID,scaling_gas_upper) - ! - status = nf90_inq_varid(ncid_lw,'gas_minor',varID) - status = nf90_get_var(ncid_lw,varID,gas_minor) - ! - status = nf90_inq_varid(ncid_lw,'identifier_minor',varID) - status = nf90_get_var(ncid_lw,varID,identifier_minor) - ! - status = nf90_inq_varid(ncid_lw,'minor_gases_lower',varID) - status = nf90_get_var(ncid_lw,varID,minor_gases_lower) - ! - status = nf90_inq_varid(ncid_lw,'minor_gases_upper',varID) - status = nf90_get_var(ncid_lw,varID,minor_gases_upper) - ! - status = nf90_inq_varid(ncid_lw,'minor_limits_gpt_lower',varID) - status = nf90_get_var(ncid_lw,varID,minor_limits_gpt_lower) - ! - status = nf90_inq_varid(ncid_lw,'minor_limits_gpt_upper',varID) - status = nf90_get_var(ncid_lw,varID,minor_limits_gpt_upper) - ! - status = nf90_inq_varid(ncid_lw,'bnd_limits_gpt',varID) - status = nf90_get_var(ncid_lw,varID,band2gpt) - ! - status = nf90_inq_varid(ncid_lw,'key_species',varID) - status = nf90_get_var(ncid_lw,varID,key_species) - ! - status = nf90_inq_varid(ncid_lw,'bnd_limits_wavenumber',varID) - status = nf90_get_var(ncid_lw,varID,band_lims) - ! - status = nf90_inq_varid(ncid_lw,'press_ref',varID) - status = nf90_get_var(ncid_lw,varID,press_ref) - ! - status = nf90_inq_varid(ncid_lw,'temp_ref',varID) - status = nf90_get_var(ncid_lw,varID,temp_ref) - ! - status = nf90_inq_varid(ncid_lw,'absorption_coefficient_ref_P',varID) - status = nf90_get_var(ncid_lw,varID,temp_ref_p) - ! - status = nf90_inq_varid(ncid_lw,'absorption_coefficient_ref_T',varID) - status = nf90_get_var(ncid_lw,varID,temp_ref_t) - ! - status = nf90_inq_varid(ncid_lw,'press_ref_trop',varID) - status = nf90_get_var(ncid_lw,varID,press_ref_trop) - ! - status = nf90_inq_varid(ncid_lw,'kminor_lower',varID) - status = nf90_get_var(ncid_lw,varID,kminor_lower) - ! - status = nf90_inq_varid(ncid_lw,'kminor_upper',varID) - status = nf90_get_var(ncid_lw,varID,kminor_upper) - ! - status = nf90_inq_varid(ncid_lw,'vmr_ref',varID) - status = nf90_get_var(ncid_lw,varID,vmr_ref) - ! - status = nf90_inq_varid(ncid_lw,'kmajor',varID) - status = nf90_get_var(ncid_lw,varID,kmajor) - ! - status = nf90_inq_varid(ncid_lw,'kminor_start_lower',varID) - status = nf90_get_var(ncid_lw,varID,kminor_start_lower) - ! - status = nf90_inq_varid(ncid_lw,'kminor_start_upper',varID) - status = nf90_get_var(ncid_lw,varID,kminor_start_upper) - ! - status = nf90_inq_varid(ncid_lw,'totplnk',varID) - status = nf90_get_var(ncid_lw,varID,totplnk) - ! - status = nf90_inq_varid(ncid_lw,'plank_fraction',varID) - status = nf90_get_var(ncid_lw,varID,planck_frac) - - ! Logical fields are read in as integers and then converted to logicals. - status = nf90_inq_varid(ncid_lw,'minor_scales_with_density_lower',varID) - status = nf90_get_var(ncid_lw,varID,temp1) - minor_scales_with_density_lower(:) = .false. - where(temp1 .eq. 1) minor_scales_with_density_lower(:) = .true. - ! - status = nf90_inq_varid(ncid_lw,'minor_scales_with_density_upper',varID) - status = nf90_get_var(ncid_lw,varID,temp2) - minor_scales_with_density_upper(:) = .false. - where(temp2 .eq. 1) minor_scales_with_density_upper(:) = .true. - ! - status = nf90_inq_varid(ncid_lw,'scale_by_complement_lower',varID) - status = nf90_get_var(ncid_lw,varID,temp3) - scale_by_complement_lower(:) = .false. - where(temp3 .eq. 1) scale_by_complement_lower(:) = .true. - ! - status = nf90_inq_varid(ncid_lw,'scale_by_complement_upper',varID) - status = nf90_get_var(ncid_lw,varID,temp4) - scale_by_complement_upper(:) = .false. - where(temp4 .eq. 1) scale_by_complement_upper(:) = .true. - - ! Close - status = nf90_close(ncid_lw) - endif - endif - - ! Broadcast arrays to all processors -#ifdef MPI - call MPI_BCAST(minor_limits_gpt_upper, size(minor_limits_gpt_upper), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(minor_limits_gpt_lower, size(minor_limits_gpt_lower), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(kminor_start_upper, size(kminor_start_upper), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(kminor_start_lower, size(kminor_start_lower), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(key_species, size(key_species), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(band2gpt, size(band2gpt), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(band_lims, size(band_lims), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(press_ref, size(press_ref), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(temp_ref, size(temp_ref), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(kminor_lower, size(kminor_lower), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(kminor_upper, size(kminor_upper), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(scaling_gas_lower, size(scaling_gas_lower), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(scaling_gas_upper, size(scaling_gas_upper), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(vmr_ref, size(vmr_ref), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(kmajor, size(kmajor), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(temp_ref_p, 1, kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(temp_ref_t, 1, kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(press_ref_trop, 1, kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(totplnk, size(totplnk), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(planck_frac, size(planck_frac), kind_phys, mpiroot, mpicomm, ierr) - ! Character arrays - do ij=1,nabsorbers - call MPI_BCAST(gas_names(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) - enddo - do ij=1,nminorabsorbers - call MPI_BCAST(gas_minor(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) - call MPI_BCAST(identifier_minor(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) - enddo - do ij=1,nminor_absorber_intervals_lower - call MPI_BCAST(minor_gases_lower(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) - enddo - do ij=1,nminor_absorber_intervals_upper - call MPI_BCAST(minor_gases_upper(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) - enddo - ! Logical arrays (First convert to integer-array, then broadcast) - ! - allocate(temp_log_array1(nminor_absorber_intervals_lower)) - where(minor_scales_with_density_lower) - temp_log_array1 = 1 - elsewhere - temp_log_array1 = 0 - end where - call MPI_BCAST(temp_log_array1, size(temp_log_array1), MPI_INTEGER, mpiroot, mpicomm, ierr) - ! - allocate(temp_log_array2(nminor_absorber_intervals_lower)) - where(scale_by_complement_lower) - temp_log_array2 = 1 - elsewhere - temp_log_array2 = 0 - end where - call MPI_BCAST(temp_log_array2, size(temp_log_array2), MPI_INTEGER, mpiroot, mpicomm, ierr) - ! - allocate(temp_log_array3(nminor_absorber_intervals_upper)) - where(minor_scales_with_density_upper) - temp_log_array3 = 1 - elsewhere - temp_log_array3 = 0 - end where - call MPI_BCAST(temp_log_array3, size(temp_log_array3), MPI_INTEGER, mpiroot, mpicomm, ierr) - ! - allocate(temp_log_array4(nminor_absorber_intervals_upper)) - where(scale_by_complement_upper) - temp_log_array4 = 1 - elsewhere - temp_log_array4 = 0 - end where - call MPI_BCAST(temp_log_array4, size(temp_log_array4), MPI_INTEGER, mpiroot, mpicomm, ierr) -#endif - - ! Initialize gas concentrations and gas optics class with data - do iGas=1,nGases - call check_error_msg(gas_concentrations%set_vmr(active_gases(iGas), 0._kind_phys)) - enddo - call check_error_msg(kdist_lw%load(gas_concentrations, gas_names, key_species, band2gpt, & - band_lims, press_ref, press_ref_trop, temp_ref, temp_ref_p, temp_ref_t, & - vmr_ref, kmajor, kminor_lower, kminor_upper, gas_minor,identifier_minor, & - minor_gases_lower, minor_gases_upper, minor_limits_gpt_lower, & - minor_limits_gpt_upper, minor_scales_with_density_lower, & - minor_scales_with_density_upper, scaling_gas_lower, & - scaling_gas_upper, scale_by_complement_lower, & - scale_by_complement_upper, kminor_start_lower, kminor_start_upper, & - totplnk, planck_frac, rayl_lower, rayl_upper)) - - ! Set initial permutation seed for McICA, initially set to number of G-points - ipsdlw0 = kdist_lw%get_ngpt() - - ! ####################################################################################### - ! If RRTMGP cloud-optics are requested, read tables and broadcast. - ! ####################################################################################### - ! Read dimensions for k-distribution fields (only on master processor(0)) - if (mpirank .eq. mpiroot) then - if(nf90_open(trim(kdist_cldy_file), NF90_WRITE, ncid_lw_clds) == NF90_NOERR) then - status = nf90_inq_dimid(ncid_lw_clds, 'nband', dimid) - status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=nbandLWcldy) - status = nf90_inq_dimid(ncid_lw_clds, 'nrghice', dimid) - status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=nrghice) - status = nf90_inq_dimid(ncid_lw_clds, 'nsize_liq', dimid) - status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=nsize_liq) - status = nf90_inq_dimid(ncid_lw_clds, 'nsize_ice', dimid) - status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=nsize_ice) - status = nf90_inq_dimid(ncid_lw_clds, 'nsizereg', dimid) - status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=nsizereg) - status = nf90_inq_dimid(ncid_lw_clds, 'ncoeff_ext', dimid) - status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=ncoeff_ext) - status = nf90_inq_dimid(ncid_lw_clds, 'ncoeff_ssa_g', dimid) - status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=ncoeff_ssa_g) - status = nf90_inq_dimid(ncid_lw_clds, 'nbound', dimid) - status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=nbound) - status = nf90_inq_dimid(ncid_lw_clds, 'pair', dimid) - status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=npairsLWcldy) - status = nf90_close(ncid_lw_clds) - endif - endif - - ! Broadcast dimensions to all processors -#ifdef MPI - if (rrtmgp_lw_cld_phys .eq. 1 .or. rrtmgp_lw_cld_phys .eq. 2) then - call MPI_BCAST(nbandLWcldy, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nrghice, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nsize_liq, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nsize_ice, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nsizereg, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(ncoeff_ext, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(ncoeff_ssa_g, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nbound, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(npairsLWcldy, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - endif -#endif - - if (rrtmgp_lw_cld_phys .eq. 1) then - allocate(lut_extliq(nsize_liq, nBandLWcldy)) - allocate(lut_ssaliq(nsize_liq, nBandLWcldy)) - allocate(lut_asyliq(nsize_liq, nBandLWcldy)) - allocate(lut_extice(nsize_ice, nBandLWcldy, nrghice)) - allocate(lut_ssaice(nsize_ice, nBandLWcldy, nrghice)) - allocate(lut_asyice(nsize_ice, nBandLWcldy, nrghice)) - allocate(band_lims_cldy(2, nBandLWcldy)) - endif - if (rrtmgp_lw_cld_phys .eq. 2) then - allocate(pade_extliq(nbandLWcldy, nsizereg, ncoeff_ext )) - allocate(pade_ssaliq(nbandLWcldy, nsizereg, ncoeff_ssa_g)) - allocate(pade_asyliq(nbandLWcldy, nsizereg, ncoeff_ssa_g)) - allocate(pade_extice(nbandLWcldy, nsizereg, ncoeff_ext, nrghice)) - allocate(pade_ssaice(nbandLWcldy, nsizereg, ncoeff_ssa_g, nrghice)) - allocate(pade_asyice(nbandLWcldy, nsizereg, ncoeff_ssa_g, nrghice)) - allocate(pade_sizereg_extliq(nbound)) - allocate(pade_sizereg_ssaliq(nbound)) - allocate(pade_sizereg_asyliq(nbound)) - allocate(pade_sizereg_extice(nbound)) - allocate(pade_sizereg_ssaice(nbound)) - allocate(pade_sizereg_asyice(nbound)) - allocate(band_lims_cldy(2,nbandLWcldy)) - endif - - ! On master processor, allocate space, read in fields, broadcast to all processors - if (mpirank .eq. mpiroot) then - ! - if (rrtmgp_lw_cld_phys .eq. 1) then - ! - if(nf90_open(trim(kdist_cldy_file), NF90_WRITE, ncid_lw_clds) == NF90_NOERR) then - status = nf90_inq_varid(ncid_lw_clds,'radliq_lwr',varID) - status = nf90_get_var(ncid_lw_clds,varID,radliq_lwr) - status = nf90_inq_varid(ncid_lw_clds,'radliq_upr',varID) - status = nf90_get_var(ncid_lw_clds,varID,radliq_upr) - status = nf90_inq_varid(ncid_lw_clds,'radliq_fac',varID) - status = nf90_get_var(ncid_lw_clds,varID,radliq_fac) - status = nf90_inq_varid(ncid_lw_clds,'radice_lwr',varID) - status = nf90_get_var(ncid_lw_clds,varID,radice_lwr) - status = nf90_inq_varid(ncid_lw_clds,'radice_upr',varID) - status = nf90_get_var(ncid_lw_clds,varID,radice_upr) - status = nf90_inq_varid(ncid_lw_clds,'radice_fac',varID) - status = nf90_get_var(ncid_lw_clds,varID,radice_fac) - status = nf90_inq_varid(ncid_lw_clds,'lut_extliq',varID) - status = nf90_get_var(ncid_lw_clds,varID,lut_extliq) - status = nf90_inq_varid(ncid_lw_clds,'lut_ssaliq',varID) - status = nf90_get_var(ncid_lw_clds,varID,lut_ssaliq) - status = nf90_inq_varid(ncid_lw_clds,'lut_asyliq',varID) - status = nf90_get_var(ncid_lw_clds,varID,lut_asyliq) - status = nf90_inq_varid(ncid_lw_clds,'lut_extice',varID) - status = nf90_get_var(ncid_lw_clds,varID,lut_extice) - status = nf90_inq_varid(ncid_lw_clds,'lut_ssaice',varID) - status = nf90_get_var(ncid_lw_clds,varID,lut_ssaice) - status = nf90_inq_varid(ncid_lw_clds,'lut_asyice',varID) - status = nf90_get_var(ncid_lw_clds,varID,lut_asyice) - status = nf90_inq_varid(ncid_lw_clds,'bnd_limits_wavenumber',varID) - status = nf90_get_var(ncid_lw_clds,varID,band_lims_cldy) - status = nf90_close(ncid_lw_clds) - endif - endif - ! - if (rrtmgp_lw_cld_phys .eq. 2) then - ! - if(nf90_open(trim(kdist_cldy_file), NF90_WRITE, ncid_lw_clds) == NF90_NOERR) then - status = nf90_inq_varid(ncid_lw_clds,'radliq_lwr',varID) - status = nf90_get_var(ncid_lw_clds,varID,radliq_lwr) - status = nf90_inq_varid(ncid_lw_clds,'radliq_upr',varID) - status = nf90_get_var(ncid_lw_clds,varID,radliq_upr) - status = nf90_inq_varid(ncid_lw_clds,'radliq_fac',varID) - status = nf90_get_var(ncid_lw_clds,varID,radliq_fac) - status = nf90_inq_varid(ncid_lw_clds,'radice_lwr',varID) - status = nf90_get_var(ncid_lw_clds,varID,radice_lwr) - status = nf90_inq_varid(ncid_lw_clds,'radice_upr',varID) - status = nf90_get_var(ncid_lw_clds,varID,radice_upr) - status = nf90_inq_varid(ncid_lw_clds,'radice_fac',varID) - status = nf90_get_var(ncid_lw_clds,varID,radice_fac) - status = nf90_inq_varid(ncid_lw_clds,'pade_extliq',varID) - status = nf90_get_var(ncid_lw_clds,varID,pade_extliq) - status = nf90_inq_varid(ncid_lw_clds,'pade_ssaliq',varID) - status = nf90_get_var(ncid_lw_clds,varID,pade_ssaliq) - status = nf90_inq_varid(ncid_lw_clds,'pade_asyliq',varID) - status = nf90_get_var(ncid_lw_clds,varID,pade_asyliq) - status = nf90_inq_varid(ncid_lw_clds,'pade_extice',varID) - status = nf90_get_var(ncid_lw_clds,varID,pade_extice) - status = nf90_inq_varid(ncid_lw_clds,'pade_ssaice',varID) - status = nf90_get_var(ncid_lw_clds,varID,pade_ssaice) - status = nf90_inq_varid(ncid_lw_clds,'pade_asyice',varID) - status = nf90_get_var(ncid_lw_clds,varID,pade_asyice) - status = nf90_inq_varid(ncid_lw_clds,'pade_sizreg_extliq',varID) - status = nf90_get_var(ncid_lw_clds,varID,pade_sizereg_extliq) - status = nf90_inq_varid(ncid_lw_clds,'pade_sizreg_ssaliq',varID) - status = nf90_get_var(ncid_lw_clds,varID,pade_sizereg_ssaliq) - status = nf90_inq_varid(ncid_lw_clds,'pade_sizreg_asyliq',varID) - status = nf90_get_var(ncid_lw_clds,varID,pade_sizereg_asyliq) - status = nf90_inq_varid(ncid_lw_clds,'pade_sizreg_extice',varID) - status = nf90_get_var(ncid_lw_clds,varID,pade_sizereg_extice) - status = nf90_inq_varid(ncid_lw_clds,'pade_sizreg_ssaice',varID) - status = nf90_get_var(ncid_lw_clds,varID,pade_sizereg_ssaice) - status = nf90_inq_varid(ncid_lw_clds,'pade_sizreg_asyice',varID) - status = nf90_get_var(ncid_lw_clds,varID,pade_sizereg_asyice) - status = nf90_inq_varid(ncid_lw_clds,'bnd_limits_wavenumber',varID) - status = nf90_get_var(ncid_lw_clds,varID,band_lims_cldy) - status = nf90_close(ncid_lw_clds) - endif - endif - endif - - ! Broadcast arrays to all processors -#ifdef MPI - if (rrtmgp_lw_cld_phys .eq. 1) then - call MPI_BCAST(radliq_lwr, size(radliq_lwr), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(radliq_upr, size(radliq_upr), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(radliq_fac, size(radliq_fac), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(radice_lwr, size(radice_lwr), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(radice_upr, size(radice_upr), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(radice_fac, size(radice_fac), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_extliq, size(lut_extliq), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_ssaliq, size(lut_ssaliq), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_asyliq, size(lut_asyliq), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_extice, size(lut_extice), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_ssaice, size(lut_ssaice), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_asyice, size(lut_asyice), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(band_lims_cldy), size(band_lims_cldy), kind_phys, mpiroot, mpicomm, ierr) - endif - if (rrtmgp_lw_cld_phys .eq. 2) then - call MPI_BCAST(pade_extliq, size(pade_extliq), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_ssaliq, size(pade_ssaliq), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_asyliq, size(pade_asyliq), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_extice, size(pade_extice), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_ssaice, size(pade_ssaice), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_asyice, size(pade_asyice), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_extliq), size(pade_sizereg_extliq), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_ssaliq), size(pade_sizereg_ssaliq), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_asyliq), size(pade_sizereg_asyliq), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_extice), size(pade_sizereg_extice), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_ssaice), size(pade_sizereg_ssaice), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_asyice), size(pade_sizereg_asyice), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(band_lims_cldy), size(band_lims_cldy), kind_phys, mpiroot, mpicomm, ierr) - endif -#endif - - ! Load tables data for RRTGMP cloud-optics - if (rrtmgp_lw_cld_phys .eq. 1) then - call check_error_msg(kdist_cldy_lw%set_ice_roughness(nrghice)) - call check_error_msg(kdist_cldy_lw%load(band_lims_cldy, radliq_lwr, radliq_upr, & - radliq_fac, radice_lwr, radice_upr, radice_fac, lut_extliq, lut_ssaliq, & - lut_asyliq, lut_extice, lut_ssaice, lut_asyice)) - endif - if (rrtmgp_lw_cld_phys .eq. 2) then - call check_error_msg(kdist_cldy_lw%set_ice_roughness(nrghice)) - call check_error_msg(kdist_cldy_lw%load(band_lims_cldy, pade_extliq, & - pade_ssaliq, pade_asyliq, pade_extice, pade_ssaice, pade_asyice, & - pade_sizereg_extliq, pade_sizereg_ssaliq, pade_sizereg_asyliq, & - pade_sizereg_extice, pade_sizereg_ssaice, pade_sizereg_asyice)) - endif - - end subroutine rrtmgp_lw_pre_init - -!> \section arg_table_rrtmgp_lw_pre_run Argument Table -!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | -!! |------------------|-------------------------------------------|--------------------------------------------------------------------|----------|------|-----------------------|-----------|--------|----------| -!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | -!! | Grid | GFS_grid_type_instance | Fortran DDT containing FV3-GFS grid and interpolation related data | DDT | 0 | GFS_grid_type | | in | F | -!! | Sfcprop | GFS_sfcprop_type_instance | Fortran DDT containing FV3-GFS surface fields | DDT | 0 | GFS_sfcprop_type | | in | F | -!! | Radtend | GFS_radtend_type_instance | Fortran DDT containing FV3-GFS radiation tendencies | DDT | 0 | GFS_radtend_type | | inout | F | -!! | im | horizontal_loop_extent | horizontal loop extent | count | 0 | integer | | in | F | -!! | tsfg | surface_ground_temperature_for_radiation | surface ground temperature for radiation | K | 1 | real | kind_phys | in | F | -!! | tsfa | surface_air_temperature_for_radiation | lowest model layer air temperature for radiation | K | 1 | real | kind_phys | in | F | -!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | -!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | -!! | kdist_lw | K_distribution_file_for_RRTMGP_LW_scheme | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | -!! | sfc_emiss_byband | surface_longwave_emissivity_in_each_band | surface lw emissivity in fraction in each LW band | frac | 2 | real | kind_phys | inout | F | -!! - subroutine rrtmgp_lw_pre_run (Model, Grid, Sfcprop, Radtend, im, tsfg, tsfa, kdist_lw, sfc_emiss_byband, errmsg, errflg) - - use machine, only: kind_phys - - use GFS_typedefs, only: GFS_control_type, & - GFS_grid_type, & - GFS_radtend_type, & - GFS_sfcprop_type - use module_radiation_surface, only: setemis - use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp - - implicit none - type(GFS_control_type), intent(in) :: Model - type(GFS_radtend_type), intent(inout) :: Radtend - type(GFS_sfcprop_type), intent(in) :: Sfcprop - type(GFS_grid_type), intent(in) :: Grid - integer, intent(in) :: im - real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(in) :: tsfa, tsfg - type(ty_gas_optics_rrtmgp),intent(in) :: & - kdist_lw ! DDT containing LW spectral information - real(kind_phys),dimension(kdist_lw%get_nband(),im),intent(inout) :: sfc_emiss_byband - character(len=*), intent(out) :: errmsg - integer, intent(out) :: errflg - integer :: ij - - ! Initialize CCPP error handling variables - errmsg = '' - errflg = 0 - - print*,'In RRTMGP_lW_PRE_RUN(): top',shape(sfc_emiss_byband),im - print*,'In RRTMGP_lW_PRE_RUN(): top',shape(Radtend%semis) - if (Model%lslwr) then -!> - Call module_radiation_surface::setemis(),to setup surface -!! emissivity for LW radiation. - call setemis (Grid%xlon, Grid%xlat, Sfcprop%slmsk, & ! --- inputs - Sfcprop%snowd, Sfcprop%sncovr, Sfcprop%zorl, & - tsfg, tsfa, Sfcprop%hprim, IM, & - Radtend%semis) ! --- outputs - do ij=1,kdist_lw%get_nband() - print*,ij - sfc_emiss_byband(ij,1:im) = Radtend%semis(1:im) - enddo - endif - print*,'In RRTMGP_lW_PRE_RUN(): bottom' - - end subroutine rrtmgp_lw_pre_run - -!> \section arg_table_rrtmgp_lw_pre_finalize Argument Table -!! - subroutine rrtmgp_lw_pre_finalize () - end subroutine rrtmgp_lw_pre_finalize -!! @} - end module rrtmgp_lw_pre diff --git a/physics/rrtmgp_sw.F90 b/physics/rrtmgp_sw.F90 index 9b1d66a42..b1eec1fe1 100644 --- a/physics/rrtmgp_sw.F90 +++ b/physics/rrtmgp_sw.F90 @@ -54,38 +54,30 @@ module rrtmgp_sw nrghice, & ! Number of ice roughness categories ipsdsw0 ! Initial seed for McICA - ! Classes used by rte+rrtmgp -! type(ty_gas_optics_rrtmgp) :: & -! kdist_sw -! type(ty_cloud_optics) :: & -! kdist_sw_cldy - type(ty_gas_concs) :: & - gas_concentrations - public rrtmgp_sw_init, rrtmgp_sw_run, rrtmgp_sw_finalize contains - ! ######################################################################################### - ! rrtmgp_sw_init - ! ######################################################################################### + !! \section arg_table_rrtmgp_sw_init Argument Table -!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | -!! |-----------------|-------------------------------------------------|---------------------------------------------------------------------------|-------|------|----------------------|-----------|--------|----------| -!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | -!! | mpirank | mpi_rank | current MPI rank | index | 0 | integer | | in | F | -!! | mpiroot | mpi_root | master MPI rank | index | 0 | integer | | in | F | -!! | mpicomm | mpi_comm | MPI communicator | index | 0 | integer | | in | F | -!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | -!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | -!! | kdist_sw | K_distribution_file_for_RRTMGP_SW_scheme | DDT containing spectral information for RRTMGP SW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | inout | F | -!! | kdist_sw_cldy | K_distribution_file_for_cloudy_RRTMGP_SW_scheme | DDT containing spectral information for cloudy RRTMGP SW radiation scheme | DDT | 0 | ty_cloud_optics | | inout | F | +!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | +!! |--------------------|-------------------------------------------------|---------------------------------------------------------------------------|-------|------|----------------------|-----------|--------|----------| +!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | +!! | mpirank | mpi_rank | current MPI rank | index | 0 | integer | | in | F | +!! | mpiroot | mpi_root | master MPI rank | index | 0 | integer | | in | F | +!! | mpicomm | mpi_comm | MPI communicator | index | 0 | integer | | in | F | +!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | +!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! | kdist_sw | K_distribution_file_for_RRTMGP_SW_scheme | DDT containing spectral information for RRTMGP SW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | inout | F | +!! | kdist_cldy_sw | K_distribution_file_for_cloudy_RRTMGP_SW_scheme | DDT containing spectral information for cloudy RRTMGP SW radiation scheme | DDT | 0 | ty_cloud_optics | | inout | F | !! ! ######################################################################################### - subroutine rrtmgp_sw_init(Model,mpicomm, mpirank, mpiroot, kdist_sw, kdist_sw_cldy, & + subroutine rrtmgp_sw_init(Model,mpicomm, mpirank, mpiroot, kdist_sw, kdist_cldy_sw, & errmsg, errflg) use netcdf + #ifdef MPI use mpi #endif + ! Inputs type(GFS_control_type), intent(in) :: & Model ! DDT containing model control parameters @@ -93,12 +85,11 @@ subroutine rrtmgp_sw_init(Model,mpicomm, mpirank, mpiroot, kdist_sw, kdist_sw_cl mpicomm, & ! MPI communicator mpirank, & ! Current MPI rank mpiroot ! Master MPI rank - type(ty_gas_optics_rrtmgp) :: & - kdist_sw ! RRTMGP DDT containing SW spectral information - type(ty_cloud_optics) :: & - kdist_sw_cldy -! type(ty_gas_concs_type),intent(inout) :: & -! gas_concentrations + type(ty_gas_optics_rrtmgp),intent(inout) :: & + kdist_sw + type(ty_cloud_optics),intent(inout) :: & + kdist_cldy_sw + ! Outputs character(len=*), intent(out) :: & errmsg ! Error message @@ -107,6 +98,8 @@ subroutine rrtmgp_sw_init(Model,mpicomm, mpirank, mpiroot, kdist_sw, kdist_sw_cl ! Fields from the K-distribution files ! Variables that will be passed to gas_optics%load() + type(ty_gas_concs) :: & + gas_concentrations integer, dimension(:), allocatable :: & kminor_start_lower_sw, & ! used by RRTGMP gas optics kminor_start_upper_sw ! used by RRTGMP gas optics @@ -505,7 +498,7 @@ subroutine rrtmgp_sw_init(Model,mpicomm, mpirank, mpiroot, kdist_sw, kdist_sw_cl ! Initialize gas concentrations and gas optics class with data do iGas=1,nGases call check_error_msg(gas_concentrations%set_vmr(active_gases(iGas), 0._kind_phys)) - enddo + enddo call check_error_msg(kdist_sw%load(gas_concentrations, gas_names_sw, key_species_sw, band2gpt_sw, & band_lims_sw, press_ref_sw, press_ref_trop_sw, temp_ref_sw, temp_ref_p_sw, temp_ref_t_sw, & vmr_ref_sw, kmajor_sw, kminor_lower_sw, kminor_upper_sw, gas_minor_sw,identifier_minor_sw, & @@ -709,15 +702,15 @@ subroutine rrtmgp_sw_init(Model,mpicomm, mpirank, mpiroot, kdist_sw, kdist_sw_cl ! Load tables data for RRTGMP cloud-optics if (rrtmgp_sw_cld_phys .eq. 1) then - call check_error_msg(kdist_sw_cldy%set_ice_roughness(nrghice)) - call check_error_msg(kdist_sw_cldy%load(band_lims_cldy_sw, radliq_lwr_sw, & + call check_error_msg(kdist_cldy_sw%set_ice_roughness(nrghice)) + call check_error_msg(kdist_cldy_sw%load(band_lims_cldy_sw, radliq_lwr_sw, & radliq_upr_sw, radliq_fac_sw, radice_lwr_sw, radice_upr_sw, radice_fac_sw, & lut_extliq_sw, lut_ssaliq_sw, lut_asyliq_sw, lut_extice_sw, lut_ssaice_sw, & lut_asyice_sw)) endif if (rrtmgp_sw_cld_phys .eq. 2) then - call check_error_msg(kdist_sw_cldy%set_ice_roughness(nrghice)) - call check_error_msg(kdist_sw_cldy%load(band_lims_cldy_sw, pade_extliq_sw, & + call check_error_msg(kdist_cldy_sw%set_ice_roughness(nrghice)) + call check_error_msg(kdist_cldy_sw%load(band_lims_cldy_sw, pade_extliq_sw, & pade_ssaliq_sw, pade_asyliq_sw, pade_extice_sw, pade_ssaice_sw, pade_asyice_sw, & pade_sizereg_extliq_sw, pade_sizereg_ssaliq_sw, pade_sizereg_asyliq_sw, & pade_sizereg_extice_sw, pade_sizereg_ssaice_sw, pade_sizereg_asyice_sw)) @@ -787,13 +780,13 @@ end subroutine rrtmgp_sw_init !! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | !! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | !! | kdist_sw | K_distribution_file_for_RRTMGP_SW_scheme | DDT containing spectral information for RRTMGP SW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | -!! | kdist_sw_cldy | K_distribution_file_for_cloudy_RRTMGP_SW_scheme | DDT containing spectral information for cloudy RRTMGP SW radiation scheme | DDT | 0 | ty_cloud_optics | | inout | F | +!! | kdist_cldy_sw | K_distribution_file_for_cloudy_RRTMGP_SW_scheme | DDT containing spectral information for cloudy RRTMGP SW radiation scheme | DDT | 0 | ty_cloud_optics | | in | F | !! subroutine rrtmgp_sw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr_n2o, & ! IN vmr_ch4, vmr_o2, vmr_co, vmr_cfc11, vmr_cfc12, vmr_cfc22, vmr_ccl4, icseed, tau_aer, & ! IN ssa_aer, asy_aer, sfcalb_nir_dir, sfcalb_nir_dif, sfcalb_uvis_dir, sfcalb_uvis_dif, & ! IN dzlyr, delpin, de_lgth, cossza, solcon, nday, idxday, ncol, nlay, lprint, cldfrac, & ! IN - lsswr, kdist_sw, kdist_sw_cldy, & ! IN + lsswr, kdist_sw, kdist_cldy_sw, & ! IN hswc, topflx, sfcflx, cldtau, & ! OUT hsw0, hswB, flxprf, fdncmp, cld_lwp, cld_ref_liq, cld_iwp, cld_ref_ice, cld_rwp, & ! OUT(optional) cld_ref_rain, cld_swp, cld_ref_snow, cld_od, cld_ssa, cld_asy, & ! OUT(optional) @@ -817,9 +810,9 @@ subroutine rrtmgp_sw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr type(ty_gas_optics_rrtmgp),intent(in) :: & kdist_sw ! DDT containing LW spectral information type(ty_cloud_optics),intent(in) :: & - kdist_sw_cldy -! type(ty_gas_concs_type),intent(inout) :: & -! gas_concentrations + kdist_cldy_sw + !type(ty_gas_concs),intent(inout) :: & + ! gas_concentrations real(kind_phys), intent(in) :: & solcon ! Solar constant (W/m2) real(kind_phys), dimension(ncol), intent(in) :: & @@ -906,6 +899,8 @@ subroutine rrtmgp_sw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr ! visdf - downward uv+vis diffused flux (W/m2) ! RTE+RRTMGP classes + type(ty_gas_concs) :: & + gas_concentrations type(ty_optical_props_2str) :: & optical_props_clr, & ! Optical properties for gaseous atmosphere optical_props_aer, & ! Optical properties for aerosols @@ -1014,11 +1009,11 @@ subroutine rrtmgp_sw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr ! RRTMGP cloud_optics expects particle size to be in a certain range. bound here if (rrtmgp_sw_cld_phys .gt. 0) then cld_ref_ice2 = cld_ref_ice - where(cld_ref_ice2 .gt. kdist_sw_cldy%get_max_radius_ice()) cld_ref_ice2=kdist_sw_cldy%get_max_radius_ice() - where(cld_ref_ice2 .lt. kdist_sw_cldy%get_min_radius_ice()) cld_ref_ice2=kdist_sw_cldy%get_min_radius_ice() + where(cld_ref_ice2 .gt. kdist_cldy_sw%get_max_radius_ice()) cld_ref_ice2=kdist_cldy_sw%get_max_radius_ice() + where(cld_ref_ice2 .lt. kdist_cldy_sw%get_min_radius_ice()) cld_ref_ice2=kdist_cldy_sw%get_min_radius_ice() cld_ref_liq2 = cld_ref_liq - where(cld_ref_liq2 .gt. kdist_sw_cldy%get_max_radius_liq()) cld_ref_liq2=kdist_sw_cldy%get_max_radius_liq() - where(cld_ref_liq2 .lt. kdist_sw_cldy%get_min_radius_liq()) cld_ref_liq2=kdist_sw_cldy%get_min_radius_liq() + where(cld_ref_liq2 .gt. kdist_cldy_sw%get_max_radius_liq()) cld_ref_liq2=kdist_cldy_sw%get_max_radius_liq() + where(cld_ref_liq2 .lt. kdist_cldy_sw%get_min_radius_liq()) cld_ref_liq2=kdist_cldy_sw%get_min_radius_liq() endif ! Compute dry air column amount @@ -1077,17 +1072,17 @@ subroutine rrtmgp_sw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr if (nDay .gt. 0) then ! Allocate space for gas optical properties - ! Clear-sky - call check_error_msg(optical_props_clr%alloc_2str( nday, nlay, kdist_sw)) - call check_error_msg(optical_props_mcica%alloc_2str(nday, nlay, kdist_sw)) ! Cloud optics [nCol,nLay,nBands] - call check_error_msg(optical_props_cldy%init(optical_props_clr%get_band_lims_wavenumber())) + call check_error_msg(optical_props_cldy%init(kdist_sw%get_band_lims_wavenumber())) call check_error_msg(optical_props_cldy%alloc_2str(ncol,nlay)) ! Aerosol optics [Ccol,nLay,nBands] - call check_error_msg(optical_props_aer%init(optical_props_clr%get_band_lims_wavenumber())) + call check_error_msg(optical_props_aer%init(kdist_sw%get_band_lims_wavenumber())) call check_error_msg(optical_props_aer%alloc_2str(ncol,nlay)) + ! Cloud optics sampled [nCol,nLay,nGpts] + call check_error_msg(optical_props_mcica%alloc_2str(ncol, nlay, kdist_sw)) + - ! Initialize RRTMGP files + ! Initialize RRTMGP DDT containing 2D(3D) fluxes fluxAllSky%flux_up => flux_up_allSky fluxAllsky%flux_dn => flux_dn_allSky fluxClrSky%flux_up => flux_up_clrSky @@ -1157,7 +1152,7 @@ subroutine rrtmgp_sw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr ! ii) Use RRTMGP cloud-optics. if (rrtmgp_sw_cld_phys .gt. 0) then - call check_error_msg(kdist_sw_cldy%cloud_optics(nday, nlay, nBandsSW, nrghice, & + call check_error_msg(kdist_cldy_sw%cloud_optics(nday, nlay, nBandsSW, nrghice, & liqmask(idxday,1:nLay), icemask(idxday,1:nLay), cld_lwp(idxday,1:nLay), & cld_iwp(idxday,1:nLay), cld_ref_liq2(idxday,1:nLay), & cld_ref_ice2(idxday,1:nLay), optical_props_cldy)) @@ -1190,6 +1185,9 @@ subroutine rrtmgp_sw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr ! ####################################################################################### ! Compute fluxes ! ####################################################################################### + print*,'In rrmtgp_sw(): ' + print*,' shape(optical_props_aerosol%tau): ',shape(optical_props_aer%tau) + print*,' shape(optical_props_clds%tau): ',shape(optical_props_mcica%tau) call check_error_msg(rte_sw( & kdist_sw, & gas_concentrations, & @@ -1271,7 +1269,7 @@ subroutine check_error_msg(error_msg) character(len=*), intent(in) :: error_msg if(error_msg /= "") then - print*,"ERROR(rrtmgp_sw_main.F90): " + print*,"ERROR(rrtmgp_sw.F90): " print*,trim(error_msg) return end if From 129b829e2d1cd8cd837526d75423172510d37878 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Tue, 28 May 2019 10:04:25 -0600 Subject: [PATCH 026/167] In progress... --- physics/GFS_rrtmgp_post.F90 | 395 +++++--- physics/GFS_rrtmgp_pre.F90 | 1769 ++++++++++++++++++----------------- physics/rrtmgp_lw.F90 | 131 ++- physics/rrtmgp_sw.F90 | 717 +++----------- 4 files changed, 1402 insertions(+), 1610 deletions(-) diff --git a/physics/GFS_rrtmgp_post.F90 b/physics/GFS_rrtmgp_post.F90 index 1d5002b93..150970c8b 100644 --- a/physics/GFS_rrtmgp_post.F90 +++ b/physics/GFS_rrtmgp_post.F90 @@ -9,14 +9,13 @@ module GFS_rrtmgp_post GFS_radtend_type, & GFS_diag_type use module_radiation_aerosols, only: NSPC1 - use module_radsw_parameters, only: cmpfsw_type use module_radlw_parameters, only: topflw_type, sfcflw_type, proflw_type - use module_radsw_parameters, only: topfsw_type, sfcfsw_type, profsw_type + use module_radsw_parameters, only: topfsw_type, sfcfsw_type, profsw_type, cmpfsw_type ! RRTMGP DDT's use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp use mo_fluxes_byband, only: ty_fluxes_byband use mo_heating_rates, only: compute_heating_rate - use rrtmgp_lw, only: check_error_msg + use rrtmgp_sw, only: check_error_msg implicit none contains @@ -29,46 +28,63 @@ subroutine GFS_rrtmgp_post_init () end subroutine GFS_rrtmgp_post_init !> \section arg_table_GFS_rrtmgp_post_run Argument Table -!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | -!! |----------------|-----------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------|----------|------|----------------------|-----------|--------|----------| -!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | -!! | Grid | GFS_grid_type_instance | Fortran DDT containing FV3-GFS grid and interpolation related data | DDT | 0 | GFS_grid_type | | in | F | -!! | Diag | GFS_diag_type_instance | Fortran DDT containing FV3-GFS diagnotics data | DDT | 0 | GFS_diag_type | | inout | F | -!! | Radtend | GFS_radtend_type_instance | Fortran DDT containing FV3-GFS radiation tendencies | DDT | 0 | GFS_radtend_type | | inout | F | -!! | Statein | GFS_statein_type_instance | Fortran DDT containing FV3-GFS prognostic state data in from dycore | DDT | 0 | GFS_statein_type | | in | F | -!! | Coupling | GFS_coupling_type_instance | Fortran DDT containing FV3-GFS fields to/from coupling with other components | DDT | 0 | GFS_coupling_type | | inout | F | -!! | scmpsw | components_of_surface_downward_shortwave_fluxes | derived type for special components of surface downward shortwave fluxes | W m-2 | 1 | cmpfsw_type | | in | F | -!! | im | horizontal_loop_extent | horizontal loop extent | count | 0 | integer | | in | F | -!! | lm | vertical_layer_dimension_for_radiation | number of vertical layers for radiation calculation | count | 0 | integer | | in | F | -!! | ltp | extra_top_layer | extra top layers | none | 0 | integer | | in | F | -!! | kt | vertical_index_difference_between_layer_and_upper_bound | vertical index difference between layer and upper bound | index | 0 | integer | | in | F | -!! | kb | vertical_index_difference_between_layer_and_lower_bound | vertical index difference between layer and lower bound | index | 0 | integer | | in | F | -!! | kd | vertical_index_difference_between_inout_and_local | vertical index difference between in/out and local | index | 0 | integer | | in | F | -!! | raddt | time_step_for_radiation | radiation time step | s | 0 | real | kind_phys | in | F | -!! | aerodp | atmosphere_optical_thickness_due_to_ambient_aerosol_particles | vertical integrated optical depth for various aerosol species | none | 2 | real | kind_phys | in | F | -!! | cldsa | cloud_area_fraction_for_radiation | fraction of clouds for low, middle, high, total and BL | frac | 2 | real | kind_phys | in | F | -!! | mtopa | model_layer_number_at_cloud_top | vertical indices for low, middle and high cloud tops | index | 2 | integer | | in | F | -!! | mbota | model_layer_number_at_cloud_base | vertical indices for low, middle and high cloud bases | index | 2 | integer | | in | F | -!! | cloud_fraction | total_cloud_fraction | layer total cloud fraction | frac | 2 | real | kind_phys | in | F | -!! | cldtaulw | cloud_optical_depth_layers_at_10mu_band | approx 10mu band layer cloud optical depth | none | 2 | real | kind_phys | in | F | -!! | cldtausw | cloud_optical_depth_layers_at_0.55mu_band | approx .55mu band layer cloud optical depth | none | 2 | real | kind_phys | in | F | -!! | tsfa | surface_air_temperature_for_radiation | lowest model layer air temperature for radiation | K | 1 | real | kind_phys | in | F | -!! | p_lev | air_pressure_at_interface_for_radiation_in_hPa | air pressure level | hPa | 2 | real | kind_phys | in | F | -!! | fluxLW_allsky | lw_flux_profiles_byband_allsky | Fortran DDT containing RRTMGP 3D fluxes | DDT | 0 | ty_fluxes_byband | | in | F | -!! | fluxLW_clrsky | lw_flux_profiles_byband_clrsky | Fortran DDT containing RRTMGP 3D fluxes | DDT | 0 | ty_fluxes_byband | | in | F | -!! | kdist_lw | K_distribution_file_for_RRTMGP_LW_scheme | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | -!! | hlwc | tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_step | longwave total sky heating rate | K s-1 | 2 | real | kind_phys | out | F | -!! | topflx | lw_fluxes_top_atmosphere | longwave total sky fluxes at the top of the atm | W m-2 | 1 | topflw_type | | inout | F | -!! | sfcflx | lw_fluxes_sfc | longwave total sky fluxes at the Earth surface | W m-2 | 1 | sfcflw_type | | inout | F | -!! | hlw0 | tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_time_step | longwave clear sky heating rate | K s-1 | 2 | real | kind_phys | inout | T | -!! | flxprf | lw_fluxes | lw fluxes total sky / csk and up / down at levels | W m-2 | 2 | proflw_type | | inout | T | -!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | -!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | +!! |-------------------|------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------|----------|------|----------------------|-----------|--------|----------| +!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | +!! | Grid | GFS_grid_type_instance | Fortran DDT containing FV3-GFS grid and interpolation related data | DDT | 0 | GFS_grid_type | | in | F | +!! | Diag | GFS_diag_type_instance | Fortran DDT containing FV3-GFS diagnotics data | DDT | 0 | GFS_diag_type | | inout | F | +!! | Radtend | GFS_radtend_type_instance | Fortran DDT containing FV3-GFS radiation tendencies | DDT | 0 | GFS_radtend_type | | inout | F | +!! | Statein | GFS_statein_type_instance | Fortran DDT containing FV3-GFS prognostic state data in from dycore | DDT | 0 | GFS_statein_type | | in | F | +!! | Coupling | GFS_coupling_type_instance | Fortran DDT containing FV3-GFS fields to/from coupling with other components | DDT | 0 | GFS_coupling_type | | inout | F | +!! | scmpsw | components_of_surface_downward_shortwave_fluxes | derived type for special components of surface downward shortwave fluxes | W m-2 | 1 | cmpfsw_type | | inout | T | +!! | im | horizontal_loop_extent | horizontal loop extent | count | 0 | integer | | in | F | +!! | lm | vertical_layer_dimension_for_radiation | number of vertical layers for radiation calculation | count | 0 | integer | | in | F | +!! | ltp | extra_top_layer | extra top layers | none | 0 | integer | | in | F | +!! | kt | vertical_index_difference_between_layer_and_upper_bound | vertical index difference between layer and upper bound | index | 0 | integer | | in | F | +!! | kb | vertical_index_difference_between_layer_and_lower_bound | vertical index difference between layer and lower bound | index | 0 | integer | | in | F | +!! | kd | vertical_index_difference_between_inout_and_local | vertical index difference between in/out and local | index | 0 | integer | | in | F | +!! | raddt | time_step_for_radiation | radiation time step | s | 0 | real | kind_phys | in | F | +!! | aerodp | atmosphere_optical_thickness_due_to_ambient_aerosol_particles | vertical integrated optical depth for various aerosol species | none | 2 | real | kind_phys | in | F | +!! | cldsa | cloud_area_fraction_for_radiation | fraction of clouds for low, middle, high, total and BL | frac | 2 | real | kind_phys | in | F | +!! | mtopa | model_layer_number_at_cloud_top | vertical indices for low, middle and high cloud tops | index | 2 | integer | | in | F | +!! | mbota | model_layer_number_at_cloud_base | vertical indices for low, middle and high cloud bases | index | 2 | integer | | in | F | +!! | cloud_fraction | total_cloud_fraction | layer total cloud fraction | frac | 2 | real | kind_phys | in | F | +!! | cldtaulw | cloud_optical_depth_layers_at_10mu_band | approx 10mu band layer cloud optical depth | none | 2 | real | kind_phys | in | F | +!! | cldtausw | cloud_optical_depth_layers_at_0.55mu_band | approx .55mu band layer cloud optical depth | none | 2 | real | kind_phys | in | F | +!! | tsfa | surface_air_temperature_for_radiation | lowest model layer air temperature for radiation | K | 1 | real | kind_phys | in | F | +!! | p_lev | air_pressure_at_interface_for_radiation_in_hPa | air pressure level | hPa | 2 | real | kind_phys | in | F | +!! | nday | daytime_points_dimension | daytime points dimension | count | 0 | integer | | in | F | +!! | idxday | daytime_points | daytime points | index | 1 | integer | | in | F | +!! | fluxLW_allsky | lw_flux_profiles_byband_allsky | Fortran DDT containing RRTMGP 3D fluxes | DDT | 0 | ty_fluxes_byband | | in | F | +!! | fluxLW_clrsky | lw_flux_profiles_byband_clrsky | Fortran DDT containing RRTMGP 3D fluxes | DDT | 0 | ty_fluxes_byband | | in | F | +!! | fluxSW_allsky | sw_flux_profiles_byband_allsky | Fortran DDT containing RRTMGP 3D fluxes | DDT | 0 | ty_fluxes_byband | | in | F | +!! | fluxSW_clrsky | sw_flux_profiles_byband_clrsky | Fortran DDT containing RRTMGP 3D fluxes | DDT | 0 | ty_fluxes_byband | | in | F | +!! | kdist_lw | K_distribution_file_for_RRTMGP_LW_scheme | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | +!! | kdist_sw | K_distribution_file_for_RRTMGP_SW_scheme | DDT containing spectral information for RRTMGP SW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | +!! | sfc_alb_nir_dir | surface_shortwave_albedo_near_infrared_direct_in_each_band | surface sw near-infrared direct albedo in each SW band | frac | 2 | real | kind_phys | in | F | +!! | sfc_alb_nir_dif | surface_shortwave_albedo_near_infrared_diffuse_in_each_band | surface sw near-infrared diffuse albedo in each SW band | frac | 2 | real | kind_phys | in | F | +!! | sfc_alb_uvvis_dir | surface_shortwave_albedo_uv_visible_direct_in_each_band | surface sw uv-visible direct albedo in each SW band | frac | 2 | real | kind_phys | in | F | +!! | sfc_alb_uvvis_dif | surface_shortwave_albedo_uv_visible_diffuse_in_each_band | surface sw uv-visible diffuse albedo in each SW band | frac | 2 | real | kind_phys | in | F | +!! | hlwc | tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_step | longwave total sky heating rate | K s-1 | 2 | real | kind_phys | out | F | +!! | hswc | tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step | shortwave total sky heating rate | K s-1 | 2 | real | kind_phys | out | F | +!! | topflx_lw | lw_fluxes_top_atmosphere | longwave total sky fluxes at the top of the atm | W m-2 | 1 | topflw_type | | inout | F | +!! | sfcflx_lw | lw_fluxes_sfc | longwave total sky fluxes at the Earth surface | W m-2 | 1 | sfcflw_type | | inout | F | +!! | topflx_sw | sw_fluxes_top_atmosphere | shortwave total sky fluxes at the top of the atm | W m-2 | 1 | topfsw_type | | inout | F | +!! | sfcflx_sw | sw_fluxes_sfc | shortwave total sky fluxes at the Earth surface | W m-2 | 1 | sfcfsw_type | | inout | F | +!! | flxprf_lw | lw_fluxes | lw fluxes total sky / csk and up / down at levels | W m-2 | 2 | proflw_type | | inout | T | +!! | flxprf_sw | sw_fluxes | sw fluxes total sky / csk and up / down at levels | W m-2 | 2 | profsw_type | | inout | T | +!! | hlw0 | tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_time_step | longwave clear sky heating rate | K s-1 | 2 | real | kind_phys | inout | T | +!! | hsw0 | tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_time_step | shortwave clear sky heating rate | K s-1 | 2 | real | kind_phys | inout | T | +!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | +!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | !! subroutine GFS_rrtmgp_post_run (Model, Grid, Diag, Radtend, Statein, & Coupling, scmpsw, im, lm, ltp, kt, kb, kd, raddt, aerodp, & - cldsa, mtopa, mbota, cloud_fraction, cldtaulw, cldtausw, p_lev, kdist_lw, & - tsfa, fluxLW_allsky, fluxLW_clrsky, hlwc, topflx, sfcflx, hlw0, flxprf,errmsg, errflg) + cldsa, mtopa, mbota, cloud_fraction, cldtaulw, cldtausw, p_lev, kdist_lw, kdist_sw, & + sfc_alb_nir_dir, sfc_alb_nir_dif, sfc_alb_uvvis_dir, & + sfc_alb_uvvis_dif, & + tsfa, nday, idxday, fluxSW_allsky, fluxSW_clrsky,fluxLW_allsky, fluxLW_clrsky,& + hlwc, hswc, topflx_sw, sfcflx_sw, flxprf_sw, topflx_lw, sfcflx_lw, flxprf_lw, hlw0, hsw0, errmsg, errflg) ! Inputs type(GFS_control_type), intent(in) :: & @@ -83,15 +99,17 @@ subroutine GFS_rrtmgp_post_run (Model, Grid, Diag, Radtend, Statein, & Radtend ! Fortran DDT containing FV3-GFS radiation tendencies type(GFS_diag_type), intent(inout) :: & Diag ! Fortran DDT containing FV3-GFS diagnotics data - type(cmpfsw_type), dimension(size(Grid%xlon,1)), intent(in) :: & - scmpsw ! derived type for special components of surface downward shortwave fluxes + integer, intent(in) :: & im, & ! Horizontal loop extent lm, & ! Number of vertical layers for radiation calculation ltp, & ! Extra-top-layers kt, & ! Vertical index difference between layer and upper bound kb, & ! Vertical index difference between layer and upper bound - kd ! Vertical index difference between in/out and local + kd, & ! Vertical index difference between in/out and local + nDay ! Number of daylit columns + integer, intent(in), dimension(nday) :: & + idxday ! Index array for daytime points real(kind_phys), intent(in) :: & raddt ! Radiation time step real(kind_phys), dimension(size(Grid%xlon,1)), intent(in) :: & @@ -108,26 +126,45 @@ subroutine GFS_rrtmgp_post_run (Model, Grid, Diag, Radtend, Statein, & cldtausw, & ! approx .55mu band layer cloud optical depth cldtaulw ! approx 10mu band layer cloud optical depth type(ty_gas_optics_rrtmgp),intent(in) :: & - kdist_lw ! DDT containing LW spectral information + kdist_lw, & ! DDT containing LW spectral information + kdist_sw ! DDT containing SW spectral information real(kind_phys), dimension(size(Grid%xlon,1), Model%levr+LTP+1), intent(in) :: & - p_lev ! Pressure @ model layer-interfaces (hPa) + p_lev ! Pressure @ model layer-interfaces (hPa) type(ty_fluxes_byband),intent(in) :: & - fluxLW_allsky, & ! All-sky flux (W/m2) - fluxLW_clrsky ! Clear-sky flux (W/m2) - - ! Outputs + fluxLW_allsky, & ! Longwave all-sky flux (W/m2) + fluxLW_clrsky, & ! Longwave clear-sky flux (W/m2) + fluxSW_allsky, & ! Shortwave all-sky flux (W/m2) + fluxSW_clrsky ! Shortwave clear-sky flux (W/m2) + real(kind_phys),dimension(kdist_sw%get_nband(),size(Grid%xlon,1)),intent(in) :: & + sfc_alb_nir_dir, & ! Shortwave surface albedo (nIR-direct) + sfc_alb_nir_dif, & ! Shortwave surface albedo (nIR-diffuse) + sfc_alb_uvvis_dir, & ! Shortwave surface albedo (uvvis-direct) + sfc_alb_uvvis_dif ! Shortwave surface albedo (uvvis-diffuse) + + ! Outputs (mandatory) character(len=*), intent(out) :: & errmsg integer, intent(out) :: & errflg real(kind_phys),dimension(size(Grid%xlon,1), Model%levr+LTP),intent(out) :: & - hlwc ! All-sky heating-rate (K/sec) + hlwc, & ! Longwave all-sky heating-rate (K/sec) + hswc ! Shortwave all-sky heating-rate (K/sec) type(topflw_type), dimension(size(Grid%xlon,1)), intent(inout) :: & - topflx ! radiation fluxes at top, components: + topflx_lw ! radiation fluxes at top, components: ! upfxc - total sky upward flux at top (w/m2) ! upfx0 - clear sky upward flux at top (w/m2) type(sfcflw_type), dimension(size(Grid%xlon,1)), intent(inout) :: & - sfcflx ! radiation fluxes at sfc, components: + sfcflx_lw ! radiation fluxes at sfc, components: + ! upfxc - total sky upward flux at sfc (w/m2) + ! upfx0 - clear sky upward flux at sfc (w/m2) + ! dnfxc - total sky downward flux at sfc (w/m2) + ! dnfx0 - clear sky downward flux at sfc (w/m2) + type(topfsw_type), dimension(size(Grid%xlon,1)), intent(inout) :: & + topflx_sw ! radiation fluxes at top, components: + ! upfxc - total sky upward flux at top (w/m2) + ! upfx0 - clear sky upward flux at top (w/m2) + type(sfcfsw_type), dimension(size(Grid%xlon,1)), intent(inout) :: & + sfcflx_sw ! radiation fluxes at sfc, components: ! upfxc - total sky upward flux at sfc (w/m2) ! upfx0 - clear sky upward flux at sfc (w/m2) ! dnfxc - total sky downward flux at sfc (w/m2) @@ -135,20 +172,34 @@ subroutine GFS_rrtmgp_post_run (Model, Grid, Diag, Radtend, Statein, & ! Outputs (optional) real(kind_phys), dimension(size(Grid%xlon,1), Model%levr+LTP), optional, intent(inout) :: & - hlw0 ! Clear-sky heating rate (K/sec) + hlw0, & ! Longwave clear-sky heating rate (K/sec) + hsw0 ! Shortwave clear-sky heating-rate (K/sec) type(proflw_type), dimension(size(Grid%xlon,1), Model%levr+LTP+1), optional, intent(inout) :: & - flxprf ! 2D radiative fluxes, components: - ! upfxc - total sky upward flux (W/m2) - ! dnfxc - total sky dnward flux (W/m2) - ! upfx0 - clear sky upward flux (W/m2) - ! dnfx0 - clear sky dnward flux (W/m2) - + flxprf_lw ! 2D radiative fluxes, components: + ! upfxc - total sky upward flux (W/m2) + ! dnfxc - total sky dnward flux (W/m2) + ! upfx0 - clear sky upward flux (W/m2) + ! dnfx0 - clear sky dnward flux (W/m2) + type(profsw_type), dimension(size(Grid%xlon,1), Model%levr+LTP+1), intent(inout), optional :: & + flxprf_sw ! 2D radiative fluxes, components: + ! upfxc - total sky upward flux (W/m2) + ! dnfxc - total sky dnward flux (W/m2) + ! upfx0 - clear sky upward flux (W/m2) + ! dnfx0 - clear sky dnward flux (W/m2) + type(cmpfsw_type), dimension(size(Grid%xlon,1)), intent(inout), optional :: & + scmpsw ! 2D surface fluxes, components: + ! uvbfc - total sky downward uv-b flux at (W/m2) + ! uvbf0 - clear sky downward uv-b flux at (W/m2) + ! nirbm - downward nir direct beam flux (W/m2) + ! nirdf - downward nir diffused flux (W/m2) + ! visbm - downward uv+vis direct beam flux (W/m2) + ! visdf - downward uv+vis diffused flux (W/m2) ! Local variables integer :: i, j, k, k1, itop, ibtc, iBand, iSFC, iTOA real(kind_phys) :: tem0d, tem1, tem2 - real(kind_phys), dimension(size(Grid%xlon,1), Model%levr+LTP) :: thetaTendClrSky, thetaTendAllSky - logical :: l_ClrSky_HR, l_fluxes2D, top_at_1 - + real(kind_phys), dimension(nDay, Model%levr+LTP) :: thetaTendClrSky, thetaTendAllSky + logical :: l_clrskylw_hr,l_clrskysw_hr, l_fluxeslw2d, l_fluxessw2d, top_at_1, l_sfcFluxessw1D + ! Initialize CCPP error handling variables errmsg = '' errflg = 0 @@ -156,8 +207,12 @@ subroutine GFS_rrtmgp_post_run (Model, Grid, Diag, Radtend, Statein, & if (.not. (Model%lsswr .or. Model%lslwr)) return ! Are any optional outputs requested? - l_ClrSky_HR = present(hlw0) - l_fluxes2D = present(flxprf) + l_clrskylw_hr = present(hlw0) + l_fluxeslw2d = present(flxprf_lw) + l_clrskysw_hr = present(hsw0) + l_fluxessw2d = present(flxprf_sw) + l_sfcfluxessw1D = present(scmpsw) + ! What is vertical ordering? top_at_1 = (p_lev(1,1) .lt. p_lev(1, Model%levr+LTP)) @@ -174,56 +229,50 @@ subroutine GFS_rrtmgp_post_run (Model, Grid, Diag, Radtend, Statein, & ! ####################################################################################### if (Model%lslwr) then ! Clear-sky heating-rate (optional) - if (l_ClrSky_HR) then - call check_error_msg(compute_heating_rate( & + if (l_clrskylw_hr) then + call check_error_msg('GFS_rrtmgp_post',compute_heating_rate( & fluxLW_clrsky%flux_up, & fluxLW_clrsky%flux_dn, & p_lev, & - thetaTendClrSky)) + hlw0)) endif ! All-sky heating-rate (mandatory) - call check_error_msg(compute_heating_rate( & + call check_error_msg('GFS_rrtmgp_post',compute_heating_rate( & fluxLW_allsky%flux_up, & fluxLW_allsky%flux_dn, & p_lev, & - thetaTendAllSky)) + hlwc)) ! Copy fluxes from RRTGMP types into model radiation types. ! Mandatory outputs - topflx%upfxc = fluxLW_allsky%flux_up(:,iTOA) - topflx%upfx0 = fluxLW_clrsky%flux_up(:,iTOA) - sfcflx%upfxc = fluxLW_allsky%flux_up(:,iSFC) - sfcflx%upfx0 = fluxLW_clrsky%flux_up(:,iSFC) - sfcflx%dnfxc = fluxLW_allsky%flux_dn(:,iSFC) - sfcflx%dnfx0 = fluxLW_clrsky%flux_dn(:,iSFC) - hlwc = thetaTendAllSky + topflx_lw%upfxc = fluxLW_allsky%flux_up(:,iTOA) + topflx_lw%upfx0 = fluxLW_clrsky%flux_up(:,iTOA) + sfcflx_lw%upfxc = fluxLW_allsky%flux_up(:,iSFC) + sfcflx_lw%upfx0 = fluxLW_clrsky%flux_up(:,iSFC) + sfcflx_lw%dnfxc = fluxLW_allsky%flux_dn(:,iSFC) + sfcflx_lw%dnfx0 = fluxLW_clrsky%flux_dn(:,iSFC) ! Optional outputs - if(l_fluxes2D) then - flxprf%upfxc = fluxLW_allsky%flux_up - flxprf%dnfxc = fluxLW_allsky%flux_dn - flxprf%upfx0 = fluxLW_clrsky%flux_up - flxprf%dnfx0 = fluxLW_clrsky%flux_dn - endif - if (l_ClrSky_HR) then - hlw0 = thetaTendClrSky + if(l_fluxeslw2d) then + flxprf_lw%upfxc = fluxLW_allsky%flux_up + flxprf_lw%dnfxc = fluxLW_allsky%flux_dn + flxprf_lw%upfx0 = fluxLW_clrsky%flux_up + flxprf_lw%dnfx0 = fluxLW_clrsky%flux_dn endif endif ! ####################################################################################### - ! Save LW heating-rates (Note. This piece was originally in rrtmg_lw_post.F90:_run()) + ! Save LW outputs (Note. This piece was originally in rrtmg_lw_post.F90:_run()) ! ####################################################################################### if (Model%lslwr) then - !> -# Save calculation results - !> - Save surface air temp for diurnal adjustment at model t-steps - + ! Save surface air temp for diurnal adjustment at model t-steps Radtend%tsflw (:) = tsfa(:) do k = 1, LM k1 = k + kd Radtend%htrlw(1:im,k) = hlwc(1:im,k1) enddo - ! --- repopulate the points above levr + ! Repopulate the points above levr if (lm < Model%levs) then do k = lm,Model%levs Radtend%htrlw (1:im,k) = Radtend%htrlw (1:im,LM) @@ -235,7 +284,7 @@ subroutine GFS_rrtmgp_post_run (Model, Grid, Diag, Radtend, Statein, & k1 = k + kd Radtend%lwhc(1:im,k) = hlw0(1:im,k1) enddo - ! --- repopulate the points above levr + ! Repopulate the points above levr if (lm < Model%levs) then do k = lm,Model%levs Radtend%lwhc(1:im,k) = Radtend%lwhc(1:im,LM) @@ -243,19 +292,148 @@ subroutine GFS_rrtmgp_post_run (Model, Grid, Diag, Radtend, Statein, & endif endif - ! --- radiation fluxes for other physics processes + ! Radiation fluxes for other physics processes Coupling%sfcdlw(:) = Radtend%sfcflw(:)%dnfxc - endif ! end_if_lslwr - + endif + + ! ####################################################################################### + ! Compute SW heating-rates + ! ####################################################################################### + ! Initialize outputs + hswc(:,:) = 0. + topflx_sw = topfsw_type ( 0., 0., 0. ) + sfcflx_sw = sfcfsw_type ( 0., 0., 0., 0. ) + if (l_clrskysw_hr) then + hsw0(:,:) = 0. + endif + if (l_fluxessw2D) then + flxprf_sw = profsw_type ( 0., 0., 0., 0. ) + endif + if (l_sfcfluxessw1D) then + scmpsw = cmpfsw_type (0.,0.,0.,0.,0.,0.) + endif + + if (Model%lsswr .and. nDay .gt. 0) then + ! Clear-sky heating-rate (optional) + if (l_clrskysw_HR) then + call check_error_msg('GFS_rrtmgp_post',compute_heating_rate( & + fluxSW_clrsky%flux_up, & + fluxSW_clrsky%flux_dn, & + p_lev(idxday,1:Model%levr+LTP+1), & + thetaTendClrSky)) + hsw0(idxday,:)=thetaTendClrSky + endif + ! All-sky heating-rate (mandatory) + call check_error_msg('GFS_rrtmgp_post',compute_heating_rate( & + fluxSW_allsky%flux_up, & + fluxSW_allsky%flux_dn, & + p_lev(idxday,1:Model%levr+LTP+1), & + thetaTendAllSky)) + hswc(idxday,:) = thetaTendAllSky + print*,'IN POST: ',fluxSW_allsky%flux_up + print*,'IN POSTT: ',fluxSW_allsky%flux_dn + ! Copy fluxes from RRTGMP types into model radiation types. + ! Mandatory outputs + topflx_sw(idxday)%upfxc = fluxSW_allsky%flux_up(:,iTOA) + topflx_sw(idxday)%upfx0 = fluxSW_clrsky%flux_up(:,iTOA) + sfcflx_sw(idxday)%upfxc = fluxSW_allsky%flux_up(:,iSFC) + sfcflx_sw(idxday)%upfx0 = fluxSW_clrsky%flux_up(:,iSFC) + sfcflx_sw(idxday)%dnfxc = fluxSW_allsky%flux_dn(:,iSFC) + sfcflx_sw(idxday)%dnfx0 = fluxSW_clrsky%flux_dn(:,iSFC) + + ! Optional output + if(l_fluxessw2D) then + flxprf_sw(idxday,:)%upfxc = fluxSW_allsky%flux_up + flxprf_sw(idxday,:)%dnfxc = fluxSW_allsky%flux_dn + flxprf_sw(idxday,:)%upfx0 = fluxSW_clrsky%flux_up + flxprf_sw(idxday,:)%dnfx0 = fluxSW_clrsky%flux_dn + endif + endif + + ! ####################################################################################### + ! Save SW outputs + ! ####################################################################################### + if (Model%lsswr) then + if (nday > 0) then + do k = 1, LM + k1 = k + kd + Radtend%htrsw(1:im,k) = hswc(1:im,k1) + enddo + ! Repopulate the points above levr i.e. LM + if (lm < Model%levs) then + do k = lm,Model%levs + Radtend%htrsw (1:im,k) = Radtend%htrsw (1:im,LM) + enddo + endif + + if (Model%swhtr) then + do k = 1, lm + k1 = k + kd + Radtend%swhc(1:im,k) = hsw0(1:im,k1) + enddo + ! Repopulate the points above levr i.e. LM + if (lm < Model%levs) then + do k = lm,Model%levs + Radtend%swhc(1:im,k) = Radtend%swhc(1:im,LM) + enddo + endif + endif + + ! Surface down and up spectral component fluxes + ! - Save two spectral bands' surface downward and upward fluxes for output. + do i=1,im + Coupling%nirbmdi(i) = scmpsw(i)%nirbm + Coupling%nirdfdi(i) = scmpsw(i)%nirdf + Coupling%visbmdi(i) = scmpsw(i)%visbm + Coupling%visdfdi(i) = scmpsw(i)%visdf + + Coupling%nirbmui(i) = scmpsw(i)%nirbm * sfc_alb_nir_dir(1,i) + Coupling%nirdfui(i) = scmpsw(i)%nirdf * sfc_alb_nir_dif(1,i) + Coupling%visbmui(i) = scmpsw(i)%visbm * sfc_alb_uvvis_dir(1,i) + Coupling%visdfui(i) = scmpsw(i)%visdf * sfc_alb_uvvis_dif(1,i) + enddo + else ! if_nday_block + Radtend%htrsw(:,:) = 0.0 + Radtend%sfcfsw = sfcfsw_type( 0.0, 0.0, 0.0, 0.0 ) + Diag%topfsw = topfsw_type( 0.0, 0.0, 0.0 ) + scmpsw = cmpfsw_type( 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ) + + do i=1,im + Coupling%nirbmdi(i) = 0.0 + Coupling%nirdfdi(i) = 0.0 + Coupling%visbmdi(i) = 0.0 + Coupling%visdfdi(i) = 0.0 + + Coupling%nirbmui(i) = 0.0 + Coupling%nirdfui(i) = 0.0 + Coupling%visbmui(i) = 0.0 + Coupling%visdfui(i) = 0.0 + enddo + + if (Model%swhtr) then + Radtend%swhc(:,:) = 0 + endif + endif ! end_if_nday + + ! Radiation fluxes for other physics processes + do i=1,im + Coupling%sfcnsw(i) = Radtend%sfcfsw(i)%dnfxc - Radtend%sfcfsw(i)%upfxc + Coupling%sfcdsw(i) = Radtend%sfcfsw(i)%dnfxc + enddo + endif ! end_if_lsswr + + ! ####################################################################################### + ! ####################################################################################### !> - For time averaged output quantities (including total-sky and !! clear-sky SW and LW fluxes at TOA and surface; conventional !! 3-domain cloud amount, cloud top and base pressure, and cloud top !! temperature; aerosols AOD, etc.), store computed results in !! corresponding slots of array fluxr with appropriate time weights. - ! --- ... collect the fluxr data for wrtsfc - + ! ####################################################################################### + ! ####################################################################################### + if (Model%lssav) then if (Model%lsswr) then do i=1,im @@ -268,47 +446,42 @@ subroutine GFS_rrtmgp_post_run (Model, Grid, Diag, Radtend, Statein, & enddo endif - ! --- save lw toa and sfc fluxes + ! Save LW TOA and SFC fluxes if (Model%lslwr) then do i=1,im - ! --- lw total-sky fluxes + ! LW all-sky fluxes Diag%fluxr(i,1 ) = Diag%fluxr(i,1 ) + Model%fhlwr * Diag%topflw(i)%upfxc ! total sky top lw up Diag%fluxr(i,19) = Diag%fluxr(i,19) + Model%fhlwr * Radtend%sfcflw(i)%dnfxc ! total sky sfc lw dn Diag%fluxr(i,20) = Diag%fluxr(i,20) + Model%fhlwr * Radtend%sfcflw(i)%upfxc ! total sky sfc lw up - ! --- lw clear-sky fluxes + ! LW clear-sky fluxes Diag%fluxr(i,28) = Diag%fluxr(i,28) + Model%fhlwr * Diag%topflw(i)%upfx0 ! clear sky top lw up Diag%fluxr(i,30) = Diag%fluxr(i,30) + Model%fhlwr * Radtend%sfcflw(i)%dnfx0 ! clear sky sfc lw dn Diag%fluxr(i,33) = Diag%fluxr(i,33) + Model%fhlwr * Radtend%sfcflw(i)%upfx0 ! clear sky sfc lw up enddo endif - ! --- save sw toa and sfc fluxes with proper diurnal sw wgt. coszen=mean cosz over daylight - ! part of sw calling interval, while coszdg= mean cosz over entire interval + ! Save sw toa and sfc fluxes with proper diurnal sw wgt. coszen=mean cosz over daylight + ! part of sw calling interval, while coszdg= mean cosz over entire interval if (Model%lsswr) then do i = 1, IM if (Radtend%coszen(i) > 0.) then - ! --- sw total-sky fluxes - ! ------------------- + ! SW all-sky fluxes tem0d = Model%fhswr * Radtend%coszdg(i) / Radtend%coszen(i) Diag%fluxr(i,2 ) = Diag%fluxr(i,2) + Diag%topfsw(i)%upfxc * tem0d ! total sky top sw up Diag%fluxr(i,3 ) = Diag%fluxr(i,3) + Radtend%sfcfsw(i)%upfxc * tem0d ! total sky sfc sw up Diag%fluxr(i,4 ) = Diag%fluxr(i,4) + Radtend%sfcfsw(i)%dnfxc * tem0d ! total sky sfc sw dn - ! --- sw uv-b fluxes - ! -------------- + ! SW uv-b fluxes Diag%fluxr(i,21) = Diag%fluxr(i,21) + scmpsw(i)%uvbfc * tem0d ! total sky uv-b sw dn Diag%fluxr(i,22) = Diag%fluxr(i,22) + scmpsw(i)%uvbf0 * tem0d ! clear sky uv-b sw dn - ! --- sw toa incoming fluxes - ! ---------------------- + ! SW TOA incoming fluxes Diag%fluxr(i,23) = Diag%fluxr(i,23) + Diag%topfsw(i)%dnfxc * tem0d ! top sw dn - ! --- sw sfc flux components - ! ---------------------- + ! SW SFC flux components Diag%fluxr(i,24) = Diag%fluxr(i,24) + scmpsw(i)%visbm * tem0d ! uv/vis beam sw dn Diag%fluxr(i,25) = Diag%fluxr(i,25) + scmpsw(i)%visdf * tem0d ! uv/vis diff sw dn Diag%fluxr(i,26) = Diag%fluxr(i,26) + scmpsw(i)%nirbm * tem0d ! nir beam sw dn Diag%fluxr(i,27) = Diag%fluxr(i,27) + scmpsw(i)%nirdf * tem0d ! nir diff sw dn - ! --- sw clear-sky fluxes - ! ------------------- - Diag%fluxr(i,29) = Diag%fluxr(i,29) + Diag%topfsw(i)%upfx0 * tem0d ! clear sky top sw up + ! SW clear-sky fluxes + Diag%fluxr(i,29) = Diag%fluxr(i,29) + Diag%topfsw(i)%upfx0 * tem0d ! clear sky top sw up Diag%fluxr(i,31) = Diag%fluxr(i,31) + Radtend%sfcfsw(i)%upfx0 * tem0d ! clear sky sfc sw up Diag%fluxr(i,32) = Diag%fluxr(i,32) + Radtend%sfcfsw(i)%dnfx0 * tem0d ! clear sky sfc sw dn endif diff --git a/physics/GFS_rrtmgp_pre.F90 b/physics/GFS_rrtmgp_pre.F90 index 07cc4d9de..fcb0e0fb0 100644 --- a/physics/GFS_rrtmgp_pre.F90 +++ b/physics/GFS_rrtmgp_pre.F90 @@ -1,851 +1,944 @@ !> \file GFS_rrtmgp_pre.f90 !! This file contains - module GFS_rrtmgp_pre - use machine, only: kind_phys - - real(kind_phys), parameter :: & - amd = 28.9644_kind_phys, & ! Molecular weight of dry-air (g/mol) - amw = 18.0154_kind_phys, & ! Molecular weight of water vapor (g/mol) - amo3 = 47.9982_kind_phys, & ! Modelular weight of ozone (g/mol) - amdw = amd/amw, & ! Molecular weight of dry air / water vapor - amdo3 = amd/amo3 ! Molecular weight of dry air / ozone - - public GFS_rrtmgp_pre_run,GFS_rrtmgp_pre_init,GFS_rrtmgp_pre_finalize - - contains - +module GFS_rrtmgp_pre + use physparam + use machine, only: & + kind_phys ! Working type + use GFS_typedefs, only: & + GFS_statein_type, & ! Prognostic state data in from dycore + GFS_stateout_type, & ! Prognostic state or tendencies return to dycore + GFS_sfcprop_type, & ! Surface fields + GFS_coupling_type, & ! Fields to/from coupling with other components (e.g. land/ice/ocean/etc.) + GFS_control_type, & ! Model control parameters + GFS_grid_type, & ! Grid and interpolation related data + GFS_tbd_type, & ! To-Be-Determined data that doesn't fit in any one container + GFS_radtend_type, & ! Radiation tendencies needed in physics + GFS_diag_type ! Fields targetted for diagnostic output + use physcons, only: & + eps => con_eps, & ! Rd/Rv + epsm1 => con_epsm1, & ! Rd/Rv-1 + fvirt => con_fvirt, & ! Rv/Rd-1 + rog => con_rog, & ! Rd/g + rocp => con_rocp ! Rd/cp + use radcons, only: & + itsfc, & ! Flag for LW sfc. temp. + ltp, & ! 1-add extra-top layer; 0-no extra layer + lextop, & ! ltp > 0 + qmin,qme5, qme6, epsq ! Minimum vlaues for varius calculations + use funcphys, only: & + fpvs ! Function ot compute sat. vapor pressure over liq. + use module_radiation_astronomy,only: & + coszmn ! Function to compute cos(SZA) + use module_radiation_gases, only: & + NF_VGAS, & ! Number of active gas species + getgases, & ! Routine to setup trace gases + getozn ! Routine to setup ozone + use module_radiation_aerosols, only: & + NF_AESW, & ! Number of optical-fields in SW output (3=tau+g+omega) + NF_AELW, & ! Number of optical-fields in LW output (3=tau+g+omega) + setaer, & ! Routine to compute aerosol radiative properties (tau,g,omega) + NSPC1 ! Number of species for vertically integrated aerosol optical-depth + use module_radiation_clouds, only: & + NF_CLDS, & ! Number of fields in "clouds" array (e.g. (cloud(1)=lwp,clouds(2)=ReffLiq,...) + progcld1, & ! Zhao/Moorthi's prognostic cloud scheme + progcld3, & ! Zhao/Moorthi's prognostic cloud+pdfcld + progcld4, & ! GFDL cloud scheme + progcld5, & ! Thompson / WSM6 cloud micrphysics scheme + progclduni ! Unified cloud-scheme + use surface_perturbation, only: & + cdfnor ! Routine to compute CDF (used to compute percentiles) + use module_radiation_surface, only: & + setemis, & ! Routine to compute surface-emissivity + NF_ALBD, & ! Number of surface albedo categories (4; nir-direct, nir-diffuse, uvvis-direct, uvvis-diffuse) + setalb ! Routine to compute surface albedo + + use rrtmgp_lw, only: nrghice_lw => nrghice, ipsdlw0 + use rrtmgp_sw, only: nrghice_sw => nrghice, ipsdsw0, check_error_msg + use mersenne_twister, only: & + random_setseed, & + random_number, & + random_stat + ! RRTMGP types + use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp + use mo_cloud_optics, only: ty_cloud_optics + use mo_optical_props, only: ty_optical_props_1scl, ty_optical_props_2str + use mo_cloud_sampling, only: sampled_mask_max_ran, sampled_mask_exp_ran, draw_samples + use mo_gas_concentrations, only: ty_gas_concs + + real(kind_phys), parameter :: & + amd = 28.9644_kind_phys, & ! Molecular weight of dry-air (g/mol) + amw = 18.0154_kind_phys, & ! Molecular weight of water vapor (g/mol) + amo3 = 47.9982_kind_phys, & ! Modelular weight of ozone (g/mol) + amdw = amd/amw, & ! Molecular weight of dry air / water vapor + amdo3 = amd/amo3 ! Molecular weight of dry air / ozone + + public GFS_rrtmgp_pre_run,GFS_rrtmgp_pre_init,GFS_rrtmgp_pre_finalize + +contains + !> \defgroup GFS_rrtmgp_pre GFS RRTMGP Scheme Pre !! @{ !! \section arg_table_GFS_rrtmgp_pre_init Argument Table !! - subroutine GFS_rrtmgp_pre_init () - open(58,file='GFS_rrtmgp_aux_dump.txt',status='unknown') - end subroutine GFS_rrtmgp_pre_init + subroutine GFS_rrtmgp_pre_init () + end subroutine GFS_rrtmgp_pre_init !> \section arg_table_GFS_rrtmgp_pre_run Argument Table -!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | -!! |-----------------------|---------------------------------------------------------------|-------------------------------------------------------------------------------|----------|------|------------------|-----------|--------|----------| -!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | -!! | Grid | GFS_grid_type_instance | Fortran DDT containing FV3-GFS grid and interpolation related data | DDT | 0 | GFS_grid_type | | in | F | -!! | Sfcprop | GFS_sfcprop_type_instance | Fortran DDT containing FV3-GFS surface fields | DDT | 0 | GFS_sfcprop_type | | in | F | -!! | Statein | GFS_statein_type_instance | Fortran DDT containing FV3-GFS prognostic state data in from dycore | DDT | 0 | GFS_statein_type | | in | F | -!! | Tbd | GFS_tbd_type_instance | Fortran DDT containing FV3-GFS data not yet assigned to a defined container | DDT | 0 | GFS_tbd_type | | in | F | -!! | Cldprop | GFS_cldprop_type_instance | Fortran DDT containing FV3-GFS cloud fields needed by radiation from physics | DDT | 0 | GFS_cldprop_type | | in | F | -!! | Coupling | GFS_coupling_type_instance | Fortran DDT containing FV3-GFS fields needed for coupling | DDT | 0 | GFS_coupling_type| | in | F | -!! | Radtend | GFS_radtend_type_instance | Fortran DDT containing FV3-GFS radiation tendencies | DDT | 0 | GFS_radtend_type | | inout | F | -!! | lm | vertical_layer_dimension_for_radiation | number of vertical layers for radiation calculation | count | 0 | integer | | in | F | -!! | im | horizontal_loop_extent | horizontal loop extent | count | 0 | integer | | in | F | -!! | lmk | adjusted_vertical_layer_dimension_for_radiation | number of vertical layers for radiation | count | 0 | integer | | in | F | -!! | lmp | adjusted_vertical_level_dimension_for_radiation | number of vertical levels for radiation | count | 0 | integer | | in | F | -!! | kd | vertical_index_difference_between_inout_and_local | vertical index difference between in/out and local | index | 0 | integer | | out | F | -!! | kt | vertical_index_difference_between_layer_and_upper_bound | vertical index difference between layer and upper bound | index | 0 | integer | | out | F | -!! | kb | vertical_index_difference_between_layer_and_lower_bound | vertical index difference between layer and lower bound | index | 0 | integer | | out | F | -!! | raddt | time_step_for_radiation | radiation time step | s | 0 | real | kind_phys | out | F | -!! | delp | layer_pressure_thickness_for_radiation | layer pressure thickness on radiation levels | hPa | 2 | real | kind_phys | out | F | -!! | dz | layer_thickness_for_radiation | layer thickness on radiation levels | km | 2 | real | kind_phys | out | F | -!! | plvl | air_pressure_at_interface_for_radiation_in_hPa | air pressure at vertical interface for radiation calculation | hPa | 2 | real | kind_phys | out | F | -!! | plyr | air_pressure_at_layer_for_radiation_in_hPa | air pressure at vertical layer for radiation calculation | hPa | 2 | real | kind_phys | out | F | -!! | tlvl | air_temperature_at_interface_for_radiation | air temperature at vertical interface for radiation calculation | K | 2 | real | kind_phys | out | F | -!! | tlyr | air_temperature_at_layer_for_radiation | air temperature at vertical layer for radiation calculation | K | 2 | real | kind_phys | out | F | -!! | tsfg | surface_ground_temperature_for_radiation | surface ground temperature for radiation | K | 1 | real | kind_phys | out | F | -!! | tsfa | surface_air_temperature_for_radiation | lowest model layer air temperature for radiation | K | 1 | real | kind_phys | out | F | -!! | qlyr | water_vapor_specific_humidity_at_layer_for_radiation | water vapor specific humidity at vertical layer for radiation calculation | kg kg-1 | 2 | real | kind_phys | out | F | -!! | olyr | ozone_concentration_at_layer_for_radiation | ozone concentration | kg kg-1 | 2 | real | kind_phys | out | F | -!! | icseed | seed_random_numbers_lw | seed for random number generation for longwave radiation | none | 1 | integer | | in | F | -!! | gasvmr_co2 | volume_mixing_ratio_co2 | CO2 volume mixing ratio | kg kg-1 | 2 | real | kind_phys | out | F | -!! | gasvmr_n2o | volume_mixing_ratio_n2o | N2O volume mixing ratio | kg kg-1 | 2 | real | kind_phys | out | F | -!! | gasvmr_ch4 | volume_mixing_ratio_ch4 | CH4 volume mixing ratio | kg kg-1 | 2 | real | kind_phys | out | F | -!! | gasvmr_o2 | volume_mixing_ratio_o2 | O2 volume mixing ratio | kg kg-1 | 2 | real | kind_phys | out | F | -!! | gasvmr_co | volume_mixing_ratio_co | CO volume mixing ratio | kg kg-1 | 2 | real | kind_phys | out | F | -!! | gasvmr_cfc11 | volume_mixing_ratio_cfc11 | CFC11 volume mixing ratio | kg kg-1 | 2 | real | kind_phys | out | F | -!! | gasvmr_cfc12 | volume_mixing_ratio_cfc12 | CFC12 volume mixing ratio | kg kg-1 | 2 | real | kind_phys | out | F | -!! | gasvmr_cfc22 | volume_mixing_ratio_cfc22 | CFC22 volume mixing ratio | kg kg-1 | 2 | real | kind_phys | out | F | -!! | gasvmr_ccl4 | volume_mixing_ratio_ccl4 | CCL4 volume mixing ratio | kg kg-1 | 2 | real | kind_phys | out | F | -!! | gasvmr_cfc113 | volume_mixing_ratio_cfc113 | CFC113 volume mixing ratio | kg kg-1 | 2 | real | kind_phys | out | F | -!! | faersw1 | aerosol_optical_depth_for_shortwave_bands_01-16 | aerosol optical depth for shortwave bands 01-16 | none | 3 | real | kind_phys | out | F | -!! | faersw2 | aerosol_single_scattering_albedo_for_shortwave_bands_01-16 | aerosol single scattering albedo for shortwave bands 01-16 | frac | 3 | real | kind_phys | out | F | -!! | faersw3 | aerosol_asymmetry_parameter_for_shortwave_bands_01-16 | aerosol asymmetry parameter for shortwave bands 01-16 | none | 3 | real | kind_phys | out | F | -!! | faerlw1 | aerosol_optical_depth_for_longwave_bands_01-16 | aerosol optical depth for longwave bands 01-16 | none | 3 | real | kind_phys | out | F | -!! | faerlw2 | aerosol_single_scattering_albedo_for_longwave_bands_01-16 | aerosol single scattering albedo for longwave bands 01-16 | frac | 3 | real | kind_phys | out | F | -!! | faerlw3 | aerosol_asymmetry_parameter_for_longwave_bands_01-16 | aerosol asymmetry parameter for longwave bands 01-16 | none | 3 | real | kind_phys | out | F | -!! | aerodp | atmosphere_optical_thickness_due_to_ambient_aerosol_particles | vertical integrated optical depth for various aerosol species | none | 2 | real | kind_phys | out | F | -!! | clouds1 | total_cloud_fraction | layer total cloud fraction | frac | 2 | real | kind_phys | out | F | -!! | clouds2 | cloud_liquid_water_path | layer cloud liquid water path | g m-2 | 2 | real | kind_phys | out | F | -!! | clouds3 | mean_effective_radius_for_liquid_cloud | mean effective radius for liquid cloud | micron | 2 | real | kind_phys | out | F | -!! | clouds4 | cloud_ice_water_path | layer cloud ice water path | g m-2 | 2 | real | kind_phys | out | F | -!! | clouds5 | mean_effective_radius_for_ice_cloud | mean effective radius for ice cloud | micron | 2 | real | kind_phys | out | F | -!! | clouds6 | cloud_rain_water_path | cloud rain water path | g m-2 | 2 | real | kind_phys | out | F | -!! | clouds7 | mean_effective_radius_for_rain_drop | mean effective radius for rain drop | micron | 2 | real | kind_phys | out | F | -!! | clouds8 | cloud_snow_water_path | cloud snow water path | g m-2 | 2 | real | kind_phys | out | F | -!! | clouds9 | mean_effective_radius_for_snow_flake | mean effective radius for snow flake | micron | 2 | real | kind_phys | out | F | -!! | cldsa | cloud_area_fraction_for_radiation | fraction of clouds for low, middle,high, total and BL | frac | 2 | real | kind_phys | out | F | -!! | mtopa | model_layer_number_at_cloud_top | vertical indices for low, middle and high cloud tops | index | 2 | integer | | out | F | -!! | mbota | model_layer_number_at_cloud_base | vertical indices for low, middle and high cloud bases | index | 2 | integer | | out | F | -!! | de_lgth | cloud_decorrelation_length | cloud decorrelation length | km | 1 | real | kind_phys | out | F | -!! | alb1d | surface_albedo_perturbation | surface albedo perturbation | frac | 1 | real | kind_phys | out | F | -!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | -!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | -!! | kdist_lw | K_distribution_file_for_RRTMGP_LW_scheme | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | -!! | kdist_sw | K_distribution_file_for_RRTMGP_SW_scheme | DDT containing spectral information for RRTMGP SW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | -!! | kdist_cldy_lw | K_distribution_file_for_cloudy_RRTMGP_LW_scheme | DDT containing spectral information for cloudy RRTMGP LW radiation scheme | DDT | 0 | ty_cloud_optics | | in | F | -!! | kdist_cldy_sw | K_distribution_file_for_cloudy_RRTMGP_SW_scheme | DDT containing spectral information for cloudy RRTMGP SW radiation scheme | DDT | 0 | ty_cloud_optics | | in | F | -!! | optical_props_clouds | optical_properties_for_cloudy_atmosphere | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_1scl | | out | F | -!! | optical_props_aerosol | optical_properties_for_aerosols | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_1scl | | out | F | -!! | gas_concentrations | Gas_concentrations_for_RRTMGP_suite | DDT containing gas concentrations for RRTMGP radiation scheme | DDT | 0 | ty_gas_concs | | out | F | -!! | sfc_emiss_byband | surface_longwave_emissivity_in_each_band | surface lw emissivity in fraction in each LW band | frac | 2 | real | kind_phys | out | F | +!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | +!! |-------------------------|---------------------------------------------------------------|-------------------------------------------------------------------------------|----------|------|-----------------------|-----------|--------|----------| +!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | +!! | Grid | GFS_grid_type_instance | Fortran DDT containing FV3-GFS grid and interpolation related data | DDT | 0 | GFS_grid_type | | in | F | +!! | Sfcprop | GFS_sfcprop_type_instance | Fortran DDT containing FV3-GFS surface fields | DDT | 0 | GFS_sfcprop_type | | in | F | +!! | Statein | GFS_statein_type_instance | Fortran DDT containing FV3-GFS prognostic state data in from dycore | DDT | 0 | GFS_statein_type | | in | F | +!! | Tbd | GFS_tbd_type_instance | Fortran DDT containing FV3-GFS data not yet assigned to a defined container | DDT | 0 | GFS_tbd_type | | in | F | +!! | Coupling | GFS_coupling_type_instance | Fortran DDT containing FV3-GFS fields needed for coupling | DDT | 0 | GFS_coupling_type | | in | F | +!! | Radtend | GFS_radtend_type_instance | Fortran DDT containing FV3-GFS radiation tendencies | DDT | 0 | GFS_radtend_type | | inout | F | +!! | lm | vertical_layer_dimension_for_radiation | number of vertical layers for radiation calculation | count | 0 | integer | | in | F | +!! | im | horizontal_loop_extent | horizontal loop extent | count | 0 | integer | | in | F | +!! | lmk | adjusted_vertical_layer_dimension_for_radiation | number of vertical layers for radiation | count | 0 | integer | | in | F | +!! | lmp | adjusted_vertical_level_dimension_for_radiation | number of vertical levels for radiation | count | 0 | integer | | in | F | +!! | kd | vertical_index_difference_between_inout_and_local | vertical index difference between in/out and local | index | 0 | integer | | out | F | +!! | kt | vertical_index_difference_between_layer_and_upper_bound | vertical index difference between layer and upper bound | index | 0 | integer | | out | F | +!! | kb | vertical_index_difference_between_layer_and_lower_bound | vertical index difference between layer and lower bound | index | 0 | integer | | out | F | +!! | raddt | time_step_for_radiation | radiation time step | s | 0 | real | kind_phys | out | F | +!! | delp | layer_pressure_thickness_for_radiation | layer pressure thickness on radiation levels | hPa | 2 | real | kind_phys | out | F | +!! | dz | layer_thickness_for_radiation | layer thickness on radiation levels | km | 2 | real | kind_phys | out | F | +!! | plvl | air_pressure_at_interface_for_radiation_in_hPa | air pressure at vertical interface for radiation calculation | hPa | 2 | real | kind_phys | out | F | +!! | plyr | air_pressure_at_layer_for_radiation_in_hPa | air pressure at vertical layer for radiation calculation | hPa | 2 | real | kind_phys | out | F | +!! | tlvl | air_temperature_at_interface_for_radiation | air temperature at vertical interface for radiation calculation | K | 2 | real | kind_phys | out | F | +!! | tlyr | air_temperature_at_layer_for_radiation | air temperature at vertical layer for radiation calculation | K | 2 | real | kind_phys | out | F | +!! | tsfg | surface_ground_temperature_for_radiation | surface ground temperature for radiation | K | 1 | real | kind_phys | out | F | +!! | tsfa | surface_air_temperature_for_radiation | lowest model layer air temperature for radiation | K | 1 | real | kind_phys | out | F | +!! | qlyr | water_vapor_specific_humidity_at_layer_for_radiation | water vapor specific humidity at vertical layer for radiation calculation | kg kg-1 | 2 | real | kind_phys | out | F | +!! | olyr | ozone_concentration_at_layer_for_radiation | ozone concentration | kg kg-1 | 2 | real | kind_phys | out | F | +!! | icseed | seed_random_numbers_lw | seed for random number generation for longwave radiation | none | 1 | integer | | in | F | +!! | aerodp | atmosphere_optical_thickness_due_to_ambient_aerosol_particles | vertical integrated optical depth for various aerosol species | none | 2 | real | kind_phys | out | F | +!! | cldsa | cloud_area_fraction_for_radiation | fraction of clouds for low, middle,high, total and BL | frac | 2 | real | kind_phys | out | F | +!! | mtopa | model_layer_number_at_cloud_top | vertical indices for low, middle and high cloud tops | index | 2 | integer | | out | F | +!! | mbota | model_layer_number_at_cloud_base | vertical indices for low, middle and high cloud bases | index | 2 | integer | | out | F | +!! | de_lgth | cloud_decorrelation_length | cloud decorrelation length | km | 1 | real | kind_phys | out | F | +!! | alb1d | surface_albedo_perturbation | surface albedo perturbation | frac | 1 | real | kind_phys | out | F | +!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | +!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! | kdist_lw | K_distribution_file_for_RRTMGP_LW_scheme | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | +!! | kdist_sw | K_distribution_file_for_RRTMGP_SW_scheme | DDT containing spectral information for RRTMGP SW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | +!! | kdist_cldy_lw | K_distribution_file_for_cloudy_RRTMGP_LW_scheme | DDT containing spectral information for cloudy RRTMGP LW radiation scheme | DDT | 0 | ty_cloud_optics | | in | F | +!! | kdist_cldy_sw | K_distribution_file_for_cloudy_RRTMGP_SW_scheme | DDT containing spectral information for cloudy RRTMGP SW radiation scheme | DDT | 0 | ty_cloud_optics | | in | F | +!! | optical_propsLW_clouds | longwave_optical_properties_for_cloudy_atmosphere | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_1scl | | out | F | +!! | optical_propsLW_aerosol | longwave_optical_properties_for_aerosols | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_1scl | | out | F | +!! | optical_propsSW_clouds | shortwave_optical_properties_for_cloudy_atmosphere | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_2str | | out | F | +!! | optical_propsSW_aerosol | shortwave_optical_properties_for_aerosols | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_2str | | out | F | +!! | gas_concentrations_lw | Gas_concentrations_for_RRTMGP_suite_lw | DDT containing gas concentrations for RRTMGP radiation scheme | DDT | 0 | ty_gas_concs | | out | F | +!! | gas_concentrations_sw | Gas_concentrations_for_RRTMGP_suite_sw | DDT containing gas concentrations for RRTMGP radiation scheme | DDT | 0 | ty_gas_concs | | out | F | +!! | sfc_emiss_byband | surface_longwave_emissivity_in_each_band | surface lw emissivity in fraction in each LW band | frac | 2 | real | kind_phys | out | F | +!! | sfc_alb_nir_dir | surface_shortwave_albedo_near_infrared_direct_in_each_band | surface sw near-infrared direct albedo in each SW band | frac | 2 | real | kind_phys | out | F | +!! | sfc_alb_nir_dif | surface_shortwave_albedo_near_infrared_diffuse_in_each_band | surface sw near-infrared diffuse albedo in each SW band | frac | 2 | real | kind_phys | out | F | +!! | sfc_alb_uvvis_dir | surface_shortwave_albedo_uv_visible_direct_in_each_band | surface sw uv-visible direct albedo in each SW band | frac | 2 | real | kind_phys | out | F | +!! | sfc_alb_uvvis_dif | surface_shortwave_albedo_uv_visible_diffuse_in_each_band | surface sw uv-visible diffuse albedo in each SW band | frac | 2 | real | kind_phys | out | F | +!! | nday | daytime_points_dimension | daytime points dimension | count | 0 | integer | | out | F | +!! | idxday | daytime_points | daytime points | index | 1 | integer | | out | F | !! - ! Attention - the output arguments lm, im, lmk, lmp must not be set - ! in the CCPP version - they are defined in the interstitial_create routine - ! ######################################################################################### - subroutine GFS_rrtmgp_pre_run (Model, Grid, Sfcprop, Statein, Tbd, Cldprop, Coupling, & ! IN - Radtend, & ! INOUT - lm, im, lmk, lmp, kdist_lw, kdist_sw, kdist_cldy_lw, kdist_cldy_sw, & ! IN - kd, kt, kb, raddt, delp, dz, plvl, plyr, tlvl, tlyr, tsfg, tsfa, qlyr, olyr, icseed, & ! OUT - gasvmr_co2, gasvmr_n2o, gasvmr_ch4, gasvmr_o2, gasvmr_co, gasvmr_cfc11, & ! OUT - gasvmr_cfc12, gasvmr_cfc22, gasvmr_ccl4, gasvmr_cfc113, faersw1, faersw2, faersw3, & ! OUT - faerlw1, faerlw2, faerlw3, aerodp, clouds1, clouds2, clouds3, clouds4, clouds5, & ! OUT - clouds6, clouds7, clouds8, clouds9, cldsa, mtopa, mbota, de_lgth, alb1d, & ! OUT - optical_props_clouds, optical_props_aerosol, gas_concentrations, sfc_emiss_byband, errmsg, errflg) - - use physparam - use machine, only: & - kind_phys ! Working type - use GFS_typedefs, only: & - GFS_statein_type, & ! Prognostic state data in from dycore - GFS_stateout_type, & ! Prognostic state or tendencies return to dycore - GFS_sfcprop_type, & ! Surface fields - GFS_coupling_type, & ! Fields to/from coupling with other components (e.g. land/ice/ocean/etc.) - GFS_control_type, & ! Model control parameters - GFS_grid_type, & ! Grid and interpolation related data - GFS_tbd_type, & ! To-Be-Determined data that doesn't fit in any one container - GFS_cldprop_type, & ! Cloud fields needed by radiation from physics - GFS_radtend_type, & ! Radiation tendencies needed in physics - GFS_diag_type ! Fields targetted for diagnostic output - use physcons, only: & - eps => con_eps, & ! Rd/Rv - epsm1 => con_epsm1, & ! Rd/Rv-1 - fvirt => con_fvirt, & ! Rv/Rd-1 - rog => con_rog, & ! Rd/g - rocp => con_rocp ! Rd/cp - use radcons, only: & - itsfc, & ! Flag for LW sfc. temp. - ltp, & ! 1-add extra-top layer; 0-no extra layer - lextop, & ! ltp > 0 - qmin,qme5, qme6, epsq ! Minimum vlaues for varius calculations - use funcphys, only: & - fpvs ! Function ot compute sat. vapor pressure over liq. - use module_radiation_astronomy,only: & - coszmn ! Function to compute cos(SZA) - use module_radiation_gases, only: & - NF_VGAS, & ! Number of active gas species - getgases, & ! Routine to setup trace gases - getozn ! Routine to setup ozone - use module_radiation_aerosols, only: & - NF_AESW, & ! Number of optical-fields in SW output (3=tau+g+omega) - NF_AELW, & ! Number of optical-fields in LW output (3=tau+g+omega) - setaer, & ! Routine to compute aerosol radiative properties (tau,g,omega) - NSPC1 ! Number of species for vertically integrated aerosol optical-depth - use module_radiation_clouds, only: & - NF_CLDS, & ! Number of fields in "clouds" array (e.g. (cloud(1)=lwp,clouds(2)=ReffLiq,...) - progcld1, & ! Zhao/Moorthi's prognostic cloud scheme - progcld3, & ! Zhao/Moorthi's prognostic cloud+pdfcld - progcld4, & ! GFDL cloud scheme - progcld5, & ! Thompson / WSM6 cloud micrphysics scheme - progclduni ! Unified cloud-scheme - use surface_perturbation, only: & - cdfnor ! Routine to compute CDF (used to compute percentiles) - use module_radiation_surface, only: & - setemis ! Routine to compute surface-emissivity - use rrtmgp_lw, only: check_error_msg, nrghice, ipsdlw0 - use mersenne_twister, only: & - random_setseed, & - random_number, & - random_stat - ! RRTMGP types - use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp - use mo_cloud_optics, only: ty_cloud_optics - use mo_optical_props, only: ty_optical_props_1scl - use mo_cloud_sampling, only: sampled_mask_max_ran, sampled_mask_exp_ran, draw_samples - use mo_gas_concentrations, only: ty_gas_concs - - implicit none - - ! Inputs - type(GFS_control_type), intent(in) :: Model - type(GFS_grid_type), intent(in) :: Grid - type(GFS_sfcprop_type), intent(in) :: Sfcprop - type(GFS_statein_type), intent(in) :: Statein - type(GFS_radtend_type), intent(inout) :: Radtend - type(GFS_tbd_type), intent(in) :: Tbd - type(GFS_cldprop_type), intent(in) :: Cldprop - type(GFS_coupling_type), intent(in) :: Coupling - integer, intent(in) :: im, lm, lmk, lmp - type(ty_gas_optics_rrtmgp),intent(in) :: & - kdist_lw, & ! RRTMGP DDT containing spectral information for LW calculation - kdist_sw ! RRTMGP DDT containing spectral information for SW calculation - type(ty_cloud_optics),intent(in) :: & - kdist_cldy_lw, & - kdist_cldy_sw - type(ty_gas_concs),intent(out) :: & - gas_concentrations - integer,intent(in),dimension(IM) :: & - icseed ! auxiliary special cloud related array when module - ! variable isubclw=2, it provides permutation seed - ! for each column profile that are used for generating - ! random numbers. when isubclw /=2, it will not be used. - - ! Outputs - integer, intent(out) :: kd, kt, kb - real(kind_phys), intent(out) :: raddt - real(kind_phys), dimension(size(Grid%xlon,1)), intent(out) :: & - tsfg, tsfa - real(kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: & - delp, dz, plyr, tlyr, qlyr, olyr, gasvmr_co2, gasvmr_n2o, gasvmr_ch4, & - gasvmr_o2, gasvmr_co, gasvmr_cfc11, gasvmr_cfc12, gasvmr_cfc22, & - gasvmr_ccl4, gasvmr_cfc113, clouds1, clouds2, clouds3, clouds4, clouds5, & - clouds6, clouds7, clouds8, clouds9 - real(kind_phys), dimension(size(Grid%xlon,1),Model%levr+1+LTP), intent(out) :: & - plvl, tlvl - real(kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,kdist_sw%get_nband()), intent(out) :: & - faersw1, faersw2, faersw3 - real(kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,kdist_lw%get_nband()), intent(out) :: & - faerlw1, faerlw2, faerlw3 - real(kind_phys), dimension(size(Grid%xlon,1),NSPC1), intent(out) :: & - aerodp - - real(kind_phys), dimension(size(Grid%xlon,1),5), intent(out) :: cldsa - integer, dimension(size(Grid%xlon,1),3), intent(out) :: mbota,mtopa - real(kind_phys), dimension(size(Grid%xlon,1)), intent(out) :: de_lgth,alb1d - character(len=*), intent(out) :: errmsg - integer, intent(out) :: errflg - type(ty_optical_props_1scl),intent(out) :: & - optical_props_clouds, & - optical_props_aerosol - real(kind_phys),dimension(kdist_lw%get_nband(),Model%levr+LTP),intent(out) :: sfc_emiss_byband - - ! Local variables - integer :: me, nfxr, ntrac, ntcw, ntiw, ncld, ntrw, ntsw, ntgl,i, j, k, k1, k2, lsk, & - lv, n, itop, ibtc, LP1, lla, llb, lya, lyb, iCol, iBand - integer,dimension(IM) :: ipseed - logical,dimension(IM,Model%levr+LTP) :: & - liqmask,icemask - real(kind_phys),dimension(IM,Model%levr+LTP) :: & - cld_ref_ice2,cld_ref_liq2, vmr_o3, vmr_h2o - real(kind_phys) :: es, qs, delt, tem0d - real(kind_phys), dimension(size(Grid%xlon,1)) :: cvt1, cvb1, tem1d, tskn - real(kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP) :: htswc, htlwc, & - gcice, grain, grime, htsw0, htlw0, rhly, tvly,qstl, vvel, clw, ciw, prslk1, & - tem2da, cldcov, deltaq, cnvc, cnvw, effrl, effri, effrr, effrs - real (kind_phys) :: clwmin, clwm, clwt, onemrh, value, tem1, tem2, tem3 - real (kind_phys), parameter :: xrc3 = 100. - real(kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP+1) :: tem2db - real(kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,Model%ncnd) :: ccnd - real(kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,2:Model%ntrac) :: tracer1 - real(kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,NF_CLDS) :: clouds - real(kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,NF_VGAS) :: gasvmr - real(kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,kdist_sw%get_nband(),NF_AESW)::faersw - real(kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,kdist_lw%get_nband(),NF_AELW)::faerlw - type(ty_optical_props_1scl) :: optical_props_clear, optical_props_cloudsByBand - real(kind_phys), dimension(kdist_lw%get_ngpt(),Model%levr+LTP,IM) :: & - rng3D - real(kind_phys), dimension(kdist_lw%get_ngpt()*(Model%levr+LTP)) :: & - rng1D - logical, dimension(IM,Model%levr+LTP,kdist_lw%get_ngpt()) :: & - cldfracMCICA - type(random_stat) :: rng_stat - - ! Initialize CCPP error handling variables - errmsg = '' - errflg = 0 - - if (.not. (Model%lsswr .or. Model%lslwr)) return - - ! Define some commonly used integers - me = Model%me ! MPI rank designator - NFXR = Model%nfxr ! second dimension for fluxr diagnostic variable (radiation) - NTRAC = Model%ntrac ! Number of tracers - ntcw = Model%ntcw ! Tracer index for cloud condensate (or liquid water) - ntiw = Model%ntiw ! Tracer index for ice - ncld = Model%ncld ! Cloud scheme - ntrw = Model%ntrw ! Tracer index for rain - ntsw = Model%ntsw ! Tracer index for snow - ntgl = Model%ntgl ! Tracer index for groupel - LP1 = LM + 1 ! num of in/out levels - - ! Set local /level/layer indexes corresponding to in/out variables - if ( lextop ) then - if ( ivflip == 1 ) then ! vertical from sfc upward - kd = 0 ! index diff between in/out and local - kt = 1 ! index diff between lyr and upper bound - kb = 0 ! index diff between lyr and lower bound - lla = LMK ! local index at the 2nd level from top - llb = LMP ! local index at toa level - lya = LM ! local index for the 2nd layer from top - lyb = LP1 ! local index for the top layer - else ! vertical from toa downward - kd = 1 ! index diff between in/out and local - kt = 0 ! index diff between lyr and upper bound - kb = 1 ! index diff between lyr and lower bound - lla = 2 ! local index at the 2nd level from top - llb = 1 ! local index at toa level - lya = 2 ! local index for the 2nd layer from top - lyb = 1 ! local index for the top layer - endif ! end if_ivflip_block - else - kd = 0 - if ( ivflip == 1 ) then ! vertical from sfc upward - kt = 1 ! index diff between lyr and upper bound - kb = 0 ! index diff between lyr and lower bound - else ! vertical from toa downward - kt = 0 ! index diff between lyr and upper bound - kb = 1 ! index diff between lyr and lower bound - endif ! end if_ivflip_block - endif ! end if_lextop_block - - ! Radiation time step (output) - raddt = min(Model%fhswr, Model%fhlwr) - - ! Setup surface ground temperature and ground/air skin temperature if required. - if ( itsfc == 0 ) then ! use same sfc skin-air/ground temp - tskn(1:IM) = Sfcprop%tsfc(1:IM) - tsfg(1:IM) = Sfcprop%tsfc(1:IM) - else ! use diff sfc skin-air/ground temp - tskn(1:IM) = Sfcprop%tsfc(1:IM) - tsfg(1:IM) = Sfcprop%tsfc(1:IM) - endif - - ! Prepare atmospheric profiles for radiation input. - lsk = 0 - if (ivflip == 0 .and. lm < Model%levs) lsk = Model%levs - lm - - ! Copy over state fields into fields, compute some needed quantities. - do k = 1, LM - k1 = k + kd - k2 = k + lsk - do i = 1, IM - plvl(i,k1+kb) = Statein%prsi(i,k2+kb) - plyr(i,k1) = Statein%prsl(i,k2) - tlyr(i,k1) = Statein%tgrs(i,k2) - prslk1(i,k1) = Statein%prslk(i,k2) - - ! Compute relative humidity. - es = min( Statein%prsl(i,k2), fpvs( Statein%tgrs(i,k2) ) ) ! fpvs and prsl in pa - qs = max( QMIN, eps * es / (Statein%prsl(i,k2) + epsm1*es) ) - rhly(i,k1) = max( 0.0, min( 1.0, max(QMIN, Statein%qgrs(i,k2,1))/qs ) ) - qstl(i,k1) = qs - enddo - plvl(i,k1+kb) = kdist_lw%get_press_min() - enddo - - ! Recast remaining all tracers (except sphum) forcing them all to be positive - do j = 2, NTRAC - do k = 1, LM - k1 = k + kd - k2 = k + lsk - tracer1(:,k1,j) = max(0.0, Statein%qgrs(:,k2,j)) - enddo - enddo - - ! Input data from toa to sfc - if (ivflip == 0) then - plvl(1:IM-1,1+kd) = Statein%prsi(1:IM-1,1) - plvl(IM,1+kd) = kdist_lw%get_press_min() - if (lsk /= 0) then - plvl(1:IM-1,1+kd) = 0.5 * (plvl(1:IM-1,2+kd) + plvl(1:IM-1,1+kd)) - plvl(IM,1+kd) = kdist_lw%get_press_min() - endif - ! Input data from sfc to top - else - plvl(1:IM-1,LP1+kd) = Statein%prsi(1:IM-1,LP1+lsk) - plvl(IM,LP1+kd) = kdist_lw%get_press_min() - if (lsk /= 0) then - plvl(1:IM-1,LM+kd) = 0.5 * (plvl(1:IM-1,LP1+kd) + plvl(1:IM-1,LM+kd)) - plvl(IM,LM+kd) = kdist_lw%get_press_min() - endif - endif - - if ( lextop ) then ! values for extra top layer - do i = 1, IM - plvl(i,llb) = kdist_lw%get_press_min() - if ( plvl(i,lla) <= kdist_lw%get_press_min() ) plvl(i,lla) = 2.0* kdist_lw%get_press_min() - plyr(i,lyb) = 0.5 * plvl(i,lla) - tlyr(i,lyb) = tlyr(i,lya) - prslk1(i,lyb) = (plyr(i,lyb)*0.001) ** rocp ! plyr in Pa - rhly(i,lyb) = rhly(i,lya) - qstl(i,lyb) = qstl(i,lya) - enddo - - ! note: may need to take care the top layer amount - tracer1(:,lyb,:) = tracer1(:,lya,:) - endif - - ! Get layer ozone mass mixing ratio - if (Model%ntoz > 0) then - do k=1,lmk - do i=1,im - olyr(i,k) = max( QMIN, tracer1(i,k,Model%ntoz) ) - enddo - enddo - ! Use climatological ozone data - else - call getozn (prslk1, Grid%xlat, IM, LMK, olyr) - endif - - ! Compute cosine of zenith angle (only when SW is called) - if (Model%lsswr) then - call coszmn (Grid%xlon, Grid%sinlat, Grid%coslat, Model%solhr, IM, me, & - Radtend%coszen, Radtend%coszdg) - endif - - ! Call getgases(), to set up non-prognostic gas volume mixing ratios (gasvmr). - call getgases (plvl/100., Grid%xlon, Grid%xlat, IM, LMK, gasvmr) - - ! Assign to gasvmr_XXXX - gasvmr_co2 (1:IM,1:LMK) = gasvmr(1:IM,1:LMK,1) - gasvmr_n2o (1:IM,1:LMK) = gasvmr(1:IM,1:LMK,2) - gasvmr_ch4 (1:IM,1:LMK) = gasvmr(1:IM,1:LMK,3) - gasvmr_o2 (1:IM,1:LMK) = gasvmr(1:IM,1:LMK,4) - gasvmr_co (1:IM,1:LMK) = gasvmr(1:IM,1:LMK,5) - gasvmr_cfc11 (1:IM,1:LMK) = gasvmr(1:IM,1:LMK,6) - gasvmr_cfc12 (1:IM,1:LMK) = gasvmr(1:IM,1:LMK,7) - gasvmr_cfc22 (1:IM,1:LMK) = gasvmr(1:IM,1:LMK,8) - gasvmr_ccl4 (1:IM,1:LMK) = gasvmr(1:IM,1:LMK,9) - gasvmr_cfc113 (1:IM,1:LMK) = gasvmr(1:IM,1:LMK,10) - - ! Get temperature at layer interface, and layer moisture. - tem2da(1:IM,2:LMK) = log( plyr(1:IM,2:LMK) ) - tem2db(1:IM,2:LMK) = log( plvl(1:IM,2:LMK) ) - - if (ivflip == 0) then ! input data from toa to sfc - do i = 1, IM - tem1d (i) = QME6 - tem2da(i,1) = log( plyr(i,1) ) - tem2db(i,1) = log( max( kdist_lw%get_press_min(), plvl(i,1)) ) - tem2db(i,LMP) = log( plvl(i,LMP) ) - tsfa (i) = tlyr(i,LMK) ! sfc layer air temp - tlvl(i,1) = tlyr(i,1) - tlvl(i,LMP) = tskn(i) - enddo - do k = 1, LM - k1 = k + kd - do i = 1, IM - qlyr(i,k1) = max( tem1d(i), Statein%qgrs(i,k,1) ) - tem1d(i) = min( QME5, qlyr(i,k1) ) - tvly(i,k1) = Statein%tgrs(i,k) * (1.0 + fvirt*qlyr(i,k1)) ! virtual T (K) - delp(i,k1) = plvl(i,k1+1) - plvl(i,k1) - enddo - enddo - - if ( lextop ) then - do i = 1, IM - qlyr(i,lyb) = qlyr(i,lya) - tvly(i,lyb) = tvly(i,lya) - delp(i,lyb) = plvl(i,lla) - plvl(i,llb) - enddo - endif - - do k = 2, LMK - do i = 1, IM - tlvl(i,k) = tlyr(i,k) + (tlyr(i,k-1) - tlyr(i,k)) * (tem2db(i,k) - tem2da(i,k)) / & - (tem2da(i,k-1) - tem2da(i,k)) - enddo - enddo - - ! Comput lvel height and layer thickness (km) - tem0d = 0.001 * rog - do i = 1, IM - do k = 1, LMK - dz(i,k) = tem0d * (tem2db(i,k+1) - tem2db(i,k)) * tvly(i,k) - enddo - enddo - - else ! input data from sfc to toa - do i = 1, IM - tem1d (i) = QME6 - tem2da(i,1) = log( plyr(i,1) ) - tem2db(i,1) = log( plvl(i,1) ) - tem2db(i,LMP) = log( max( kdist_lw%get_press_min(), plvl(i,LMP)) ) - tsfa (i) = tlyr(i,1) ! sfc layer air temp - tlvl(i,1) = tskn(i) - tlvl(i,LMP) = tlyr(i,LMK) - enddo - - do k = LM, 1, -1 - do i = 1, IM - qlyr(i,k) = max( tem1d(i), Statein%qgrs(i,k,1) ) - tem1d(i) = min( QME5, qlyr(i,k) ) - tvly(i,k) = Statein%tgrs(i,k) * (1.0 + fvirt*qlyr(i,k)) ! virtual T (K) - delp(i,k) = plvl(i,k) - plvl(i,k+1) - enddo - enddo - - if ( lextop ) then - do i = 1, IM - qlyr(i,lyb) = qlyr(i,lya) - tvly(i,lyb) = tvly(i,lya) - delp(i,lyb) = plvl(i,lla) - plvl(i,llb) - enddo - endif - - do k = 1, LMK-1 - do i = 1, IM - tlvl(i,k+1) = tlyr(i,k) + (tlyr(i,k+1) - tlyr(i,k)) * (tem2db(i,k+1) - tem2da(i,k)) / & - (tem2da(i,k+1) - tem2da(i,k)) - enddo - enddo - - ! Compute level height and layer thickness (km) - tem0d = 0.001 * rog - do i = 1, IM - do k = LMK, 1, -1 - dz(i,k) = tem0d * (tem2db(i,k) - tem2db(i,k+1)) * tvly(i,k) - enddo - enddo - endif ! end_if_ivflip - - ! Call module_radiation_aerosols::setaer(),to setup aerosols property profile for radiation. - call setaer (plvl, plyr, prslk1, tvly, rhly, Sfcprop%slmsk, tracer1, Grid%xlon, & - Grid%xlat, IM, LMK, LMP, Model%lsswr, Model%lslwr, faersw, faerlw, aerodp) - - ! Store aerosol optical properties - ! SW. - ! For RRTMGP SW the bands are now ordered from [IR(band) -> nIR -> UV], in RRTMG the - ! band ordering was [nIR -> UV -> IR(band)] - faersw1(1:IM,1:LMK,1) = faersw(1:IM,1:LMK,kdist_sw%get_nband(),1) - faersw2(1:IM,1:LMK,1) = faersw(1:IM,1:LMK,kdist_sw%get_nband(),2) - faersw3(1:IM,1:LMK,1) = faersw(1:IM,1:LMK,kdist_sw%get_nband(),3) - faersw1(1:IM,1:LMK,2:kdist_sw%get_nband()) = faersw(1:IM,1:LMK,1:kdist_sw%get_nband()-1,1) - faersw2(1:IM,1:LMK,2:kdist_sw%get_nband()) = faersw(1:IM,1:LMK,1:kdist_sw%get_nband()-1,2) - faersw3(1:IM,1:LMK,2:kdist_sw%get_nband()) = faersw(1:IM,1:LMK,1:kdist_sw%get_nband()-1,3) - ! LW - faerlw1(1:IM,1:LMK,1:kdist_lw%get_nband()) = faerlw(1:IM,1:LMK,1:kdist_lw%get_nband(),1) - faerlw2(1:IM,1:LMK,1:kdist_lw%get_nband()) = faerlw(1:IM,1:LMK,1:kdist_lw%get_nband(),2) - faerlw3(1:IM,1:LMK,1:kdist_lw%get_nband()) = faerlw(1:IM,1:LMK,1:kdist_lw%get_nband(),3) - - ! Obtain cloud information for radiation calculations - ! (clouds,cldsa,mtopa,mbota) - ! for prognostic cloud: - ! - For Zhao/Moorthi's prognostic cloud scheme, - ! call module_radiation_clouds::progcld1() - ! - For Zhao/Moorthi's prognostic cloud+pdfcld, - ! call module_radiation_clouds::progcld3() - ! call module_radiation_clouds::progclduni() for unified cloud and ncld=2 - ccnd = 0.0_kind_phys - if (Model%ncnd == 1) then ! Zhao_Carr_Sundqvist - ccnd(1:IM,1:LMK,1) = tracer1(1:IM,1:LMK,ntcw) ! -liquid water/ice - elseif (Model%ncnd == 2) then ! MG - ccnd(1:IM,1:LMK,1) = tracer1(1:IM,1:LMK,ntcw) ! -liquid water - ccnd(1:IM,1:LMK,2) = tracer1(1:IM,1:LMK,ntiw) ! -ice water - elseif (Model%ncnd == 4) then ! MG2 - ccnd(1:IM,1:LMK,1) = tracer1(1:IM,1:LMK,ntcw) ! -liquid water - ccnd(1:IM,1:LMK,2) = tracer1(1:IM,1:LMK,ntiw) ! -ice water - ccnd(1:IM,1:LMK,3) = tracer1(1:IM,1:LMK,ntrw) ! -rain water - ccnd(1:IM,1:LMK,4) = tracer1(1:IM,1:LMK,ntsw) ! -snow water - elseif (Model%ncnd == 5) then ! GFDL MP, Thompson, MG3 - ccnd(1:IM,1:LMK,1) = tracer1(1:IM,1:LMK,ntcw) ! -liquid water - ccnd(1:IM,1:LMK,2) = tracer1(1:IM,1:LMK,ntiw) ! -ice water - ccnd(1:IM,1:LMK,3) = tracer1(1:IM,1:LMK,ntrw) ! -rain water - ccnd(1:IM,1:LMK,4) = tracer1(1:IM,1:LMK,ntsw) + & ! -snow + grapuel - tracer1(1:IM,1:LMK,ntgl) - endif - where(ccnd < epsq) ccnd = 0.0 - - if (Model%imp_physics == 11 ) then - if (.not. Model%lgfdlmprad) then - ccnd(:,:,1) = tracer1(:,1:LMK,ntcw) - ccnd(:,:,1) = ccnd(:,:,1) + tracer1(:,1:LMK,ntrw) - ccnd(:,:,1) = ccnd(:,:,1) + tracer1(:,1:LMK,ntiw) - ccnd(:,:,1) = ccnd(:,:,1) + tracer1(:,1:LMK,ntsw) - ccnd(:,:,1) = ccnd(:,:,1) + tracer1(:,1:LMK,ntgl) - endif - do k=1,LMK - do i=1,IM - if (ccnd(i,k,1) < EPSQ ) ccnd(i,k,1) = 0.0 - enddo - enddo - endif - - ! Add suspended convective cloud water to grid-scale cloud water - ! only for cloud fraction & radiation computation it is to enhance - ! cloudiness due to suspended convec cloud water for zhao/moorthi's - ! (imp_phys=99) & ferrier's (imp_phys=5) microphysics schemes - if ((Model%num_p3d == 4) .and. (Model%npdf3d == 3)) then ! same as Model%imp_physics = 99 - deltaq(1:im,1+kd:lm+kd) = Tbd%phy_f3d(1:im,1:lm,5) - cnvw (1:im,1+kd:lm+kd) = Tbd%phy_f3d(1:im,1:lm,6) - cnvc (1:im,1+kd:lm+kd) = Tbd%phy_f3d(1:im,1:lm,7) - elseif ((Model%npdf3d == 0) .and. (Model%ncnvcld3d == 1)) then ! same as MOdel%imp_physics=98 - deltaq(1:im,1+kd:lm+kd) = 0.0 - cnvw (1:im,1+kd:lm+kd) = Tbd%phy_f3d(1:im,1:lm,Model%num_p3d+1) - cnvc (1:im,1+kd:lm+kd) = 0.0 - else ! all the rest - deltaq(1:im,1:lmk) = 0.0 - cnvw (1:im,1:lmk) = 0.0 - cnvc (1:im,1:lmk) = 0.0 - endif - - if (lextop) then - cldcov(1:im,lyb) = cldcov(1:im,lya) - deltaq(1:im,lyb) = deltaq(1:im,lya) - cnvw (1:im,lyb) = cnvw (1:im,lya) - cnvc (1:im,lyb) = cnvc (1:im,lya) - if (Model%effr_in) then - effrl(1:im,lyb) = effrl(1:im,lya) - effri(1:im,lyb) = effri(1:im,lya) - effrr(1:im,lyb) = effrr(1:im,lya) - effrs(1:im,lyb) = effrs(1:im,lya) - endif - endif - - if (Model%imp_physics == 99) then - ccnd(1:IM,1:LMK,1) = ccnd(1:IM,1:LMK,1) + cnvw(1:IM,1:LMK) - endif - - if (Model%imp_physics == 10) then - ccnd(1:IM,1:LMK,1) = ccnd(1:IM,1:LMK,1) + cnvw(1:IM,1:LMK) + ccnd(1:IM,1:LMK,2) - endif - - ! DJS2019: START - ! Compute layer cloud fraction. - clwmin = 0.0 - cldcov(:,:) = 0.0 - if (.not. Model%lmfshal) then - do k = 1, LMK - do i = 1, IM - clwt = 1.0e-6 * (plyr(i,k)*0.1) - if (ccnd(i,k,1) > 0.) then - onemrh= max( 1.e-10, 1.0-rhly(i,k) ) - clwm = clwmin / max( 0.01, plyr(i,k)*0.1 ) - tem1 = min(max(sqrt(sqrt(onemrh*qstl(i,k))),0.0001),1.0) - tem1 = 2000.0 / tem1 - value = max( min( tem1*(ccnd(i,k,1)-clwm), 50.0 ), 0.0 ) - tem2 = sqrt( sqrt(rhly(i,k)) ) - cldcov(i,k) = max( tem2*(1.0-exp(-value)), 0.0 ) - endif - enddo - enddo - else - do k = 1, LMK - do i = 1, IM - clwt = 1.0e-6 * (plyr(i,k)*0.1) - if (ccnd(i,k,1) .gt. 0) then - onemrh= max( 1.e-10, 1.0-rhly(i,k) ) - clwm = clwmin / max( 0.01, plyr(i,k)*0.1 ) - tem1 = min(max((onemrh*qstl(i,k))**0.49,0.0001),1.0) !jhan - if (Model%lmfdeep2) then - tem1 = xrc3 / tem1 - else - tem1 = 100.0 / tem1 - endif - value = max( min( tem1*(ccnd(i,k,1)-clwm), 50.0 ), 0.0 ) - tem2 = sqrt( sqrt(rhly(i,k)) ) - cldcov(i,k) = max( tem2*(1.0-exp(-value)), 0.0 ) - endif - enddo - enddo - endif - ! DJS2019: END - - if (Model%uni_cld) then - if (Model%effr_in) then - cldcov(1:im,1+kd:lm+kd) = Tbd%phy_f3d(1:im,1:lm,Model%indcld) - effrl(1:im,1+kd:lm+kd) = Tbd%phy_f3d(1:im,1:lm,2) - effri(1:im,1+kd:lm+kd) = Tbd%phy_f3d(1:im,1:lm,3) - effrr(1:im,1+kd:lm+kd) = Tbd%phy_f3d(1:im,1:lm,4) - effrs(1:im,1+kd:lm+kd) = Tbd%phy_f3d(1:im,1:lm,5) - else - do k=1,lm - k1 = k + kd - do i=1,im - !cldcov(i,k1) = Tbd%phy_f3d(i,k,Model%indcld) - !if (tracer1(i,k,ntcw) .gt. 0 .or. tracer1(i,k,ntiw) .gt. 0) then - ! cldcov(i,k1) = 0.1 - !else - ! cldcov(i,k1) = 0.0 - !endif - enddo - enddo - endif - elseif (Model%imp_physics == Model%imp_physics_gfdl) then ! GFDL MP - cldcov(1:IM,1+kd:LM+kd) = tracer1(1:IM,1:LM,Model%ntclamt) - else ! neither of the other two cases - ! cldcov = 0.0 - endif - - ! MICROPHYSICS - ! *) zhao/moorthi's prognostic cloud scheme or unified cloud and/or with MG microphysics - if (Model%imp_physics == 99 .or. Model%imp_physics == 10) then - if (Model%uni_cld .and. Model%ncld >= 2) then - call progclduni (plyr/100., plvl/100., tlyr, tvly, ccnd, Model%ncnd, & ! IN - Grid%xlat, Grid%xlon, Sfcprop%slmsk, dz, delp/100.,IM, & ! IN - LMK, LMP, cldcov, effrl, effri, effrr, effrs, Model%effr_in, & ! IN - clouds, cldsa, mtopa, mbota, de_lgth) ! OUT - else - call progcld1 (plyr/100. ,plvl/100., tlyr, tvly, qlyr, qstl, rhly, & ! IN - ccnd(1:IM,1:LMK,1), Grid%xlat,Grid%xlon,Sfcprop%slmsk, dz, & ! IN - delp/100., IM, LMK, LMP, Model%uni_cld, Model%lmfshal, & ! IN - Model%lmfdeep2, cldcov, effrl, effri, effrr, effrs, & ! IN - Model%effr_in, & ! IN - clouds, cldsa, mtopa, mbota, de_lgth) ! OUT - endif - ! *) zhao/moorthi's prognostic cloud+pdfcld - elseif(Model%imp_physics == 98) then - call progcld3 (plyr/100., plvl/100., tlyr, tvly, qlyr, qstl, rhly, & ! IN - ccnd(1:IM,1:LMK,1), cnvw, cnvc, Grid%xlat, Grid%xlon, & ! IN - Sfcprop%slmsk, dz, delp/100., im, lmk, lmp, deltaq, Model%sup, & ! IN - Model%kdt, me, & ! IN - clouds, cldsa, mtopa, mbota, de_lgth) ! OUT - ! *) GFDL cloud scheme - elseif (Model%imp_physics == 11) then - if (.not.Model%lgfdlmprad) then - call progcld4 (plyr/100., plvl/100., tlyr, tvly, qlyr, qstl, rhly, & ! IN - ccnd(1:IM,1:LMK,1), cnvw, cnvc,Grid%xlat, Grid%xlon, & ! IN - Sfcprop%slmsk, cldcov, dz, delp/100., im, lmk, lmp, & ! IN - clouds, cldsa, mtopa, mbota, de_lgth) ! OUT - else - call progclduni (plyr/100., plvl/100., tlyr, tvly, ccnd, Model%ncnd, & ! IN - Grid%xlat, Grid%xlon, Sfcprop%slmsk, dz,delp/100., IM, LMK, & ! IN - LMP, cldcov, effrl, effri, effrr, effrs, Model%effr_in, & ! IN - clouds, cldsa, mtopa, mbota, de_lgth) ! OUT - endif - ! *) Thompson / WSM6 cloud micrphysics scheme - elseif(Model%imp_physics == 8 .or. Model%imp_physics == 6) then - if (Model%kdt == 1) then - Tbd%phy_f3d(:,:,1) = 10. - Tbd%phy_f3d(:,:,2) = 50. - Tbd%phy_f3d(:,:,3) = 250. - endif - - call progcld5 (plyr/100., plvl/100., tlyr, qlyr, qstl, rhly, tracer1, Grid%xlat, & ! IN - Grid%xlon,Sfcprop%slmsk,dz,delp/100., ntrac-1, ntcw-1, ntiw-1, & ! IN - ntrw-1, ntsw-1, ntgl-1, im, lmk, lmp, Model%uni_cld, Model%lmfshal,& ! IN - Model%lmfdeep2, cldcov(:,1:LMK),Tbd%phy_f3d(:,:,1), & ! IN - Tbd%phy_f3d(:,:,2), Tbd%phy_f3d(:,:,3), & ! IN - clouds,cldsa,mtopa,mbota, de_lgth) ! OUT - endif ! end if_imp_physics - - ! CCPP - clouds1(1:IM,1:LMK) = clouds(1:IM,1:LMK,1) - clouds2(1:IM,1:LMK) = clouds(1:IM,1:LMK,2) - clouds3(1:IM,1:LMK) = clouds(1:IM,1:LMK,3) - clouds4(1:IM,1:LMK) = clouds(1:IM,1:LMK,4) - clouds5(1:IM,1:LMK) = clouds(1:IM,1:LMK,5) - clouds6(1:IM,1:LMK) = clouds(1:IM,1:LMK,6) - clouds7(1:IM,1:LMK) = clouds(1:IM,1:LMK,7) - clouds8(1:IM,1:LMK) = clouds(1:IM,1:LMK,8) - clouds9(1:IM,1:LMK) = clouds(1:IM,1:LMK,9) - - ! mg, sfc-perts - ! --- scale random patterns for surface perturbations with - ! perturbation size - ! --- turn vegetation fraction pattern into percentile pattern - alb1d(:) = 0. - if (Model%do_sfcperts) then - if (Model%pertalb(1) > 0.) then - do i=1,im - call cdfnor(Coupling%sfc_wts(i,5),alb1d(i)) - enddo - endif - endif - ! mg, sfc-perts - - ! ####################################################################################### - ! Call module_radiation_surface::setemis(),to setup surface emissivity for LW radiation. - ! ####################################################################################### - if (Model%lslwr) then - call setemis (Grid%xlon, Grid%xlat, Sfcprop%slmsk, Sfcprop%snowd, Sfcprop%sncovr, & - Sfcprop%zorl, tsfg, tsfa, Sfcprop%hprim, IM, Radtend%semis) - do iBand=1,kdist_lw%get_nband() - sfc_emiss_byband(iBand,1:IM) = Radtend%semis(1:IM) - enddo - endif - - ! ####################################################################################### - ! Compute radiative properties needed for RRTMGP - ! ####################################################################################### - - ! Change random number seed value for each radiation invocation (isubclw =1 or 2). - if(isubclw == 1) then ! advance prescribed permutation seed - do iCol = 1, IM - ipseed(iCol) = ipsdlw0 + iCol - enddo - elseif (isubclw == 2) then ! use input array of permutaion seeds - do iCol = 1, IM - ipseed(iCol) = icseed(iCol) - enddo - endif - - ! Compute volume mixing-ratios for ozone (mmr) and specific-humidity. - vmr_h2o = merge((qlyr/(1-qlyr))*amdw, 0., qlyr .ne. 1.) - vmr_o3 = merge(olyr*amdo3, 0., olyr .gt. 0.) - - ! Compute ice/liquid cloud masks, needed by rrtmgp_cloud_optics - liqmask = (clouds1 .gt. 0 .and. clouds2 .gt. 0) - icemask = (clouds1 .gt. 0 .and. clouds4 .gt. 0) - - ! RRTMGP cloud_optics expects particle size to be in a certain range. bound here - cld_ref_ice2 = clouds5 - where(cld_ref_ice2 .gt. kdist_cldy_lw%get_max_radius_ice()) cld_ref_ice2=kdist_cldy_lw%get_max_radius_ice() - where(cld_ref_ice2 .lt. kdist_cldy_lw%get_min_radius_ice()) cld_ref_ice2=kdist_cldy_lw%get_min_radius_ice() - cld_ref_liq2 = clouds5 - where(cld_ref_liq2 .gt. kdist_cldy_lw%get_max_radius_liq()) cld_ref_liq2=kdist_cldy_lw%get_max_radius_liq() - where(cld_ref_liq2 .lt. kdist_cldy_lw%get_min_radius_liq()) cld_ref_liq2=kdist_cldy_lw%get_min_radius_liq() - - ! Allocate space for gas optical properties [ncol,nlay,ngpts] - ! Cloud optics [nCol,nLay,nBands] - print*,'In GFS_rrtmgp_pre: ' - call check_error_msg(optical_props_cloudsByBand%init(kdist_lw%get_band_lims_wavenumber())) - call check_error_msg(optical_props_cloudsByBand%alloc_1scl(IM, LMK)) - ! Aerosol optics [Ccol,nLay,nBands] - call check_error_msg(optical_props_aerosol%init(kdist_lw%get_band_lims_wavenumber())) - call check_error_msg(optical_props_aerosol%alloc_1scl(IM, LMK)) - ! Cloud optics [nCol,nLay,nGpts] - call check_error_msg(optical_props_clouds%alloc_1scl(IM, LMK, kdist_lw)) - - ! Set gas concentrations - call gas_concentrations%reset() - call check_error_msg(gas_concentrations%set_vmr('o2', gasvmr_o2)) - call check_error_msg(gas_concentrations%set_vmr('co2', gasvmr_co2)) - call check_error_msg(gas_concentrations%set_vmr('ch4', gasvmr_ch4)) - call check_error_msg(gas_concentrations%set_vmr('n2o', gasvmr_n2o)) - call check_error_msg(gas_concentrations%set_vmr('h2o', vmr_h2o)) - call check_error_msg(gas_concentrations%set_vmr('o3', vmr_o3)) - - ! Copy aerosol to RRTMGP DDT - optical_props_aerosol%tau = faerlw1 * (1. - faerlw2) - - ! Compute cloud-optics for RTE. - call check_error_msg(kdist_cldy_lw%cloud_optics(IM, LMK, kdist_lw%get_nband(), nrghice, & - liqmask, icemask, clouds2, clouds4, clouds3, clouds5, optical_props_cloudsByBand)) - - ! Call McICA to generate subcolumns. - if (isubclw .gt. 0) then - - ! Call RNG. Mersennse Twister accepts 1D array, so loop over columns and collapse along G-points - ! and layers. ([nGpts,nLayer,nColumn]-> [nGpts*nLayer]*nColumn) - do iCol=1,IM - call random_setseed(ipseed(icol),rng_stat) - call random_number(rng1D,rng_stat) - rng3D(:,:,iCol) = reshape(source = rng1D,shape=[kdist_lw%get_ngpt(),LMK]) - enddo - - ! Call McICA - select case ( iovrlw ) - ! Maximumn-random - case(1) - call check_error_msg(sampled_mask_max_ran(rng3D,clouds1,cldfracMCICA)) - end select - - ! Map band optical depth to each g-point using McICA - call check_error_msg(draw_samples(cldfracMCICA,optical_props_cloudsByBand,optical_props_clouds)) - endif + ! Attention - the output arguments lm, im, lmk, lmp must not be set + ! in the CCPP version - they are defined in the interstitial_create routine + ! ######################################################################################### + subroutine GFS_rrtmgp_pre_run (Model, Grid, Sfcprop, Statein, Tbd, Coupling, & ! IN + Radtend, & ! INOUT + lm, im, lmk, lmp, kdist_lw, kdist_sw, kdist_cldy_lw, kdist_cldy_sw, & ! IN + kd, kt, kb, raddt, delp, dz, plvl, plyr, tlvl, tlyr, tsfg, tsfa, qlyr, olyr, icseed, & ! OUT + aerodp, cldsa, mtopa, mbota, de_lgth, alb1d, & ! OUT + optical_propsLW_clouds, optical_propsLW_aerosol, optical_propsSW_clouds, & ! OUT + optical_propsSW_aerosol, gas_concentrations_lw, gas_concentrations_sw, & + sfc_emiss_byband, sfc_alb_nir_dir, sfc_alb_nir_dif, sfc_alb_uvvis_dir, & + sfc_alb_uvvis_dif, nday, idxday, errmsg, errflg) + + ! Inputs + type(GFS_control_type), intent(in) :: Model + type(GFS_grid_type), intent(in) :: Grid + type(GFS_sfcprop_type), intent(in) :: Sfcprop + type(GFS_statein_type), intent(in) :: Statein + type(GFS_radtend_type), intent(inout) :: Radtend + type(GFS_tbd_type), intent(in) :: Tbd + type(GFS_coupling_type), intent(in) :: Coupling + integer, intent(in) :: im, lm, lmk, lmp + type(ty_gas_optics_rrtmgp),intent(in) :: & + kdist_lw, & ! RRTMGP DDT containing spectral information for LW calculation + kdist_sw ! RRTMGP DDT containing spectral information for SW calculation + type(ty_cloud_optics),intent(in) :: & + kdist_cldy_lw, & + kdist_cldy_sw + type(ty_gas_concs),intent(out) :: & + gas_concentrations_lw,gas_concentrations_sw + integer,intent(in),dimension(IM) :: & + icseed ! auxiliary special cloud related array when module + ! variable isubclw=2, it provides permutation seed + ! for each column profile that are used for generating + ! random numbers. when isubclw /=2, it will not be used. + + ! Outputs + integer, intent(out) :: kd, kt, kb + real(kind_phys), intent(out) :: raddt + real(kind_phys), dimension(size(Grid%xlon,1)), intent(out) :: & + tsfg, tsfa + real(kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: & + delp, dz, plyr, tlyr, qlyr, olyr + real(kind_phys), dimension(size(Grid%xlon,1),Model%levr+1+LTP), intent(out) :: & + plvl, tlvl + real(kind_phys), dimension(size(Grid%xlon,1),NSPC1), intent(out) :: & + aerodp + + real(kind_phys), dimension(size(Grid%xlon,1),5), intent(out) :: cldsa + integer, dimension(size(Grid%xlon,1),3), intent(out) :: mbota,mtopa + real(kind_phys), dimension(size(Grid%xlon,1)), intent(out) :: de_lgth,alb1d + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + type(ty_optical_props_1scl),intent(out) :: & + optical_propsLW_clouds, & + optical_propsLW_aerosol + type(ty_optical_props_2str),intent(out) :: & + optical_propsSW_clouds, & + optical_propsSW_aerosol + real(kind_phys),dimension(kdist_sw%get_nband(),size(Grid%xlon,1)),intent(out) :: & + sfc_emiss_byband, & ! Longwave surface emissivity in each band + sfc_alb_nir_dir, & ! Shortwave surface albedo (nIR-direct) + sfc_alb_nir_dif, & ! Shortwave surface albedo (nIR-diffuse) + sfc_alb_uvvis_dir, & ! Shortwave surface albedo (uvvis-direct) + sfc_alb_uvvis_dif ! Shortwave surface albedo (uvvis-diffuse) + + integer, intent(out) :: nday + integer, dimension(size(Grid%xlon,1)), intent(out) :: idxday + + ! Local variables + integer :: me, nfxr, ntrac, ntcw, ntiw, ncld, ntrw, ntsw, ntgl,i, j, k, k1, k2, lsk, & + LP1, lla, llb, lya, lyb, iCol, iBand + integer,dimension(IM) :: ipseed_lw,ipseed_sw + logical,dimension(IM,Model%levr+LTP) :: & + liqmask,icemask + real(kind_phys),dimension(IM,Model%levr+LTP) :: & + vmr_o3, vmr_h2o + real(kind_phys) :: es, qs, tem0d + real(kind_phys), dimension(size(Grid%xlon,1)) :: tem1d, tskn + real(kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP) :: & + rhly, tvly, qstl, prslk1, & + tem2da, cldcov, deltaq, cnvc, cnvw, effrl, effri, effrr, effrs + real (kind_phys) :: clwmin, clwm, clwt, onemrh, value, tem1, tem2 + real (kind_phys), parameter :: xrc3 = 100. + real(kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP+1) :: tem2db + real(kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,Model%ncnd) :: ccnd + real(kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,2:Model%ntrac) :: tracer1 + real(kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,NF_CLDS) :: clouds + real(kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,NF_VGAS) :: gasvmr + real(kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,kdist_sw%get_nband(),NF_AESW)::faersw,faersw2 + real(kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,kdist_lw%get_nband(),NF_AELW)::faerlw + type(ty_optical_props_1scl) :: optical_propsLW_cloudsByBand + type(ty_optical_props_2str) :: optical_propsSW_cloudsByBand + real(kind_phys), dimension(kdist_lw%get_ngpt(),Model%levr+LTP,IM) :: & + rng3D_lw + real(kind_phys), dimension(kdist_lw%get_ngpt()*(Model%levr+LTP)) :: & + rng1D_lw + logical, dimension(IM,Model%levr+LTP,kdist_lw%get_ngpt()) :: & + cldfracMCICA_lw + real(kind_phys), dimension(kdist_sw%get_ngpt(),Model%levr+LTP,IM) :: & + rng3D_sw + real(kind_phys), dimension(kdist_sw%get_ngpt()*(Model%levr+LTP)) :: & + rng1D_sw + logical, dimension(IM,Model%levr+LTP,kdist_sw%get_ngpt()) :: & + cldfracMCICA_sw + type(random_stat) :: rng_stat + real(kind_phys), dimension(size(Grid%xlon,1),NF_ALBD) :: sfcalb + + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + + if (.not. (Model%lsswr .or. Model%lslwr)) return + + ! Define some commonly used integers + me = Model%me ! MPI rank designator + NFXR = Model%nfxr ! second dimension for fluxr diagnostic variable (radiation) + NTRAC = Model%ntrac ! Number of tracers + ntcw = Model%ntcw ! Tracer index for cloud condensate (or liquid water) + ntiw = Model%ntiw ! Tracer index for ice + ncld = Model%ncld ! Cloud scheme + ntrw = Model%ntrw ! Tracer index for rain + ntsw = Model%ntsw ! Tracer index for snow + ntgl = Model%ntgl ! Tracer index for groupel + LP1 = LM + 1 ! num of in/out levels + + ! Set local /level/layer indexes corresponding to in/out variables + if ( lextop ) then + if ( ivflip == 1 ) then ! vertical from sfc upward + kd = 0 ! index diff between in/out and local + kt = 1 ! index diff between lyr and upper bound + kb = 0 ! index diff between lyr and lower bound + lla = LMK ! local index at the 2nd level from top + llb = LMP ! local index at toa level + lya = LM ! local index for the 2nd layer from top + lyb = LP1 ! local index for the top layer + else ! vertical from toa downward + kd = 1 ! index diff between in/out and local + kt = 0 ! index diff between lyr and upper bound + kb = 1 ! index diff between lyr and lower bound + lla = 2 ! local index at the 2nd level from top + llb = 1 ! local index at toa level + lya = 2 ! local index for the 2nd layer from top + lyb = 1 ! local index for the top layer + endif ! end if_ivflip_block + else + kd = 0 + if ( ivflip == 1 ) then ! vertical from sfc upward + kt = 1 ! index diff between lyr and upper bound + kb = 0 ! index diff between lyr and lower bound + else ! vertical from toa downward + kt = 0 ! index diff between lyr and upper bound + kb = 1 ! index diff between lyr and lower bound + endif ! end if_ivflip_block + endif ! end if_lextop_block + + ! Radiation time step (output) + raddt = min(Model%fhswr, Model%fhlwr) + + ! Setup surface ground temperature and ground/air skin temperature if required. + if ( itsfc == 0 ) then ! use same sfc skin-air/ground temp + tskn(1:IM) = Sfcprop%tsfc(1:IM) + tsfg(1:IM) = Sfcprop%tsfc(1:IM) + else ! use diff sfc skin-air/ground temp + tskn(1:IM) = Sfcprop%tsfc(1:IM) + tsfg(1:IM) = Sfcprop%tsfc(1:IM) + endif + + ! Prepare atmospheric profiles for radiation input. + lsk = 0 + if (ivflip == 0 .and. lm < Model%levs) lsk = Model%levs - lm + + ! Copy over state fields into fields, compute some needed quantities. + do k = 1, LM + k1 = k + kd + k2 = k + lsk + do i = 1, IM + plvl(i,k1+kb) = Statein%prsi(i,k2+kb) + plyr(i,k1) = Statein%prsl(i,k2) + tlyr(i,k1) = Statein%tgrs(i,k2) + prslk1(i,k1) = Statein%prslk(i,k2) + + ! Compute relative humidity. + es = min( Statein%prsl(i,k2), fpvs( Statein%tgrs(i,k2) ) ) ! fpvs and prsl in pa + qs = max( QMIN, eps * es / (Statein%prsl(i,k2) + epsm1*es) ) + rhly(i,k1) = max( 0.0, min( 1.0, max(QMIN, Statein%qgrs(i,k2,1))/qs ) ) + qstl(i,k1) = qs + enddo + plvl(i,k1+kb) = kdist_lw%get_press_min() + enddo + + ! Recast remaining all tracers (except sphum) forcing them all to be positive + do j = 2, NTRAC + do k = 1, LM + k1 = k + kd + k2 = k + lsk + tracer1(:,k1,j) = max(0.0, Statein%qgrs(:,k2,j)) + enddo + enddo + + ! Input data from toa to sfc + if (ivflip == 0) then + plvl(1:IM-1,1+kd) = Statein%prsi(1:IM-1,1) + plvl(IM,1+kd) = kdist_lw%get_press_min() + if (lsk /= 0) then + plvl(1:IM-1,1+kd) = 0.5 * (plvl(1:IM-1,2+kd) + plvl(1:IM-1,1+kd)) + plvl(IM,1+kd) = kdist_lw%get_press_min() + endif + ! Input data from sfc to top + else + plvl(1:IM-1,LP1+kd) = Statein%prsi(1:IM-1,LP1+lsk) + plvl(IM,LP1+kd) = kdist_lw%get_press_min() + if (lsk /= 0) then + plvl(1:IM-1,LM+kd) = 0.5 * (plvl(1:IM-1,LP1+kd) + plvl(1:IM-1,LM+kd)) + plvl(IM,LM+kd) = kdist_lw%get_press_min() + endif + endif + + if ( lextop ) then ! values for extra top layer + do i = 1, IM + plvl(i,llb) = kdist_lw%get_press_min() + if ( plvl(i,lla) <= kdist_lw%get_press_min() ) plvl(i,lla) = 2.0* kdist_lw%get_press_min() + plyr(i,lyb) = 0.5 * plvl(i,lla) + tlyr(i,lyb) = tlyr(i,lya) + prslk1(i,lyb) = (plyr(i,lyb)*0.001) ** rocp ! plyr in Pa + rhly(i,lyb) = rhly(i,lya) + qstl(i,lyb) = qstl(i,lya) + enddo - end subroutine GFS_rrtmgp_pre_run - + ! note: may need to take care the top layer amount + tracer1(:,lyb,:) = tracer1(:,lya,:) + endif + + ! Get layer ozone mass mixing ratio + if (Model%ntoz > 0) then + do k=1,lmk + do i=1,im + olyr(i,k) = max( QMIN, tracer1(i,k,Model%ntoz) ) + enddo + enddo + ! Use climatological ozone data + else + call getozn (prslk1, Grid%xlat, IM, LMK, olyr) + endif + + ! Compute cosine of zenith angle (only when SW is called) + if (Model%lsswr) then + call coszmn (Grid%xlon, Grid%sinlat, Grid%coslat, Model%solhr, IM, me, & + Radtend%coszen, Radtend%coszdg) + endif + + ! Call getgases(), to set up non-prognostic gas volume mixing ratios (gasvmr). + call getgases (plvl/100., Grid%xlon, Grid%xlat, IM, LMK, gasvmr) + + ! Get temperature at layer interface, and layer moisture. + tem2da(1:IM,2:LMK) = log( plyr(1:IM,2:LMK) ) + tem2db(1:IM,2:LMK) = log( plvl(1:IM,2:LMK) ) + + if (ivflip == 0) then ! input data from toa to sfc + do i = 1, IM + tem1d (i) = QME6 + tem2da(i,1) = log( plyr(i,1) ) + tem2db(i,1) = log( max( kdist_lw%get_press_min(), plvl(i,1)) ) + tem2db(i,LMP) = log( plvl(i,LMP) ) + tsfa (i) = tlyr(i,LMK) ! sfc layer air temp + tlvl(i,1) = tlyr(i,1) + tlvl(i,LMP) = tskn(i) + enddo + do k = 1, LM + k1 = k + kd + do i = 1, IM + qlyr(i,k1) = max( tem1d(i), Statein%qgrs(i,k,1) ) + tem1d(i) = min( QME5, qlyr(i,k1) ) + tvly(i,k1) = Statein%tgrs(i,k) * (1.0 + fvirt*qlyr(i,k1)) ! virtual T (K) + delp(i,k1) = plvl(i,k1+1) - plvl(i,k1) + enddo + enddo + + if ( lextop ) then + do i = 1, IM + qlyr(i,lyb) = qlyr(i,lya) + tvly(i,lyb) = tvly(i,lya) + delp(i,lyb) = plvl(i,lla) - plvl(i,llb) + enddo + endif + + do k = 2, LMK + do i = 1, IM + tlvl(i,k) = tlyr(i,k) + (tlyr(i,k-1) - tlyr(i,k)) * (tem2db(i,k) - tem2da(i,k)) / & + (tem2da(i,k-1) - tem2da(i,k)) + enddo + enddo + + ! Comput lvel height and layer thickness (km) + tem0d = 0.001 * rog + do i = 1, IM + do k = 1, LMK + dz(i,k) = tem0d * (tem2db(i,k+1) - tem2db(i,k)) * tvly(i,k) + enddo + enddo + + else ! input data from sfc to toa + do i = 1, IM + tem1d (i) = QME6 + tem2da(i,1) = log( plyr(i,1) ) + tem2db(i,1) = log( plvl(i,1) ) + tem2db(i,LMP) = log( max( kdist_lw%get_press_min(), plvl(i,LMP)) ) + tsfa (i) = tlyr(i,1) ! sfc layer air temp + tlvl(i,1) = tskn(i) + tlvl(i,LMP) = tlyr(i,LMK) + enddo + + do k = LM, 1, -1 + do i = 1, IM + qlyr(i,k) = max( tem1d(i), Statein%qgrs(i,k,1) ) + tem1d(i) = min( QME5, qlyr(i,k) ) + tvly(i,k) = Statein%tgrs(i,k) * (1.0 + fvirt*qlyr(i,k)) ! virtual T (K) + delp(i,k) = plvl(i,k) - plvl(i,k+1) + enddo + enddo + + if ( lextop ) then + do i = 1, IM + qlyr(i,lyb) = qlyr(i,lya) + tvly(i,lyb) = tvly(i,lya) + delp(i,lyb) = plvl(i,lla) - plvl(i,llb) + enddo + endif + + do k = 1, LMK-1 + do i = 1, IM + tlvl(i,k+1) = tlyr(i,k) + (tlyr(i,k+1) - tlyr(i,k)) * (tem2db(i,k+1) - tem2da(i,k)) / & + (tem2da(i,k+1) - tem2da(i,k)) + enddo + enddo + + ! Compute level height and layer thickness (km) + tem0d = 0.001 * rog + do i = 1, IM + do k = LMK, 1, -1 + dz(i,k) = tem0d * (tem2db(i,k) - tem2db(i,k+1)) * tvly(i,k) + enddo + enddo + endif ! end_if_ivflip + + ! Obtain cloud information for radiation calculations + ! (clouds,cldsa,mtopa,mbota) + ! for prognostic cloud: + ! - For Zhao/Moorthi's prognostic cloud scheme, + ! call module_radiation_clouds::progcld1() + ! - For Zhao/Moorthi's prognostic cloud+pdfcld, + ! call module_radiation_clouds::progcld3() + ! call module_radiation_clouds::progclduni() for unified cloud and ncld=2 + ccnd = 0.0_kind_phys + if (Model%ncnd == 1) then ! Zhao_Carr_Sundqvist + ccnd(1:IM,1:LMK,1) = tracer1(1:IM,1:LMK,ntcw) ! -liquid water/ice + elseif (Model%ncnd == 2) then ! MG + ccnd(1:IM,1:LMK,1) = tracer1(1:IM,1:LMK,ntcw) ! -liquid water + ccnd(1:IM,1:LMK,2) = tracer1(1:IM,1:LMK,ntiw) ! -ice water + elseif (Model%ncnd == 4) then ! MG2 + ccnd(1:IM,1:LMK,1) = tracer1(1:IM,1:LMK,ntcw) ! -liquid water + ccnd(1:IM,1:LMK,2) = tracer1(1:IM,1:LMK,ntiw) ! -ice water + ccnd(1:IM,1:LMK,3) = tracer1(1:IM,1:LMK,ntrw) ! -rain water + ccnd(1:IM,1:LMK,4) = tracer1(1:IM,1:LMK,ntsw) ! -snow water + elseif (Model%ncnd == 5) then ! GFDL MP, Thompson, MG3 + ccnd(1:IM,1:LMK,1) = tracer1(1:IM,1:LMK,ntcw) ! -liquid water + ccnd(1:IM,1:LMK,2) = tracer1(1:IM,1:LMK,ntiw) ! -ice water + ccnd(1:IM,1:LMK,3) = tracer1(1:IM,1:LMK,ntrw) ! -rain water + ccnd(1:IM,1:LMK,4) = tracer1(1:IM,1:LMK,ntsw) + & ! -snow + grapuel + tracer1(1:IM,1:LMK,ntgl) + endif + where(ccnd < epsq) ccnd = 0.0 + + if (Model%imp_physics == 11 ) then + if (.not. Model%lgfdlmprad) then + ccnd(:,:,1) = tracer1(:,1:LMK,ntcw) + ccnd(:,:,1) = ccnd(:,:,1) + tracer1(:,1:LMK,ntrw) + ccnd(:,:,1) = ccnd(:,:,1) + tracer1(:,1:LMK,ntiw) + ccnd(:,:,1) = ccnd(:,:,1) + tracer1(:,1:LMK,ntsw) + ccnd(:,:,1) = ccnd(:,:,1) + tracer1(:,1:LMK,ntgl) + endif + do k=1,LMK + do i=1,IM + if (ccnd(i,k,1) < EPSQ ) ccnd(i,k,1) = 0.0 + enddo + enddo + endif + + ! Add suspended convective cloud water to grid-scale cloud water + ! only for cloud fraction & radiation computation it is to enhance + ! cloudiness due to suspended convec cloud water for zhao/moorthi's + ! (imp_phys=99) & ferrier's (imp_phys=5) microphysics schemes + if ((Model%num_p3d == 4) .and. (Model%npdf3d == 3)) then ! same as Model%imp_physics = 99 + deltaq(1:im,1+kd:lm+kd) = Tbd%phy_f3d(1:im,1:lm,5) + cnvw (1:im,1+kd:lm+kd) = Tbd%phy_f3d(1:im,1:lm,6) + cnvc (1:im,1+kd:lm+kd) = Tbd%phy_f3d(1:im,1:lm,7) + elseif ((Model%npdf3d == 0) .and. (Model%ncnvcld3d == 1)) then ! same as MOdel%imp_physics=98 + deltaq(1:im,1+kd:lm+kd) = 0.0 + cnvw (1:im,1+kd:lm+kd) = Tbd%phy_f3d(1:im,1:lm,Model%num_p3d+1) + cnvc (1:im,1+kd:lm+kd) = 0.0 + else ! all the rest + deltaq(1:im,1:lmk) = 0.0 + cnvw (1:im,1:lmk) = 0.0 + cnvc (1:im,1:lmk) = 0.0 + endif + + if (lextop) then + cldcov(1:im,lyb) = cldcov(1:im,lya) + deltaq(1:im,lyb) = deltaq(1:im,lya) + cnvw (1:im,lyb) = cnvw (1:im,lya) + cnvc (1:im,lyb) = cnvc (1:im,lya) + if (Model%effr_in) then + effrl(1:im,lyb) = effrl(1:im,lya) + effri(1:im,lyb) = effri(1:im,lya) + effrr(1:im,lyb) = effrr(1:im,lya) + effrs(1:im,lyb) = effrs(1:im,lya) + endif + endif + + if (Model%imp_physics == 99) then + ccnd(1:IM,1:LMK,1) = ccnd(1:IM,1:LMK,1) + cnvw(1:IM,1:LMK) + endif + + if (Model%imp_physics == 10) then + ccnd(1:IM,1:LMK,1) = ccnd(1:IM,1:LMK,1) + cnvw(1:IM,1:LMK) + ccnd(1:IM,1:LMK,2) + endif + + ! DJS2019: START + ! Compute layer cloud fraction. + clwmin = 0.0 + cldcov(:,:) = 0.0 + if (.not. Model%lmfshal) then + do k = 1, LMK + do i = 1, IM + clwt = 1.0e-6 * (plyr(i,k)*0.1) + if (ccnd(i,k,1) > 0.) then + onemrh= max( 1.e-10, 1.0-rhly(i,k) ) + clwm = clwmin / max( 0.01, plyr(i,k)*0.1 ) + tem1 = min(max(sqrt(sqrt(onemrh*qstl(i,k))),0.0001),1.0) + tem1 = 2000.0 / tem1 + value = max( min( tem1*(ccnd(i,k,1)-clwm), 50.0 ), 0.0 ) + tem2 = sqrt( sqrt(rhly(i,k)) ) + cldcov(i,k) = max( tem2*(1.0-exp(-value)), 0.0 ) + endif + enddo + enddo + else + do k = 1, LMK + do i = 1, IM + clwt = 1.0e-6 * (plyr(i,k)*0.1) + if (ccnd(i,k,1) .gt. 0) then + onemrh= max( 1.e-10, 1.0-rhly(i,k) ) + clwm = clwmin / max( 0.01, plyr(i,k)*0.1 ) + tem1 = min(max((onemrh*qstl(i,k))**0.49,0.0001),1.0) !jhan + if (Model%lmfdeep2) then + tem1 = xrc3 / tem1 + else + tem1 = 100.0 / tem1 + endif + value = max( min( tem1*(ccnd(i,k,1)-clwm), 50.0 ), 0.0 ) + tem2 = sqrt( sqrt(rhly(i,k)) ) + cldcov(i,k) = max( tem2*(1.0-exp(-value)), 0.0 ) + endif + enddo + enddo + endif + ! DJS2019: END + + if (Model%uni_cld) then + if (Model%effr_in) then + cldcov(1:im,1+kd:lm+kd) = Tbd%phy_f3d(1:im,1:lm,Model%indcld) + effrl(1:im,1+kd:lm+kd) = Tbd%phy_f3d(1:im,1:lm,2) + effri(1:im,1+kd:lm+kd) = Tbd%phy_f3d(1:im,1:lm,3) + effrr(1:im,1+kd:lm+kd) = Tbd%phy_f3d(1:im,1:lm,4) + effrs(1:im,1+kd:lm+kd) = Tbd%phy_f3d(1:im,1:lm,5) + else + do k=1,lm + k1 = k + kd + do i=1,im + !cldcov(i,k1) = Tbd%phy_f3d(i,k,Model%indcld) + !if (tracer1(i,k,ntcw) .gt. 0 .or. tracer1(i,k,ntiw) .gt. 0) then + ! cldcov(i,k1) = 0.1 + !else + ! cldcov(i,k1) = 0.0 + !endif + enddo + enddo + endif + elseif (Model%imp_physics == Model%imp_physics_gfdl) then ! GFDL MP + cldcov(1:IM,1+kd:LM+kd) = tracer1(1:IM,1:LM,Model%ntclamt) + else ! neither of the other two cases + ! cldcov = 0.0 + endif + + ! MICROPHYSICS + ! *) zhao/moorthi's prognostic cloud scheme or unified cloud and/or with MG microphysics + if (Model%imp_physics == 99 .or. Model%imp_physics == 10) then + if (Model%uni_cld .and. Model%ncld >= 2) then + call progclduni (plyr/100., plvl/100., tlyr, tvly, ccnd, Model%ncnd, & ! IN + Grid%xlat, Grid%xlon, Sfcprop%slmsk, dz, delp/100.,IM, & ! IN + LMK, LMP, cldcov, effrl, effri, effrr, effrs, Model%effr_in, & ! IN + clouds, cldsa, mtopa, mbota, de_lgth) ! OUT + else + call progcld1 (plyr/100. ,plvl/100., tlyr, tvly, qlyr, qstl, rhly, & ! IN + ccnd(1:IM,1:LMK,1), Grid%xlat,Grid%xlon,Sfcprop%slmsk, dz, & ! IN + delp/100., IM, LMK, LMP, Model%uni_cld, Model%lmfshal, & ! IN + Model%lmfdeep2, cldcov, effrl, effri, effrr, effrs, & ! IN + Model%effr_in, & ! IN + clouds, cldsa, mtopa, mbota, de_lgth) ! OUT + endif + ! *) zhao/moorthi's prognostic cloud+pdfcld + elseif(Model%imp_physics == 98) then + call progcld3 (plyr/100., plvl/100., tlyr, tvly, qlyr, qstl, rhly, & ! IN + ccnd(1:IM,1:LMK,1), cnvw, cnvc, Grid%xlat, Grid%xlon, & ! IN + Sfcprop%slmsk, dz, delp/100., im, lmk, lmp, deltaq, Model%sup, & ! IN + Model%kdt, me, & ! IN + clouds, cldsa, mtopa, mbota, de_lgth) ! OUT + ! *) GFDL cloud scheme + elseif (Model%imp_physics == 11) then + if (.not.Model%lgfdlmprad) then + call progcld4 (plyr/100., plvl/100., tlyr, tvly, qlyr, qstl, rhly, & ! IN + ccnd(1:IM,1:LMK,1), cnvw, cnvc,Grid%xlat, Grid%xlon, & ! IN + Sfcprop%slmsk, cldcov, dz, delp/100., im, lmk, lmp, & ! IN + clouds, cldsa, mtopa, mbota, de_lgth) ! OUT + else + call progclduni (plyr/100., plvl/100., tlyr, tvly, ccnd, Model%ncnd, & ! IN + Grid%xlat, Grid%xlon, Sfcprop%slmsk, dz,delp/100., IM, LMK, & ! IN + LMP, cldcov, effrl, effri, effrr, effrs, Model%effr_in, & ! IN + clouds, cldsa, mtopa, mbota, de_lgth) ! OUT + endif + ! *) Thompson / WSM6 cloud micrphysics scheme + elseif(Model%imp_physics == 8 .or. Model%imp_physics == 6) then + if (Model%kdt == 1) then + Tbd%phy_f3d(:,:,1) = 10. + Tbd%phy_f3d(:,:,2) = 50. + Tbd%phy_f3d(:,:,3) = 250. + endif + + call progcld5 (plyr/100., plvl/100., tlyr, qlyr, qstl, rhly, tracer1, Grid%xlat, & ! IN + Grid%xlon,Sfcprop%slmsk,dz,delp/100., ntrac-1, ntcw-1, ntiw-1, & ! IN + ntrw-1, ntsw-1, ntgl-1, im, lmk, lmp, Model%uni_cld, Model%lmfshal,& ! IN + Model%lmfdeep2, cldcov(:,1:LMK),Tbd%phy_f3d(:,:,1), & ! IN + Tbd%phy_f3d(:,:,2), Tbd%phy_f3d(:,:,3), & ! IN + clouds,cldsa,mtopa,mbota, de_lgth) ! OUT + endif ! end if_imp_physics + + + ! mg, sfc-perts + ! --- scale random patterns for surface perturbations with + ! perturbation size + ! --- turn vegetation fraction pattern into percentile pattern + alb1d(:) = 0. + if (Model%do_sfcperts) then + if (Model%pertalb(1) > 0.) then + do i=1,im + call cdfnor(Coupling%sfc_wts(i,5),alb1d(i)) + enddo + endif + endif + ! mg, sfc-perts + + + ! ####################################################################################### + ! Call module_radiation_aerosols::setaer(),to setup aerosols property profile for both + ! LW and SW radiation. + ! ####################################################################################### + call setaer (plvl, plyr, prslk1, tvly, rhly, Sfcprop%slmsk, tracer1, Grid%xlon, & + Grid%xlat, IM, LMK, LMP, Model%lsswr, Model%lslwr, faersw, faerlw, aerodp) + + ! Store aerosol optical properties + ! SW. + ! For RRTMGP SW the bands are now ordered from [IR(band) -> nIR -> UV], in RRTMG the + ! band ordering was [nIR -> UV -> IR(band)] + faersw2(1:IM,1:LMK,1,1) = faersw(1:IM,1:LMK,kdist_sw%get_nband(),1) + faersw2(1:IM,1:LMK,1,2) = faersw(1:IM,1:LMK,kdist_sw%get_nband(),2) + faersw2(1:IM,1:LMK,1,3) = faersw(1:IM,1:LMK,kdist_sw%get_nband(),3) + faersw2(1:IM,1:LMK,2:kdist_sw%get_nband(),1) = faersw(1:IM,1:LMK,1:kdist_sw%get_nband()-1,1) + faersw2(1:IM,1:LMK,2:kdist_sw%get_nband(),2) = faersw(1:IM,1:LMK,1:kdist_sw%get_nband()-1,2) + faersw2(1:IM,1:LMK,2:kdist_sw%get_nband(),3) = faersw(1:IM,1:LMK,1:kdist_sw%get_nband()-1,3) + + ! ####################################################################################### + ! Call module_radiation_surface::setemis(),to setup surface emissivity for LW radiation. + ! ####################################################################################### + if (Model%lslwr) then + call setemis (Grid%xlon, Grid%xlat, Sfcprop%slmsk, Sfcprop%snowd, Sfcprop%sncovr, & + Sfcprop%zorl, tsfg, tsfa, Sfcprop%hprim, IM, Radtend%semis) + do iBand=1,kdist_lw%get_nband() + sfc_emiss_byband(iBand,1:IM) = Radtend%semis(1:IM) + enddo + endif + + ! ####################################################################################### + ! Check for daytime points for SW radiation. + ! ####################################################################################### + if (Model%lsswr) then + nday = 0 + idxday = 0 + do iCol = 1, IM + if (Radtend%coszen(iCol) >= 0.0001) then + nday = nday + 1 + idxday(nday) = iCol + endif + enddo + else + nday = 0 + idxday = 0 + endif + + ! ####################################################################################### + ! Call module_radiation_surface::setalb() to setup surface albedo for SW radiation. + ! ####################################################################################### + if (Model%lsswr) then + call setalb (Sfcprop%slmsk, Sfcprop%snowd, Sfcprop%sncovr, Sfcprop%snoalb, & + Sfcprop%zorl, Radtend%coszen, tsfg, tsfa, Sfcprop%hprim, Sfcprop%alvsf, & + Sfcprop%alnsf, Sfcprop%alvwf, Sfcprop%alnwf, Sfcprop%facsf, & + Sfcprop%facwf, Sfcprop%fice, Sfcprop%tisfc, IM, alb1d, Model%pertalb, & + sfcalb) + + ! Approximate mean surface albedo from vis- and nir- diffuse values. + Radtend%sfalb(:) = max(0.01, 0.5 * (sfcalb(:,2) + sfcalb(:,4))) + + ! Spread across all SW bands + do iBand=1,kdist_sw%get_nband() + sfc_alb_nir_dir(iBand,1:IM) = sfcalb(:,1) + sfc_alb_nir_dif(iBand,1:IM) = sfcalb(:,2) + sfc_alb_uvvis_dir(iBand,1:IM) = sfcalb(:,3) + sfc_alb_uvvis_dif(iBand,1:IM) = sfcalb(:,4) + enddo + else + sfc_alb_nir_dir(:,:) = 0._kind_phys + sfc_alb_nir_dif(:,:) = 0._kind_phys + sfc_alb_uvvis_dir(:,:) = 0._kind_phys + sfc_alb_uvvis_dif(:,:) = 0._kind_phys + endif + + ! ####################################################################################### + ! Compute radiative properties needed for RRTMGP + ! ####################################################################################### + + ! Change random number seed value for each radiation invocation (isubclw =1 or 2). + if(isubclw == 1) then ! advance prescribed permutation seed + do iCol = 1, IM + ipseed_lw(iCol) = ipsdlw0 + iCol + enddo + elseif (isubclw == 2) then ! use input array of permutaion seeds + do iCol = 1, IM + ipseed_lw(iCol) = icseed(iCol) + enddo + endif + ! Change random number seed value for each radiation invocation (isubcsw =1 or 2). + if(isubcsw == 1) then ! advance prescribed permutation seed + do iCol = 1, ncol + ipseed_sw(iCol) = ipsdsw0 + iCol + enddo + elseif (isubcsw == 2) then ! use input array of permutaion seeds + do iCol = 1, ncol + ipseed_sw(iCol) = icseed(iCol) + enddo + endif + + ! Compute volume mixing-ratios for ozone (mmr) and specific-humidity. + vmr_h2o = merge((qlyr/(1-qlyr))*amdw, 0., qlyr .ne. 1.) + vmr_o3 = merge(olyr*amdo3, 0., olyr .gt. 0.) + + ! Compute ice/liquid cloud masks, needed by rrtmgp_cloud_optics + liqmask = (clouds(:,:,1) .gt. 0 .and. clouds(:,:,2) .gt. 0) + icemask = (clouds(:,:,1) .gt. 0 .and. clouds(:,:,4) .gt. 0) + + ! ####################################################################################### + ! Allocate space for gas optical properties [ncol,nlay,ngpts] + ! ####################################################################################### + ! Longwave + if (Model%lslwr) then + ! Cloud optics [nCol,nLay,nBands] + call check_error_msg('GFS_rrtmgp_pre_run',optical_propsLW_cloudsByBand%init(kdist_lw%get_band_lims_wavenumber())) + call check_error_msg('GFS_rrtmgp_pre_run',optical_propsLW_cloudsByBand%alloc_1scl(IM, LMK)) + ! Aerosol optics [Ccol,nLay,nBands] + call check_error_msg('GFS_rrtmgp_pre_run',optical_propsLW_aerosol%init(kdist_lw%get_band_lims_wavenumber())) + call check_error_msg('GFS_rrtmgp_pre_run',optical_propsLW_aerosol%alloc_1scl(IM, LMK)) + ! Cloud optics [nCol,nLay,nGpts] + call check_error_msg('GFS_rrtmgp_pre_run',optical_propsLW_clouds%alloc_1scl(IM, LMK, kdist_lw)) + endif + ! Shortwave + if (Model%lsswr .and. nday .gt. 0) then + ! Cloud optics [nCol,nLay,nBands] + call check_error_msg('GFS_rrtmgp_pre_run',optical_propsSW_cloudsByBand%init(kdist_sw%get_band_lims_wavenumber())) + call check_error_msg('GFS_rrtmgp_pre_run',optical_propsSW_cloudsByBand%alloc_2str(nDay, LMK)) + ! Aerosol optics [Ccol,nLay,nBands] + call check_error_msg('GFS_rrtmgp_pre_run',optical_propsSW_aerosol%init(kdist_sw%get_band_lims_wavenumber())) + call check_error_msg('GFS_rrtmgp_pre_run',optical_propsSW_aerosol%alloc_2str(nDay, LMK)) + ! Cloud optics [nCol,nLay,nGpts] + call check_error_msg('GFS_rrtmgp_pre_run',optical_propsSW_clouds%alloc_2str(nDay, LMK, kdist_sw)) + endif + + ! ####################################################################################### + ! Set gas concentrations + ! ####################################################################################### + !if (Model%lslwr) then + call gas_concentrations_lw%reset() + call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations_lw%set_vmr('o2', gasvmr(:,:,4))) + call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations_lw%set_vmr('co2', gasvmr(:,:,1))) + call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations_lw%set_vmr('ch4', gasvmr(:,:,3))) + call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations_lw%set_vmr('n2o', gasvmr(:,:,2))) + call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations_lw%set_vmr('h2o', vmr_h2o)) + call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations_lw%set_vmr('o3', vmr_o3)) + !endif + !if (Model%lsswr .and. nday .gt. 0) then + call gas_concentrations_sw%reset() + call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations_sw%set_vmr('o2', gasvmr(idxday,:,4))) + call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations_sw%set_vmr('co2', gasvmr(idxday,:,1))) + call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations_sw%set_vmr('ch4', gasvmr(idxday,:,3))) + call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations_sw%set_vmr('n2o', gasvmr(idxday,:,2))) + call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations_sw%set_vmr('h2o', vmr_h2o(idxday,:))) + call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations_sw%set_vmr('o3', vmr_o3(idxday,:))) + !endif + + ! ####################################################################################### + ! Copy aerosol to RRTMGP DDT + ! ####################################################################################### + ! LW + if (Model%lslwr) then + optical_propsLW_aerosol%tau = faerlw(:,:,:,1) * (1. - faerlw(:,:,:,2)) + endif + ! SW + if (Model%lsswr .and. nday .gt. 0) then + optical_propsSW_aerosol%tau = faersw2(idxday,:,:,1) + optical_propsSW_aerosol%ssa = faersw2(idxday,:,:,2) + optical_propsSW_aerosol%g = faersw2(idxday,:,:,3) + endif + + ! ####################################################################################### + ! Compute cloud-optics for RTE. + ! ####################################################################################### + ! Longwave + if (Model%lslwr) then + call check_error_msg('GFS_rrtmgp_pre_run',kdist_cldy_lw%cloud_optics(IM, LMK, kdist_lw%get_nband(), & + nrghice_lw, liqmask, icemask, clouds(:,:,2), clouds(:,:,4), clouds(:,:,3), & + clouds(:,:,5), optical_propsLW_cloudsByBand)) + endif + ! Shortwave + if (Model%lsswr .and. nday .gt. 0) then + call check_error_msg('GFS_rrtmgp_pre_run',kdist_cldy_sw%cloud_optics(nDay, LMK, kdist_sw%get_nband(), & + nrghice_sw, liqmask(idxday,:), icemask(idxday,:), clouds(idxday,:,2), & + clouds(idxday,:,4), clouds(idxday,:,3), clouds(idxday,:,5), & + optical_propsSW_cloudsByBand)) + endif + + ! ####################################################################################### + ! Call McICA to generate subcolumns. + ! ####################################################################################### + ! Longwave + if (Model%lslwr .and. isubclw .gt. 0) then + + ! Call RNG. Mersennse Twister accepts 1D array, so loop over columns and collapse along G-points + ! and layers. ([nGpts,nLayer,nColumn]-> [nGpts*nLayer]*nColumn) + do iCol=1,IM + call random_setseed(ipseed_lw(icol),rng_stat) + call random_number(rng1D_lw,rng_stat) + rng3D_lw(:,:,iCol) = reshape(source = rng1D_lw,shape=[kdist_lw%get_ngpt(),LMK]) + enddo + + ! Call McICA + select case ( iovrlw ) + ! Maximumn-random + case(1) + call check_error_msg('GFS_rrtmgp_pre_run',sampled_mask_max_ran(rng3D_lw,clouds(:,:,1),cldfracMCICA_lw)) + end select + + ! Map band optical depth to each g-point using McICA + call check_error_msg('GFS_rrtmgp_pre_run',draw_samples(cldfracMCICA_lw,optical_propsLW_cloudsByBand,optical_propsLW_clouds)) + endif + + ! Shortwave + if (Model%lsswr .and. nday .gt. 0 .and. isubcsw .gt. 0) then + + ! Call RNG. Mersennse Twister accepts 1D array, so loop over columns and collapse along G-points + ! and layers. ([nGpts,nLayer,nColumn]-> [nGpts*nLayer]*nColumn) + do iCol=1,IM + call random_setseed(ipseed_sw(icol),rng_stat) + call random_number(rng1D_sw,rng_stat) + rng3D_sw(:,:,iCol) = reshape(source = rng1D_sw,shape=[kdist_sw%get_ngpt(),LMK]) + enddo + + ! Call McICA + select case ( iovrsw ) + ! Maximumn-random + case(1) + call check_error_msg('GFS_rrtmgp_pre_run',sampled_mask_max_ran(rng3D_sw,clouds(:,:,1),cldfracMCICA_sw)) + end select + + ! Map band optical depth to each g-point using McICA + call check_error_msg('GFS_rrtmgp_pre_run',draw_samples(cldfracMCICA_sw,optical_propsSW_cloudsByBand,optical_propsSW_clouds)) + endif + + end subroutine GFS_rrtmgp_pre_run + !> \section arg_table_GFS_rrtmgp_pre_finalize Argument Table !! - subroutine GFS_rrtmgp_pre_finalize () - close(58) - end subroutine GFS_rrtmgp_pre_finalize - + subroutine GFS_rrtmgp_pre_finalize () + end subroutine GFS_rrtmgp_pre_finalize + !! @} - end module GFS_rrtmgp_pre +end module GFS_rrtmgp_pre diff --git a/physics/rrtmgp_lw.F90 b/physics/rrtmgp_lw.F90 index 183bc8db6..3007146d7 100644 --- a/physics/rrtmgp_lw.F90 +++ b/physics/rrtmgp_lw.F90 @@ -10,6 +10,8 @@ module rrtmgp_lw use mo_rrtmgp_clr_all_sky, only: rte_lw use mo_gas_concentrations, only: ty_gas_concs use mo_fluxes_byband, only: ty_fluxes_byband + use rrtmgp_sw, only: check_error_msg + ! Parameters integer,parameter :: nGases = 6 @@ -441,9 +443,9 @@ subroutine rrtmgp_lw_init(Model, mpicomm, mpirank, mpiroot, kdist_lw, kdist_cldy ! Initialize gas concentrations and gas optics class with data do iGas=1,nGases - call check_error_msg(gas_concentrations%set_vmr(active_gases(iGas), 0._kind_phys)) + call check_error_msg('rrtmgp_lw_init',gas_concentrations%set_vmr(active_gases(iGas), 0._kind_phys)) enddo - call check_error_msg(kdist_lw%load(gas_concentrations, gas_names, key_species, band2gpt, & + call check_error_msg('rrtmgp_lw_init',kdist_lw%load(gas_concentrations, gas_names, key_species, band2gpt, & band_lims, press_ref, press_ref_trop, temp_ref, temp_ref_p, temp_ref_t, & vmr_ref, kmajor, kminor_lower, kminor_upper, gas_minor,identifier_minor, & minor_gases_lower, minor_gases_upper, minor_limits_gpt_lower, & @@ -642,14 +644,14 @@ subroutine rrtmgp_lw_init(Model, mpicomm, mpirank, mpiroot, kdist_lw, kdist_cldy ! Load tables data for RRTGMP cloud-optics if (rrtmgp_lw_cld_phys .eq. 1) then - call check_error_msg(kdist_cldy_lw%set_ice_roughness(nrghice)) - call check_error_msg(kdist_cldy_lw%load(band_lims_cldy, radliq_lwr, radliq_upr, & + call check_error_msg('rrtmgp_lw_init',kdist_cldy_lw%set_ice_roughness(nrghice)) + call check_error_msg('rrtmgp_lw_init',kdist_cldy_lw%load(band_lims_cldy, radliq_lwr, radliq_upr, & radliq_fac, radice_lwr, radice_upr, radice_fac, lut_extliq, lut_ssaliq, & lut_asyliq, lut_extice, lut_ssaice, lut_asyice)) endif if (rrtmgp_lw_cld_phys .eq. 2) then - call check_error_msg(kdist_cldy_lw%set_ice_roughness(nrghice)) - call check_error_msg(kdist_cldy_lw%load(band_lims_cldy, pade_extliq, & + call check_error_msg('rrtmgp_lw_init',kdist_cldy_lw%set_ice_roughness(nrghice)) + call check_error_msg('rrtmgp_lw_init',kdist_cldy_lw%load(band_lims_cldy, pade_extliq, & pade_ssaliq, pade_asyliq, pade_extice, pade_ssaice, pade_asyice, & pade_sizereg_extliq, pade_sizereg_ssaliq, pade_sizereg_asyliq, & pade_sizereg_extice, pade_sizereg_ssaice, pade_sizereg_asyice)) @@ -660,58 +662,57 @@ end subroutine rrtmgp_lw_init ! ######################################################################################### ! ######################################################################################### !! \section arg_table_rrtmgp_lw_run Argument Table -!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | -!! |-----------------------|-----------------------------------------------------------------------------------------------|--------------------------------------------------------------------|-------|------|-----------------------|-----------|--------|----------| -!! | ncol | horizontal_loop_extent | horizontal dimension | count | 0 | integer | | in | F | -!! | nlay | adjusted_vertical_layer_dimension_for_radiation | number of vertical layers for radiation | count | 0 | integer | | in | F | -!! | p_lay | air_pressure_at_layer_for_radiation_in_hPa | air pressure layer | hPa | 2 | real | kind_phys | in | F | -!! | p_lev | air_pressure_at_interface_for_radiation_in_hPa | air pressure level | hPa | 2 | real | kind_phys | in | F | -!! | t_lay | air_temperature_at_layer_for_radiation | air temperature layer | K | 2 | real | kind_phys | in | F | -!! | skt | surface_ground_temperature_for_radiation | surface ground temperature for radiation | K | 1 | real | kind_phys | in | F | -!! | sfc_emiss | surface_longwave_emissivity_in_each_band | surface lw emissivity in fraction in each LW band | frac | 2 | real | kind_phys | in | F | -!! | kdist_lw | K_distribution_file_for_RRTMGP_LW_scheme | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | -!! | optical_props_clds | optical_properties_for_cloudy_atmosphere | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_1scl | | in | F | -!! | optical_props_aerosol | optical_properties_for_aerosols | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_1scl | | in | F | -!! | gas_concentrations | Gas_concentrations_for_RRTMGP_suite | DDT containing gas concentrations for RRTMGP radiation scheme | DDT | 0 | ty_gas_concs | | in | F | -!! | lslwr | flag_to_calc_lw | flag to calculate LW irradiances | flag | 0 | logical | | in | F | -!! | fluxLW_allsky | lw_flux_profiles_byband_allsky | Fortran DDT containing RRTMGP 3D fluxes | DDT | 0 | ty_fluxes_byband | | out | F | -!! | fluxLW_clrsky | lw_flux_profiles_byband_clrsky | Fortran DDT containing RRTMGP 3D fluxes | DDT | 0 | ty_fluxes_byband | | out | F | -!! | hlw0 | tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_time_step | longwave clear sky heating rate | K s-1 | 2 | real | kind_phys | inout | T | -!! | hlwb | lw_heating_rate_spectral | longwave total sky heating rate (spectral) | K s-1 | 3 | real | kind_phys | inout | T | -!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | -!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | +!! |-------------------------|-----------------------------------------------------------------------------------------------|--------------------------------------------------------------------|-------|------|-----------------------|-----------|--------|----------| +!! | ncol | horizontal_loop_extent | horizontal dimension | count | 0 | integer | | in | F | +!! | nlay | adjusted_vertical_layer_dimension_for_radiation | number of vertical layers for radiation | count | 0 | integer | | in | F | +!! | p_lay | air_pressure_at_layer_for_radiation_in_hPa | air pressure layer | hPa | 2 | real | kind_phys | in | F | +!! | p_lev | air_pressure_at_interface_for_radiation_in_hPa | air pressure level | hPa | 2 | real | kind_phys | in | F | +!! | t_lay | air_temperature_at_layer_for_radiation | air temperature layer | K | 2 | real | kind_phys | in | F | +!! | skt | surface_ground_temperature_for_radiation | surface ground temperature for radiation | K | 1 | real | kind_phys | in | F | +!! | sfc_emiss | surface_longwave_emissivity_in_each_band | surface lw emissivity in fraction in each LW band | frac | 2 | real | kind_phys | in | F | +!! | kdist_lw | K_distribution_file_for_RRTMGP_LW_scheme | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | +!! | optical_propsLW_clds | longwave_optical_properties_for_cloudy_atmosphere | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_1scl | | in | F | +!! | optical_propsLW_aerosol | longwave_optical_properties_for_aerosols | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_1scl | | in | F | +!! | gas_concentrations | Gas_concentrations_for_RRTMGP_suite_lw | DDT containing gas concentrations for RRTMGP radiation scheme | DDT | 0 | ty_gas_concs | | in | F | +!! | lslwr | flag_to_calc_lw | flag to calculate LW irradiances | flag | 0 | logical | | in | F | +!! | fluxLW_allsky | lw_flux_profiles_byband_allsky | Fortran DDT containing RRTMGP 3D fluxes | DDT | 0 | ty_fluxes_byband | | out | F | +!! | fluxLW_clrsky | lw_flux_profiles_byband_clrsky | Fortran DDT containing RRTMGP 3D fluxes | DDT | 0 | ty_fluxes_byband | | out | F | +!! | hlw0 | tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_time_step | longwave clear sky heating rate | K s-1 | 2 | real | kind_phys | in | T | +!! | hlwb | lw_heating_rate_spectral | longwave total sky heating rate (spectral) | K s-1 | 3 | real | kind_phys | in | T | +!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | +!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | !! subroutine rrtmgp_lw_run(ncol, nlay, kdist_lw, p_lay, t_lay, p_lev, skt, & - sfc_emiss, gas_concentrations, optical_props_clds, optical_props_aerosol,& + sfc_emiss, gas_concentrations, optical_propsLW_clds, optical_propsLW_aerosol,& lslwr, fluxLW_allsky, fluxLW_clrsky, hlw0, hlwb, errmsg, errflg) ! Inputs integer, intent(in) :: & - ncol, & ! Number of horizontal gridpoints - nlay ! Number of vertical layers + ncol, & ! Number of horizontal gridpoints + nlay ! Number of vertical layers real(kind_phys), dimension(ncol,nlay), intent(in) :: & - p_lay, & ! Pressure @ model layer-centers (hPa) - t_lay ! Temperature (K) + p_lay, & ! Pressure @ model layer-centers (hPa) + t_lay ! Temperature (K) real(kind_phys), dimension(ncol,nlay+1), intent(in) :: & - p_lev ! Pressure @ model layer-interfaces (hPa) + p_lev ! Pressure @ model layer-interfaces (hPa) real(kind_phys), dimension(ncol), intent(in) :: & - skt ! Surface(skin) temperature (K) + skt ! Surface(skin) temperature (K) type(ty_gas_optics_rrtmgp),intent(in) :: & - kdist_lw ! DDT containing LW spectral information + kdist_lw ! DDT containing LW spectral information real(kind_phys), dimension(kdist_lw%get_nband(),ncol) :: & - sfc_emiss ! Surface emissivity (1) + sfc_emiss ! Surface emissivity (1) type(ty_optical_props_1scl),intent(in) :: & - optical_props_clds, & ! RRTMGP DDT: cloud radiative properties - optical_props_aerosol ! RRTMGP DDT: aerosol radiative properties + optical_propsLW_clds, & ! RRTMGP DDT: longwave cloud radiative properties + optical_propsLW_aerosol ! RRTMGP DDT: longwave aerosol radiative properties type(ty_gas_concs),intent(in) :: & - gas_concentrations ! RRTMGP DDT: trace gas concentrations (vmr) + gas_concentrations ! RRTMGP DDT: trace gas concentrations (vmr) logical, intent(in) :: & - lslwr ! Flag to calculate LW irradiances + lslwr ! Flag to calculate LW irradiances ! Outputs character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg - type(ty_fluxes_byband),intent(out) :: & fluxLW_allsky, & ! All-sky flux (W/m2) fluxLW_clrsky ! Clear-sky flux (W/m2) @@ -724,9 +725,9 @@ subroutine rrtmgp_lw_run(ncol, nlay, kdist_lw, p_lay, t_lay, p_lev, skt, & ! Local variables real(kind_phys), dimension(ncol,nlay+1),target :: & - flux_up_allsky, flux_up_clrsky, flux_dn_allsky, flux_dn_clrsky + fluxLW_up_allsky, fluxLW_up_clrsky, fluxLW_dn_allsky, fluxLW_dn_clrsky real(kind_phys), dimension(ncol,nlay+1,kdist_lw%get_nband()),target :: & - fluxBB_up_allsky, fluxBB_dn_allsky + fluxLWBB_up_allsky, fluxLWBB_dn_allsky logical :: l_ClrSky_HR, l_AllSky_HR_byband ! Initialize CCPP error handling variables @@ -739,43 +740,33 @@ subroutine rrtmgp_lw_run(ncol, nlay, kdist_lw, p_lay, t_lay, p_lev, skt, & l_AllSky_HR_byband = present(hlwb) ! Initialize RRTMGP DDT containing 2D(3D) fluxes - fluxLW_allsky%flux_up => flux_up_allsky - fluxLW_allsky%flux_dn => flux_dn_allsky - fluxLW_clrsky%flux_up => flux_up_clrsky - fluxLW_clrsky%flux_dn => flux_dn_clrsky + fluxLW_allsky%flux_up => fluxLW_up_allsky + fluxLW_allsky%flux_dn => fluxLW_dn_allsky + fluxLW_clrsky%flux_up => fluxLW_up_clrsky + fluxLW_clrsky%flux_dn => fluxLW_dn_clrsky ! Only calculate fluxes by-band, only when heating-rate profiles by band are requested. if (l_AllSky_HR_byband) then - fluxLW_allsky%bnd_flux_up => fluxBB_up_allsky - fluxLW_allsky%bnd_flux_dn => fluxBB_dn_allsky + fluxLW_allsky%bnd_flux_up => fluxLWBB_up_allsky + fluxLW_allsky%bnd_flux_dn => fluxLWBB_dn_allsky endif ! Call RRTMGP LW scheme - call check_error_msg(rte_lw( & - kdist_lw, & ! IN - spectral information - gas_concentrations, & ! IN - gas concentrations (vmr) - p_lay, & ! IN - pressure at layer interfaces (Pa) - t_lay, & ! IN - temperature at layer interfaes (K) - p_lev, & ! IN - pressure at layer centers (Pa) - skt, & ! IN - skin temperature (K) - sfc_emiss, & ! IN - surface emissivity in each LW band - optical_props_clds, & ! IN - DDT containing cloud optical information - fluxLW_allsky, & ! OUT - Fluxes, all-sky, 3D (nCol,nLay,nBand) - fluxLW_clrsky, & ! OUT - Fluxes, clear-sky, 3D (nCol,nLay,nBand) - aer_props = optical_props_aerosol)) ! IN(optional) - DDT containing aerosol optical information + call check_error_msg('rrtmgp_lw_run',rte_lw( & + kdist_lw, & ! IN - spectral information + gas_concentrations, & ! IN - gas concentrations (vmr) + p_lay, & ! IN - pressure at layer interfaces (Pa) + t_lay, & ! IN - temperature at layer interfaes (K) + p_lev, & ! IN - pressure at layer centers (Pa) + skt, & ! IN - skin temperature (K) + sfc_emiss, & ! IN - surface emissivity in each LW band + optical_propsLW_clds, & ! IN - DDT containing cloud optical information + fluxLW_allsky, & ! OUT - Fluxes, all-sky, 3D (nCol,nLay,nBand) + fluxLW_clrsky, & ! OUT - Fluxes, clear-sky, 3D (nCol,nLay,nBand) + aer_props = optical_propsLW_aerosol)) ! IN(optional) - DDT containing aerosol optical information end subroutine rrtmgp_lw_run subroutine rrtmgp_lw_finalize() end subroutine rrtmgp_lw_finalize - subroutine check_error_msg(error_msg) - character(len=*), intent(in) :: error_msg - - if(error_msg /= "") then - print*,"ERROR(rrtmgp_lw.F90): " - print*,trim(error_msg) - return - end if - end subroutine check_error_msg - end module rrtmgp_lw diff --git a/physics/rrtmgp_sw.F90 b/physics/rrtmgp_sw.F90 index b1eec1fe1..0961a0086 100644 --- a/physics/rrtmgp_sw.F90 +++ b/physics/rrtmgp_sw.F90 @@ -1,62 +1,28 @@ ! ########################################################################################### ! ########################################################################################### module rrtmgp_sw - use GFS_typedefs, only: GFS_control_type - use physparam, only: iovrsw, icldflg, iswcliq, isubcsw - use machine, only: kind_phys - use mo_rte_kind, only: wl - use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp - use mo_cloud_optics, only: ty_cloud_optics - use mo_gas_concentrations, only: ty_gas_concs - use mo_fluxes, only: ty_fluxes_broadband - use mo_fluxes_byband, only: ty_fluxes_byband - use mo_optical_props, only: ty_optical_props_1scl,ty_optical_props_2str - use mo_heating_rates, only: compute_heating_rate - use mo_rrtmgp_constants, only: grav, avogad - use module_radsw_parameters, only: topfsw_type, sfcfsw_type, profsw_type, cmpfsw_type - use mo_rrtmgp_sw_cloud_optics, only: rrtmgp_sw_cloud_optics,mcica_subcol_sw - use mo_cloud_sampling, only: sampled_mask_max_ran, sampled_mask_exp_ran, draw_samples - use mersenne_twister, only: random_setseed, random_number, random_stat - use mo_rrtmgp_clr_all_sky, only: rte_sw - - implicit none + use machine, only: kind_phys + use GFS_typedefs, only: GFS_control_type + use mo_rte_kind, only: wl + use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp + use mo_cloud_optics, only: ty_cloud_optics + use mo_optical_props, only: ty_optical_props_2str + use mo_rrtmgp_clr_all_sky, only: rte_sw + use mo_gas_concentrations, only: ty_gas_concs + use mo_fluxes_byband, only: ty_fluxes_byband + use module_radsw_parameters, only: cmpfsw_type ! Parameters integer,parameter :: nGases = 6 real(kind_phys),parameter :: epsilon=1.0e-6 - real (kind=kind_phys), parameter :: ftiny = 1.0e-12 character(len=3),parameter, dimension(nGases) :: & active_gases = (/ 'h2o', 'co2', 'o3 ', 'n2o', 'ch4', 'o2 '/) - - ! Molecular weight ratios (for converting mmr to vmr) - real(kind_phys), parameter :: & - amd = 28.9644_kind_phys, & ! Molecular weight of dry-air (g/mol) - amw = 18.0154_kind_phys, & ! Molecular weight of water vapor (g/mol) - amo3 = 47.9982_kind_phys, & ! Modelular weight of ozone (g/mol) - amdw = amd/amw, & ! Molecular weight of dry air / water vapor - amdo3 = amd/amo3 ! Molecular weight of dry air / ozone - ! - real (kind_phys), parameter :: & - s0 = 1368.22 ! Solar constant (W/m2) - - ! Logical flags for optional output fields in rrtmgp_sw_run(), default=.false. - logical :: & - l_AllSky_HR_byband = .false., & ! 2D [ncol,nlay] all-sky heating rates, in each band [ncol,nlay,nBandsSW]? - l_ClrSky_HR = .false., & ! 2D [ncol,nlay] clear-sky heating rate? - l_fluxes2D = .false., & ! 2D [ncol,nlay] radiative fluxes *Note* fluxes is a DDT w/ 4 fields. - l_sfcFluxes1D = .false. ! 1D [ncol] surface fluxes *Note* fluxes is a DDT w/ 6 fields. - - ! Module parameters (set during rrtmgp_sw_init()) - integer :: & - rrtmgp_sw_cld_phys, & ! RRTMGP cloud-physics (0-RRTMG, 1-RRTGMP(LUT), 2-RRTMGP(Pade)) - nGptsSW, & ! Number of SW spectral g-points - nBandsSW, & ! Number of SW bands - nrghice, & ! Number of ice roughness categories - ipsdsw0 ! Initial seed for McICA + integer :: nrghice, ipsdsw0 public rrtmgp_sw_init, rrtmgp_sw_run, rrtmgp_sw_finalize contains + !! \section arg_table_rrtmgp_sw_init Argument Table !! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | !! |--------------------|-------------------------------------------------|---------------------------------------------------------------------------|-------|------|----------------------|-----------|--------|----------| @@ -202,26 +168,6 @@ subroutine rrtmgp_sw_init(Model,mpicomm, mpirank, mpiroot, kdist_sw, kdist_cldy_ errmsg = '' errflg = 0 - ! Ensure that requested cloud overlap is reasonable. - if ( iovrsw<0 .or. iovrsw>3 ) then - print *,' *** Error in specification of cloud overlap flag', & - ' IOVRSW=',iovrsw,' in RSWINIT !!' - stop - endif - - ! Check cloud flags for consistency. - if ((icldflg == 0 .and. iswcliq /= 0) .or. & - (icldflg == 1 .and. iswcliq == 0)) then - print *,' *** Model cloud scheme inconsistent with SW', & - ' radiation cloud radiative property setup !!' - stop - endif - if ( isubcsw==0 .and. iovrsw>2 ) then - print *,' *** IOVRSW=',iovrsw,' is not available for ISUBCSW=0 setting!!' - print *,' The program will use maximum/random overlap instead.' - iovrsw = 1 - endif - ! How are we handling cloud-optics? rrtmgp_sw_cld_phys = Model%rrtmgp_cld_phys @@ -497,9 +443,9 @@ subroutine rrtmgp_sw_init(Model,mpicomm, mpirank, mpiroot, kdist_sw, kdist_cldy_ ! Initialize gas concentrations and gas optics class with data do iGas=1,nGases - call check_error_msg(gas_concentrations%set_vmr(active_gases(iGas), 0._kind_phys)) + call check_error_msg('rrtmgp_sw_init',gas_concentrations%set_vmr(active_gases(iGas), 0._kind_phys)) enddo - call check_error_msg(kdist_sw%load(gas_concentrations, gas_names_sw, key_species_sw, band2gpt_sw, & + call check_error_msg('rrtmgp_sw_init',kdist_sw%load(gas_concentrations, gas_names_sw, key_species_sw, band2gpt_sw, & band_lims_sw, press_ref_sw, press_ref_trop_sw, temp_ref_sw, temp_ref_p_sw, temp_ref_t_sw, & vmr_ref_sw, kmajor_sw, kminor_lower_sw, kminor_upper_sw, gas_minor_sw,identifier_minor_sw, & minor_gases_lower_sw, minor_gases_upper_sw, minor_limits_gpt_lower_sw, & @@ -702,578 +648,167 @@ subroutine rrtmgp_sw_init(Model,mpicomm, mpirank, mpiroot, kdist_sw, kdist_cldy_ ! Load tables data for RRTGMP cloud-optics if (rrtmgp_sw_cld_phys .eq. 1) then - call check_error_msg(kdist_cldy_sw%set_ice_roughness(nrghice)) - call check_error_msg(kdist_cldy_sw%load(band_lims_cldy_sw, radliq_lwr_sw, & + call check_error_msg('rrtmgp_sw_init',kdist_cldy_sw%set_ice_roughness(nrghice)) + call check_error_msg('rrtmgp_sw_init',kdist_cldy_sw%load(band_lims_cldy_sw, radliq_lwr_sw, & radliq_upr_sw, radliq_fac_sw, radice_lwr_sw, radice_upr_sw, radice_fac_sw, & lut_extliq_sw, lut_ssaliq_sw, lut_asyliq_sw, lut_extice_sw, lut_ssaice_sw, & lut_asyice_sw)) endif if (rrtmgp_sw_cld_phys .eq. 2) then - call check_error_msg(kdist_cldy_sw%set_ice_roughness(nrghice)) - call check_error_msg(kdist_cldy_sw%load(band_lims_cldy_sw, pade_extliq_sw, & + call check_error_msg('rrtmgp_sw_init',kdist_cldy_sw%set_ice_roughness(nrghice)) + call check_error_msg('rrtmgp_sw_init', kdist_cldy_sw%load(band_lims_cldy_sw, pade_extliq_sw, & pade_ssaliq_sw, pade_asyliq_sw, pade_extice_sw, pade_ssaice_sw, pade_asyice_sw, & pade_sizereg_extliq_sw, pade_sizereg_ssaliq_sw, pade_sizereg_asyliq_sw, & pade_sizereg_extice_sw, pade_sizereg_ssaice_sw, pade_sizereg_asyice_sw)) endif end subroutine rrtmgp_sw_init + ! ######################################################################################### - ! GFS_RRTMGP_SW_RUN ! ######################################################################################### !! \section arg_table_rrtmgp_sw_run Argument Table -!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | -!! |-----------------|------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------|---------|------|---------------------------|-----------|--------|----------| -!! | p_lay | air_pressure_at_layer_for_radiation_in_hPa | air pressure layer | hPa | 2 | real | kind_phys | in | F | -!! | p_lev | air_pressure_at_interface_for_radiation_in_hPa | air pressure level | hPa | 2 | real | kind_phys | in | F | -!! | t_lay | air_temperature_at_layer_for_radiation | air temperature layer | K | 2 | real | kind_phys | in | F | -!! | t_lev | air_temperature_at_interface_for_radiation | air temperature level | K | 2 | real | kind_phys | in | F | -!! | q_lay | water_vapor_specific_humidity_at_layer_for_radiation | specific humidity layer | kg kg-1 | 2 | real | kind_phys | in | F | -!! | o3_lay | ozone_concentration_at_layer_for_radiation | ozone concentration layer | kg kg-1 | 2 | real | kind_phys | in | F | -!! | vmr_co2 | volume_mixing_ratio_co2 | volume mixing ratio co2 | kg kg-1 | 2 | real | kind_phys | in | F | -!! | vmr_n2o | volume_mixing_ratio_n2o | volume mixing ratio no2 | kg kg-1 | 2 | real | kind_phys | in | F | -!! | vmr_ch4 | volume_mixing_ratio_ch4 | volume mixing ratio ch4 | kg kg-1 | 2 | real | kind_phys | in | F | -!! | vmr_o2 | volume_mixing_ratio_o2 | volume mixing ratio o2 | kg kg-1 | 2 | real | kind_phys | in | F | -!! | vmr_co | volume_mixing_ratio_co | volume mixing ratio co | kg kg-1 | 2 | real | kind_phys | in | F | -!! | vmr_cfc11 | volume_mixing_ratio_cfc11 | volume mixing ratio cfc11 | kg kg-1 | 2 | real | kind_phys | in | F | -!! | vmr_cfc12 | volume_mixing_ratio_cfc12 | volume mixing ratio cfc12 | kg kg-1 | 2 | real | kind_phys | in | F | -!! | vmr_cfc22 | volume_mixing_ratio_cfc22 | volume mixing ratio cfc22 | kg kg-1 | 2 | real | kind_phys | in | F | -!! | vmr_ccl4 | volume_mixing_ratio_ccl4 | volume mixing ratio ccl4 | kg kg-1 | 2 | real | kind_phys | in | F | -!! | icseed | seed_random_numbers_sw | seed for random number generation for shortwave radiation | none | 1 | integer | | in | F | -!! | tau_aer | aerosol_optical_depth_for_longwave_bands_01-16 | aerosol optical depth for shortwave bands 01-16 | none | 3 | real | kind_phys | in | F | -!! | ssa_aer | aerosol_single_scattering_albedo_for_longwave_bands_01-16 | aerosol single scattering albedo for shortwave bands 01-16 | frac | 3 | real | kind_phys | in | F | -!! | asy_aer | aerosol_asymmetry_parameter_for_shortwave_bands_01-16 | aerosol asymmetry paramter for shortwave bands 01-16 | none | 3 | real | kind_phys | in | F | -!! | sfcalb_nir_dir | surface_albedo_due_to_near_IR_direct | surface albedo due to near IR direct beam | frac | 1 | real | kind_phys | in | F | -!! | sfcalb_nir_dif | surface_albedo_due_to_near_IR_diffused | surface albedo due to near IR diffused beam | frac | 1 | real | kind_phys | in | F | -!! | sfcalb_uvis_dir | surface_albedo_due_to_UV_and_VIS_direct | surface albedo due to UV+VIS direct beam | frac | 1 | real | kind_phys | in | F | -!! | sfcalb_uvis_dif | surface_albedo_due_to_UV_and_VIS_diffused | surface albedo due to UV+VIS diffused beam | frac | 1 | real | kind_phys | in | F | -!! | dzlyr | layer_thickness_for_radiation | layer thickness | km | 2 | real | kind_phys | in | F | -!! | delpin | layer_pressure_thickness_for_radiation | layer pressure thickness | hPa | 2 | real | kind_phys | in | F | -!! | de_lgth | cloud_decorrelation_length | cloud decorrelation length | km | 1 | real | kind_phys | in | F | -!! | cossza | cosine_of_zenith_angle | cosine of the solar zenit angle | none | 1 | real | kind_phys | in | F | -!! | solcon | solar_constant | solar constant | W m-2 | 0 | real | kind_phys | in | F | -!! | nday | daytime_points_dimension | daytime points dimension | count | 0 | integer | | in | F | -!! | idxday | daytime_points | daytime points | index | 1 | integer | | in | F | -!! | ncol | horizontal_loop_extent | horizontal dimension | count | 0 | integer | | in | F | -!! | nlay | adjusted_vertical_layer_dimension_for_radiation | number of vertical layers for radiation | count | 0 | integer | | in | F | -!! | lprint | flag_print | flag to print | flag | 0 | logical | | in | F | -!! | cldfrac | total_cloud_fraction | total cloud fraction | frac | 2 | real | kind_phys | in | F | -!! | lsswr | flag_to_calc_sw | flag to calculate SW irradiances | flag | 0 | logical | | in | F | -!! | hswc | tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step | shortwave total sky heating rate | K s-1 | 2 | real | kind_phys | inout | F | -!! | topflx | sw_fluxes_top_atmosphere | shortwave total sky fluxes at the top of the atm | W m-2 | 1 | topfsw_type | | inout | F | -!! | sfcflx | sw_fluxes_sfc | shortwave total sky fluxes at the Earth surface | W m-2 | 1 | sfcfsw_type | | inout | F | -!! | cldtau | cloud_optical_depth_layers_at_0.55mu_band | approx .55mu band layer cloud optical depth | none | 2 | real | kind_phys | inout | F | -!! | hsw0 | tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_time_step | shortwave clear sky heating rate | K s-1 | 2 | real | kind_phys | inout | T | -!! | hswb | sw_heating_rate_spectral | shortwave total sky heating rate (spectral) | K s-1 | 3 | real | kind_phys | inout | T | -!! | flxprf | sw_fluxes | sw fluxes total sky / csk and up / down at levels | W m-2 | 2 | profsw_type | | inout | T | -!! | fdncmp | components_of_surface_downward_shortwave_fluxes | derived type for special components of surface downward shortwave fluxes | W m-2 | 1 | cmpfsw_type | | inout | T | -!! | cld_lwp | cloud_liquid_water_path | cloud liquid water path | g m-2 | 2 | real | kind_phys | in | T | -!! | cld_ref_liq | mean_effective_radius_for_liquid_cloud | mean effective radius for liquid cloud | micron | 2 | real | kind_phys | in | T | -!! | cld_iwp | cloud_ice_water_path | cloud ice water path | g m-2 | 2 | real | kind_phys | in | T | -!! | cld_ref_ice | mean_effective_radius_for_ice_cloud | mean effective radius for ice cloud | micron | 2 | real | kind_phys | in | T | -!! | cld_rwp | cloud_rain_water_path | cloud rain water path | g m-2 | 2 | real | kind_phys | in | T | -!! | cld_ref_rain | mean_effective_radius_for_rain_drop | mean effective radius for rain drop | micron | 2 | real | kind_phys | in | T | -!! | cld_swp | cloud_snow_water_path | cloud snow water path | g m-2 | 2 | real | kind_phys | in | T | -!! | cld_ref_snow | mean_effective_radius_for_snow_flake | mean effective radius for snow flake | micron | 2 | real | kind_phys | in | T | -!! | cld_od | cloud_optical_depth | cloud optical depth | none | 2 | real | kind_phys | in | T | -!! | cld_ssa | cloud_single_scattering_albedo | cloud single scattering albedo | frac | 2 | real | kind_phys | in | T | -!! | cld_asy | cloud_asymmetry_parameter | cloud asymmetry parameter | none | 2 | real | kind_phys | in | T | -!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | -!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | -!! | kdist_sw | K_distribution_file_for_RRTMGP_SW_scheme | DDT containing spectral information for RRTMGP SW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | -!! | kdist_cldy_sw | K_distribution_file_for_cloudy_RRTMGP_SW_scheme | DDT containing spectral information for cloudy RRTMGP SW radiation scheme | DDT | 0 | ty_cloud_optics | | in | F | +!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | +!! |-------------------------|------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------|-------|------|-----------------------|-----------|--------|----------| +!! | ncol | horizontal_loop_extent | horizontal dimension | count | 0 | integer | | in | F | +!! | nlay | adjusted_vertical_layer_dimension_for_radiation | number of vertical layers for radiation | count | 0 | integer | | in | F | +!! | p_lay | air_pressure_at_layer_for_radiation_in_hPa | air pressure layer | hPa | 2 | real | kind_phys | in | F | +!! | p_lev | air_pressure_at_interface_for_radiation_in_hPa | air pressure level | hPa | 2 | real | kind_phys | in | F | +!! | t_lay | air_temperature_at_layer_for_radiation | air temperature layer | K | 2 | real | kind_phys | in | F | +!! | kdist_sw | K_distribution_file_for_RRTMGP_SW_scheme | DDT containing spectral information for RRTMGP SW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | +!! | optical_propsSW_clds | shortwave_optical_properties_for_cloudy_atmosphere | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_2str | | in | F | +!! | optical_propsSW_aerosol | shortwave_optical_properties_for_aerosols | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_2str | | in | F | +!! | gas_concentrations | Gas_concentrations_for_RRTMGP_suite_sw | DDT containing gas concentrations for RRTMGP radiation scheme | DDT | 0 | ty_gas_concs | | in | F | +!! | lsswr | flag_to_calc_sw | flag to calculate SW irradiances | flag | 0 | logical | | in | F | +!! | sfcalb_nir_dir | surface_shortwave_albedo_near_infrared_direct_in_each_band | surface sw near-infrared direct albedo in each SW band | frac | 2 | real | kind_phys | out | F | +!! | sfcalb_nir_dif | surface_shortwave_albedo_near_infrared_diffuse_in_each_band | surface sw near-infrared diffuse albedo in each SW band | frac | 2 | real | kind_phys | out | F | +!! | cossza | cosine_of_zenith_angle | cosine of the solar zenit angle | none | 1 | real | kind_phys | in | F | +!! | nday | daytime_points_dimension | daytime points dimension | count | 0 | integer | | in | F | +!! | idxday | daytime_points | daytime points | index | 1 | integer | | in | F | +!! | fluxSW_allsky | sw_flux_profiles_byband_allsky | Fortran DDT containing RRTMGP 3D fluxes | DDT | 0 | ty_fluxes_byband | | out | F | +!! | fluxSW_clrsky | sw_flux_profiles_byband_clrsky | Fortran DDT containing RRTMGP 3D fluxes | DDT | 0 | ty_fluxes_byband | | out | F | +!! | hsw0 | tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_time_step | shortwave clear sky heating rate | K s-1 | 2 | real | kind_phys | in | T | +!! | hswb | sw_heating_rate_spectral | shortwave total sky heating rate (spectral) | K s-1 | 3 | real | kind_phys | in | T | +!! | scmpsw | components_of_surface_downward_shortwave_fluxes | derived type for special components of surface downward shortwave fluxes | W m-2 | 1 | cmpfsw_type | | inout | F | +!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | +!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | !! - subroutine rrtmgp_sw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr_n2o, & ! IN - vmr_ch4, vmr_o2, vmr_co, vmr_cfc11, vmr_cfc12, vmr_cfc22, vmr_ccl4, icseed, tau_aer, & ! IN - ssa_aer, asy_aer, sfcalb_nir_dir, sfcalb_nir_dif, sfcalb_uvis_dir, sfcalb_uvis_dif, & ! IN - dzlyr, delpin, de_lgth, cossza, solcon, nday, idxday, ncol, nlay, lprint, cldfrac, & ! IN - lsswr, kdist_sw, kdist_cldy_sw, & ! IN - hswc, topflx, sfcflx, cldtau, & ! OUT - hsw0, hswB, flxprf, fdncmp, cld_lwp, cld_ref_liq, cld_iwp, cld_ref_ice, cld_rwp, & ! OUT(optional) - cld_ref_rain, cld_swp, cld_ref_snow, cld_od, cld_ssa, cld_asy, & ! OUT(optional) - errmsg, errflg) + subroutine rrtmgp_sw_run(ncol, nlay, kdist_sw, p_lay, t_lay, p_lev, gas_concentrations, & + optical_propsSW_clds, optical_propsSW_aerosol,& + lsswr, sfcalb_nir_dir, sfcalb_nir_dif, cossza, nday, idxday, fluxSW_allsky, fluxSW_clrsky, hsw0, hswb, scmpsw, errmsg, errflg) ! Inputs integer, intent(in) :: & - ncol, & ! Number of horizontal grid-points - nlay, & ! Number of vertical layers - nday ! Number of daytime points - integer, intent(in), dimension(ncol) :: & - icseed ! auxiliary special cloud related array when module - ! variable isubcsw=2, it provides permutation seed - ! for each column profile that are used for generating - ! random numbers. when isubcsw /=2, it will not be used. + ncol, & ! Number of horizontal gridpoints + nlay, & ! Number of vertical layers + nday ! Number of daytime points integer, intent(in), dimension(nday) :: & - idxday ! Index array for daytime points - logical, intent(in) :: & - lprint, & ! Control flag for diagnostics - lsswr ! Flag to calculate RRTMGP SW? + idxday ! Index array for daytime points + real(kind_phys), dimension(ncol,nlay), intent(in) :: & + p_lay, & ! Pressure @ model layer-centers (hPa) + t_lay ! Temperature (K) + real(kind_phys), dimension(ncol,nlay+1), intent(in) :: & + p_lev ! Pressure @ model layer-interfaces (hPa) type(ty_gas_optics_rrtmgp),intent(in) :: & - kdist_sw ! DDT containing LW spectral information - type(ty_cloud_optics),intent(in) :: & - kdist_cldy_sw - !type(ty_gas_concs),intent(inout) :: & - ! gas_concentrations - real(kind_phys), intent(in) :: & - solcon ! Solar constant (W/m2) - real(kind_phys), dimension(ncol), intent(in) :: & + kdist_sw ! DDT containing SW spectral information + real(kind_phys), dimension(kdist_sw%get_nband(),ncol), intent(in) :: & sfcalb_nir_dir, & ! Surface albedo direct (near-IR) (1) - sfcalb_nir_dif, & ! Surface albedo diffuse (near-IR) (1) - sfcalb_uvis_dir, & ! Surface albedo direct (UV and Visible) (1) - sfcalb_uvis_dif, & ! Surface albedo diffuse (UV and Visible) (1) - de_lgth, & ! Cloud decorrelation length (km) + sfcalb_nir_dif ! Surface albedo diffuse (near-IR) (1) + real(kind_phys), dimension(ncol), intent(in) :: & cossza ! Cosine of solar zenith angle (1) - real(kind_phys), dimension(ncol,nlay), intent(in) :: & - dzlyr, & ! layer thinkness (km) - delpin, & ! layer thickness (mb) - cldfrac, & ! Cloud-fraction (1) - p_lay, & ! Pressure @ model layer-centers (mb) - t_lay, & ! Temperature (K) - q_lay, & ! Specific humidity (kg/kg) - o3_lay, & ! O3 mass mixing-ratio (kg/kg) - vmr_co2, & ! Co2 volume-mixing ratio (kg/kg) - vmr_n2o, & ! N2o volume-mixing ratio (kg/kg) - vmr_ch4, & ! Ch4 volume-mixing ratio (kg/kg) - vmr_o2, & ! O2 volume-mixing ratio (kg/kg) - vmr_co, & ! Co volume-mixing ratio (kg/kg) - vmr_cfc11, & ! CFC11 volume-mixing ratio (kg/kg) - vmr_cfc12, & ! CFC12 volume-mixing ratio (kg/kg) - vmr_cfc22, & ! CFC22 volume-mixing ratio (kg/kg) - vmr_ccl4 ! CCl4 volume-mixing ratio (kg/kg) - real(kind_phys), dimension(ncol,nlay+1), intent(in) :: & - p_lev, & ! Pressure @ model layer-interfaces (mb) - t_lev ! Temperature (K) - real(kind_phys), dimension(ncol,nlay,nbandsSW), intent(in) :: & - tau_aer, & ! Aerosol optical depth (1) - ssa_aer, & ! Aerosol single-scattering albedo (1) - asy_aer ! Aerosol asymmetry parameter (1) - ! Inputs (optional) - real(kind_phys), dimension(ncol,nlay), intent(in), optional:: & - cld_lwp, & ! Cloud liquid water path (g/m2) - cld_ref_liq, & ! Effective radius (liquid) (micron) - cld_iwp, & ! Cloud ice water path (g/m2) - cld_ref_ice, & ! Effective radius (ice) (micron) - cld_rwp, & ! Cloud rain water path (g/m2) - cld_ref_rain, & ! Effective radius (rain-drop) (micron) - cld_swp, & ! Cloud snow-water path (g/m2) - cld_ref_snow, & ! Effective radius (snow-flake) (micron) - cld_od, & ! Cloud optical-depth (1) - cld_ssa, & ! Cloud single-scattering albedo (1) - cld_asy ! Cloud asymmetry parameter (1) + type(ty_optical_props_2str),intent(in) :: & + optical_propsSW_clds, & ! RRTMGP DDT: longwave cloud radiative properties + optical_propsSW_aerosol ! RRTMGP DDT: longwave aerosol radiative properties - ! Outputs (mandatory) - character(len=*), intent(out) :: & - errmsg ! Error message - integer, intent(out) :: & - errflg ! Error code - real(kind_phys),dimension(ncol,nlay), intent(inout) :: & - hswc, & ! All-sky heating-rate (K/sec) - cldtau ! ~0.55mu band layer tau (1) - type(topfsw_type), dimension(ncol), intent(inout) :: & - topflx ! radiation fluxes at top, components: - ! upfxc - total sky upward flux at top (w/m2) - ! upfx0 - clear sky upward flux at top (w/m2) - type(sfcfsw_type), dimension(ncol), intent(inout) :: & - sfcflx ! radiation fluxes at sfc, components: - ! upfxc - total sky upward flux at sfc (w/m2) - ! upfx0 - clear sky upward flux at sfc (w/m2) - ! dnfxc - total sky downward flux at sfc (w/m2) - ! dnfx0 - clear sky downward flux at sfc (w/m2) - ! Outputs (optional) - real(kind_phys), dimension(ncol,nlay), intent(inout), optional :: & - hsw0 ! Clear-sky heating-rate (K/sec) - real(kind_phys), dimension(ncol,nlay,nBandsSW), intent(inout), optional :: & - hswb ! All-sky heating rate, in each band (K/sec) - type(profsw_type), dimension(ncol,nlay+1), intent(inout), optional :: & - flxprf ! 2D radiative fluxes, components: - ! upfxc - total sky upward flux (W/m2) - ! dnfxc - total sky dnward flux (W/m2) - ! upfx0 - clear sky upward flux (W/m2) - ! dnfx0 - clear sky dnward flux (W/m2) - type(cmpfsw_type), dimension(ncol), intent(inout), optional :: & - fdncmp ! 2D surface fluxes, components: - ! uvbfc - total sky downward uv-b flux at (W/m2) - ! uvbf0 - clear sky downward uv-b flux at (W/m2) - ! nirbm - downward nir direct beam flux (W/m2) - ! nirdf - downward nir diffused flux (W/m2) - ! visbm - downward uv+vis direct beam flux(W/m2) - ! visdf - downward uv+vis diffused flux (W/m2) + type(ty_gas_concs),intent(in) :: & + gas_concentrations ! RRTMGP DDT: trace gas concentrations (vmr) + logical, intent(in) :: & + lsswr ! Flag to calculate SW irradiances - ! RTE+RRTMGP classes - type(ty_gas_concs) :: & - gas_concentrations - type(ty_optical_props_2str) :: & - optical_props_clr, & ! Optical properties for gaseous atmosphere - optical_props_aer, & ! Optical properties for aerosols - optical_props_mcica, & ! Optical properties for clouds (sampled) - optical_props_cldy ! Optical properties for clouds (by-band) - type(ty_fluxes_byband) :: & - fluxAllSky, & ! All-sky flux (W/m2) - fluxClrSky ! Clear-sky flux (W/m2) + ! Outputs + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + type(ty_fluxes_byband),intent(out) :: & + fluxSW_allsky, & ! All-sky flux (W/m2) + fluxSW_clrsky ! Clear-sky flux (W/m2) + + ! Inputs (optional) (NOTE. We only need the optional arguments to know what fluxes to output, HR's are computed later) + real(kind_phys), dimension(ncol,nlay), optional, intent(in) :: & + hsw0 ! Clear-sky heating rate (K/sec) + real(kind_phys), dimension(ncol,nlay,kdist_sw%get_nband()), intent(in), optional :: & + hswb ! All-sky heating rate, by band (K/sec) + ! Outputs (optional) + type(cmpfsw_type), dimension(ncol), intent(out),optional :: & + scmpsw ! 2D surface fluxes, components: + ! uvbfc - total sky downward uv-b flux at (W/m2) + ! uvbf0 - clear sky downward uv-b flux at (W/m2) + ! nirbm - downward nir direct beam flux (W/m2) + ! nirdf - downward nir diffused flux (W/m2) + ! visbm - downward uv+vis direct beam flux (W/m2) + ! visdf - downward uv+vis diffused flux (W/m2) - ! Types used by Random Number Generator - type(random_stat) :: rng_stat ! Local variables - integer :: iCol, iBand, iGpt, iDay, iLay, iTOA, iSFC - integer,dimension(ncol) :: ipseed - real(kind_phys) :: cfrac, asyw, ssaw, za1, za2 - logical :: top_at_1=.false. - real(kind_phys), dimension(ncol) :: clrfracSFC, cldfracSFC - real(kind_phys), dimension(ncol,nlay) :: vmr_o3, vmr_h2o, coldry, tem0, & - cld_ref_liq2,cld_ref_ice2 - real(kind_phys), dimension(ncol,nlay,nBandsSW) :: thetaTendByBandAllSky - real(kind_phys), dimension(nday,nlay) :: cld_lwp2,thetaTendClrSky, & - thetaTendAllSky real(kind_phys), dimension(nday,nlay+1),target :: & - flux_up_allSky, flux_up_clrSky, flux_dn_allSky, flux_dn_clrSky - real(kind_phys), dimension(nday,nlay+1,nBandsSW),target :: & - fluxBB_up_allSky, fluxBB_dn_allSky - real(kind_phys), dimension(nday,nGptsSW) :: toa_flux - real(kind_phys), dimension(nday,nlay,nBandsSW) :: tau_cld, asy_cld, ssa_cld - real(kind_phys), dimension(nGptsSW,nlay,ncol) :: & - rng3D - real(kind_phys), dimension(nGptsSW*nLay) :: & - rng1D - logical,dimension(ncol,nlay) :: & - liqmask,icemask - logical, dimension(ncol,nlay,nGptsSW) :: & - cldfracMCICA + fluxSW_up_allsky, fluxSW_up_clrsky, fluxSW_dn_allsky, fluxSW_dn_clrsky + real(kind_phys), dimension(nday,nlay+1,kdist_sw%get_nband()),target :: & + fluxSWBB_up_allsky, fluxSWBB_dn_allsky + logical :: l_ClrSky_HR=.false., l_AllSky_HR_byband=.false., l_scmpsw=.false. - ! Initialize + ! Initialize CCPP error handling variables errmsg = '' errflg = 0 if (.not. lsswr) return - if (nday <= 0) return - ! Are any optional outputs requested? + ! Are any optional outputs requested? Need to know now to compute correct fluxes. l_ClrSky_HR = present(hsw0) l_AllSky_HR_byband = present(hswb) - l_fluxes2D = present(flxprf) - l_sfcFluxes1D = present(fdncmp) - - ! Check for optional input arguments, this depends on cloud method - if (iswcliq > 0) then ! use prognostic cloud method - if ( .not.present(cld_lwp) .or. .not.present(cld_ref_liq) .or. & - .not.present(cld_iwp) .or. .not.present(cld_ref_ice) .or. & - .not.present(cld_rwp) .or. .not.present(cld_ref_rain) .or. & - .not.present(cld_swp) .or. .not.present(cld_ref_snow) )then - write(errmsg,'(*(a))') & - 'Logic error: iswcliq>0 requires the following', & - ' optional arguments to be present:', & - ' cld_lwp, cld_ref_liq, cld_iwp, cld_ref_ice,', & - ' cld_rwp, cld_ref_rain, cld_swp, cld_ref_snow' - errflg = 1 - return - end if - else ! use diagnostic cloud method - if ( .not.present(cld_od) .or. .not.present(cld_ssa) .or. & - .not.present(cld_asy)) then - write(errmsg,'(*(a))') & - 'Logic error: iswcliq<=0 requires the following', & - ' optional arguments to be present:', & - ' cld_od, cld_ssa, cld_asy' - errflg = 1 - return - end if - endif - - ! What is vertical ordering? - top_at_1 = (p_lay(1,1) .lt. p_lay(1,nlay)) - if (top_at_1) then - iSFC = nlay+1 - iTOA = 1 - else - iSFC = 1 - iTOA = nlay+1 - endif - - ! Change random number seed value for each radiation invocation (isubcsw =1 or 2). - if(isubcsw == 1) then ! advance prescribed permutation seed - do iCol = 1, ncol - ipseed(iCol) = ipsdsw0 + iCol - enddo - elseif (isubcsw == 2) then ! use input array of permutaion seeds - do iCol = 1, ncol - ipseed(iCol) = icseed(iCol) - enddo + l_scmpsw = present(scmpsw) + if ( l_scmpsw ) then + scmpsw = cmpfsw_type (0., 0., 0., 0., 0., 0.) endif - ! Compute volume mixing-ratios for ozone (mmr) and specific-humidity. - vmr_h2o = merge((q_lay/(1-q_lay))*amdw, 0., q_lay .ne. 1.) - vmr_o3 = merge(o3_lay*amdo3, 0., o3_lay .gt. 0.) - - ! Compute ice/liquid cloud masks, needed by rrtmgp_cloud_optics - liqmask = (cldfrac .gt. 0 .and. cld_lwp .gt. 0) - icemask = (cldfrac .gt. 0 .and. cld_iwp .gt. 0) - - ! RRTMGP cloud_optics expects particle size to be in a certain range. bound here - if (rrtmgp_sw_cld_phys .gt. 0) then - cld_ref_ice2 = cld_ref_ice - where(cld_ref_ice2 .gt. kdist_cldy_sw%get_max_radius_ice()) cld_ref_ice2=kdist_cldy_sw%get_max_radius_ice() - where(cld_ref_ice2 .lt. kdist_cldy_sw%get_min_radius_ice()) cld_ref_ice2=kdist_cldy_sw%get_min_radius_ice() - cld_ref_liq2 = cld_ref_liq - where(cld_ref_liq2 .gt. kdist_cldy_sw%get_max_radius_liq()) cld_ref_liq2=kdist_cldy_sw%get_max_radius_liq() - where(cld_ref_liq2 .lt. kdist_cldy_sw%get_min_radius_liq()) cld_ref_liq2=kdist_cldy_sw%get_min_radius_liq() - endif - - ! Compute dry air column amount - tem0 = (1. - vmr_h2o)*amd + vmr_h2o*amw - coldry = ( 1.0e-20 * 1.0e3 *avogad)*delpin / (100.*grav*tem0*(1. + vmr_h2o)) - - ! Compute fractions of clear sky view at surface. *NOTE* This is only used if cloud radiative - ! properties are provided directly. - clrfracSFC = 1._kind_phys - if (iovrsw == 0) then ! random overlapping - do iCol=1,nCol - do iLay = 1, nlay - clrfracSFC(iCol) = clrfracSFC(iCol) * (1._kind_phys - cldfrac(iCol,iLay)) - enddo - enddo - else if (iovrsw == 1) then ! max/ran overlapping - do iLay = 1, nlay - if (cldfrac(iCol,iLay) > ftiny) then ! cloudy layer - cldfracSFC(iCol) = min ( cldfracSFC(iCol), 1._kind_phys-cldfrac(iCol,iLay) ) - elseif (cldfracSFC(iCol) < 1._kind_phys) then ! clear layer - clrfracSFC(iCol) = clrfracSFC(iCol) * cldfracSFC(iCol) - cldfracSFC(iCol) = 1._kind_phys - endif - enddo - clrfracSFC(iCol) = clrfracSFC(iCol) * cldfracSFC(iCol) - else if (iovrsw >= 2) then - do iLay = 1, nlay - clrfracSFC(iCol) = min ( clrfracSFC(iCol), 1._kind_phys-cldfrac(iCol,iLay) ) ! used only as clear/cloudy indicator - enddo - endif - if (clrfracSFC(iCol) <= ftiny) clrfracSFC(iCol) = 0._kind_phys - if (clrfracSFC(iCol) > (1._kind_phys-epsilon)) clrfracSFC(iCol) = 1._kind_phys - cldfracSFC(iCol) = 1._kind_phys - clrfracSFC(iCol) - - ! Initialize outputs - hswc(:,:) = 0. - cldtau(:,:) = 0. - topflx = topfsw_type ( 0., 0., 0. ) - sfcflx = sfcfsw_type ( 0., 0., 0., 0. ) - if (l_ClrSky_HR) then - hsw0(:,:) = 0. - endif - if(l_AllSky_HR_byband) then - hswb(:,:,:) = 0. - endif - if (l_fluxes2D) then - flxprf = profsw_type ( 0., 0., 0., 0. ) - endif - if (l_sfcFluxes1D) then - fdncmp = cmpfsw_type (0.,0.,0.,0.,0.,0.) - endif - - ! ####################################################################################### - ! CALL RRTMGP (Only for daylit (idxday) points) - ! ####################################################################################### if (nDay .gt. 0) then - - ! Allocate space for gas optical properties - ! Cloud optics [nCol,nLay,nBands] - call check_error_msg(optical_props_cldy%init(kdist_sw%get_band_lims_wavenumber())) - call check_error_msg(optical_props_cldy%alloc_2str(ncol,nlay)) - ! Aerosol optics [Ccol,nLay,nBands] - call check_error_msg(optical_props_aer%init(kdist_sw%get_band_lims_wavenumber())) - call check_error_msg(optical_props_aer%alloc_2str(ncol,nlay)) - ! Cloud optics sampled [nCol,nLay,nGpts] - call check_error_msg(optical_props_mcica%alloc_2str(ncol, nlay, kdist_sw)) - - ! Initialize RRTMGP DDT containing 2D(3D) fluxes - fluxAllSky%flux_up => flux_up_allSky - fluxAllsky%flux_dn => flux_dn_allSky - fluxClrSky%flux_up => flux_up_clrSky - fluxClrsky%flux_dn => flux_dn_clrSky + fluxSW_allsky%flux_up => fluxSW_up_allsky + fluxSW_allsky%flux_dn => fluxSW_dn_allsky + fluxSW_clrsky%flux_up => fluxSW_up_clrsky + fluxSW_clrsky%flux_dn => fluxSW_dn_clrsky ! Only calculate fluxes by-band, only when heating-rate profiles by band are requested. if (l_AllSky_HR_byband) then - fluxAllSky%bnd_flux_up => fluxBB_up_allSky - fluxAllsky%bnd_flux_dn => fluxBB_dn_allSky - endif - - ! ####################################################################################### - ! Set gas concentrations - ! ####################################################################################### - call gas_concentrations%reset() - call check_error_msg(gas_concentrations%set_vmr('o2', vmr_o2(idxday,1:nlay))) - call check_error_msg(gas_concentrations%set_vmr('co2', vmr_co2(idxday,1:nlay))) - call check_error_msg(gas_concentrations%set_vmr('ch4', vmr_ch4(idxday,1:nlay))) - call check_error_msg(gas_concentrations%set_vmr('n2o', vmr_n2o(idxday,1:nlay))) - call check_error_msg(gas_concentrations%set_vmr('h2o', vmr_h2o(idxday,1:nlay))) - call check_error_msg(gas_concentrations%set_vmr('o3', vmr_o3(idxday,1:nlay))) - - ! ####################################################################################### - ! Copy aerosol to RRTMG DDT - ! ####################################################################################### - optical_props_aer%tau = tau_aer(idxday,:,:) - optical_props_aer%ssa = ssa_aer(idxday,:,:) - optical_props_aer%g = asy_aer(idxday,:,:) - - ! #################################################################################### - ! Compute cloud-optics for RTE. - ! #################################################################################### - - ! Compute in-cloud radiative properties. - if (any(cldfrac(idxday,:) .gt. 0)) then - ! i) RRTMG cloud optics. - ! Cloud-optical properties by type provided. Compute optical-depth, single- - ! scattering albedo, and asymmetry parameter - if (rrtmgp_sw_cld_phys .eq. 0) then - if (.not. present(cld_od)) then - call rrtmgp_sw_cloud_optics(nday, nlay, nBandsSW, & - cld_lwp(idxday,1:nLay), cld_ref_liq(idxday,1:nLay), & - cld_iwp(idxday,1:nLay), cld_ref_ice(idxday,1:nLay), & - cld_rwp(idxday,1:nLay), cld_ref_rain(idxday,1:nLay), & - cld_swp(idxday,1:nLay), cld_ref_snow(idxday,1:nLay), & - cldfrac(idxday,1:nLay), & - tau_cld, ssa_cld, asy_cld) - optical_props_cldy%tau = tau_cld - optical_props_cldy%ssa = ssa_cld - optical_props_cldy%g = asy_cld - else - ! Cloud-optical depth, single scattering albedo, and asymmetry parameter provided. - do iDay=1,nDay - do iLay=1,nLay - if (cldfrac(iCol,iLay) .gt. 1e-20_kind_phys) then - optical_props_cldy%tau(iDay,iLay,:) = cld_od(idxday(iDay),iLay) - optical_props_cldy%ssa(iDay,iLay,:) = cld_ssa(idxday(iDay),iLay) - optical_props_cldy%g(iDay,iLay,:) = cld_asy(idxday(iDay),iLay) - else - optical_props_cldy%tau(iDay,iLay,:) = 0. - optical_props_cldy%ssa(iDay,iLay,:) = 1. - optical_props_cldy%g(iDay,iLay,:) = 0. - endif - end do - end do - endif - endif - - ! ii) Use RRTMGP cloud-optics. - if (rrtmgp_sw_cld_phys .gt. 0) then - call check_error_msg(kdist_cldy_sw%cloud_optics(nday, nlay, nBandsSW, nrghice, & - liqmask(idxday,1:nLay), icemask(idxday,1:nLay), cld_lwp(idxday,1:nLay), & - cld_iwp(idxday,1:nLay), cld_ref_liq2(idxday,1:nLay), & - cld_ref_ice2(idxday,1:nLay), optical_props_cldy)) - end if - endif - - ! ####################################################################################### - ! Call McICA to sample clouds. - ! ####################################################################################### - if (isubcsw .gt. 0) then - ! Call RNG. Mersennse Twister accepts 1D array, so loop over columns and collapse along G-points - ! and layers. ([nGpts,nLayer,nColumn]-> [nGpts*nLayer]*nColumn) - do iCol=1,nCol - call random_setseed(ipseed(icol),rng_stat) - call random_number(rng1D,rng_stat) - rng3D(:,:,iCol) = reshape(source = rng1D,shape=[nGptsSW,nLay]) - enddo - - ! Call McICA - select case ( iovrsw ) - ! Maximumn-random - case(1) - call check_error_msg(sampled_mask_max_ran(rng3D,cldfrac,cldfracMCICA)) - end select - - ! Map band optical depth to each g-point using McICA - call check_error_msg(draw_samples(cldfracMCICA,optical_props_cldy,optical_props_mcica)) - endif - - ! ####################################################################################### - ! Compute fluxes - ! ####################################################################################### - print*,'In rrmtgp_sw(): ' - print*,' shape(optical_props_aerosol%tau): ',shape(optical_props_aer%tau) - print*,' shape(optical_props_clds%tau): ',shape(optical_props_mcica%tau) - call check_error_msg(rte_sw( & - kdist_sw, & - gas_concentrations, & - p_lay(idxday,1:nlay), & - t_lay(idxday,1:nlay), & - p_lev(idxday,1:nlay+1), & - cossza(idxday), & - spread(sfcalb_nir_dir(idxday),1, ncopies = nBandsSW), & - spread(sfcalb_nir_dif(idxday),1, ncopies = nBandsSW), & - optical_props_mcica, & - fluxAllSky, & - fluxClrSky, & - aer_props = optical_props_aer)) - - ! ####################################################################################### - ! Compute heating rates - ! ####################################################################################### - if (l_ClrSky_HR) then - call check_error_msg(compute_heating_rate( & - fluxClrSky%flux_up, & - fluxClrSky%flux_dn, & - p_lev(idxday,1:nlay+1), & - thetaTendClrSky)) - endif - if (l_AllSky_HR_byband) then - do iBand=1,nBandsSW - call check_error_msg(compute_heating_rate( & - fluxAllSky%bnd_flux_up(:,:,iBand), & - fluxAllSky%bnd_flux_dn(:,:,iBand), & - p_lev(idxday,1:nlay+1), & - thetaTendByBandAllSky(:,:,iBand))) - enddo - else - call check_error_msg(compute_heating_rate( & - fluxAllSky%flux_up, & - fluxAllSky%flux_dn, & - p_lev(idxday,1:nlay+1), & - thetaTendAllSky)) + fluxSW_allsky%bnd_flux_up => fluxSWBB_up_allsky + fluxSW_allsky%bnd_flux_dn => fluxSWBB_dn_allsky endif - - end if ! Daylit days - - ! ####################################################################################### - ! Copy fluxes from RRTGMP types into model radiation types. - ! ####################################################################################### - ! Mandatory outputs - topflx(idxday)%upfxc = fluxAllSky%flux_up(:,iTOA) - topflx(idxday)%upfx0 = fluxClrSky%flux_up(:,iTOA) - sfcflx(idxday)%upfxc = fluxAllSky%flux_up(:,iSFC) - sfcflx(idxday)%upfx0 = fluxClrSky%flux_up(:,iSFC) - sfcflx(idxday)%dnfxc = fluxAllSky%flux_dn(:,iSFC) - sfcflx(idxday)%dnfx0 = fluxClrSky%flux_dn(:,iSFC) - cldtau(idxday,:) = optical_props_cldy%tau(:,:,10) - hswc(idxday,:) = thetaTendAllSky - - ! Optional output - if(l_fluxes2D) then - flxprf(idxday,:)%upfxc = fluxAllSky%flux_up - flxprf(idxday,:)%dnfxc = fluxAllSky%flux_dn - flxprf(idxday,:)%upfx0 = fluxClrSky%flux_up - flxprf(idxday,:)%dnfx0 = fluxClrSky%flux_dn - endif - if (l_AllSky_HR_byband) then - hswb(idxday,:,:) = thetaTendByBandAllSky - endif - if (l_ClrSky_HR) then - hsw0(idxday,:) = thetaTendClrSky + + ! Call RRTMGP SW scheme + call check_error_msg('rrtmgp_sw_run',rte_sw( & + kdist_sw, & ! IN - spectral information + gas_concentrations, & ! IN - gas concentrations (vmr) + p_lay(idxday,1:nlay), & ! IN - pressure at layer interfaces (Pa) + t_lay(idxday,1:nlay), & ! IN - temperature at layer interfaes (K) + p_lev(idxday,1:nlay+1), & ! IN - pressure at layer centers (Pa) + cossza(idxday), & ! IN - Cosine of solar zenith angle + sfcalb_nir_dir(:,idxday), & ! IN - Shortwave surface albedo (direct) + sfcalb_nir_dif(:,idxday), & ! IN - Shortwave surface albedo (diffuse) + optical_propsSW_clds, & ! IN - DDT containing cloud optical information + fluxSW_allsky, & ! OUT - Fluxes, all-sky, 3D (nCol,nLay,nBand) + fluxSW_clrsky, & ! OUT - Fluxes, clear-sky, 3D (nCol,nLay,nBand) + aer_props = optical_propsSW_aerosol)) ! IN(optional) - DDT containing aerosol optical information endif + end subroutine rrtmgp_sw_run - ! ######################################################################################### - ! ######################################################################################### + subroutine rrtmgp_sw_finalize() end subroutine rrtmgp_sw_finalize - - ! ######################################################################################### - ! Ancillary functions - ! ######################################################################################### - subroutine check_error_msg(error_msg) - character(len=*), intent(in) :: error_msg + subroutine check_error_msg(routine_name, error_msg) + character(len=*), intent(in) :: & + error_msg, routine_name if(error_msg /= "") then - print*,"ERROR(rrtmgp_sw.F90): " + print*,"ERROR("//trim(routine_name)//"): " print*,trim(error_msg) return end if - end subroutine check_error_msg - ! ######################################################################################### - ! ######################################################################################### + end subroutine check_error_msg + + end module rrtmgp_sw From 1386e5816e5e1602ce3c1490bb49ac6d86412ea7 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Wed, 29 May 2019 17:05:59 -0600 Subject: [PATCH 027/167] More organizational changes to RRTMGP. --- physics/GFS_rrtmgp_post.F90 | 230 ++++++++++++---------- physics/GFS_rrtmgp_pre.F90 | 381 +++++++++--------------------------- physics/rrtmgp_lw.F90 | 63 +++--- physics/rrtmgp_lw_main.F90 | 97 --------- physics/rrtmgp_sw.F90 | 128 +++++++----- physics/rrtmgp_sw_pre.F90 | 217 ++++++++++---------- physics/rte-rrtmgp | 2 +- 7 files changed, 446 insertions(+), 672 deletions(-) delete mode 100644 physics/rrtmgp_lw_main.F90 diff --git a/physics/GFS_rrtmgp_post.F90 b/physics/GFS_rrtmgp_post.F90 index 150970c8b..b85852c60 100644 --- a/physics/GFS_rrtmgp_post.F90 +++ b/physics/GFS_rrtmgp_post.F90 @@ -15,7 +15,6 @@ module GFS_rrtmgp_post use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp use mo_fluxes_byband, only: ty_fluxes_byband use mo_heating_rates, only: compute_heating_rate - use rrtmgp_sw, only: check_error_msg implicit none contains @@ -55,10 +54,14 @@ end subroutine GFS_rrtmgp_post_init !! | p_lev | air_pressure_at_interface_for_radiation_in_hPa | air pressure level | hPa | 2 | real | kind_phys | in | F | !! | nday | daytime_points_dimension | daytime points dimension | count | 0 | integer | | in | F | !! | idxday | daytime_points | daytime points | index | 1 | integer | | in | F | -!! | fluxLW_allsky | lw_flux_profiles_byband_allsky | Fortran DDT containing RRTMGP 3D fluxes | DDT | 0 | ty_fluxes_byband | | in | F | -!! | fluxLW_clrsky | lw_flux_profiles_byband_clrsky | Fortran DDT containing RRTMGP 3D fluxes | DDT | 0 | ty_fluxes_byband | | in | F | -!! | fluxSW_allsky | sw_flux_profiles_byband_allsky | Fortran DDT containing RRTMGP 3D fluxes | DDT | 0 | ty_fluxes_byband | | in | F | -!! | fluxSW_clrsky | sw_flux_profiles_byband_clrsky | Fortran DDT containing RRTMGP 3D fluxes | DDT | 0 | ty_fluxes_byband | | in | F | +!! | fluxswUP_allsky | sw_flux_profile_upward_allsky | RRTMGP upward shortwave all-sky flux profile | W m-2 | 2 | real | kind_phys | in | F | +!! | fluxswDOWN_allsky | sw_flux_profile_downward_allsky | RRTMGP downward shortwave all-sky flux profile | W m-2 | 2 | real | kind_phys | in | F | +!! | fluxswUP_clrsky | sw_flux_profile_upward_clrsky | RRTMGP upward shortwave clr-sky flux profile | W m-2 | 2 | real | kind_phys | in | F | +!! | fluxswDOWN_clrsky | sw_flux_profile_downward_clrsky | RRTMGP downward shortwave clr-sky flux profile | W m-2 | 2 | real | kind_phys | in | F | +!! | fluxlwUP_allsky | lw_flux_profile_upward_allsky | RRTMGP upward longwave all-sky flux profile | W m-2 | 2 | real | kind_phys | in | F | +!! | fluxlwDOWN_allsky | lw_flux_profile_downward_allsky | RRTMGP downward longwave all-sky flux profile | W m-2 | 2 | real | kind_phys | in | F | +!! | fluxlwUP_clrsky | lw_flux_profile_upward_clrsky | RRTMGP upward longwave clr-sky flux profile | W m-2 | 2 | real | kind_phys | in | F | +!! | fluxlwDOWN_clrsky | lw_flux_profile_downward_clrsky | RRTMGP downward longwave clr-sky flux profile | W m-2 | 2 | real | kind_phys | in | F | !! | kdist_lw | K_distribution_file_for_RRTMGP_LW_scheme | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | !! | kdist_sw | K_distribution_file_for_RRTMGP_SW_scheme | DDT containing spectral information for RRTMGP SW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | !! | sfc_alb_nir_dir | surface_shortwave_albedo_near_infrared_direct_in_each_band | surface sw near-infrared direct albedo in each SW band | frac | 2 | real | kind_phys | in | F | @@ -83,7 +86,8 @@ subroutine GFS_rrtmgp_post_run (Model, Grid, Diag, Radtend, Statein, & cldsa, mtopa, mbota, cloud_fraction, cldtaulw, cldtausw, p_lev, kdist_lw, kdist_sw, & sfc_alb_nir_dir, sfc_alb_nir_dif, sfc_alb_uvvis_dir, & sfc_alb_uvvis_dif, & - tsfa, nday, idxday, fluxSW_allsky, fluxSW_clrsky,fluxLW_allsky, fluxLW_clrsky,& + tsfa, nday, idxday, fluxlwUP_allsky, fluxlwDOWN_allsky, fluxlwUP_clrsky, fluxlwDOWN_clrsky, & + fluxswUP_allsky, fluxswDOWN_allsky, fluxswUP_clrsky, fluxswDOWN_clrsky, & hlwc, hswc, topflx_sw, sfcflx_sw, flxprf_sw, topflx_lw, sfcflx_lw, flxprf_lw, hlw0, hsw0, errmsg, errflg) ! Inputs @@ -130,16 +134,20 @@ subroutine GFS_rrtmgp_post_run (Model, Grid, Diag, Radtend, Statein, & kdist_sw ! DDT containing SW spectral information real(kind_phys), dimension(size(Grid%xlon,1), Model%levr+LTP+1), intent(in) :: & p_lev ! Pressure @ model layer-interfaces (hPa) - type(ty_fluxes_byband),intent(in) :: & - fluxLW_allsky, & ! Longwave all-sky flux (W/m2) - fluxLW_clrsky, & ! Longwave clear-sky flux (W/m2) - fluxSW_allsky, & ! Shortwave all-sky flux (W/m2) - fluxSW_clrsky ! Shortwave clear-sky flux (W/m2) real(kind_phys),dimension(kdist_sw%get_nband(),size(Grid%xlon,1)),intent(in) :: & sfc_alb_nir_dir, & ! Shortwave surface albedo (nIR-direct) sfc_alb_nir_dif, & ! Shortwave surface albedo (nIR-diffuse) sfc_alb_uvvis_dir, & ! Shortwave surface albedo (uvvis-direct) sfc_alb_uvvis_dif ! Shortwave surface albedo (uvvis-diffuse) + real(kind_phys), dimension(size(Grid%xlon,1), Model%levr+LTP+1), intent(in) :: & + fluxswUP_allsky, & ! SW All-sky flux (W/m2) + fluxswDOWN_allsky, & ! SW All-sky flux (W/m2) + fluxswUP_clrsky, & ! SW Clear-sky flux (W/m2) + fluxswDOWN_clrsky, & ! SW All-sky flux (W/m2) + fluxlwUP_allsky, & ! LW All-sky flux (W/m2) + fluxlwDOWN_allsky, & ! LW All-sky flux (W/m2) + fluxlwUP_clrsky, & ! LW Clear-sky flux (W/m2) + fluxlwDOWN_clrsky ! LW All-sky flux (W/m2) ! Outputs (mandatory) character(len=*), intent(out) :: & @@ -203,9 +211,9 @@ subroutine GFS_rrtmgp_post_run (Model, Grid, Diag, Radtend, Statein, & ! Initialize CCPP error handling variables errmsg = '' errflg = 0 - + if (.not. (Model%lsswr .or. Model%lslwr)) return - + ! Are any optional outputs requested? l_clrskylw_hr = present(hlw0) l_fluxeslw2d = present(flxprf_lw) @@ -223,80 +231,7 @@ subroutine GFS_rrtmgp_post_run (Model, Grid, Diag, Radtend, Statein, & iSFC = 1 iTOA = Model%levr+LTP+1 endif - - ! ####################################################################################### - ! Compute LW heating-rates. (Note. This piece was originally in rrtmg_lw.F90:_run()) - ! ####################################################################################### - if (Model%lslwr) then - ! Clear-sky heating-rate (optional) - if (l_clrskylw_hr) then - call check_error_msg('GFS_rrtmgp_post',compute_heating_rate( & - fluxLW_clrsky%flux_up, & - fluxLW_clrsky%flux_dn, & - p_lev, & - hlw0)) - endif - ! All-sky heating-rate (mandatory) - call check_error_msg('GFS_rrtmgp_post',compute_heating_rate( & - fluxLW_allsky%flux_up, & - fluxLW_allsky%flux_dn, & - p_lev, & - hlwc)) - - ! Copy fluxes from RRTGMP types into model radiation types. - ! Mandatory outputs - topflx_lw%upfxc = fluxLW_allsky%flux_up(:,iTOA) - topflx_lw%upfx0 = fluxLW_clrsky%flux_up(:,iTOA) - sfcflx_lw%upfxc = fluxLW_allsky%flux_up(:,iSFC) - sfcflx_lw%upfx0 = fluxLW_clrsky%flux_up(:,iSFC) - sfcflx_lw%dnfxc = fluxLW_allsky%flux_dn(:,iSFC) - sfcflx_lw%dnfx0 = fluxLW_clrsky%flux_dn(:,iSFC) - - ! Optional outputs - if(l_fluxeslw2d) then - flxprf_lw%upfxc = fluxLW_allsky%flux_up - flxprf_lw%dnfxc = fluxLW_allsky%flux_dn - flxprf_lw%upfx0 = fluxLW_clrsky%flux_up - flxprf_lw%dnfx0 = fluxLW_clrsky%flux_dn - endif - endif - - ! ####################################################################################### - ! Save LW outputs (Note. This piece was originally in rrtmg_lw_post.F90:_run()) - ! ####################################################################################### - if (Model%lslwr) then - ! Save surface air temp for diurnal adjustment at model t-steps - Radtend%tsflw (:) = tsfa(:) - - do k = 1, LM - k1 = k + kd - Radtend%htrlw(1:im,k) = hlwc(1:im,k1) - enddo - ! Repopulate the points above levr - if (lm < Model%levs) then - do k = lm,Model%levs - Radtend%htrlw (1:im,k) = Radtend%htrlw (1:im,LM) - enddo - endif - - if (Model%lwhtr) then - do k = 1, lm - k1 = k + kd - Radtend%lwhc(1:im,k) = hlw0(1:im,k1) - enddo - ! Repopulate the points above levr - if (lm < Model%levs) then - do k = lm,Model%levs - Radtend%lwhc(1:im,k) = Radtend%lwhc(1:im,LM) - enddo - endif - endif - - ! Radiation fluxes for other physics processes - Coupling%sfcdlw(:) = Radtend%sfcflw(:)%dnfxc - - endif - + ! ####################################################################################### ! Compute SW heating-rates ! ####################################################################################### @@ -318,36 +253,35 @@ subroutine GFS_rrtmgp_post_run (Model, Grid, Diag, Radtend, Statein, & ! Clear-sky heating-rate (optional) if (l_clrskysw_HR) then call check_error_msg('GFS_rrtmgp_post',compute_heating_rate( & - fluxSW_clrsky%flux_up, & - fluxSW_clrsky%flux_dn, & + fluxswUP_clrsky, & + fluxswDOWN_clrsky, & p_lev(idxday,1:Model%levr+LTP+1), & thetaTendClrSky)) hsw0(idxday,:)=thetaTendClrSky endif ! All-sky heating-rate (mandatory) call check_error_msg('GFS_rrtmgp_post',compute_heating_rate( & - fluxSW_allsky%flux_up, & - fluxSW_allsky%flux_dn, & + fluxswUP_allsky, & + fluxswDOWN_allsky, & p_lev(idxday,1:Model%levr+LTP+1), & thetaTendAllSky)) hswc(idxday,:) = thetaTendAllSky - print*,'IN POST: ',fluxSW_allsky%flux_up - print*,'IN POSTT: ',fluxSW_allsky%flux_dn + ! Copy fluxes from RRTGMP types into model radiation types. ! Mandatory outputs - topflx_sw(idxday)%upfxc = fluxSW_allsky%flux_up(:,iTOA) - topflx_sw(idxday)%upfx0 = fluxSW_clrsky%flux_up(:,iTOA) - sfcflx_sw(idxday)%upfxc = fluxSW_allsky%flux_up(:,iSFC) - sfcflx_sw(idxday)%upfx0 = fluxSW_clrsky%flux_up(:,iSFC) - sfcflx_sw(idxday)%dnfxc = fluxSW_allsky%flux_dn(:,iSFC) - sfcflx_sw(idxday)%dnfx0 = fluxSW_clrsky%flux_dn(:,iSFC) + topflx_sw%upfxc = fluxswUP_allsky(:,iTOA) + topflx_sw%upfx0 = fluxswUP_clrsky(:,iTOA) + sfcflx_sw%upfxc = fluxswUP_allsky(:,iSFC) + sfcflx_sw%upfx0 = fluxswUP_clrsky(:,iSFC) + sfcflx_sw%dnfxc = fluxswDOWN_allsky(:,iSFC) + sfcflx_sw%dnfx0 = fluxswDOWN_clrsky(:,iSFC) ! Optional output if(l_fluxessw2D) then - flxprf_sw(idxday,:)%upfxc = fluxSW_allsky%flux_up - flxprf_sw(idxday,:)%dnfxc = fluxSW_allsky%flux_dn - flxprf_sw(idxday,:)%upfx0 = fluxSW_clrsky%flux_up - flxprf_sw(idxday,:)%dnfx0 = fluxSW_clrsky%flux_dn + flxprf_sw%upfxc = fluxswUP_allsky + flxprf_sw%dnfxc = fluxswDOWN_allsky + flxprf_sw%upfx0 = fluxswUP_clrsky + flxprf_sw%dnfx0 = fluxswDOWN_clrsky endif endif @@ -394,7 +328,7 @@ subroutine GFS_rrtmgp_post_run (Model, Grid, Diag, Radtend, Statein, & Coupling%visdfui(i) = scmpsw(i)%visdf * sfc_alb_uvvis_dif(1,i) enddo else ! if_nday_block - Radtend%htrsw(:,:) = 0.0 + Radtend%htrsw(:,:) = 0.0 Radtend%sfcfsw = sfcfsw_type( 0.0, 0.0, 0.0, 0.0 ) Diag%topfsw = topfsw_type( 0.0, 0.0, 0.0 ) scmpsw = cmpfsw_type( 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ) @@ -423,6 +357,81 @@ subroutine GFS_rrtmgp_post_run (Model, Grid, Diag, Radtend, Statein, & enddo endif ! end_if_lsswr + + ! ####################################################################################### + ! Compute LW heating-rates. (Note. This piece was originally in rrtmg_lw.F90:_run()) + ! ####################################################################################### + if (Model%lslwr) then + ! Clear-sky heating-rate (optional) + if (l_clrskylw_hr) then + call check_error_msg('GFS_rrtmgp_post',compute_heating_rate( & + fluxlwUP_clrsky, & + fluxlwDOWN_clrsky, & + p_lev, & + hlw0)) + endif + ! All-sky heating-rate (mandatory) + call check_error_msg('GFS_rrtmgp_post',compute_heating_rate( & + fluxlwUP_allsky, & + fluxlwDOWN_allsky, & + p_lev, & + hlwc)) + + ! Copy fluxes from RRTGMP types into model radiation types. + ! Mandatory outputs + topflx_lw%upfxc = fluxlwUP_allsky(:,iTOA) + topflx_lw%upfx0 = fluxlwUP_clrsky(:,iTOA) + sfcflx_lw%upfxc = fluxlwUP_allsky(:,iSFC) + sfcflx_lw%upfx0 = fluxlwUP_clrsky(:,iSFC) + sfcflx_lw%dnfxc = fluxlwDOWN_allsky(:,iSFC) + sfcflx_lw%dnfx0 = fluxlwDOWN_clrsky(:,iSFC) + + ! Optional outputs + if(l_fluxeslw2d) then + flxprf_lw%upfxc = fluxlwUP_allsky + flxprf_lw%dnfxc = fluxlwDOWN_allsky + flxprf_lw%upfx0 = fluxlwUP_clrsky + flxprf_lw%dnfx0 = fluxlwDOWN_clrsky + endif + endif + + ! ####################################################################################### + ! Save LW outputs (Note. This piece was originally in rrtmg_lw_post.F90:_run()) + ! ####################################################################################### + if (Model%lslwr) then + ! Save surface air temp for diurnal adjustment at model t-steps + Radtend%tsflw (:) = tsfa(:) + + do k = 1, LM + k1 = k + kd + Radtend%htrlw(1:im,k) = hlwc(1:im,k1) + enddo + ! Repopulate the points above levr + if (lm < Model%levs) then + do k = lm,Model%levs + Radtend%htrlw (1:im,k) = Radtend%htrlw (1:im,LM) + enddo + endif + + if (Model%lwhtr) then + do k = 1, lm + k1 = k + kd + Radtend%lwhc(1:im,k) = hlw0(1:im,k1) + enddo + ! Repopulate the points above levr + if (lm < Model%levs) then + do k = lm,Model%levs + Radtend%lwhc(1:im,k) = Radtend%lwhc(1:im,LM) + enddo + endif + endif + + ! Radiation fluxes for other physics processes + Coupling%sfcdlw(:) = Radtend%sfcflw(:)%dnfxc + + endif + + ! ####################################################################################### ! ####################################################################################### !> - For time averaged output quantities (including total-sky and @@ -537,7 +546,16 @@ end subroutine GFS_rrtmgp_post_run !> \section arg_table_GFS_rrtmgp_post_finalize Argument Table !! subroutine GFS_rrtmgp_post_finalize () - end subroutine GFS_rrtmgp_post_finalize -!! @} + end subroutine GFS_rrtmgp_post_finalize + subroutine check_error_msg(routine_name, error_msg) + character(len=*), intent(in) :: & + error_msg, routine_name + + if(error_msg /= "") then + print*,"ERROR("//trim(routine_name)//"): " + print*,trim(error_msg) + return + end if + end subroutine check_error_msg end module GFS_rrtmgp_post diff --git a/physics/GFS_rrtmgp_pre.F90 b/physics/GFS_rrtmgp_pre.F90 index fcb0e0fb0..b25e02fb3 100644 --- a/physics/GFS_rrtmgp_pre.F90 +++ b/physics/GFS_rrtmgp_pre.F90 @@ -51,18 +51,12 @@ module GFS_rrtmgp_pre setemis, & ! Routine to compute surface-emissivity NF_ALBD, & ! Number of surface albedo categories (4; nir-direct, nir-diffuse, uvvis-direct, uvvis-diffuse) setalb ! Routine to compute surface albedo - - use rrtmgp_lw, only: nrghice_lw => nrghice, ipsdlw0 - use rrtmgp_sw, only: nrghice_sw => nrghice, ipsdsw0, check_error_msg use mersenne_twister, only: & random_setseed, & random_number, & random_stat ! RRTMGP types use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp - use mo_cloud_optics, only: ty_cloud_optics - use mo_optical_props, only: ty_optical_props_1scl, ty_optical_props_2str - use mo_cloud_sampling, only: sampled_mask_max_ran, sampled_mask_exp_ran, draw_samples use mo_gas_concentrations, only: ty_gas_concs real(kind_phys), parameter :: & @@ -101,8 +95,6 @@ end subroutine GFS_rrtmgp_pre_init !! | kt | vertical_index_difference_between_layer_and_upper_bound | vertical index difference between layer and upper bound | index | 0 | integer | | out | F | !! | kb | vertical_index_difference_between_layer_and_lower_bound | vertical index difference between layer and lower bound | index | 0 | integer | | out | F | !! | raddt | time_step_for_radiation | radiation time step | s | 0 | real | kind_phys | out | F | -!! | delp | layer_pressure_thickness_for_radiation | layer pressure thickness on radiation levels | hPa | 2 | real | kind_phys | out | F | -!! | dz | layer_thickness_for_radiation | layer thickness on radiation levels | km | 2 | real | kind_phys | out | F | !! | plvl | air_pressure_at_interface_for_radiation_in_hPa | air pressure at vertical interface for radiation calculation | hPa | 2 | real | kind_phys | out | F | !! | plyr | air_pressure_at_layer_for_radiation_in_hPa | air pressure at vertical layer for radiation calculation | hPa | 2 | real | kind_phys | out | F | !! | tlvl | air_temperature_at_interface_for_radiation | air temperature at vertical interface for radiation calculation | K | 2 | real | kind_phys | out | F | @@ -111,45 +103,31 @@ end subroutine GFS_rrtmgp_pre_init !! | tsfa | surface_air_temperature_for_radiation | lowest model layer air temperature for radiation | K | 1 | real | kind_phys | out | F | !! | qlyr | water_vapor_specific_humidity_at_layer_for_radiation | water vapor specific humidity at vertical layer for radiation calculation | kg kg-1 | 2 | real | kind_phys | out | F | !! | olyr | ozone_concentration_at_layer_for_radiation | ozone concentration | kg kg-1 | 2 | real | kind_phys | out | F | -!! | icseed | seed_random_numbers_lw | seed for random number generation for longwave radiation | none | 1 | integer | | in | F | +!! | cld_frac | total_cloud_fraction | layer total cloud fraction | frac | 2 | real | kind_phys | out | F | +!! | cld_lwp | cloud_liquid_water_path | layer cloud liquid water path | g m-2 | 2 | real | kind_phys | out | F | +!! | cld_reliq | mean_effective_radius_for_liquid_cloud | mean effective radius for liquid cloud | micron | 2 | real | kind_phys | out | F | +!! | cld_iwp | cloud_ice_water_path | layer cloud ice water path | g m-2 | 2 | real | kind_phys | out | F | +!! | cld_reice | mean_effective_radius_for_ice_cloud | mean effective radius for ice cloud | micron | 2 | real | kind_phys | out | F | +!! | icseed_sw | seed_random_numbers_sw | seed for random number generation for shortwave radiation | none | 1 | integer | | in | F | +!! | icseed_lw | seed_random_numbers_lw | seed for random number generation for longwave radiation | none | 1 | integer | | in | F | +!! | faerlw | aerosol_optical_properties_for_longwave_bands_01-16 | aerosol optical properties for longwave bands 01-16 | various | 4 | real | kind_phys | out | F | +!! | faersw | aerosol_optical_properties_for_shortwave_bands_01-16 | aerosol optical properties for shortwave bands 01-16 | various | 4 | real | kind_phys | out | F | !! | aerodp | atmosphere_optical_thickness_due_to_ambient_aerosol_particles | vertical integrated optical depth for various aerosol species | none | 2 | real | kind_phys | out | F | -!! | cldsa | cloud_area_fraction_for_radiation | fraction of clouds for low, middle,high, total and BL | frac | 2 | real | kind_phys | out | F | -!! | mtopa | model_layer_number_at_cloud_top | vertical indices for low, middle and high cloud tops | index | 2 | integer | | out | F | -!! | mbota | model_layer_number_at_cloud_base | vertical indices for low, middle and high cloud bases | index | 2 | integer | | out | F | -!! | de_lgth | cloud_decorrelation_length | cloud decorrelation length | km | 1 | real | kind_phys | out | F | !! | alb1d | surface_albedo_perturbation | surface albedo perturbation | frac | 1 | real | kind_phys | out | F | -!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | -!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | !! | kdist_lw | K_distribution_file_for_RRTMGP_LW_scheme | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | !! | kdist_sw | K_distribution_file_for_RRTMGP_SW_scheme | DDT containing spectral information for RRTMGP SW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | -!! | kdist_cldy_lw | K_distribution_file_for_cloudy_RRTMGP_LW_scheme | DDT containing spectral information for cloudy RRTMGP LW radiation scheme | DDT | 0 | ty_cloud_optics | | in | F | -!! | kdist_cldy_sw | K_distribution_file_for_cloudy_RRTMGP_SW_scheme | DDT containing spectral information for cloudy RRTMGP SW radiation scheme | DDT | 0 | ty_cloud_optics | | in | F | -!! | optical_propsLW_clouds | longwave_optical_properties_for_cloudy_atmosphere | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_1scl | | out | F | -!! | optical_propsLW_aerosol | longwave_optical_properties_for_aerosols | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_1scl | | out | F | -!! | optical_propsSW_clouds | shortwave_optical_properties_for_cloudy_atmosphere | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_2str | | out | F | -!! | optical_propsSW_aerosol | shortwave_optical_properties_for_aerosols | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_2str | | out | F | -!! | gas_concentrations_lw | Gas_concentrations_for_RRTMGP_suite_lw | DDT containing gas concentrations for RRTMGP radiation scheme | DDT | 0 | ty_gas_concs | | out | F | -!! | gas_concentrations_sw | Gas_concentrations_for_RRTMGP_suite_sw | DDT containing gas concentrations for RRTMGP radiation scheme | DDT | 0 | ty_gas_concs | | out | F | +!! | gas_concentrations | Gas_concentrations_for_RRTMGP_suite | DDT containing gas concentrations for RRTMGP radiation scheme | DDT | 0 | ty_gas_concs | | out | F | !! | sfc_emiss_byband | surface_longwave_emissivity_in_each_band | surface lw emissivity in fraction in each LW band | frac | 2 | real | kind_phys | out | F | -!! | sfc_alb_nir_dir | surface_shortwave_albedo_near_infrared_direct_in_each_band | surface sw near-infrared direct albedo in each SW band | frac | 2 | real | kind_phys | out | F | -!! | sfc_alb_nir_dif | surface_shortwave_albedo_near_infrared_diffuse_in_each_band | surface sw near-infrared diffuse albedo in each SW band | frac | 2 | real | kind_phys | out | F | -!! | sfc_alb_uvvis_dir | surface_shortwave_albedo_uv_visible_direct_in_each_band | surface sw uv-visible direct albedo in each SW band | frac | 2 | real | kind_phys | out | F | -!! | sfc_alb_uvvis_dif | surface_shortwave_albedo_uv_visible_diffuse_in_each_band | surface sw uv-visible diffuse albedo in each SW band | frac | 2 | real | kind_phys | out | F | -!! | nday | daytime_points_dimension | daytime points dimension | count | 0 | integer | | out | F | -!! | idxday | daytime_points | daytime points | index | 1 | integer | | out | F | +!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | +!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | !! ! Attention - the output arguments lm, im, lmk, lmp must not be set ! in the CCPP version - they are defined in the interstitial_create routine - ! ######################################################################################### - subroutine GFS_rrtmgp_pre_run (Model, Grid, Sfcprop, Statein, Tbd, Coupling, & ! IN - Radtend, & ! INOUT - lm, im, lmk, lmp, kdist_lw, kdist_sw, kdist_cldy_lw, kdist_cldy_sw, & ! IN - kd, kt, kb, raddt, delp, dz, plvl, plyr, tlvl, tlyr, tsfg, tsfa, qlyr, olyr, icseed, & ! OUT - aerodp, cldsa, mtopa, mbota, de_lgth, alb1d, & ! OUT - optical_propsLW_clouds, optical_propsLW_aerosol, optical_propsSW_clouds, & ! OUT - optical_propsSW_aerosol, gas_concentrations_lw, gas_concentrations_sw, & - sfc_emiss_byband, sfc_alb_nir_dir, sfc_alb_nir_dif, sfc_alb_uvvis_dir, & - sfc_alb_uvvis_dif, nday, idxday, errmsg, errflg) + subroutine GFS_rrtmgp_pre_run (Model, Grid, Sfcprop, Statein, Tbd, Coupling, & + Radtend,lm, im, lmk, lmp, kdist_lw, kdist_sw, kd, kt, kb, raddt, plvl, plyr, & + tlvl, tlyr, tsfg, tsfa, qlyr, olyr, icseed_lw, icseed_sw, aerodp, alb1d, & + cld_frac, cld_lwp, cld_reliq, cld_iwp, cld_reice, faerlw, faersw, & + gas_concentrations, sfc_emiss_byband, errmsg, errflg) ! Inputs type(GFS_control_type), intent(in) :: Model @@ -163,14 +141,11 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Sfcprop, Statein, Tbd, Coupling, type(ty_gas_optics_rrtmgp),intent(in) :: & kdist_lw, & ! RRTMGP DDT containing spectral information for LW calculation kdist_sw ! RRTMGP DDT containing spectral information for SW calculation - type(ty_cloud_optics),intent(in) :: & - kdist_cldy_lw, & - kdist_cldy_sw type(ty_gas_concs),intent(out) :: & - gas_concentrations_lw,gas_concentrations_sw + gas_concentrations integer,intent(in),dimension(IM) :: & - icseed ! auxiliary special cloud related array when module - ! variable isubclw=2, it provides permutation seed + icseed_sw, & ! auxiliary special cloud related array when module + icseed_lw ! variable isubclw=2, it provides permutation seed ! for each column profile that are used for generating ! random numbers. when isubclw /=2, it will not be used. @@ -179,69 +154,64 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Sfcprop, Statein, Tbd, Coupling, real(kind_phys), intent(out) :: raddt real(kind_phys), dimension(size(Grid%xlon,1)), intent(out) :: & tsfg, tsfa - real(kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(out) :: & - delp, dz, plyr, tlyr, qlyr, olyr - real(kind_phys), dimension(size(Grid%xlon,1),Model%levr+1+LTP), intent(out) :: & + real(kind_phys), dimension(size(Grid%xlon,1),LMK), intent(out) :: & + plyr, tlyr, qlyr, olyr + real(kind_phys), dimension(size(Grid%xlon,1),LMP), intent(out) :: & plvl, tlvl real(kind_phys), dimension(size(Grid%xlon,1),NSPC1), intent(out) :: & aerodp - real(kind_phys), dimension(size(Grid%xlon,1),5), intent(out) :: cldsa - integer, dimension(size(Grid%xlon,1),3), intent(out) :: mbota,mtopa - real(kind_phys), dimension(size(Grid%xlon,1)), intent(out) :: de_lgth,alb1d + real(kind_phys), dimension(size(Grid%xlon,1),5) :: cldsa + integer, dimension(size(Grid%xlon,1),3) :: mbota,mtopa + real(kind_phys), dimension(size(Grid%xlon,1)), intent(out) :: alb1d + real(kind_phys), dimension(size(Grid%xlon,1)) :: de_lgth character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg - type(ty_optical_props_1scl),intent(out) :: & - optical_propsLW_clouds, & - optical_propsLW_aerosol - type(ty_optical_props_2str),intent(out) :: & - optical_propsSW_clouds, & - optical_propsSW_aerosol - real(kind_phys),dimension(kdist_sw%get_nband(),size(Grid%xlon,1)),intent(out) :: & - sfc_emiss_byband, & ! Longwave surface emissivity in each band - sfc_alb_nir_dir, & ! Shortwave surface albedo (nIR-direct) - sfc_alb_nir_dif, & ! Shortwave surface albedo (nIR-diffuse) - sfc_alb_uvvis_dir, & ! Shortwave surface albedo (uvvis-direct) - sfc_alb_uvvis_dif ! Shortwave surface albedo (uvvis-diffuse) - - integer, intent(out) :: nday - integer, dimension(size(Grid%xlon,1)), intent(out) :: idxday + real(kind_phys),dimension(kdist_sw%get_nband(),IM),intent(out) :: & + sfc_emiss_byband ! Longwave surface emissivity in each band + real(kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP),intent(out) :: & + cld_frac, & ! + cld_lwp, & ! + cld_reliq, & ! + cld_iwp, & ! + cld_reice ! + real(kind_phys), dimension(size(Grid%xlon,1),LMK,kdist_sw%get_nband(),NF_AESW), intent(out) ::& + faersw + real(kind_phys), dimension(size(Grid%xlon,1),LMK,kdist_lw%get_nband(),NF_AELW), intent(out) ::& + faerlw ! Local variables integer :: me, nfxr, ntrac, ntcw, ntiw, ncld, ntrw, ntsw, ntgl,i, j, k, k1, k2, lsk, & LP1, lla, llb, lya, lyb, iCol, iBand integer,dimension(IM) :: ipseed_lw,ipseed_sw - logical,dimension(IM,Model%levr+LTP) :: & + logical,dimension(IM,LMK) :: & liqmask,icemask - real(kind_phys),dimension(IM,Model%levr+LTP) :: & + real(kind_phys),dimension(IM,LMK) :: & vmr_o3, vmr_h2o real(kind_phys) :: es, qs, tem0d real(kind_phys), dimension(size(Grid%xlon,1)) :: tem1d, tskn - real(kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP) :: & - rhly, tvly, qstl, prslk1, & + real(kind_phys), dimension(size(Grid%xlon,1),LMK) :: & + rhly, tvly, qstl, prslk1, delp, dz, & tem2da, cldcov, deltaq, cnvc, cnvw, effrl, effri, effrr, effrs real (kind_phys) :: clwmin, clwm, clwt, onemrh, value, tem1, tem2 real (kind_phys), parameter :: xrc3 = 100. - real(kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP+1) :: tem2db - real(kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,Model%ncnd) :: ccnd - real(kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,2:Model%ntrac) :: tracer1 - real(kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,NF_CLDS) :: clouds - real(kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,NF_VGAS) :: gasvmr - real(kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,kdist_sw%get_nband(),NF_AESW)::faersw,faersw2 - real(kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,kdist_lw%get_nband(),NF_AELW)::faerlw - type(ty_optical_props_1scl) :: optical_propsLW_cloudsByBand - type(ty_optical_props_2str) :: optical_propsSW_cloudsByBand - real(kind_phys), dimension(kdist_lw%get_ngpt(),Model%levr+LTP,IM) :: & + real(kind_phys), dimension(size(Grid%xlon,1),LMP) :: tem2db + real(kind_phys), dimension(size(Grid%xlon,1),LMK,Model%ncnd) :: ccnd + real(kind_phys), dimension(size(Grid%xlon,1),LMK,2:Model%ntrac) :: tracer1 + real(kind_phys), dimension(size(Grid%xlon,1),LMK,NF_CLDS) :: clouds + real(kind_phys), dimension(size(Grid%xlon,1),LMK,NF_VGAS) :: gasvmr + real(kind_phys), dimension(size(Grid%xlon,1),LMK,kdist_sw%get_nband(),NF_AESW)::faersw2 + real(kind_phys), dimension(kdist_lw%get_ngpt(),LMK,IM) :: & rng3D_lw - real(kind_phys), dimension(kdist_lw%get_ngpt()*(Model%levr+LTP)) :: & + real(kind_phys), dimension(kdist_lw%get_ngpt()*LMK) :: & rng1D_lw - logical, dimension(IM,Model%levr+LTP,kdist_lw%get_ngpt()) :: & + logical, dimension(IM,LMK,kdist_lw%get_ngpt()) :: & cldfracMCICA_lw - real(kind_phys), dimension(kdist_sw%get_ngpt(),Model%levr+LTP,IM) :: & + real(kind_phys), dimension(kdist_sw%get_ngpt(),LMK,IM) :: & rng3D_sw - real(kind_phys), dimension(kdist_sw%get_ngpt()*(Model%levr+LTP)) :: & + real(kind_phys), dimension(kdist_sw%get_ngpt()*LMK) :: & rng1D_sw - logical, dimension(IM,Model%levr+LTP,kdist_sw%get_ngpt()) :: & + logical, dimension(IM,LMK,kdist_sw%get_ngpt()) :: & cldfracMCICA_sw type(random_stat) :: rng_stat real(kind_phys), dimension(size(Grid%xlon,1),NF_ALBD) :: sfcalb @@ -685,7 +655,13 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Sfcprop, Statein, Tbd, Coupling, clouds,cldsa,mtopa,mbota, de_lgth) ! OUT endif ! end if_imp_physics - + cld_frac = clouds(:,:,1) + cld_lwp = clouds(:,:,2) + cld_reliq = clouds(:,:,3) + cld_iwp = clouds(:,:,4) + cld_reice = clouds(:,:,5) + + ! mg, sfc-perts ! --- scale random patterns for surface perturbations with ! perturbation size @@ -706,18 +682,18 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Sfcprop, Statein, Tbd, Coupling, ! LW and SW radiation. ! ####################################################################################### call setaer (plvl, plyr, prslk1, tvly, rhly, Sfcprop%slmsk, tracer1, Grid%xlon, & - Grid%xlat, IM, LMK, LMP, Model%lsswr, Model%lslwr, faersw, faerlw, aerodp) + Grid%xlat, IM, LMK, LMP, Model%lsswr, Model%lslwr, faersw2, faerlw, aerodp) ! Store aerosol optical properties ! SW. ! For RRTMGP SW the bands are now ordered from [IR(band) -> nIR -> UV], in RRTMG the ! band ordering was [nIR -> UV -> IR(band)] - faersw2(1:IM,1:LMK,1,1) = faersw(1:IM,1:LMK,kdist_sw%get_nband(),1) - faersw2(1:IM,1:LMK,1,2) = faersw(1:IM,1:LMK,kdist_sw%get_nband(),2) - faersw2(1:IM,1:LMK,1,3) = faersw(1:IM,1:LMK,kdist_sw%get_nband(),3) - faersw2(1:IM,1:LMK,2:kdist_sw%get_nband(),1) = faersw(1:IM,1:LMK,1:kdist_sw%get_nband()-1,1) - faersw2(1:IM,1:LMK,2:kdist_sw%get_nband(),2) = faersw(1:IM,1:LMK,1:kdist_sw%get_nband()-1,2) - faersw2(1:IM,1:LMK,2:kdist_sw%get_nband(),3) = faersw(1:IM,1:LMK,1:kdist_sw%get_nband()-1,3) + faersw(1:IM,1:LMK,1,1) = faersw2(1:IM,1:LMK,kdist_sw%get_nband(),1) + faersw(1:IM,1:LMK,1,2) = faersw2(1:IM,1:LMK,kdist_sw%get_nband(),2) + faersw(1:IM,1:LMK,1,3) = faersw2(1:IM,1:LMK,kdist_sw%get_nband(),3) + faersw(1:IM,1:LMK,2:kdist_sw%get_nband(),1) = faersw2(1:IM,1:LMK,1:kdist_sw%get_nband()-1,1) + faersw(1:IM,1:LMK,2:kdist_sw%get_nband(),2) = faersw2(1:IM,1:LMK,1:kdist_sw%get_nband()-1,2) + faersw(1:IM,1:LMK,2:kdist_sw%get_nband(),3) = faersw2(1:IM,1:LMK,1:kdist_sw%get_nband()-1,3) ! ####################################################################################### ! Call module_radiation_surface::setemis(),to setup surface emissivity for LW radiation. @@ -731,214 +707,35 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Sfcprop, Statein, Tbd, Coupling, endif ! ####################################################################################### - ! Check for daytime points for SW radiation. - ! ####################################################################################### - if (Model%lsswr) then - nday = 0 - idxday = 0 - do iCol = 1, IM - if (Radtend%coszen(iCol) >= 0.0001) then - nday = nday + 1 - idxday(nday) = iCol - endif - enddo - else - nday = 0 - idxday = 0 - endif - - ! ####################################################################################### - ! Call module_radiation_surface::setalb() to setup surface albedo for SW radiation. + ! Set gas concentrations for RRTMGP ! ####################################################################################### - if (Model%lsswr) then - call setalb (Sfcprop%slmsk, Sfcprop%snowd, Sfcprop%sncovr, Sfcprop%snoalb, & - Sfcprop%zorl, Radtend%coszen, tsfg, tsfa, Sfcprop%hprim, Sfcprop%alvsf, & - Sfcprop%alnsf, Sfcprop%alvwf, Sfcprop%alnwf, Sfcprop%facsf, & - Sfcprop%facwf, Sfcprop%fice, Sfcprop%tisfc, IM, alb1d, Model%pertalb, & - sfcalb) - - ! Approximate mean surface albedo from vis- and nir- diffuse values. - Radtend%sfalb(:) = max(0.01, 0.5 * (sfcalb(:,2) + sfcalb(:,4))) - - ! Spread across all SW bands - do iBand=1,kdist_sw%get_nband() - sfc_alb_nir_dir(iBand,1:IM) = sfcalb(:,1) - sfc_alb_nir_dif(iBand,1:IM) = sfcalb(:,2) - sfc_alb_uvvis_dir(iBand,1:IM) = sfcalb(:,3) - sfc_alb_uvvis_dif(iBand,1:IM) = sfcalb(:,4) - enddo - else - sfc_alb_nir_dir(:,:) = 0._kind_phys - sfc_alb_nir_dif(:,:) = 0._kind_phys - sfc_alb_uvvis_dir(:,:) = 0._kind_phys - sfc_alb_uvvis_dif(:,:) = 0._kind_phys - endif - - ! ####################################################################################### - ! Compute radiative properties needed for RRTMGP - ! ####################################################################################### - - ! Change random number seed value for each radiation invocation (isubclw =1 or 2). - if(isubclw == 1) then ! advance prescribed permutation seed - do iCol = 1, IM - ipseed_lw(iCol) = ipsdlw0 + iCol - enddo - elseif (isubclw == 2) then ! use input array of permutaion seeds - do iCol = 1, IM - ipseed_lw(iCol) = icseed(iCol) - enddo - endif - ! Change random number seed value for each radiation invocation (isubcsw =1 or 2). - if(isubcsw == 1) then ! advance prescribed permutation seed - do iCol = 1, ncol - ipseed_sw(iCol) = ipsdsw0 + iCol - enddo - elseif (isubcsw == 2) then ! use input array of permutaion seeds - do iCol = 1, ncol - ipseed_sw(iCol) = icseed(iCol) - enddo - endif - ! Compute volume mixing-ratios for ozone (mmr) and specific-humidity. vmr_h2o = merge((qlyr/(1-qlyr))*amdw, 0., qlyr .ne. 1.) vmr_o3 = merge(olyr*amdo3, 0., olyr .gt. 0.) - - ! Compute ice/liquid cloud masks, needed by rrtmgp_cloud_optics - liqmask = (clouds(:,:,1) .gt. 0 .and. clouds(:,:,2) .gt. 0) - icemask = (clouds(:,:,1) .gt. 0 .and. clouds(:,:,4) .gt. 0) - - ! ####################################################################################### - ! Allocate space for gas optical properties [ncol,nlay,ngpts] - ! ####################################################################################### - ! Longwave - if (Model%lslwr) then - ! Cloud optics [nCol,nLay,nBands] - call check_error_msg('GFS_rrtmgp_pre_run',optical_propsLW_cloudsByBand%init(kdist_lw%get_band_lims_wavenumber())) - call check_error_msg('GFS_rrtmgp_pre_run',optical_propsLW_cloudsByBand%alloc_1scl(IM, LMK)) - ! Aerosol optics [Ccol,nLay,nBands] - call check_error_msg('GFS_rrtmgp_pre_run',optical_propsLW_aerosol%init(kdist_lw%get_band_lims_wavenumber())) - call check_error_msg('GFS_rrtmgp_pre_run',optical_propsLW_aerosol%alloc_1scl(IM, LMK)) - ! Cloud optics [nCol,nLay,nGpts] - call check_error_msg('GFS_rrtmgp_pre_run',optical_propsLW_clouds%alloc_1scl(IM, LMK, kdist_lw)) - endif - ! Shortwave - if (Model%lsswr .and. nday .gt. 0) then - ! Cloud optics [nCol,nLay,nBands] - call check_error_msg('GFS_rrtmgp_pre_run',optical_propsSW_cloudsByBand%init(kdist_sw%get_band_lims_wavenumber())) - call check_error_msg('GFS_rrtmgp_pre_run',optical_propsSW_cloudsByBand%alloc_2str(nDay, LMK)) - ! Aerosol optics [Ccol,nLay,nBands] - call check_error_msg('GFS_rrtmgp_pre_run',optical_propsSW_aerosol%init(kdist_sw%get_band_lims_wavenumber())) - call check_error_msg('GFS_rrtmgp_pre_run',optical_propsSW_aerosol%alloc_2str(nDay, LMK)) - ! Cloud optics [nCol,nLay,nGpts] - call check_error_msg('GFS_rrtmgp_pre_run',optical_propsSW_clouds%alloc_2str(nDay, LMK, kdist_sw)) - endif + ! + call gas_concentrations%reset() + call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations%set_vmr('o2', gasvmr(:,:,4))) + call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations%set_vmr('co2', gasvmr(:,:,1))) + call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations%set_vmr('ch4', gasvmr(:,:,3))) + call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations%set_vmr('n2o', gasvmr(:,:,2))) + call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations%set_vmr('h2o', vmr_h2o)) + call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations%set_vmr('o3', vmr_o3)) - ! ####################################################################################### - ! Set gas concentrations - ! ####################################################################################### - !if (Model%lslwr) then - call gas_concentrations_lw%reset() - call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations_lw%set_vmr('o2', gasvmr(:,:,4))) - call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations_lw%set_vmr('co2', gasvmr(:,:,1))) - call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations_lw%set_vmr('ch4', gasvmr(:,:,3))) - call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations_lw%set_vmr('n2o', gasvmr(:,:,2))) - call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations_lw%set_vmr('h2o', vmr_h2o)) - call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations_lw%set_vmr('o3', vmr_o3)) - !endif - !if (Model%lsswr .and. nday .gt. 0) then - call gas_concentrations_sw%reset() - call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations_sw%set_vmr('o2', gasvmr(idxday,:,4))) - call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations_sw%set_vmr('co2', gasvmr(idxday,:,1))) - call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations_sw%set_vmr('ch4', gasvmr(idxday,:,3))) - call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations_sw%set_vmr('n2o', gasvmr(idxday,:,2))) - call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations_sw%set_vmr('h2o', vmr_h2o(idxday,:))) - call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations_sw%set_vmr('o3', vmr_o3(idxday,:))) - !endif - - ! ####################################################################################### - ! Copy aerosol to RRTMGP DDT - ! ####################################################################################### - ! LW - if (Model%lslwr) then - optical_propsLW_aerosol%tau = faerlw(:,:,:,1) * (1. - faerlw(:,:,:,2)) - endif - ! SW - if (Model%lsswr .and. nday .gt. 0) then - optical_propsSW_aerosol%tau = faersw2(idxday,:,:,1) - optical_propsSW_aerosol%ssa = faersw2(idxday,:,:,2) - optical_propsSW_aerosol%g = faersw2(idxday,:,:,3) - endif - - ! ####################################################################################### - ! Compute cloud-optics for RTE. - ! ####################################################################################### - ! Longwave - if (Model%lslwr) then - call check_error_msg('GFS_rrtmgp_pre_run',kdist_cldy_lw%cloud_optics(IM, LMK, kdist_lw%get_nband(), & - nrghice_lw, liqmask, icemask, clouds(:,:,2), clouds(:,:,4), clouds(:,:,3), & - clouds(:,:,5), optical_propsLW_cloudsByBand)) - endif - ! Shortwave - if (Model%lsswr .and. nday .gt. 0) then - call check_error_msg('GFS_rrtmgp_pre_run',kdist_cldy_sw%cloud_optics(nDay, LMK, kdist_sw%get_nband(), & - nrghice_sw, liqmask(idxday,:), icemask(idxday,:), clouds(idxday,:,2), & - clouds(idxday,:,4), clouds(idxday,:,3), clouds(idxday,:,5), & - optical_propsSW_cloudsByBand)) - endif - - ! ####################################################################################### - ! Call McICA to generate subcolumns. - ! ####################################################################################### - ! Longwave - if (Model%lslwr .and. isubclw .gt. 0) then - - ! Call RNG. Mersennse Twister accepts 1D array, so loop over columns and collapse along G-points - ! and layers. ([nGpts,nLayer,nColumn]-> [nGpts*nLayer]*nColumn) - do iCol=1,IM - call random_setseed(ipseed_lw(icol),rng_stat) - call random_number(rng1D_lw,rng_stat) - rng3D_lw(:,:,iCol) = reshape(source = rng1D_lw,shape=[kdist_lw%get_ngpt(),LMK]) - enddo - - ! Call McICA - select case ( iovrlw ) - ! Maximumn-random - case(1) - call check_error_msg('GFS_rrtmgp_pre_run',sampled_mask_max_ran(rng3D_lw,clouds(:,:,1),cldfracMCICA_lw)) - end select - - ! Map band optical depth to each g-point using McICA - call check_error_msg('GFS_rrtmgp_pre_run',draw_samples(cldfracMCICA_lw,optical_propsLW_cloudsByBand,optical_propsLW_clouds)) - endif - - ! Shortwave - if (Model%lsswr .and. nday .gt. 0 .and. isubcsw .gt. 0) then - - ! Call RNG. Mersennse Twister accepts 1D array, so loop over columns and collapse along G-points - ! and layers. ([nGpts,nLayer,nColumn]-> [nGpts*nLayer]*nColumn) - do iCol=1,IM - call random_setseed(ipseed_sw(icol),rng_stat) - call random_number(rng1D_sw,rng_stat) - rng3D_sw(:,:,iCol) = reshape(source = rng1D_sw,shape=[kdist_sw%get_ngpt(),LMK]) - enddo - - ! Call McICA - select case ( iovrsw ) - ! Maximumn-random - case(1) - call check_error_msg('GFS_rrtmgp_pre_run',sampled_mask_max_ran(rng3D_sw,clouds(:,:,1),cldfracMCICA_sw)) - end select - - ! Map band optical depth to each g-point using McICA - call check_error_msg('GFS_rrtmgp_pre_run',draw_samples(cldfracMCICA_sw,optical_propsSW_cloudsByBand,optical_propsSW_clouds)) - endif - end subroutine GFS_rrtmgp_pre_run !> \section arg_table_GFS_rrtmgp_pre_finalize Argument Table !! subroutine GFS_rrtmgp_pre_finalize () end subroutine GFS_rrtmgp_pre_finalize - -!! @} + subroutine check_error_msg(routine_name, error_msg) + character(len=*), intent(in) :: & + error_msg, routine_name + + if(error_msg /= "") then + print*,"ERROR("//trim(routine_name)//"): " + print*,trim(error_msg) + return + end if + end subroutine check_error_msg + end module GFS_rrtmgp_pre diff --git a/physics/rrtmgp_lw.F90 b/physics/rrtmgp_lw.F90 index 3007146d7..1bf2fef70 100644 --- a/physics/rrtmgp_lw.F90 +++ b/physics/rrtmgp_lw.F90 @@ -10,8 +10,6 @@ module rrtmgp_lw use mo_rrtmgp_clr_all_sky, only: rte_lw use mo_gas_concentrations, only: ty_gas_concs use mo_fluxes_byband, only: ty_fluxes_byband - use rrtmgp_sw, only: check_error_msg - ! Parameters integer,parameter :: nGases = 6 @@ -674,18 +672,20 @@ end subroutine rrtmgp_lw_init !! | kdist_lw | K_distribution_file_for_RRTMGP_LW_scheme | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | !! | optical_propsLW_clds | longwave_optical_properties_for_cloudy_atmosphere | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_1scl | | in | F | !! | optical_propsLW_aerosol | longwave_optical_properties_for_aerosols | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_1scl | | in | F | -!! | gas_concentrations | Gas_concentrations_for_RRTMGP_suite_lw | DDT containing gas concentrations for RRTMGP radiation scheme | DDT | 0 | ty_gas_concs | | in | F | +!! | gas_concentrations | Gas_concentrations_for_RRTMGP_suite | DDT containing gas concentrations for RRTMGP radiation scheme | DDT | 0 | ty_gas_concs | | in | F | !! | lslwr | flag_to_calc_lw | flag to calculate LW irradiances | flag | 0 | logical | | in | F | -!! | fluxLW_allsky | lw_flux_profiles_byband_allsky | Fortran DDT containing RRTMGP 3D fluxes | DDT | 0 | ty_fluxes_byband | | out | F | -!! | fluxLW_clrsky | lw_flux_profiles_byband_clrsky | Fortran DDT containing RRTMGP 3D fluxes | DDT | 0 | ty_fluxes_byband | | out | F | !! | hlw0 | tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_time_step | longwave clear sky heating rate | K s-1 | 2 | real | kind_phys | in | T | !! | hlwb | lw_heating_rate_spectral | longwave total sky heating rate (spectral) | K s-1 | 3 | real | kind_phys | in | T | +!! | fluxUP_allsky | lw_flux_profile_upward_allsky | RRTMGP upward longwave all-sky flux profile | W m-2 | 2 | real | kind_phys | out | F | +!! | fluxDOWN_allsky | lw_flux_profile_downward_allsky | RRTMGP downward longwave all-sky flux profile | W m-2 | 2 | real | kind_phys | out | F | +!! | fluxUP_clrsky | lw_flux_profile_upward_clrsky | RRTMGP upward longwave clr-sky flux profile | W m-2 | 2 | real | kind_phys | out | F | +!! | fluxDOWN_clrsky | lw_flux_profile_downward_clrsky | RRTMGP downward longwave clr-sky flux profile | W m-2 | 2 | real | kind_phys | out | F | !! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | !! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | !! subroutine rrtmgp_lw_run(ncol, nlay, kdist_lw, p_lay, t_lay, p_lev, skt, & sfc_emiss, gas_concentrations, optical_propsLW_clds, optical_propsLW_aerosol,& - lslwr, fluxLW_allsky, fluxLW_clrsky, hlw0, hlwb, errmsg, errflg) + lslwr, fluxUP_allsky, fluxDOWN_allsky, fluxUP_clrsky, fluxDOWN_clrsky, hlw0, hlwb, errmsg, errflg) ! Inputs integer, intent(in) :: & @@ -709,14 +709,16 @@ subroutine rrtmgp_lw_run(ncol, nlay, kdist_lw, p_lay, t_lay, p_lev, skt, & gas_concentrations ! RRTMGP DDT: trace gas concentrations (vmr) logical, intent(in) :: & lslwr ! Flag to calculate LW irradiances - + ! Outputs character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg - type(ty_fluxes_byband),intent(out) :: & - fluxLW_allsky, & ! All-sky flux (W/m2) - fluxLW_clrsky ! Clear-sky flux (W/m2) - + real(kind_phys), dimension(ncol,nlay), intent(out) :: & + fluxUP_allsky, & ! All-sky flux (W/m2) + fluxDOWN_allsky, & ! All-sky flux (W/m2) + fluxUP_clrsky, & ! Clear-sky flux (W/m2) + fluxDOWN_clrsky ! All-sky flux (W/m2) + ! Outputs (optional) real(kind_phys), dimension(ncol,nlay,kdist_lw%get_nband()), optional, intent(inout) :: & hlwb ! All-sky heating rate, by band (K/sec) @@ -724,32 +726,36 @@ subroutine rrtmgp_lw_run(ncol, nlay, kdist_lw, p_lay, t_lay, p_lev, skt, & hlw0 ! Clear-sky heating rate (K/sec) ! Local variables + type(ty_fluxes_byband) :: & + flux_allsky, & ! All-sky flux (W/m2) + flux_clrsky ! Clear-sky flux (W/m2) real(kind_phys), dimension(ncol,nlay+1),target :: & fluxLW_up_allsky, fluxLW_up_clrsky, fluxLW_dn_allsky, fluxLW_dn_clrsky real(kind_phys), dimension(ncol,nlay+1,kdist_lw%get_nband()),target :: & fluxLWBB_up_allsky, fluxLWBB_dn_allsky logical :: l_ClrSky_HR, l_AllSky_HR_byband + integer :: k ! Initialize CCPP error handling variables errmsg = '' errflg = 0 if (.not. lslwr) return - + ! Are any optional outputs requested? Need to know now to compute correct fluxes. l_ClrSky_HR = present(hlw0) l_AllSky_HR_byband = present(hlwb) ! Initialize RRTMGP DDT containing 2D(3D) fluxes - fluxLW_allsky%flux_up => fluxLW_up_allsky - fluxLW_allsky%flux_dn => fluxLW_dn_allsky - fluxLW_clrsky%flux_up => fluxLW_up_clrsky - fluxLW_clrsky%flux_dn => fluxLW_dn_clrsky + flux_allsky%flux_up => fluxLW_up_allsky + flux_allsky%flux_dn => fluxLW_dn_allsky + flux_clrsky%flux_up => fluxLW_up_clrsky + flux_clrsky%flux_dn => fluxLW_dn_clrsky ! Only calculate fluxes by-band, only when heating-rate profiles by band are requested. if (l_AllSky_HR_byband) then - fluxLW_allsky%bnd_flux_up => fluxLWBB_up_allsky - fluxLW_allsky%bnd_flux_dn => fluxLWBB_dn_allsky + flux_allsky%bnd_flux_up => fluxLWBB_up_allsky + flux_allsky%bnd_flux_dn => fluxLWBB_dn_allsky endif - + ! Call RRTMGP LW scheme call check_error_msg('rrtmgp_lw_run',rte_lw( & kdist_lw, & ! IN - spectral information @@ -760,13 +766,26 @@ subroutine rrtmgp_lw_run(ncol, nlay, kdist_lw, p_lay, t_lay, p_lev, skt, & skt, & ! IN - skin temperature (K) sfc_emiss, & ! IN - surface emissivity in each LW band optical_propsLW_clds, & ! IN - DDT containing cloud optical information - fluxLW_allsky, & ! OUT - Fluxes, all-sky, 3D (nCol,nLay,nBand) - fluxLW_clrsky, & ! OUT - Fluxes, clear-sky, 3D (nCol,nLay,nBand) + flux_allsky, & ! OUT - Fluxes, all-sky, 3D (nCol,nLay,nBand) + flux_clrsky, & ! OUT - Fluxes, clear-sky, 3D (nCol,nLay,nBand) aer_props = optical_propsLW_aerosol)) ! IN(optional) - DDT containing aerosol optical information + fluxUP_allsky = flux_allsky%flux_up + fluxDOWN_allsky = flux_allsky%flux_dn + fluxUP_clrsky = flux_clrsky%flux_up + fluxDOWN_clrsky = flux_clrsky%flux_dn end subroutine rrtmgp_lw_run subroutine rrtmgp_lw_finalize() end subroutine rrtmgp_lw_finalize - + subroutine check_error_msg(routine_name, error_msg) + character(len=*), intent(in) :: & + error_msg, routine_name + + if(error_msg /= "") then + print*,"ERROR("//trim(routine_name)//"): " + print*,trim(error_msg) + return + end if + end subroutine check_error_msg end module rrtmgp_lw diff --git a/physics/rrtmgp_lw_main.F90 b/physics/rrtmgp_lw_main.F90 deleted file mode 100644 index f0e688f98..000000000 --- a/physics/rrtmgp_lw_main.F90 +++ /dev/null @@ -1,97 +0,0 @@ -! ########################################################################################### -! ########################################################################################### -module rrtmgp_lw_main - use machine, only: kind_phys - use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp - use mo_cloud_optics, only: ty_cloud_optics - use mo_optical_props, only: ty_optical_props_1scl - use mo_rrtmgp_clr_all_sky, only: rte_lw - use mo_gas_concentrations, only: ty_gas_concs - use mo_fluxes_byband, only: ty_fluxes_byband - use GFS_rrtmgp_lw, only: check_error_msg - - public rrtmgp_lw_main_init, rrtmgp_lw_main_run, rrtmgp_lw_main_finalize -contains - - subroutine rrtmgp_lw_main_init() - end subroutine rrtmgp_lw_main_init - - ! ######################################################################################### - ! ######################################################################################### -!! \section arg_table_rrtmgp_lw_main_run Argument Table -!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | -!! |-----------------------|-------------------------------------------------|--------------------------------------------------------------------|-------|------|-----------------------|-----------|--------|----------| -!! | ncol | horizontal_loop_extent | horizontal dimension | count | 0 | integer | | in | F | -!! | nlay | adjusted_vertical_layer_dimension_for_radiation | number of vertical layers for radiation | count | 0 | integer | | in | F | -!! | p_lay | air_pressure_at_layer_for_radiation_in_hPa | air pressure layer | hPa | 2 | real | kind_phys | in | F | -!! | p_lev | air_pressure_at_interface_for_radiation_in_hPa | air pressure level | hPa | 2 | real | kind_phys | in | F | -!! | t_lay | air_temperature_at_layer_for_radiation | air temperature layer | K | 2 | real | kind_phys | in | F | -!! | skt | surface_ground_temperature_for_radiation | surface ground temperature for radiation | K | 1 | real | kind_phys | in | F | -!! | sfc_emiss | surface_longwave_emissivity_in_each_band | surface lw emissivity in fraction in each LW band | frac | 2 | real | kind_phys | in | F | -!! | kdist_lw | K_distribution_file_for_RRTMGP_LW_scheme | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | -!! | optical_props_clds | optical_properties_for_cloudy_atmosphere | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_1scl | | in | F | -!! | optical_props_aerosol | optical_properties_for_aerosols | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_1scl | | in | F | -!! | gas_concentrations | Gas_concentrations_for_RRTMGP_suite | DDT containing gas concentrations for RRTMGP radiation scheme | DDT | 0 | ty_gas_concs | | in | F | -!! | fluxLW_allsky | lw_flux_profiles_byband_allsky | Fortran DDT containing RRTMGP 3D fluxes | DDT | 0 | ty_fluxes_byband | | out | F | -!! | fluxLW_clrsky | lw_flux_profiles_byband_clrsky | Fortran DDT containing RRTMGP 3D fluxes | DDT | 0 | ty_fluxes_byband | | out | F | -!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | -!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | -!! - subroutine rrtmgp_lw_main_run(ncol, nlay, kdist_lw, p_lay, t_lay, p_lev, skt, & - sfc_emiss, gas_concentrations, optical_props_clds, optical_props_aerosol,& - fluxLW_allsky, fluxLW_clrsky, errmsg, errflg) - - ! Inputs - integer, intent(in) :: & - ncol, & ! Number of horizontal gridpoints - nlay ! Number of vertical layers - real(kind_phys), dimension(ncol,nlay), intent(in) :: & - p_lay, & ! Pressure @ model layer-centers (hPa) - t_lay ! Temperature (K) - real(kind_phys), dimension(ncol,nlay+1), intent(in) :: & - p_lev ! Pressure @ model layer-interfaces (hPa) - real(kind_phys), dimension(ncol), intent(in) :: & - skt ! Surface(skin) temperature (K) - type(ty_gas_optics_rrtmgp),intent(in) :: & - kdist_lw ! DDT containing LW spectral information - real(kind_phys), dimension(kdist_lw%get_nband(),ncol) :: & - sfc_emiss ! Surface emissivity (1) - type(ty_optical_props_1scl),intent(in) :: & - optical_props_clds, & - optical_props_aerosol - type(ty_gas_concs),intent(in) :: & - gas_concentrations - type(ty_fluxes_byband) :: & - fluxLW_allsky, & ! All-sky flux (W/m2) - fluxLW_clrsky ! Clear-sky flux (W/m2) - - ! Outputs - character(len=*), intent(out) :: errmsg - integer, intent(out) :: errflg - - ! Initialize CCPP error handling variables - errmsg = '' - errflg = 0 - - ! Call RRTMGP LW scheme - call check_error_msg(rte_lw( & - kdist_lw, & ! IN - spectral information - gas_concentrations, & ! IN - gas concentrations (vmr) - p_lay, & ! IN - pressure at layer interfaces (Pa) - t_lay, & ! IN - temperature at layer interfaes (K) - p_lev, & ! IN - pressure at layer centers (Pa) - skt, & ! IN - skin temperature (K) - sfc_emiss, & ! IN - surface emissivity in each LW band - optical_props_clds, & ! IN - DDT containing cloud optical information - fluxLW_allsky, & ! OUT - Fluxes, all-sky, 3D (nCol,nLay,nBand) - fluxLW_clrsky, & ! OUT - Fluxes, clear-sky, 3D (nCol,nLay,nBand) - aer_props = optical_props_aerosol)) ! IN(optional) - DDT containing aerosol optical information - - end subroutine rrtmgp_lw_main_run - - subroutine rrtmgp_lw_main_finalize() - end subroutine rrtmgp_lw_main_finalize - - - -end module rrtmgp_lw_main diff --git a/physics/rrtmgp_sw.F90 b/physics/rrtmgp_sw.F90 index 0961a0086..3a5440bae 100644 --- a/physics/rrtmgp_sw.F90 +++ b/physics/rrtmgp_sw.F90 @@ -675,26 +675,29 @@ end subroutine rrtmgp_sw_init !! | p_lev | air_pressure_at_interface_for_radiation_in_hPa | air pressure level | hPa | 2 | real | kind_phys | in | F | !! | t_lay | air_temperature_at_layer_for_radiation | air temperature layer | K | 2 | real | kind_phys | in | F | !! | kdist_sw | K_distribution_file_for_RRTMGP_SW_scheme | DDT containing spectral information for RRTMGP SW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | -!! | optical_propsSW_clds | shortwave_optical_properties_for_cloudy_atmosphere | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_2str | | in | F | -!! | optical_propsSW_aerosol | shortwave_optical_properties_for_aerosols | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_2str | | in | F | -!! | gas_concentrations | Gas_concentrations_for_RRTMGP_suite_sw | DDT containing gas concentrations for RRTMGP radiation scheme | DDT | 0 | ty_gas_concs | | in | F | +!! | optical_props_clds | shortwave_optical_properties_for_cloudy_atmosphere | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_2str | | in | F | +!! | optical_props_aerosol | shortwave_optical_properties_for_aerosols | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_2str | | in | F | +!! | gas_concentrations | Gas_concentrations_for_RRTMGP_suite | DDT containing gas concentrations for RRTMGP radiation scheme | DDT | 0 | ty_gas_concs | | in | F | !! | lsswr | flag_to_calc_sw | flag to calculate SW irradiances | flag | 0 | logical | | in | F | -!! | sfcalb_nir_dir | surface_shortwave_albedo_near_infrared_direct_in_each_band | surface sw near-infrared direct albedo in each SW band | frac | 2 | real | kind_phys | out | F | -!! | sfcalb_nir_dif | surface_shortwave_albedo_near_infrared_diffuse_in_each_band | surface sw near-infrared diffuse albedo in each SW band | frac | 2 | real | kind_phys | out | F | +!! | sfcalb_nir_dir | surface_shortwave_albedo_near_infrared_direct_in_each_band | surface sw near-infrared direct albedo in each SW band | frac | 2 | real | kind_phys | in | F | +!! | sfcalb_nir_dif | surface_shortwave_albedo_near_infrared_diffuse_in_each_band | surface sw near-infrared diffuse albedo in each SW band | frac | 2 | real | kind_phys | in | F | !! | cossza | cosine_of_zenith_angle | cosine of the solar zenit angle | none | 1 | real | kind_phys | in | F | !! | nday | daytime_points_dimension | daytime points dimension | count | 0 | integer | | in | F | !! | idxday | daytime_points | daytime points | index | 1 | integer | | in | F | -!! | fluxSW_allsky | sw_flux_profiles_byband_allsky | Fortran DDT containing RRTMGP 3D fluxes | DDT | 0 | ty_fluxes_byband | | out | F | -!! | fluxSW_clrsky | sw_flux_profiles_byband_clrsky | Fortran DDT containing RRTMGP 3D fluxes | DDT | 0 | ty_fluxes_byband | | out | F | -!! | hsw0 | tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_time_step | shortwave clear sky heating rate | K s-1 | 2 | real | kind_phys | in | T | -!! | hswb | sw_heating_rate_spectral | shortwave total sky heating rate (spectral) | K s-1 | 3 | real | kind_phys | in | T | -!! | scmpsw | components_of_surface_downward_shortwave_fluxes | derived type for special components of surface downward shortwave fluxes | W m-2 | 1 | cmpfsw_type | | inout | F | +!! | hsw0 | tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_time_step | shortwave clear sky heating rate | K s-1 | 2 | real | kind_phys | inout | T | +!! | hswb | sw_heating_rate_spectral | shortwave total sky heating rate (spectral) | K s-1 | 3 | real | kind_phys | inout | T | +!! | scmpsw | components_of_surface_downward_shortwave_fluxes | derived type for special components of surface downward shortwave fluxes | W m-2 | 1 | cmpfsw_type | | inout | T | +!! | fluxUP_allsky | sw_flux_profile_upward_allsky | RRTMGP upward shortwave all-sky flux profile | W m-2 | 2 | real | kind_phys | out | F | +!! | fluxDOWN_allsky | sw_flux_profile_downward_allsky | RRTMGP downward shortwave all-sky flux profile | W m-2 | 2 | real | kind_phys | out | F | +!! | fluxUP_clrsky | sw_flux_profile_upward_clrsky | RRTMGP upward shortwave clr-sky flux profile | W m-2 | 2 | real | kind_phys | out | F | +!! | fluxDOWN_clrsky | sw_flux_profile_downward_clrsky | RRTMGP downward shortwave clr-sky flux profile | W m-2 | 2 | real | kind_phys | out | F | !! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | !! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | !! subroutine rrtmgp_sw_run(ncol, nlay, kdist_sw, p_lay, t_lay, p_lev, gas_concentrations, & - optical_propsSW_clds, optical_propsSW_aerosol,& - lsswr, sfcalb_nir_dir, sfcalb_nir_dif, cossza, nday, idxday, fluxSW_allsky, fluxSW_clrsky, hsw0, hswb, scmpsw, errmsg, errflg) + optical_props_clds, optical_props_aerosol,& + lsswr, sfcalb_nir_dir, sfcalb_nir_dif, cossza, nday, idxday, hsw0, hswb, scmpsw, & + fluxUP_allsky, fluxDOWN_allsky, fluxUP_clrsky, fluxDOWN_clrsky, errmsg, errflg) ! Inputs integer, intent(in) :: & @@ -716,8 +719,8 @@ subroutine rrtmgp_sw_run(ncol, nlay, kdist_sw, p_lay, t_lay, p_lev, gas_concentr real(kind_phys), dimension(ncol), intent(in) :: & cossza ! Cosine of solar zenith angle (1) type(ty_optical_props_2str),intent(in) :: & - optical_propsSW_clds, & ! RRTMGP DDT: longwave cloud radiative properties - optical_propsSW_aerosol ! RRTMGP DDT: longwave aerosol radiative properties + optical_props_clds, & ! RRTMGP DDT: longwave cloud radiative properties + optical_props_aerosol ! RRTMGP DDT: longwave aerosol radiative properties type(ty_gas_concs),intent(in) :: & gas_concentrations ! RRTMGP DDT: trace gas concentrations (vmr) @@ -727,17 +730,19 @@ subroutine rrtmgp_sw_run(ncol, nlay, kdist_sw, p_lay, t_lay, p_lev, gas_concentr ! Outputs character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg - type(ty_fluxes_byband),intent(out) :: & - fluxSW_allsky, & ! All-sky flux (W/m2) - fluxSW_clrsky ! Clear-sky flux (W/m2) + real(kind_phys), dimension(ncol,nlay), intent(out) :: & + fluxUP_allsky, & ! All-sky flux (W/m2) + fluxDOWN_allsky, & ! All-sky flux (W/m2) + fluxUP_clrsky, & ! Clear-sky flux (W/m2) + fluxDOWN_clrsky ! All-sky flux (W/m2) ! Inputs (optional) (NOTE. We only need the optional arguments to know what fluxes to output, HR's are computed later) - real(kind_phys), dimension(ncol,nlay), optional, intent(in) :: & + real(kind_phys), dimension(ncol,nlay), optional, intent(inout) :: & hsw0 ! Clear-sky heating rate (K/sec) - real(kind_phys), dimension(ncol,nlay,kdist_sw%get_nband()), intent(in), optional :: & + real(kind_phys), dimension(ncol,nlay,kdist_sw%get_nband()), intent(inout), optional :: & hswb ! All-sky heating rate, by band (K/sec) ! Outputs (optional) - type(cmpfsw_type), dimension(ncol), intent(out),optional :: & + type(cmpfsw_type), dimension(ncol), intent(inout),optional :: & scmpsw ! 2D surface fluxes, components: ! uvbfc - total sky downward uv-b flux at (W/m2) ! uvbf0 - clear sky downward uv-b flux at (W/m2) @@ -746,17 +751,27 @@ subroutine rrtmgp_sw_run(ncol, nlay, kdist_sw, p_lay, t_lay, p_lev, gas_concentr ! visbm - downward uv+vis direct beam flux (W/m2) ! visdf - downward uv+vis diffused flux (W/m2) - ! Local variables + type(ty_fluxes_byband) :: & + flux_allsky, & ! All-sky flux (W/m2) + flux_clrsky ! Clear-sky flux (W/m2) real(kind_phys), dimension(nday,nlay+1),target :: & fluxSW_up_allsky, fluxSW_up_clrsky, fluxSW_dn_allsky, fluxSW_dn_clrsky real(kind_phys), dimension(nday,nlay+1,kdist_sw%get_nband()),target :: & fluxSWBB_up_allsky, fluxSWBB_dn_allsky + real(kind_phys), dimension(ncol,nlay) :: vmrTemp logical :: l_ClrSky_HR=.false., l_AllSky_HR_byband=.false., l_scmpsw=.false. + integer :: k, iGas + type(ty_optical_props_2str) :: & + optical_props_clds_daylit, & ! RRTMGP DDT: longwave cloud radiative properties + optical_props_aerosol_daylit ! RRTMGP DDT: longwave aerosol radiative properties + type(ty_gas_concs) :: & + gas_concentrations_daylit ! RRTMGP DDT: trace gas concentrations (vmr) ! Initialize CCPP error handling variables errmsg = '' - errflg = 0 + errflg = 0 + if (.not. lsswr) return ! Are any optional outputs requested? Need to know now to compute correct fluxes. @@ -766,39 +781,66 @@ subroutine rrtmgp_sw_run(ncol, nlay, kdist_sw, p_lay, t_lay, p_lev, gas_concentr if ( l_scmpsw ) then scmpsw = cmpfsw_type (0., 0., 0., 0., 0., 0.) endif + fluxUP_allsky(:,:) = 0._kind_phys + fluxDOWN_allsky(:,:) = 0._kind_phys + fluxUP_clrsky(:,:) = 0._kind_phys + fluxDOWN_clrsky(:,:) = 0._kind_phys if (nDay .gt. 0) then + + ! Subset the cloud and aerosol radiative properties over daylit points. + ! Cloud optics [nDay,nLay,nBands] + call check_error_msg('rrtmgp_sw_run',optical_props_clds_daylit%alloc_2str(nday, nlay, kdist_sw)) + optical_props_clds_daylit%tau = optical_props_clds%tau(idxday,:,:) + optical_props_clds_daylit%ssa = optical_props_clds%ssa(idxday,:,:) + optical_props_clds_daylit%g = optical_props_clds%g(idxday,:,:) + ! Aerosol optics [nDay,nLay,nBands] + call check_error_msg('rrtmgp_sw_run',optical_props_aerosol_daylit%alloc_2str(nday, nlay, kdist_sw%get_band_lims_wavenumber())) + optical_props_aerosol_daylit%tau = optical_props_aerosol%tau(idxday,:,:) + optical_props_aerosol_daylit%ssa = optical_props_aerosol%ssa(idxday,:,:) + optical_props_aerosol_daylit%g = optical_props_aerosol%g(idxday,:,:) + + ! Similarly, subset the gas concentrations. + do iGas=1,nGases + call check_error_msg('rrtmgp_sw_run',gas_concentrations%get_vmr(trim(active_gases(iGas)),vmrTemp)) + call check_error_msg('rrtmgp_sw_run',gas_concentrations_daylit%set_vmr(active_gases(iGas),vmrTemp(idxday,:))) + enddo + ! Initialize RRTMGP DDT containing 2D(3D) fluxes - fluxSW_allsky%flux_up => fluxSW_up_allsky - fluxSW_allsky%flux_dn => fluxSW_dn_allsky - fluxSW_clrsky%flux_up => fluxSW_up_clrsky - fluxSW_clrsky%flux_dn => fluxSW_dn_clrsky + flux_allsky%flux_up => fluxSW_up_allsky + flux_allsky%flux_dn => fluxSW_dn_allsky + flux_clrsky%flux_up => fluxSW_up_clrsky + flux_clrsky%flux_dn => fluxSW_dn_clrsky ! Only calculate fluxes by-band, only when heating-rate profiles by band are requested. if (l_AllSky_HR_byband) then - fluxSW_allsky%bnd_flux_up => fluxSWBB_up_allsky - fluxSW_allsky%bnd_flux_dn => fluxSWBB_dn_allsky + flux_allsky%bnd_flux_up => fluxSWBB_up_allsky + flux_allsky%bnd_flux_dn => fluxSWBB_dn_allsky endif ! Call RRTMGP SW scheme call check_error_msg('rrtmgp_sw_run',rte_sw( & - kdist_sw, & ! IN - spectral information - gas_concentrations, & ! IN - gas concentrations (vmr) - p_lay(idxday,1:nlay), & ! IN - pressure at layer interfaces (Pa) - t_lay(idxday,1:nlay), & ! IN - temperature at layer interfaes (K) - p_lev(idxday,1:nlay+1), & ! IN - pressure at layer centers (Pa) - cossza(idxday), & ! IN - Cosine of solar zenith angle - sfcalb_nir_dir(:,idxday), & ! IN - Shortwave surface albedo (direct) - sfcalb_nir_dif(:,idxday), & ! IN - Shortwave surface albedo (diffuse) - optical_propsSW_clds, & ! IN - DDT containing cloud optical information - fluxSW_allsky, & ! OUT - Fluxes, all-sky, 3D (nCol,nLay,nBand) - fluxSW_clrsky, & ! OUT - Fluxes, clear-sky, 3D (nCol,nLay,nBand) - aer_props = optical_propsSW_aerosol)) ! IN(optional) - DDT containing aerosol optical information + kdist_sw, & ! IN - spectral information + gas_concentrations_daylit, & ! IN - gas concentrations (vmr) + p_lay(idxday,1:nlay), & ! IN - pressure at layer interfaces (Pa) + t_lay(idxday,1:nlay), & ! IN - temperature at layer interfaes (K) + p_lev(idxday,1:nlay+1), & ! IN - pressure at layer centers (Pa) + cossza(idxday), & ! IN - Cosine of solar zenith angle + sfcalb_nir_dir(:,idxday), & ! IN - Shortwave surface albedo (direct) + sfcalb_nir_dif(:,idxday), & ! IN - Shortwave surface albedo (diffuse) + optical_props_clds_daylit, & ! IN - DDT containing cloud optical information + flux_allsky, & ! OUT - Fluxes, all-sky, 3D (nCol,nLay,nBand) + flux_clrsky, & ! OUT - Fluxes, clear-sky, 3D (nCol,nLay,nBand) + aer_props = optical_props_aerosol_daylit)) ! IN(optional) - DDT containing aerosol optical information + fluxUP_allsky(idxday,:) = flux_allsky%flux_up + fluxDOWN_allsky(idxday,:) = flux_allsky%flux_dn + fluxUP_clrsky(idxday,:) = flux_clrsky%flux_up + fluxDOWN_clrsky(idxday,:) = flux_clrsky%flux_dn endif - end subroutine rrtmgp_sw_run subroutine rrtmgp_sw_finalize() end subroutine rrtmgp_sw_finalize + subroutine check_error_msg(routine_name, error_msg) character(len=*), intent(in) :: & error_msg, routine_name @@ -808,7 +850,5 @@ subroutine check_error_msg(routine_name, error_msg) print*,trim(error_msg) return end if - end subroutine check_error_msg - - + end subroutine check_error_msg end module rrtmgp_sw diff --git a/physics/rrtmgp_sw_pre.F90 b/physics/rrtmgp_sw_pre.F90 index ba9b1d054..4f3fefa5f 100644 --- a/physics/rrtmgp_sw_pre.F90 +++ b/physics/rrtmgp_sw_pre.F90 @@ -1,118 +1,115 @@ !>\file rrtmgp_sw_pre.f90 !! This file contains a subroutine to module_radiation_surface::setalb() to !! setup surface albedo for SW radiation. - module rrtmgp_sw_pre - contains - -!>\defgroup rrtmgp_sw_pre GFS RRTMGP scheme Pre -!! @{ -!> \section arg_table_rrtmgp_sw_pre_init Argument Table -!! - subroutine rrtmgp_sw_pre_init () - end subroutine rrtmgp_sw_pre_init +module rrtmgp_sw_pre + use machine, only: kind_phys + use GFS_typedefs, only: GFS_control_type, & + GFS_grid_type, & + GFS_radtend_type, & + GFS_sfcprop_type + use module_radiation_surface, only: NF_ALBD, setalb + use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp + implicit none +contains + + subroutine rrtmgp_sw_pre_init () + end subroutine rrtmgp_sw_pre_init !> \section arg_table_rrtmgp_sw_pre_run Argument Table -!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | -!! |----------------|-------------------------------------------|--------------------------------------------------------------------|----------|------|------------------|-----------|--------|----------| -!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | -!! | Grid | GFS_grid_type_instance | Fortran DDT containing FV3-GFS grid and interpolation related data | DDT | 0 | GFS_grid_type | | in | F | -!! | Sfcprop | GFS_sfcprop_type_instance | Fortran DDT containing FV3-GFS surface fields | DDT | 0 | GFS_sfcprop_type | | in | F | -!! | Radtend | GFS_radtend_type_instance | Fortran DDT containing FV3-GFS radiation tendencies | DDT | 0 | GFS_radtend_type | | inout | F | -!! | im | horizontal_loop_extent | horizontal loop extent | count | 0 | integer | | in | F | -!! | nday | daytime_points_dimension | daytime points dimension | count | 0 | integer | | out | F | -!! | idxday | daytime_points | daytime points | index | 1 | integer | | out | F | -!! | tsfg | surface_ground_temperature_for_radiation | surface ground temperature for radiation | K | 1 | real | kind_phys | in | F | -!! | tsfa | surface_air_temperature_for_radiation | lowest model layer air temperature for radiation | K | 1 | real | kind_phys | in | F | -!! | sfcalb1 | surface_albedo_due_to_near_IR_direct | surface albedo due to near IR direct beam | frac | 1 | real | kind_phys | out | F | -!! | sfcalb2 | surface_albedo_due_to_near_IR_diffused | surface albedo due to near IR diffused beam | frac | 1 | real | kind_phys | out | F | -!! | sfcalb3 | surface_albedo_due_to_UV_and_VIS_direct | surface albedo due to UV+VIS direct beam | frac | 1 | real | kind_phys | out | F | -!! | sfcalb4 | surface_albedo_due_to_UV_and_VIS_diffused | surface albedo due to UV+VIS diffused beam | frac | 1 | real | kind_phys | out | F | -!! | alb1d | surface_albedo_perturbation | surface albedo perturbation | frac | 1 | real | kind_phys | in | F | -!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | -!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | +!! |-----------------------|-------------------------------------------------------------|--------------------------------------------------------------------|----------|------|----------------------|-----------|--------|----------| +!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | +!! | Grid | GFS_grid_type_instance | Fortran DDT containing FV3-GFS grid and interpolation related data | DDT | 0 | GFS_grid_type | | in | F | +!! | Sfcprop | GFS_sfcprop_type_instance | Fortran DDT containing FV3-GFS surface fields | DDT | 0 | GFS_sfcprop_type | | in | F | +!! | Radtend | GFS_radtend_type_instance | Fortran DDT containing FV3-GFS radiation tendencies | DDT | 0 | GFS_radtend_type | | inout | F | +!! | im | horizontal_loop_extent | horizontal loop extent | count | 0 | integer | | in | F | +!! | nday | daytime_points_dimension | daytime points dimension | count | 0 | integer | | out | F | +!! | idxday | daytime_points | daytime points | index | 1 | integer | | out | F | +!! | tsfg | surface_ground_temperature_for_radiation | surface ground temperature for radiation | K | 1 | real | kind_phys | in | F | +!! | tsfa | surface_air_temperature_for_radiation | lowest model layer air temperature for radiation | K | 1 | real | kind_phys | in | F | +!! | kdist_sw | K_distribution_file_for_RRTMGP_SW_scheme | DDT containing spectral information for RRTMGP SW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | +!! | sfc_alb_nir_dir | surface_shortwave_albedo_near_infrared_direct_in_each_band | surface sw near-infrared direct albedo in each SW band | frac | 2 | real | kind_phys | out | F | +!! | sfc_alb_nir_dif | surface_shortwave_albedo_near_infrared_diffuse_in_each_band | surface sw near-infrared diffuse albedo in each SW band | frac | 2 | real | kind_phys | out | F | +!! | sfc_alb_uvvis_dir | surface_shortwave_albedo_uv_visible_direct_in_each_band | surface sw uv-visible direct albedo in each SW band | frac | 2 | real | kind_phys | out | F | +!! | sfc_alb_uvvis_dif | surface_shortwave_albedo_uv_visible_diffuse_in_each_band | surface sw uv-visible diffuse albedo in each SW band | frac | 2 | real | kind_phys | out | F | +!! | alb1d | surface_albedo_perturbation | surface albedo perturbation | frac | 1 | real | kind_phys | in | F | +!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | +!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | !! - subroutine rrtmgp_sw_pre_run (Model, Grid, Sfcprop, Radtend, im, & - nday, idxday, tsfg, tsfa, sfcalb1, sfcalb2, sfcalb3, sfcalb4, & - alb1d, errmsg, errflg) - - use machine, only: kind_phys - - use GFS_typedefs, only: GFS_control_type, & - GFS_grid_type, & - GFS_radtend_type, & - GFS_sfcprop_type - use module_radiation_surface, only: NF_ALBD, setalb - - implicit none - - type(GFS_control_type), intent(in) :: Model - type(GFS_radtend_type), intent(inout) :: Radtend - type(GFS_sfcprop_type), intent(in) :: Sfcprop - type(GFS_grid_type), intent(in) :: Grid - integer, intent(in) :: im - integer, intent(out) :: nday - integer, dimension(size(Grid%xlon,1)), intent(out) :: idxday - real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(in) :: tsfa, tsfg - real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(out) :: sfcalb1, sfcalb2, sfcalb3, sfcalb4 - real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(in) :: alb1d - character(len=*), intent(out) :: errmsg - integer, intent(out) :: errflg - ! Local variables - integer :: i - real(kind=kind_phys), dimension(size(Grid%xlon,1),NF_ALBD) :: sfcalb - - ! Initialize CCPP error handling variables - errmsg = '' - errflg = 0 - -! --- ... start radiation calculations -! remember to set heating rate unit to k/sec! -!> -# Start SW radiation calculations - if (Model%lsswr) then - -!> - Check for daytime points for SW radiation. - nday = 0 - idxday = 0 - do i = 1, IM + subroutine rrtmgp_sw_pre_run (Model, Grid, Sfcprop, Radtend, im, kdist_sw, & + nday, idxday, tsfg, tsfa, sfc_alb_nir_dir, sfc_alb_nir_dif, sfc_alb_uvvis_dir, & + sfc_alb_uvvis_dif, alb1d, errmsg, errflg) + + ! Inputs + type(ty_gas_optics_rrtmgp),intent(in) :: & + kdist_sw ! RRTMGP DDT containing spectral information for SW calculation + type(GFS_control_type), intent(in) :: Model + type(GFS_radtend_type), intent(inout) :: Radtend + type(GFS_sfcprop_type), intent(in) :: Sfcprop + type(GFS_grid_type), intent(in) :: Grid + integer, intent(in) :: im + integer, intent(out) :: nday + integer, dimension(size(Grid%xlon,1)), intent(out) :: idxday + real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(in) :: tsfa, tsfg + real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(in) :: alb1d + + ! Outputs + real(kind_phys),dimension(kdist_sw%get_nband(),IM),intent(out) :: & + sfc_alb_nir_dir, & ! Shortwave surface albedo (nIR-direct) + sfc_alb_nir_dif, & ! Shortwave surface albedo (nIR-diffuse) + sfc_alb_uvvis_dir, & ! Shortwave surface albedo (uvvis-direct) + sfc_alb_uvvis_dif ! Shortwave surface albedo (uvvis-diffuse) + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + + ! Local variables + integer :: i, iBand + real(kind=kind_phys), dimension(size(Grid%xlon,1),NF_ALBD) :: sfcalb + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + + if (Model%lsswr) then + ! Check for daytime points for SW radiation. + nday = 0 + idxday = 0 + do i = 1, IM if (Radtend%coszen(i) >= 0.0001) then - nday = nday + 1 - idxday(nday) = i + nday = nday + 1 + idxday(nday) = i endif - enddo - -!> - Call module_radiation_surface::setalb() to setup surface albedo. -!! for SW radiation. - - call setalb (Sfcprop%slmsk, Sfcprop%snowd, Sfcprop%sncovr,& ! --- inputs: - Sfcprop%snoalb, Sfcprop%zorl, Radtend%coszen,& - tsfg, tsfa, Sfcprop%hprim, Sfcprop%alvsf, & - Sfcprop%alnsf, Sfcprop%alvwf, Sfcprop%alnwf, & - Sfcprop%facsf, Sfcprop%facwf, Sfcprop%fice, & - Sfcprop%tisfc, IM, & - alb1d, Model%pertalb, & ! mg, sfc-perts - sfcalb) ! --- outputs - -!> -# Approximate mean surface albedo from vis- and nir- diffuse values. - Radtend%sfalb(:) = max(0.01, 0.5 * (sfcalb(:,2) + sfcalb(:,4))) - else - nday = 0 - idxday = 0 - sfcalb = 0.0 - endif - - do i = 1, im - sfcalb1(i) = sfcalb(i,1) - sfcalb2(i) = sfcalb(i,2) - sfcalb3(i) = sfcalb(i,3) - sfcalb4(i) = sfcalb(i,4) - enddo - - end subroutine rrtmgp_sw_pre_run - -!> \section arg_table_rrtmgp_sw_pre_finalize Argument Table -!! - subroutine rrtmgp_sw_pre_finalize () - end subroutine rrtmgp_sw_pre_finalize - -!! @} - end module rrtmgp_sw_pre + enddo + + ! Call module_radiation_surface::setalb() to setup surface albedo. + call setalb (Sfcprop%slmsk, Sfcprop%snowd, Sfcprop%sncovr,& ! --- inputs: + Sfcprop%snoalb, Sfcprop%zorl, Radtend%coszen,& + tsfg, tsfa, Sfcprop%hprim, Sfcprop%alvsf, & + Sfcprop%alnsf, Sfcprop%alvwf, Sfcprop%alnwf, & + Sfcprop%facsf, Sfcprop%facwf, Sfcprop%fice, & + Sfcprop%tisfc, IM, & + alb1d, Model%pertalb, & ! mg, sfc-perts + sfcalb) ! --- outputs + + ! Approximate mean surface albedo from vis- and nir- diffuse values. + Radtend%sfalb(:) = max(0.01, 0.5 * (sfcalb(:,2) + sfcalb(:,4))) + else + nday = 0 + idxday = 0 + sfcalb = 0.0 + endif + + ! Spread across all SW bands + do iBand=1,kdist_sw%get_nband() + sfc_alb_nir_dir(iBand,1:IM) = sfcalb(1:IM,1) + sfc_alb_nir_dif(iBand,1:IM) = sfcalb(1:IM,2) + sfc_alb_uvvis_dir(iBand,1:IM) = sfcalb(1:IM,3) + sfc_alb_uvvis_dif(iBand,1:IM) = sfcalb(1:IM,4) + enddo + + end subroutine rrtmgp_sw_pre_run + + subroutine rrtmgp_sw_pre_finalize () + end subroutine rrtmgp_sw_pre_finalize + +end module rrtmgp_sw_pre diff --git a/physics/rte-rrtmgp b/physics/rte-rrtmgp index 929bf9df4..8c3dac82c 160000 --- a/physics/rte-rrtmgp +++ b/physics/rte-rrtmgp @@ -1 +1 @@ -Subproject commit 929bf9df4983d1721270826a9b32b123ead1f48c +Subproject commit 8c3dac82c8de6c1575d3d89abd9314cef6edb95e From f5dc37a072cc7c68487657d4f70a787b2c13c60a Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Thu, 30 May 2019 16:46:06 -0600 Subject: [PATCH 028/167] Remover extra-layer from GFS_rrtmgp_pre_run(). --- physics/GFS_rrtmgp_lw.F90 | 190 +++++++ physics/GFS_rrtmgp_post.F90 | 111 ++--- physics/GFS_rrtmgp_pre.F90 | 952 ++++++++++++++++++------------------ physics/GFS_rrtmgp_sw.F90 | 187 +++++++ physics/rrtmgp_lw.F90 | 32 +- physics/rrtmgp_sw.F90 | 46 +- physics/rrtmgp_sw_post.F90 | 154 ------ 7 files changed, 937 insertions(+), 735 deletions(-) create mode 100644 physics/GFS_rrtmgp_lw.F90 create mode 100644 physics/GFS_rrtmgp_sw.F90 delete mode 100644 physics/rrtmgp_sw_post.F90 diff --git a/physics/GFS_rrtmgp_lw.F90 b/physics/GFS_rrtmgp_lw.F90 new file mode 100644 index 000000000..1accf7377 --- /dev/null +++ b/physics/GFS_rrtmgp_lw.F90 @@ -0,0 +1,190 @@ +module GFS_rrtmgp_lw + use GFS_typedefs, only: GFS_control_type + use machine, only: kind_phys + use physparam, only: isubclw, iovrlw + use rrtmgp_lw, only: nrghice_lw => nrghice, ipsdlw0 + use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp + use mo_cloud_optics, only: ty_cloud_optics + use mo_optical_props, only: ty_optical_props_1scl, ty_optical_props_2str + use mo_cloud_sampling, only: sampled_mask_max_ran, sampled_mask_exp_ran, draw_samples + use mo_gas_concentrations, only: ty_gas_concs + use mersenne_twister, only: random_setseed, random_number, random_stat + + public GFS_rrtmgp_lw_run,GFS_rrtmgp_lw_init,GFS_rrtmgp_lw_finalize + +contains + + subroutine GFS_rrtmgp_lw_init() + end subroutine GFS_rrtmgp_lw_init + ! ######################################################################################### + ! ######################################################################################### +!! \section arg_table_GFS_rrtmgp_lw_run Argument Table +!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | +!! |-----------------------|-----------------------------------------------------|------------------------------------------------------------------------------|---------|------|-----------------------|-----------|--------|----------| +!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | +!! | ncol | horizontal_loop_extent | horizontal dimension | count | 0 | integer | | in | F | +!! | p_lay | air_pressure_at_layer_for_RRTMGP_in_hPa | air pressure layer | hPa | 2 | real | kind_phys | in | F | +!! | t_lay | air_temperature_at_layer_for_RRTMGP | air temperature layer | K | 2 | real | kind_phys | in | F | +!! | p_lev | air_pressure_at_interface_for_RRTMGP_in_hPa | air pressure level | hPa | 2 | real | kind_phys | in | F | +!! | cld_frac | total_cloud_fraction | layer total cloud fraction | frac | 2 | real | kind_phys | in | F | +!! | cld_lwp | cloud_liquid_water_path | layer cloud liquid water path | g m-2 | 2 | real | kind_phys | in | F | +!! | cld_reliq | mean_effective_radius_for_liquid_cloud | mean effective radius for liquid cloud | micron | 2 | real | kind_phys | in | F | +!! | cld_iwp | cloud_ice_water_path | layer cloud ice water path | g m-2 | 2 | real | kind_phys | in | F | +!! | cld_reice | mean_effective_radius_for_ice_cloud | mean effective radius for ice cloud | micron | 2 | real | kind_phys | in | F | +!! | gas_concentrations | Gas_concentrations_for_RRTMGP_suite | DDT containing gas concentrations for RRTMGP radiation scheme | DDT | 0 | ty_gas_concs | | in | F | +!! | icseed_lw | seed_random_numbers_sw | seed for random number generation for shortwave radiation | none | 1 | integer | | in | F | +!! | kdist_lw | K_distribution_file_for_RRTMGP_LW_scheme | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | +!! | aerosols | aerosol_optical_properties_for_longwave_bands_01-16 | aerosol optical properties for longwave bands 01-16 | various | 4 | real | kind_phys | in | F | +!! | kdist_cldy_lw | K_distribution_file_for_cloudy_RRTMGP_LW_scheme | DDT containing spectral information for cloudy RRTMGP LW radiation scheme | DDT | 0 | ty_cloud_optics | | in | F | +!! | optical_props_clouds | longwave_optical_properties_for_cloudy_atmosphere | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_1scl | | out | F | +!! | optical_props_aerosol | longwave_optical_properties_for_aerosols | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_1scl | | out | F | +!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | +!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! + ! ######################################################################################### + ! ######################################################################################### + subroutine GFS_rrtmgp_lw_run(Model, ncol, icseed_lw, p_lay, t_lay, p_lev, cld_frac, & + cld_lwp, cld_reliq, cld_iwp, cld_reice, gas_concentrations, kdist_lw, aerosols, & + kdist_cldy_lw, optical_props_clouds, optical_props_aerosol, errmsg, errflg) + + ! Inputs + type(GFS_control_type), intent(in) :: & + Model + integer, intent(in) :: & + ncol ! Number of horizontal gridpoints + integer,intent(in),dimension(ncol) :: & + icseed_lw ! auxiliary special cloud related array when module + ! variable isubclw=2, it provides permutation seed + ! for each column profile that are used for generating + ! random numbers. when isubclw /=2, it will not be used. + real(kind_phys), dimension(ncol,model%levs), intent(in) :: & + p_lay, & ! Pressure @ model layer-centers (hPa) + t_lay ! Temperature (K) + real(kind_phys), dimension(ncol,model%levs+1), intent(in) :: & + p_lev ! Pressure @ model layer-interfaces (hPa) + real(kind_phys), dimension(ncol,model%levs),intent(in) :: & + cld_frac, & ! Total cloud fraction by layer + cld_lwp, & ! Cloud liquid water path + cld_reliq, & ! Cloud liquid effective radius + cld_iwp, & ! Cloud ice water path + cld_reice ! Cloud ice effective radius + type(ty_gas_concs),intent(in) :: & + gas_concentrations ! + type(ty_gas_optics_rrtmgp),intent(in) :: & + kdist_lw ! RRTMGP DDT containing spectral information for LW calculation + type(ty_cloud_optics),intent(in) :: & + kdist_cldy_lw ! + real(kind_phys), intent(in),dimension(ncol, model%levs, kdist_lw%get_nband(),3) :: & + aerosols ! + + ! Outputs + type(ty_optical_props_1scl),intent(out) :: & + optical_props_clouds, & + optical_props_aerosol + integer, intent(out) :: errflg + character(len=*), intent(out) :: errmsg + + ! Local variables + integer :: iCol + integer,dimension(ncol) :: ipseed_lw + logical,dimension(ncol,model%levs) :: liqmask, icemask + type(ty_optical_props_1scl) :: optical_props_cloudsByBand + type(random_stat) :: rng_stat + real(kind_phys), dimension(kdist_lw%get_ngpt(),model%levs,ncol) :: rng3D + real(kind_phys), dimension(kdist_lw%get_ngpt()*model%levs) :: rng1D + logical, dimension(ncol,model%levs,kdist_lw%get_ngpt()) :: cldfracMCICA + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + + if (.not. Model%lslwr) return + + ! ####################################################################################### + ! Change random number seed value for each radiation invocation (isubclw =1 or 2). + ! ####################################################################################### + if(isubclw == 1) then ! advance prescribed permutation seed + do iCol = 1, nCol + ipseed_lw(iCol) = ipsdlw0 + iCol + enddo + elseif (isubclw == 2) then ! use input array of permutaion seeds + do iCol = 1, nCol + ipseed_lw(iCol) = icseed_lw(iCol) + enddo + endif + + ! ####################################################################################### + ! Compute ice/liquid cloud masks, needed by rrtmgp_cloud_optics + ! ####################################################################################### + liqmask = (cld_frac .gt. 0 .and. cld_lwp .gt. 0) + icemask = (cld_frac .gt. 0 .and. cld_iwp .gt. 0) + + ! ####################################################################################### + ! Allocate space for RRTMGP DDTs containing cloud and aerosol radiative properties + ! ####################################################################################### + ! Cloud optics [nCol,model%levs,nBands] + call check_error_msg('GFS_rrtmgp_lw_run',optical_props_cloudsByBand%alloc_1scl(ncol, model%levs, kdist_lw%get_band_lims_wavenumber())) + ! Aerosol optics [Ccol,model%levs,nBands] + call check_error_msg('GFS_rrtmgp_lw_run',optical_props_aerosol%alloc_1scl(ncol, model%levs, kdist_lw%get_band_lims_wavenumber())) + ! Cloud optics [nCol,model%levs,nGpts] + call check_error_msg('GFS_rrtmgp_lw_run',optical_props_clouds%alloc_1scl(ncol, model%levs, kdist_lw)) + + ! ####################################################################################### + ! Copy aerosol optical information to RRTMGP DDT + ! ####################################################################################### + optical_props_aerosol%tau = aerosols(:,:,:,1) * (1. - aerosols(:,:,:,2)) + + ! ####################################################################################### + ! Compute cloud-optics for RTE. + ! ####################################################################################### + call check_error_msg('GFS_rrtmgp_lw_run',kdist_cldy_lw%cloud_optics(& + ncol, & ! IN - Number of horizontal gridpoints + model%levs, & ! IN - Number of vertical layers + kdist_lw%get_nband(), & ! IN - Number of LW bands + nrghice_lw, & ! IN - Number of ice-roughness categories + liqmask, & ! IN - Liquid-cloud mask + icemask, & ! IN - Ice-cloud mask + cld_lwp, & ! IN - Cloud liquid water path + cld_iwp, & ! IN - Cloud ice water path + cld_reliq, & ! IN - Cloud liquid effective radius + cld_reice, & ! IN - Cloud ice effective radius + optical_props_cloudsByBand)) ! OUT - RRTMGP DDT containing cloud radiative properties + ! in each band + + ! ####################################################################################### + ! Call McICA to generate subcolumns. + ! ####################################################################################### + ! Call RNG. Mersennse Twister accepts 1D array, so loop over columns and collapse along G-points + ! and layers. ([nGpts,model%levs,nColumn]-> [nGpts*model%levs]*nColumn) + do iCol=1,ncol + call random_setseed(ipseed_lw(icol),rng_stat) + call random_number(rng1D,rng_stat) + rng3D(:,:,iCol) = reshape(source = rng1D,shape=[kdist_lw%get_ngpt(),model%levs]) + enddo + + ! Call McICA + select case ( iovrlw ) + ! Maximumn-random + case(1) + call check_error_msg('GFS_rrtmgp_lw_run',sampled_mask_max_ran(rng3D,cld_frac,cldfracMCICA)) + end select + + ! Map band optical depth to each g-point using McICA + call check_error_msg('GFS_rrtmgp_lw_run',draw_samples(cldfracMCICA,optical_props_cloudsByBand,optical_props_clouds)) + + end subroutine GFS_rrtmgp_lw_run + + subroutine GFS_rrtmgp_lw_finalize() + end subroutine GFS_rrtmgp_lw_finalize + + subroutine check_error_msg(routine_name, error_msg) + character(len=*), intent(in) :: & + error_msg, routine_name + + if(error_msg /= "") then + print*,"ERROR("//trim(routine_name)//"): " + print*,trim(error_msg) + return + end if + end subroutine check_error_msg +end module GFS_rrtmgp_lw diff --git a/physics/GFS_rrtmgp_post.F90 b/physics/GFS_rrtmgp_post.F90 index b85852c60..3fc71dfb8 100644 --- a/physics/GFS_rrtmgp_post.F90 +++ b/physics/GFS_rrtmgp_post.F90 @@ -37,11 +37,6 @@ end subroutine GFS_rrtmgp_post_init !! | Coupling | GFS_coupling_type_instance | Fortran DDT containing FV3-GFS fields to/from coupling with other components | DDT | 0 | GFS_coupling_type | | inout | F | !! | scmpsw | components_of_surface_downward_shortwave_fluxes | derived type for special components of surface downward shortwave fluxes | W m-2 | 1 | cmpfsw_type | | inout | T | !! | im | horizontal_loop_extent | horizontal loop extent | count | 0 | integer | | in | F | -!! | lm | vertical_layer_dimension_for_radiation | number of vertical layers for radiation calculation | count | 0 | integer | | in | F | -!! | ltp | extra_top_layer | extra top layers | none | 0 | integer | | in | F | -!! | kt | vertical_index_difference_between_layer_and_upper_bound | vertical index difference between layer and upper bound | index | 0 | integer | | in | F | -!! | kb | vertical_index_difference_between_layer_and_lower_bound | vertical index difference between layer and lower bound | index | 0 | integer | | in | F | -!! | kd | vertical_index_difference_between_inout_and_local | vertical index difference between in/out and local | index | 0 | integer | | in | F | !! | raddt | time_step_for_radiation | radiation time step | s | 0 | real | kind_phys | in | F | !! | aerodp | atmosphere_optical_thickness_due_to_ambient_aerosol_particles | vertical integrated optical depth for various aerosol species | none | 2 | real | kind_phys | in | F | !! | cldsa | cloud_area_fraction_for_radiation | fraction of clouds for low, middle, high, total and BL | frac | 2 | real | kind_phys | in | F | @@ -51,7 +46,7 @@ end subroutine GFS_rrtmgp_post_init !! | cldtaulw | cloud_optical_depth_layers_at_10mu_band | approx 10mu band layer cloud optical depth | none | 2 | real | kind_phys | in | F | !! | cldtausw | cloud_optical_depth_layers_at_0.55mu_band | approx .55mu band layer cloud optical depth | none | 2 | real | kind_phys | in | F | !! | tsfa | surface_air_temperature_for_radiation | lowest model layer air temperature for radiation | K | 1 | real | kind_phys | in | F | -!! | p_lev | air_pressure_at_interface_for_radiation_in_hPa | air pressure level | hPa | 2 | real | kind_phys | in | F | +!! | p_lev | air_pressure_at_interface_for_RRTMGP_in_hPa | air pressure level | hPa | 2 | real | kind_phys | in | F | !! | nday | daytime_points_dimension | daytime points dimension | count | 0 | integer | | in | F | !! | idxday | daytime_points | daytime points | index | 1 | integer | | in | F | !! | fluxswUP_allsky | sw_flux_profile_upward_allsky | RRTMGP upward shortwave all-sky flux profile | W m-2 | 2 | real | kind_phys | in | F | @@ -82,7 +77,7 @@ end subroutine GFS_rrtmgp_post_init !! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | !! subroutine GFS_rrtmgp_post_run (Model, Grid, Diag, Radtend, Statein, & - Coupling, scmpsw, im, lm, ltp, kt, kb, kd, raddt, aerodp, & + Coupling, scmpsw, im, raddt, aerodp, & cldsa, mtopa, mbota, cloud_fraction, cldtaulw, cldtausw, p_lev, kdist_lw, kdist_sw, & sfc_alb_nir_dir, sfc_alb_nir_dif, sfc_alb_uvvis_dir, & sfc_alb_uvvis_dif, & @@ -103,14 +98,8 @@ subroutine GFS_rrtmgp_post_run (Model, Grid, Diag, Radtend, Statein, & Radtend ! Fortran DDT containing FV3-GFS radiation tendencies type(GFS_diag_type), intent(inout) :: & Diag ! Fortran DDT containing FV3-GFS diagnotics data - integer, intent(in) :: & im, & ! Horizontal loop extent - lm, & ! Number of vertical layers for radiation calculation - ltp, & ! Extra-top-layers - kt, & ! Vertical index difference between layer and upper bound - kb, & ! Vertical index difference between layer and upper bound - kd, & ! Vertical index difference between in/out and local nDay ! Number of daylit columns integer, intent(in), dimension(nday) :: & idxday ! Index array for daytime points @@ -125,21 +114,21 @@ subroutine GFS_rrtmgp_post_run (Model, Grid, Diag, Radtend, Statein, & integer, dimension(size(Grid%xlon,1),3), intent(in) ::& mbota, & ! vertical indices for low, middle and high cloud tops mtopa ! vertical indices for low, middle and high cloud bases - real(kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP), intent(in) :: & + real(kind_phys), dimension(size(Grid%xlon,1),Model%levs), intent(in) :: & cloud_fraction, & ! Total cloud fraction in each layer cldtausw, & ! approx .55mu band layer cloud optical depth cldtaulw ! approx 10mu band layer cloud optical depth type(ty_gas_optics_rrtmgp),intent(in) :: & kdist_lw, & ! DDT containing LW spectral information kdist_sw ! DDT containing SW spectral information - real(kind_phys), dimension(size(Grid%xlon,1), Model%levr+LTP+1), intent(in) :: & + real(kind_phys), dimension(size(Grid%xlon,1), Model%levs+1), intent(in) :: & p_lev ! Pressure @ model layer-interfaces (hPa) real(kind_phys),dimension(kdist_sw%get_nband(),size(Grid%xlon,1)),intent(in) :: & sfc_alb_nir_dir, & ! Shortwave surface albedo (nIR-direct) sfc_alb_nir_dif, & ! Shortwave surface albedo (nIR-diffuse) sfc_alb_uvvis_dir, & ! Shortwave surface albedo (uvvis-direct) sfc_alb_uvvis_dif ! Shortwave surface albedo (uvvis-diffuse) - real(kind_phys), dimension(size(Grid%xlon,1), Model%levr+LTP+1), intent(in) :: & + real(kind_phys), dimension(size(Grid%xlon,1), Model%levs+1), intent(in) :: & fluxswUP_allsky, & ! SW All-sky flux (W/m2) fluxswDOWN_allsky, & ! SW All-sky flux (W/m2) fluxswUP_clrsky, & ! SW Clear-sky flux (W/m2) @@ -154,7 +143,7 @@ subroutine GFS_rrtmgp_post_run (Model, Grid, Diag, Radtend, Statein, & errmsg integer, intent(out) :: & errflg - real(kind_phys),dimension(size(Grid%xlon,1), Model%levr+LTP),intent(out) :: & + real(kind_phys),dimension(size(Grid%xlon,1), Model%levs),intent(out) :: & hlwc, & ! Longwave all-sky heating-rate (K/sec) hswc ! Shortwave all-sky heating-rate (K/sec) type(topflw_type), dimension(size(Grid%xlon,1)), intent(inout) :: & @@ -179,16 +168,16 @@ subroutine GFS_rrtmgp_post_run (Model, Grid, Diag, Radtend, Statein, & ! dnfx0 - clear sky downward flux at sfc (w/m2) ! Outputs (optional) - real(kind_phys), dimension(size(Grid%xlon,1), Model%levr+LTP), optional, intent(inout) :: & + real(kind_phys), dimension(size(Grid%xlon,1), Model%levs), optional, intent(inout) :: & hlw0, & ! Longwave clear-sky heating rate (K/sec) hsw0 ! Shortwave clear-sky heating-rate (K/sec) - type(proflw_type), dimension(size(Grid%xlon,1), Model%levr+LTP+1), optional, intent(inout) :: & + type(proflw_type), dimension(size(Grid%xlon,1), Model%levs+1), optional, intent(inout) :: & flxprf_lw ! 2D radiative fluxes, components: ! upfxc - total sky upward flux (W/m2) ! dnfxc - total sky dnward flux (W/m2) ! upfx0 - clear sky upward flux (W/m2) ! dnfx0 - clear sky dnward flux (W/m2) - type(profsw_type), dimension(size(Grid%xlon,1), Model%levr+LTP+1), intent(inout), optional :: & + type(profsw_type), dimension(size(Grid%xlon,1), Model%levs+1), intent(inout), optional :: & flxprf_sw ! 2D radiative fluxes, components: ! upfxc - total sky upward flux (W/m2) ! dnfxc - total sky dnward flux (W/m2) @@ -205,7 +194,7 @@ subroutine GFS_rrtmgp_post_run (Model, Grid, Diag, Radtend, Statein, & ! Local variables integer :: i, j, k, k1, itop, ibtc, iBand, iSFC, iTOA real(kind_phys) :: tem0d, tem1, tem2 - real(kind_phys), dimension(nDay, Model%levr+LTP) :: thetaTendClrSky, thetaTendAllSky + real(kind_phys), dimension(nDay, Model%levs) :: thetaTendClrSky, thetaTendAllSky logical :: l_clrskylw_hr,l_clrskysw_hr, l_fluxeslw2d, l_fluxessw2d, top_at_1, l_sfcFluxessw1D ! Initialize CCPP error handling variables @@ -221,15 +210,16 @@ subroutine GFS_rrtmgp_post_run (Model, Grid, Diag, Radtend, Statein, & l_fluxessw2d = present(flxprf_sw) l_sfcfluxessw1D = present(scmpsw) - + ! ####################################################################################### ! What is vertical ordering? - top_at_1 = (p_lev(1,1) .lt. p_lev(1, Model%levr+LTP)) + ! ####################################################################################### + top_at_1 = (p_lev(1,1) .lt. p_lev(1, Model%levs)) if (top_at_1) then - iSFC = Model%levr+LTP+1 + iSFC = Model%levs iTOA = 1 else iSFC = 1 - iTOA = Model%levr+LTP+1 + iTOA = Model%levs endif ! ####################################################################################### @@ -255,7 +245,7 @@ subroutine GFS_rrtmgp_post_run (Model, Grid, Diag, Radtend, Statein, & call check_error_msg('GFS_rrtmgp_post',compute_heating_rate( & fluxswUP_clrsky, & fluxswDOWN_clrsky, & - p_lev(idxday,1:Model%levr+LTP+1), & + p_lev(idxday,1:Model%levs+1), & thetaTendClrSky)) hsw0(idxday,:)=thetaTendClrSky endif @@ -263,7 +253,7 @@ subroutine GFS_rrtmgp_post_run (Model, Grid, Diag, Radtend, Statein, & call check_error_msg('GFS_rrtmgp_post',compute_heating_rate( & fluxswUP_allsky, & fluxswDOWN_allsky, & - p_lev(idxday,1:Model%levr+LTP+1), & + p_lev(idxday,1:Model%levs+1), & thetaTendAllSky)) hswc(idxday,:) = thetaTendAllSky @@ -290,28 +280,15 @@ subroutine GFS_rrtmgp_post_run (Model, Grid, Diag, Radtend, Statein, & ! ####################################################################################### if (Model%lsswr) then if (nday > 0) then - do k = 1, LM - k1 = k + kd - Radtend%htrsw(1:im,k) = hswc(1:im,k1) + ! All-sky heating rate + do k = 1, Model%levs + Radtend%htrsw(1:im,k) = hswc(1:im,k) enddo - ! Repopulate the points above levr i.e. LM - if (lm < Model%levs) then - do k = lm,Model%levs - Radtend%htrsw (1:im,k) = Radtend%htrsw (1:im,LM) - enddo - endif - + ! Clear-sk heating rate if (Model%swhtr) then - do k = 1, lm - k1 = k + kd - Radtend%swhc(1:im,k) = hsw0(1:im,k1) + do k = 1, Model%levs + Radtend%swhc(1:im,k) = hsw0(1:im,k) enddo - ! Repopulate the points above levr i.e. LM - if (lm < Model%levs) then - do k = lm,Model%levs - Radtend%swhc(1:im,k) = Radtend%swhc(1:im,LM) - enddo - endif endif ! Surface down and up spectral component fluxes @@ -328,7 +305,7 @@ subroutine GFS_rrtmgp_post_run (Model, Grid, Diag, Radtend, Statein, & Coupling%visdfui(i) = scmpsw(i)%visdf * sfc_alb_uvvis_dif(1,i) enddo else ! if_nday_block - Radtend%htrsw(:,:) = 0.0 + Radtend%htrsw(:,:) = 0.0 Radtend%sfcfsw = sfcfsw_type( 0.0, 0.0, 0.0, 0.0 ) Diag%topfsw = topfsw_type( 0.0, 0.0, 0.0 ) scmpsw = cmpfsw_type( 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ) @@ -396,39 +373,24 @@ subroutine GFS_rrtmgp_post_run (Model, Grid, Diag, Radtend, Statein, & endif ! ####################################################################################### - ! Save LW outputs (Note. This piece was originally in rrtmg_lw_post.F90:_run()) + ! Save LW outputs. ! ####################################################################################### if (Model%lslwr) then ! Save surface air temp for diurnal adjustment at model t-steps Radtend%tsflw (:) = tsfa(:) - do k = 1, LM - k1 = k + kd - Radtend%htrlw(1:im,k) = hlwc(1:im,k1) + ! All-sky heating rate profile + do k = 1, model%levs + Radtend%htrlw(1:im,k) = hlwc(1:im,k) enddo - ! Repopulate the points above levr - if (lm < Model%levs) then - do k = lm,Model%levs - Radtend%htrlw (1:im,k) = Radtend%htrlw (1:im,LM) - enddo - endif - if (Model%lwhtr) then - do k = 1, lm - k1 = k + kd - Radtend%lwhc(1:im,k) = hlw0(1:im,k1) + do k = 1, model%levs + Radtend%lwhc(1:im,k) = hlw0(1:im,k) enddo - ! Repopulate the points above levr - if (lm < Model%levs) then - do k = lm,Model%levs - Radtend%lwhc(1:im,k) = Radtend%lwhc(1:im,LM) - enddo - endif endif ! Radiation fluxes for other physics processes Coupling%sfcdlw(:) = Radtend%sfcflw(:)%dnfxc - endif @@ -512,11 +474,11 @@ subroutine GFS_rrtmgp_post_run (Model, Grid, Diag, Radtend, Statein, & do j = 1, 3 do i = 1, IM tem0d = raddt * cldsa(i,j) - itop = mtopa(i,j) - kd - ibtc = mbota(i,j) - kd + itop = mtopa(i,j) + ibtc = mbota(i,j) Diag%fluxr(i, 8-j) = Diag%fluxr(i, 8-j) + tem0d - Diag%fluxr(i,11-j) = Diag%fluxr(i,11-j) + tem0d * Statein%prsi(i,itop+kt) - Diag%fluxr(i,14-j) = Diag%fluxr(i,14-j) + tem0d * Statein%prsi(i,ibtc+kb) + Diag%fluxr(i,11-j) = Diag%fluxr(i,11-j) + tem0d * Statein%prsi(i,itop) + Diag%fluxr(i,14-j) = Diag%fluxr(i,14-j) + tem0d * Statein%prsi(i,ibtc) Diag%fluxr(i,17-j) = Diag%fluxr(i,17-j) + tem0d * Statein%tgrs(i,itop) ! Anning adds optical depth and emissivity output @@ -534,9 +496,8 @@ subroutine GFS_rrtmgp_post_run (Model, Grid, Diag, Radtend, Statein, & ! if (.not. Model%uni_cld) then if (Model%lgocart .or. Model%ldiag3d) then - do k = 1, LM - k1 = k + kd - Coupling%cldcovi(1:im,k) = cloud_fraction(1:im,k1) + do k = 1, Model%levs + Coupling%cldcovi(1:im,k) = cloud_fraction(1:im,k) enddo endif endif ! end_if_lssav diff --git a/physics/GFS_rrtmgp_pre.F90 b/physics/GFS_rrtmgp_pre.F90 index b25e02fb3..4f20544a6 100644 --- a/physics/GFS_rrtmgp_pre.F90 +++ b/physics/GFS_rrtmgp_pre.F90 @@ -51,10 +51,6 @@ module GFS_rrtmgp_pre setemis, & ! Routine to compute surface-emissivity NF_ALBD, & ! Number of surface albedo categories (4; nir-direct, nir-diffuse, uvvis-direct, uvvis-diffuse) setalb ! Routine to compute surface albedo - use mersenne_twister, only: & - random_setseed, & - random_number, & - random_stat ! RRTMGP types use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp use mo_gas_concentrations, only: ty_gas_concs @@ -87,373 +83,234 @@ end subroutine GFS_rrtmgp_pre_init !! | Tbd | GFS_tbd_type_instance | Fortran DDT containing FV3-GFS data not yet assigned to a defined container | DDT | 0 | GFS_tbd_type | | in | F | !! | Coupling | GFS_coupling_type_instance | Fortran DDT containing FV3-GFS fields needed for coupling | DDT | 0 | GFS_coupling_type | | in | F | !! | Radtend | GFS_radtend_type_instance | Fortran DDT containing FV3-GFS radiation tendencies | DDT | 0 | GFS_radtend_type | | inout | F | -!! | lm | vertical_layer_dimension_for_radiation | number of vertical layers for radiation calculation | count | 0 | integer | | in | F | !! | im | horizontal_loop_extent | horizontal loop extent | count | 0 | integer | | in | F | -!! | lmk | adjusted_vertical_layer_dimension_for_radiation | number of vertical layers for radiation | count | 0 | integer | | in | F | -!! | lmp | adjusted_vertical_level_dimension_for_radiation | number of vertical levels for radiation | count | 0 | integer | | in | F | -!! | kd | vertical_index_difference_between_inout_and_local | vertical index difference between in/out and local | index | 0 | integer | | out | F | -!! | kt | vertical_index_difference_between_layer_and_upper_bound | vertical index difference between layer and upper bound | index | 0 | integer | | out | F | -!! | kb | vertical_index_difference_between_layer_and_lower_bound | vertical index difference between layer and lower bound | index | 0 | integer | | out | F | +!! | kdist_lw | K_distribution_file_for_RRTMGP_LW_scheme | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | +!! | kdist_sw | K_distribution_file_for_RRTMGP_SW_scheme | DDT containing spectral information for RRTMGP SW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | !! | raddt | time_step_for_radiation | radiation time step | s | 0 | real | kind_phys | out | F | -!! | plvl | air_pressure_at_interface_for_radiation_in_hPa | air pressure at vertical interface for radiation calculation | hPa | 2 | real | kind_phys | out | F | -!! | plyr | air_pressure_at_layer_for_radiation_in_hPa | air pressure at vertical layer for radiation calculation | hPa | 2 | real | kind_phys | out | F | -!! | tlvl | air_temperature_at_interface_for_radiation | air temperature at vertical interface for radiation calculation | K | 2 | real | kind_phys | out | F | -!! | tlyr | air_temperature_at_layer_for_radiation | air temperature at vertical layer for radiation calculation | K | 2 | real | kind_phys | out | F | +!! | p_lay | air_pressure_at_layer_for_RRTMGP_in_hPa | air pressure at vertical layer for radiation calculation | hPa | 2 | real | kind_phys | out | F | +!! | p_lev | air_pressure_at_interface_for_RRTMGP_in_hPa | air pressure at vertical interface for radiation calculation | hPa | 2 | real | kind_phys | out | F | +!! | t_lay | air_temperature_at_layer_for_RRTMGP | air temperature at vertical layer for radiation calculation | K | 2 | real | kind_phys | out | F | +!! | t_lev | air_temperature_at_interface_for_RRTMGP | air temperature at vertical interface for radiation calculation | K | 2 | real | kind_phys | out | F | !! | tsfg | surface_ground_temperature_for_radiation | surface ground temperature for radiation | K | 1 | real | kind_phys | out | F | !! | tsfa | surface_air_temperature_for_radiation | lowest model layer air temperature for radiation | K | 1 | real | kind_phys | out | F | -!! | qlyr | water_vapor_specific_humidity_at_layer_for_radiation | water vapor specific humidity at vertical layer for radiation calculation | kg kg-1 | 2 | real | kind_phys | out | F | -!! | olyr | ozone_concentration_at_layer_for_radiation | ozone concentration | kg kg-1 | 2 | real | kind_phys | out | F | !! | cld_frac | total_cloud_fraction | layer total cloud fraction | frac | 2 | real | kind_phys | out | F | !! | cld_lwp | cloud_liquid_water_path | layer cloud liquid water path | g m-2 | 2 | real | kind_phys | out | F | !! | cld_reliq | mean_effective_radius_for_liquid_cloud | mean effective radius for liquid cloud | micron | 2 | real | kind_phys | out | F | !! | cld_iwp | cloud_ice_water_path | layer cloud ice water path | g m-2 | 2 | real | kind_phys | out | F | !! | cld_reice | mean_effective_radius_for_ice_cloud | mean effective radius for ice cloud | micron | 2 | real | kind_phys | out | F | -!! | icseed_sw | seed_random_numbers_sw | seed for random number generation for shortwave radiation | none | 1 | integer | | in | F | -!! | icseed_lw | seed_random_numbers_lw | seed for random number generation for longwave radiation | none | 1 | integer | | in | F | !! | faerlw | aerosol_optical_properties_for_longwave_bands_01-16 | aerosol optical properties for longwave bands 01-16 | various | 4 | real | kind_phys | out | F | !! | faersw | aerosol_optical_properties_for_shortwave_bands_01-16 | aerosol optical properties for shortwave bands 01-16 | various | 4 | real | kind_phys | out | F | -!! | aerodp | atmosphere_optical_thickness_due_to_ambient_aerosol_particles | vertical integrated optical depth for various aerosol species | none | 2 | real | kind_phys | out | F | !! | alb1d | surface_albedo_perturbation | surface albedo perturbation | frac | 1 | real | kind_phys | out | F | -!! | kdist_lw | K_distribution_file_for_RRTMGP_LW_scheme | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | -!! | kdist_sw | K_distribution_file_for_RRTMGP_SW_scheme | DDT containing spectral information for RRTMGP SW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | !! | gas_concentrations | Gas_concentrations_for_RRTMGP_suite | DDT containing gas concentrations for RRTMGP radiation scheme | DDT | 0 | ty_gas_concs | | out | F | !! | sfc_emiss_byband | surface_longwave_emissivity_in_each_band | surface lw emissivity in fraction in each LW band | frac | 2 | real | kind_phys | out | F | +!! | sfc_alb_nir_dir | surface_shortwave_albedo_near_infrared_direct_in_each_band | surface sw near-infrared direct albedo in each SW band | frac | 2 | real | kind_phys | out | F | +!! | sfc_alb_nir_dif | surface_shortwave_albedo_near_infrared_diffuse_in_each_band | surface sw near-infrared diffuse albedo in each SW band | frac | 2 | real | kind_phys | out | F | +!! | sfc_alb_uvvis_dir | surface_shortwave_albedo_uv_visible_direct_in_each_band | surface sw uv-visible direct albedo in each SW band | frac | 2 | real | kind_phys | out | F | +!! | sfc_alb_uvvis_dif | surface_shortwave_albedo_uv_visible_diffuse_in_each_band | surface sw uv-visible diffuse albedo in each SW band | frac | 2 | real | kind_phys | out | F | +!! | nday | daytime_points_dimension | daytime points dimension | count | 0 | integer | | out | F | +!! | idxday | daytime_points | daytime points | index | 1 | integer | | out | F | !! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | !! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | !! ! Attention - the output arguments lm, im, lmk, lmp must not be set ! in the CCPP version - they are defined in the interstitial_create routine - subroutine GFS_rrtmgp_pre_run (Model, Grid, Sfcprop, Statein, Tbd, Coupling, & - Radtend,lm, im, lmk, lmp, kdist_lw, kdist_sw, kd, kt, kb, raddt, plvl, plyr, & - tlvl, tlyr, tsfg, tsfa, qlyr, olyr, icseed_lw, icseed_sw, aerodp, alb1d, & - cld_frac, cld_lwp, cld_reliq, cld_iwp, cld_reice, faerlw, faersw, & - gas_concentrations, sfc_emiss_byband, errmsg, errflg) + subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, Tbd, & ! IN + im, kdist_lw, kdist_sw, & ! IN + raddt, p_lay, t_lay, p_lev, t_lev, tsfg, tsfa, alb1d, cld_frac, cld_lwp, & ! OUT + cld_reliq, cld_iwp, cld_reice, faerlw, faersw, sfc_emiss_byband, nday, idxday, & ! OUT + gas_concentrations, sfc_alb_nir_dir, sfc_alb_nir_dif, sfc_alb_uvvis_dir, & ! OUT + sfc_alb_uvvis_dif, errmsg, errflg) ! OUT ! Inputs - type(GFS_control_type), intent(in) :: Model - type(GFS_grid_type), intent(in) :: Grid - type(GFS_sfcprop_type), intent(in) :: Sfcprop - type(GFS_statein_type), intent(in) :: Statein - type(GFS_radtend_type), intent(inout) :: Radtend - type(GFS_tbd_type), intent(in) :: Tbd - type(GFS_coupling_type), intent(in) :: Coupling - integer, intent(in) :: im, lm, lmk, lmp + type(GFS_control_type), intent(in) :: & + Model ! Fortran DDT containing FV3-GFS model control parameters + type(GFS_grid_type), intent(in) :: & + Grid ! Fortran DDT containing FV3-GFS grid and interpolation related data + type(GFS_statein_type), intent(in) :: & + Statein ! Fortran DDT containing FV3-GFS prognostic state data in from dycore + type(GFS_coupling_type), intent(in) :: & + Coupling ! Fortran DDT containing FV3-GFS fields to/from coupling with other components + type(GFS_radtend_type), intent(inout) :: & + Radtend ! Fortran DDT containing FV3-GFS radiation tendencies + type(GFS_sfcprop_type), intent(in) :: & + Sfcprop ! Fortran DDT containing FV3-GFS surface fields + type(GFS_tbd_type), intent(in) :: & + Tbd ! Fortran DDT containing FV3-GFS data not yet assigned to a defined container + integer, intent(in) :: & + im ! Number of horizontal grid points type(ty_gas_optics_rrtmgp),intent(in) :: & - kdist_lw, & ! RRTMGP DDT containing spectral information for LW calculation - kdist_sw ! RRTMGP DDT containing spectral information for SW calculation - type(ty_gas_concs),intent(out) :: & - gas_concentrations - integer,intent(in),dimension(IM) :: & - icseed_sw, & ! auxiliary special cloud related array when module - icseed_lw ! variable isubclw=2, it provides permutation seed - ! for each column profile that are used for generating - ! random numbers. when isubclw /=2, it will not be used. + kdist_lw, & ! RRTMGP DDT containing spectral information for LW calculation + kdist_sw ! RRTMGP DDT containing spectral information for SW calculation ! Outputs - integer, intent(out) :: kd, kt, kb - real(kind_phys), intent(out) :: raddt + real(kind_phys), dimension(size(Grid%xlon,1),Model%levs), intent(out) :: & + p_lay, & ! + t_lay ! + real(kind_phys), dimension(size(Grid%xlon,1),Model%levs+1), intent(out) :: & + p_lev, & ! + t_lev ! + real(kind_phys), intent(out) :: & + raddt ! real(kind_phys), dimension(size(Grid%xlon,1)), intent(out) :: & - tsfg, tsfa - real(kind_phys), dimension(size(Grid%xlon,1),LMK), intent(out) :: & - plyr, tlyr, qlyr, olyr - real(kind_phys), dimension(size(Grid%xlon,1),LMP), intent(out) :: & - plvl, tlvl - real(kind_phys), dimension(size(Grid%xlon,1),NSPC1), intent(out) :: & - aerodp - - real(kind_phys), dimension(size(Grid%xlon,1),5) :: cldsa - integer, dimension(size(Grid%xlon,1),3) :: mbota,mtopa - real(kind_phys), dimension(size(Grid%xlon,1)), intent(out) :: alb1d - real(kind_phys), dimension(size(Grid%xlon,1)) :: de_lgth - character(len=*), intent(out) :: errmsg - integer, intent(out) :: errflg + tsfg, & ! + tsfa ! + real(kind_phys),dimension(kdist_sw%get_nband(),IM),intent(out) :: & + sfc_alb_nir_dir, & ! Shortwave surface albedo (nIR-direct) + sfc_alb_nir_dif, & ! Shortwave surface albedo (nIR-diffuse) + sfc_alb_uvvis_dir, & ! Shortwave surface albedo (uvvis-direct) + sfc_alb_uvvis_dif ! Shortwave surface albedo (uvvis-diffuse) + integer, intent(out) :: & + nday ! Number of daylit points + integer, dimension(size(Grid%xlon,1)), intent(out) :: & + idxday ! Indices for daylit points + real(kind_phys), dimension(size(Grid%xlon,1)), intent(out) :: & + alb1d ! Surface albedo pertubation + type(ty_gas_concs),intent(out) :: & + gas_concentrations ! RRTMGP DDT containing gas volumne mixing ratios + character(len=*), intent(out) :: & + errmsg ! Error message + integer, intent(out) :: & + errflg ! Error flag real(kind_phys),dimension(kdist_sw%get_nband(),IM),intent(out) :: & sfc_emiss_byband ! Longwave surface emissivity in each band real(kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP),intent(out) :: & - cld_frac, & ! - cld_lwp, & ! - cld_reliq, & ! - cld_iwp, & ! - cld_reice ! - real(kind_phys), dimension(size(Grid%xlon,1),LMK,kdist_sw%get_nband(),NF_AESW), intent(out) ::& - faersw - real(kind_phys), dimension(size(Grid%xlon,1),LMK,kdist_lw%get_nband(),NF_AELW), intent(out) ::& - faerlw + cld_frac, & ! Total cloud fraction + cld_lwp, & ! Cloud liquid water path + cld_reliq, & ! Cloud liquid effective radius + cld_iwp, & ! Cloud ice water path + cld_reice ! Cloud ice effecive radius + real(kind_phys), dimension(size(Grid%xlon,1),Model%levs,kdist_sw%get_nband(),NF_AESW), intent(out) ::& + faersw ! Aerosol radiative properties in each SW band. + real(kind_phys), dimension(size(Grid%xlon,1),Model%levs,kdist_lw%get_nband(),NF_AELW), intent(out) ::& + faerlw ! Aerosol radiative properties in each LW band. ! Local variables integer :: me, nfxr, ntrac, ntcw, ntiw, ncld, ntrw, ntsw, ntgl,i, j, k, k1, k2, lsk, & - LP1, lla, llb, lya, lyb, iCol, iBand + LP1, lla, llb, lya, lyb, iCol, iBand, iSFC, iTOA, iLay integer,dimension(IM) :: ipseed_lw,ipseed_sw - logical,dimension(IM,LMK) :: & + integer,dimension(size(Grid%xlon,1),3) :: mbota,mtopa + logical :: top_at_1 + logical,dimension(IM,Model%levs) :: & liqmask,icemask - real(kind_phys),dimension(IM,LMK) :: & - vmr_o3, vmr_h2o - real(kind_phys) :: es, qs, tem0d - real(kind_phys), dimension(size(Grid%xlon,1)) :: tem1d, tskn - real(kind_phys), dimension(size(Grid%xlon,1),LMK) :: & - rhly, tvly, qstl, prslk1, delp, dz, & - tem2da, cldcov, deltaq, cnvc, cnvw, effrl, effri, effrr, effrs - real (kind_phys) :: clwmin, clwm, clwt, onemrh, value, tem1, tem2 - real (kind_phys), parameter :: xrc3 = 100. - real(kind_phys), dimension(size(Grid%xlon,1),LMP) :: tem2db - real(kind_phys), dimension(size(Grid%xlon,1),LMK,Model%ncnd) :: ccnd - real(kind_phys), dimension(size(Grid%xlon,1),LMK,2:Model%ntrac) :: tracer1 - real(kind_phys), dimension(size(Grid%xlon,1),LMK,NF_CLDS) :: clouds - real(kind_phys), dimension(size(Grid%xlon,1),LMK,NF_VGAS) :: gasvmr - real(kind_phys), dimension(size(Grid%xlon,1),LMK,kdist_sw%get_nband(),NF_AESW)::faersw2 - real(kind_phys), dimension(kdist_lw%get_ngpt(),LMK,IM) :: & - rng3D_lw - real(kind_phys), dimension(kdist_lw%get_ngpt()*LMK) :: & - rng1D_lw - logical, dimension(IM,LMK,kdist_lw%get_ngpt()) :: & - cldfracMCICA_lw - real(kind_phys), dimension(kdist_sw%get_ngpt(),LMK,IM) :: & - rng3D_sw - real(kind_phys), dimension(kdist_sw%get_ngpt()*LMK) :: & - rng1D_sw - logical, dimension(IM,LMK,kdist_sw%get_ngpt()) :: & - cldfracMCICA_sw - type(random_stat) :: rng_stat - real(kind_phys), dimension(size(Grid%xlon,1),NF_ALBD) :: sfcalb - - + real(kind_phys),dimension(IM,Model%levs) :: vmr_o3, vmr_h2o + real(kind_phys) :: es, qs, tem0d, clwmin, clwm, clwt, onemrh, value, tem1, tem2 + real(kind_phys), parameter :: xrc3 = 100. + real(kind_phys), dimension(size(Grid%xlon,1)) :: de_lgth + real(kind_phys), dimension(size(Grid%xlon,1), 5) :: cldsa + real(kind_phys), dimension(size(Grid%xlon,1), NSPC1) :: aerodp + real(kind_phys), dimension(size(Grid%xlon,1), NF_ALBD) :: sfcalb + real(kind_phys), dimension(size(Grid%xlon,1), Model%levs) :: relhum, qs_lay, q_lay, deltaZ, tv_lay,& + deltaP, o3_lay, delta_q, cnv_w, cnv_c, effr_l, effr_i, effr_r, effr_s, cldcov + real(kind_phys), dimension(size(Grid%xlon,1), Model%levs, 2:Model%ntrac) :: tracer + real(kind_phys), dimension(size(Grid%xlon,1), Model%levs, NF_VGAS) :: gas_vmr + real(kind_phys), dimension(size(Grid%xlon,1), Model%levs, Model%ncnd) :: cld_condensate + real(kind_phys), dimension(size(Grid%xlon,1), Model%levs, NF_CLDS) :: clouds + real(kind_phys), dimension(size(Grid%xlon,1), Model%levs, kdist_sw%get_nband(), NF_AESW)::faersw2 + ! Initialize CCPP error handling variables errmsg = '' errflg = 0 if (.not. (Model%lsswr .or. Model%lslwr)) return - ! Define some commonly used integers - me = Model%me ! MPI rank designator - NFXR = Model%nfxr ! second dimension for fluxr diagnostic variable (radiation) - NTRAC = Model%ntrac ! Number of tracers - ntcw = Model%ntcw ! Tracer index for cloud condensate (or liquid water) - ntiw = Model%ntiw ! Tracer index for ice - ncld = Model%ncld ! Cloud scheme - ntrw = Model%ntrw ! Tracer index for rain - ntsw = Model%ntsw ! Tracer index for snow - ntgl = Model%ntgl ! Tracer index for groupel - LP1 = LM + 1 ! num of in/out levels - - ! Set local /level/layer indexes corresponding to in/out variables - if ( lextop ) then - if ( ivflip == 1 ) then ! vertical from sfc upward - kd = 0 ! index diff between in/out and local - kt = 1 ! index diff between lyr and upper bound - kb = 0 ! index diff between lyr and lower bound - lla = LMK ! local index at the 2nd level from top - llb = LMP ! local index at toa level - lya = LM ! local index for the 2nd layer from top - lyb = LP1 ! local index for the top layer - else ! vertical from toa downward - kd = 1 ! index diff between in/out and local - kt = 0 ! index diff between lyr and upper bound - kb = 1 ! index diff between lyr and lower bound - lla = 2 ! local index at the 2nd level from top - llb = 1 ! local index at toa level - lya = 2 ! local index for the 2nd layer from top - lyb = 1 ! local index for the top layer - endif ! end if_ivflip_block + ! ####################################################################################### + ! What is vertical ordering? + ! ####################################################################################### + top_at_1 = (Statein%prsi(1,1) .lt. Statein%prsi(1, Model%levs)) + if (top_at_1) then + iSFC = Model%levs + iTOA = 1 else - kd = 0 - if ( ivflip == 1 ) then ! vertical from sfc upward - kt = 1 ! index diff between lyr and upper bound - kb = 0 ! index diff between lyr and lower bound - else ! vertical from toa downward - kt = 0 ! index diff between lyr and upper bound - kb = 1 ! index diff between lyr and lower bound - endif ! end if_ivflip_block - endif ! end if_lextop_block - - ! Radiation time step (output) - raddt = min(Model%fhswr, Model%fhlwr) - - ! Setup surface ground temperature and ground/air skin temperature if required. - if ( itsfc == 0 ) then ! use same sfc skin-air/ground temp - tskn(1:IM) = Sfcprop%tsfc(1:IM) - tsfg(1:IM) = Sfcprop%tsfc(1:IM) - else ! use diff sfc skin-air/ground temp - tskn(1:IM) = Sfcprop%tsfc(1:IM) - tsfg(1:IM) = Sfcprop%tsfc(1:IM) + iSFC = 1 + iTOA = Model%levs endif - - ! Prepare atmospheric profiles for radiation input. - lsk = 0 - if (ivflip == 0 .and. lm < Model%levs) lsk = Model%levs - lm - - ! Copy over state fields into fields, compute some needed quantities. - do k = 1, LM - k1 = k + kd - k2 = k + lsk - do i = 1, IM - plvl(i,k1+kb) = Statein%prsi(i,k2+kb) - plyr(i,k1) = Statein%prsl(i,k2) - tlyr(i,k1) = Statein%tgrs(i,k2) - prslk1(i,k1) = Statein%prslk(i,k2) - - ! Compute relative humidity. - es = min( Statein%prsl(i,k2), fpvs( Statein%tgrs(i,k2) ) ) ! fpvs and prsl in pa - qs = max( QMIN, eps * es / (Statein%prsl(i,k2) + epsm1*es) ) - rhly(i,k1) = max( 0.0, min( 1.0, max(QMIN, Statein%qgrs(i,k2,1))/qs ) ) - qstl(i,k1) = qs + + ! ####################################################################################### + ! Compute some fields needed by RRTMGP + ! ####################################################################################### + ! Copy state fields over for use in RRTMGP + p_lev(1:IM,iSFC:iTOA) = Statein%prsi(1:IM,1:Model%levs) + p_lev(1:IM,iTOA+1) = spread(kdist_lw%get_press_min(),dim=1, ncopies=IM) + p_lay(1:IM,iSFC:iTOA) = Statein%prsl(1:IM,1:Model%levs) + t_lay(1:IM,iSFC:iTOA) = Statein%tgrs(1:IM,1:Model%levs) + + ! Compute layer pressure thicknes + deltaP = p_lev(:,iSFC:iTOA)-p_lev(:,iSFC+1:iTOA+1) + + ! Compute temperature at layer-interfaces + t_lev(1:IM,iSFC) = Sfcprop%tsfc(1:IM) + do iCol=1,IM + do iLay=iSFC+1,iTOA + t_lev(iCol,iLay) = (t_lay(iCol,iLay)+t_lay(iCol,iLay-1))/2._kind_phys enddo - plvl(i,k1+kb) = kdist_lw%get_press_min() + t_lev(iCol,iTOA+1) = kdist_lw%get_temp_min() enddo - - ! Recast remaining all tracers (except sphum) forcing them all to be positive - do j = 2, NTRAC - do k = 1, LM - k1 = k + kd - k2 = k + lsk - tracer1(:,k1,j) = max(0.0, Statein%qgrs(:,k2,j)) + + ! Compute a bunch of thermodynamic fields needed by the macrophysics schemes. Relative humidity, + ! saturation mixing-ratio, vapor mixing-ratio, virtual temperature, layer thickness,... + do iCol=1,IM + do iLay=iSFC,iTOA + es = min( Statein%prsl(iCol,iLay), fpvs( Statein%tgrs(iCol,iLay) ) ) ! fpvs and prsl in pa + qs = max( QMIN, eps * es / (Statein%prsl(iCol,iLay) + epsm1*es) ) + relhum(iCol,iLay) = max( 0._kind_phys, min( 1._kind_phys, max(QMIN, Statein%qgrs(iCol,iLay,1))/qs ) ) + qs_lay(iCol,iLay) = qs + q_lay(iCol,iLay) = max( 1.e-6, Statein%qgrs(iCol,iLay,1) ) + tv_lay(iCol,iLay) = Statein%tgrs(iCol,iLay) * (1._kind_phys + fvirt*q_lay(iCol,iLay)) + deltaZ(iCol,iLay) = (rog*0.001) * (log(p_lev(iCol,iLay)) - log(p_lev(iCol,iLay+1))) * tv_lay(iCol,iLay) enddo enddo - - ! Input data from toa to sfc - if (ivflip == 0) then - plvl(1:IM-1,1+kd) = Statein%prsi(1:IM-1,1) - plvl(IM,1+kd) = kdist_lw%get_press_min() - if (lsk /= 0) then - plvl(1:IM-1,1+kd) = 0.5 * (plvl(1:IM-1,2+kd) + plvl(1:IM-1,1+kd)) - plvl(IM,1+kd) = kdist_lw%get_press_min() - endif - ! Input data from sfc to top - else - plvl(1:IM-1,LP1+kd) = Statein%prsi(1:IM-1,LP1+lsk) - plvl(IM,LP1+kd) = kdist_lw%get_press_min() - if (lsk /= 0) then - plvl(1:IM-1,LM+kd) = 0.5 * (plvl(1:IM-1,LP1+kd) + plvl(1:IM-1,LM+kd)) - plvl(IM,LM+kd) = kdist_lw%get_press_min() - endif - endif - - if ( lextop ) then ! values for extra top layer - do i = 1, IM - plvl(i,llb) = kdist_lw%get_press_min() - if ( plvl(i,lla) <= kdist_lw%get_press_min() ) plvl(i,lla) = 2.0* kdist_lw%get_press_min() - plyr(i,lyb) = 0.5 * plvl(i,lla) - tlyr(i,lyb) = tlyr(i,lya) - prslk1(i,lyb) = (plyr(i,lyb)*0.001) ** rocp ! plyr in Pa - rhly(i,lyb) = rhly(i,lya) - qstl(i,lyb) = qstl(i,lya) - enddo - - ! note: may need to take care the top layer amount - tracer1(:,lyb,:) = tracer1(:,lya,:) - endif - + + ! ####################################################################################### ! Get layer ozone mass mixing ratio + ! ####################################################################################### + ! First recast remaining all tracers (except sphum) forcing them all to be positive + do j = 2, model%NTRAC + tracer(1:IM,1:Model%levs,j) = max(0.0, Statein%qgrs(1:IM,1:Model%levs,j)) + enddo + if (Model%ntoz > 0) then - do k=1,lmk - do i=1,im - olyr(i,k) = max( QMIN, tracer1(i,k,Model%ntoz) ) + do iLay=iSFC,iTOA + do iCol=1,IM + o3_lay(iCol,iLay) = max( QMIN, tracer(iCol,iLay,Model%ntoz) ) enddo enddo - ! Use climatological ozone data + ! OR Use climatological ozone data else - call getozn (prslk1, Grid%xlat, IM, LMK, olyr) + call getozn (Statein%prslk(1:IM,iSFC:iTOA), Grid%xlat, IM, Model%levs, o3_lay) endif - + + ! ####################################################################################### + ! Set gas concentrations for RRTMGP + ! ####################################################################################### + ! Call getgases(), to set up non-prognostic gas volume mixing ratios (gas_vmr). + call getgases (p_lev/100., Grid%xlon, Grid%xlat, IM, Model%levs, gas_vmr) + + ! Compute volume mixing-ratios for ozone (mmr) and specific-humidity. + vmr_h2o = merge((q_lay/(1-q_lay))*amdw, 0., q_lay .ne. 1.) + vmr_o3 = merge(o3_lay*amdo3, 0., o3_lay .gt. 0.) + ! + call gas_concentrations%reset() + call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations%set_vmr('o2', gas_vmr(:,:,4))) + call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations%set_vmr('co2', gas_vmr(:,:,1))) + call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations%set_vmr('ch4', gas_vmr(:,:,3))) + call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations%set_vmr('n2o', gas_vmr(:,:,2))) + call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations%set_vmr('h2o', vmr_h2o)) + call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations%set_vmr('o3', vmr_o3)) + + ! ####################################################################################### + ! Radiation time step (output) (Is this really needed?) + ! ####################################################################################### + raddt = min(Model%fhswr, Model%fhlwr) + + ! ####################################################################################### ! Compute cosine of zenith angle (only when SW is called) + ! ####################################################################################### if (Model%lsswr) then - call coszmn (Grid%xlon, Grid%sinlat, Grid%coslat, Model%solhr, IM, me, & + call coszmn (Grid%xlon, Grid%sinlat, Grid%coslat, Model%solhr, IM, Model%me, & Radtend%coszen, Radtend%coszdg) endif - ! Call getgases(), to set up non-prognostic gas volume mixing ratios (gasvmr). - call getgases (plvl/100., Grid%xlon, Grid%xlat, IM, LMK, gasvmr) - - ! Get temperature at layer interface, and layer moisture. - tem2da(1:IM,2:LMK) = log( plyr(1:IM,2:LMK) ) - tem2db(1:IM,2:LMK) = log( plvl(1:IM,2:LMK) ) - - if (ivflip == 0) then ! input data from toa to sfc - do i = 1, IM - tem1d (i) = QME6 - tem2da(i,1) = log( plyr(i,1) ) - tem2db(i,1) = log( max( kdist_lw%get_press_min(), plvl(i,1)) ) - tem2db(i,LMP) = log( plvl(i,LMP) ) - tsfa (i) = tlyr(i,LMK) ! sfc layer air temp - tlvl(i,1) = tlyr(i,1) - tlvl(i,LMP) = tskn(i) - enddo - do k = 1, LM - k1 = k + kd - do i = 1, IM - qlyr(i,k1) = max( tem1d(i), Statein%qgrs(i,k,1) ) - tem1d(i) = min( QME5, qlyr(i,k1) ) - tvly(i,k1) = Statein%tgrs(i,k) * (1.0 + fvirt*qlyr(i,k1)) ! virtual T (K) - delp(i,k1) = plvl(i,k1+1) - plvl(i,k1) - enddo - enddo - - if ( lextop ) then - do i = 1, IM - qlyr(i,lyb) = qlyr(i,lya) - tvly(i,lyb) = tvly(i,lya) - delp(i,lyb) = plvl(i,lla) - plvl(i,llb) - enddo - endif - - do k = 2, LMK - do i = 1, IM - tlvl(i,k) = tlyr(i,k) + (tlyr(i,k-1) - tlyr(i,k)) * (tem2db(i,k) - tem2da(i,k)) / & - (tem2da(i,k-1) - tem2da(i,k)) - enddo - enddo - - ! Comput lvel height and layer thickness (km) - tem0d = 0.001 * rog - do i = 1, IM - do k = 1, LMK - dz(i,k) = tem0d * (tem2db(i,k+1) - tem2db(i,k)) * tvly(i,k) - enddo - enddo - - else ! input data from sfc to toa - do i = 1, IM - tem1d (i) = QME6 - tem2da(i,1) = log( plyr(i,1) ) - tem2db(i,1) = log( plvl(i,1) ) - tem2db(i,LMP) = log( max( kdist_lw%get_press_min(), plvl(i,LMP)) ) - tsfa (i) = tlyr(i,1) ! sfc layer air temp - tlvl(i,1) = tskn(i) - tlvl(i,LMP) = tlyr(i,LMK) - enddo - - do k = LM, 1, -1 - do i = 1, IM - qlyr(i,k) = max( tem1d(i), Statein%qgrs(i,k,1) ) - tem1d(i) = min( QME5, qlyr(i,k) ) - tvly(i,k) = Statein%tgrs(i,k) * (1.0 + fvirt*qlyr(i,k)) ! virtual T (K) - delp(i,k) = plvl(i,k) - plvl(i,k+1) - enddo - enddo - - if ( lextop ) then - do i = 1, IM - qlyr(i,lyb) = qlyr(i,lya) - tvly(i,lyb) = tvly(i,lya) - delp(i,lyb) = plvl(i,lla) - plvl(i,llb) - enddo - endif - - do k = 1, LMK-1 - do i = 1, IM - tlvl(i,k+1) = tlyr(i,k) + (tlyr(i,k+1) - tlyr(i,k)) * (tem2db(i,k+1) - tem2da(i,k)) / & - (tem2da(i,k+1) - tem2da(i,k)) - enddo - enddo - - ! Compute level height and layer thickness (km) - tem0d = 0.001 * rog - do i = 1, IM - do k = LMK, 1, -1 - dz(i,k) = tem0d * (tem2db(i,k) - tem2db(i,k+1)) * tvly(i,k) - enddo - enddo - endif ! end_if_ivflip - + ! ####################################################################################### ! Obtain cloud information for radiation calculations ! (clouds,cldsa,mtopa,mbota) ! for prognostic cloud: @@ -462,182 +319,287 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Sfcprop, Statein, Tbd, Coupling, ! - For Zhao/Moorthi's prognostic cloud+pdfcld, ! call module_radiation_clouds::progcld3() ! call module_radiation_clouds::progclduni() for unified cloud and ncld=2 - ccnd = 0.0_kind_phys - if (Model%ncnd == 1) then ! Zhao_Carr_Sundqvist - ccnd(1:IM,1:LMK,1) = tracer1(1:IM,1:LMK,ntcw) ! -liquid water/ice - elseif (Model%ncnd == 2) then ! MG - ccnd(1:IM,1:LMK,1) = tracer1(1:IM,1:LMK,ntcw) ! -liquid water - ccnd(1:IM,1:LMK,2) = tracer1(1:IM,1:LMK,ntiw) ! -ice water - elseif (Model%ncnd == 4) then ! MG2 - ccnd(1:IM,1:LMK,1) = tracer1(1:IM,1:LMK,ntcw) ! -liquid water - ccnd(1:IM,1:LMK,2) = tracer1(1:IM,1:LMK,ntiw) ! -ice water - ccnd(1:IM,1:LMK,3) = tracer1(1:IM,1:LMK,ntrw) ! -rain water - ccnd(1:IM,1:LMK,4) = tracer1(1:IM,1:LMK,ntsw) ! -snow water - elseif (Model%ncnd == 5) then ! GFDL MP, Thompson, MG3 - ccnd(1:IM,1:LMK,1) = tracer1(1:IM,1:LMK,ntcw) ! -liquid water - ccnd(1:IM,1:LMK,2) = tracer1(1:IM,1:LMK,ntiw) ! -ice water - ccnd(1:IM,1:LMK,3) = tracer1(1:IM,1:LMK,ntrw) ! -rain water - ccnd(1:IM,1:LMK,4) = tracer1(1:IM,1:LMK,ntsw) + & ! -snow + grapuel - tracer1(1:IM,1:LMK,ntgl) + ! ####################################################################################### + cld_condensate = 0.0_kind_phys + if (Model%ncnd == 1) then ! Zhao_Carr_Sundqvist + cld_condensate(1:IM,1:Model%levs,1) = tracer(1:IM,1:Model%levs,Model%ntcw) ! -liquid water/ice + elseif (Model%ncnd == 2) then ! MG + cld_condensate(1:IM,1:Model%levs,1) = tracer(1:IM,1:Model%levs,Model%ntcw) ! -liquid water + cld_condensate(1:IM,1:Model%levs,2) = tracer(1:IM,1:Model%levs,Model%ntiw) ! -ice water + elseif (Model%ncnd == 4) then ! MG2 + cld_condensate(1:IM,1:Model%levs,1) = tracer(1:IM,1:Model%levs,Model%ntcw) ! -liquid water + cld_condensate(1:IM,1:Model%levs,2) = tracer(1:IM,1:Model%levs,Model%ntiw) ! -ice water + cld_condensate(1:IM,1:Model%levs,3) = tracer(1:IM,1:Model%levs,Model%ntrw) ! -rain water + cld_condensate(1:IM,1:Model%levs,4) = tracer(1:IM,1:Model%levs,Model%ntsw) ! -snow water + elseif (Model%ncnd == 5) then ! GFDL MP, Thompson, MG3 + cld_condensate(1:IM,1:Model%levs,1) = tracer(1:IM,1:Model%levs,Model%ntcw) ! -liquid water + cld_condensate(1:IM,1:Model%levs,2) = tracer(1:IM,1:Model%levs,Model%ntiw) ! -ice water + cld_condensate(1:IM,1:Model%levs,3) = tracer(1:IM,1:Model%levs,Model%ntrw) ! -rain water + cld_condensate(1:IM,1:Model%levs,4) = tracer(1:IM,1:Model%levs,Model%ntsw) + & ! -snow + grapuel + tracer(1:IM,1:Model%levs,Model%ntgl) endif - where(ccnd < epsq) ccnd = 0.0 + where(cld_condensate < epsq) cld_condensate = 0.0 if (Model%imp_physics == 11 ) then if (.not. Model%lgfdlmprad) then - ccnd(:,:,1) = tracer1(:,1:LMK,ntcw) - ccnd(:,:,1) = ccnd(:,:,1) + tracer1(:,1:LMK,ntrw) - ccnd(:,:,1) = ccnd(:,:,1) + tracer1(:,1:LMK,ntiw) - ccnd(:,:,1) = ccnd(:,:,1) + tracer1(:,1:LMK,ntsw) - ccnd(:,:,1) = ccnd(:,:,1) + tracer1(:,1:LMK,ntgl) + cld_condensate(:,:,1) = tracer(:,1:Model%levs,Model%ntcw) + cld_condensate(:,:,1) = cld_condensate(:,:,1) + tracer(:,1:Model%levs,Model%ntrw) + cld_condensate(:,:,1) = cld_condensate(:,:,1) + tracer(:,1:Model%levs,Model%ntiw) + cld_condensate(:,:,1) = cld_condensate(:,:,1) + tracer(:,1:Model%levs,Model%ntsw) + cld_condensate(:,:,1) = cld_condensate(:,:,1) + tracer(:,1:Model%levs,Model%ntgl) endif - do k=1,LMK + do k=1,Model%levs do i=1,IM - if (ccnd(i,k,1) < EPSQ ) ccnd(i,k,1) = 0.0 + if (cld_condensate(i,k,1) < EPSQ ) cld_condensate(i,k,1) = 0.0 enddo enddo endif - + ! Add suspended convective cloud water to grid-scale cloud water ! only for cloud fraction & radiation computation it is to enhance ! cloudiness due to suspended convec cloud water for zhao/moorthi's ! (imp_phys=99) & ferrier's (imp_phys=5) microphysics schemes if ((Model%num_p3d == 4) .and. (Model%npdf3d == 3)) then ! same as Model%imp_physics = 99 - deltaq(1:im,1+kd:lm+kd) = Tbd%phy_f3d(1:im,1:lm,5) - cnvw (1:im,1+kd:lm+kd) = Tbd%phy_f3d(1:im,1:lm,6) - cnvc (1:im,1+kd:lm+kd) = Tbd%phy_f3d(1:im,1:lm,7) + delta_q(1:im,1:Model%levs) = Tbd%phy_f3d(1:im,1:Model%levs,5) + cnv_w (1:im,1:Model%levs) = Tbd%phy_f3d(1:im,1:Model%levs,6) + cnv_c (1:im,1:Model%levs) = Tbd%phy_f3d(1:im,1:Model%levs,7) elseif ((Model%npdf3d == 0) .and. (Model%ncnvcld3d == 1)) then ! same as MOdel%imp_physics=98 - deltaq(1:im,1+kd:lm+kd) = 0.0 - cnvw (1:im,1+kd:lm+kd) = Tbd%phy_f3d(1:im,1:lm,Model%num_p3d+1) - cnvc (1:im,1+kd:lm+kd) = 0.0 + delta_q(1:im,1:Model%levs) = 0.0 + cnv_w (1:im,1:Model%levs) = Tbd%phy_f3d(1:im,1:Model%levs,Model%num_p3d+1) + cnv_c (1:im,1:Model%levs) = 0.0 else ! all the rest - deltaq(1:im,1:lmk) = 0.0 - cnvw (1:im,1:lmk) = 0.0 - cnvc (1:im,1:lmk) = 0.0 - endif - - if (lextop) then - cldcov(1:im,lyb) = cldcov(1:im,lya) - deltaq(1:im,lyb) = deltaq(1:im,lya) - cnvw (1:im,lyb) = cnvw (1:im,lya) - cnvc (1:im,lyb) = cnvc (1:im,lya) - if (Model%effr_in) then - effrl(1:im,lyb) = effrl(1:im,lya) - effri(1:im,lyb) = effri(1:im,lya) - effrr(1:im,lyb) = effrr(1:im,lya) - effrs(1:im,lyb) = effrs(1:im,lya) - endif + delta_q(1:im,1:Model%levs) = 0.0 + cnv_w (1:im,1:Model%levs) = 0.0 + cnv_c (1:im,1:Model%levs) = 0.0 endif - + if (Model%imp_physics == 99) then - ccnd(1:IM,1:LMK,1) = ccnd(1:IM,1:LMK,1) + cnvw(1:IM,1:LMK) + cld_condensate(1:IM,1:Model%levs,1) = cld_condensate(1:IM,1:Model%levs,1) + cnv_w(1:IM,1:Model%levs) endif if (Model%imp_physics == 10) then - ccnd(1:IM,1:LMK,1) = ccnd(1:IM,1:LMK,1) + cnvw(1:IM,1:LMK) + ccnd(1:IM,1:LMK,2) + cld_condensate(1:IM,1:Model%levs,1) = cld_condensate(1:IM,1:Model%levs,1) + cnv_w(1:IM,1:Model%levs) + cld_condensate(1:IM,1:Model%levs,2) endif - + + if (Model%uni_cld) then + if (Model%effr_in) then + cldcov(1:im,1:Model%levs) = Tbd%phy_f3d(1:im,1:Model%levs,Model%indcld) + effr_l(1:im,1:Model%levs) = Tbd%phy_f3d(1:im,1:Model%levs,2) + effr_i(1:im,1:Model%levs) = Tbd%phy_f3d(1:im,1:Model%levs,3) + effr_r(1:im,1:Model%levs) = Tbd%phy_f3d(1:im,1:Model%levs,4) + effr_s(1:im,1:Model%levs) = Tbd%phy_f3d(1:im,1:Model%levs,5) + else + do k=1,model%levs + do i=1,im + !cldcov(i,k1) = Tbd%phy_f3d(i,k,Model%indcld) + !if (tracer1(i,k,ntcw) .gt. 0 .or. tracer1(i,k,ntiw) .gt. 0) then + ! cldcov(i,k) = 0.1 + !else + ! cldcov(i,k) = 0.0 + !endif + enddo + enddo + endif + elseif (Model%imp_physics == Model%imp_physics_gfdl) then ! GFDL MP + cldcov(1:IM,1:Model%levs) = tracer(1:IM,1:Model%levs,Model%ntclamt) + else ! neither of the other two cases + ! cldcov = 0.0 + endif + + ! ####################################################################################### + ! This is a hack to get the first-column in a file to contain a cloud. + ! ####################################################################################### ! DJS2019: START ! Compute layer cloud fraction. clwmin = 0.0 cldcov(:,:) = 0.0 if (.not. Model%lmfshal) then - do k = 1, LMK + do k = 1, Model%levs do i = 1, IM - clwt = 1.0e-6 * (plyr(i,k)*0.1) - if (ccnd(i,k,1) > 0.) then - onemrh= max( 1.e-10, 1.0-rhly(i,k) ) - clwm = clwmin / max( 0.01, plyr(i,k)*0.1 ) - tem1 = min(max(sqrt(sqrt(onemrh*qstl(i,k))),0.0001),1.0) + clwt = 1.0e-6 * (p_lay(i,k)*0.1) + if (cld_condensate(i,k,1) > 0.) then + onemrh= max( 1.e-10, 1.0-relhum(i,k) ) + clwm = clwmin / max( 0.01, p_lay(i,k)*0.1 ) + tem1 = min(max(sqrt(sqrt(onemrh*qs_lay(i,k))),0.0001),1.0) tem1 = 2000.0 / tem1 - value = max( min( tem1*(ccnd(i,k,1)-clwm), 50.0 ), 0.0 ) - tem2 = sqrt( sqrt(rhly(i,k)) ) + value = max( min( tem1*(cld_condensate(i,k,1)-clwm), 50.0 ), 0.0 ) + tem2 = sqrt( sqrt(relhum(i,k)) ) cldcov(i,k) = max( tem2*(1.0-exp(-value)), 0.0 ) endif enddo enddo else - do k = 1, LMK + do k = 1, Model%levs do i = 1, IM - clwt = 1.0e-6 * (plyr(i,k)*0.1) - if (ccnd(i,k,1) .gt. 0) then - onemrh= max( 1.e-10, 1.0-rhly(i,k) ) - clwm = clwmin / max( 0.01, plyr(i,k)*0.1 ) - tem1 = min(max((onemrh*qstl(i,k))**0.49,0.0001),1.0) !jhan + clwt = 1.0e-6 * (p_lay(i,k)*0.1) + if (cld_condensate(i,k,1) .gt. 0) then + onemrh= max( 1.e-10, 1.0-relhum(i,k) ) + clwm = clwmin / max( 0.01, p_lay(i,k)*0.1 ) + tem1 = min(max((onemrh*qs_lay(i,k))**0.49,0.0001),1.0) !jhan if (Model%lmfdeep2) then tem1 = xrc3 / tem1 else tem1 = 100.0 / tem1 endif - value = max( min( tem1*(ccnd(i,k,1)-clwm), 50.0 ), 0.0 ) - tem2 = sqrt( sqrt(rhly(i,k)) ) + value = max( min( tem1*(cld_condensate(i,k,1)-clwm), 50.0 ), 0.0 ) + tem2 = sqrt( sqrt(relhum(i,k)) ) cldcov(i,k) = max( tem2*(1.0-exp(-value)), 0.0 ) endif enddo enddo endif ! DJS2019: END - - if (Model%uni_cld) then - if (Model%effr_in) then - cldcov(1:im,1+kd:lm+kd) = Tbd%phy_f3d(1:im,1:lm,Model%indcld) - effrl(1:im,1+kd:lm+kd) = Tbd%phy_f3d(1:im,1:lm,2) - effri(1:im,1+kd:lm+kd) = Tbd%phy_f3d(1:im,1:lm,3) - effrr(1:im,1+kd:lm+kd) = Tbd%phy_f3d(1:im,1:lm,4) - effrs(1:im,1+kd:lm+kd) = Tbd%phy_f3d(1:im,1:lm,5) - else - do k=1,lm - k1 = k + kd - do i=1,im - !cldcov(i,k1) = Tbd%phy_f3d(i,k,Model%indcld) - !if (tracer1(i,k,ntcw) .gt. 0 .or. tracer1(i,k,ntiw) .gt. 0) then - ! cldcov(i,k1) = 0.1 - !else - ! cldcov(i,k1) = 0.0 - !endif - enddo - enddo - endif - elseif (Model%imp_physics == Model%imp_physics_gfdl) then ! GFDL MP - cldcov(1:IM,1+kd:LM+kd) = tracer1(1:IM,1:LM,Model%ntclamt) - else ! neither of the other two cases - ! cldcov = 0.0 - endif - + + ! ####################################################################################### ! MICROPHYSICS + ! ####################################################################################### ! *) zhao/moorthi's prognostic cloud scheme or unified cloud and/or with MG microphysics if (Model%imp_physics == 99 .or. Model%imp_physics == 10) then if (Model%uni_cld .and. Model%ncld >= 2) then - call progclduni (plyr/100., plvl/100., tlyr, tvly, ccnd, Model%ncnd, & ! IN - Grid%xlat, Grid%xlon, Sfcprop%slmsk, dz, delp/100.,IM, & ! IN - LMK, LMP, cldcov, effrl, effri, effrr, effrs, Model%effr_in, & ! IN - clouds, cldsa, mtopa, mbota, de_lgth) ! OUT + call progclduni( & + p_lay/100., & ! IN + p_lev/100., & ! IN + t_lay, & ! IN + tv_lay, & ! IN + cld_condensate, & ! IN + Model%ncnd, & ! IN + Grid%xlat, & ! IN + Grid%xlon, & ! IN + Sfcprop%slmsk, & ! IN + deltaZ, & ! IN + deltaP/100., & ! IN + IM, & ! IN + MODEL%LEVS, & ! IN + MODEL%LEVS+1, & ! IN + cldcov, & ! IN + effr_l, & ! IN + effr_i, & ! IN + effr_r, & ! IN + effr_s, & ! IN + Model%effr_in, & ! IN + clouds, & ! OUT + cldsa, & ! OUT + mtopa, & ! OUT + mbota, & ! OUT + de_lgth) ! OUT else - call progcld1 (plyr/100. ,plvl/100., tlyr, tvly, qlyr, qstl, rhly, & ! IN - ccnd(1:IM,1:LMK,1), Grid%xlat,Grid%xlon,Sfcprop%slmsk, dz, & ! IN - delp/100., IM, LMK, LMP, Model%uni_cld, Model%lmfshal, & ! IN - Model%lmfdeep2, cldcov, effrl, effri, effrr, effrs, & ! IN - Model%effr_in, & ! IN - clouds, cldsa, mtopa, mbota, de_lgth) ! OUT + call progcld1 ( & + p_lay/100., & ! IN + p_lev/100., & ! IN + t_lay, & ! IN + tv_lay, & ! IN + q_lay, & ! IN + qs_lay, & ! IN + relhum, & ! IN + cld_condensate(:,:,1),& ! IN + Grid%xlat, & ! IN + Grid%xlon, & ! IN + Sfcprop%slmsk, & ! IN + deltaZ, & ! IN + deltaP/100., & ! IN + IM, & ! IN + Model%levs, & ! IN + Model%levs+1, & ! IN + Model%uni_cld, & ! IN + Model%lmfshal, & ! IN + Model%lmfdeep2, & ! IN + cldcov, & ! IN + effr_l, & ! IN + effr_i, & ! IN + effr_r, & ! IN + effr_s, & ! IN + Model%effr_in, & ! IN + clouds, & ! OUT + cldsa, & ! OUT + mtopa, & ! OUT + mbota, & ! OUT + de_lgth) ! OUT endif ! *) zhao/moorthi's prognostic cloud+pdfcld elseif(Model%imp_physics == 98) then - call progcld3 (plyr/100., plvl/100., tlyr, tvly, qlyr, qstl, rhly, & ! IN - ccnd(1:IM,1:LMK,1), cnvw, cnvc, Grid%xlat, Grid%xlon, & ! IN - Sfcprop%slmsk, dz, delp/100., im, lmk, lmp, deltaq, Model%sup, & ! IN - Model%kdt, me, & ! IN - clouds, cldsa, mtopa, mbota, de_lgth) ! OUT + call progcld3 ( & + p_lay/100., & ! IN + p_lev/100., & ! IN + t_lay, & ! IN + tv_lay, & ! IN + q_lay, & ! IN + qs_lay, & ! IN + relhum, & ! IN + cld_condensate(:,:,1),& ! IN + cnv_w, & ! IN + cnv_c, & ! IN + Grid%xlat, & ! IN + Grid%xlon, & ! IN + Sfcprop%slmsk, & ! IN + deltaZ, & ! IN + deltaP/100., & ! IN + im, & ! IN + Model%levs, & ! IN + Model%levs+1, & ! IN + delta_q, & ! IN Total water distribution width + Model%sup, & ! IN + Model%kdt, & ! IN + me, & ! IN + clouds, & ! OUT + cldsa, & ! OUT + mtopa, & ! OUT + mbota, & ! OUT + de_lgth) ! OUT ! *) GFDL cloud scheme elseif (Model%imp_physics == 11) then if (.not.Model%lgfdlmprad) then - call progcld4 (plyr/100., plvl/100., tlyr, tvly, qlyr, qstl, rhly, & ! IN - ccnd(1:IM,1:LMK,1), cnvw, cnvc,Grid%xlat, Grid%xlon, & ! IN - Sfcprop%slmsk, cldcov, dz, delp/100., im, lmk, lmp, & ! IN - clouds, cldsa, mtopa, mbota, de_lgth) ! OUT + call progcld4 ( & + p_lay/100., & ! IN + p_lev/100., & ! IN + t_lay, & ! IN + tv_lay, & ! IN + q_lay, & ! IN + qs_lay, & ! IN + relhum, & ! IN + cld_condensate(:,:,1),& ! IN + cnv_w, & ! IN + cnv_c, & ! IN + Grid%xlat, & ! IN + Grid%xlon, & ! IN + Sfcprop%slmsk, & ! IN + cldcov, & ! IN + deltaZ, & ! IN + deltaP/100., & ! IN + im, & ! IN + Model%levs, & ! IN + Model%levs+1, & ! IN + clouds, & ! OUT + cldsa, & ! OUT + mtopa, & ! OUT + mbota, & ! OUT + de_lgth) ! OUT else - call progclduni (plyr/100., plvl/100., tlyr, tvly, ccnd, Model%ncnd, & ! IN - Grid%xlat, Grid%xlon, Sfcprop%slmsk, dz,delp/100., IM, LMK, & ! IN - LMP, cldcov, effrl, effri, effrr, effrs, Model%effr_in, & ! IN - clouds, cldsa, mtopa, mbota, de_lgth) ! OUT + call progclduni( & + p_lay/100., & ! IN + p_lev/100., & ! IN + t_lay, & ! IN + tv_lay, & ! IN + cld_condensate, & ! IN + Model%ncnd, & ! IN + Grid%xlat, & ! IN + Grid%xlon, & ! IN + Sfcprop%slmsk, & ! IN + deltaZ, & ! IN + deltaP/100., & ! IN + IM, & ! IN + MODEL%LEVS, & ! IN + MODEL%LEVS+1, & ! IN + cldcov, & ! IN + effr_l, & ! IN + effr_i, & ! IN + effr_r, & ! IN + effr_s, & ! IN + Model%effr_in, & ! IN + clouds, & ! OUT + cldsa, & ! OUT + mtopa, & ! OUT + mbota, & ! OUT + de_lgth) ! OUT endif ! *) Thompson / WSM6 cloud micrphysics scheme elseif(Model%imp_physics == 8 .or. Model%imp_physics == 6) then @@ -647,25 +609,54 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Sfcprop, Statein, Tbd, Coupling, Tbd%phy_f3d(:,:,3) = 250. endif - call progcld5 (plyr/100., plvl/100., tlyr, qlyr, qstl, rhly, tracer1, Grid%xlat, & ! IN - Grid%xlon,Sfcprop%slmsk,dz,delp/100., ntrac-1, ntcw-1, ntiw-1, & ! IN - ntrw-1, ntsw-1, ntgl-1, im, lmk, lmp, Model%uni_cld, Model%lmfshal,& ! IN - Model%lmfdeep2, cldcov(:,1:LMK),Tbd%phy_f3d(:,:,1), & ! IN - Tbd%phy_f3d(:,:,2), Tbd%phy_f3d(:,:,3), & ! IN - clouds,cldsa,mtopa,mbota, de_lgth) ! OUT - endif ! end if_imp_physics + call progcld5 ( & ! IN + p_lay/100., & ! IN + p_lev/100., & ! IN + t_lay, & ! IN + q_lay, & ! IN + qs_lay, & ! IN + relhum, & ! IN + tracer, & ! IN + Grid%xlat, & ! IN + Grid%xlon, & ! IN + Sfcprop%slmsk, & ! IN + deltaZ, & ! IN + deltaP/100., & ! IN + Model%ntrac-1, & ! IN - Number of tracers + Model%ntcw-1, & ! IN - Tracer index for cloud condensate (or liquid water) + Model%ntiw-1, & ! IN - Tracer index for ice + Model%ntrw-1, & ! IN - Tracer index for rain + Model%ntsw-1, & ! IN - Tracer index for snow + Model%ntgl-1, & ! IN - Tracer index for groupel + im, & ! IN + Model%levs, & ! IN + Model%levs+1, & ! IN + Model%uni_cld, & ! IN + Model%lmfshal, & ! IN + Model%lmfdeep2, & ! IN + cldcov(:,1:Model%levs), & ! IN + Tbd%phy_f3d(:,:,1), & ! IN + Tbd%phy_f3d(:,:,2), & ! IN + Tbd%phy_f3d(:,:,3), & ! IN + clouds, & ! OUT + cldsa, & ! OUT + mtopa, & ! OUT + mbota, & ! OUT + de_lgth) ! OUT + endif ! end if_imp_physics + ! Copy output cloud fields cld_frac = clouds(:,:,1) cld_lwp = clouds(:,:,2) cld_reliq = clouds(:,:,3) cld_iwp = clouds(:,:,4) cld_reice = clouds(:,:,5) - + ! ####################################################################################### ! mg, sfc-perts - ! --- scale random patterns for surface perturbations with - ! perturbation size + ! --- scale random patterns for surface perturbations with perturbation size ! --- turn vegetation fraction pattern into percentile pattern + ! ####################################################################################### alb1d(:) = 0. if (Model%do_sfcperts) then if (Model%pertalb(1) > 0.) then @@ -673,27 +664,29 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Sfcprop, Statein, Tbd, Coupling, call cdfnor(Coupling%sfc_wts(i,5),alb1d(i)) enddo endif - endif - ! mg, sfc-perts - + endif ! ####################################################################################### ! Call module_radiation_aerosols::setaer(),to setup aerosols property profile for both ! LW and SW radiation. ! ####################################################################################### - call setaer (plvl, plyr, prslk1, tvly, rhly, Sfcprop%slmsk, tracer1, Grid%xlon, & - Grid%xlat, IM, LMK, LMP, Model%lsswr, Model%lslwr, faersw2, faerlw, aerodp) + call setaer (p_lev, p_lay, Statein%prslk(1:IM,iSFC:iTOA), tv_lay, relhum, Sfcprop%slmsk, tracer, Grid%xlon, & + Grid%xlat, IM, Model%levs, Model%levs+1, Model%lsswr, Model%lslwr, faersw2, faerlw, aerodp) ! Store aerosol optical properties ! SW. ! For RRTMGP SW the bands are now ordered from [IR(band) -> nIR -> UV], in RRTMG the ! band ordering was [nIR -> UV -> IR(band)] - faersw(1:IM,1:LMK,1,1) = faersw2(1:IM,1:LMK,kdist_sw%get_nband(),1) - faersw(1:IM,1:LMK,1,2) = faersw2(1:IM,1:LMK,kdist_sw%get_nband(),2) - faersw(1:IM,1:LMK,1,3) = faersw2(1:IM,1:LMK,kdist_sw%get_nband(),3) - faersw(1:IM,1:LMK,2:kdist_sw%get_nband(),1) = faersw2(1:IM,1:LMK,1:kdist_sw%get_nband()-1,1) - faersw(1:IM,1:LMK,2:kdist_sw%get_nband(),2) = faersw2(1:IM,1:LMK,1:kdist_sw%get_nband()-1,2) - faersw(1:IM,1:LMK,2:kdist_sw%get_nband(),3) = faersw2(1:IM,1:LMK,1:kdist_sw%get_nband()-1,3) + faersw(1:IM,1:Model%levs,1,1) = faersw2(1:IM,1:Model%levs,kdist_sw%get_nband(),1) + faersw(1:IM,1:Model%levs,1,2) = faersw2(1:IM,1:Model%levs,kdist_sw%get_nband(),2) + faersw(1:IM,1:Model%levs,1,3) = faersw2(1:IM,1:Model%levs,kdist_sw%get_nband(),3) + faersw(1:IM,1:Model%levs,2:kdist_sw%get_nband(),1) = faersw2(1:IM,1:Model%levs,1:kdist_sw%get_nband()-1,1) + faersw(1:IM,1:Model%levs,2:kdist_sw%get_nband(),2) = faersw2(1:IM,1:Model%levs,1:kdist_sw%get_nband()-1,2) + faersw(1:IM,1:Model%levs,2:kdist_sw%get_nband(),3) = faersw2(1:IM,1:Model%levs,1:kdist_sw%get_nband()-1,3) + + ! Setup surface ground temperature and ground/air skin temperature if required. + tsfg(1:IM) = Sfcprop%tsfc(1:IM) + tsfa(1:IM) = Sfcprop%tsfc(1:IM) ! ####################################################################################### ! Call module_radiation_surface::setemis(),to setup surface emissivity for LW radiation. @@ -705,21 +698,46 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Sfcprop, Statein, Tbd, Coupling, sfc_emiss_byband(iBand,1:IM) = Radtend%semis(1:IM) enddo endif - + ! ####################################################################################### - ! Set gas concentrations for RRTMGP + ! For SW, gather daylit points, compute surface albedo in each band, ! ####################################################################################### - ! Compute volume mixing-ratios for ozone (mmr) and specific-humidity. - vmr_h2o = merge((qlyr/(1-qlyr))*amdw, 0., qlyr .ne. 1.) - vmr_o3 = merge(olyr*amdo3, 0., olyr .gt. 0.) - ! - call gas_concentrations%reset() - call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations%set_vmr('o2', gasvmr(:,:,4))) - call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations%set_vmr('co2', gasvmr(:,:,1))) - call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations%set_vmr('ch4', gasvmr(:,:,3))) - call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations%set_vmr('n2o', gasvmr(:,:,2))) - call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations%set_vmr('h2o', vmr_h2o)) - call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations%set_vmr('o3', vmr_o3)) + if (Model%lsswr) then + ! Check for daytime points for SW radiation. + nday = 0 + idxday = 0 + do i = 1, IM + if (Radtend%coszen(i) >= 0.0001) then + nday = nday + 1 + idxday(nday) = i + endif + enddo + + ! Call module_radiation_surface::setalb() to setup surface albedo. + call setalb (Sfcprop%slmsk, Sfcprop%snowd, Sfcprop%sncovr,& ! --- inputs: + Sfcprop%snoalb, Sfcprop%zorl, Radtend%coszen,& + tsfg, tsfa, Sfcprop%hprim, Sfcprop%alvsf, & + Sfcprop%alnsf, Sfcprop%alvwf, Sfcprop%alnwf, & + Sfcprop%facsf, Sfcprop%facwf, Sfcprop%fice, & + Sfcprop%tisfc, IM, & + alb1d, Model%pertalb, & ! mg, sfc-perts + sfcalb) ! --- outputs + + ! Approximate mean surface albedo from vis- and nir- diffuse values. + Radtend%sfalb(:) = max(0.01, 0.5 * (sfcalb(:,2) + sfcalb(:,4))) + else + nday = 0 + idxday = 0 + sfcalb = 0.0 + endif + + ! Spread across all SW bands + do iBand=1,kdist_sw%get_nband() + sfc_alb_nir_dir(iBand,1:IM) = sfcalb(1:IM,1) + sfc_alb_nir_dif(iBand,1:IM) = sfcalb(1:IM,2) + sfc_alb_uvvis_dir(iBand,1:IM) = sfcalb(1:IM,3) + sfc_alb_uvvis_dif(iBand,1:IM) = sfcalb(1:IM,4) + enddo end subroutine GFS_rrtmgp_pre_run diff --git a/physics/GFS_rrtmgp_sw.F90 b/physics/GFS_rrtmgp_sw.F90 new file mode 100644 index 000000000..b64d4d712 --- /dev/null +++ b/physics/GFS_rrtmgp_sw.F90 @@ -0,0 +1,187 @@ +module GFS_rrtmgp_sw + use GFS_typedefs, only: GFS_control_type + use machine, only: kind_phys + use physparam, only: isubcsw, iovrsw + use rrtmgp_sw, only: nrghice_sw => nrghice, ipsdsw0 + use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp + use mo_cloud_optics, only: ty_cloud_optics + use mo_optical_props, only: ty_optical_props_2str + use mo_cloud_sampling, only: sampled_mask_max_ran, sampled_mask_exp_ran, draw_samples + use mersenne_twister, only: random_setseed, random_number, random_stat + + public GFS_rrtmgp_sw_run,GFS_rrtmgp_sw_init,GFS_rrtmgp_sw_finalize + +contains + + subroutine GFS_rrtmgp_sw_init() + end subroutine GFS_rrtmgp_sw_init + ! ######################################################################################### + ! ######################################################################################### +!! \section arg_table_GFS_rrtmgp_sw_run Argument Table +!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | +!! |-----------------------|------------------------------------------------------|------------------------------------------------------------------------------|---------|------|-----------------------|-----------|--------|----------| +!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | +!! | ncol | horizontal_loop_extent | horizontal dimension | count | 0 | integer | | in | F | +!! | p_lay | air_pressure_at_layer_for_RRTMGP_in_hPa | air pressure layer | hPa | 2 | real | kind_phys | in | F | +!! | t_lay | air_temperature_at_layer_for_RRTMGP | air temperature layer | K | 2 | real | kind_phys | in | F | +!! | p_lev | air_pressure_at_interface_for_RRTMGP_in_hPa | air pressure level | hPa | 2 | real | kind_phys | in | F | +!! | cld_frac | total_cloud_fraction | layer total cloud fraction | frac | 2 | real | kind_phys | in | F | +!! | cld_lwp | cloud_liquid_water_path | layer cloud liquid water path | g m-2 | 2 | real | kind_phys | in | F | +!! | cld_reliq | mean_effective_radius_for_liquid_cloud | mean effective radius for liquid cloud | micron | 2 | real | kind_phys | in | F | +!! | cld_iwp | cloud_ice_water_path | layer cloud ice water path | g m-2 | 2 | real | kind_phys | in | F | +!! | cld_reice | mean_effective_radius_for_ice_cloud | mean effective radius for ice cloud | micron | 2 | real | kind_phys | in | F | +!! | icseed_sw | seed_random_numbers_sw | seed for random number generation for shortwave radiation | none | 1 | integer | | in | F | +!! | kdist_sw | K_distribution_file_for_RRTMGP_SW_scheme | DDT containing spectral information for RRTMGP SW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | +!! | aerosols | aerosol_optical_properties_for_shortwave_bands_01-16 | aerosol optical properties for shortwave bands 01-16 | various | 4 | real | kind_phys | in | F | +!! | kdist_cldy_sw | K_distribution_file_for_cloudy_RRTMGP_SW_scheme | DDT containing spectral information for cloudy RRTMGP SW radiation scheme | DDT | 0 | ty_cloud_optics | | in | F | +!! | optical_props_clouds | shortwave_optical_properties_for_cloudy_atmosphere | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_2str | | out | F | +!! | optical_props_aerosol | shortwave_optical_properties_for_aerosols | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_2str | | out | F | +!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | +!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! + ! ######################################################################################### + ! ######################################################################################### + subroutine GFS_rrtmgp_sw_run(Model, ncol, icseed_sw, p_lay, t_lay, p_lev, cld_frac, & + cld_lwp, cld_reliq, cld_iwp, cld_reice, kdist_sw, aerosols, kdist_cldy_sw, & + optical_props_clouds, optical_props_aerosol, errmsg, errflg) + + ! Inputs + type(GFS_control_type), intent(in) :: & + Model + integer, intent(in) :: & + ncol ! Number of horizontal gridpoints + integer,intent(in),dimension(ncol) :: & + icseed_sw ! auxiliary special cloud related array when module + ! variable isubcsw=2, it provides permutation seed + ! for each column profile that are used for generating + ! random numbers. when isubcsw /=2, it will not be used. + real(kind_phys), dimension(ncol,model%levs), intent(in) :: & + p_lay, & ! Pressure @ model layer-centers (hPa) + t_lay ! Temperature (K) + real(kind_phys), dimension(ncol,model%levs+1), intent(in) :: & + p_lev ! Pressure @ model layer-interfaces (hPa) + real(kind_phys), dimension(ncol,model%levs),intent(in) :: & + cld_frac, & ! Total cloud fraction by layer + cld_lwp, & ! Cloud liquid water path + cld_reliq, & ! Cloud liquid effective radius + cld_iwp, & ! Cloud ice water path + cld_reice ! Cloud ice effective radius + type(ty_gas_optics_rrtmgp),intent(in) :: & + kdist_sw ! RRTMGP DDT containing spectral information for SW calculation + type(ty_cloud_optics),intent(in) :: & + kdist_cldy_sw ! + real(kind_phys), intent(in),dimension(ncol, model%levs, kdist_sw%get_nband(),3) :: & + aerosols ! + + ! Outputs + type(ty_optical_props_2str),intent(out) :: & + optical_props_clouds, & + optical_props_aerosol + integer, intent(out) :: errflg + character(len=*), intent(out) :: errmsg + + ! Local variables + integer :: iCol + integer,dimension(ncol) :: ipseed_sw + logical,dimension(ncol,model%levs) :: liqmask, icemask + type(ty_optical_props_2str) :: optical_props_cloudsByBand + type(random_stat) :: rng_stat + real(kind_phys), dimension(kdist_sw%get_ngpt(),model%levs,ncol) :: rng3D + real(kind_phys), dimension(kdist_sw%get_ngpt()*model%levs) :: rng1D + logical, dimension(ncol,model%levs,kdist_sw%get_ngpt()) :: cldfracMCICA + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + + if (.not. Model%lsswr) return + + ! ####################################################################################### + ! Change random number seed value for each radiation invocation (isubcsw =1 or 2). + ! ####################################################################################### + if(isubcsw == 1) then ! advance prescribed permutation seed + do iCol = 1, ncol + ipseed_sw(iCol) = ipsdsw0 + iCol + enddo + elseif (isubcsw == 2) then ! use input array of permutaion seeds + do iCol = 1, ncol + ipseed_sw(iCol) = icseed_sw(iCol) + enddo + endif + + ! ####################################################################################### + ! Compute ice/liquid cloud masks, needed by rrtmgp_cloud_optics + ! ####################################################################################### + liqmask = (cld_frac .gt. 0 .and. cld_lwp .gt. 0) + icemask = (cld_frac .gt. 0 .and. cld_iwp .gt. 0) + + ! ####################################################################################### + ! Allocate space for RRTMGP DDTs containing cloud and aerosol radiative properties + ! ####################################################################################### + ! Cloud optics [ncol,model%levs,nBands] + call check_error_msg('GFS_rrtmgp_sw_run',optical_props_cloudsByBand%alloc_2str(ncol, model%levs, kdist_sw%get_band_lims_wavenumber())) + ! Aerosol optics [ncol,model%levs,nBands] + call check_error_msg('GFS_rrtmgp_sw_run',optical_props_aerosol%alloc_2str(ncol, model%levs, kdist_sw%get_band_lims_wavenumber())) + ! Cloud optics [ncol,model%levs,nGpts] + call check_error_msg('GFS_rrtmgp_sw_run',optical_props_clouds%alloc_2str(ncol, model%levs, kdist_sw)) + + ! ####################################################################################### + ! Copy aerosol optical information to RRTMGP DDT + ! ####################################################################################### + optical_props_aerosol%tau = aerosols(:,:,:,1) + optical_props_aerosol%ssa = aerosols(:,:,:,2) + optical_props_aerosol%g = aerosols(:,:,:,3) + + ! ####################################################################################### + ! Compute cloud-optics for RTE. + ! ####################################################################################### + call check_error_msg('GFS_rrtmgp_sw_run',kdist_cldy_sw%cloud_optics(& + ncol, & ! IN - Number of daylit gridpoints + model%levs, & ! IN - Number of vertical layers + kdist_sw%get_nband(), & ! IN - Number of SW bands + nrghice_sw, & ! IN - Number of ice-roughness categories + liqmask, & ! IN - Liquid-cloud mask + icemask, & ! IN - Ice-cloud mask + cld_lwp, & ! IN - Cloud liquid water path + cld_iwp, & ! IN - Cloud ice water path + cld_reliq, & ! IN - Cloud liquid effective radius + cld_reice, & ! IN - Cloud ice effective radius + optical_props_cloudsByBand)) ! OUT - RRTMGP DDT containing cloud radiative properties + ! in each band + ! ####################################################################################### + ! Call McICA to generate subcolumns. + ! ####################################################################################### + ! Call RNG. Mersennse Twister accepts 1D array, so loop over columns and collapse along G-points + ! and layers. ([nGpts,model%levs,nColumn]-> [nGpts*model%levs]*nColumn) + do iCol=1,ncol + call random_setseed(ipseed_sw(icol),rng_stat) + call random_number(rng1D,rng_stat) + rng3D(:,:,iCol) = reshape(source = rng1D,shape=[kdist_sw%get_ngpt(),model%levs]) + enddo + + ! Call McICA + select case ( iovrsw ) + ! Maximumn-random + case(1) + call check_error_msg('GFS_rrtmgp_sw_run',sampled_mask_max_ran(rng3D,cld_frac,cldfracMCICA)) + end select + + ! Map band optical depth to each g-point using McICA + call check_error_msg('GFS_rrtmgp_sw_run',draw_samples(cldfracMCICA,optical_props_cloudsByBand,optical_props_clouds)) + + end subroutine GFS_rrtmgp_sw_run + + subroutine GFS_rrtmgp_sw_finalize() + end subroutine GFS_rrtmgp_sw_finalize + + subroutine check_error_msg(routine_name, error_msg) + character(len=*), intent(in) :: & + error_msg, routine_name + + if(error_msg /= "") then + print*,"ERROR("//trim(routine_name)//"): " + print*,trim(error_msg) + return + end if + end subroutine check_error_msg +end module GFS_rrtmgp_sw diff --git a/physics/rrtmgp_lw.F90 b/physics/rrtmgp_lw.F90 index 1bf2fef70..c70f8bec1 100644 --- a/physics/rrtmgp_lw.F90 +++ b/physics/rrtmgp_lw.F90 @@ -662,11 +662,11 @@ end subroutine rrtmgp_lw_init !! \section arg_table_rrtmgp_lw_run Argument Table !! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | !! |-------------------------|-----------------------------------------------------------------------------------------------|--------------------------------------------------------------------|-------|------|-----------------------|-----------|--------|----------| +!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | !! | ncol | horizontal_loop_extent | horizontal dimension | count | 0 | integer | | in | F | -!! | nlay | adjusted_vertical_layer_dimension_for_radiation | number of vertical layers for radiation | count | 0 | integer | | in | F | -!! | p_lay | air_pressure_at_layer_for_radiation_in_hPa | air pressure layer | hPa | 2 | real | kind_phys | in | F | -!! | p_lev | air_pressure_at_interface_for_radiation_in_hPa | air pressure level | hPa | 2 | real | kind_phys | in | F | -!! | t_lay | air_temperature_at_layer_for_radiation | air temperature layer | K | 2 | real | kind_phys | in | F | +!! | p_lay | air_pressure_at_layer_for_RRTMGP_in_hPa | air pressure layer | hPa | 2 | real | kind_phys | in | F | +!! | p_lev | air_pressure_at_interface_for_RRTMGP_in_hPa | air pressure level | hPa | 2 | real | kind_phys | in | F | +!! | t_lay | air_temperature_at_layer_for_RRTMGP | air temperature layer | K | 2 | real | kind_phys | in | F | !! | skt | surface_ground_temperature_for_radiation | surface ground temperature for radiation | K | 1 | real | kind_phys | in | F | !! | sfc_emiss | surface_longwave_emissivity_in_each_band | surface lw emissivity in fraction in each LW band | frac | 2 | real | kind_phys | in | F | !! | kdist_lw | K_distribution_file_for_RRTMGP_LW_scheme | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | @@ -683,18 +683,18 @@ end subroutine rrtmgp_lw_init !! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | !! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | !! - subroutine rrtmgp_lw_run(ncol, nlay, kdist_lw, p_lay, t_lay, p_lev, skt, & + subroutine rrtmgp_lw_run(Model, ncol, kdist_lw, p_lay, t_lay, p_lev, skt, & sfc_emiss, gas_concentrations, optical_propsLW_clds, optical_propsLW_aerosol,& lslwr, fluxUP_allsky, fluxDOWN_allsky, fluxUP_clrsky, fluxDOWN_clrsky, hlw0, hlwb, errmsg, errflg) ! Inputs + type(GFS_control_type), intent(in) :: Model integer, intent(in) :: & - ncol, & ! Number of horizontal gridpoints - nlay ! Number of vertical layers - real(kind_phys), dimension(ncol,nlay), intent(in) :: & + ncol ! Number of horizontal gridpoints + real(kind_phys), dimension(ncol,model%levs), intent(in) :: & p_lay, & ! Pressure @ model layer-centers (hPa) t_lay ! Temperature (K) - real(kind_phys), dimension(ncol,nlay+1), intent(in) :: & + real(kind_phys), dimension(ncol,model%levs+1), intent(in) :: & p_lev ! Pressure @ model layer-interfaces (hPa) real(kind_phys), dimension(ncol), intent(in) :: & skt ! Surface(skin) temperature (K) @@ -713,25 +713,25 @@ subroutine rrtmgp_lw_run(ncol, nlay, kdist_lw, p_lay, t_lay, p_lev, skt, & ! Outputs character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg - real(kind_phys), dimension(ncol,nlay), intent(out) :: & + real(kind_phys), dimension(ncol,model%levs), intent(out) :: & fluxUP_allsky, & ! All-sky flux (W/m2) fluxDOWN_allsky, & ! All-sky flux (W/m2) fluxUP_clrsky, & ! Clear-sky flux (W/m2) fluxDOWN_clrsky ! All-sky flux (W/m2) ! Outputs (optional) - real(kind_phys), dimension(ncol,nlay,kdist_lw%get_nband()), optional, intent(inout) :: & + real(kind_phys), dimension(ncol,model%levs,kdist_lw%get_nband()), optional, intent(inout) :: & hlwb ! All-sky heating rate, by band (K/sec) - real(kind_phys), dimension(ncol,nlay), optional, intent(inout) :: & + real(kind_phys), dimension(ncol,model%levs), optional, intent(inout) :: & hlw0 ! Clear-sky heating rate (K/sec) ! Local variables type(ty_fluxes_byband) :: & flux_allsky, & ! All-sky flux (W/m2) flux_clrsky ! Clear-sky flux (W/m2) - real(kind_phys), dimension(ncol,nlay+1),target :: & + real(kind_phys), dimension(ncol,model%levs+1),target :: & fluxLW_up_allsky, fluxLW_up_clrsky, fluxLW_dn_allsky, fluxLW_dn_clrsky - real(kind_phys), dimension(ncol,nlay+1,kdist_lw%get_nband()),target :: & + real(kind_phys), dimension(ncol,model%levs+1,kdist_lw%get_nband()),target :: & fluxLWBB_up_allsky, fluxLWBB_dn_allsky logical :: l_ClrSky_HR, l_AllSky_HR_byband integer :: k @@ -766,8 +766,8 @@ subroutine rrtmgp_lw_run(ncol, nlay, kdist_lw, p_lay, t_lay, p_lev, skt, & skt, & ! IN - skin temperature (K) sfc_emiss, & ! IN - surface emissivity in each LW band optical_propsLW_clds, & ! IN - DDT containing cloud optical information - flux_allsky, & ! OUT - Fluxes, all-sky, 3D (nCol,nLay,nBand) - flux_clrsky, & ! OUT - Fluxes, clear-sky, 3D (nCol,nLay,nBand) + flux_allsky, & ! OUT - Fluxes, all-sky, 3D (nCol,model%levs,nBand) + flux_clrsky, & ! OUT - Fluxes, clear-sky, 3D (nCol,model%levs,nBand) aer_props = optical_propsLW_aerosol)) ! IN(optional) - DDT containing aerosol optical information fluxUP_allsky = flux_allsky%flux_up fluxDOWN_allsky = flux_allsky%flux_dn diff --git a/physics/rrtmgp_sw.F90 b/physics/rrtmgp_sw.F90 index 3a5440bae..97d485f2f 100644 --- a/physics/rrtmgp_sw.F90 +++ b/physics/rrtmgp_sw.F90 @@ -669,11 +669,11 @@ end subroutine rrtmgp_sw_init !! \section arg_table_rrtmgp_sw_run Argument Table !! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | !! |-------------------------|------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------|-------|------|-----------------------|-----------|--------|----------| +!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | !! | ncol | horizontal_loop_extent | horizontal dimension | count | 0 | integer | | in | F | -!! | nlay | adjusted_vertical_layer_dimension_for_radiation | number of vertical layers for radiation | count | 0 | integer | | in | F | -!! | p_lay | air_pressure_at_layer_for_radiation_in_hPa | air pressure layer | hPa | 2 | real | kind_phys | in | F | -!! | p_lev | air_pressure_at_interface_for_radiation_in_hPa | air pressure level | hPa | 2 | real | kind_phys | in | F | -!! | t_lay | air_temperature_at_layer_for_radiation | air temperature layer | K | 2 | real | kind_phys | in | F | +!! | p_lay | air_pressure_at_layer_for_RRTMGP_in_hPa | air pressure layer | hPa | 2 | real | kind_phys | in | F | +!! | p_lev | air_pressure_at_interface_for_RRTMGP_in_hPa | air pressure level | hPa | 2 | real | kind_phys | in | F | +!! | t_lay | air_temperature_at_layer_for_RRTMGP | air temperature layer | K | 2 | real | kind_phys | in | F | !! | kdist_sw | K_distribution_file_for_RRTMGP_SW_scheme | DDT containing spectral information for RRTMGP SW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | !! | optical_props_clds | shortwave_optical_properties_for_cloudy_atmosphere | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_2str | | in | F | !! | optical_props_aerosol | shortwave_optical_properties_for_aerosols | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_2str | | in | F | @@ -694,22 +694,22 @@ end subroutine rrtmgp_sw_init !! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | !! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | !! - subroutine rrtmgp_sw_run(ncol, nlay, kdist_sw, p_lay, t_lay, p_lev, gas_concentrations, & + subroutine rrtmgp_sw_run(Model, ncol, kdist_sw, p_lay, t_lay, p_lev, gas_concentrations, & optical_props_clds, optical_props_aerosol,& lsswr, sfcalb_nir_dir, sfcalb_nir_dif, cossza, nday, idxday, hsw0, hswb, scmpsw, & fluxUP_allsky, fluxDOWN_allsky, fluxUP_clrsky, fluxDOWN_clrsky, errmsg, errflg) ! Inputs + type(GFS_control_type), intent(in) :: Model integer, intent(in) :: & ncol, & ! Number of horizontal gridpoints - nlay, & ! Number of vertical layers nday ! Number of daytime points integer, intent(in), dimension(nday) :: & idxday ! Index array for daytime points - real(kind_phys), dimension(ncol,nlay), intent(in) :: & + real(kind_phys), dimension(ncol,Model%levs), intent(in) :: & p_lay, & ! Pressure @ model layer-centers (hPa) t_lay ! Temperature (K) - real(kind_phys), dimension(ncol,nlay+1), intent(in) :: & + real(kind_phys), dimension(ncol,Model%levs+1), intent(in) :: & p_lev ! Pressure @ model layer-interfaces (hPa) type(ty_gas_optics_rrtmgp),intent(in) :: & kdist_sw ! DDT containing SW spectral information @@ -730,16 +730,16 @@ subroutine rrtmgp_sw_run(ncol, nlay, kdist_sw, p_lay, t_lay, p_lev, gas_concentr ! Outputs character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg - real(kind_phys), dimension(ncol,nlay), intent(out) :: & + real(kind_phys), dimension(ncol,Model%levs), intent(out) :: & fluxUP_allsky, & ! All-sky flux (W/m2) fluxDOWN_allsky, & ! All-sky flux (W/m2) fluxUP_clrsky, & ! Clear-sky flux (W/m2) fluxDOWN_clrsky ! All-sky flux (W/m2) ! Inputs (optional) (NOTE. We only need the optional arguments to know what fluxes to output, HR's are computed later) - real(kind_phys), dimension(ncol,nlay), optional, intent(inout) :: & + real(kind_phys), dimension(ncol,Model%levs), optional, intent(inout) :: & hsw0 ! Clear-sky heating rate (K/sec) - real(kind_phys), dimension(ncol,nlay,kdist_sw%get_nband()), intent(inout), optional :: & + real(kind_phys), dimension(ncol,Model%levs,kdist_sw%get_nband()), intent(inout), optional :: & hswb ! All-sky heating rate, by band (K/sec) ! Outputs (optional) type(cmpfsw_type), dimension(ncol), intent(inout),optional :: & @@ -755,11 +755,11 @@ subroutine rrtmgp_sw_run(ncol, nlay, kdist_sw, p_lay, t_lay, p_lev, gas_concentr type(ty_fluxes_byband) :: & flux_allsky, & ! All-sky flux (W/m2) flux_clrsky ! Clear-sky flux (W/m2) - real(kind_phys), dimension(nday,nlay+1),target :: & + real(kind_phys), dimension(nday,Model%levs+1),target :: & fluxSW_up_allsky, fluxSW_up_clrsky, fluxSW_dn_allsky, fluxSW_dn_clrsky - real(kind_phys), dimension(nday,nlay+1,kdist_sw%get_nband()),target :: & + real(kind_phys), dimension(nday,Model%levs+1,kdist_sw%get_nband()),target :: & fluxSWBB_up_allsky, fluxSWBB_dn_allsky - real(kind_phys), dimension(ncol,nlay) :: vmrTemp + real(kind_phys), dimension(ncol,Model%levs) :: vmrTemp logical :: l_ClrSky_HR=.false., l_AllSky_HR_byband=.false., l_scmpsw=.false. integer :: k, iGas type(ty_optical_props_2str) :: & @@ -789,13 +789,13 @@ subroutine rrtmgp_sw_run(ncol, nlay, kdist_sw, p_lay, t_lay, p_lev, gas_concentr if (nDay .gt. 0) then ! Subset the cloud and aerosol radiative properties over daylit points. - ! Cloud optics [nDay,nLay,nBands] - call check_error_msg('rrtmgp_sw_run',optical_props_clds_daylit%alloc_2str(nday, nlay, kdist_sw)) + ! Cloud optics [nDay,Model%levs,nBands] + call check_error_msg('rrtmgp_sw_run',optical_props_clds_daylit%alloc_2str(nday, Model%levs, kdist_sw)) optical_props_clds_daylit%tau = optical_props_clds%tau(idxday,:,:) optical_props_clds_daylit%ssa = optical_props_clds%ssa(idxday,:,:) optical_props_clds_daylit%g = optical_props_clds%g(idxday,:,:) - ! Aerosol optics [nDay,nLay,nBands] - call check_error_msg('rrtmgp_sw_run',optical_props_aerosol_daylit%alloc_2str(nday, nlay, kdist_sw%get_band_lims_wavenumber())) + ! Aerosol optics [nDay,Model%levs,nBands] + call check_error_msg('rrtmgp_sw_run',optical_props_aerosol_daylit%alloc_2str(nday, Model%levs, kdist_sw%get_band_lims_wavenumber())) optical_props_aerosol_daylit%tau = optical_props_aerosol%tau(idxday,:,:) optical_props_aerosol_daylit%ssa = optical_props_aerosol%ssa(idxday,:,:) optical_props_aerosol_daylit%g = optical_props_aerosol%g(idxday,:,:) @@ -821,15 +821,15 @@ subroutine rrtmgp_sw_run(ncol, nlay, kdist_sw, p_lay, t_lay, p_lev, gas_concentr call check_error_msg('rrtmgp_sw_run',rte_sw( & kdist_sw, & ! IN - spectral information gas_concentrations_daylit, & ! IN - gas concentrations (vmr) - p_lay(idxday,1:nlay), & ! IN - pressure at layer interfaces (Pa) - t_lay(idxday,1:nlay), & ! IN - temperature at layer interfaes (K) - p_lev(idxday,1:nlay+1), & ! IN - pressure at layer centers (Pa) + p_lay(idxday,1:Model%levs), & ! IN - pressure at layer interfaces (Pa) + t_lay(idxday,1:Model%levs), & ! IN - temperature at layer interfaes (K) + p_lev(idxday,1:Model%levs+1), & ! IN - pressure at layer centers (Pa) cossza(idxday), & ! IN - Cosine of solar zenith angle sfcalb_nir_dir(:,idxday), & ! IN - Shortwave surface albedo (direct) sfcalb_nir_dif(:,idxday), & ! IN - Shortwave surface albedo (diffuse) optical_props_clds_daylit, & ! IN - DDT containing cloud optical information - flux_allsky, & ! OUT - Fluxes, all-sky, 3D (nCol,nLay,nBand) - flux_clrsky, & ! OUT - Fluxes, clear-sky, 3D (nCol,nLay,nBand) + flux_allsky, & ! OUT - Fluxes, all-sky, 3D (nCol,Model%levs,nBand) + flux_clrsky, & ! OUT - Fluxes, clear-sky, 3D (nCol,Model%levs,nBand) aer_props = optical_props_aerosol_daylit)) ! IN(optional) - DDT containing aerosol optical information fluxUP_allsky(idxday,:) = flux_allsky%flux_up fluxDOWN_allsky(idxday,:) = flux_allsky%flux_dn diff --git a/physics/rrtmgp_sw_post.F90 b/physics/rrtmgp_sw_post.F90 deleted file mode 100644 index d5bc2692e..000000000 --- a/physics/rrtmgp_sw_post.F90 +++ /dev/null @@ -1,154 +0,0 @@ -!>\file rrtmgp_sw_post -!! This file contains - module rrtmgp_sw_post - contains - -!>\defgroup rrtmgp_sw_post GFS RRTMGP scheme post -!! @{ -!> \section arg_table_rrtmgp_sw_post_init Argument Table -!! - subroutine rrtmgp_sw_post_init () - end subroutine rrtmgp_sw_post_init -! PGI compiler does not accept lines longer than 264 characters, remove during pre-processing -#ifndef __PGI -!> \section arg_table_rrtmgp_sw_post_run Argument Table -!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | -!! |----------------|------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------|----------|------|-----------------------|-----------|--------|----------| -!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | -!! | Grid | GFS_grid_type_instance | Fortran DDT containing FV3-GFS grid and interpolation related data | DDT | 0 | GFS_grid_type | | in | F | -!! | Diag | GFS_diag_type_instance | Fortran DDT containing FV3-GFS diagnotics data | DDT | 0 | GFS_diag_type | | inout | F | -!! | Radtend | GFS_radtend_type_instance | Fortran DDT containing FV3-GFS fields targetted for diagnostic output | DDT | 0 | GFS_radtend_type | | inout | F | -!! | Coupling | GFS_coupling_type_instance | Fortran DDT containing FV3-GFS fields to/from coupling with other components | DDT | 0 | GFS_coupling_type | | inout | F | -!! | im | horizontal_loop_extent | horizontal loop extent | count | 0 | integer | | in | F | -!! | ltp | extra_top_layer | extra top layers | none | 0 | integer | | in | F | -!! | nday | daytime_points_dimension | daytime points dimension | count | 0 | integer | | in | F | -!! | lm | vertical_layer_dimension_for_radiation | number of vertical layers for radiation calculation | count | 0 | integer | | in | F | -!! | kd | vertical_index_difference_between_inout_and_local | vertical index difference between in/out and local | index | 0 | integer | | in | F | -!! | htswc | tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step | total sky heating rate due to shortwave radiation | K s-1 | 2 | real | kind_phys | in | F | -!! | htsw0 | tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_time_step | clear sky heating rates due to shortwave radiation | K s-1 | 2 | real | kind_phys | in | F | -!! | sfcalb1 | surface_albedo_due_to_near_IR_direct | surface albedo due to near IR direct beam | frac | 1 | real | kind_phys | in | F | -!! | sfcalb2 | surface_albedo_due_to_near_IR_diffused | surface albedo due to near IR diffused beam | frac | 1 | real | kind_phys | in | F | -!! | sfcalb3 | surface_albedo_due_to_UV_and_VIS_direct | surface albedo due to UV+VIS direct beam | frac | 1 | real | kind_phys | in | F | -!! | sfcalb4 | surface_albedo_due_to_UV_and_VIS_diffused | surface albedo due to UV+VIS diffused beam | frac | 1 | real | kind_phys | in | F | -!! | scmpsw | components_of_surface_downward_shortwave_fluxes | derived type for special components of surface downward shortwave fluxes | W m-2 | 1 | cmpfsw_type | | inout | F | -!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | -!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | -!! -#endif - subroutine rrtmgp_sw_post_run (Model, Grid, Diag, Radtend, Coupling, & - im, ltp, nday, lm, kd, htswc, htsw0, & - sfcalb1, sfcalb2, sfcalb3, sfcalb4, scmpsw, errmsg, errflg) - - use machine, only: kind_phys - use module_radsw_parameters, only: topfsw_type, sfcfsw_type, & - cmpfsw_type - use GFS_typedefs, only: GFS_coupling_type, & - GFS_control_type, & - GFS_grid_type, & - GFS_radtend_type, & - GFS_diag_type - - implicit none - type(GFS_control_type), intent(in) :: Model - type(GFS_coupling_type), intent(inout) :: Coupling - type(GFS_radtend_type), intent(inout) :: Radtend - type(GFS_grid_type), intent(in) :: Grid - type(GFS_diag_type), intent(inout) :: Diag - integer, intent(in) :: im, lm, kd, nday, ltp - type(cmpfsw_type), dimension(size(Grid%xlon,1)), intent(inout) :: scmpsw - real(kind=kind_phys), dimension(Size(Grid%xlon,1), Model%levr+LTP), intent(in) :: htswc, htsw0 - real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(in) :: sfcalb1, sfcalb2, sfcalb3, sfcalb4 - character(len=*), intent(out) :: errmsg - integer, intent(out) :: errflg - ! Local variables - integer :: i, k1, k - - ! Initialize CCPP error handling variables - errmsg = '' - errflg = 0 - - if (Model%lsswr) then - if (nday > 0) then - do k = 1, LM - k1 = k + kd - Radtend%htrsw(1:im,k) = htswc(1:im,k1) - enddo - ! We are assuming that radiative tendencies are from bottom to top - ! --- repopulate the points above levr i.e. LM - if (lm < Model%levs) then - do k = lm,Model%levs - Radtend%htrsw (1:im,k) = Radtend%htrsw (1:im,LM) - enddo - endif - - if (Model%swhtr) then - do k = 1, lm - k1 = k + kd - Radtend%swhc(1:im,k) = htsw0(1:im,k1) - enddo - ! --- repopulate the points above levr i.e. LM - if (lm < Model%levs) then - do k = lm,Model%levs - Radtend%swhc(1:im,k) = Radtend%swhc(1:im,LM) - enddo - endif - endif - -! --- surface down and up spectral component fluxes -!> - Save two spectral bands' surface downward and upward fluxes for -!! output. - - do i=1,im - Coupling%nirbmdi(i) = scmpsw(i)%nirbm - Coupling%nirdfdi(i) = scmpsw(i)%nirdf - Coupling%visbmdi(i) = scmpsw(i)%visbm - Coupling%visdfdi(i) = scmpsw(i)%visdf - - Coupling%nirbmui(i) = scmpsw(i)%nirbm * sfcalb1(i) - Coupling%nirdfui(i) = scmpsw(i)%nirdf * sfcalb2(i) - Coupling%visbmui(i) = scmpsw(i)%visbm * sfcalb3(i) - Coupling%visdfui(i) = scmpsw(i)%visdf * sfcalb4(i) - enddo - - else ! if_nday_block - - Radtend%htrsw(:,:) = 0.0 - - Radtend%sfcfsw = sfcfsw_type( 0.0, 0.0, 0.0, 0.0 ) - Diag%topfsw = topfsw_type( 0.0, 0.0, 0.0 ) - scmpsw = cmpfsw_type( 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ) - - do i=1,im - Coupling%nirbmdi(i) = 0.0 - Coupling%nirdfdi(i) = 0.0 - Coupling%visbmdi(i) = 0.0 - Coupling%visdfdi(i) = 0.0 - - Coupling%nirbmui(i) = 0.0 - Coupling%nirdfui(i) = 0.0 - Coupling%visbmui(i) = 0.0 - Coupling%visdfui(i) = 0.0 - enddo - - if (Model%swhtr) then - Radtend%swhc(:,:) = 0 - endif - - endif ! end_if_nday - -! --- radiation fluxes for other physics processes - do i=1,im - Coupling%sfcnsw(i) = Radtend%sfcfsw(i)%dnfxc - Radtend%sfcfsw(i)%upfxc - Coupling%sfcdsw(i) = Radtend%sfcfsw(i)%dnfxc - enddo - - endif ! end_if_lsswr - - end subroutine rrtmgp_sw_post_run - -!> \section arg_table_rrtmgp_sw_post_finalize Argument Table -!! - subroutine rrtmgp_sw_post_finalize () - end subroutine rrtmgp_sw_post_finalize -!! @} - end module rrtmgp_sw_post From ef4ed600037058c72a8081b6b89b4b333d507c89 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Fri, 31 May 2019 11:54:56 -0600 Subject: [PATCH 029/167] Moved microphysics from GFS_rrtmgp_pre_run() into its own routine, cloud_microphysics(). --- physics/GFS_rrtmgp_pre.F90 | 760 ++++++++++++++++++++----------------- 1 file changed, 414 insertions(+), 346 deletions(-) diff --git a/physics/GFS_rrtmgp_pre.F90 b/physics/GFS_rrtmgp_pre.F90 index 4f20544a6..e981fff1b 100644 --- a/physics/GFS_rrtmgp_pre.F90 +++ b/physics/GFS_rrtmgp_pre.F90 @@ -83,7 +83,7 @@ end subroutine GFS_rrtmgp_pre_init !! | Tbd | GFS_tbd_type_instance | Fortran DDT containing FV3-GFS data not yet assigned to a defined container | DDT | 0 | GFS_tbd_type | | in | F | !! | Coupling | GFS_coupling_type_instance | Fortran DDT containing FV3-GFS fields needed for coupling | DDT | 0 | GFS_coupling_type | | in | F | !! | Radtend | GFS_radtend_type_instance | Fortran DDT containing FV3-GFS radiation tendencies | DDT | 0 | GFS_radtend_type | | inout | F | -!! | im | horizontal_loop_extent | horizontal loop extent | count | 0 | integer | | in | F | +!! | ncol | horizontal_loop_extent | horizontal loop extent | count | 0 | integer | | in | F | !! | kdist_lw | K_distribution_file_for_RRTMGP_LW_scheme | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | !! | kdist_sw | K_distribution_file_for_RRTMGP_SW_scheme | DDT containing spectral information for RRTMGP SW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | !! | raddt | time_step_for_radiation | radiation time step | s | 0 | real | kind_phys | out | F | @@ -115,7 +115,7 @@ end subroutine GFS_rrtmgp_pre_init ! Attention - the output arguments lm, im, lmk, lmp must not be set ! in the CCPP version - they are defined in the interstitial_create routine subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, Tbd, & ! IN - im, kdist_lw, kdist_sw, & ! IN + ncol, kdist_lw, kdist_sw, & ! IN raddt, p_lay, t_lay, p_lev, t_lev, tsfg, tsfa, alb1d, cld_frac, cld_lwp, & ! OUT cld_reliq, cld_iwp, cld_reice, faerlw, faersw, sfc_emiss_byband, nday, idxday, & ! OUT gas_concentrations, sfc_alb_nir_dir, sfc_alb_nir_dif, sfc_alb_uvvis_dir, & ! OUT @@ -137,33 +137,33 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, type(GFS_tbd_type), intent(in) :: & Tbd ! Fortran DDT containing FV3-GFS data not yet assigned to a defined container integer, intent(in) :: & - im ! Number of horizontal grid points + ncol ! Number of horizontal grid points type(ty_gas_optics_rrtmgp),intent(in) :: & kdist_lw, & ! RRTMGP DDT containing spectral information for LW calculation kdist_sw ! RRTMGP DDT containing spectral information for SW calculation ! Outputs - real(kind_phys), dimension(size(Grid%xlon,1),Model%levs), intent(out) :: & + real(kind_phys), dimension(ncol,Model%levs), intent(out) :: & p_lay, & ! t_lay ! - real(kind_phys), dimension(size(Grid%xlon,1),Model%levs+1), intent(out) :: & + real(kind_phys), dimension(ncol,Model%levs+1), intent(out) :: & p_lev, & ! t_lev ! real(kind_phys), intent(out) :: & raddt ! - real(kind_phys), dimension(size(Grid%xlon,1)), intent(out) :: & + real(kind_phys), dimension(ncol), intent(out) :: & tsfg, & ! tsfa ! - real(kind_phys),dimension(kdist_sw%get_nband(),IM),intent(out) :: & + real(kind_phys),dimension(kdist_sw%get_nband(),NCOL),intent(out) :: & sfc_alb_nir_dir, & ! Shortwave surface albedo (nIR-direct) sfc_alb_nir_dif, & ! Shortwave surface albedo (nIR-diffuse) sfc_alb_uvvis_dir, & ! Shortwave surface albedo (uvvis-direct) sfc_alb_uvvis_dif ! Shortwave surface albedo (uvvis-diffuse) integer, intent(out) :: & nday ! Number of daylit points - integer, dimension(size(Grid%xlon,1)), intent(out) :: & + integer, dimension(ncol), intent(out) :: & idxday ! Indices for daylit points - real(kind_phys), dimension(size(Grid%xlon,1)), intent(out) :: & + real(kind_phys), dimension(ncol), intent(out) :: & alb1d ! Surface albedo pertubation type(ty_gas_concs),intent(out) :: & gas_concentrations ! RRTMGP DDT containing gas volumne mixing ratios @@ -171,41 +171,40 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, errmsg ! Error message integer, intent(out) :: & errflg ! Error flag - real(kind_phys),dimension(kdist_sw%get_nband(),IM),intent(out) :: & + real(kind_phys),dimension(kdist_sw%get_nband(),NCOL),intent(out) :: & sfc_emiss_byband ! Longwave surface emissivity in each band - real(kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP),intent(out) :: & + real(kind_phys), dimension(ncol,Model%levr+LTP),intent(out) :: & cld_frac, & ! Total cloud fraction cld_lwp, & ! Cloud liquid water path cld_reliq, & ! Cloud liquid effective radius cld_iwp, & ! Cloud ice water path cld_reice ! Cloud ice effecive radius - real(kind_phys), dimension(size(Grid%xlon,1),Model%levs,kdist_sw%get_nband(),NF_AESW), intent(out) ::& + real(kind_phys), dimension(ncol,Model%levs,kdist_sw%get_nband(),NF_AESW), intent(out) ::& faersw ! Aerosol radiative properties in each SW band. - real(kind_phys), dimension(size(Grid%xlon,1),Model%levs,kdist_lw%get_nband(),NF_AELW), intent(out) ::& + real(kind_phys), dimension(ncol,Model%levs,kdist_lw%get_nband(),NF_AELW), intent(out) ::& faerlw ! Aerosol radiative properties in each LW band. ! Local variables integer :: me, nfxr, ntrac, ntcw, ntiw, ncld, ntrw, ntsw, ntgl,i, j, k, k1, k2, lsk, & LP1, lla, llb, lya, lyb, iCol, iBand, iSFC, iTOA, iLay - integer,dimension(IM) :: ipseed_lw,ipseed_sw - integer,dimension(size(Grid%xlon,1),3) :: mbota,mtopa + integer,dimension(NCOL) :: ipseed_lw,ipseed_sw + integer,dimension(ncol,3) :: mbota,mtopa logical :: top_at_1 - logical,dimension(IM,Model%levs) :: & + logical,dimension(NCOL,Model%levs) :: & liqmask,icemask - real(kind_phys),dimension(IM,Model%levs) :: vmr_o3, vmr_h2o - real(kind_phys) :: es, qs, tem0d, clwmin, clwm, clwt, onemrh, value, tem1, tem2 - real(kind_phys), parameter :: xrc3 = 100. - real(kind_phys), dimension(size(Grid%xlon,1)) :: de_lgth - real(kind_phys), dimension(size(Grid%xlon,1), 5) :: cldsa - real(kind_phys), dimension(size(Grid%xlon,1), NSPC1) :: aerodp - real(kind_phys), dimension(size(Grid%xlon,1), NF_ALBD) :: sfcalb - real(kind_phys), dimension(size(Grid%xlon,1), Model%levs) :: relhum, qs_lay, q_lay, deltaZ, tv_lay,& + real(kind_phys),dimension(NCOL,Model%levs) :: vmr_o3, vmr_h2o + real(kind_phys) :: es, qs + real(kind_phys), dimension(ncol) :: de_lgth + real(kind_phys), dimension(ncol, 5) :: cldsa + real(kind_phys), dimension(ncol, NSPC1) :: aerodp + real(kind_phys), dimension(ncol, NF_ALBD) :: sfcalb + real(kind_phys), dimension(ncol, Model%levs) :: relhum, qs_lay, q_lay, deltaZ, tv_lay,& deltaP, o3_lay, delta_q, cnv_w, cnv_c, effr_l, effr_i, effr_r, effr_s, cldcov - real(kind_phys), dimension(size(Grid%xlon,1), Model%levs, 2:Model%ntrac) :: tracer - real(kind_phys), dimension(size(Grid%xlon,1), Model%levs, NF_VGAS) :: gas_vmr - real(kind_phys), dimension(size(Grid%xlon,1), Model%levs, Model%ncnd) :: cld_condensate - real(kind_phys), dimension(size(Grid%xlon,1), Model%levs, NF_CLDS) :: clouds - real(kind_phys), dimension(size(Grid%xlon,1), Model%levs, kdist_sw%get_nband(), NF_AESW)::faersw2 + real(kind_phys), dimension(ncol, Model%levs, 2:Model%ntrac) :: tracer + real(kind_phys), dimension(ncol, Model%levs, NF_VGAS) :: gas_vmr + real(kind_phys), dimension(ncol, Model%levs, Model%ncnd) :: cld_condensate + real(kind_phys), dimension(ncol, Model%levs, NF_CLDS) :: clouds + real(kind_phys), dimension(ncol, Model%levs, kdist_sw%get_nband(), NF_AESW)::faersw2 ! Initialize CCPP error handling variables errmsg = '' @@ -229,17 +228,17 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, ! Compute some fields needed by RRTMGP ! ####################################################################################### ! Copy state fields over for use in RRTMGP - p_lev(1:IM,iSFC:iTOA) = Statein%prsi(1:IM,1:Model%levs) - p_lev(1:IM,iTOA+1) = spread(kdist_lw%get_press_min(),dim=1, ncopies=IM) - p_lay(1:IM,iSFC:iTOA) = Statein%prsl(1:IM,1:Model%levs) - t_lay(1:IM,iSFC:iTOA) = Statein%tgrs(1:IM,1:Model%levs) + p_lev(1:NCOL,iSFC:iTOA) = Statein%prsi(1:NCOL,1:Model%levs) + p_lev(1:NCOL,iTOA+1) = spread(kdist_lw%get_press_min(),dim=1, ncopies=NCOL) + p_lay(1:NCOL,iSFC:iTOA) = Statein%prsl(1:NCOL,1:Model%levs) + t_lay(1:NCOL,iSFC:iTOA) = Statein%tgrs(1:NCOL,1:Model%levs) ! Compute layer pressure thicknes deltaP = p_lev(:,iSFC:iTOA)-p_lev(:,iSFC+1:iTOA+1) ! Compute temperature at layer-interfaces - t_lev(1:IM,iSFC) = Sfcprop%tsfc(1:IM) - do iCol=1,IM + t_lev(1:NCOL,iSFC) = Sfcprop%tsfc(1:NCOL) + do iCol=1,NCOL do iLay=iSFC+1,iTOA t_lev(iCol,iLay) = (t_lay(iCol,iLay)+t_lay(iCol,iLay-1))/2._kind_phys enddo @@ -248,7 +247,7 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, ! Compute a bunch of thermodynamic fields needed by the macrophysics schemes. Relative humidity, ! saturation mixing-ratio, vapor mixing-ratio, virtual temperature, layer thickness,... - do iCol=1,IM + do iCol=1,NCOL do iLay=iSFC,iTOA es = min( Statein%prsl(iCol,iLay), fpvs( Statein%tgrs(iCol,iLay) ) ) ! fpvs and prsl in pa qs = max( QMIN, eps * es / (Statein%prsl(iCol,iLay) + epsm1*es) ) @@ -265,25 +264,25 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, ! ####################################################################################### ! First recast remaining all tracers (except sphum) forcing them all to be positive do j = 2, model%NTRAC - tracer(1:IM,1:Model%levs,j) = max(0.0, Statein%qgrs(1:IM,1:Model%levs,j)) + tracer(1:NCOL,1:Model%levs,j) = max(0.0, Statein%qgrs(1:NCOL,1:Model%levs,j)) enddo if (Model%ntoz > 0) then do iLay=iSFC,iTOA - do iCol=1,IM + do iCol=1,NCOL o3_lay(iCol,iLay) = max( QMIN, tracer(iCol,iLay,Model%ntoz) ) enddo enddo ! OR Use climatological ozone data else - call getozn (Statein%prslk(1:IM,iSFC:iTOA), Grid%xlat, IM, Model%levs, o3_lay) + call getozn (Statein%prslk(1:NCOL,iSFC:iTOA), Grid%xlat, NCOL, Model%levs, o3_lay) endif ! ####################################################################################### ! Set gas concentrations for RRTMGP ! ####################################################################################### ! Call getgases(), to set up non-prognostic gas volume mixing ratios (gas_vmr). - call getgases (p_lev/100., Grid%xlon, Grid%xlat, IM, Model%levs, gas_vmr) + call getgases (p_lev/100., Grid%xlon, Grid%xlat, NCOL, Model%levs, gas_vmr) ! Compute volume mixing-ratios for ozone (mmr) and specific-humidity. vmr_h2o = merge((q_lay/(1-q_lay))*amdw, 0., q_lay .ne. 1.) @@ -306,9 +305,178 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, ! Compute cosine of zenith angle (only when SW is called) ! ####################################################################################### if (Model%lsswr) then - call coszmn (Grid%xlon, Grid%sinlat, Grid%coslat, Model%solhr, IM, Model%me, & + call coszmn (Grid%xlon, Grid%sinlat, Grid%coslat, Model%solhr, NCOL, Model%me, & Radtend%coszen, Radtend%coszdg) endif + + ! ####################################################################################### + ! Cloud microphysics + ! ####################################################################################### + call cloud_microphysics(Model, Tbd, Grid, Sfcprop, ncol, tracer, p_lay, t_lay, & + p_lev, tv_lay, relhum, qs_lay, q_lay, deltaZ, deltaP, & + cld_condensate, clouds, cldsa, mbota, mtopa, de_lgth) + + ! Copy output cloud fields + cld_frac = clouds(:,:,1) + cld_lwp = clouds(:,:,2) + cld_reliq = clouds(:,:,3) + cld_iwp = clouds(:,:,4) + cld_reice = clouds(:,:,5) + + ! ####################################################################################### + ! mg, sfc-perts + ! --- scale random patterns for surface perturbations with perturbation size + ! --- turn vegetation fraction pattern into percentile pattern + ! ####################################################################################### + alb1d(:) = 0. + if (Model%do_sfcperts) then + if (Model%pertalb(1) > 0.) then + do i=1,ncol + call cdfnor(Coupling%sfc_wts(i,5),alb1d(i)) + enddo + endif + endif + + ! ####################################################################################### + ! Call module_radiation_aerosols::setaer(),to setup aerosols property profile for both + ! LW and SW radiation. + ! ####################################################################################### + call setaer(p_lev, p_lay, Statein%prslk(1:NCOL,iSFC:iTOA), tv_lay, relhum, & + Sfcprop%slmsk, tracer, Grid%xlon, Grid%xlat, NCOL, Model%levs, Model%levs+1, & + Model%lsswr, Model%lslwr, faersw2, faerlw, aerodp) + + ! Store aerosol optical properties + ! SW. + ! For RRTMGP SW the bands are now ordered from [IR(band) -> nIR -> UV], in RRTMG the + ! band ordering was [nIR -> UV -> IR(band)] + faersw(1:NCOL,1:Model%levs,1,1) = faersw2(1:NCOL,1:Model%levs,kdist_sw%get_nband(),1) + faersw(1:NCOL,1:Model%levs,1,2) = faersw2(1:NCOL,1:Model%levs,kdist_sw%get_nband(),2) + faersw(1:NCOL,1:Model%levs,1,3) = faersw2(1:NCOL,1:Model%levs,kdist_sw%get_nband(),3) + faersw(1:NCOL,1:Model%levs,2:kdist_sw%get_nband(),1) = faersw2(1:NCOL,1:Model%levs,1:kdist_sw%get_nband()-1,1) + faersw(1:NCOL,1:Model%levs,2:kdist_sw%get_nband(),2) = faersw2(1:NCOL,1:Model%levs,1:kdist_sw%get_nband()-1,2) + faersw(1:NCOL,1:Model%levs,2:kdist_sw%get_nband(),3) = faersw2(1:NCOL,1:Model%levs,1:kdist_sw%get_nband()-1,3) + + ! Setup surface ground temperature and ground/air skin temperature if required. + tsfg(1:NCOL) = Sfcprop%tsfc(1:NCOL) + tsfa(1:NCOL) = Sfcprop%tsfc(1:NCOL) + + ! ####################################################################################### + ! Call module_radiation_surface::setemis(),to setup surface emissivity for LW radiation. + ! ####################################################################################### + if (Model%lslwr) then + call setemis (Grid%xlon, Grid%xlat, Sfcprop%slmsk, Sfcprop%snowd, Sfcprop%sncovr, & + Sfcprop%zorl, tsfg, tsfa, Sfcprop%hprim, NCOL, Radtend%semis) + do iBand=1,kdist_lw%get_nband() + sfc_emiss_byband(iBand,1:NCOL) = Radtend%semis(1:NCOL) + enddo + endif + + ! ####################################################################################### + ! For SW, gather daylit points, compute surface albedo in each band, + ! ####################################################################################### + if (Model%lsswr) then + ! Check for daytime points for SW radiation. + nday = 0 + idxday = 0 + do i = 1, NCOL + if (Radtend%coszen(i) >= 0.0001) then + nday = nday + 1 + idxday(nday) = i + endif + enddo + + ! Call module_radiation_surface::setalb() to setup surface albedo. + call setalb (Sfcprop%slmsk, Sfcprop%snowd, Sfcprop%sncovr,& ! --- inputs: + Sfcprop%snoalb, Sfcprop%zorl, Radtend%coszen,& + tsfg, tsfa, Sfcprop%hprim, Sfcprop%alvsf, & + Sfcprop%alnsf, Sfcprop%alvwf, Sfcprop%alnwf, & + Sfcprop%facsf, Sfcprop%facwf, Sfcprop%fice, & + Sfcprop%tisfc, NCOL, & + alb1d, Model%pertalb, & ! mg, sfc-perts + sfcalb) ! --- outputs + + ! Approximate mean surface albedo from vis- and nir- diffuse values. + Radtend%sfalb(:) = max(0.01, 0.5 * (sfcalb(:,2) + sfcalb(:,4))) + else + nday = 0 + idxday = 0 + sfcalb = 0.0 + endif + + ! Spread across all SW bands + do iBand=1,kdist_sw%get_nband() + sfc_alb_nir_dir(iBand,1:NCOL) = sfcalb(1:NCOL,1) + sfc_alb_nir_dif(iBand,1:NCOL) = sfcalb(1:NCOL,2) + sfc_alb_uvvis_dir(iBand,1:NCOL) = sfcalb(1:NCOL,3) + sfc_alb_uvvis_dif(iBand,1:NCOL) = sfcalb(1:NCOL,4) + enddo + + end subroutine GFS_rrtmgp_pre_run + +!> \section arg_table_GFS_rrtmgp_pre_finalize Argument Table +!! + subroutine GFS_rrtmgp_pre_finalize () + end subroutine GFS_rrtmgp_pre_finalize + + ! ####################################################################################### + ! SUBROUTINE check_error_msg() + ! ####################################################################################### + subroutine check_error_msg(routine_name, error_msg) + character(len=*), intent(in) :: & + error_msg, routine_name + + if(error_msg /= "") then + print*,"ERROR("//trim(routine_name)//"): " + print*,trim(error_msg) + return + end if + end subroutine check_error_msg + + ! ####################################################################################### + ! Subroutine cloud_microphysics() + ! ####################################################################################### + subroutine cloud_microphysics(Model, Tbd, Grid, Sfcprop, ncol, tracer, p_lay, t_lay, & + p_lev, tv_lay, relhum, qs_lay, q_lay, deltaZ, deltaP, & + cld_condensate, clouds, cldsa, mbota, mtopa, de_lgth) + ! Inputs + type(GFS_control_type), intent(in) :: & + Model ! Fortran DDT containing FV3-GFS model control parameters + type(GFS_tbd_type), intent(in) :: & + Tbd ! Fortran DDT containing FV3-GFS data not yet assigned to a defined container + type(GFS_grid_type), intent(in) :: & + Grid ! Fortran DDT containing FV3-GFS grid and interpolation related data + type(GFS_sfcprop_type), intent(in) :: & + Sfcprop ! Fortran DDT containing FV3-GFS surface fields + + integer, intent(in) :: & + ncol ! Number of horizontal gridpoints + real(kind_phys), dimension(ncol, Model%levs, Model%ntrac) :: tracer + real(kind_phys), dimension(ncol,Model%levs), intent(in) :: & + p_lay, & ! + t_lay, & ! + tv_lay, & ! + relhum, & ! + qs_lay, & ! + q_lay, & ! + deltaZ, & ! + deltaP + real(kind_phys), dimension(ncol,Model%levs+1), intent(in) :: & + p_lev ! + + ! Outputs + real(kind_phys), dimension(ncol, Model%levs, Model%ncnd),intent(out) :: cld_condensate + real(kind_phys), dimension(ncol, Model%levs, NF_CLDS),intent(out) :: clouds + integer,dimension(ncol,3), intent(out) :: mbota, mtopa + real(kind_phys), dimension(ncol), intent(out) :: de_lgth + real(kind_phys), dimension(ncol, 5), intent(out) :: cldsa + + ! Local variables + !real(kind_phys), dimension(ncol, Model%levs, Model%ncnd) :: cld_condensate + integer :: i,k + real(kind_phys), dimension(ncol, Model%levs) :: delta_q, cnv_w, cnv_c, effr_l, effr_i, effr_r, effr_s, cldcov + real(kind_phys) :: es, qs, clwmin, clwm, clwt, onemrh, value, tem1, tem2 + real(kind_phys), parameter :: xrc3 = 100. + ! ####################################################################################### ! Obtain cloud information for radiation calculations @@ -322,24 +490,25 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, ! ####################################################################################### cld_condensate = 0.0_kind_phys if (Model%ncnd == 1) then ! Zhao_Carr_Sundqvist - cld_condensate(1:IM,1:Model%levs,1) = tracer(1:IM,1:Model%levs,Model%ntcw) ! -liquid water/ice + cld_condensate(1:NCOL,1:Model%levs,1) = tracer(1:NCOL,1:Model%levs,Model%ntcw) ! -liquid water/ice elseif (Model%ncnd == 2) then ! MG - cld_condensate(1:IM,1:Model%levs,1) = tracer(1:IM,1:Model%levs,Model%ntcw) ! -liquid water - cld_condensate(1:IM,1:Model%levs,2) = tracer(1:IM,1:Model%levs,Model%ntiw) ! -ice water + cld_condensate(1:NCOL,1:Model%levs,1) = tracer(1:NCOL,1:Model%levs,Model%ntcw) ! -liquid water + cld_condensate(1:NCOL,1:Model%levs,2) = tracer(1:NCOL,1:Model%levs,Model%ntiw) ! -ice water elseif (Model%ncnd == 4) then ! MG2 - cld_condensate(1:IM,1:Model%levs,1) = tracer(1:IM,1:Model%levs,Model%ntcw) ! -liquid water - cld_condensate(1:IM,1:Model%levs,2) = tracer(1:IM,1:Model%levs,Model%ntiw) ! -ice water - cld_condensate(1:IM,1:Model%levs,3) = tracer(1:IM,1:Model%levs,Model%ntrw) ! -rain water - cld_condensate(1:IM,1:Model%levs,4) = tracer(1:IM,1:Model%levs,Model%ntsw) ! -snow water + cld_condensate(1:NCOL,1:Model%levs,1) = tracer(1:NCOL,1:Model%levs,Model%ntcw) ! -liquid water + cld_condensate(1:NCOL,1:Model%levs,2) = tracer(1:NCOL,1:Model%levs,Model%ntiw) ! -ice water + cld_condensate(1:NCOL,1:Model%levs,3) = tracer(1:NCOL,1:Model%levs,Model%ntrw) ! -rain water + cld_condensate(1:NCOL,1:Model%levs,4) = tracer(1:NCOL,1:Model%levs,Model%ntsw) ! -snow water elseif (Model%ncnd == 5) then ! GFDL MP, Thompson, MG3 - cld_condensate(1:IM,1:Model%levs,1) = tracer(1:IM,1:Model%levs,Model%ntcw) ! -liquid water - cld_condensate(1:IM,1:Model%levs,2) = tracer(1:IM,1:Model%levs,Model%ntiw) ! -ice water - cld_condensate(1:IM,1:Model%levs,3) = tracer(1:IM,1:Model%levs,Model%ntrw) ! -rain water - cld_condensate(1:IM,1:Model%levs,4) = tracer(1:IM,1:Model%levs,Model%ntsw) + & ! -snow + grapuel - tracer(1:IM,1:Model%levs,Model%ntgl) + cld_condensate(1:NCOL,1:Model%levs,1) = tracer(1:NCOL,1:Model%levs,Model%ntcw) ! -liquid water + cld_condensate(1:NCOL,1:Model%levs,2) = tracer(1:NCOL,1:Model%levs,Model%ntiw) ! -ice water + cld_condensate(1:NCOL,1:Model%levs,3) = tracer(1:NCOL,1:Model%levs,Model%ntrw) ! -rain water + cld_condensate(1:NCOL,1:Model%levs,4) = tracer(1:NCOL,1:Model%levs,Model%ntsw) + & ! -snow + grapuel + tracer(1:NCOL,1:Model%levs,Model%ntgl) endif where(cld_condensate < epsq) cld_condensate = 0.0 + ! For GFDL microphysics scheme... if (Model%imp_physics == 11 ) then if (.not. Model%lgfdlmprad) then cld_condensate(:,:,1) = tracer(:,1:Model%levs,Model%ntcw) @@ -349,48 +518,51 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, cld_condensate(:,:,1) = cld_condensate(:,:,1) + tracer(:,1:Model%levs,Model%ntgl) endif do k=1,Model%levs - do i=1,IM + do i=1,NCOL if (cld_condensate(i,k,1) < EPSQ ) cld_condensate(i,k,1) = 0.0 enddo enddo endif + ! Add suspended convective cloud water to grid-scale cloud water ! only for cloud fraction & radiation computation it is to enhance ! cloudiness due to suspended convec cloud water for zhao/moorthi's ! (imp_phys=99) & ferrier's (imp_phys=5) microphysics schemes if ((Model%num_p3d == 4) .and. (Model%npdf3d == 3)) then ! same as Model%imp_physics = 99 - delta_q(1:im,1:Model%levs) = Tbd%phy_f3d(1:im,1:Model%levs,5) - cnv_w (1:im,1:Model%levs) = Tbd%phy_f3d(1:im,1:Model%levs,6) - cnv_c (1:im,1:Model%levs) = Tbd%phy_f3d(1:im,1:Model%levs,7) + delta_q(1:ncol,1:Model%levs) = Tbd%phy_f3d(1:ncol,1:Model%levs,5) + cnv_w (1:ncol,1:Model%levs) = Tbd%phy_f3d(1:ncol,1:Model%levs,6) + cnv_c (1:ncol,1:Model%levs) = Tbd%phy_f3d(1:ncol,1:Model%levs,7) elseif ((Model%npdf3d == 0) .and. (Model%ncnvcld3d == 1)) then ! same as MOdel%imp_physics=98 - delta_q(1:im,1:Model%levs) = 0.0 - cnv_w (1:im,1:Model%levs) = Tbd%phy_f3d(1:im,1:Model%levs,Model%num_p3d+1) - cnv_c (1:im,1:Model%levs) = 0.0 + delta_q(1:ncol,1:Model%levs) = 0.0 + cnv_w (1:ncol,1:Model%levs) = Tbd%phy_f3d(1:ncol,1:Model%levs,Model%num_p3d+1) + cnv_c (1:ncol,1:Model%levs) = 0.0 else ! all the rest - delta_q(1:im,1:Model%levs) = 0.0 - cnv_w (1:im,1:Model%levs) = 0.0 - cnv_c (1:im,1:Model%levs) = 0.0 + delta_q(1:ncol,1:Model%levs) = 0.0 + cnv_w (1:ncol,1:Model%levs) = 0.0 + cnv_c (1:ncol,1:Model%levs) = 0.0 endif + ! For zhao/moorthi's prognostic cloud scheme, add in convective cloud water to liquid-cloud water if (Model%imp_physics == 99) then - cld_condensate(1:IM,1:Model%levs,1) = cld_condensate(1:IM,1:Model%levs,1) + cnv_w(1:IM,1:Model%levs) + cld_condensate(1:NCOL,1:Model%levs,1) = cld_condensate(1:NCOL,1:Model%levs,1) + cnv_w(1:NCOL,1:Model%levs) endif + ! For MG prognostic cloud scheme, add in convective cloud water to liquid-and-ice-cloud condensate if (Model%imp_physics == 10) then - cld_condensate(1:IM,1:Model%levs,1) = cld_condensate(1:IM,1:Model%levs,1) + cnv_w(1:IM,1:Model%levs) + cld_condensate(1:IM,1:Model%levs,2) + cld_condensate(1:NCOL,1:Model%levs,1) = cld_condensate(1:NCOL,1:Model%levs,1) + cnv_w(1:NCOL,1:Model%levs) + cld_condensate(1:NCOL,1:Model%levs,2) endif if (Model%uni_cld) then if (Model%effr_in) then - cldcov(1:im,1:Model%levs) = Tbd%phy_f3d(1:im,1:Model%levs,Model%indcld) - effr_l(1:im,1:Model%levs) = Tbd%phy_f3d(1:im,1:Model%levs,2) - effr_i(1:im,1:Model%levs) = Tbd%phy_f3d(1:im,1:Model%levs,3) - effr_r(1:im,1:Model%levs) = Tbd%phy_f3d(1:im,1:Model%levs,4) - effr_s(1:im,1:Model%levs) = Tbd%phy_f3d(1:im,1:Model%levs,5) + cldcov(1:ncol,1:Model%levs) = Tbd%phy_f3d(1:ncol,1:Model%levs,Model%indcld) + effr_l(1:ncol,1:Model%levs) = Tbd%phy_f3d(1:ncol,1:Model%levs,2) + effr_i(1:ncol,1:Model%levs) = Tbd%phy_f3d(1:ncol,1:Model%levs,3) + effr_r(1:ncol,1:Model%levs) = Tbd%phy_f3d(1:ncol,1:Model%levs,4) + effr_s(1:ncol,1:Model%levs) = Tbd%phy_f3d(1:ncol,1:Model%levs,5) else do k=1,model%levs - do i=1,im + do i=1,ncol !cldcov(i,k1) = Tbd%phy_f3d(i,k,Model%indcld) !if (tracer1(i,k,ntcw) .gt. 0 .or. tracer1(i,k,ntiw) .gt. 0) then ! cldcov(i,k) = 0.1 @@ -401,7 +573,7 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, enddo endif elseif (Model%imp_physics == Model%imp_physics_gfdl) then ! GFDL MP - cldcov(1:IM,1:Model%levs) = tracer(1:IM,1:Model%levs,Model%ntclamt) + cldcov(1:NCOL,1:Model%levs) = tracer(1:NCOL,1:Model%levs,Model%ntclamt) else ! neither of the other two cases ! cldcov = 0.0 endif @@ -415,7 +587,7 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, cldcov(:,:) = 0.0 if (.not. Model%lmfshal) then do k = 1, Model%levs - do i = 1, IM + do i = 1, NCOL clwt = 1.0e-6 * (p_lay(i,k)*0.1) if (cld_condensate(i,k,1) > 0.) then onemrh= max( 1.e-10, 1.0-relhum(i,k) ) @@ -430,7 +602,7 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, enddo else do k = 1, Model%levs - do i = 1, IM + do i = 1, NCOL clwt = 1.0e-6 * (p_lay(i,k)*0.1) if (cld_condensate(i,k,1) .gt. 0) then onemrh= max( 1.e-10, 1.0-relhum(i,k) ) @@ -449,7 +621,8 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, enddo endif ! DJS2019: END - + + ! ####################################################################################### ! MICROPHYSICS ! ####################################################################################### @@ -457,149 +630,150 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, if (Model%imp_physics == 99 .or. Model%imp_physics == 10) then if (Model%uni_cld .and. Model%ncld >= 2) then call progclduni( & - p_lay/100., & ! IN - p_lev/100., & ! IN - t_lay, & ! IN - tv_lay, & ! IN - cld_condensate, & ! IN - Model%ncnd, & ! IN - Grid%xlat, & ! IN - Grid%xlon, & ! IN - Sfcprop%slmsk, & ! IN - deltaZ, & ! IN - deltaP/100., & ! IN - IM, & ! IN - MODEL%LEVS, & ! IN - MODEL%LEVS+1, & ! IN - cldcov, & ! IN - effr_l, & ! IN - effr_i, & ! IN - effr_r, & ! IN - effr_s, & ! IN - Model%effr_in, & ! IN - clouds, & ! OUT - cldsa, & ! OUT - mtopa, & ! OUT - mbota, & ! OUT - de_lgth) ! OUT + p_lay/100., & ! IN - Pressure at model layer centers (mb) + p_lev/100., & ! IN - Pressure at model interfaces (mb) + t_lay, & ! IN - Temperature at layer centers (K) + tv_lay, & ! IN - Virtual temperature at layer centers (K) + cld_condensate, & ! IN - Cloud condensate amount (Model%ncnd types) () + Model%ncnd, & ! IN - Number of cloud condensate types () + Grid%xlat, & ! IN - Latitude (radians) + Grid%xlon, & ! IN - Longitude (radians) + Sfcprop%slmsk, & ! IN - Land/Sea mask () + deltaZ, & ! IN - Layer thickness (m) + deltaP/100., & ! IN - Layer thickness (hPa) + NCOL, & ! IN - Number of horizontal gridpoints + MODEL%LEVS, & ! IN - Number of model layers + MODEL%LEVS+1, & ! IN - Number of model levels + cldcov, & ! IN - Layer cloud fraction (used if uni_cld=.true.) + effr_l, & ! IN - Liquid-water effective radius (microns) + effr_i, & ! IN - Ice-water effective radius (microns) + effr_r, & ! IN - Rain-water effective radius (microns) + effr_s, & ! IN - Snow-water effective radius (microns) + Model%effr_in, & ! IN - Logical, if .true. use input effective radii + clouds, & ! OUT - Cloud properties (NCOL,Model%levs,NF_CLDS) + cldsa, & ! OUT - fraction of clouds for low, mid, hi, tot, bl (NCOL,5) + mtopa, & ! OUT - vertical indices for low, mid, hi cloud tops (NCOL,3) + mbota, & ! OUT - vertical indices for low, mid, hi cloud bases (NCOL,3) + de_lgth) ! OUT - clouds decorrelation length (km) else call progcld1 ( & - p_lay/100., & ! IN - p_lev/100., & ! IN - t_lay, & ! IN - tv_lay, & ! IN - q_lay, & ! IN - qs_lay, & ! IN - relhum, & ! IN - cld_condensate(:,:,1),& ! IN - Grid%xlat, & ! IN - Grid%xlon, & ! IN - Sfcprop%slmsk, & ! IN - deltaZ, & ! IN - deltaP/100., & ! IN - IM, & ! IN - Model%levs, & ! IN - Model%levs+1, & ! IN - Model%uni_cld, & ! IN - Model%lmfshal, & ! IN - Model%lmfdeep2, & ! IN - cldcov, & ! IN - effr_l, & ! IN - effr_i, & ! IN - effr_r, & ! IN - effr_s, & ! IN - Model%effr_in, & ! IN - clouds, & ! OUT - cldsa, & ! OUT - mtopa, & ! OUT - mbota, & ! OUT - de_lgth) ! OUT + p_lay/100., & ! IN - Pressure at model layer centers (mb) + p_lev/100., & ! IN - Pressure at model interfaces (mb) + t_lay, & ! IN - Temperature at layer centers (K) + tv_lay, & ! IN - Virtual temperature at layer centers (K) + q_lay, & ! IN - Specific humidity at layer center (kg/kg) + qs_lay, & ! IN - Saturation specific humidity at layer center (kg/kg) + relhum, & ! IN - Relative humidity at layer center (1) + cld_condensate(:,:,1),& ! IN - Cloud condensate amount () + ! (Zhao: liq+convective; MG: liq+ice+convective) + Grid%xlat, & ! IN - Latitude (radians) + Grid%xlon, & ! IN - Longitude (radians) + Sfcprop%slmsk, & ! IN - Land/Sea mask () + deltaZ, & ! IN - Layer thickness (m) + deltaP/100., & ! IN - Layer thickness (hPa) + NCOL, & ! IN - Number of horizontal gridpoints + MODEL%LEVS, & ! IN - Number of model layers + MODEL%LEVS+1, & ! IN - Number of model levels + Model%uni_cld, & ! IN - True for cloud fraction from shoc + Model%lmfshal, & ! IN - True for mass flux shallow convection + Model%lmfdeep2, & ! IN - True for mass flux deep convection + cldcov, & ! IN - Layer cloud fraction (used if uni_cld=.true.) + effr_l, & ! IN - Liquid-water effective radius (microns) + effr_i, & ! IN - Ice-water effective radius (microns) + effr_r, & ! IN - Rain-water effective radius (microns) + effr_s, & ! IN - Snow-water effective radius (microns) + Model%effr_in, & ! IN - Logical, if .true. use input effective radii + clouds, & ! OUT - Cloud properties (NCOL,Model%levs,NF_CLDS) + cldsa, & ! OUT - fraction of clouds for low, mid, hi, tot, bl (NCOL,5) + mtopa, & ! OUT - vertical indices for low, mid, hi cloud tops (NCOL,3) + mbota, & ! OUT - vertical indices for low, mid, hi cloud bases (NCOL,3) + de_lgth) ! OUT - clouds decorrelation length (km) endif ! *) zhao/moorthi's prognostic cloud+pdfcld elseif(Model%imp_physics == 98) then call progcld3 ( & - p_lay/100., & ! IN - p_lev/100., & ! IN - t_lay, & ! IN - tv_lay, & ! IN - q_lay, & ! IN - qs_lay, & ! IN - relhum, & ! IN - cld_condensate(:,:,1),& ! IN - cnv_w, & ! IN - cnv_c, & ! IN - Grid%xlat, & ! IN - Grid%xlon, & ! IN - Sfcprop%slmsk, & ! IN - deltaZ, & ! IN - deltaP/100., & ! IN - im, & ! IN - Model%levs, & ! IN - Model%levs+1, & ! IN - delta_q, & ! IN Total water distribution width - Model%sup, & ! IN - Model%kdt, & ! IN - me, & ! IN - clouds, & ! OUT - cldsa, & ! OUT - mtopa, & ! OUT - mbota, & ! OUT - de_lgth) ! OUT + p_lay/100., & ! IN - Pressure at model layer centers (mb) + p_lev/100., & ! IN - Pressure at model interfaces (mb) + t_lay, & ! IN - Temperature at layer centers (K) + tv_lay, & ! IN - Virtual temperature at layer centers (K) + q_lay, & ! IN - Specific humidity at layer center (kg/kg) + qs_lay, & ! IN - Saturation specific humidity at layer center (kg/kg) + relhum, & ! IN - Relative humidity at layer center (1) + cld_condensate(:,:,1),& ! IN - Cloud condensate amount (only h20) () + cnv_w, & ! IN - Layer convective cloud condensate + cnv_c, & ! IN - Layer convective cloud cover + Grid%xlat, & ! IN - Latitude (radians) + Grid%xlon, & ! IN - Longitude (radians) + Sfcprop%slmsk, & ! IN - Land/Sea mask () + deltaZ, & ! IN - Layer thickness (m) + deltaP/100., & ! IN - Layer thickness (hPa) + NCOL, & ! IN - Number of horizontal gridpoints + MODEL%LEVS, & ! IN - Number of model layers + MODEL%LEVS+1, & ! IN - Number of model levels + delta_q, & ! IN - Total water distribution width + Model%sup, & ! IN - ??? Supersaturation? + Model%kdt, & ! IN - ??? + me, & ! IN - ??? NOT USED IN PROGCLD3() + clouds, & ! OUT - Cloud properties (NCOL,Model%levs,NF_CLDS) + cldsa, & ! OUT - fraction of clouds for low, mid, hi, tot, bl (NCOL,5) + mtopa, & ! OUT - vertical indices for low, mid, hi cloud tops (NCOL,3) + mbota, & ! OUT - vertical indices for low, mid, hi cloud bases (NCOL,3) + de_lgth) ! OUT - clouds decorrelation length (km) ! *) GFDL cloud scheme elseif (Model%imp_physics == 11) then if (.not.Model%lgfdlmprad) then call progcld4 ( & - p_lay/100., & ! IN - p_lev/100., & ! IN - t_lay, & ! IN - tv_lay, & ! IN - q_lay, & ! IN - qs_lay, & ! IN - relhum, & ! IN - cld_condensate(:,:,1),& ! IN - cnv_w, & ! IN - cnv_c, & ! IN - Grid%xlat, & ! IN - Grid%xlon, & ! IN - Sfcprop%slmsk, & ! IN - cldcov, & ! IN - deltaZ, & ! IN - deltaP/100., & ! IN - im, & ! IN - Model%levs, & ! IN - Model%levs+1, & ! IN - clouds, & ! OUT - cldsa, & ! OUT - mtopa, & ! OUT - mbota, & ! OUT - de_lgth) ! OUT + p_lay/100., & ! IN - Pressure at model layer centers (mb) + p_lev/100., & ! IN - Pressure at model interfaces (mb) + t_lay, & ! IN - Temperature at layer centers (K) + tv_lay, & ! IN - Virtual temperature at layer centers (K) + q_lay, & ! IN - Specific humidity at layer center (kg/kg) + qs_lay, & ! IN - Saturation specific humidity at layer center (kg/kg) + relhum, & ! IN - Relative humidity at layer center (1) + cld_condensate(:,:,1),& ! IN - Cloud condensate amount (only h20) () + cnv_w, & ! IN - Layer convective cloud condensate + cnv_c, & ! IN - Layer convective cloud cover + Grid%xlat, & ! IN - Latitude (radians) + Grid%xlon, & ! IN - Longitude (radians) + Sfcprop%slmsk, & ! IN - Land/Sea mask () + cldcov, & ! IN - Layer cloud fraction (used if uni_cld=.true.) + deltaZ, & ! IN - Layer thickness (m) + deltaP/100., & ! IN - Layer thickness (hPa) + NCOL, & ! IN - Number of horizontal gridpoints + MODEL%LEVS, & ! IN - Number of model layers + MODEL%LEVS+1, & ! IN - Number of model levels + clouds, & ! OUT - Cloud properties (NCOL,Model%levs,NF_CLDS) + cldsa, & ! OUT - fraction of clouds for low, mid, hi, tot, bl (NCOL,5) + mtopa, & ! OUT - vertical indices for low, mid, hi cloud tops (NCOL,3) + mbota, & ! OUT - vertical indices for low, mid, hi cloud bases (NCOL,3) + de_lgth) ! OUT - clouds decorrelation length (km) else call progclduni( & - p_lay/100., & ! IN - p_lev/100., & ! IN - t_lay, & ! IN - tv_lay, & ! IN - cld_condensate, & ! IN - Model%ncnd, & ! IN - Grid%xlat, & ! IN - Grid%xlon, & ! IN - Sfcprop%slmsk, & ! IN - deltaZ, & ! IN - deltaP/100., & ! IN - IM, & ! IN - MODEL%LEVS, & ! IN - MODEL%LEVS+1, & ! IN - cldcov, & ! IN - effr_l, & ! IN - effr_i, & ! IN - effr_r, & ! IN - effr_s, & ! IN - Model%effr_in, & ! IN - clouds, & ! OUT - cldsa, & ! OUT - mtopa, & ! OUT - mbota, & ! OUT - de_lgth) ! OUT + p_lay/100., & ! IN - Pressure at model layer centers (mb) + p_lev/100., & ! IN - Pressure at model interfaces (mb) + t_lay, & ! IN - Temperature at layer centers (K) + tv_lay, & ! IN - Virtual temperature at layer centers (K) + cld_condensate, & ! IN - Cloud condensate amount (Model%ncnd types) () + Model%ncnd, & ! IN - Number of cloud condensate types () + Grid%xlat, & ! IN - Latitude (radians) + Grid%xlon, & ! IN - Longitude (radians) + Sfcprop%slmsk, & ! IN - Land/Sea mask () + deltaZ, & ! IN - Layer thickness (m) + deltaP/100., & ! IN - Layer thickness (hPa) + NCOL, & ! IN - Number of horizontal gridpoints + MODEL%LEVS, & ! IN - Number of model layers + MODEL%LEVS+1, & ! IN - Number of model levels + cldcov, & ! IN - Layer cloud fraction (used if uni_cld=.true.) + effr_l, & ! IN - Liquid-water effective radius (microns) + effr_i, & ! IN - Ice-water effective radius (microns) + effr_r, & ! IN - Rain-water effective radius (microns) + effr_s, & ! IN - Snow-water effective radius (microns) + Model%effr_in, & ! IN - Logical, if .true. use input effective radii + clouds, & ! OUT - Cloud properties (NCOL,Model%levs,NF_CLDS) + cldsa, & ! OUT - fraction of clouds for low, mid, hi, tot, bl (NCOL,5) + mtopa, & ! OUT - vertical indices for low, mid, hi cloud tops (NCOL,3) + mbota, & ! OUT - vertical indices for low, mid, hi cloud bases (NCOL,3) + de_lgth) ! OUT - clouds decorrelation length (km) endif ! *) Thompson / WSM6 cloud micrphysics scheme elseif(Model%imp_physics == 8 .or. Model%imp_physics == 6) then @@ -610,150 +784,44 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, endif call progcld5 ( & ! IN - p_lay/100., & ! IN - p_lev/100., & ! IN - t_lay, & ! IN - q_lay, & ! IN - qs_lay, & ! IN - relhum, & ! IN - tracer, & ! IN - Grid%xlat, & ! IN - Grid%xlon, & ! IN - Sfcprop%slmsk, & ! IN - deltaZ, & ! IN - deltaP/100., & ! IN - Model%ntrac-1, & ! IN - Number of tracers - Model%ntcw-1, & ! IN - Tracer index for cloud condensate (or liquid water) - Model%ntiw-1, & ! IN - Tracer index for ice - Model%ntrw-1, & ! IN - Tracer index for rain - Model%ntsw-1, & ! IN - Tracer index for snow - Model%ntgl-1, & ! IN - Tracer index for groupel - im, & ! IN - Model%levs, & ! IN - Model%levs+1, & ! IN - Model%uni_cld, & ! IN - Model%lmfshal, & ! IN - Model%lmfdeep2, & ! IN - cldcov(:,1:Model%levs), & ! IN - Tbd%phy_f3d(:,:,1), & ! IN - Tbd%phy_f3d(:,:,2), & ! IN - Tbd%phy_f3d(:,:,3), & ! IN - clouds, & ! OUT - cldsa, & ! OUT - mtopa, & ! OUT - mbota, & ! OUT - de_lgth) ! OUT + p_lay/100., & ! IN - Pressure at model layer centers (mb) + p_lev/100., & ! IN - Pressure at model interfaces (mb) + t_lay, & ! IN - Temperature at layer centers (K) + q_lay, & ! IN - Specific humidity at layer center (kg/kg) + qs_lay, & ! IN - Saturation specific humidity at layer center (kg/kg) + relhum, & ! IN - Relative humidity at layer center (1) + tracer, & ! IN - Cloud condensate amount in layer by type () + Grid%xlat, & ! IN - Latitude (radians) + Grid%xlon, & ! IN - Longitude (radians) + Sfcprop%slmsk, & ! IN - Land/Sea mask () + deltaZ, & ! IN - Layer thickness (m) + deltaP/100., & ! IN - Layer thickness (hPa) + Model%ntrac-1, & ! IN - Number of tracers + Model%ntcw-1, & ! IN - Tracer index for cloud condensate (or liquid water) + Model%ntiw-1, & ! IN - Tracer index for ice + Model%ntrw-1, & ! IN - Tracer index for rain + Model%ntsw-1, & ! IN - Tracer index for snow + Model%ntgl-1, & ! IN - Tracer index for groupel + NCOL, & ! IN - Number of horizontal gridpoints + MODEL%LEVS, & ! IN - Number of model layers + MODEL%LEVS+1, & ! IN - Number of model levels + Model%uni_cld, & ! IN - True for cloud fraction from shoc + Model%lmfshal, & ! IN - True for mass flux shallow convection + Model%lmfdeep2, & ! IN - True for mass flux deep convection + cldcov(:,1:Model%levs), & ! IN - Layer cloud fraction (used if uni_cld=.true.) + Tbd%phy_f3d(:,:,1), & ! IN - Liquid-water effective radius (microns) + Tbd%phy_f3d(:,:,2), & ! IN - Ice-water effective radius (microns) + Tbd%phy_f3d(:,:,3), & ! IN - LSnow-water effective radius (microns) + clouds, & ! OUT - Cloud properties (NCOL,Model%levs,NF_CLDS) + cldsa, & ! OUT - fraction of clouds for low, mid, hi, tot, bl (NCOL,5) + mtopa, & ! OUT - vertical indices for low, mid, hi cloud tops (NCOL,3) + mbota, & ! OUT - vertical indices for low, mid, hi cloud bases (NCOL,3) + de_lgth) ! OUT - clouds decorrelation length (km) endif ! end if_imp_physics - ! Copy output cloud fields - cld_frac = clouds(:,:,1) - cld_lwp = clouds(:,:,2) - cld_reliq = clouds(:,:,3) - cld_iwp = clouds(:,:,4) - cld_reice = clouds(:,:,5) - ! ####################################################################################### - ! mg, sfc-perts - ! --- scale random patterns for surface perturbations with perturbation size - ! --- turn vegetation fraction pattern into percentile pattern - ! ####################################################################################### - alb1d(:) = 0. - if (Model%do_sfcperts) then - if (Model%pertalb(1) > 0.) then - do i=1,im - call cdfnor(Coupling%sfc_wts(i,5),alb1d(i)) - enddo - endif - endif - - ! ####################################################################################### - ! Call module_radiation_aerosols::setaer(),to setup aerosols property profile for both - ! LW and SW radiation. - ! ####################################################################################### - call setaer (p_lev, p_lay, Statein%prslk(1:IM,iSFC:iTOA), tv_lay, relhum, Sfcprop%slmsk, tracer, Grid%xlon, & - Grid%xlat, IM, Model%levs, Model%levs+1, Model%lsswr, Model%lslwr, faersw2, faerlw, aerodp) - - ! Store aerosol optical properties - ! SW. - ! For RRTMGP SW the bands are now ordered from [IR(band) -> nIR -> UV], in RRTMG the - ! band ordering was [nIR -> UV -> IR(band)] - faersw(1:IM,1:Model%levs,1,1) = faersw2(1:IM,1:Model%levs,kdist_sw%get_nband(),1) - faersw(1:IM,1:Model%levs,1,2) = faersw2(1:IM,1:Model%levs,kdist_sw%get_nband(),2) - faersw(1:IM,1:Model%levs,1,3) = faersw2(1:IM,1:Model%levs,kdist_sw%get_nband(),3) - faersw(1:IM,1:Model%levs,2:kdist_sw%get_nband(),1) = faersw2(1:IM,1:Model%levs,1:kdist_sw%get_nband()-1,1) - faersw(1:IM,1:Model%levs,2:kdist_sw%get_nband(),2) = faersw2(1:IM,1:Model%levs,1:kdist_sw%get_nband()-1,2) - faersw(1:IM,1:Model%levs,2:kdist_sw%get_nband(),3) = faersw2(1:IM,1:Model%levs,1:kdist_sw%get_nband()-1,3) - ! Setup surface ground temperature and ground/air skin temperature if required. - tsfg(1:IM) = Sfcprop%tsfc(1:IM) - tsfa(1:IM) = Sfcprop%tsfc(1:IM) + end subroutine cloud_microphysics - ! ####################################################################################### - ! Call module_radiation_surface::setemis(),to setup surface emissivity for LW radiation. - ! ####################################################################################### - if (Model%lslwr) then - call setemis (Grid%xlon, Grid%xlat, Sfcprop%slmsk, Sfcprop%snowd, Sfcprop%sncovr, & - Sfcprop%zorl, tsfg, tsfa, Sfcprop%hprim, IM, Radtend%semis) - do iBand=1,kdist_lw%get_nband() - sfc_emiss_byband(iBand,1:IM) = Radtend%semis(1:IM) - enddo - endif - - ! ####################################################################################### - ! For SW, gather daylit points, compute surface albedo in each band, - ! ####################################################################################### - if (Model%lsswr) then - ! Check for daytime points for SW radiation. - nday = 0 - idxday = 0 - do i = 1, IM - if (Radtend%coszen(i) >= 0.0001) then - nday = nday + 1 - idxday(nday) = i - endif - enddo - - ! Call module_radiation_surface::setalb() to setup surface albedo. - call setalb (Sfcprop%slmsk, Sfcprop%snowd, Sfcprop%sncovr,& ! --- inputs: - Sfcprop%snoalb, Sfcprop%zorl, Radtend%coszen,& - tsfg, tsfa, Sfcprop%hprim, Sfcprop%alvsf, & - Sfcprop%alnsf, Sfcprop%alvwf, Sfcprop%alnwf, & - Sfcprop%facsf, Sfcprop%facwf, Sfcprop%fice, & - Sfcprop%tisfc, IM, & - alb1d, Model%pertalb, & ! mg, sfc-perts - sfcalb) ! --- outputs - - ! Approximate mean surface albedo from vis- and nir- diffuse values. - Radtend%sfalb(:) = max(0.01, 0.5 * (sfcalb(:,2) + sfcalb(:,4))) - else - nday = 0 - idxday = 0 - sfcalb = 0.0 - endif - - ! Spread across all SW bands - do iBand=1,kdist_sw%get_nband() - sfc_alb_nir_dir(iBand,1:IM) = sfcalb(1:IM,1) - sfc_alb_nir_dif(iBand,1:IM) = sfcalb(1:IM,2) - sfc_alb_uvvis_dir(iBand,1:IM) = sfcalb(1:IM,3) - sfc_alb_uvvis_dif(iBand,1:IM) = sfcalb(1:IM,4) - enddo - - end subroutine GFS_rrtmgp_pre_run - -!> \section arg_table_GFS_rrtmgp_pre_finalize Argument Table -!! - subroutine GFS_rrtmgp_pre_finalize () - end subroutine GFS_rrtmgp_pre_finalize - subroutine check_error_msg(routine_name, error_msg) - character(len=*), intent(in) :: & - error_msg, routine_name - - if(error_msg /= "") then - print*,"ERROR("//trim(routine_name)//"): " - print*,trim(error_msg) - return - end if - end subroutine check_error_msg end module GFS_rrtmgp_pre From 57be5513e59dbf9064dd71f01da9d6f43ac89c1d Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Fri, 31 May 2019 14:25:56 -0600 Subject: [PATCH 030/167] Added new GFS_rrtmgp_XX_post.F90 for both SW and LW. --- physics/GFS_rrtmgp_lw.F90 | 8 +- physics/GFS_rrtmgp_lw_post.F90 | 213 ++++++++++++++++++++++++ physics/GFS_rrtmgp_pre.F90 | 28 ++-- physics/GFS_rrtmgp_sw.F90 | 10 +- physics/GFS_rrtmgp_sw_post.F90 | 287 +++++++++++++++++++++++++++++++++ 5 files changed, 527 insertions(+), 19 deletions(-) create mode 100644 physics/GFS_rrtmgp_lw_post.F90 create mode 100644 physics/GFS_rrtmgp_sw_post.F90 diff --git a/physics/GFS_rrtmgp_lw.F90 b/physics/GFS_rrtmgp_lw.F90 index 1accf7377..a71a10d13 100644 --- a/physics/GFS_rrtmgp_lw.F90 +++ b/physics/GFS_rrtmgp_lw.F90 @@ -38,6 +38,7 @@ end subroutine GFS_rrtmgp_lw_init !! | kdist_cldy_lw | K_distribution_file_for_cloudy_RRTMGP_LW_scheme | DDT containing spectral information for cloudy RRTMGP LW radiation scheme | DDT | 0 | ty_cloud_optics | | in | F | !! | optical_props_clouds | longwave_optical_properties_for_cloudy_atmosphere | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_1scl | | out | F | !! | optical_props_aerosol | longwave_optical_properties_for_aerosols | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_1scl | | out | F | +!! | cldtaulw | cloud_optical_depth_layers_at_10mu_band | approx 10mu band layer cloud optical depth | none | 2 | real | kind_phys | out | F | !! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | !! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | !! @@ -45,7 +46,7 @@ end subroutine GFS_rrtmgp_lw_init ! ######################################################################################### subroutine GFS_rrtmgp_lw_run(Model, ncol, icseed_lw, p_lay, t_lay, p_lev, cld_frac, & cld_lwp, cld_reliq, cld_iwp, cld_reice, gas_concentrations, kdist_lw, aerosols, & - kdist_cldy_lw, optical_props_clouds, optical_props_aerosol, errmsg, errflg) + kdist_cldy_lw, optical_props_clouds, optical_props_aerosol, cldtaulw, errmsg, errflg) ! Inputs type(GFS_control_type), intent(in) :: & @@ -76,6 +77,8 @@ subroutine GFS_rrtmgp_lw_run(Model, ncol, icseed_lw, p_lay, t_lay, p_lev, cld_fr kdist_cldy_lw ! real(kind_phys), intent(in),dimension(ncol, model%levs, kdist_lw%get_nband(),3) :: & aerosols ! + real(kind_phys), dimension(ncol,Model%levs), intent(out) :: & + cldtaulw ! approx 10.mu band layer cloud optical depth ! Outputs type(ty_optical_props_1scl),intent(out) :: & @@ -172,6 +175,9 @@ subroutine GFS_rrtmgp_lw_run(Model, ncol, icseed_lw, p_lay, t_lay, p_lev, cld_fr ! Map band optical depth to each g-point using McICA call check_error_msg('GFS_rrtmgp_lw_run',draw_samples(cldfracMCICA,optical_props_cloudsByBand,optical_props_clouds)) + ! GFS_RRTMGP_POST_RUN() requires the LW optical depth ~10microns + cldtaulw = optical_props_cloudsByBand%tau(:,:,7) + end subroutine GFS_rrtmgp_lw_run subroutine GFS_rrtmgp_lw_finalize() diff --git a/physics/GFS_rrtmgp_lw_post.F90 b/physics/GFS_rrtmgp_lw_post.F90 new file mode 100644 index 000000000..f1b10da86 --- /dev/null +++ b/physics/GFS_rrtmgp_lw_post.F90 @@ -0,0 +1,213 @@ +!>\file GFS_rrtmgp_lw_post +!!This file contains +module GFS_rrtmgp_lw_post + use machine, only: kind_phys + use GFS_typedefs, only: GFS_statein_type, & + GFS_coupling_type, & + GFS_control_type, & + GFS_grid_type, & + GFS_radtend_type, & + GFS_diag_type + use module_radiation_aerosols, only: NSPC1 + use module_radlw_parameters, only: topflw_type, sfcflw_type, proflw_type + ! RRTMGP DDT's + use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp + use mo_fluxes_byband, only: ty_fluxes_byband + use mo_heating_rates, only: compute_heating_rate + implicit none + + public GFS_rrtmgp_lw_post_init,GFS_rrtmgp_lw_post_run,GFS_rrtmgp_lw_post_finalize + +contains + + subroutine GFS_rrtmgp_lw_post_init() + end subroutine GFS_rrtmgp_lw_post_init + + ! PGI compiler does not accept lines longer than 264 characters, remove during pre-processing +#ifndef __PGI +!> \section arg_table_GFS_rrtmgp_lw_post_run Argument Table +!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | +!! |-------------------|------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------|----------|------|----------------------|-----------|--------|----------| +!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | +!! | Grid | GFS_grid_type_instance | Fortran DDT containing FV3-GFS grid and interpolation related data | DDT | 0 | GFS_grid_type | | in | F | +!! | Diag | GFS_diag_type_instance | Fortran DDT containing FV3-GFS diagnotics data | DDT | 0 | GFS_diag_type | | inout | F | +!! | Radtend | GFS_radtend_type_instance | Fortran DDT containing FV3-GFS radiation tendencies | DDT | 0 | GFS_radtend_type | | inout | F | +!! | Statein | GFS_statein_type_instance | Fortran DDT containing FV3-GFS prognostic state data in from dycore | DDT | 0 | GFS_statein_type | | in | F | +!! | Coupling | GFS_coupling_type_instance | Fortran DDT containing FV3-GFS fields to/from coupling with other components | DDT | 0 | GFS_coupling_type | | inout | F | +!! | im | horizontal_loop_extent | horizontal loop extent | count | 0 | integer | | in | F | +!! | tsfa | surface_air_temperature_for_radiation | lowest model layer air temperature for radiation | K | 1 | real | kind_phys | in | F | +!! | p_lev | air_pressure_at_interface_for_RRTMGP_in_hPa | air pressure level | hPa | 2 | real | kind_phys | in | F | +!! | fluxlwUP_allsky | lw_flux_profile_upward_allsky | RRTMGP upward longwave all-sky flux profile | W m-2 | 2 | real | kind_phys | in | F | +!! | fluxlwDOWN_allsky | lw_flux_profile_downward_allsky | RRTMGP downward longwave all-sky flux profile | W m-2 | 2 | real | kind_phys | in | F | +!! | fluxlwUP_clrsky | lw_flux_profile_upward_clrsky | RRTMGP upward longwave clr-sky flux profile | W m-2 | 2 | real | kind_phys | in | F | +!! | fluxlwDOWN_clrsky | lw_flux_profile_downward_clrsky | RRTMGP downward longwave clr-sky flux profile | W m-2 | 2 | real | kind_phys | in | F | +!! | kdist_lw | K_distribution_file_for_RRTMGP_LW_scheme | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | +!! | hlwc | tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_step | longwave total sky heating rate | K s-1 | 2 | real | kind_phys | out | F | +!! | topflx_lw | lw_fluxes_top_atmosphere | longwave total sky fluxes at the top of the atm | W m-2 | 1 | topflw_type | | inout | F | +!! | sfcflx_lw | lw_fluxes_sfc | longwave total sky fluxes at the Earth surface | W m-2 | 1 | sfcflw_type | | inout | F | +!! | flxprf_lw | lw_fluxes | lw fluxes total sky / csk and up / down at levels | W m-2 | 2 | proflw_type | | inout | T | +!! | hlw0 | tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_time_step | longwave clear sky heating rate | K s-1 | 2 | real | kind_phys | inout | T | +!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | +!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! +#endif + subroutine GFS_rrtmgp_lw_post_run (Model, Grid, Diag, Radtend, Statein, & + Coupling, im, p_lev, kdist_lw, & + tsfa, fluxlwUP_allsky, fluxlwDOWN_allsky, fluxlwUP_clrsky, fluxlwDOWN_clrsky, & + hlwc, topflx_lw, sfcflx_lw, flxprf_lw, hlw0, errmsg, errflg) + + ! Inputs + type(GFS_control_type), intent(in) :: & + Model ! Fortran DDT containing FV3-GFS model control parameters + type(GFS_grid_type), intent(in) :: & + Grid ! Fortran DDT containing FV3-GFS grid and interpolation related data + type(GFS_statein_type), intent(in) :: & + Statein ! Fortran DDT containing FV3-GFS prognostic state data in from dycore + type(GFS_coupling_type), intent(inout) :: & + Coupling ! Fortran DDT containing FV3-GFS fields to/from coupling with other components + type(GFS_radtend_type), intent(inout) :: & + Radtend ! Fortran DDT containing FV3-GFS radiation tendencies + type(GFS_diag_type), intent(inout) :: & + Diag ! Fortran DDT containing FV3-GFS diagnotics data + integer, intent(in) :: & + im ! Horizontal loop extent + real(kind_phys), dimension(size(Grid%xlon,1)), intent(in) :: & + tsfa ! Lowest model layer air temperature for radiation + type(ty_gas_optics_rrtmgp),intent(in) :: & + kdist_lw ! DDT containing LW spectral information + real(kind_phys), dimension(size(Grid%xlon,1), Model%levs+1), intent(in) :: & + p_lev ! Pressure @ model layer-interfaces (hPa) + real(kind_phys), dimension(size(Grid%xlon,1), Model%levs+1), intent(in) :: & + fluxlwUP_allsky, & ! LW All-sky flux (W/m2) + fluxlwDOWN_allsky, & ! LW All-sky flux (W/m2) + fluxlwUP_clrsky, & ! LW Clear-sky flux (W/m2) + fluxlwDOWN_clrsky ! LW All-sky flux (W/m2) + + ! Outputs (mandatory) + character(len=*), intent(out) :: & + errmsg + integer, intent(out) :: & + errflg + real(kind_phys),dimension(size(Grid%xlon,1), Model%levs),intent(out) :: & + hlwc ! Longwave all-sky heating-rate (K/sec) + type(topflw_type), dimension(size(Grid%xlon,1)), intent(inout) :: & + topflx_lw ! radiation fluxes at top, components: + ! upfxc - total sky upward flux at top (w/m2) + ! upfx0 - clear sky upward flux at top (w/m2) + type(sfcflw_type), dimension(size(Grid%xlon,1)), intent(inout) :: & + sfcflx_lw ! radiation fluxes at sfc, components: + ! upfxc - total sky upward flux at sfc (w/m2) + ! upfx0 - clear sky upward flux at sfc (w/m2) + ! dnfxc - total sky downward flux at sfc (w/m2) + ! dnfx0 - clear sky downward flux at sfc (w/m2) + + ! Outputs (optional) + real(kind_phys), dimension(size(Grid%xlon,1), Model%levs), optional, intent(inout) :: & + hlw0 ! Longwave clear-sky heating rate (K/sec) + type(proflw_type), dimension(size(Grid%xlon,1), Model%levs+1), optional, intent(inout) :: & + flxprf_lw ! 2D radiative fluxes, components: + ! upfxc - total sky upward flux (W/m2) + ! dnfxc - total sky dnward flux (W/m2) + ! upfx0 - clear sky upward flux (W/m2) + ! dnfx0 - clear sky dnward flux (W/m2) + + ! Local variables + integer :: i, j, k, iBand, iSFC, iTOA + logical :: l_clrskylw_hr, l_fluxeslw2d, top_at_1 + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + + if (.not. Model%lslwr) return + + ! Are any optional outputs requested? + l_clrskylw_hr = present(hlw0) + l_fluxeslw2d = present(flxprf_lw) + + ! ####################################################################################### + ! What is vertical ordering? + ! ####################################################################################### + top_at_1 = (p_lev(1,1) .lt. p_lev(1, Model%levs)) + if (top_at_1) then + iSFC = Model%levs + iTOA = 1 + else + iSFC = 1 + iTOA = Model%levs + endif + + ! ####################################################################################### + ! Compute LW heating-rates. + ! ####################################################################################### + if (Model%lslwr) then + ! Clear-sky heating-rate (optional) + if (l_clrskylw_hr) then + call check_error_msg('GFS_rrtmgp_post',compute_heating_rate( & + fluxlwUP_clrsky, & + fluxlwDOWN_clrsky, & + p_lev, & + hlw0)) + endif + ! All-sky heating-rate (mandatory) + call check_error_msg('GFS_rrtmgp_post',compute_heating_rate( & + fluxlwUP_allsky, & + fluxlwDOWN_allsky, & + p_lev, & + hlwc)) + + ! Copy fluxes from RRTGMP types into model radiation types. + ! Mandatory outputs + topflx_lw%upfxc = fluxlwUP_allsky(:,iTOA) + topflx_lw%upfx0 = fluxlwUP_clrsky(:,iTOA) + sfcflx_lw%upfxc = fluxlwUP_allsky(:,iSFC) + sfcflx_lw%upfx0 = fluxlwUP_clrsky(:,iSFC) + sfcflx_lw%dnfxc = fluxlwDOWN_allsky(:,iSFC) + sfcflx_lw%dnfx0 = fluxlwDOWN_clrsky(:,iSFC) + + ! Optional outputs + if(l_fluxeslw2d) then + flxprf_lw%upfxc = fluxlwUP_allsky + flxprf_lw%dnfxc = fluxlwDOWN_allsky + flxprf_lw%upfx0 = fluxlwUP_clrsky + flxprf_lw%dnfx0 = fluxlwDOWN_clrsky + endif + endif + + ! ####################################################################################### + ! Save LW outputs. + ! ####################################################################################### + if (Model%lslwr) then + ! Save surface air temp for diurnal adjustment at model t-steps + Radtend%tsflw (:) = tsfa(:) + + ! All-sky heating rate profile + do k = 1, model%levs + Radtend%htrlw(1:im,k) = hlwc(1:im,k) + enddo + if (Model%lwhtr) then + do k = 1, model%levs + Radtend%lwhc(1:im,k) = hlw0(1:im,k) + enddo + endif + + ! Radiation fluxes for other physics processes + Coupling%sfcdlw(:) = Radtend%sfcflw(:)%dnfxc + endif + + end subroutine GFS_rrtmgp_lw_post_run + + subroutine GFS_rrtmgp_lw_post_finalize () + end subroutine GFS_rrtmgp_lw_post_finalize + + subroutine check_error_msg(routine_name, error_msg) + character(len=*), intent(in) :: & + error_msg, routine_name + + if(error_msg /= "") then + print*,"ERROR("//trim(routine_name)//"): " + print*,trim(error_msg) + return + end if + end subroutine check_error_msg +end module GFS_rrtmgp_lw_post diff --git a/physics/GFS_rrtmgp_pre.F90 b/physics/GFS_rrtmgp_pre.F90 index e981fff1b..83b8c2d3c 100644 --- a/physics/GFS_rrtmgp_pre.F90 +++ b/physics/GFS_rrtmgp_pre.F90 @@ -202,7 +202,6 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, deltaP, o3_lay, delta_q, cnv_w, cnv_c, effr_l, effr_i, effr_r, effr_s, cldcov real(kind_phys), dimension(ncol, Model%levs, 2:Model%ntrac) :: tracer real(kind_phys), dimension(ncol, Model%levs, NF_VGAS) :: gas_vmr - real(kind_phys), dimension(ncol, Model%levs, Model%ncnd) :: cld_condensate real(kind_phys), dimension(ncol, Model%levs, NF_CLDS) :: clouds real(kind_phys), dimension(ncol, Model%levs, kdist_sw%get_nband(), NF_AESW)::faersw2 @@ -314,7 +313,7 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, ! ####################################################################################### call cloud_microphysics(Model, Tbd, Grid, Sfcprop, ncol, tracer, p_lay, t_lay, & p_lev, tv_lay, relhum, qs_lay, q_lay, deltaZ, deltaP, & - cld_condensate, clouds, cldsa, mbota, mtopa, de_lgth) + clouds, cldsa, mbota, mtopa, de_lgth) ! Copy output cloud fields cld_frac = clouds(:,:,1) @@ -437,7 +436,7 @@ end subroutine check_error_msg ! ####################################################################################### subroutine cloud_microphysics(Model, Tbd, Grid, Sfcprop, ncol, tracer, p_lay, t_lay, & p_lev, tv_lay, relhum, qs_lay, q_lay, deltaZ, deltaP, & - cld_condensate, clouds, cldsa, mbota, mtopa, de_lgth) + clouds, cldsa, mbota, mtopa, de_lgth) ! Inputs type(GFS_control_type), intent(in) :: & Model ! Fortran DDT containing FV3-GFS model control parameters @@ -447,10 +446,10 @@ subroutine cloud_microphysics(Model, Tbd, Grid, Sfcprop, ncol, tracer, p_lay, t_ Grid ! Fortran DDT containing FV3-GFS grid and interpolation related data type(GFS_sfcprop_type), intent(in) :: & Sfcprop ! Fortran DDT containing FV3-GFS surface fields - integer, intent(in) :: & ncol ! Number of horizontal gridpoints - real(kind_phys), dimension(ncol, Model%levs, Model%ntrac) :: tracer + real(kind_phys), dimension(ncol, Model%levs, Model%ntrac) :: & + tracer ! real(kind_phys), dimension(ncol,Model%levs), intent(in) :: & p_lay, & ! t_lay, & ! @@ -464,19 +463,17 @@ subroutine cloud_microphysics(Model, Tbd, Grid, Sfcprop, ncol, tracer, p_lay, t_ p_lev ! ! Outputs - real(kind_phys), dimension(ncol, Model%levs, Model%ncnd),intent(out) :: cld_condensate real(kind_phys), dimension(ncol, Model%levs, NF_CLDS),intent(out) :: clouds integer,dimension(ncol,3), intent(out) :: mbota, mtopa real(kind_phys), dimension(ncol), intent(out) :: de_lgth real(kind_phys), dimension(ncol, 5), intent(out) :: cldsa ! Local variables - !real(kind_phys), dimension(ncol, Model%levs, Model%ncnd) :: cld_condensate + real(kind_phys), dimension(ncol, Model%levs, Model%ncnd) :: cld_condensate integer :: i,k real(kind_phys), dimension(ncol, Model%levs) :: delta_q, cnv_w, cnv_c, effr_l, effr_i, effr_r, effr_s, cldcov real(kind_phys) :: es, qs, clwmin, clwm, clwt, onemrh, value, tem1, tem2 real(kind_phys), parameter :: xrc3 = 100. - ! ####################################################################################### ! Obtain cloud information for radiation calculations @@ -524,7 +521,6 @@ subroutine cloud_microphysics(Model, Tbd, Grid, Sfcprop, ncol, tracer, p_lay, t_ enddo endif - ! Add suspended convective cloud water to grid-scale cloud water ! only for cloud fraction & radiation computation it is to enhance ! cloudiness due to suspended convec cloud water for zhao/moorthi's @@ -563,19 +559,19 @@ subroutine cloud_microphysics(Model, Tbd, Grid, Sfcprop, ncol, tracer, p_lay, t_ else do k=1,model%levs do i=1,ncol - !cldcov(i,k1) = Tbd%phy_f3d(i,k,Model%indcld) - !if (tracer1(i,k,ntcw) .gt. 0 .or. tracer1(i,k,ntiw) .gt. 0) then - ! cldcov(i,k) = 0.1 - !else - ! cldcov(i,k) = 0.0 - !endif + cldcov(i,k1) = Tbd%phy_f3d(i,k,Model%indcld) + if (tracer(i,k,model%ntcw) .gt. 0 .or. tracer(i,k,model%ntiw) .gt. 0) then + cldcov(i,k) = 0.1 + else + cldcov(i,k) = 0.0 + endif enddo enddo endif elseif (Model%imp_physics == Model%imp_physics_gfdl) then ! GFDL MP cldcov(1:NCOL,1:Model%levs) = tracer(1:NCOL,1:Model%levs,Model%ntclamt) else ! neither of the other two cases - ! cldcov = 0.0 + cldcov = 0.0 endif ! ####################################################################################### diff --git a/physics/GFS_rrtmgp_sw.F90 b/physics/GFS_rrtmgp_sw.F90 index b64d4d712..29d55bf09 100644 --- a/physics/GFS_rrtmgp_sw.F90 +++ b/physics/GFS_rrtmgp_sw.F90 @@ -36,6 +36,7 @@ end subroutine GFS_rrtmgp_sw_init !! | kdist_cldy_sw | K_distribution_file_for_cloudy_RRTMGP_SW_scheme | DDT containing spectral information for cloudy RRTMGP SW radiation scheme | DDT | 0 | ty_cloud_optics | | in | F | !! | optical_props_clouds | shortwave_optical_properties_for_cloudy_atmosphere | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_2str | | out | F | !! | optical_props_aerosol | shortwave_optical_properties_for_aerosols | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_2str | | out | F | +!! | cldtausw | cloud_optical_depth_layers_at_0.55mu_band | approx .55mu band layer cloud optical depth | none | 2 | real | kind_phys | out | F | !! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | !! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | !! @@ -43,7 +44,7 @@ end subroutine GFS_rrtmgp_sw_init ! ######################################################################################### subroutine GFS_rrtmgp_sw_run(Model, ncol, icseed_sw, p_lay, t_lay, p_lev, cld_frac, & cld_lwp, cld_reliq, cld_iwp, cld_reice, kdist_sw, aerosols, kdist_cldy_sw, & - optical_props_clouds, optical_props_aerosol, errmsg, errflg) + optical_props_clouds, optical_props_aerosol, cldtausw, errmsg, errflg) ! Inputs type(GFS_control_type), intent(in) :: & @@ -77,6 +78,8 @@ subroutine GFS_rrtmgp_sw_run(Model, ncol, icseed_sw, p_lay, t_lay, p_lev, cld_fr type(ty_optical_props_2str),intent(out) :: & optical_props_clouds, & optical_props_aerosol + real(kind_phys), dimension(ncol,Model%levs), intent(out) :: & + cldtausw ! approx 10.mu band layer cloud optical depth integer, intent(out) :: errflg character(len=*), intent(out) :: errmsg @@ -168,7 +171,10 @@ subroutine GFS_rrtmgp_sw_run(Model, ncol, icseed_sw, p_lay, t_lay, p_lev, cld_fr ! Map band optical depth to each g-point using McICA call check_error_msg('GFS_rrtmgp_sw_run',draw_samples(cldfracMCICA,optical_props_cloudsByBand,optical_props_clouds)) - + + ! GFS_RRTMGP_POST_RUN() requires the SW optical depth ~0.55microns + cldtausw = optical_props_cloudsByBand%tau(:,:,11) + end subroutine GFS_rrtmgp_sw_run subroutine GFS_rrtmgp_sw_finalize() diff --git a/physics/GFS_rrtmgp_sw_post.F90 b/physics/GFS_rrtmgp_sw_post.F90 new file mode 100644 index 000000000..a8c2d87bc --- /dev/null +++ b/physics/GFS_rrtmgp_sw_post.F90 @@ -0,0 +1,287 @@ +!>\file GFS_rrtmgp_sw_post +!!This file contains +module GFS_rrtmgp_sw_post + use machine, only: kind_phys + use GFS_typedefs, only: GFS_statein_type, & + GFS_coupling_type, & + GFS_control_type, & + GFS_grid_type, & + GFS_radtend_type, & + GFS_diag_type + use module_radiation_aerosols, only: NSPC1 + use module_radsw_parameters, only: topfsw_type, sfcfsw_type, profsw_type, cmpfsw_type + ! RRTMGP DDT's + use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp + use mo_fluxes_byband, only: ty_fluxes_byband + use mo_heating_rates, only: compute_heating_rate + implicit none + + public GFS_rrtmgp_sw_post_init,GFS_rrtmgp_sw_post_run,GFS_rrtmgp_sw_post_finalize + +contains + + subroutine GFS_rrtmgp_sw_post_init() + end subroutine GFS_rrtmgp_sw_post_init + + ! PGI compiler does not accept lines longer than 264 characters, remove during pre-processing +#ifndef __PGI +!> \section arg_table_GFS_rrtmgp_sw_post_run Argument Table +!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | +!! |-------------------|------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------|----------|------|----------------------|-----------|--------|----------| +!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | +!! | Grid | GFS_grid_type_instance | Fortran DDT containing FV3-GFS grid and interpolation related data | DDT | 0 | GFS_grid_type | | in | F | +!! | Diag | GFS_diag_type_instance | Fortran DDT containing FV3-GFS diagnotics data | DDT | 0 | GFS_diag_type | | inout | F | +!! | Radtend | GFS_radtend_type_instance | Fortran DDT containing FV3-GFS radiation tendencies | DDT | 0 | GFS_radtend_type | | inout | F | +!! | Statein | GFS_statein_type_instance | Fortran DDT containing FV3-GFS prognostic state data in from dycore | DDT | 0 | GFS_statein_type | | in | F | +!! | Coupling | GFS_coupling_type_instance | Fortran DDT containing FV3-GFS fields to/from coupling with other components | DDT | 0 | GFS_coupling_type | | inout | F | +!! | scmpsw | components_of_surface_downward_shortwave_fluxes | derived type for special components of surface downward shortwave fluxes | W m-2 | 1 | cmpfsw_type | | inout | T | +!! | im | horizontal_loop_extent | horizontal loop extent | count | 0 | integer | | in | F | +!! | tsfa | surface_air_temperature_for_radiation | lowest model layer air temperature for radiation | K | 1 | real | kind_phys | in | F | +!! | p_lev | air_pressure_at_interface_for_RRTMGP_in_hPa | air pressure level | hPa | 2 | real | kind_phys | in | F | +!! | nday | daytime_points_dimension | daytime points dimension | count | 0 | integer | | in | F | +!! | idxday | daytime_points | daytime points | index | 1 | integer | | in | F | +!! | fluxswUP_allsky | sw_flux_profile_upward_allsky | RRTMGP upward shortwave all-sky flux profile | W m-2 | 2 | real | kind_phys | in | F | +!! | fluxswDOWN_allsky | sw_flux_profile_downward_allsky | RRTMGP downward shortwave all-sky flux profile | W m-2 | 2 | real | kind_phys | in | F | +!! | fluxswUP_clrsky | sw_flux_profile_upward_clrsky | RRTMGP upward shortwave clr-sky flux profile | W m-2 | 2 | real | kind_phys | in | F | +!! | fluxswDOWN_clrsky | sw_flux_profile_downward_clrsky | RRTMGP downward shortwave clr-sky flux profile | W m-2 | 2 | real | kind_phys | in | F | +!! | kdist_sw | K_distribution_file_for_RRTMGP_SW_scheme | DDT containing spectral information for RRTMGP SW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | +!! | sfc_alb_nir_dir | surface_shortwave_albedo_near_infrared_direct_in_each_band | surface sw near-infrared direct albedo in each SW band | frac | 2 | real | kind_phys | in | F | +!! | sfc_alb_nir_dif | surface_shortwave_albedo_near_infrared_diffuse_in_each_band | surface sw near-infrared diffuse albedo in each SW band | frac | 2 | real | kind_phys | in | F | +!! | sfc_alb_uvvis_dir | surface_shortwave_albedo_uv_visible_direct_in_each_band | surface sw uv-visible direct albedo in each SW band | frac | 2 | real | kind_phys | in | F | +!! | sfc_alb_uvvis_dif | surface_shortwave_albedo_uv_visible_diffuse_in_each_band | surface sw uv-visible diffuse albedo in each SW band | frac | 2 | real | kind_phys | in | F | +!! | hswc | tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step | shortwave total sky heating rate | K s-1 | 2 | real | kind_phys | out | F | +!! | topflx_sw | sw_fluxes_top_atmosphere | shortwave total sky fluxes at the top of the atm | W m-2 | 1 | topfsw_type | | inout | F | +!! | sfcflx_sw | sw_fluxes_sfc | shortwave total sky fluxes at the Earth surface | W m-2 | 1 | sfcfsw_type | | inout | F | +!! | flxprf_sw | sw_fluxes | sw fluxes total sky / csk and up / down at levels | W m-2 | 2 | profsw_type | | inout | T | +!! | hsw0 | tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_time_step | shortwave clear sky heating rate | K s-1 | 2 | real | kind_phys | inout | T | +!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | +!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! +#endif + subroutine GFS_rrtmgp_sw_post_run (Model, Grid, Diag, Radtend, Statein, Coupling, & + scmpsw, im, p_lev, kdist_sw, sfc_alb_nir_dir, sfc_alb_nir_dif, sfc_alb_uvvis_dir, & + sfc_alb_uvvis_dif, tsfa, nday, idxday, fluxswUP_allsky, fluxswDOWN_allsky, & + fluxswUP_clrsky, fluxswDOWN_clrsky, hswc, topflx_sw, sfcflx_sw, flxprf_sw, hsw0, & + errmsg, errflg) + + ! Inputs + type(GFS_control_type), intent(in) :: & + Model ! Fortran DDT containing FV3-GFS model control parameters + type(GFS_grid_type), intent(in) :: & + Grid ! Fortran DDT containing FV3-GFS grid and interpolation related data + type(GFS_statein_type), intent(in) :: & + Statein ! Fortran DDT containing FV3-GFS prognostic state data in from dycore + type(GFS_coupling_type), intent(inout) :: & + Coupling ! Fortran DDT containing FV3-GFS fields to/from coupling with other components + type(GFS_radtend_type), intent(inout) :: & + Radtend ! Fortran DDT containing FV3-GFS radiation tendencies + type(GFS_diag_type), intent(inout) :: & + Diag ! Fortran DDT containing FV3-GFS diagnotics data + integer, intent(in) :: & + im, & ! Horizontal loop extent + nDay ! Number of daylit columns + integer, intent(in), dimension(nday) :: & + idxday ! Index array for daytime points + real(kind_phys), dimension(size(Grid%xlon,1)), intent(in) :: & + tsfa ! Lowest model layer air temperature for radiation + type(ty_gas_optics_rrtmgp),intent(in) :: & + kdist_sw ! DDT containing SW spectral information + real(kind_phys), dimension(size(Grid%xlon,1), Model%levs+1), intent(in) :: & + p_lev ! Pressure @ model layer-interfaces (hPa) + real(kind_phys),dimension(kdist_sw%get_nband(),size(Grid%xlon,1)),intent(in) :: & + sfc_alb_nir_dir, & ! Shortwave surface albedo (nIR-direct) + sfc_alb_nir_dif, & ! Shortwave surface albedo (nIR-diffuse) + sfc_alb_uvvis_dir, & ! Shortwave surface albedo (uvvis-direct) + sfc_alb_uvvis_dif ! Shortwave surface albedo (uvvis-diffuse) + real(kind_phys), dimension(size(Grid%xlon,1), Model%levs+1), intent(in) :: & + fluxswUP_allsky, & ! SW All-sky flux (W/m2) + fluxswDOWN_allsky, & ! SW All-sky flux (W/m2) + fluxswUP_clrsky, & ! SW Clear-sky flux (W/m2) + fluxswDOWN_clrsky ! SW All-sky flux (W/m2) + + ! Outputs (mandatory) + character(len=*), intent(out) :: & + errmsg + integer, intent(out) :: & + errflg + real(kind_phys),dimension(size(Grid%xlon,1), Model%levs),intent(out) :: & + hswc ! Shortwave all-sky heating-rate (K/sec) + type(topfsw_type), dimension(size(Grid%xlon,1)), intent(inout) :: & + topflx_sw ! radiation fluxes at top, components: + ! upfxc - total sky upward flux at top (w/m2) + ! upfx0 - clear sky upward flux at top (w/m2) + type(sfcfsw_type), dimension(size(Grid%xlon,1)), intent(inout) :: & + sfcflx_sw ! radiation fluxes at sfc, components: + ! upfxc - total sky upward flux at sfc (w/m2) + ! upfx0 - clear sky upward flux at sfc (w/m2) + ! dnfxc - total sky downward flux at sfc (w/m2) + ! dnfx0 - clear sky downward flux at sfc (w/m2) + + ! Outputs (optional) + real(kind_phys), dimension(size(Grid%xlon,1), Model%levs), optional, intent(inout) :: & + hsw0 ! Shortwave clear-sky heating-rate (K/sec) + type(profsw_type), dimension(size(Grid%xlon,1), Model%levs+1), intent(inout), optional :: & + flxprf_sw ! 2D radiative fluxes, components: + ! upfxc - total sky upward flux (W/m2) + ! dnfxc - total sky dnward flux (W/m2) + ! upfx0 - clear sky upward flux (W/m2) + ! dnfx0 - clear sky dnward flux (W/m2) + type(cmpfsw_type), dimension(size(Grid%xlon,1)), intent(inout), optional :: & + scmpsw ! 2D surface fluxes, components: + ! uvbfc - total sky downward uv-b flux at (W/m2) + ! uvbf0 - clear sky downward uv-b flux at (W/m2) + ! nirbm - downward nir direct beam flux (W/m2) + ! nirdf - downward nir diffused flux (W/m2) + ! visbm - downward uv+vis direct beam flux (W/m2) + ! visdf - downward uv+vis diffused flux (W/m2) + ! Local variables + integer :: i, j, k, k1, itop, ibtc, iBand, iSFC, iTOA + real(kind_phys) :: tem0d, tem1, tem2 + real(kind_phys), dimension(nDay, Model%levs) :: thetaTendClrSky, thetaTendAllSky + logical :: l_clrskysw_hr, l_fluxessw2d, top_at_1, l_sfcFluxessw1D + + ! Are any optional outputs requested? + l_clrskysw_hr = present(hsw0) + l_fluxessw2d = present(flxprf_sw) + l_sfcfluxessw1D = present(scmpsw) + + ! ####################################################################################### + ! What is vertical ordering? + ! ####################################################################################### + top_at_1 = (p_lev(1,1) .lt. p_lev(1, Model%levs)) + if (top_at_1) then + iSFC = Model%levs + iTOA = 1 + else + iSFC = 1 + iTOA = Model%levs + endif + ! ####################################################################################### + ! Compute SW heating-rates + ! ####################################################################################### + ! Initialize outputs + hswc(:,:) = 0. + topflx_sw = topfsw_type ( 0., 0., 0. ) + sfcflx_sw = sfcfsw_type ( 0., 0., 0., 0. ) + if (l_clrskysw_hr) then + hsw0(:,:) = 0. + endif + if (l_fluxessw2D) then + flxprf_sw = profsw_type ( 0., 0., 0., 0. ) + endif + if (l_sfcfluxessw1D) then + scmpsw = cmpfsw_type (0.,0.,0.,0.,0.,0.) + endif + + if (Model%lsswr .and. nDay .gt. 0) then + ! Clear-sky heating-rate (optional) + if (l_clrskysw_HR) then + call check_error_msg('GFS_rrtmgp_post',compute_heating_rate( & + fluxswUP_clrsky, & + fluxswDOWN_clrsky, & + p_lev(idxday,1:Model%levs+1), & + thetaTendClrSky)) + hsw0(idxday,:)=thetaTendClrSky + endif + ! All-sky heating-rate (mandatory) + call check_error_msg('GFS_rrtmgp_post',compute_heating_rate( & + fluxswUP_allsky, & + fluxswDOWN_allsky, & + p_lev(idxday,1:Model%levs+1), & + thetaTendAllSky)) + hswc(idxday,:) = thetaTendAllSky + + ! Copy fluxes from RRTGMP types into model radiation types. + ! Mandatory outputs + topflx_sw%upfxc = fluxswUP_allsky(:,iTOA) + topflx_sw%upfx0 = fluxswUP_clrsky(:,iTOA) + sfcflx_sw%upfxc = fluxswUP_allsky(:,iSFC) + sfcflx_sw%upfx0 = fluxswUP_clrsky(:,iSFC) + sfcflx_sw%dnfxc = fluxswDOWN_allsky(:,iSFC) + sfcflx_sw%dnfx0 = fluxswDOWN_clrsky(:,iSFC) + + ! Optional output + if(l_fluxessw2D) then + flxprf_sw%upfxc = fluxswUP_allsky + flxprf_sw%dnfxc = fluxswDOWN_allsky + flxprf_sw%upfx0 = fluxswUP_clrsky + flxprf_sw%dnfx0 = fluxswDOWN_clrsky + endif + endif + + ! ####################################################################################### + ! Save SW outputs + ! ####################################################################################### + if (Model%lsswr) then + if (nday > 0) then + ! All-sky heating rate + do k = 1, Model%levs + Radtend%htrsw(1:im,k) = hswc(1:im,k) + enddo + ! Clear-sk heating rate + if (Model%swhtr) then + do k = 1, Model%levs + Radtend%swhc(1:im,k) = hsw0(1:im,k) + enddo + endif + + ! Surface down and up spectral component fluxes + ! - Save two spectral bands' surface downward and upward fluxes for output. + do i=1,im + Coupling%nirbmdi(i) = scmpsw(i)%nirbm + Coupling%nirdfdi(i) = scmpsw(i)%nirdf + Coupling%visbmdi(i) = scmpsw(i)%visbm + Coupling%visdfdi(i) = scmpsw(i)%visdf + + Coupling%nirbmui(i) = scmpsw(i)%nirbm * sfc_alb_nir_dir(1,i) + Coupling%nirdfui(i) = scmpsw(i)%nirdf * sfc_alb_nir_dif(1,i) + Coupling%visbmui(i) = scmpsw(i)%visbm * sfc_alb_uvvis_dir(1,i) + Coupling%visdfui(i) = scmpsw(i)%visdf * sfc_alb_uvvis_dif(1,i) + enddo + else ! if_nday_block + Radtend%htrsw(:,:) = 0.0 + Radtend%sfcfsw = sfcfsw_type( 0.0, 0.0, 0.0, 0.0 ) + Diag%topfsw = topfsw_type( 0.0, 0.0, 0.0 ) + scmpsw = cmpfsw_type( 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ) + + do i=1,im + Coupling%nirbmdi(i) = 0.0 + Coupling%nirdfdi(i) = 0.0 + Coupling%visbmdi(i) = 0.0 + Coupling%visdfdi(i) = 0.0 + + Coupling%nirbmui(i) = 0.0 + Coupling%nirdfui(i) = 0.0 + Coupling%visbmui(i) = 0.0 + Coupling%visdfui(i) = 0.0 + enddo + + if (Model%swhtr) then + Radtend%swhc(:,:) = 0 + endif + endif ! end_if_nday + + ! Radiation fluxes for other physics processes + do i=1,im + Coupling%sfcnsw(i) = Radtend%sfcfsw(i)%dnfxc - Radtend%sfcfsw(i)%upfxc + Coupling%sfcdsw(i) = Radtend%sfcfsw(i)%dnfxc + enddo + endif ! end_if_lsswr + + + end subroutine GFS_rrtmgp_sw_post_run + + subroutine GFS_rrtmgp_sw_post_finalize () + end subroutine GFS_rrtmgp_sw_post_finalize + + subroutine check_error_msg(routine_name, error_msg) + character(len=*), intent(in) :: & + error_msg, routine_name + + if(error_msg /= "") then + print*,"ERROR("//trim(routine_name)//"): " + print*,trim(error_msg) + return + end if + end subroutine check_error_msg +end module GFS_rrtmgp_sw_post From 4e0cfc85d8629d0130d22913e6c03030010114de Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Fri, 31 May 2019 15:27:09 -0600 Subject: [PATCH 031/167] Added back option to call RRTMG cloud_optics(). --- physics/GFS_rrtmgp_lw.F90 | 78 +++++---- physics/GFS_rrtmgp_post.F90 | 312 ++---------------------------------- physics/GFS_rrtmgp_pre.F90 | 30 ++-- physics/GFS_rrtmgp_sw.F90 | 93 +++++++---- 4 files changed, 147 insertions(+), 366 deletions(-) diff --git a/physics/GFS_rrtmgp_lw.F90 b/physics/GFS_rrtmgp_lw.F90 index a71a10d13..d46f5c74a 100644 --- a/physics/GFS_rrtmgp_lw.F90 +++ b/physics/GFS_rrtmgp_lw.F90 @@ -1,15 +1,15 @@ module GFS_rrtmgp_lw - use GFS_typedefs, only: GFS_control_type - use machine, only: kind_phys - use physparam, only: isubclw, iovrlw - use rrtmgp_lw, only: nrghice_lw => nrghice, ipsdlw0 - use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp - use mo_cloud_optics, only: ty_cloud_optics - use mo_optical_props, only: ty_optical_props_1scl, ty_optical_props_2str - use mo_cloud_sampling, only: sampled_mask_max_ran, sampled_mask_exp_ran, draw_samples - use mo_gas_concentrations, only: ty_gas_concs - use mersenne_twister, only: random_setseed, random_number, random_stat - + use GFS_typedefs, only: GFS_control_type + use machine, only: kind_phys + use physparam, only: isubclw, iovrlw + use rrtmgp_lw, only: nrghice_lw => nrghice, ipsdlw0 + use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp + use mo_cloud_optics, only: ty_cloud_optics + use mo_optical_props, only: ty_optical_props_1scl, ty_optical_props_2str + use mo_cloud_sampling, only: sampled_mask_max_ran, sampled_mask_exp_ran, draw_samples + use mo_gas_concentrations, only: ty_gas_concs + use mersenne_twister, only: random_setseed, random_number, random_stat + use mo_rrtmgp_lw_cloud_optics, only: rrtmgp_lw_cloud_optics public GFS_rrtmgp_lw_run,GFS_rrtmgp_lw_init,GFS_rrtmgp_lw_finalize contains @@ -31,6 +31,10 @@ end subroutine GFS_rrtmgp_lw_init !! | cld_reliq | mean_effective_radius_for_liquid_cloud | mean effective radius for liquid cloud | micron | 2 | real | kind_phys | in | F | !! | cld_iwp | cloud_ice_water_path | layer cloud ice water path | g m-2 | 2 | real | kind_phys | in | F | !! | cld_reice | mean_effective_radius_for_ice_cloud | mean effective radius for ice cloud | micron | 2 | real | kind_phys | in | F | +!! | cld_swp | cloud_snow_water_path | layer cloud snow water path | g m-2 | 2 | real | kind_phys | in | F | +!! | cld_resnow | mean_effective_radius_for_snow_flake | mean effective radius for snow cloud | micron | 2 | real | kind_phys | in | F | +!! | cld_rwp | cloud_rain_water_path | layer cloud rain water path | g m-2 | 2 | real | kind_phys | in | F | +!! | cld_rerain | mean_effective_radius_for_rain_drop | mean effective radius for rain cloud | micron | 2 | real | kind_phys | in | F | !! | gas_concentrations | Gas_concentrations_for_RRTMGP_suite | DDT containing gas concentrations for RRTMGP radiation scheme | DDT | 0 | ty_gas_concs | | in | F | !! | icseed_lw | seed_random_numbers_sw | seed for random number generation for shortwave radiation | none | 1 | integer | | in | F | !! | kdist_lw | K_distribution_file_for_RRTMGP_LW_scheme | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | @@ -45,8 +49,9 @@ end subroutine GFS_rrtmgp_lw_init ! ######################################################################################### ! ######################################################################################### subroutine GFS_rrtmgp_lw_run(Model, ncol, icseed_lw, p_lay, t_lay, p_lev, cld_frac, & - cld_lwp, cld_reliq, cld_iwp, cld_reice, gas_concentrations, kdist_lw, aerosols, & - kdist_cldy_lw, optical_props_clouds, optical_props_aerosol, cldtaulw, errmsg, errflg) + cld_lwp, cld_reliq, cld_iwp, cld_reice, cld_swp, cld_resnow, cld_rwp, cld_rerain, & + gas_concentrations, kdist_lw, aerosols, kdist_cldy_lw, & + optical_props_clouds, optical_props_aerosol, cldtaulw, errmsg, errflg) ! Inputs type(GFS_control_type), intent(in) :: & @@ -68,7 +73,11 @@ subroutine GFS_rrtmgp_lw_run(Model, ncol, icseed_lw, p_lay, t_lay, p_lev, cld_fr cld_lwp, & ! Cloud liquid water path cld_reliq, & ! Cloud liquid effective radius cld_iwp, & ! Cloud ice water path - cld_reice ! Cloud ice effective radius + cld_reice, & ! Cloud ice effective radius + cld_swp, & ! Cloud snow water path + cld_resnow, & ! Cloud snow effective radius + cld_rwp, & ! Cloud rain water path + cld_rerain ! Cloud rain effective radius type(ty_gas_concs),intent(in) :: & gas_concentrations ! type(ty_gas_optics_rrtmgp),intent(in) :: & @@ -96,6 +105,8 @@ subroutine GFS_rrtmgp_lw_run(Model, ncol, icseed_lw, p_lay, t_lay, p_lev, cld_fr real(kind_phys), dimension(kdist_lw%get_ngpt(),model%levs,ncol) :: rng3D real(kind_phys), dimension(kdist_lw%get_ngpt()*model%levs) :: rng1D logical, dimension(ncol,model%levs,kdist_lw%get_ngpt()) :: cldfracMCICA + real(kind_phys), dimension(ncol,model%levs,kdist_lw%get_nband()) :: & + tau_cld ! Initialize CCPP error handling variables errmsg = '' @@ -140,20 +151,31 @@ subroutine GFS_rrtmgp_lw_run(Model, ncol, icseed_lw, p_lay, t_lay, p_lev, cld_fr ! ####################################################################################### ! Compute cloud-optics for RTE. ! ####################################################################################### - call check_error_msg('GFS_rrtmgp_lw_run',kdist_cldy_lw%cloud_optics(& - ncol, & ! IN - Number of horizontal gridpoints - model%levs, & ! IN - Number of vertical layers - kdist_lw%get_nband(), & ! IN - Number of LW bands - nrghice_lw, & ! IN - Number of ice-roughness categories - liqmask, & ! IN - Liquid-cloud mask - icemask, & ! IN - Ice-cloud mask - cld_lwp, & ! IN - Cloud liquid water path - cld_iwp, & ! IN - Cloud ice water path - cld_reliq, & ! IN - Cloud liquid effective radius - cld_reice, & ! IN - Cloud ice effective radius - optical_props_cloudsByBand)) ! OUT - RRTMGP DDT containing cloud radiative properties - ! in each band - + if (Model%rrtmgp_cld_phys .gt. 0) then + ! i) RRTMGP cloud-optics. + call check_error_msg('GFS_rrtmgp_lw_run',kdist_cldy_lw%cloud_optics(& + ncol, & ! IN - Number of horizontal gridpoints + model%levs, & ! IN - Number of vertical layers + kdist_lw%get_nband(), & ! IN - Number of LW bands + nrghice_lw, & ! IN - Number of ice-roughness categories + liqmask, & ! IN - Liquid-cloud mask + icemask, & ! IN - Ice-cloud mask + cld_lwp, & ! IN - Cloud liquid water path + cld_iwp, & ! IN - Cloud ice water path + cld_reliq, & ! IN - Cloud liquid effective radius + cld_reice, & ! IN - Cloud ice effective radius + optical_props_cloudsByBand)) ! OUT - RRTMGP DDT containing cloud radiative properties + ! in each band + else + ! ii) RRTMG cloud-optics. + if (any(cld_frac .gt. 0)) then + call rrtmgp_lw_cloud_optics(ncol, model%levs, kdist_lw%get_nband(), cld_lwp, & + cld_reliq, cld_iwp, cld_reice, cld_rwp, cld_rerain, cld_swp, cld_resnow, & + cld_frac, tau_cld) + optical_props_cloudsByBand%tau = tau_cld + endif + endif + ! ####################################################################################### ! Call McICA to generate subcolumns. ! ####################################################################################### diff --git a/physics/GFS_rrtmgp_post.F90 b/physics/GFS_rrtmgp_post.F90 index 3fc71dfb8..020f37c86 100644 --- a/physics/GFS_rrtmgp_post.F90 +++ b/physics/GFS_rrtmgp_post.F90 @@ -45,45 +45,12 @@ end subroutine GFS_rrtmgp_post_init !! | cloud_fraction | total_cloud_fraction | layer total cloud fraction | frac | 2 | real | kind_phys | in | F | !! | cldtaulw | cloud_optical_depth_layers_at_10mu_band | approx 10mu band layer cloud optical depth | none | 2 | real | kind_phys | in | F | !! | cldtausw | cloud_optical_depth_layers_at_0.55mu_band | approx .55mu band layer cloud optical depth | none | 2 | real | kind_phys | in | F | -!! | tsfa | surface_air_temperature_for_radiation | lowest model layer air temperature for radiation | K | 1 | real | kind_phys | in | F | -!! | p_lev | air_pressure_at_interface_for_RRTMGP_in_hPa | air pressure level | hPa | 2 | real | kind_phys | in | F | -!! | nday | daytime_points_dimension | daytime points dimension | count | 0 | integer | | in | F | -!! | idxday | daytime_points | daytime points | index | 1 | integer | | in | F | -!! | fluxswUP_allsky | sw_flux_profile_upward_allsky | RRTMGP upward shortwave all-sky flux profile | W m-2 | 2 | real | kind_phys | in | F | -!! | fluxswDOWN_allsky | sw_flux_profile_downward_allsky | RRTMGP downward shortwave all-sky flux profile | W m-2 | 2 | real | kind_phys | in | F | -!! | fluxswUP_clrsky | sw_flux_profile_upward_clrsky | RRTMGP upward shortwave clr-sky flux profile | W m-2 | 2 | real | kind_phys | in | F | -!! | fluxswDOWN_clrsky | sw_flux_profile_downward_clrsky | RRTMGP downward shortwave clr-sky flux profile | W m-2 | 2 | real | kind_phys | in | F | -!! | fluxlwUP_allsky | lw_flux_profile_upward_allsky | RRTMGP upward longwave all-sky flux profile | W m-2 | 2 | real | kind_phys | in | F | -!! | fluxlwDOWN_allsky | lw_flux_profile_downward_allsky | RRTMGP downward longwave all-sky flux profile | W m-2 | 2 | real | kind_phys | in | F | -!! | fluxlwUP_clrsky | lw_flux_profile_upward_clrsky | RRTMGP upward longwave clr-sky flux profile | W m-2 | 2 | real | kind_phys | in | F | -!! | fluxlwDOWN_clrsky | lw_flux_profile_downward_clrsky | RRTMGP downward longwave clr-sky flux profile | W m-2 | 2 | real | kind_phys | in | F | -!! | kdist_lw | K_distribution_file_for_RRTMGP_LW_scheme | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | -!! | kdist_sw | K_distribution_file_for_RRTMGP_SW_scheme | DDT containing spectral information for RRTMGP SW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | -!! | sfc_alb_nir_dir | surface_shortwave_albedo_near_infrared_direct_in_each_band | surface sw near-infrared direct albedo in each SW band | frac | 2 | real | kind_phys | in | F | -!! | sfc_alb_nir_dif | surface_shortwave_albedo_near_infrared_diffuse_in_each_band | surface sw near-infrared diffuse albedo in each SW band | frac | 2 | real | kind_phys | in | F | -!! | sfc_alb_uvvis_dir | surface_shortwave_albedo_uv_visible_direct_in_each_band | surface sw uv-visible direct albedo in each SW band | frac | 2 | real | kind_phys | in | F | -!! | sfc_alb_uvvis_dif | surface_shortwave_albedo_uv_visible_diffuse_in_each_band | surface sw uv-visible diffuse albedo in each SW band | frac | 2 | real | kind_phys | in | F | -!! | hlwc | tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_step | longwave total sky heating rate | K s-1 | 2 | real | kind_phys | out | F | -!! | hswc | tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step | shortwave total sky heating rate | K s-1 | 2 | real | kind_phys | out | F | -!! | topflx_lw | lw_fluxes_top_atmosphere | longwave total sky fluxes at the top of the atm | W m-2 | 1 | topflw_type | | inout | F | -!! | sfcflx_lw | lw_fluxes_sfc | longwave total sky fluxes at the Earth surface | W m-2 | 1 | sfcflw_type | | inout | F | -!! | topflx_sw | sw_fluxes_top_atmosphere | shortwave total sky fluxes at the top of the atm | W m-2 | 1 | topfsw_type | | inout | F | -!! | sfcflx_sw | sw_fluxes_sfc | shortwave total sky fluxes at the Earth surface | W m-2 | 1 | sfcfsw_type | | inout | F | -!! | flxprf_lw | lw_fluxes | lw fluxes total sky / csk and up / down at levels | W m-2 | 2 | proflw_type | | inout | T | -!! | flxprf_sw | sw_fluxes | sw fluxes total sky / csk and up / down at levels | W m-2 | 2 | profsw_type | | inout | T | -!! | hlw0 | tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_time_step | longwave clear sky heating rate | K s-1 | 2 | real | kind_phys | inout | T | -!! | hsw0 | tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_time_step | shortwave clear sky heating rate | K s-1 | 2 | real | kind_phys | inout | T | !! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | !! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | !! subroutine GFS_rrtmgp_post_run (Model, Grid, Diag, Radtend, Statein, & Coupling, scmpsw, im, raddt, aerodp, & - cldsa, mtopa, mbota, cloud_fraction, cldtaulw, cldtausw, p_lev, kdist_lw, kdist_sw, & - sfc_alb_nir_dir, sfc_alb_nir_dif, sfc_alb_uvvis_dir, & - sfc_alb_uvvis_dif, & - tsfa, nday, idxday, fluxlwUP_allsky, fluxlwDOWN_allsky, fluxlwUP_clrsky, fluxlwDOWN_clrsky, & - fluxswUP_allsky, fluxswDOWN_allsky, fluxswUP_clrsky, fluxswDOWN_clrsky, & - hlwc, hswc, topflx_sw, sfcflx_sw, flxprf_sw, topflx_lw, sfcflx_lw, flxprf_lw, hlw0, hsw0, errmsg, errflg) + cldsa, mtopa, mbota, cloud_fraction, cldtaulw, cldtausw, errmsg, errflg) ! Inputs type(GFS_control_type), intent(in) :: & @@ -99,14 +66,9 @@ subroutine GFS_rrtmgp_post_run (Model, Grid, Diag, Radtend, Statein, & type(GFS_diag_type), intent(inout) :: & Diag ! Fortran DDT containing FV3-GFS diagnotics data integer, intent(in) :: & - im, & ! Horizontal loop extent - nDay ! Number of daylit columns - integer, intent(in), dimension(nday) :: & - idxday ! Index array for daytime points + im ! Horizontal loop extent real(kind_phys), intent(in) :: & raddt ! Radiation time step - real(kind_phys), dimension(size(Grid%xlon,1)), intent(in) :: & - tsfa ! Lowest model layer air temperature for radiation real(kind_phys), dimension(size(Grid%xlon,1),NSPC1), intent(in) :: & aerodp ! Vertical integrated optical depth for various aerosol species real(kind_phys), dimension(size(Grid%xlon,1),5), intent(in) :: & @@ -117,72 +79,8 @@ subroutine GFS_rrtmgp_post_run (Model, Grid, Diag, Radtend, Statein, & real(kind_phys), dimension(size(Grid%xlon,1),Model%levs), intent(in) :: & cloud_fraction, & ! Total cloud fraction in each layer cldtausw, & ! approx .55mu band layer cloud optical depth - cldtaulw ! approx 10mu band layer cloud optical depth - type(ty_gas_optics_rrtmgp),intent(in) :: & - kdist_lw, & ! DDT containing LW spectral information - kdist_sw ! DDT containing SW spectral information - real(kind_phys), dimension(size(Grid%xlon,1), Model%levs+1), intent(in) :: & - p_lev ! Pressure @ model layer-interfaces (hPa) - real(kind_phys),dimension(kdist_sw%get_nband(),size(Grid%xlon,1)),intent(in) :: & - sfc_alb_nir_dir, & ! Shortwave surface albedo (nIR-direct) - sfc_alb_nir_dif, & ! Shortwave surface albedo (nIR-diffuse) - sfc_alb_uvvis_dir, & ! Shortwave surface albedo (uvvis-direct) - sfc_alb_uvvis_dif ! Shortwave surface albedo (uvvis-diffuse) - real(kind_phys), dimension(size(Grid%xlon,1), Model%levs+1), intent(in) :: & - fluxswUP_allsky, & ! SW All-sky flux (W/m2) - fluxswDOWN_allsky, & ! SW All-sky flux (W/m2) - fluxswUP_clrsky, & ! SW Clear-sky flux (W/m2) - fluxswDOWN_clrsky, & ! SW All-sky flux (W/m2) - fluxlwUP_allsky, & ! LW All-sky flux (W/m2) - fluxlwDOWN_allsky, & ! LW All-sky flux (W/m2) - fluxlwUP_clrsky, & ! LW Clear-sky flux (W/m2) - fluxlwDOWN_clrsky ! LW All-sky flux (W/m2) - - ! Outputs (mandatory) - character(len=*), intent(out) :: & - errmsg - integer, intent(out) :: & - errflg - real(kind_phys),dimension(size(Grid%xlon,1), Model%levs),intent(out) :: & - hlwc, & ! Longwave all-sky heating-rate (K/sec) - hswc ! Shortwave all-sky heating-rate (K/sec) - type(topflw_type), dimension(size(Grid%xlon,1)), intent(inout) :: & - topflx_lw ! radiation fluxes at top, components: - ! upfxc - total sky upward flux at top (w/m2) - ! upfx0 - clear sky upward flux at top (w/m2) - type(sfcflw_type), dimension(size(Grid%xlon,1)), intent(inout) :: & - sfcflx_lw ! radiation fluxes at sfc, components: - ! upfxc - total sky upward flux at sfc (w/m2) - ! upfx0 - clear sky upward flux at sfc (w/m2) - ! dnfxc - total sky downward flux at sfc (w/m2) - ! dnfx0 - clear sky downward flux at sfc (w/m2) - type(topfsw_type), dimension(size(Grid%xlon,1)), intent(inout) :: & - topflx_sw ! radiation fluxes at top, components: - ! upfxc - total sky upward flux at top (w/m2) - ! upfx0 - clear sky upward flux at top (w/m2) - type(sfcfsw_type), dimension(size(Grid%xlon,1)), intent(inout) :: & - sfcflx_sw ! radiation fluxes at sfc, components: - ! upfxc - total sky upward flux at sfc (w/m2) - ! upfx0 - clear sky upward flux at sfc (w/m2) - ! dnfxc - total sky downward flux at sfc (w/m2) - ! dnfx0 - clear sky downward flux at sfc (w/m2) - - ! Outputs (optional) - real(kind_phys), dimension(size(Grid%xlon,1), Model%levs), optional, intent(inout) :: & - hlw0, & ! Longwave clear-sky heating rate (K/sec) - hsw0 ! Shortwave clear-sky heating-rate (K/sec) - type(proflw_type), dimension(size(Grid%xlon,1), Model%levs+1), optional, intent(inout) :: & - flxprf_lw ! 2D radiative fluxes, components: - ! upfxc - total sky upward flux (W/m2) - ! dnfxc - total sky dnward flux (W/m2) - ! upfx0 - clear sky upward flux (W/m2) - ! dnfx0 - clear sky dnward flux (W/m2) - type(profsw_type), dimension(size(Grid%xlon,1), Model%levs+1), intent(inout), optional :: & - flxprf_sw ! 2D radiative fluxes, components: - ! upfxc - total sky upward flux (W/m2) - ! dnfxc - total sky dnward flux (W/m2) - ! upfx0 - clear sky upward flux (W/m2) - ! dnfx0 - clear sky dnward flux (W/m2) + cldtaulw ! approx 10.mu band layer cloud optical depth + ! Inputs (optional) type(cmpfsw_type), dimension(size(Grid%xlon,1)), intent(inout), optional :: & scmpsw ! 2D surface fluxes, components: ! uvbfc - total sky downward uv-b flux at (W/m2) @@ -191,11 +89,16 @@ subroutine GFS_rrtmgp_post_run (Model, Grid, Diag, Radtend, Statein, & ! nirdf - downward nir diffused flux (W/m2) ! visbm - downward uv+vis direct beam flux (W/m2) ! visdf - downward uv+vis diffused flux (W/m2) + + ! Outputs (mandatory) + character(len=*), intent(out) :: & + errmsg + integer, intent(out) :: & + errflg + ! Local variables - integer :: i, j, k, k1, itop, ibtc, iBand, iSFC, iTOA + integer :: i, j, k, k1, itop, ibtc real(kind_phys) :: tem0d, tem1, tem2 - real(kind_phys), dimension(nDay, Model%levs) :: thetaTendClrSky, thetaTendAllSky - logical :: l_clrskylw_hr,l_clrskysw_hr, l_fluxeslw2d, l_fluxessw2d, top_at_1, l_sfcFluxessw1D ! Initialize CCPP error handling variables errmsg = '' @@ -203,197 +106,6 @@ subroutine GFS_rrtmgp_post_run (Model, Grid, Diag, Radtend, Statein, & if (.not. (Model%lsswr .or. Model%lslwr)) return - ! Are any optional outputs requested? - l_clrskylw_hr = present(hlw0) - l_fluxeslw2d = present(flxprf_lw) - l_clrskysw_hr = present(hsw0) - l_fluxessw2d = present(flxprf_sw) - l_sfcfluxessw1D = present(scmpsw) - - ! ####################################################################################### - ! What is vertical ordering? - ! ####################################################################################### - top_at_1 = (p_lev(1,1) .lt. p_lev(1, Model%levs)) - if (top_at_1) then - iSFC = Model%levs - iTOA = 1 - else - iSFC = 1 - iTOA = Model%levs - endif - - ! ####################################################################################### - ! Compute SW heating-rates - ! ####################################################################################### - ! Initialize outputs - hswc(:,:) = 0. - topflx_sw = topfsw_type ( 0., 0., 0. ) - sfcflx_sw = sfcfsw_type ( 0., 0., 0., 0. ) - if (l_clrskysw_hr) then - hsw0(:,:) = 0. - endif - if (l_fluxessw2D) then - flxprf_sw = profsw_type ( 0., 0., 0., 0. ) - endif - if (l_sfcfluxessw1D) then - scmpsw = cmpfsw_type (0.,0.,0.,0.,0.,0.) - endif - - if (Model%lsswr .and. nDay .gt. 0) then - ! Clear-sky heating-rate (optional) - if (l_clrskysw_HR) then - call check_error_msg('GFS_rrtmgp_post',compute_heating_rate( & - fluxswUP_clrsky, & - fluxswDOWN_clrsky, & - p_lev(idxday,1:Model%levs+1), & - thetaTendClrSky)) - hsw0(idxday,:)=thetaTendClrSky - endif - ! All-sky heating-rate (mandatory) - call check_error_msg('GFS_rrtmgp_post',compute_heating_rate( & - fluxswUP_allsky, & - fluxswDOWN_allsky, & - p_lev(idxday,1:Model%levs+1), & - thetaTendAllSky)) - hswc(idxday,:) = thetaTendAllSky - - ! Copy fluxes from RRTGMP types into model radiation types. - ! Mandatory outputs - topflx_sw%upfxc = fluxswUP_allsky(:,iTOA) - topflx_sw%upfx0 = fluxswUP_clrsky(:,iTOA) - sfcflx_sw%upfxc = fluxswUP_allsky(:,iSFC) - sfcflx_sw%upfx0 = fluxswUP_clrsky(:,iSFC) - sfcflx_sw%dnfxc = fluxswDOWN_allsky(:,iSFC) - sfcflx_sw%dnfx0 = fluxswDOWN_clrsky(:,iSFC) - - ! Optional output - if(l_fluxessw2D) then - flxprf_sw%upfxc = fluxswUP_allsky - flxprf_sw%dnfxc = fluxswDOWN_allsky - flxprf_sw%upfx0 = fluxswUP_clrsky - flxprf_sw%dnfx0 = fluxswDOWN_clrsky - endif - endif - - ! ####################################################################################### - ! Save SW outputs - ! ####################################################################################### - if (Model%lsswr) then - if (nday > 0) then - ! All-sky heating rate - do k = 1, Model%levs - Radtend%htrsw(1:im,k) = hswc(1:im,k) - enddo - ! Clear-sk heating rate - if (Model%swhtr) then - do k = 1, Model%levs - Radtend%swhc(1:im,k) = hsw0(1:im,k) - enddo - endif - - ! Surface down and up spectral component fluxes - ! - Save two spectral bands' surface downward and upward fluxes for output. - do i=1,im - Coupling%nirbmdi(i) = scmpsw(i)%nirbm - Coupling%nirdfdi(i) = scmpsw(i)%nirdf - Coupling%visbmdi(i) = scmpsw(i)%visbm - Coupling%visdfdi(i) = scmpsw(i)%visdf - - Coupling%nirbmui(i) = scmpsw(i)%nirbm * sfc_alb_nir_dir(1,i) - Coupling%nirdfui(i) = scmpsw(i)%nirdf * sfc_alb_nir_dif(1,i) - Coupling%visbmui(i) = scmpsw(i)%visbm * sfc_alb_uvvis_dir(1,i) - Coupling%visdfui(i) = scmpsw(i)%visdf * sfc_alb_uvvis_dif(1,i) - enddo - else ! if_nday_block - Radtend%htrsw(:,:) = 0.0 - Radtend%sfcfsw = sfcfsw_type( 0.0, 0.0, 0.0, 0.0 ) - Diag%topfsw = topfsw_type( 0.0, 0.0, 0.0 ) - scmpsw = cmpfsw_type( 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ) - - do i=1,im - Coupling%nirbmdi(i) = 0.0 - Coupling%nirdfdi(i) = 0.0 - Coupling%visbmdi(i) = 0.0 - Coupling%visdfdi(i) = 0.0 - - Coupling%nirbmui(i) = 0.0 - Coupling%nirdfui(i) = 0.0 - Coupling%visbmui(i) = 0.0 - Coupling%visdfui(i) = 0.0 - enddo - - if (Model%swhtr) then - Radtend%swhc(:,:) = 0 - endif - endif ! end_if_nday - - ! Radiation fluxes for other physics processes - do i=1,im - Coupling%sfcnsw(i) = Radtend%sfcfsw(i)%dnfxc - Radtend%sfcfsw(i)%upfxc - Coupling%sfcdsw(i) = Radtend%sfcfsw(i)%dnfxc - enddo - endif ! end_if_lsswr - - - ! ####################################################################################### - ! Compute LW heating-rates. (Note. This piece was originally in rrtmg_lw.F90:_run()) - ! ####################################################################################### - if (Model%lslwr) then - ! Clear-sky heating-rate (optional) - if (l_clrskylw_hr) then - call check_error_msg('GFS_rrtmgp_post',compute_heating_rate( & - fluxlwUP_clrsky, & - fluxlwDOWN_clrsky, & - p_lev, & - hlw0)) - endif - ! All-sky heating-rate (mandatory) - call check_error_msg('GFS_rrtmgp_post',compute_heating_rate( & - fluxlwUP_allsky, & - fluxlwDOWN_allsky, & - p_lev, & - hlwc)) - - ! Copy fluxes from RRTGMP types into model radiation types. - ! Mandatory outputs - topflx_lw%upfxc = fluxlwUP_allsky(:,iTOA) - topflx_lw%upfx0 = fluxlwUP_clrsky(:,iTOA) - sfcflx_lw%upfxc = fluxlwUP_allsky(:,iSFC) - sfcflx_lw%upfx0 = fluxlwUP_clrsky(:,iSFC) - sfcflx_lw%dnfxc = fluxlwDOWN_allsky(:,iSFC) - sfcflx_lw%dnfx0 = fluxlwDOWN_clrsky(:,iSFC) - - ! Optional outputs - if(l_fluxeslw2d) then - flxprf_lw%upfxc = fluxlwUP_allsky - flxprf_lw%dnfxc = fluxlwDOWN_allsky - flxprf_lw%upfx0 = fluxlwUP_clrsky - flxprf_lw%dnfx0 = fluxlwDOWN_clrsky - endif - endif - - ! ####################################################################################### - ! Save LW outputs. - ! ####################################################################################### - if (Model%lslwr) then - ! Save surface air temp for diurnal adjustment at model t-steps - Radtend%tsflw (:) = tsfa(:) - - ! All-sky heating rate profile - do k = 1, model%levs - Radtend%htrlw(1:im,k) = hlwc(1:im,k) - enddo - if (Model%lwhtr) then - do k = 1, model%levs - Radtend%lwhc(1:im,k) = hlw0(1:im,k) - enddo - endif - - ! Radiation fluxes for other physics processes - Coupling%sfcdlw(:) = Radtend%sfcflw(:)%dnfxc - endif - - ! ####################################################################################### ! ####################################################################################### !> - For time averaged output quantities (including total-sky and diff --git a/physics/GFS_rrtmgp_pre.F90 b/physics/GFS_rrtmgp_pre.F90 index 83b8c2d3c..613c9ad15 100644 --- a/physics/GFS_rrtmgp_pre.F90 +++ b/physics/GFS_rrtmgp_pre.F90 @@ -98,6 +98,10 @@ end subroutine GFS_rrtmgp_pre_init !! | cld_reliq | mean_effective_radius_for_liquid_cloud | mean effective radius for liquid cloud | micron | 2 | real | kind_phys | out | F | !! | cld_iwp | cloud_ice_water_path | layer cloud ice water path | g m-2 | 2 | real | kind_phys | out | F | !! | cld_reice | mean_effective_radius_for_ice_cloud | mean effective radius for ice cloud | micron | 2 | real | kind_phys | out | F | +!! | cld_swp | cloud_snow_water_path | layer cloud snow water path | g m-2 | 2 | real | kind_phys | out | F | +!! | cld_resnow | mean_effective_radius_for_snow_flake | mean effective radius for snow cloud | micron | 2 | real | kind_phys | out | F | +!! | cld_rwp | cloud_rain_water_path | layer cloud rain water path | g m-2 | 2 | real | kind_phys | out | F | +!! | cld_rerain | mean_effective_radius_for_rain_drop | mean effective radius for rain cloud | micron | 2 | real | kind_phys | out | F | !! | faerlw | aerosol_optical_properties_for_longwave_bands_01-16 | aerosol optical properties for longwave bands 01-16 | various | 4 | real | kind_phys | out | F | !! | faersw | aerosol_optical_properties_for_shortwave_bands_01-16 | aerosol optical properties for shortwave bands 01-16 | various | 4 | real | kind_phys | out | F | !! | alb1d | surface_albedo_perturbation | surface albedo perturbation | frac | 1 | real | kind_phys | out | F | @@ -117,9 +121,9 @@ end subroutine GFS_rrtmgp_pre_init subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, Tbd, & ! IN ncol, kdist_lw, kdist_sw, & ! IN raddt, p_lay, t_lay, p_lev, t_lev, tsfg, tsfa, alb1d, cld_frac, cld_lwp, & ! OUT - cld_reliq, cld_iwp, cld_reice, faerlw, faersw, sfc_emiss_byband, nday, idxday, & ! OUT - gas_concentrations, sfc_alb_nir_dir, sfc_alb_nir_dif, sfc_alb_uvvis_dir, & ! OUT - sfc_alb_uvvis_dif, errmsg, errflg) ! OUT + cld_reliq, cld_iwp, cld_reice, cld_swp, cld_resnow, cld_rwp, cld_rerain, faerlw, & ! OUT + faersw, sfc_emiss_byband, nday, idxday, gas_concentrations, sfc_alb_nir_dir, & ! OUT + sfc_alb_nir_dif, sfc_alb_uvvis_dir, sfc_alb_uvvis_dif, errmsg, errflg) ! OUT ! Inputs type(GFS_control_type), intent(in) :: & @@ -178,7 +182,11 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, cld_lwp, & ! Cloud liquid water path cld_reliq, & ! Cloud liquid effective radius cld_iwp, & ! Cloud ice water path - cld_reice ! Cloud ice effecive radius + cld_reice, & ! Cloud ice effecive radius + cld_swp, & ! Cloud snow water path + cld_resnow, & ! Cloud snow effective radius + cld_rwp, & ! Cloud rain water path + cld_rerain ! Cloud rain effective radius real(kind_phys), dimension(ncol,Model%levs,kdist_sw%get_nband(),NF_AESW), intent(out) ::& faersw ! Aerosol radiative properties in each SW band. real(kind_phys), dimension(ncol,Model%levs,kdist_lw%get_nband(),NF_AELW), intent(out) ::& @@ -316,11 +324,15 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, clouds, cldsa, mbota, mtopa, de_lgth) ! Copy output cloud fields - cld_frac = clouds(:,:,1) - cld_lwp = clouds(:,:,2) - cld_reliq = clouds(:,:,3) - cld_iwp = clouds(:,:,4) - cld_reice = clouds(:,:,5) + cld_frac = clouds(:,:,1) + cld_lwp = clouds(:,:,2) + cld_reliq = clouds(:,:,3) + cld_iwp = clouds(:,:,4) + cld_reice = clouds(:,:,5) + cld_rwp = clouds(:,:,6) + cld_rerain = clouds(:,:,7) + cld_swp = clouds(:,:,8) + cld_resnow = clouds(:,:,9) ! ####################################################################################### ! mg, sfc-perts diff --git a/physics/GFS_rrtmgp_sw.F90 b/physics/GFS_rrtmgp_sw.F90 index 29d55bf09..aa69982dc 100644 --- a/physics/GFS_rrtmgp_sw.F90 +++ b/physics/GFS_rrtmgp_sw.F90 @@ -1,22 +1,24 @@ module GFS_rrtmgp_sw - use GFS_typedefs, only: GFS_control_type - use machine, only: kind_phys - use physparam, only: isubcsw, iovrsw - use rrtmgp_sw, only: nrghice_sw => nrghice, ipsdsw0 - use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp - use mo_cloud_optics, only: ty_cloud_optics - use mo_optical_props, only: ty_optical_props_2str - use mo_cloud_sampling, only: sampled_mask_max_ran, sampled_mask_exp_ran, draw_samples - use mersenne_twister, only: random_setseed, random_number, random_stat + use GFS_typedefs, only: GFS_control_type + use machine, only: kind_phys + use physparam, only: isubcsw, iovrsw + use rrtmgp_sw, only: nrghice_sw => nrghice, ipsdsw0 + use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp + use mo_cloud_optics, only: ty_cloud_optics + use mo_optical_props, only: ty_optical_props_2str + use mo_cloud_sampling, only: sampled_mask_max_ran, sampled_mask_exp_ran, draw_samples + use mersenne_twister, only: random_setseed, random_number, random_stat + use mo_rrtmgp_sw_cloud_optics, only: rrtmgp_sw_cloud_optics public GFS_rrtmgp_sw_run,GFS_rrtmgp_sw_init,GFS_rrtmgp_sw_finalize contains - subroutine GFS_rrtmgp_sw_init() - end subroutine GFS_rrtmgp_sw_init ! ######################################################################################### ! ######################################################################################### + subroutine GFS_rrtmgp_sw_init() + end subroutine GFS_rrtmgp_sw_init + !! \section arg_table_GFS_rrtmgp_sw_run Argument Table !! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | !! |-----------------------|------------------------------------------------------|------------------------------------------------------------------------------|---------|------|-----------------------|-----------|--------|----------| @@ -30,10 +32,16 @@ end subroutine GFS_rrtmgp_sw_init !! | cld_reliq | mean_effective_radius_for_liquid_cloud | mean effective radius for liquid cloud | micron | 2 | real | kind_phys | in | F | !! | cld_iwp | cloud_ice_water_path | layer cloud ice water path | g m-2 | 2 | real | kind_phys | in | F | !! | cld_reice | mean_effective_radius_for_ice_cloud | mean effective radius for ice cloud | micron | 2 | real | kind_phys | in | F | +!! | cld_swp | cloud_snow_water_path | layer cloud snow water path | g m-2 | 2 | real | kind_phys | in | F | +!! | cld_resnow | mean_effective_radius_for_snow_flake | mean effective radius for snow cloud | micron | 2 | real | kind_phys | in | F | +!! | cld_rwp | cloud_rain_water_path | layer cloud rain water path | g m-2 | 2 | real | kind_phys | in | F | +!! | cld_rerain | mean_effective_radius_for_rain_drop | mean effective radius for rain cloud | micron | 2 | real | kind_phys | in | F | !! | icseed_sw | seed_random_numbers_sw | seed for random number generation for shortwave radiation | none | 1 | integer | | in | F | !! | kdist_sw | K_distribution_file_for_RRTMGP_SW_scheme | DDT containing spectral information for RRTMGP SW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | !! | aerosols | aerosol_optical_properties_for_shortwave_bands_01-16 | aerosol optical properties for shortwave bands 01-16 | various | 4 | real | kind_phys | in | F | !! | kdist_cldy_sw | K_distribution_file_for_cloudy_RRTMGP_SW_scheme | DDT containing spectral information for cloudy RRTMGP SW radiation scheme | DDT | 0 | ty_cloud_optics | | in | F | +!! | nday | daytime_points_dimension | daytime points dimension | count | 0 | integer | | in | F | +!! | idxday | daytime_points | daytime points | index | 1 | integer | | in | F | !! | optical_props_clouds | shortwave_optical_properties_for_cloudy_atmosphere | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_2str | | out | F | !! | optical_props_aerosol | shortwave_optical_properties_for_aerosols | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_2str | | out | F | !! | cldtausw | cloud_optical_depth_layers_at_0.55mu_band | approx .55mu band layer cloud optical depth | none | 2 | real | kind_phys | out | F | @@ -42,15 +50,19 @@ end subroutine GFS_rrtmgp_sw_init !! ! ######################################################################################### ! ######################################################################################### - subroutine GFS_rrtmgp_sw_run(Model, ncol, icseed_sw, p_lay, t_lay, p_lev, cld_frac, & - cld_lwp, cld_reliq, cld_iwp, cld_reice, kdist_sw, aerosols, kdist_cldy_sw, & - optical_props_clouds, optical_props_aerosol, cldtausw, errmsg, errflg) + subroutine GFS_rrtmgp_sw_run(Model, ncol, icseed_sw, p_lay, t_lay, p_lev, cld_frac, & ! IN + cld_lwp, cld_reliq, cld_iwp, cld_reice, cld_swp, cld_resnow, cld_rwp, cld_rerain, & ! IN + kdist_sw, aerosols, kdist_cldy_sw, nday, idxday, & ! IN + optical_props_clouds, optical_props_aerosol, cldtausw, errmsg, errflg) ! OUT ! Inputs type(GFS_control_type), intent(in) :: & Model integer, intent(in) :: & - ncol ! Number of horizontal gridpoints + ncol, & ! Number of horizontal gridpoints + nday ! Number of daylit points. + integer,intent(in),dimension(nday) :: & + idxday ! Indices for daylit points. integer,intent(in),dimension(ncol) :: & icseed_sw ! auxiliary special cloud related array when module ! variable isubcsw=2, it provides permutation seed @@ -66,7 +78,11 @@ subroutine GFS_rrtmgp_sw_run(Model, ncol, icseed_sw, p_lay, t_lay, p_lev, cld_fr cld_lwp, & ! Cloud liquid water path cld_reliq, & ! Cloud liquid effective radius cld_iwp, & ! Cloud ice water path - cld_reice ! Cloud ice effective radius + cld_reice, & ! Cloud ice effective radius + cld_swp, & ! Cloud snow water path + cld_resnow, & ! Cloud snow effective radius + cld_rwp, & ! Cloud rain water path + cld_rerain ! Cloud rain effective radius type(ty_gas_optics_rrtmgp),intent(in) :: & kdist_sw ! RRTMGP DDT containing spectral information for SW calculation type(ty_cloud_optics),intent(in) :: & @@ -92,6 +108,8 @@ subroutine GFS_rrtmgp_sw_run(Model, ncol, icseed_sw, p_lay, t_lay, p_lev, cld_fr real(kind_phys), dimension(kdist_sw%get_ngpt(),model%levs,ncol) :: rng3D real(kind_phys), dimension(kdist_sw%get_ngpt()*model%levs) :: rng1D logical, dimension(ncol,model%levs,kdist_sw%get_ngpt()) :: cldfracMCICA + real(kind_phys), dimension(nday,model%levs,kdist_sw%get_nband()) :: & + tau_cld, ssa_cld, asy_cld ! Initialize CCPP error handling variables errmsg = '' @@ -138,19 +156,36 @@ subroutine GFS_rrtmgp_sw_run(Model, ncol, icseed_sw, p_lay, t_lay, p_lev, cld_fr ! ####################################################################################### ! Compute cloud-optics for RTE. ! ####################################################################################### - call check_error_msg('GFS_rrtmgp_sw_run',kdist_cldy_sw%cloud_optics(& - ncol, & ! IN - Number of daylit gridpoints - model%levs, & ! IN - Number of vertical layers - kdist_sw%get_nband(), & ! IN - Number of SW bands - nrghice_sw, & ! IN - Number of ice-roughness categories - liqmask, & ! IN - Liquid-cloud mask - icemask, & ! IN - Ice-cloud mask - cld_lwp, & ! IN - Cloud liquid water path - cld_iwp, & ! IN - Cloud ice water path - cld_reliq, & ! IN - Cloud liquid effective radius - cld_reice, & ! IN - Cloud ice effective radius - optical_props_cloudsByBand)) ! OUT - RRTMGP DDT containing cloud radiative properties - ! in each band + if (Model%rrtmgp_cld_phys .gt. 0) then + ! RRTMGP cloud-optics. + call check_error_msg('GFS_rrtmgp_sw_run',kdist_cldy_sw%cloud_optics(& + ncol, & ! IN - Number of daylit gridpoints + model%levs, & ! IN - Number of vertical layers + kdist_sw%get_nband(), & ! IN - Number of SW bands + nrghice_sw, & ! IN - Number of ice-roughness categories + liqmask, & ! IN - Liquid-cloud mask + icemask, & ! IN - Ice-cloud mask + cld_lwp, & ! IN - Cloud liquid water path + cld_iwp, & ! IN - Cloud ice water path + cld_reliq, & ! IN - Cloud liquid effective radius + cld_reice, & ! IN - Cloud ice effective radius + optical_props_cloudsByBand)) ! OUT - RRTMGP DDT containing cloud radiative properties + ! in each band + else + ! RRTMG cloud-optics + if (any(cld_frac .gt. 0)) then + optical_props_cloudsByBand%tau(:,:,:) = 0._kind_phys + optical_props_cloudsByBand%ssa(:,:,:) = 0._kind_phys + optical_props_cloudsByBand%g(:,:,:) = 0._kind_phys + call rrtmgp_sw_cloud_optics(nday, model%levs, kdist_sw%get_nband(), cld_lwp(idxday,:), & + cld_reliq(idxday,:), cld_iwp(idxday,:), cld_reice(idxday,:), cld_rwp(idxday,:), & + cld_rerain(idxday,:), cld_swp(idxday,:), cld_resnow(idxday,:), cld_frac(idxday,:),& + tau_cld, ssa_cld, asy_cld) + optical_props_cloudsByBand%tau(idxday,:,:) = tau_cld + optical_props_cloudsByBand%ssa(idxday,:,:) = ssa_cld + optical_props_cloudsByBand%g(idxday,:,:) = asy_cld + endif + endif ! ####################################################################################### ! Call McICA to generate subcolumns. ! ####################################################################################### From f86636b604e28bde74600de0654da8183337c655 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Mon, 3 Jun 2019 16:25:05 -0600 Subject: [PATCH 032/167] Split up init into gas and cloud _init routines. Renamed some variables to be more clear. --- .gitignore | 5 + physics/GFS_rrtmg_pre.F90 | 91 +-- physics/GFS_rrtmgp_lw.F90 | 38 +- physics/GFS_rrtmgp_lw_post.F90 | 17 +- physics/GFS_rrtmgp_pre.F90 | 146 ++-- physics/GFS_rrtmgp_sw.F90 | 50 +- physics/GFS_rrtmgp_sw_post.F90 | 19 +- physics/rrtmgp_aux.F90 | 1370 ++++++++++++++++++++++++++++++++ physics/rrtmgp_lw.F90 | 662 +-------------- physics/rrtmgp_sw.F90 | 676 +--------------- physics/rrtmgp_sw_pre.F90 | 10 +- 11 files changed, 1586 insertions(+), 1498 deletions(-) create mode 100644 physics/rrtmgp_aux.F90 diff --git a/.gitignore b/.gitignore index 2213ac9bc..ff0eb4314 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,7 @@ # Auto-generated include files in Fortran code *.inc +physics/*cap.F90 +physics/*.xml +*.cmake +*.mk +*.html diff --git a/physics/GFS_rrtmg_pre.F90 b/physics/GFS_rrtmg_pre.F90 index 2e51e305f..8b930d370 100644 --- a/physics/GFS_rrtmg_pre.F90 +++ b/physics/GFS_rrtmg_pre.F90 @@ -11,7 +11,6 @@ module GFS_rrtmg_pre !! \section arg_table_GFS_rrtmg_pre_init Argument Table !! subroutine GFS_rrtmg_pre_init () - open(58,file='GFS_rrtmg_aux_dump.txt',status='unknown') end subroutine GFS_rrtmg_pre_init !> \section arg_table_GFS_rrtmg_pre_run Argument Table @@ -325,7 +324,7 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input tracer1(:,k1,j) = max(0.0, Statein%qgrs(:,k2,j)) enddo enddo -! + if (ivflip == 0) then ! input data from toa to sfc do i = 1, IM plvl(i,1+kd) = 0.01 * Statein%prsi(i,1) ! pa to mb (hpa) @@ -704,7 +703,39 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input ccnd(1:IM,1:LMK,1) = ccnd(1:IM,1:LMK,1) + cnvw(1:IM,1:LMK) + ccnd(1:IM,1:LMK,2) endif -! DJS2019: START + if (Model%uni_cld) then + if (Model%effr_in) then + do k=1,lm + k1 = k + kd + do i=1,im + cldcov(i,k1) = Tbd%phy_f3d(i,k,Model%indcld) + effrl(i,k1) = Tbd%phy_f3d(i,k,2) + effri(i,k1) = Tbd%phy_f3d(i,k,3) + effrr(i,k1) = Tbd%phy_f3d(i,k,4) + effrs(i,k1) = Tbd%phy_f3d(i,k,5) + enddo + enddo + else + do k=1,lm + k1 = k + kd + do i=1,im + cldcov(i,k1) = Tbd%phy_f3d(i,k,Model%indcld) + if (tracer1(i,k,ntcw) .gt. 0 .or. tracer1(i,k,ntiw) .gt. 0) then + cldcov(i,k1) = 0.1 + else + cldcov(i,k1) = 0.0 + endif + enddo + enddo + endif + elseif (Model%imp_physics == Model%imp_physics_gfdl) then ! GFDL MP + cldcov(1:IM,1+kd:LM+kd) = tracer1(1:IM,1:LM,Model%ntclamt) + else ! neither of the other two cases + cldcov = 0.0 + endif + + + ! DJS2019: START Hack ! Compute layer cloud fraction. clwmin = 0.0 cldcov(:,:) = 0.0 @@ -743,51 +774,8 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input enddo enddo endif -! DJS2019: END + ! DJS2019: END - if (Model%uni_cld) then - if (Model%effr_in) then - do k=1,lm - k1 = k + kd - do i=1,im - cldcov(i,k1) = Tbd%phy_f3d(i,k,Model%indcld) - effrl(i,k1) = Tbd%phy_f3d(i,k,2) - effri(i,k1) = Tbd%phy_f3d(i,k,3) - effrr(i,k1) = Tbd%phy_f3d(i,k,4) - effrs(i,k1) = Tbd%phy_f3d(i,k,5) - enddo - enddo - else - do k=1,lm - k1 = k + kd - do i=1,im - ! DJS2019: Tbd%phy_f3d(:,:,1) is mean layer temperature, not cloud amount - !cldcov(i,k1) = Tbd%phy_f3d(i,k,Model%indcld) - !if (tracer1(i,k,ntcw) .gt. 0 .or. tracer1(i,k,ntiw) .gt. 0) then - ! cldcov(i,k1) = 0.1 - !else - ! cldcov(i,k1) = 0.0 - !endif - enddo - enddo - endif - elseif (Model%imp_physics == Model%imp_physics_gfdl) then ! GFDL MP - cldcov(1:IM,1+kd:LM+kd) = tracer1(1:IM,1:LM,Model%ntclamt) - else ! neither of the other two cases - !cldcov = 0.0 - endif - - write(58,*) "Model%imp_physics: ",Model%imp_physics - write(58,*) "Model%uni_cld: ",Model%uni_cld - write(58,*) "Model%ncld: ",Model%ncld - write(58,*) "Model%lgfdlmprad: ",Model%lgfdlmprad - write(58,*) "Model%lmfshal: ",Model%lmfshal - write(58,*) "Model%lmfdeep2: ",Model%lmfdeep2 - do k = 1, LMK - do i = 1, IM - write(58,'(a19,2i8,f10.2)') " Cloud-cover: ",k,i,cldcov(i,k) - end do - enddo if (Model%imp_physics == 99 .or. Model%imp_physics == 10) then ! zhao/moorthi's prognostic cloud scheme ! or unified cloud and/or with MG microphysics @@ -802,8 +790,6 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input call progcld1 (plyr ,plvl, tlyr, tvly, qlyr, qstl, rhly, & ! --- inputs ccnd(1:IM,1:LMK,1), Grid%xlat,Grid%xlon, & Sfcprop%slmsk, dz, delp, IM, LMK, LMP, & -!DJS2019: Pass uni_cld=true to use prescribed cloud-cover amount -! .true., Model%lmfshal, & Model%uni_cld, Model%lmfshal, & Model%lmfdeep2, cldcov, & effrl, effri, effrr, effrs, Model%effr_in, & @@ -880,12 +866,6 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input enddo enddo - write(58,*) "#" - do k=1,Model%levr+LTP - write(58,"(5F10.3)") plyr(1,k),tlyr(1,k),clouds2(1,k), & - & clouds4(1,k), clouds1(1,k) - enddo - ! mg, sfc-perts ! --- scale random patterns for surface perturbations with @@ -906,7 +886,6 @@ end subroutine GFS_rrtmg_pre_run !> \section arg_table_GFS_rrtmg_pre_finalize Argument Table !! subroutine GFS_rrtmg_pre_finalize () - close(58) end subroutine GFS_rrtmg_pre_finalize !! @} diff --git a/physics/GFS_rrtmgp_lw.F90 b/physics/GFS_rrtmgp_lw.F90 index d46f5c74a..2721ed495 100644 --- a/physics/GFS_rrtmgp_lw.F90 +++ b/physics/GFS_rrtmgp_lw.F90 @@ -2,7 +2,7 @@ module GFS_rrtmgp_lw use GFS_typedefs, only: GFS_control_type use machine, only: kind_phys use physparam, only: isubclw, iovrlw - use rrtmgp_lw, only: nrghice_lw => nrghice, ipsdlw0 + use rrtmgp_aux, only: nrghice_lw, ipsdlw0 use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp use mo_cloud_optics, only: ty_cloud_optics use mo_optical_props, only: ty_optical_props_1scl, ty_optical_props_2str @@ -37,9 +37,9 @@ end subroutine GFS_rrtmgp_lw_init !! | cld_rerain | mean_effective_radius_for_rain_drop | mean effective radius for rain cloud | micron | 2 | real | kind_phys | in | F | !! | gas_concentrations | Gas_concentrations_for_RRTMGP_suite | DDT containing gas concentrations for RRTMGP radiation scheme | DDT | 0 | ty_gas_concs | | in | F | !! | icseed_lw | seed_random_numbers_sw | seed for random number generation for shortwave radiation | none | 1 | integer | | in | F | -!! | kdist_lw | K_distribution_file_for_RRTMGP_LW_scheme | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | +!! | lw_gas_props | coefficients_for_lw_gas_optics | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | !! | aerosols | aerosol_optical_properties_for_longwave_bands_01-16 | aerosol optical properties for longwave bands 01-16 | various | 4 | real | kind_phys | in | F | -!! | kdist_cldy_lw | K_distribution_file_for_cloudy_RRTMGP_LW_scheme | DDT containing spectral information for cloudy RRTMGP LW radiation scheme | DDT | 0 | ty_cloud_optics | | in | F | +!! | lw_cloud_props | coefficients_for_lw_cloud_optics | DDT containing spectral information for cloudy RRTMGP LW radiation scheme | DDT | 0 | ty_cloud_optics | | in | F | !! | optical_props_clouds | longwave_optical_properties_for_cloudy_atmosphere | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_1scl | | out | F | !! | optical_props_aerosol | longwave_optical_properties_for_aerosols | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_1scl | | out | F | !! | cldtaulw | cloud_optical_depth_layers_at_10mu_band | approx 10mu band layer cloud optical depth | none | 2 | real | kind_phys | out | F | @@ -50,7 +50,7 @@ end subroutine GFS_rrtmgp_lw_init ! ######################################################################################### subroutine GFS_rrtmgp_lw_run(Model, ncol, icseed_lw, p_lay, t_lay, p_lev, cld_frac, & cld_lwp, cld_reliq, cld_iwp, cld_reice, cld_swp, cld_resnow, cld_rwp, cld_rerain, & - gas_concentrations, kdist_lw, aerosols, kdist_cldy_lw, & + gas_concentrations, lw_gas_props, aerosols, lw_cloud_props, & optical_props_clouds, optical_props_aerosol, cldtaulw, errmsg, errflg) ! Inputs @@ -81,10 +81,10 @@ subroutine GFS_rrtmgp_lw_run(Model, ncol, icseed_lw, p_lay, t_lay, p_lev, cld_fr type(ty_gas_concs),intent(in) :: & gas_concentrations ! type(ty_gas_optics_rrtmgp),intent(in) :: & - kdist_lw ! RRTMGP DDT containing spectral information for LW calculation + lw_gas_props ! RRTMGP DDT containing spectral information for LW calculation type(ty_cloud_optics),intent(in) :: & - kdist_cldy_lw ! - real(kind_phys), intent(in),dimension(ncol, model%levs, kdist_lw%get_nband(),3) :: & + lw_cloud_props ! + real(kind_phys), intent(in),dimension(ncol, model%levs, lw_gas_props%get_nband(),3) :: & aerosols ! real(kind_phys), dimension(ncol,Model%levs), intent(out) :: & cldtaulw ! approx 10.mu band layer cloud optical depth @@ -102,10 +102,10 @@ subroutine GFS_rrtmgp_lw_run(Model, ncol, icseed_lw, p_lay, t_lay, p_lev, cld_fr logical,dimension(ncol,model%levs) :: liqmask, icemask type(ty_optical_props_1scl) :: optical_props_cloudsByBand type(random_stat) :: rng_stat - real(kind_phys), dimension(kdist_lw%get_ngpt(),model%levs,ncol) :: rng3D - real(kind_phys), dimension(kdist_lw%get_ngpt()*model%levs) :: rng1D - logical, dimension(ncol,model%levs,kdist_lw%get_ngpt()) :: cldfracMCICA - real(kind_phys), dimension(ncol,model%levs,kdist_lw%get_nband()) :: & + real(kind_phys), dimension(lw_gas_props%get_ngpt(),model%levs,ncol) :: rng3D + real(kind_phys), dimension(lw_gas_props%get_ngpt()*model%levs) :: rng1D + logical, dimension(ncol,model%levs,lw_gas_props%get_ngpt()) :: cldfracMCICA + real(kind_phys), dimension(ncol,model%levs,lw_gas_props%get_nband()) :: & tau_cld ! Initialize CCPP error handling variables @@ -137,11 +137,11 @@ subroutine GFS_rrtmgp_lw_run(Model, ncol, icseed_lw, p_lay, t_lay, p_lev, cld_fr ! Allocate space for RRTMGP DDTs containing cloud and aerosol radiative properties ! ####################################################################################### ! Cloud optics [nCol,model%levs,nBands] - call check_error_msg('GFS_rrtmgp_lw_run',optical_props_cloudsByBand%alloc_1scl(ncol, model%levs, kdist_lw%get_band_lims_wavenumber())) + call check_error_msg('GFS_rrtmgp_lw_run',optical_props_cloudsByBand%alloc_1scl(ncol, model%levs, lw_gas_props%get_band_lims_wavenumber())) ! Aerosol optics [Ccol,model%levs,nBands] - call check_error_msg('GFS_rrtmgp_lw_run',optical_props_aerosol%alloc_1scl(ncol, model%levs, kdist_lw%get_band_lims_wavenumber())) + call check_error_msg('GFS_rrtmgp_lw_run',optical_props_aerosol%alloc_1scl(ncol, model%levs, lw_gas_props%get_band_lims_wavenumber())) ! Cloud optics [nCol,model%levs,nGpts] - call check_error_msg('GFS_rrtmgp_lw_run',optical_props_clouds%alloc_1scl(ncol, model%levs, kdist_lw)) + call check_error_msg('GFS_rrtmgp_lw_run',optical_props_clouds%alloc_1scl(ncol, model%levs, lw_gas_props)) ! ####################################################################################### ! Copy aerosol optical information to RRTMGP DDT @@ -151,12 +151,12 @@ subroutine GFS_rrtmgp_lw_run(Model, ncol, icseed_lw, p_lay, t_lay, p_lev, cld_fr ! ####################################################################################### ! Compute cloud-optics for RTE. ! ####################################################################################### - if (Model%rrtmgp_cld_phys .gt. 0) then + if (Model%rrtmgp_cld_optics .gt. 0) then ! i) RRTMGP cloud-optics. - call check_error_msg('GFS_rrtmgp_lw_run',kdist_cldy_lw%cloud_optics(& + call check_error_msg('GFS_rrtmgp_lw_run',lw_cloud_props%cloud_optics(& ncol, & ! IN - Number of horizontal gridpoints model%levs, & ! IN - Number of vertical layers - kdist_lw%get_nband(), & ! IN - Number of LW bands + lw_gas_props%get_nband(), & ! IN - Number of LW bands nrghice_lw, & ! IN - Number of ice-roughness categories liqmask, & ! IN - Liquid-cloud mask icemask, & ! IN - Ice-cloud mask @@ -169,7 +169,7 @@ subroutine GFS_rrtmgp_lw_run(Model, ncol, icseed_lw, p_lay, t_lay, p_lev, cld_fr else ! ii) RRTMG cloud-optics. if (any(cld_frac .gt. 0)) then - call rrtmgp_lw_cloud_optics(ncol, model%levs, kdist_lw%get_nband(), cld_lwp, & + call rrtmgp_lw_cloud_optics(ncol, model%levs, lw_gas_props%get_nband(), cld_lwp, & cld_reliq, cld_iwp, cld_reice, cld_rwp, cld_rerain, cld_swp, cld_resnow, & cld_frac, tau_cld) optical_props_cloudsByBand%tau = tau_cld @@ -184,7 +184,7 @@ subroutine GFS_rrtmgp_lw_run(Model, ncol, icseed_lw, p_lay, t_lay, p_lev, cld_fr do iCol=1,ncol call random_setseed(ipseed_lw(icol),rng_stat) call random_number(rng1D,rng_stat) - rng3D(:,:,iCol) = reshape(source = rng1D,shape=[kdist_lw%get_ngpt(),model%levs]) + rng3D(:,:,iCol) = reshape(source = rng1D,shape=[lw_gas_props%get_ngpt(),model%levs]) enddo ! Call McICA diff --git a/physics/GFS_rrtmgp_lw_post.F90 b/physics/GFS_rrtmgp_lw_post.F90 index f1b10da86..3562be382 100644 --- a/physics/GFS_rrtmgp_lw_post.F90 +++ b/physics/GFS_rrtmgp_lw_post.F90 @@ -14,6 +14,7 @@ module GFS_rrtmgp_lw_post use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp use mo_fluxes_byband, only: ty_fluxes_byband use mo_heating_rates, only: compute_heating_rate + use rrtmgp_aux, only: check_error_msg implicit none public GFS_rrtmgp_lw_post_init,GFS_rrtmgp_lw_post_run,GFS_rrtmgp_lw_post_finalize @@ -41,7 +42,7 @@ end subroutine GFS_rrtmgp_lw_post_init !! | fluxlwDOWN_allsky | lw_flux_profile_downward_allsky | RRTMGP downward longwave all-sky flux profile | W m-2 | 2 | real | kind_phys | in | F | !! | fluxlwUP_clrsky | lw_flux_profile_upward_clrsky | RRTMGP upward longwave clr-sky flux profile | W m-2 | 2 | real | kind_phys | in | F | !! | fluxlwDOWN_clrsky | lw_flux_profile_downward_clrsky | RRTMGP downward longwave clr-sky flux profile | W m-2 | 2 | real | kind_phys | in | F | -!! | kdist_lw | K_distribution_file_for_RRTMGP_LW_scheme | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | +!! | lw_gas_props | coefficients_for_lw_gas_optics | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | !! | hlwc | tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_step | longwave total sky heating rate | K s-1 | 2 | real | kind_phys | out | F | !! | topflx_lw | lw_fluxes_top_atmosphere | longwave total sky fluxes at the top of the atm | W m-2 | 1 | topflw_type | | inout | F | !! | sfcflx_lw | lw_fluxes_sfc | longwave total sky fluxes at the Earth surface | W m-2 | 1 | sfcflw_type | | inout | F | @@ -52,7 +53,7 @@ end subroutine GFS_rrtmgp_lw_post_init !! #endif subroutine GFS_rrtmgp_lw_post_run (Model, Grid, Diag, Radtend, Statein, & - Coupling, im, p_lev, kdist_lw, & + Coupling, im, p_lev, lw_gas_props, & tsfa, fluxlwUP_allsky, fluxlwDOWN_allsky, fluxlwUP_clrsky, fluxlwDOWN_clrsky, & hlwc, topflx_lw, sfcflx_lw, flxprf_lw, hlw0, errmsg, errflg) @@ -74,7 +75,7 @@ subroutine GFS_rrtmgp_lw_post_run (Model, Grid, Diag, Radtend, Statein, & real(kind_phys), dimension(size(Grid%xlon,1)), intent(in) :: & tsfa ! Lowest model layer air temperature for radiation type(ty_gas_optics_rrtmgp),intent(in) :: & - kdist_lw ! DDT containing LW spectral information + lw_gas_props ! DDT containing LW spectral information real(kind_phys), dimension(size(Grid%xlon,1), Model%levs+1), intent(in) :: & p_lev ! Pressure @ model layer-interfaces (hPa) real(kind_phys), dimension(size(Grid%xlon,1), Model%levs+1), intent(in) :: & @@ -200,14 +201,4 @@ end subroutine GFS_rrtmgp_lw_post_run subroutine GFS_rrtmgp_lw_post_finalize () end subroutine GFS_rrtmgp_lw_post_finalize - subroutine check_error_msg(routine_name, error_msg) - character(len=*), intent(in) :: & - error_msg, routine_name - - if(error_msg /= "") then - print*,"ERROR("//trim(routine_name)//"): " - print*,trim(error_msg) - return - end if - end subroutine check_error_msg end module GFS_rrtmgp_lw_post diff --git a/physics/GFS_rrtmgp_pre.F90 b/physics/GFS_rrtmgp_pre.F90 index 613c9ad15..7a9c42cf1 100644 --- a/physics/GFS_rrtmgp_pre.F90 +++ b/physics/GFS_rrtmgp_pre.F90 @@ -54,7 +54,8 @@ module GFS_rrtmgp_pre ! RRTMGP types use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp use mo_gas_concentrations, only: ty_gas_concs - + use rrtmgp_aux, only: check_error_msg + real(kind_phys), parameter :: & amd = 28.9644_kind_phys, & ! Molecular weight of dry-air (g/mol) amw = 18.0154_kind_phys, & ! Molecular weight of water vapor (g/mol) @@ -74,52 +75,52 @@ subroutine GFS_rrtmgp_pre_init () end subroutine GFS_rrtmgp_pre_init !> \section arg_table_GFS_rrtmgp_pre_run Argument Table -!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | -!! |-------------------------|---------------------------------------------------------------|-------------------------------------------------------------------------------|----------|------|-----------------------|-----------|--------|----------| -!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | -!! | Grid | GFS_grid_type_instance | Fortran DDT containing FV3-GFS grid and interpolation related data | DDT | 0 | GFS_grid_type | | in | F | -!! | Sfcprop | GFS_sfcprop_type_instance | Fortran DDT containing FV3-GFS surface fields | DDT | 0 | GFS_sfcprop_type | | in | F | -!! | Statein | GFS_statein_type_instance | Fortran DDT containing FV3-GFS prognostic state data in from dycore | DDT | 0 | GFS_statein_type | | in | F | -!! | Tbd | GFS_tbd_type_instance | Fortran DDT containing FV3-GFS data not yet assigned to a defined container | DDT | 0 | GFS_tbd_type | | in | F | -!! | Coupling | GFS_coupling_type_instance | Fortran DDT containing FV3-GFS fields needed for coupling | DDT | 0 | GFS_coupling_type | | in | F | -!! | Radtend | GFS_radtend_type_instance | Fortran DDT containing FV3-GFS radiation tendencies | DDT | 0 | GFS_radtend_type | | inout | F | -!! | ncol | horizontal_loop_extent | horizontal loop extent | count | 0 | integer | | in | F | -!! | kdist_lw | K_distribution_file_for_RRTMGP_LW_scheme | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | -!! | kdist_sw | K_distribution_file_for_RRTMGP_SW_scheme | DDT containing spectral information for RRTMGP SW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | -!! | raddt | time_step_for_radiation | radiation time step | s | 0 | real | kind_phys | out | F | -!! | p_lay | air_pressure_at_layer_for_RRTMGP_in_hPa | air pressure at vertical layer for radiation calculation | hPa | 2 | real | kind_phys | out | F | -!! | p_lev | air_pressure_at_interface_for_RRTMGP_in_hPa | air pressure at vertical interface for radiation calculation | hPa | 2 | real | kind_phys | out | F | -!! | t_lay | air_temperature_at_layer_for_RRTMGP | air temperature at vertical layer for radiation calculation | K | 2 | real | kind_phys | out | F | -!! | t_lev | air_temperature_at_interface_for_RRTMGP | air temperature at vertical interface for radiation calculation | K | 2 | real | kind_phys | out | F | -!! | tsfg | surface_ground_temperature_for_radiation | surface ground temperature for radiation | K | 1 | real | kind_phys | out | F | -!! | tsfa | surface_air_temperature_for_radiation | lowest model layer air temperature for radiation | K | 1 | real | kind_phys | out | F | -!! | cld_frac | total_cloud_fraction | layer total cloud fraction | frac | 2 | real | kind_phys | out | F | -!! | cld_lwp | cloud_liquid_water_path | layer cloud liquid water path | g m-2 | 2 | real | kind_phys | out | F | -!! | cld_reliq | mean_effective_radius_for_liquid_cloud | mean effective radius for liquid cloud | micron | 2 | real | kind_phys | out | F | -!! | cld_iwp | cloud_ice_water_path | layer cloud ice water path | g m-2 | 2 | real | kind_phys | out | F | -!! | cld_reice | mean_effective_radius_for_ice_cloud | mean effective radius for ice cloud | micron | 2 | real | kind_phys | out | F | -!! | cld_swp | cloud_snow_water_path | layer cloud snow water path | g m-2 | 2 | real | kind_phys | out | F | -!! | cld_resnow | mean_effective_radius_for_snow_flake | mean effective radius for snow cloud | micron | 2 | real | kind_phys | out | F | -!! | cld_rwp | cloud_rain_water_path | layer cloud rain water path | g m-2 | 2 | real | kind_phys | out | F | -!! | cld_rerain | mean_effective_radius_for_rain_drop | mean effective radius for rain cloud | micron | 2 | real | kind_phys | out | F | -!! | faerlw | aerosol_optical_properties_for_longwave_bands_01-16 | aerosol optical properties for longwave bands 01-16 | various | 4 | real | kind_phys | out | F | -!! | faersw | aerosol_optical_properties_for_shortwave_bands_01-16 | aerosol optical properties for shortwave bands 01-16 | various | 4 | real | kind_phys | out | F | -!! | alb1d | surface_albedo_perturbation | surface albedo perturbation | frac | 1 | real | kind_phys | out | F | -!! | gas_concentrations | Gas_concentrations_for_RRTMGP_suite | DDT containing gas concentrations for RRTMGP radiation scheme | DDT | 0 | ty_gas_concs | | out | F | -!! | sfc_emiss_byband | surface_longwave_emissivity_in_each_band | surface lw emissivity in fraction in each LW band | frac | 2 | real | kind_phys | out | F | -!! | sfc_alb_nir_dir | surface_shortwave_albedo_near_infrared_direct_in_each_band | surface sw near-infrared direct albedo in each SW band | frac | 2 | real | kind_phys | out | F | -!! | sfc_alb_nir_dif | surface_shortwave_albedo_near_infrared_diffuse_in_each_band | surface sw near-infrared diffuse albedo in each SW band | frac | 2 | real | kind_phys | out | F | -!! | sfc_alb_uvvis_dir | surface_shortwave_albedo_uv_visible_direct_in_each_band | surface sw uv-visible direct albedo in each SW band | frac | 2 | real | kind_phys | out | F | -!! | sfc_alb_uvvis_dif | surface_shortwave_albedo_uv_visible_diffuse_in_each_band | surface sw uv-visible diffuse albedo in each SW band | frac | 2 | real | kind_phys | out | F | -!! | nday | daytime_points_dimension | daytime points dimension | count | 0 | integer | | out | F | -!! | idxday | daytime_points | daytime points | index | 1 | integer | | out | F | -!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | -!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | +!! |--------------------|-------------------------------------------------------------|-------------------------------------------------------------------------------|----------|------|-----------------------|-----------|--------|----------| +!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | +!! | Grid | GFS_grid_type_instance | Fortran DDT containing FV3-GFS grid and interpolation related data | DDT | 0 | GFS_grid_type | | in | F | +!! | Sfcprop | GFS_sfcprop_type_instance | Fortran DDT containing FV3-GFS surface fields | DDT | 0 | GFS_sfcprop_type | | in | F | +!! | Statein | GFS_statein_type_instance | Fortran DDT containing FV3-GFS prognostic state data in from dycore | DDT | 0 | GFS_statein_type | | in | F | +!! | Tbd | GFS_tbd_type_instance | Fortran DDT containing FV3-GFS data not yet assigned to a defined container | DDT | 0 | GFS_tbd_type | | in | F | +!! | Coupling | GFS_coupling_type_instance | Fortran DDT containing FV3-GFS fields needed for coupling | DDT | 0 | GFS_coupling_type | | in | F | +!! | Radtend | GFS_radtend_type_instance | Fortran DDT containing FV3-GFS radiation tendencies | DDT | 0 | GFS_radtend_type | | inout | F | +!! | ncol | horizontal_loop_extent | horizontal loop extent | count | 0 | integer | | in | F | +!! | lw_gas_props | coefficients_for_lw_gas_optics | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | +!! | sw_gas_props | coefficients_for_sw_gas_optics | DDT containing spectral information for RRTMGP SW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | +!! | raddt | time_step_for_radiation | radiation time step | s | 0 | real | kind_phys | out | F | +!! | p_lay | air_pressure_at_layer_for_RRTMGP_in_hPa | air pressure at vertical layer for radiation calculation | hPa | 2 | real | kind_phys | out | F | +!! | p_lev | air_pressure_at_interface_for_RRTMGP_in_hPa | air pressure at vertical interface for radiation calculation | hPa | 2 | real | kind_phys | out | F | +!! | t_lay | air_temperature_at_layer_for_RRTMGP | air temperature at vertical layer for radiation calculation | K | 2 | real | kind_phys | out | F | +!! | t_lev | air_temperature_at_interface_for_RRTMGP | air temperature at vertical interface for radiation calculation | K | 2 | real | kind_phys | out | F | +!! | tsfg | surface_ground_temperature_for_radiation | surface ground temperature for radiation | K | 1 | real | kind_phys | out | F | +!! | tsfa | surface_air_temperature_for_radiation | lowest model layer air temperature for radiation | K | 1 | real | kind_phys | out | F | +!! | cld_frac | total_cloud_fraction | layer total cloud fraction | frac | 2 | real | kind_phys | out | F | +!! | cld_lwp | cloud_liquid_water_path | layer cloud liquid water path | g m-2 | 2 | real | kind_phys | out | F | +!! | cld_reliq | mean_effective_radius_for_liquid_cloud | mean effective radius for liquid cloud | micron | 2 | real | kind_phys | out | F | +!! | cld_iwp | cloud_ice_water_path | layer cloud ice water path | g m-2 | 2 | real | kind_phys | out | F | +!! | cld_reice | mean_effective_radius_for_ice_cloud | mean effective radius for ice cloud | micron | 2 | real | kind_phys | out | F | +!! | cld_swp | cloud_snow_water_path | layer cloud snow water path | g m-2 | 2 | real | kind_phys | out | F | +!! | cld_resnow | mean_effective_radius_for_snow_flake | mean effective radius for snow cloud | micron | 2 | real | kind_phys | out | F | +!! | cld_rwp | cloud_rain_water_path | layer cloud rain water path | g m-2 | 2 | real | kind_phys | out | F | +!! | cld_rerain | mean_effective_radius_for_rain_drop | mean effective radius for rain cloud | micron | 2 | real | kind_phys | out | F | +!! | faerlw | aerosol_optical_properties_for_longwave_bands_01-16 | aerosol optical properties for longwave bands 01-16 | various | 4 | real | kind_phys | out | F | +!! | faersw | aerosol_optical_properties_for_shortwave_bands_01-16 | aerosol optical properties for shortwave bands 01-16 | various | 4 | real | kind_phys | out | F | +!! | alb1d | surface_albedo_perturbation | surface albedo perturbation | frac | 1 | real | kind_phys | out | F | +!! | gas_concentrations | Gas_concentrations_for_RRTMGP_suite | DDT containing gas concentrations for RRTMGP radiation scheme | DDT | 0 | ty_gas_concs | | out | F | +!! | sfc_emiss_byband | surface_longwave_emissivity_in_each_band | surface lw emissivity in fraction in each LW band | frac | 2 | real | kind_phys | out | F | +!! | sfc_alb_nir_dir | surface_shortwave_albedo_near_infrared_direct_in_each_band | surface sw near-infrared direct albedo in each SW band | frac | 2 | real | kind_phys | out | F | +!! | sfc_alb_nir_dif | surface_shortwave_albedo_near_infrared_diffuse_in_each_band | surface sw near-infrared diffuse albedo in each SW band | frac | 2 | real | kind_phys | out | F | +!! | sfc_alb_uvvis_dir | surface_shortwave_albedo_uv_visible_direct_in_each_band | surface sw uv-visible direct albedo in each SW band | frac | 2 | real | kind_phys | out | F | +!! | sfc_alb_uvvis_dif | surface_shortwave_albedo_uv_visible_diffuse_in_each_band | surface sw uv-visible diffuse albedo in each SW band | frac | 2 | real | kind_phys | out | F | +!! | nday | daytime_points_dimension | daytime points dimension | count | 0 | integer | | out | F | +!! | idxday | daytime_points | daytime points | index | 1 | integer | | out | F | +!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | +!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | !! ! Attention - the output arguments lm, im, lmk, lmp must not be set ! in the CCPP version - they are defined in the interstitial_create routine subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, Tbd, & ! IN - ncol, kdist_lw, kdist_sw, & ! IN + ncol, lw_gas_props, sw_gas_props, & ! IN raddt, p_lay, t_lay, p_lev, t_lev, tsfg, tsfa, alb1d, cld_frac, cld_lwp, & ! OUT cld_reliq, cld_iwp, cld_reice, cld_swp, cld_resnow, cld_rwp, cld_rerain, faerlw, & ! OUT faersw, sfc_emiss_byband, nday, idxday, gas_concentrations, sfc_alb_nir_dir, & ! OUT @@ -143,8 +144,8 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, integer, intent(in) :: & ncol ! Number of horizontal grid points type(ty_gas_optics_rrtmgp),intent(in) :: & - kdist_lw, & ! RRTMGP DDT containing spectral information for LW calculation - kdist_sw ! RRTMGP DDT containing spectral information for SW calculation + lw_gas_props, & ! RRTMGP DDT containing spectral information for LW calculation + sw_gas_props ! RRTMGP DDT containing spectral information for SW calculation ! Outputs real(kind_phys), dimension(ncol,Model%levs), intent(out) :: & @@ -158,7 +159,7 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, real(kind_phys), dimension(ncol), intent(out) :: & tsfg, & ! tsfa ! - real(kind_phys),dimension(kdist_sw%get_nband(),NCOL),intent(out) :: & + real(kind_phys),dimension(sw_gas_props%get_nband(),NCOL),intent(out) :: & sfc_alb_nir_dir, & ! Shortwave surface albedo (nIR-direct) sfc_alb_nir_dif, & ! Shortwave surface albedo (nIR-diffuse) sfc_alb_uvvis_dir, & ! Shortwave surface albedo (uvvis-direct) @@ -175,7 +176,7 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, errmsg ! Error message integer, intent(out) :: & errflg ! Error flag - real(kind_phys),dimension(kdist_sw%get_nband(),NCOL),intent(out) :: & + real(kind_phys),dimension(sw_gas_props%get_nband(),NCOL),intent(out) :: & sfc_emiss_byband ! Longwave surface emissivity in each band real(kind_phys), dimension(ncol,Model%levr+LTP),intent(out) :: & cld_frac, & ! Total cloud fraction @@ -187,9 +188,9 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, cld_resnow, & ! Cloud snow effective radius cld_rwp, & ! Cloud rain water path cld_rerain ! Cloud rain effective radius - real(kind_phys), dimension(ncol,Model%levs,kdist_sw%get_nband(),NF_AESW), intent(out) ::& + real(kind_phys), dimension(ncol,Model%levs,sw_gas_props%get_nband(),NF_AESW), intent(out) ::& faersw ! Aerosol radiative properties in each SW band. - real(kind_phys), dimension(ncol,Model%levs,kdist_lw%get_nband(),NF_AELW), intent(out) ::& + real(kind_phys), dimension(ncol,Model%levs,lw_gas_props%get_nband(),NF_AELW), intent(out) ::& faerlw ! Aerosol radiative properties in each LW band. ! Local variables @@ -211,7 +212,7 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, real(kind_phys), dimension(ncol, Model%levs, 2:Model%ntrac) :: tracer real(kind_phys), dimension(ncol, Model%levs, NF_VGAS) :: gas_vmr real(kind_phys), dimension(ncol, Model%levs, NF_CLDS) :: clouds - real(kind_phys), dimension(ncol, Model%levs, kdist_sw%get_nband(), NF_AESW)::faersw2 + real(kind_phys), dimension(ncol, Model%levs, sw_gas_props%get_nband(), NF_AESW)::faersw2 ! Initialize CCPP error handling variables errmsg = '' @@ -236,7 +237,7 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, ! ####################################################################################### ! Copy state fields over for use in RRTMGP p_lev(1:NCOL,iSFC:iTOA) = Statein%prsi(1:NCOL,1:Model%levs) - p_lev(1:NCOL,iTOA+1) = spread(kdist_lw%get_press_min(),dim=1, ncopies=NCOL) + p_lev(1:NCOL,iTOA+1) = spread(lw_gas_props%get_press_min(),dim=1, ncopies=NCOL) p_lay(1:NCOL,iSFC:iTOA) = Statein%prsl(1:NCOL,1:Model%levs) t_lay(1:NCOL,iSFC:iTOA) = Statein%tgrs(1:NCOL,1:Model%levs) @@ -249,7 +250,7 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, do iLay=iSFC+1,iTOA t_lev(iCol,iLay) = (t_lay(iCol,iLay)+t_lay(iCol,iLay-1))/2._kind_phys enddo - t_lev(iCol,iTOA+1) = kdist_lw%get_temp_min() + t_lev(iCol,iTOA+1) = lw_gas_props%get_temp_min() enddo ! Compute a bunch of thermodynamic fields needed by the macrophysics schemes. Relative humidity, @@ -273,7 +274,7 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, do j = 2, model%NTRAC tracer(1:NCOL,1:Model%levs,j) = max(0.0, Statein%qgrs(1:NCOL,1:Model%levs,j)) enddo - + if (Model%ntoz > 0) then do iLay=iSFC,iTOA do iCol=1,NCOL @@ -360,12 +361,12 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, ! SW. ! For RRTMGP SW the bands are now ordered from [IR(band) -> nIR -> UV], in RRTMG the ! band ordering was [nIR -> UV -> IR(band)] - faersw(1:NCOL,1:Model%levs,1,1) = faersw2(1:NCOL,1:Model%levs,kdist_sw%get_nband(),1) - faersw(1:NCOL,1:Model%levs,1,2) = faersw2(1:NCOL,1:Model%levs,kdist_sw%get_nband(),2) - faersw(1:NCOL,1:Model%levs,1,3) = faersw2(1:NCOL,1:Model%levs,kdist_sw%get_nband(),3) - faersw(1:NCOL,1:Model%levs,2:kdist_sw%get_nband(),1) = faersw2(1:NCOL,1:Model%levs,1:kdist_sw%get_nband()-1,1) - faersw(1:NCOL,1:Model%levs,2:kdist_sw%get_nband(),2) = faersw2(1:NCOL,1:Model%levs,1:kdist_sw%get_nband()-1,2) - faersw(1:NCOL,1:Model%levs,2:kdist_sw%get_nband(),3) = faersw2(1:NCOL,1:Model%levs,1:kdist_sw%get_nband()-1,3) + faersw(1:NCOL,1:Model%levs,1,1) = faersw2(1:NCOL,1:Model%levs,sw_gas_props%get_nband(),1) + faersw(1:NCOL,1:Model%levs,1,2) = faersw2(1:NCOL,1:Model%levs,sw_gas_props%get_nband(),2) + faersw(1:NCOL,1:Model%levs,1,3) = faersw2(1:NCOL,1:Model%levs,sw_gas_props%get_nband(),3) + faersw(1:NCOL,1:Model%levs,2:sw_gas_props%get_nband(),1) = faersw2(1:NCOL,1:Model%levs,1:sw_gas_props%get_nband()-1,1) + faersw(1:NCOL,1:Model%levs,2:sw_gas_props%get_nband(),2) = faersw2(1:NCOL,1:Model%levs,1:sw_gas_props%get_nband()-1,2) + faersw(1:NCOL,1:Model%levs,2:sw_gas_props%get_nband(),3) = faersw2(1:NCOL,1:Model%levs,1:sw_gas_props%get_nband()-1,3) ! Setup surface ground temperature and ground/air skin temperature if required. tsfg(1:NCOL) = Sfcprop%tsfc(1:NCOL) @@ -377,7 +378,7 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, if (Model%lslwr) then call setemis (Grid%xlon, Grid%xlat, Sfcprop%slmsk, Sfcprop%snowd, Sfcprop%sncovr, & Sfcprop%zorl, tsfg, tsfa, Sfcprop%hprim, NCOL, Radtend%semis) - do iBand=1,kdist_lw%get_nband() + do iBand=1,lw_gas_props%get_nband() sfc_emiss_byband(iBand,1:NCOL) = Radtend%semis(1:NCOL) enddo endif @@ -415,7 +416,7 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, endif ! Spread across all SW bands - do iBand=1,kdist_sw%get_nband() + do iBand=1,sw_gas_props%get_nband() sfc_alb_nir_dir(iBand,1:NCOL) = sfcalb(1:NCOL,1) sfc_alb_nir_dif(iBand,1:NCOL) = sfcalb(1:NCOL,2) sfc_alb_uvvis_dir(iBand,1:NCOL) = sfcalb(1:NCOL,3) @@ -429,20 +430,6 @@ end subroutine GFS_rrtmgp_pre_run subroutine GFS_rrtmgp_pre_finalize () end subroutine GFS_rrtmgp_pre_finalize - ! ####################################################################################### - ! SUBROUTINE check_error_msg() - ! ####################################################################################### - subroutine check_error_msg(routine_name, error_msg) - character(len=*), intent(in) :: & - error_msg, routine_name - - if(error_msg /= "") then - print*,"ERROR("//trim(routine_name)//"): " - print*,trim(error_msg) - return - end if - end subroutine check_error_msg - ! ####################################################################################### ! Subroutine cloud_microphysics() ! ####################################################################################### @@ -460,7 +447,7 @@ subroutine cloud_microphysics(Model, Tbd, Grid, Sfcprop, ncol, tracer, p_lay, t_ Sfcprop ! Fortran DDT containing FV3-GFS surface fields integer, intent(in) :: & ncol ! Number of horizontal gridpoints - real(kind_phys), dimension(ncol, Model%levs, Model%ntrac) :: & + real(kind_phys), dimension(ncol, Model%levs, 2:Model%ntrac),intent(in) :: & tracer ! real(kind_phys), dimension(ncol,Model%levs), intent(in) :: & p_lay, & ! @@ -630,7 +617,6 @@ subroutine cloud_microphysics(Model, Tbd, Grid, Sfcprop, ncol, tracer, p_lay, t_ endif ! DJS2019: END - ! ####################################################################################### ! MICROPHYSICS ! ####################################################################################### @@ -826,10 +812,6 @@ subroutine cloud_microphysics(Model, Tbd, Grid, Sfcprop, ncol, tracer, p_lay, t_ mbota, & ! OUT - vertical indices for low, mid, hi cloud bases (NCOL,3) de_lgth) ! OUT - clouds decorrelation length (km) endif ! end if_imp_physics - - - + end subroutine cloud_microphysics - - end module GFS_rrtmgp_pre diff --git a/physics/GFS_rrtmgp_sw.F90 b/physics/GFS_rrtmgp_sw.F90 index aa69982dc..ab2880eab 100644 --- a/physics/GFS_rrtmgp_sw.F90 +++ b/physics/GFS_rrtmgp_sw.F90 @@ -2,13 +2,13 @@ module GFS_rrtmgp_sw use GFS_typedefs, only: GFS_control_type use machine, only: kind_phys use physparam, only: isubcsw, iovrsw - use rrtmgp_sw, only: nrghice_sw => nrghice, ipsdsw0 use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp use mo_cloud_optics, only: ty_cloud_optics use mo_optical_props, only: ty_optical_props_2str use mo_cloud_sampling, only: sampled_mask_max_ran, sampled_mask_exp_ran, draw_samples use mersenne_twister, only: random_setseed, random_number, random_stat use mo_rrtmgp_sw_cloud_optics, only: rrtmgp_sw_cloud_optics + use rrtmgp_aux, only: check_error_msg, nrghice_sw, ipsdsw0 public GFS_rrtmgp_sw_run,GFS_rrtmgp_sw_init,GFS_rrtmgp_sw_finalize @@ -37,9 +37,9 @@ end subroutine GFS_rrtmgp_sw_init !! | cld_rwp | cloud_rain_water_path | layer cloud rain water path | g m-2 | 2 | real | kind_phys | in | F | !! | cld_rerain | mean_effective_radius_for_rain_drop | mean effective radius for rain cloud | micron | 2 | real | kind_phys | in | F | !! | icseed_sw | seed_random_numbers_sw | seed for random number generation for shortwave radiation | none | 1 | integer | | in | F | -!! | kdist_sw | K_distribution_file_for_RRTMGP_SW_scheme | DDT containing spectral information for RRTMGP SW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | +!! | sw_gas_props | coefficients_for_sw_gas_optics | DDT containing spectral information for RRTMGP SW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | !! | aerosols | aerosol_optical_properties_for_shortwave_bands_01-16 | aerosol optical properties for shortwave bands 01-16 | various | 4 | real | kind_phys | in | F | -!! | kdist_cldy_sw | K_distribution_file_for_cloudy_RRTMGP_SW_scheme | DDT containing spectral information for cloudy RRTMGP SW radiation scheme | DDT | 0 | ty_cloud_optics | | in | F | +!! | sw_cloud_props | coefficients_for_sw_cloud_optics | DDT containing spectral information for cloudy RRTMGP SW radiation scheme | DDT | 0 | ty_cloud_optics | | in | F | !! | nday | daytime_points_dimension | daytime points dimension | count | 0 | integer | | in | F | !! | idxday | daytime_points | daytime points | index | 1 | integer | | in | F | !! | optical_props_clouds | shortwave_optical_properties_for_cloudy_atmosphere | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_2str | | out | F | @@ -52,7 +52,7 @@ end subroutine GFS_rrtmgp_sw_init ! ######################################################################################### subroutine GFS_rrtmgp_sw_run(Model, ncol, icseed_sw, p_lay, t_lay, p_lev, cld_frac, & ! IN cld_lwp, cld_reliq, cld_iwp, cld_reice, cld_swp, cld_resnow, cld_rwp, cld_rerain, & ! IN - kdist_sw, aerosols, kdist_cldy_sw, nday, idxday, & ! IN + sw_gas_props, aerosols, sw_cloud_props, nday, idxday, & ! IN optical_props_clouds, optical_props_aerosol, cldtausw, errmsg, errflg) ! OUT ! Inputs @@ -84,10 +84,10 @@ subroutine GFS_rrtmgp_sw_run(Model, ncol, icseed_sw, p_lay, t_lay, p_lev, cld_fr cld_rwp, & ! Cloud rain water path cld_rerain ! Cloud rain effective radius type(ty_gas_optics_rrtmgp),intent(in) :: & - kdist_sw ! RRTMGP DDT containing spectral information for SW calculation + sw_gas_props ! RRTMGP DDT containing spectral information for SW calculation type(ty_cloud_optics),intent(in) :: & - kdist_cldy_sw ! - real(kind_phys), intent(in),dimension(ncol, model%levs, kdist_sw%get_nband(),3) :: & + sw_cloud_props ! + real(kind_phys), intent(in),dimension(ncol, model%levs, sw_gas_props%get_nband(),3) :: & aerosols ! ! Outputs @@ -105,10 +105,10 @@ subroutine GFS_rrtmgp_sw_run(Model, ncol, icseed_sw, p_lay, t_lay, p_lev, cld_fr logical,dimension(ncol,model%levs) :: liqmask, icemask type(ty_optical_props_2str) :: optical_props_cloudsByBand type(random_stat) :: rng_stat - real(kind_phys), dimension(kdist_sw%get_ngpt(),model%levs,ncol) :: rng3D - real(kind_phys), dimension(kdist_sw%get_ngpt()*model%levs) :: rng1D - logical, dimension(ncol,model%levs,kdist_sw%get_ngpt()) :: cldfracMCICA - real(kind_phys), dimension(nday,model%levs,kdist_sw%get_nband()) :: & + real(kind_phys), dimension(sw_gas_props%get_ngpt(),model%levs,ncol) :: rng3D + real(kind_phys), dimension(sw_gas_props%get_ngpt()*model%levs) :: rng1D + logical, dimension(ncol,model%levs,sw_gas_props%get_ngpt()) :: cldfracMCICA + real(kind_phys), dimension(nday,model%levs,sw_gas_props%get_nband()) :: & tau_cld, ssa_cld, asy_cld ! Initialize CCPP error handling variables @@ -140,11 +140,11 @@ subroutine GFS_rrtmgp_sw_run(Model, ncol, icseed_sw, p_lay, t_lay, p_lev, cld_fr ! Allocate space for RRTMGP DDTs containing cloud and aerosol radiative properties ! ####################################################################################### ! Cloud optics [ncol,model%levs,nBands] - call check_error_msg('GFS_rrtmgp_sw_run',optical_props_cloudsByBand%alloc_2str(ncol, model%levs, kdist_sw%get_band_lims_wavenumber())) + call check_error_msg('GFS_rrtmgp_sw_run',optical_props_cloudsByBand%alloc_2str(ncol, model%levs, sw_gas_props%get_band_lims_wavenumber())) ! Aerosol optics [ncol,model%levs,nBands] - call check_error_msg('GFS_rrtmgp_sw_run',optical_props_aerosol%alloc_2str(ncol, model%levs, kdist_sw%get_band_lims_wavenumber())) + call check_error_msg('GFS_rrtmgp_sw_run',optical_props_aerosol%alloc_2str(ncol, model%levs, sw_gas_props%get_band_lims_wavenumber())) ! Cloud optics [ncol,model%levs,nGpts] - call check_error_msg('GFS_rrtmgp_sw_run',optical_props_clouds%alloc_2str(ncol, model%levs, kdist_sw)) + call check_error_msg('GFS_rrtmgp_sw_run',optical_props_clouds%alloc_2str(ncol, model%levs, sw_gas_props)) ! ####################################################################################### ! Copy aerosol optical information to RRTMGP DDT @@ -156,12 +156,12 @@ subroutine GFS_rrtmgp_sw_run(Model, ncol, icseed_sw, p_lay, t_lay, p_lev, cld_fr ! ####################################################################################### ! Compute cloud-optics for RTE. ! ####################################################################################### - if (Model%rrtmgp_cld_phys .gt. 0) then + if (Model%rrtmgp_cld_optics .gt. 0) then ! RRTMGP cloud-optics. - call check_error_msg('GFS_rrtmgp_sw_run',kdist_cldy_sw%cloud_optics(& + call check_error_msg('GFS_rrtmgp_sw_run',sw_cloud_props%cloud_optics(& ncol, & ! IN - Number of daylit gridpoints model%levs, & ! IN - Number of vertical layers - kdist_sw%get_nband(), & ! IN - Number of SW bands + sw_gas_props%get_nband(), & ! IN - Number of SW bands nrghice_sw, & ! IN - Number of ice-roughness categories liqmask, & ! IN - Liquid-cloud mask icemask, & ! IN - Ice-cloud mask @@ -177,7 +177,7 @@ subroutine GFS_rrtmgp_sw_run(Model, ncol, icseed_sw, p_lay, t_lay, p_lev, cld_fr optical_props_cloudsByBand%tau(:,:,:) = 0._kind_phys optical_props_cloudsByBand%ssa(:,:,:) = 0._kind_phys optical_props_cloudsByBand%g(:,:,:) = 0._kind_phys - call rrtmgp_sw_cloud_optics(nday, model%levs, kdist_sw%get_nband(), cld_lwp(idxday,:), & + call rrtmgp_sw_cloud_optics(nday, model%levs, sw_gas_props%get_nband(), cld_lwp(idxday,:), & cld_reliq(idxday,:), cld_iwp(idxday,:), cld_reice(idxday,:), cld_rwp(idxday,:), & cld_rerain(idxday,:), cld_swp(idxday,:), cld_resnow(idxday,:), cld_frac(idxday,:),& tau_cld, ssa_cld, asy_cld) @@ -194,7 +194,7 @@ subroutine GFS_rrtmgp_sw_run(Model, ncol, icseed_sw, p_lay, t_lay, p_lev, cld_fr do iCol=1,ncol call random_setseed(ipseed_sw(icol),rng_stat) call random_number(rng1D,rng_stat) - rng3D(:,:,iCol) = reshape(source = rng1D,shape=[kdist_sw%get_ngpt(),model%levs]) + rng3D(:,:,iCol) = reshape(source = rng1D,shape=[sw_gas_props%get_ngpt(),model%levs]) enddo ! Call McICA @@ -214,15 +214,5 @@ end subroutine GFS_rrtmgp_sw_run subroutine GFS_rrtmgp_sw_finalize() end subroutine GFS_rrtmgp_sw_finalize - - subroutine check_error_msg(routine_name, error_msg) - character(len=*), intent(in) :: & - error_msg, routine_name - - if(error_msg /= "") then - print*,"ERROR("//trim(routine_name)//"): " - print*,trim(error_msg) - return - end if - end subroutine check_error_msg + end module GFS_rrtmgp_sw diff --git a/physics/GFS_rrtmgp_sw_post.F90 b/physics/GFS_rrtmgp_sw_post.F90 index a8c2d87bc..122ce3f44 100644 --- a/physics/GFS_rrtmgp_sw_post.F90 +++ b/physics/GFS_rrtmgp_sw_post.F90 @@ -14,6 +14,7 @@ module GFS_rrtmgp_sw_post use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp use mo_fluxes_byband, only: ty_fluxes_byband use mo_heating_rates, only: compute_heating_rate + use rrtmgp_aux, only: check_error_msg implicit none public GFS_rrtmgp_sw_post_init,GFS_rrtmgp_sw_post_run,GFS_rrtmgp_sw_post_finalize @@ -44,7 +45,7 @@ end subroutine GFS_rrtmgp_sw_post_init !! | fluxswDOWN_allsky | sw_flux_profile_downward_allsky | RRTMGP downward shortwave all-sky flux profile | W m-2 | 2 | real | kind_phys | in | F | !! | fluxswUP_clrsky | sw_flux_profile_upward_clrsky | RRTMGP upward shortwave clr-sky flux profile | W m-2 | 2 | real | kind_phys | in | F | !! | fluxswDOWN_clrsky | sw_flux_profile_downward_clrsky | RRTMGP downward shortwave clr-sky flux profile | W m-2 | 2 | real | kind_phys | in | F | -!! | kdist_sw | K_distribution_file_for_RRTMGP_SW_scheme | DDT containing spectral information for RRTMGP SW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | +!! | sw_gas_props | coefficients_for_sw_gas_optics | DDT containing spectral information for RRTMGP SW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | !! | sfc_alb_nir_dir | surface_shortwave_albedo_near_infrared_direct_in_each_band | surface sw near-infrared direct albedo in each SW band | frac | 2 | real | kind_phys | in | F | !! | sfc_alb_nir_dif | surface_shortwave_albedo_near_infrared_diffuse_in_each_band | surface sw near-infrared diffuse albedo in each SW band | frac | 2 | real | kind_phys | in | F | !! | sfc_alb_uvvis_dir | surface_shortwave_albedo_uv_visible_direct_in_each_band | surface sw uv-visible direct albedo in each SW band | frac | 2 | real | kind_phys | in | F | @@ -59,7 +60,7 @@ end subroutine GFS_rrtmgp_sw_post_init !! #endif subroutine GFS_rrtmgp_sw_post_run (Model, Grid, Diag, Radtend, Statein, Coupling, & - scmpsw, im, p_lev, kdist_sw, sfc_alb_nir_dir, sfc_alb_nir_dif, sfc_alb_uvvis_dir, & + scmpsw, im, p_lev, sw_gas_props, sfc_alb_nir_dir, sfc_alb_nir_dif, sfc_alb_uvvis_dir, & sfc_alb_uvvis_dif, tsfa, nday, idxday, fluxswUP_allsky, fluxswDOWN_allsky, & fluxswUP_clrsky, fluxswDOWN_clrsky, hswc, topflx_sw, sfcflx_sw, flxprf_sw, hsw0, & errmsg, errflg) @@ -85,10 +86,10 @@ subroutine GFS_rrtmgp_sw_post_run (Model, Grid, Diag, Radtend, Statein, Coupling real(kind_phys), dimension(size(Grid%xlon,1)), intent(in) :: & tsfa ! Lowest model layer air temperature for radiation type(ty_gas_optics_rrtmgp),intent(in) :: & - kdist_sw ! DDT containing SW spectral information + sw_gas_props ! DDT containing SW spectral information real(kind_phys), dimension(size(Grid%xlon,1), Model%levs+1), intent(in) :: & p_lev ! Pressure @ model layer-interfaces (hPa) - real(kind_phys),dimension(kdist_sw%get_nband(),size(Grid%xlon,1)),intent(in) :: & + real(kind_phys),dimension(sw_gas_props%get_nband(),size(Grid%xlon,1)),intent(in) :: & sfc_alb_nir_dir, & ! Shortwave surface albedo (nIR-direct) sfc_alb_nir_dif, & ! Shortwave surface albedo (nIR-diffuse) sfc_alb_uvvis_dir, & ! Shortwave surface albedo (uvvis-direct) @@ -274,14 +275,4 @@ end subroutine GFS_rrtmgp_sw_post_run subroutine GFS_rrtmgp_sw_post_finalize () end subroutine GFS_rrtmgp_sw_post_finalize - subroutine check_error_msg(routine_name, error_msg) - character(len=*), intent(in) :: & - error_msg, routine_name - - if(error_msg /= "") then - print*,"ERROR("//trim(routine_name)//"): " - print*,trim(error_msg) - return - end if - end subroutine check_error_msg end module GFS_rrtmgp_sw_post diff --git a/physics/rrtmgp_aux.F90 b/physics/rrtmgp_aux.F90 new file mode 100644 index 000000000..34c885ce4 --- /dev/null +++ b/physics/rrtmgp_aux.F90 @@ -0,0 +1,1370 @@ +module rrtmgp_aux + use machine, only: kind_phys + use GFS_typedefs, only: GFS_control_type + use mo_rte_kind, only: wl + use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp + use mo_cloud_optics, only: ty_cloud_optics + use mo_gas_concentrations, only: ty_gas_concs + use netcdf + + ! Parameters + integer,parameter :: nGases = 6 + character(len=3),parameter, dimension(nGases) :: & + active_gases = (/ 'h2o', 'co2', 'o3 ', 'n2o', 'ch4', 'o2 '/) + integer :: nrghice_lw, nrghice_sw, ipsdlw0, ipsdsw0 + +contains + + subroutine rrtmgp_aux_init() + end subroutine rrtmgp_aux_init + subroutine rrtmgp_aux_run() + end subroutine rrtmgp_aux_run + subroutine rrtmgp_aux_finalize() + end subroutine rrtmgp_aux_finalize + + ! ######################################################################################### + ! SUBROUTINE rrtmgp_lw_cloud_optics_init() + ! ######################################################################################### + subroutine lw_cloud_optics_init(Model, mpicomm, mpirank, mpiroot, lw_cloud_props, & + errmsg, errflg) +#ifdef MPI + use mpi +#endif + + ! Inputs + type(GFS_control_type), intent(in) :: & + Model ! DDT containing model control parameters + integer,intent(in) :: & + mpicomm, & ! MPI communicator + mpirank, & ! Current MPI rank + mpiroot ! Master MPI rank + type(ty_cloud_optics),intent(inout) :: & + lw_cloud_props + + ! Outputs + character(len=*), intent(out) :: & + errmsg ! Error message + integer, intent(out) :: & + errflg ! Error code + + ! Variables that will be passed to cloud_optics%load() + real(kind_phys) :: & + radliq_lwr, & ! used by RRTGMP cloud optics + radliq_upr, & ! used by RRTGMP cloud optics + radliq_fac, & ! used by RRTGMP cloud optics + radice_lwr, & ! used by RRTGMP cloud optics + radice_upr, & ! used by RRTGMP cloud optics + radice_fac ! used by RRTGMP cloud optics + real(kind_phys), dimension(:), allocatable :: & + pade_sizereg_extliq, & ! used by RRTGMP cloud optics + pade_sizereg_ssaliq, & ! used by RRTGMP cloud optics + pade_sizereg_asyliq, & ! used by RRTGMP cloud optics + pade_sizereg_extice, & ! used by RRTGMP cloud optics + pade_sizereg_ssaice, & ! used by RRTGMP cloud optics + pade_sizereg_asyice ! used by RRTGMP cloud optics + real(kind_phys), dimension(:,:), allocatable :: & + lut_extliq, & ! used by RRTGMP cloud optics + lut_ssaliq, & ! used by RRTGMP cloud optics + lut_asyliq, & ! used by RRTGMP cloud optics + band_lims_cldy ! used by RRTGMP cloud optics + + real(kind_phys), dimension(:,:,:), allocatable :: & + lut_extice, & ! used by RRTGMP cloud optics + lut_ssaice, & ! used by RRTGMP cloud optics + lut_asyice, & ! used by RRTGMP cloud optics + pade_extliq, & ! used by RRTGMP cloud optics + pade_ssaliq, & ! used by RRTGMP cloud optics + pade_asyliq ! used by RRTGMP cloud optics + real(kind_phys), dimension(:,:,:,:), allocatable :: & + pade_extice, & ! used by RRTGMP cloud optics + pade_ssaice, & ! used by RRTGMP cloud optics + pade_asyice ! used by RRTGMP cloud optics + ! Dimensions + integer :: & + nbandLWcldy, & ! used by RRTGMP cloud optics + nsize_liq, & ! used by RRTGMP cloud optics + nsize_ice, & ! used by RRTGMP cloud optics + nsizereg, & ! used by RRTGMP cloud optics + ncoeff_ext, & ! used by RRTGMP cloud optics + ncoeff_ssa_g, & ! used by RRTGMP cloud optics + nbound, & ! used by RRTGMP cloud optics + npairsLWcldy ! used by RRTGMP cloud optics + + ! Local variables + integer :: dimID,varID,status,igpt,iGas,ij,ierr,ncid_lw_clds + integer,dimension(:),allocatable :: temp1,temp2,temp3,temp4,temp_log_array1,& + temp_log_array2, temp_log_array3, temp_log_array4 + character(len=264) :: lw_cloud_props_file + integer,parameter :: max_strlen=256 + + ! Initialize + errmsg = '' + errflg = 0 + + ! Filenames are set in the gfs_physics_nml (scm/src/GFS_typedefs.F90) + lw_cloud_props_file = trim(Model%rrtmgp_root)//trim(Model%lw_file_clouds) + ! Read dimensions for k-distribution fields (only on master processor(0)) + if (mpirank .eq. mpiroot) then + if(nf90_open(trim(lw_cloud_props_file), NF90_WRITE, ncid_lw_clds) == NF90_NOERR) then + status = nf90_inq_dimid(ncid_lw_clds, 'nband', dimid) + status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=nbandLWcldy) + status = nf90_inq_dimid(ncid_lw_clds, 'nrghice', dimid) + status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=nrghice_lw) + status = nf90_inq_dimid(ncid_lw_clds, 'nsize_liq', dimid) + status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=nsize_liq) + status = nf90_inq_dimid(ncid_lw_clds, 'nsize_ice', dimid) + status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=nsize_ice) + status = nf90_inq_dimid(ncid_lw_clds, 'nsizereg', dimid) + status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=nsizereg) + status = nf90_inq_dimid(ncid_lw_clds, 'ncoeff_ext', dimid) + status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=ncoeff_ext) + status = nf90_inq_dimid(ncid_lw_clds, 'ncoeff_ssa_g', dimid) + status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=ncoeff_ssa_g) + status = nf90_inq_dimid(ncid_lw_clds, 'nbound', dimid) + status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=nbound) + status = nf90_inq_dimid(ncid_lw_clds, 'pair', dimid) + status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=npairsLWcldy) + status = nf90_close(ncid_lw_clds) + endif + endif + + ! Broadcast dimensions to all processors +#ifdef MPI + if (Model%rrtmgp_cld_optics .eq. 1 .or. Model%rrtmgp_cld_optics .eq. 2) then + call MPI_BCAST(nbandLWcldy, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nrghice_lw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nsize_liq, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nsize_ice, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nsizereg, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(ncoeff_ext, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(ncoeff_ssa_g, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nbound, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(npairsLWcldy, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + endif +#endif + + if (Model%rrtmgp_cld_optics .eq. 1) then + allocate(lut_extliq(nsize_liq, nBandLWcldy)) + allocate(lut_ssaliq(nsize_liq, nBandLWcldy)) + allocate(lut_asyliq(nsize_liq, nBandLWcldy)) + allocate(lut_extice(nsize_ice, nBandLWcldy, nrghice_lw)) + allocate(lut_ssaice(nsize_ice, nBandLWcldy, nrghice_lw)) + allocate(lut_asyice(nsize_ice, nBandLWcldy, nrghice_lw)) + allocate(band_lims_cldy(2, nBandLWcldy)) + endif + if (Model%rrtmgp_cld_optics .eq. 2) then + allocate(pade_extliq(nbandLWcldy, nsizereg, ncoeff_ext )) + allocate(pade_ssaliq(nbandLWcldy, nsizereg, ncoeff_ssa_g)) + allocate(pade_asyliq(nbandLWcldy, nsizereg, ncoeff_ssa_g)) + allocate(pade_extice(nbandLWcldy, nsizereg, ncoeff_ext, nrghice_lw)) + allocate(pade_ssaice(nbandLWcldy, nsizereg, ncoeff_ssa_g, nrghice_lw)) + allocate(pade_asyice(nbandLWcldy, nsizereg, ncoeff_ssa_g, nrghice_lw)) + allocate(pade_sizereg_extliq(nbound)) + allocate(pade_sizereg_ssaliq(nbound)) + allocate(pade_sizereg_asyliq(nbound)) + allocate(pade_sizereg_extice(nbound)) + allocate(pade_sizereg_ssaice(nbound)) + allocate(pade_sizereg_asyice(nbound)) + allocate(band_lims_cldy(2,nbandLWcldy)) + endif + + ! On master processor, allocate space, read in fields, broadcast to all processors + if (mpirank .eq. mpiroot) then + ! + if (Model%rrtmgp_cld_optics .eq. 1) then + ! + if(nf90_open(trim(lw_cloud_props_file), NF90_WRITE, ncid_lw_clds) == NF90_NOERR) then + status = nf90_inq_varid(ncid_lw_clds,'radliq_lwr',varID) + status = nf90_get_var(ncid_lw_clds,varID,radliq_lwr) + status = nf90_inq_varid(ncid_lw_clds,'radliq_upr',varID) + status = nf90_get_var(ncid_lw_clds,varID,radliq_upr) + status = nf90_inq_varid(ncid_lw_clds,'radliq_fac',varID) + status = nf90_get_var(ncid_lw_clds,varID,radliq_fac) + status = nf90_inq_varid(ncid_lw_clds,'radice_lwr',varID) + status = nf90_get_var(ncid_lw_clds,varID,radice_lwr) + status = nf90_inq_varid(ncid_lw_clds,'radice_upr',varID) + status = nf90_get_var(ncid_lw_clds,varID,radice_upr) + status = nf90_inq_varid(ncid_lw_clds,'radice_fac',varID) + status = nf90_get_var(ncid_lw_clds,varID,radice_fac) + status = nf90_inq_varid(ncid_lw_clds,'lut_extliq',varID) + status = nf90_get_var(ncid_lw_clds,varID,lut_extliq) + status = nf90_inq_varid(ncid_lw_clds,'lut_ssaliq',varID) + status = nf90_get_var(ncid_lw_clds,varID,lut_ssaliq) + status = nf90_inq_varid(ncid_lw_clds,'lut_asyliq',varID) + status = nf90_get_var(ncid_lw_clds,varID,lut_asyliq) + status = nf90_inq_varid(ncid_lw_clds,'lut_extice',varID) + status = nf90_get_var(ncid_lw_clds,varID,lut_extice) + status = nf90_inq_varid(ncid_lw_clds,'lut_ssaice',varID) + status = nf90_get_var(ncid_lw_clds,varID,lut_ssaice) + status = nf90_inq_varid(ncid_lw_clds,'lut_asyice',varID) + status = nf90_get_var(ncid_lw_clds,varID,lut_asyice) + status = nf90_inq_varid(ncid_lw_clds,'bnd_limits_wavenumber',varID) + status = nf90_get_var(ncid_lw_clds,varID,band_lims_cldy) + status = nf90_close(ncid_lw_clds) + endif + endif + ! + if (Model%rrtmgp_cld_optics .eq. 2) then + ! + if(nf90_open(trim(lw_cloud_props_file), NF90_WRITE, ncid_lw_clds) == NF90_NOERR) then + status = nf90_inq_varid(ncid_lw_clds,'radliq_lwr',varID) + status = nf90_get_var(ncid_lw_clds,varID,radliq_lwr) + status = nf90_inq_varid(ncid_lw_clds,'radliq_upr',varID) + status = nf90_get_var(ncid_lw_clds,varID,radliq_upr) + status = nf90_inq_varid(ncid_lw_clds,'radliq_fac',varID) + status = nf90_get_var(ncid_lw_clds,varID,radliq_fac) + status = nf90_inq_varid(ncid_lw_clds,'radice_lwr',varID) + status = nf90_get_var(ncid_lw_clds,varID,radice_lwr) + status = nf90_inq_varid(ncid_lw_clds,'radice_upr',varID) + status = nf90_get_var(ncid_lw_clds,varID,radice_upr) + status = nf90_inq_varid(ncid_lw_clds,'radice_fac',varID) + status = nf90_get_var(ncid_lw_clds,varID,radice_fac) + status = nf90_inq_varid(ncid_lw_clds,'pade_extliq',varID) + status = nf90_get_var(ncid_lw_clds,varID,pade_extliq) + status = nf90_inq_varid(ncid_lw_clds,'pade_ssaliq',varID) + status = nf90_get_var(ncid_lw_clds,varID,pade_ssaliq) + status = nf90_inq_varid(ncid_lw_clds,'pade_asyliq',varID) + status = nf90_get_var(ncid_lw_clds,varID,pade_asyliq) + status = nf90_inq_varid(ncid_lw_clds,'pade_extice',varID) + status = nf90_get_var(ncid_lw_clds,varID,pade_extice) + status = nf90_inq_varid(ncid_lw_clds,'pade_ssaice',varID) + status = nf90_get_var(ncid_lw_clds,varID,pade_ssaice) + status = nf90_inq_varid(ncid_lw_clds,'pade_asyice',varID) + status = nf90_get_var(ncid_lw_clds,varID,pade_asyice) + status = nf90_inq_varid(ncid_lw_clds,'pade_sizreg_extliq',varID) + status = nf90_get_var(ncid_lw_clds,varID,pade_sizereg_extliq) + status = nf90_inq_varid(ncid_lw_clds,'pade_sizreg_ssaliq',varID) + status = nf90_get_var(ncid_lw_clds,varID,pade_sizereg_ssaliq) + status = nf90_inq_varid(ncid_lw_clds,'pade_sizreg_asyliq',varID) + status = nf90_get_var(ncid_lw_clds,varID,pade_sizereg_asyliq) + status = nf90_inq_varid(ncid_lw_clds,'pade_sizreg_extice',varID) + status = nf90_get_var(ncid_lw_clds,varID,pade_sizereg_extice) + status = nf90_inq_varid(ncid_lw_clds,'pade_sizreg_ssaice',varID) + status = nf90_get_var(ncid_lw_clds,varID,pade_sizereg_ssaice) + status = nf90_inq_varid(ncid_lw_clds,'pade_sizreg_asyice',varID) + status = nf90_get_var(ncid_lw_clds,varID,pade_sizereg_asyice) + status = nf90_inq_varid(ncid_lw_clds,'bnd_limits_wavenumber',varID) + status = nf90_get_var(ncid_lw_clds,varID,band_lims_cldy) + status = nf90_close(ncid_lw_clds) + endif + endif + endif + + ! Broadcast arrays to all processors +#ifdef MPI + if (Model%rrtmgp_cld_optics .eq. 1) then + call MPI_BCAST(radliq_lwr, size(radliq_lwr), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(radliq_upr, size(radliq_upr), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(radliq_fac, size(radliq_fac), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(radice_lwr, size(radice_lwr), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(radice_upr, size(radice_upr), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(radice_fac, size(radice_fac), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_extliq, size(lut_extliq), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_ssaliq, size(lut_ssaliq), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_asyliq, size(lut_asyliq), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_extice, size(lut_extice), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_ssaice, size(lut_ssaice), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_asyice, size(lut_asyice), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(band_lims_cldy), size(band_lims_cldy), kind_phys, mpiroot, mpicomm, ierr) + endif + if (Model%rrtmgp_cld_optics .eq. 2) then + call MPI_BCAST(pade_extliq, size(pade_extliq), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_ssaliq, size(pade_ssaliq), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_asyliq, size(pade_asyliq), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_extice, size(pade_extice), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_ssaice, size(pade_ssaice), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_asyice, size(pade_asyice), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_extliq), size(pade_sizereg_extliq), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_ssaliq), size(pade_sizereg_ssaliq), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_asyliq), size(pade_sizereg_asyliq), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_extice), size(pade_sizereg_extice), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_ssaice), size(pade_sizereg_ssaice), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_asyice), size(pade_sizereg_asyice), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(band_lims_cldy), size(band_lims_cldy), kind_phys, mpiroot, mpicomm, ierr) + endif +#endif + + ! Load tables data for RRTGMP cloud-optics + if (Model%rrtmgp_cld_optics .eq. 1) then + call check_error_msg('lw_cloud_optics_init',lw_cloud_props%set_ice_roughness(nrghice_lw)) + call check_error_msg('lw_cloud_optics_init',lw_cloud_props%load(band_lims_cldy, & + radliq_lwr, radliq_upr, radliq_fac, radice_lwr, radice_upr, radice_fac, & + lut_extliq, lut_ssaliq, lut_asyliq, lut_extice, lut_ssaice, lut_asyice)) + endif + if (Model%rrtmgp_cld_optics .eq. 2) then + call check_error_msg('lw_cloud_optics_init',lw_cloud_props%set_ice_roughness(nrghice_lw)) + call check_error_msg('lw_cloud_optics_init',lw_cloud_props%load(band_lims_cldy, & + pade_extliq, pade_ssaliq, pade_asyliq, pade_extice, pade_ssaice, & + pade_asyice, pade_sizereg_extliq, pade_sizereg_ssaliq, pade_sizereg_asyliq,& + pade_sizereg_extice, pade_sizereg_ssaice, pade_sizereg_asyice)) + endif + end subroutine lw_cloud_optics_init + + ! ######################################################################################### + ! SUBROUTINE rrtmgp_lw_gas_optics_init() + ! ######################################################################################### + subroutine lw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, lw_gas_props, & + errmsg, errflg) + use netcdf + +#ifdef MPI + use mpi +#endif + + ! Inputs + type(GFS_control_type), intent(in) :: & + Model ! DDT containing model control parameters + integer,intent(in) :: & + mpicomm, & ! MPI communicator + mpirank, & ! Current MPI rank + mpiroot ! Master MPI rank + type(ty_gas_optics_rrtmgp),intent(inout) :: & + lw_gas_props + + ! Outputs + character(len=*), intent(out) :: & + errmsg ! Error message + integer, intent(out) :: & + errflg ! Error code + + ! Variables that will be passed to gas_optics%load() + type(ty_gas_concs) :: & + gas_concentrations + integer, dimension(:), allocatable :: & + kminor_start_lower, & ! used by RRTGMP gas optics + kminor_start_upper ! used by RRTGMP gas optics + integer, dimension(:,:), allocatable :: & + band2gpt, & ! used by RRTGMP gas optics + minor_limits_gpt_lower, & ! used by RRTGMP gas optics + minor_limits_gpt_upper ! used by RRTGMP gas optics + integer, dimension(:,:,:), allocatable :: & + key_species ! used by RRTGMP gas optics + real(kind_phys) :: & + press_ref_trop, & ! used by RRTGMP gas optics + temp_ref_p, & ! used by RRTGMP gas optics + temp_ref_t ! used by RRTGMP gas optics + real(kind_phys), dimension(:), allocatable :: & + press_ref, & ! used by RRTGMP gas optics + temp_ref ! used by RRTGMP gas optics + real(kind_phys), dimension(:,:), allocatable :: & + band_lims, & ! used by RRTGMP gas optics + totplnk ! used by RRTGMP gas optics + real(kind_phys), dimension(:,:,:), allocatable :: & + vmr_ref, & ! used by RRTGMP gas optics + kminor_lower, & ! used by RRTGMP gas optics + kminor_upper, & ! used by RRTGMP gas optics + rayl_lower, & ! used by RRTGMP gas optics + rayl_upper ! used by RRTGMP gas optics + real(kind_phys), dimension(:,:,:,:), allocatable :: & + kmajor, & ! used by RRTGMP gas optics + planck_frac ! used by RRTGMP gas optics + character(len=32), dimension(:), allocatable :: & + gas_names, & ! used by RRTGMP gas optics + gas_minor, & ! used by RRTGMP gas optics + identifier_minor, & ! used by RRTGMP gas optics + minor_gases_lower, & ! used by RRTGMP gas optics + minor_gases_upper, & ! used by RRTGMP gas optics + scaling_gas_lower, & ! used by RRTGMP gas optics + scaling_gas_upper ! used by RRTGMP gas optics + logical(wl), dimension(:), allocatable :: & + minor_scales_with_density_lower, & ! used by RRTGMP gas optics + minor_scales_with_density_upper, & ! used by RRTGMP gas optics + scale_by_complement_lower, & ! used by RRTGMP gas optics + scale_by_complement_upper ! used by RRTGMP gas optics + + ! Dimensions (to be broadcast across all processors) + integer :: & + ntemps, & ! used by RRTGMP gas optics + npress, & ! used by RRTGMP gas optics + nabsorbers, & ! used by RRTGMP gas optics + nextrabsorbers, & ! used by RRTGMP gas optics + nminorabsorbers, & ! used by RRTGMP gas optics + nmixingfracs, & ! used by RRTGMP gas optics + nlayers, & ! used by RRTGMP gas optics + nbnds, & ! used by RRTGMP gas optics + ngpts, & ! used by RRTGMP gas optics + npairs, & ! used by RRTGMP gas optics + ninternalSourcetemps, & ! used by RRTGMP gas optics + nminor_absorber_intervals_lower, & ! used by RRTGMP gas optics + nminor_absorber_intervals_upper, & ! used by RRTGMP gas optics + ncontributors_lower, & ! used by RRTGMP gas optics + ncontributors_upper ! used by RRTGMP gas optics + + ! Local variables + integer :: ncid_lw,dimID,varID,status,igpt,iGas,ij,ierr + integer,dimension(:),allocatable :: temp1,temp2,temp3,temp4,temp_log_array1,& + temp_log_array2, temp_log_array3, temp_log_array4 + character(len=264) :: lw_gas_props_file + integer,parameter :: max_strlen=256 + + ! Initialize + errmsg = '' + errflg = 0 + + ! Filenames are set in the gfs_physics_nml (scm/src/GFS_typedefs.F90) + lw_gas_props_file = trim(Model%rrtmgp_root)//trim(Model%lw_file_gas) + + ! Read dimensions for k-distribution fields (only on master processor(0)) + if (mpirank .eq. mpiroot) then + if(nf90_open(trim(lw_gas_props_file), NF90_WRITE, ncid_lw) .eq. NF90_NOERR) then + status = nf90_inq_dimid(ncid_lw, 'temperature', dimid) + status = nf90_inquire_dimension(ncid_lw, dimid, len=ntemps) + status = nf90_inq_dimid(ncid_lw, 'pressure', dimid) + status = nf90_inquire_dimension(ncid_lw, dimid, len=npress) + status = nf90_inq_dimid(ncid_lw, 'absorber', dimid) + status = nf90_inquire_dimension(ncid_lw, dimid, len=nabsorbers) + status = nf90_inq_dimid(ncid_lw, 'minor_absorber', dimid) + status = nf90_inquire_dimension(ncid_lw, dimid, len=nminorabsorbers) + status = nf90_inq_dimid(ncid_lw, 'absorber_ext', dimid) + status = nf90_inquire_dimension(ncid_lw, dimid, len=nextrabsorbers) + status = nf90_inq_dimid(ncid_lw, 'mixing_fraction', dimid) + status = nf90_inquire_dimension(ncid_lw, dimid, len=nmixingfracs) + status = nf90_inq_dimid(ncid_lw, 'atmos_layer', dimid) + status = nf90_inquire_dimension(ncid_lw, dimid, len=nlayers) + status = nf90_inq_dimid(ncid_lw, 'bnd', dimid) + status = nf90_inquire_dimension(ncid_lw, dimid, len=nbnds) + status = nf90_inq_dimid(ncid_lw, 'gpt', dimid) + status = nf90_inquire_dimension(ncid_lw, dimid, len=ngpts) + status = nf90_inq_dimid(ncid_lw, 'pair', dimid) + status = nf90_inquire_dimension(ncid_lw, dimid, len=npairs) + status = nf90_inq_dimid(ncid_lw, 'contributors_lower', dimid) + status = nf90_inquire_dimension(ncid_lw, dimid, len=ncontributors_lower) + status = nf90_inq_dimid(ncid_lw, 'contributors_upper', dimid) + status = nf90_inquire_dimension(ncid_lw, dimid, len=ncontributors_upper) + status = nf90_inq_dimid(ncid_lw, 'minor_absorber_intervals_lower', dimid) + status = nf90_inquire_dimension(ncid_lw, dimid, len=nminor_absorber_intervals_lower) + status = nf90_inq_dimid(ncid_lw, 'minor_absorber_intervals_upper', dimid) + status = nf90_inquire_dimension(ncid_lw, dimid, len=nminor_absorber_intervals_upper) + status = nf90_inq_dimid(ncid_lw, 'temperature_Planck', dimid) + status = nf90_inquire_dimension(ncid_lw, dimid, len=ninternalSourcetemps) + status = nf90_close(ncid_lw) + endif + endif + + ! Broadcast dimensions to all processors +#ifdef MPI + call MPI_BCAST(ntemps, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(npress, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nminorabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nextraabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nmixingfracs, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nlayers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nbnds, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(ngpts, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(npairs, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(ncontributors_lower, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(ncontributors_upper, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nminor_absorber_intervals_lower, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nminor_absorber_intervals_upper, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(ninternalSourcetemps, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +#endif + + !if (mpirank .eq. mpiroot) then + ! Allocate space for arrays + allocate(gas_names(nabsorbers)) + allocate(scaling_gas_lower(nminor_absorber_intervals_lower)) + allocate(scaling_gas_upper(nminor_absorber_intervals_upper)) + allocate(gas_minor(nminorabsorbers)) + allocate(identifier_minor(nminorabsorbers)) + allocate(minor_gases_lower(nminor_absorber_intervals_lower)) + allocate(minor_gases_upper(nminor_absorber_intervals_upper)) + allocate(minor_limits_gpt_lower(npairs,nminor_absorber_intervals_lower)) + allocate(minor_limits_gpt_upper(npairs,nminor_absorber_intervals_upper)) + allocate(band2gpt(2,nbnds)) + allocate(key_species(2,nlayers,nbnds)) + allocate(band_lims(2,nbnds)) + allocate(press_ref(npress)) + allocate(temp_ref(ntemps)) + allocate(vmr_ref(nlayers, nextrabsorbers, ntemps)) + allocate(kminor_lower(ncontributors_lower, nmixingfracs, ntemps)) + allocate(kmajor(ngpts, nmixingfracs, npress+1, ntemps)) + allocate(kminor_start_lower(nminor_absorber_intervals_lower)) + allocate(kminor_upper(ncontributors_upper, nmixingfracs, ntemps)) + allocate(kminor_start_upper(nminor_absorber_intervals_upper)) + allocate(minor_scales_with_density_lower(nminor_absorber_intervals_lower)) + allocate(minor_scales_with_density_upper(nminor_absorber_intervals_upper)) + allocate(scale_by_complement_lower(nminor_absorber_intervals_lower)) + allocate(scale_by_complement_upper(nminor_absorber_intervals_upper)) + allocate(temp1(nminor_absorber_intervals_lower)) + allocate(temp2(nminor_absorber_intervals_upper)) + allocate(temp3(nminor_absorber_intervals_lower)) + allocate(temp4(nminor_absorber_intervals_upper)) + allocate(totplnk(ninternalSourcetemps, nbnds)) + allocate(planck_frac(ngpts, nmixingfracs, npress+1, ntemps)) + + if (mpirank .eq. mpiroot) then + ! Read in fields from file + if(nf90_open(trim(lw_gas_props_file), NF90_WRITE, ncid_lw) .eq. NF90_NOERR) then + status = nf90_inq_varid(ncid_lw,'gas_names',varID) + status = nf90_get_var(ncid_lw,varID,gas_names) + ! + status = nf90_inq_varid(ncid_lw,'scaling_gas_lower',varID) + status = nf90_get_var(ncid_lw,varID,scaling_gas_lower) + ! + status = nf90_inq_varid(ncid_lw,'scaling_gas_upper',varID) + status = nf90_get_var(ncid_lw,varID,scaling_gas_upper) + ! + status = nf90_inq_varid(ncid_lw,'gas_minor',varID) + status = nf90_get_var(ncid_lw,varID,gas_minor) + ! + status = nf90_inq_varid(ncid_lw,'identifier_minor',varID) + status = nf90_get_var(ncid_lw,varID,identifier_minor) + ! + status = nf90_inq_varid(ncid_lw,'minor_gases_lower',varID) + status = nf90_get_var(ncid_lw,varID,minor_gases_lower) + ! + status = nf90_inq_varid(ncid_lw,'minor_gases_upper',varID) + status = nf90_get_var(ncid_lw,varID,minor_gases_upper) + ! + status = nf90_inq_varid(ncid_lw,'minor_limits_gpt_lower',varID) + status = nf90_get_var(ncid_lw,varID,minor_limits_gpt_lower) + ! + status = nf90_inq_varid(ncid_lw,'minor_limits_gpt_upper',varID) + status = nf90_get_var(ncid_lw,varID,minor_limits_gpt_upper) + ! + status = nf90_inq_varid(ncid_lw,'bnd_limits_gpt',varID) + status = nf90_get_var(ncid_lw,varID,band2gpt) + ! + status = nf90_inq_varid(ncid_lw,'key_species',varID) + status = nf90_get_var(ncid_lw,varID,key_species) + ! + status = nf90_inq_varid(ncid_lw,'bnd_limits_wavenumber',varID) + status = nf90_get_var(ncid_lw,varID,band_lims) + ! + status = nf90_inq_varid(ncid_lw,'press_ref',varID) + status = nf90_get_var(ncid_lw,varID,press_ref) + ! + status = nf90_inq_varid(ncid_lw,'temp_ref',varID) + status = nf90_get_var(ncid_lw,varID,temp_ref) + ! + status = nf90_inq_varid(ncid_lw,'absorption_coefficient_ref_P',varID) + status = nf90_get_var(ncid_lw,varID,temp_ref_p) + ! + status = nf90_inq_varid(ncid_lw,'absorption_coefficient_ref_T',varID) + status = nf90_get_var(ncid_lw,varID,temp_ref_t) + ! + status = nf90_inq_varid(ncid_lw,'press_ref_trop',varID) + status = nf90_get_var(ncid_lw,varID,press_ref_trop) + ! + status = nf90_inq_varid(ncid_lw,'kminor_lower',varID) + status = nf90_get_var(ncid_lw,varID,kminor_lower) + ! + status = nf90_inq_varid(ncid_lw,'kminor_upper',varID) + status = nf90_get_var(ncid_lw,varID,kminor_upper) + ! + status = nf90_inq_varid(ncid_lw,'vmr_ref',varID) + status = nf90_get_var(ncid_lw,varID,vmr_ref) + ! + status = nf90_inq_varid(ncid_lw,'kmajor',varID) + status = nf90_get_var(ncid_lw,varID,kmajor) + ! + status = nf90_inq_varid(ncid_lw,'kminor_start_lower',varID) + status = nf90_get_var(ncid_lw,varID,kminor_start_lower) + ! + status = nf90_inq_varid(ncid_lw,'kminor_start_upper',varID) + status = nf90_get_var(ncid_lw,varID,kminor_start_upper) + ! + status = nf90_inq_varid(ncid_lw,'totplnk',varID) + status = nf90_get_var(ncid_lw,varID,totplnk) + ! + status = nf90_inq_varid(ncid_lw,'plank_fraction',varID) + status = nf90_get_var(ncid_lw,varID,planck_frac) + + ! Logical fields are read in as integers and then converted to logicals. + status = nf90_inq_varid(ncid_lw,'minor_scales_with_density_lower',varID) + status = nf90_get_var(ncid_lw,varID,temp1) + minor_scales_with_density_lower(:) = .false. + where(temp1 .eq. 1) minor_scales_with_density_lower(:) = .true. + ! + status = nf90_inq_varid(ncid_lw,'minor_scales_with_density_upper',varID) + status = nf90_get_var(ncid_lw,varID,temp2) + minor_scales_with_density_upper(:) = .false. + where(temp2 .eq. 1) minor_scales_with_density_upper(:) = .true. + ! + status = nf90_inq_varid(ncid_lw,'scale_by_complement_lower',varID) + status = nf90_get_var(ncid_lw,varID,temp3) + scale_by_complement_lower(:) = .false. + where(temp3 .eq. 1) scale_by_complement_lower(:) = .true. + ! + status = nf90_inq_varid(ncid_lw,'scale_by_complement_upper',varID) + status = nf90_get_var(ncid_lw,varID,temp4) + scale_by_complement_upper(:) = .false. + where(temp4 .eq. 1) scale_by_complement_upper(:) = .true. + + ! Close + status = nf90_close(ncid_lw) + endif + endif + + ! Broadcast arrays to all processors +#ifdef MPI + call MPI_BCAST(minor_limits_gpt_upper, size(minor_limits_gpt_upper), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(minor_limits_gpt_lower, size(minor_limits_gpt_lower), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(kminor_start_upper, size(kminor_start_upper), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(kminor_start_lower, size(kminor_start_lower), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(key_species, size(key_species), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(band2gpt, size(band2gpt), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(band_lims, size(band_lims), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(press_ref, size(press_ref), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(temp_ref, size(temp_ref), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(kminor_lower, size(kminor_lower), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(kminor_upper, size(kminor_upper), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(scaling_gas_lower, size(scaling_gas_lower), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(scaling_gas_upper, size(scaling_gas_upper), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(vmr_ref, size(vmr_ref), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(kmajor, size(kmajor), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(temp_ref_p, 1, kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(temp_ref_t, 1, kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(press_ref_trop, 1, kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(totplnk, size(totplnk), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(planck_frac, size(planck_frac), kind_phys, mpiroot, mpicomm, ierr) + ! Character arrays + do ij=1,nabsorbers + call MPI_BCAST(gas_names(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) + enddo + do ij=1,nminorabsorbers + call MPI_BCAST(gas_minor(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) + call MPI_BCAST(identifier_minor(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) + enddo + do ij=1,nminor_absorber_intervals_lower + call MPI_BCAST(minor_gases_lower(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) + enddo + do ij=1,nminor_absorber_intervals_upper + call MPI_BCAST(minor_gases_upper(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) + enddo + ! Logical arrays (First convert to integer-array, then broadcast) + ! + allocate(temp_log_array1(nminor_absorber_intervals_lower)) + where(minor_scales_with_density_lower) + temp_log_array1 = 1 + elsewhere + temp_log_array1 = 0 + end where + call MPI_BCAST(temp_log_array1, size(temp_log_array1), MPI_INTEGER, mpiroot, mpicomm, ierr) + ! + allocate(temp_log_array2(nminor_absorber_intervals_lower)) + where(scale_by_complement_lower) + temp_log_array2 = 1 + elsewhere + temp_log_array2 = 0 + end where + call MPI_BCAST(temp_log_array2, size(temp_log_array2), MPI_INTEGER, mpiroot, mpicomm, ierr) + ! + allocate(temp_log_array3(nminor_absorber_intervals_upper)) + where(minor_scales_with_density_upper) + temp_log_array3 = 1 + elsewhere + temp_log_array3 = 0 + end where + call MPI_BCAST(temp_log_array3, size(temp_log_array3), MPI_INTEGER, mpiroot, mpicomm, ierr) + ! + allocate(temp_log_array4(nminor_absorber_intervals_upper)) + where(scale_by_complement_upper) + temp_log_array4 = 1 + elsewhere + temp_log_array4 = 0 + end where + call MPI_BCAST(temp_log_array4, size(temp_log_array4), MPI_INTEGER, mpiroot, mpicomm, ierr) +#endif + + ! Initialize gas concentrations and gas optics class with data + do iGas=1,nGases + call check_error_msg('lw_gas_optics_init',gas_concentrations%set_vmr(active_gases(iGas), 0._kind_phys)) + enddo + call check_error_msg('lw_gas_optics_init',lw_gas_props%load(gas_concentrations, gas_names, & + key_species, band2gpt, band_lims, press_ref, press_ref_trop, temp_ref, temp_ref_p, & + temp_ref_t, vmr_ref, kmajor, kminor_lower, kminor_upper, gas_minor,identifier_minor, & + minor_gases_lower, minor_gases_upper, minor_limits_gpt_lower, minor_limits_gpt_upper, & + minor_scales_with_density_lower, minor_scales_with_density_upper, scaling_gas_lower, & + scaling_gas_upper, scale_by_complement_lower, scale_by_complement_upper, & + kminor_start_lower, kminor_start_upper, totplnk, planck_frac, rayl_lower, rayl_upper)) + + ! Set initial permutation seed for McICA, initially set to number of G-points + ipsdlw0 = lw_gas_props%get_ngpt() + + end subroutine lw_gas_optics_init + + ! ######################################################################################### + ! SUBROUTINE sw_gas_optics_init + ! ######################################################################################### + subroutine sw_gas_optics_init(Model,mpicomm, mpirank, mpiroot, sw_gas_props, & + errmsg, errflg) + use netcdf +#ifdef MPI + use mpi +#endif + + ! Inputs + type(GFS_control_type), intent(in) :: & + Model ! DDT containing model control parameters + integer,intent(in) :: & + mpicomm, & ! MPI communicator + mpirank, & ! Current MPI rank + mpiroot ! Master MPI rank + type(ty_gas_optics_rrtmgp),intent(inout) :: & + sw_gas_props + + ! Outputs + character(len=*), intent(out) :: & + errmsg ! Error message + integer, intent(out) :: & + errflg ! Error code + + ! Fields from the K-distribution files + ! Variables that will be passed to gas_optics%load() + type(ty_gas_concs) :: & + gas_concentrations + integer, dimension(:), allocatable :: & + kminor_start_lower_sw, & ! used by RRTGMP gas optics + kminor_start_upper_sw ! used by RRTGMP gas optics + integer, dimension(:,:), allocatable :: & + band2gpt_sw, & ! used by RRTGMP gas optics + minor_limits_gpt_lower_sw, & ! used by RRTGMP gas optics + minor_limits_gpt_upper_sw ! used by RRTGMP gas optics + integer, dimension(:,:,:), allocatable :: & + key_species_sw ! used by RRTGMP gas optics + real(kind_phys) :: & + press_ref_trop_sw, & ! used by RRTGMP gas optics + temp_ref_p_sw, & ! used by RRTGMP gas optics + temp_ref_t_sw ! used by RRTGMP gas optics + real(kind_phys), dimension(:), allocatable :: & + press_ref_sw, & ! used by RRTGMP gas optics + temp_ref_sw, & ! used by RRTGMP gas optics + solar_source_sw ! used by RRTGMP gas optics + real(kind_phys), dimension(:,:), allocatable :: & + band_lims_sw ! used by RRTGMP gas optics + + real(kind_phys), dimension(:,:,:), allocatable :: & + vmr_ref_sw, & ! used by RRTGMP gas optics + kminor_lower_sw, & ! used by RRTGMP gas optics + kminor_upper_sw, & ! used by RRTGMP gas optics + rayl_lower_sw, & ! used by RRTGMP gas optics + rayl_upper_sw ! used by RRTGMP gas optics + real(kind_phys), dimension(:,:,:,:), allocatable :: & + kmajor_sw ! used by RRTGMP gas optics + character(len=32), dimension(:), allocatable :: & + gas_names_sw, & ! used by RRTGMP gas optics + gas_minor_sw, & ! used by RRTGMP gas optics + identifier_minor_sw, & ! used by RRTGMP gas optics + minor_gases_lower_sw, & ! used by RRTGMP gas optics + minor_gases_upper_sw, & ! used by RRTGMP gas optics + scaling_gas_lower_sw, & ! used by RRTGMP gas optics + scaling_gas_upper_sw ! used by RRTGMP gas optics + logical(wl), dimension(:), allocatable :: & + minor_scales_with_density_lower_sw, & ! used by RRTGMP gas optics + minor_scales_with_density_upper_sw, & ! used by RRTGMP gas optics + scale_by_complement_lower_sw, & ! used by RRTGMP gas optics + scale_by_complement_upper_sw ! used by RRTGMP gas optics + ! Dimensions (to be broadcast across all processors) + integer :: & + ntemps_sw, & ! used by RRTGMP gas optics + npress_sw, & ! used by RRTGMP gas optics + nabsorbers_sw, & ! used by RRTGMP gas optics + nextrabsorbers_sw, & ! used by RRTGMP gas optics + nminorabsorbers_sw, & ! used by RRTGMP gas optics + nmixingfracs_sw, & ! used by RRTGMP gas optics + nlayers_sw, & ! used by RRTGMP gas optics + nbnds_sw, & ! used by RRTGMP gas optics + ngpts_sw, & ! used by RRTGMP gas optics + npairs_sw, & ! used by RRTGMP gas optics + nminor_absorber_intervals_lower_sw, & ! used by RRTGMP gas optics + nminor_absorber_intervals_upper_sw, & ! used by RRTGMP gas optics + ncontributors_lower_sw, & ! used by RRTGMP gas optics + ncontributors_upper_sw ! used by RRTGMP gas optics + + ! Local variables + integer :: status,ncid_sw,ncid_sw_clds,dimid,varID,ij,iGas + integer,dimension(:),allocatable :: temp1,temp2,temp3,temp4,temp_log_array1,& + temp_log_array2, temp_log_array3, temp_log_array4 + character(len=264) :: sw_gas_props_file + + ! Initialize + errmsg = '' + errflg = 0 + + ! Filenames are set in the gfs_physics_nml (scm/src/GFS_typedefs.F90) + sw_gas_props_file = trim(Model%rrtmgp_root)//trim(Model%sw_file_gas) + + ! Read dimensions for k-distribution fields (only on master processor(0)) + if (mpirank .eq. mpiroot) then + if(nf90_open(trim(sw_gas_props_file), NF90_WRITE, ncid_sw) .eq. NF90_NOERR) then + status = nf90_inq_dimid(ncid_sw, 'temperature', dimid) + status = nf90_inquire_dimension(ncid_sw, dimid, len=ntemps_sw) + status = nf90_inq_dimid(ncid_sw, 'pressure', dimid) + status = nf90_inquire_dimension(ncid_sw, dimid, len=npress_sw) + status = nf90_inq_dimid(ncid_sw, 'absorber', dimid) + status = nf90_inquire_dimension(ncid_sw, dimid, len=nabsorbers_sw) + status = nf90_inq_dimid(ncid_sw, 'minor_absorber', dimid) + status = nf90_inquire_dimension(ncid_sw, dimid, len=nminorabsorbers_sw) + status = nf90_inq_dimid(ncid_sw, 'absorber_ext', dimid) + status = nf90_inquire_dimension(ncid_sw, dimid, len=nextrabsorbers_sw) + status = nf90_inq_dimid(ncid_sw, 'mixing_fraction', dimid) + status = nf90_inquire_dimension(ncid_sw, dimid, len=nmixingfracs_sw) + status = nf90_inq_dimid(ncid_sw, 'atmos_layer', dimid) + status = nf90_inquire_dimension(ncid_sw, dimid, len=nlayers_sw) + status = nf90_inq_dimid(ncid_sw, 'bnd', dimid) + status = nf90_inquire_dimension(ncid_sw, dimid, len=nbnds_sw) + status = nf90_inq_dimid(ncid_sw, 'gpt', dimid) + status = nf90_inquire_dimension(ncid_sw, dimid, len=ngpts_sw) + status = nf90_inq_dimid(ncid_sw, 'pair', dimid) + status = nf90_inquire_dimension(ncid_sw, dimid, len=npairs_sw) + status = nf90_inq_dimid(ncid_sw, 'contributors_lower', dimid) + status = nf90_inquire_dimension(ncid_sw, dimid, len=ncontributors_lower_sw) + status = nf90_inq_dimid(ncid_sw, 'contributors_upper', dimid) + status = nf90_inquire_dimension(ncid_sw, dimid, len=ncontributors_upper_sw) + status = nf90_inq_dimid(ncid_sw, 'minor_absorber_intervals_lower', dimid) + status = nf90_inquire_dimension(ncid_sw, dimid, len=nminor_absorber_intervals_lower_sw) + status = nf90_inq_dimid(ncid_sw, 'minor_absorber_intervals_upper', dimid) + status = nf90_inquire_dimension(ncid_sw, dimid, len=nminor_absorber_intervals_upper_sw) + status = nf90_close(ncid_sw) + endif + endif + + ! Broadcast dimensions to all processors +#ifdef MPI + call MPI_BCAST(ntemps_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(npress_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nabsorbers_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nminorabsorbers_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nextraabsorbers_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nmixingfracs_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nlayers_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nbnds_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(ngpts_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(npairs_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(ncontributors_lower_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(ncontributors_upper_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nminor_absorber_intervals_lower_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nminor_absorber_intervals_upper_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +#endif + + ! Allocate space for arrays + allocate(gas_names_sw(nabsorbers_sw)) + allocate(scaling_gas_lower_sw(nminor_absorber_intervals_lower_sw)) + allocate(scaling_gas_upper_sw(nminor_absorber_intervals_upper_sw)) + allocate(gas_minor_sw(nminorabsorbers_sw)) + allocate(identifier_minor_sw(nminorabsorbers_sw)) + allocate(minor_gases_lower_sw(nminor_absorber_intervals_lower_sw)) + allocate(minor_gases_upper_sw(nminor_absorber_intervals_upper_sw)) + allocate(minor_limits_gpt_lower_sw(npairs_sw,nminor_absorber_intervals_lower_sw)) + allocate(minor_limits_gpt_upper_sw(npairs_sw,nminor_absorber_intervals_upper_sw)) + allocate(band2gpt_sw(2,nbnds_sw)) + allocate(key_species_sw(2,nlayers_sw,nbnds_sw)) + allocate(band_lims_sw(2,nbnds_sw)) + allocate(press_ref_sw(npress_sw)) + allocate(temp_ref_sw(ntemps_sw)) + allocate(vmr_ref_sw(nlayers_sw, nextrabsorbers_sw, ntemps_sw)) + allocate(kminor_lower_sw(ncontributors_lower_sw, nmixingfracs_sw, ntemps_sw)) + allocate(kmajor_sw(ngpts_sw, nmixingfracs_sw, npress_sw+1, ntemps_sw)) + allocate(kminor_start_lower_sw(nminor_absorber_intervals_lower_sw)) + allocate(kminor_upper_sw(ncontributors_upper_sw, nmixingfracs_sw, ntemps_sw)) + allocate(kminor_start_upper_sw(nminor_absorber_intervals_upper_sw)) + allocate(minor_scales_with_density_lower_sw(nminor_absorber_intervals_lower_sw)) + allocate(minor_scales_with_density_upper_sw(nminor_absorber_intervals_upper_sw)) + allocate(scale_by_complement_lower_sw(nminor_absorber_intervals_lower_sw)) + allocate(scale_by_complement_upper_sw(nminor_absorber_intervals_upper_sw)) + allocate(rayl_upper_sw(ngpts_sw, nmixingfracs_sw, ntemps_sw)) + allocate(rayl_lower_sw(ngpts_sw, nmixingfracs_sw, ntemps_sw)) + allocate(solar_source_sw(ngpts_sw)) + allocate(temp1(nminor_absorber_intervals_lower_sw)) + allocate(temp2(nminor_absorber_intervals_upper_sw)) + allocate(temp3(nminor_absorber_intervals_lower_sw)) + allocate(temp4(nminor_absorber_intervals_upper_sw)) + + ! On master processor, read in fields, broadcast to all processors + if (mpirank .eq. mpiroot) then + ! Read in fields from file + if(nf90_open(trim(sw_gas_props_file), NF90_WRITE, ncid_sw) .eq. NF90_NOERR) then + status = nf90_inq_varid(ncid_sw,'gas_names',varID) + status = nf90_get_var(ncid_sw,varID,gas_names_sw) + ! + status = nf90_inq_varid(ncid_sw,'scaling_gas_lower',varID) + status = nf90_get_var(ncid_sw,varID,scaling_gas_lower_sw) + ! + status = nf90_inq_varid(ncid_sw,'scaling_gas_upper',varID) + status = nf90_get_var(ncid_sw,varID,scaling_gas_upper_sw) + ! + status = nf90_inq_varid(ncid_sw,'gas_minor',varID) + status = nf90_get_var(ncid_sw,varID,gas_minor_sw) + ! + status = nf90_inq_varid(ncid_sw,'identifier_minor',varID) + status = nf90_get_var(ncid_sw,varID,identifier_minor_sw) + ! + status = nf90_inq_varid(ncid_sw,'minor_gases_lower',varID) + status = nf90_get_var(ncid_sw,varID,minor_gases_lower_sw) + ! + status = nf90_inq_varid(ncid_sw,'minor_gases_upper',varID) + status = nf90_get_var(ncid_sw,varID,minor_gases_upper_sw) + ! + status = nf90_inq_varid(ncid_sw,'minor_limits_gpt_lower',varID) + status = nf90_get_var(ncid_sw,varID,minor_limits_gpt_lower_sw) + ! + status = nf90_inq_varid(ncid_sw,'minor_limits_gpt_upper',varID) + status = nf90_get_var(ncid_sw,varID,minor_limits_gpt_upper_sw) + ! + status = nf90_inq_varid(ncid_sw,'bnd_limits_gpt',varID) + status = nf90_get_var(ncid_sw,varID,band2gpt_sw) + ! + status = nf90_inq_varid(ncid_sw,'key_species',varID) + status = nf90_get_var(ncid_sw,varID,key_species_sw) + ! + status = nf90_inq_varid(ncid_sw,'bnd_limits_wavenumber',varID) + status = nf90_get_var(ncid_sw,varID,band_lims_sw) + ! + status = nf90_inq_varid(ncid_sw,'press_ref',varID) + status = nf90_get_var(ncid_sw,varID,press_ref_sw) + ! + status = nf90_inq_varid(ncid_sw,'temp_ref',varID) + status = nf90_get_var(ncid_sw,varID,temp_ref_sw) + ! + status = nf90_inq_varid(ncid_sw,'absorption_coefficient_ref_P',varID) + status = nf90_get_var(ncid_sw,varID,temp_ref_p_sw) + ! + status = nf90_inq_varid(ncid_sw,'absorption_coefficient_ref_T',varID) + status = nf90_get_var(ncid_sw,varID,temp_ref_t_sw) + ! + status = nf90_inq_varid(ncid_sw,'press_ref_trop',varID) + status = nf90_get_var(ncid_sw,varID,press_ref_trop_sw) + ! + status = nf90_inq_varid(ncid_sw,'kminor_lower',varID) + status = nf90_get_var(ncid_sw,varID,kminor_lower_sw) + ! + status = nf90_inq_varid(ncid_sw,'kminor_upper',varID) + status = nf90_get_var(ncid_sw,varID,kminor_upper_sw) + ! + status = nf90_inq_varid(ncid_sw,'vmr_ref',varID) + status = nf90_get_var(ncid_sw,varID,vmr_ref_sw) + ! + status = nf90_inq_varid(ncid_sw,'kmajor',varID) + status = nf90_get_var(ncid_sw,varID,kmajor_sw) + ! + status = nf90_inq_varid(ncid_sw,'kminor_start_lower',varID) + status = nf90_get_var(ncid_sw,varID,kminor_start_lower_sw) + ! + status = nf90_inq_varid(ncid_sw,'kminor_start_upper',varID) + status = nf90_get_var(ncid_sw,varID,kminor_start_upper_sw) + ! + status = nf90_inq_varid(ncid_sw,'solar_source',varID) + status = nf90_get_var(ncid_sw,varID,solar_source_sw) + ! + status = nf90_inq_varid(ncid_sw,'rayl_lower',varID) + status = nf90_get_var(ncid_sw,varID,rayl_lower_sw) + + status = nf90_inq_varid(ncid_sw,'rayl_upper',varID) + status = nf90_get_var(ncid_sw,varID,rayl_upper_sw) + + ! Logical fields are read in as integers and then converted to logicals. + status = nf90_inq_varid(ncid_sw,'minor_scales_with_density_lower',varID) + status = nf90_get_var(ncid_sw,varID,temp1) + minor_scales_with_density_lower_sw(:) = .false. + where(temp1 .eq. 1) minor_scales_with_density_lower_sw(:) = .true. + ! + status = nf90_inq_varid(ncid_sw,'minor_scales_with_density_upper',varID) + status = nf90_get_var(ncid_sw,varID,temp2) + minor_scales_with_density_upper_sw(:) = .false. + where(temp2 .eq. 1) minor_scales_with_density_upper_sw(:) = .true. + ! + status = nf90_inq_varid(ncid_sw,'scale_by_complement_lower',varID) + status = nf90_get_var(ncid_sw,varID,temp3) + scale_by_complement_lower_sw(:) = .false. + where(temp3 .eq. 1) scale_by_complement_lower_sw(:) = .true. + ! + status = nf90_inq_varid(ncid_sw,'scale_by_complement_upper',varID) + status = nf90_get_var(ncid_sw,varID,temp4) + scale_by_complement_upper_sw(:) = .false. + where(temp4 .eq. 1) scale_by_complement_upper_sw(:) = .true. + + ! Close + status = nf90_close(ncid_sw) + endif + endif + + ! Broadcast arrays to all processors +#ifdef MPI + call MPI_BCAST(minor_limits_gpt_upper_sw, size(minor_limits_gpt_upper_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(minor_limits_gpt_lower_sw, size(minor_limits_gpt_lower_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(kminor_start_upper_sw, size(kminor_start_upper_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(kminor_start_lower_sw, size(kminor_start_lower_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(key_species_sw, size(key_species_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(band2gpt_sw, size(band2gpt_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(band_lims_sw, size(band_lims_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(press_ref_sw, size(press_ref_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(temp_ref_sw, size(temp_ref_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(kminor_lower_sw, size(kminor_lower_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(kminor_upper_sw, size(kminor_upper_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(scaling_gas_lower_sw, size(scaling_gas_lower_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(scaling_gas_upper_sw, size(scaling_gas_upper_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(vmr_ref_sw, size(vmr_ref_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(kmajor_sw, size(kmajor_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(temp_ref_p_sw, 1, kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(temp_ref_t_sw, 1, kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(press_ref_trop_sw, 1, kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(solar_source_sw, size(solar_source_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(rayl_lower_sw, size(rayl_lower_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(rayl_upper_sw, size(rayl_upper_sw), kind_phys, mpiroot, mpicomm, ierr) + ! Character arrays + do ij=1,nabsorbers_sw + call MPI_BCAST(gas_names_sw(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) + enddo + do ij=1,nminorabsorbers_sw + call MPI_BCAST(gas_minor_sw(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) + call MPI_BCAST(identifier_minor_sw(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) + enddo + do ij=1,nminor_absorber_intervals_lower_sw + call MPI_BCAST(minor_gases_lower_sw(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) + enddo + do ij=1,nminor_absorber_intervals_upper_sw + call MPI_BCAST(minor_gases_upper_sw(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) + enddo + ! Logical arrays (First convert to integer-array, then broadcast) + ! + allocate(temp_log_array1(nminor_absorber_intervals_lower_sw)) + where(minor_scales_with_density_lower_sw) + temp_log_array1 = 1 + elsewhere + temp_log_array1 = 0 + end where + call MPI_BCAST(temp_log_array1, size(temp_log_array1), MPI_INTEGER, mpiroot, mpicomm, ierr) + ! + allocate(temp_log_array2(nminor_absorber_intervals_lower_sw)) + where(scale_by_complement_lower_sw) + temp_log_array2 = 1 + elsewhere + temp_log_array2 = 0 + end where + call MPI_BCAST(temp_log_array2, size(temp_log_array2), MPI_INTEGER, mpiroot, mpicomm, ierr) + ! + allocate(temp_log_array3(nminor_absorber_intervals_upper_sw)) + where(minor_scales_with_density_upper_sw) + temp_log_array3 = 1 + elsewhere + temp_log_array3 = 0 + end where + call MPI_BCAST(temp_log_array3, size(temp_log_array3), MPI_INTEGER, mpiroot, mpicomm, ierr) + ! + allocate(temp_log_array4(nminor_absorber_intervals_upper_sw)) + where(scale_by_complement_upper_sw) + temp_log_array4 = 1 + elsewhere + temp_log_array4 = 0 + end where + call MPI_BCAST(temp_log_array4, size(temp_log_array4), MPI_INTEGER, mpiroot, mpicomm, ierr) +#endif + + ! Initialize gas concentrations and gas optics class with data + do iGas=1,nGases + call check_error_msg('sw_gas_optics_init',gas_concentrations%set_vmr(active_gases(iGas), 0._kind_phys)) + enddo + call check_error_msg('sw_gas_optics_init',sw_gas_props%load(gas_concentrations, gas_names_sw, & + key_species_sw, band2gpt_sw, band_lims_sw, press_ref_sw, press_ref_trop_sw, temp_ref_sw, & + temp_ref_p_sw, temp_ref_t_sw, vmr_ref_sw, kmajor_sw, kminor_lower_sw, kminor_upper_sw, & + gas_minor_sw,identifier_minor_sw, minor_gases_lower_sw, minor_gases_upper_sw, & + minor_limits_gpt_lower_sw,minor_limits_gpt_upper_sw, minor_scales_with_density_lower_sw, & + minor_scales_with_density_upper_sw, scaling_gas_lower_sw, & + scaling_gas_upper_sw, scale_by_complement_lower_sw, & + scale_by_complement_upper_sw, kminor_start_lower_sw, kminor_start_upper_sw, & + solar_source_sw, rayl_lower_sw, rayl_upper_sw)) + + ! Set initial permutation seed for McICA, initially set to number of G-points + ipsdsw0 = sw_gas_props%get_ngpt() + + end subroutine sw_gas_optics_init + + ! ######################################################################################### + ! SUBROUTINE sw_cloud_optics_init + ! ######################################################################################### + subroutine sw_cloud_optics_init(Model,mpicomm, mpirank, mpiroot, sw_cloud_props, & + errmsg, errflg) + use netcdf +#ifdef MPI + use mpi +#endif + + ! Inputs + type(GFS_control_type), intent(in) :: & + Model ! DDT containing model control parameters + integer,intent(in) :: & + mpicomm, & ! MPI communicator + mpirank, & ! Current MPI rank + mpiroot ! Master MPI rank + type(ty_cloud_optics),intent(inout) :: & + sw_cloud_props + + ! Outputs + character(len=*), intent(out) :: & + errmsg ! Error message + integer, intent(out) :: & + errflg ! Error code + + ! Variables that will be passed to gas_optics%load() + real(kind_phys) :: & + radliq_lwr_sw, & ! used by RRTGMP cloud optics + radliq_upr_sw, & ! used by RRTGMP cloud optics + radliq_fac_sw, & ! used by RRTGMP cloud optics + radice_lwr_sw, & ! used by RRTGMP cloud optics + radice_upr_sw, & ! used by RRTGMP cloud optics + radice_fac_sw ! used by RRTGMP cloud optics + + real(kind_phys), dimension(:), allocatable :: & + pade_sizereg_extliq_sw, & ! used by RRTGMP cloud optics + pade_sizereg_ssaliq_sw, & ! used by RRTGMP cloud optics + pade_sizereg_asyliq_sw, & ! used by RRTGMP cloud optics + pade_sizereg_extice_sw, & ! used by RRTGMP cloud optics + pade_sizereg_ssaice_sw, & ! used by RRTGMP cloud optics + pade_sizereg_asyice_sw ! used by RRTGMP cloud optics + real(kind_phys), dimension(:,:), allocatable :: & + lut_extliq_sw, & ! used by RRTGMP cloud optics + lut_ssaliq_sw, & ! used by RRTGMP cloud optics + lut_asyliq_sw, & ! used by RRTGMP cloud optics + band_lims_cldy_sw ! used by RRTGMP cloud optics + + real(kind_phys), dimension(:,:,:), allocatable :: & + lut_extice_sw, & ! used by RRTGMP cloud optics + lut_ssaice_sw, & ! used by RRTGMP cloud optics + lut_asyice_sw, & ! used by RRTGMP cloud optics + pade_extliq_sw, & ! used by RRTGMP cloud optics + pade_ssaliq_sw, & ! used by RRTGMP cloud optics + pade_asyliq_sw ! used by RRTGMP cloud optics + real(kind_phys), dimension(:,:,:,:), allocatable :: & + pade_extice_sw, & ! used by RRTGMP cloud optics + pade_ssaice_sw, & ! used by RRTGMP cloud optics + pade_asyice_sw ! used by RRTGMP cloud optics + ! Dimensions (to be broadcast across all processors) + integer :: & + nbandSWcldy_sw, & ! used by RRTGMP cloud optics + nsize_liq_sw, & ! used by RRTGMP cloud optics + nsize_ice_sw, & ! used by RRTGMP cloud optics + nsizereg_sw, & ! used by RRTGMP cloud optics + ncoeff_ext_sw, & ! used by RRTGMP cloud optics + ncoeff_ssa_g_sw, & ! used by RRTGMP cloud optics + nbound_sw, & ! used by RRTGMP cloud optics + npairsSWcldy_sw ! used by RRTGMP cloud optics + + ! Local variables + integer :: status,ncid_sw,ncid_sw_clds,dimid,varID,ij,iGas + integer,dimension(:),allocatable :: temp1,temp2,temp3,temp4,temp_log_array1,& + temp_log_array2, temp_log_array3, temp_log_array4 + character(len=264) :: sw_cloud_props_file + + ! Initialize + errmsg = '' + errflg = 0 + + ! Filenames are set in the gfs_physics_nml (scm/src/GFS_typedefs.F90) + sw_cloud_props_file = trim(Model%rrtmgp_root)//trim(Model%sw_file_clouds) + + ! Read dimensions for k-distribution fields (only on master processor(0)) + if (mpirank .eq. mpiroot) then + if(nf90_open(trim(sw_cloud_props_file), NF90_WRITE, ncid_sw_clds) == NF90_NOERR) then + status = nf90_inq_dimid(ncid_sw_clds, 'nband', dimid) + status = nf90_inquire_dimension(ncid_sw_clds, dimid, len=nbandSWcldy_sw) + status = nf90_inq_dimid(ncid_sw_clds, 'nrghice', dimid) + status = nf90_inquire_dimension(ncid_sw_clds, dimid, len=nrghice_sw) + status = nf90_inq_dimid(ncid_sw_clds, 'nsize_liq', dimid) + status = nf90_inquire_dimension(ncid_sw_clds, dimid, len=nsize_liq_sw) + status = nf90_inq_dimid(ncid_sw_clds, 'nsize_ice', dimid) + status = nf90_inquire_dimension(ncid_sw_clds, dimid, len=nsize_ice_sw) + status = nf90_inq_dimid(ncid_sw_clds, 'nsizereg', dimid) + status = nf90_inquire_dimension(ncid_sw_clds, dimid, len=nsizereg_sw) + status = nf90_inq_dimid(ncid_sw_clds, 'ncoeff_ext', dimid) + status = nf90_inquire_dimension(ncid_sw_clds, dimid, len=ncoeff_ext_sw) + status = nf90_inq_dimid(ncid_sw_clds, 'ncoeff_ssa_g', dimid) + status = nf90_inquire_dimension(ncid_sw_clds, dimid, len=ncoeff_ssa_g_sw) + status = nf90_inq_dimid(ncid_sw_clds, 'nbound', dimid) + status = nf90_inquire_dimension(ncid_sw_clds, dimid, len=nbound_sw) + status = nf90_inq_dimid(ncid_sw_clds, 'pair', dimid) + status = nf90_inquire_dimension(ncid_sw_clds, dimid, len=npairsSWcldy_sw) + status = nf90_close(ncid_sw_clds) + endif + endif + + ! Broadcast dimensions to all processors +#ifdef MPI + if (Model%rrtmgp_cld_optics .eq. 1 .or. Model%rrtmgp_cld_optics .eq. 2) then + call MPI_BCAST(nbandSWcldy_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nrghice_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nsize_liq_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nsize_ice_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nsizereg_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(ncoeff_ext_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(ncoeff_ssa_g_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nbound_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(npairsSWcldy_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + endif +#endif + + if (Model%rrtmgp_cld_optics .eq. 1) then + allocate(lut_extliq_sw(nsize_liq_sw, nBandSWcldy_sw)) + allocate(lut_ssaliq_sw(nsize_liq_sw, nBandSWcldy_sw)) + allocate(lut_asyliq_sw(nsize_liq_sw, nBandSWcldy_sw)) + allocate(lut_extice_sw(nsize_ice_sw, nBandSWcldy_sw, nrghice_sw)) + allocate(lut_ssaice_sw(nsize_ice_sw, nBandSWcldy_sw, nrghice_sw)) + allocate(lut_asyice_sw(nsize_ice_sw, nBandSWcldy_sw, nrghice_sw)) + allocate(band_lims_cldy_sw(2, nBandSWcldy_sw)) + endif + if (Model%rrtmgp_cld_optics .eq. 2) then + allocate(pade_extliq_sw(nbandSWcldy_sw, nsizereg_sw, ncoeff_ext_sw )) + allocate(pade_ssaliq_sw(nbandSWcldy_sw, nsizereg_sw, ncoeff_ssa_g_sw)) + allocate(pade_asyliq_sw(nbandSWcldy_sw, nsizereg_sw, ncoeff_ssa_g_sw)) + allocate(pade_extice_sw(nbandSWcldy_sw, nsizereg_sw, ncoeff_ext_sw, nrghice_sw)) + allocate(pade_ssaice_sw(nbandSWcldy_sw, nsizereg_sw, ncoeff_ssa_g_sw, nrghice_sw)) + allocate(pade_asyice_sw(nbandSWcldy_sw, nsizereg_sw, ncoeff_ssa_g_sw, nrghice_sw)) + allocate(pade_sizereg_extliq_sw(nbound_sw)) + allocate(pade_sizereg_ssaliq_sw(nbound_sw)) + allocate(pade_sizereg_asyliq_sw(nbound_sw)) + allocate(pade_sizereg_extice_sw(nbound_sw)) + allocate(pade_sizereg_ssaice_sw(nbound_sw)) + allocate(pade_sizereg_asyice_sw(nbound_sw)) + allocate(band_lims_cldy_sw(2,nbandSWcldy_sw)) + endif + + ! On master processor, allocate space, read in fields, broadcast to all processors + if (mpirank .eq. mpiroot) then + ! + if (Model%rrtmgp_cld_optics .eq. 1) then + ! + if(nf90_open(trim(sw_cloud_props_file), NF90_WRITE, ncid_sw_clds) == NF90_NOERR) then + status = nf90_inq_varid(ncid_sw_clds,'radliq_lwr',varID) + status = nf90_get_var(ncid_sw_clds,varID,radliq_lwr_sw) + status = nf90_inq_varid(ncid_sw_clds,'radliq_upr',varID) + status = nf90_get_var(ncid_sw_clds,varID,radliq_upr_sw) + status = nf90_inq_varid(ncid_sw_clds,'radliq_fac',varID) + status = nf90_get_var(ncid_sw_clds,varID,radliq_fac_sw) + status = nf90_inq_varid(ncid_sw_clds,'radice_lwr',varID) + status = nf90_get_var(ncid_sw_clds,varID,radice_lwr_sw) + status = nf90_inq_varid(ncid_sw_clds,'radice_upr',varID) + status = nf90_get_var(ncid_sw_clds,varID,radice_upr_sw) + status = nf90_inq_varid(ncid_sw_clds,'radice_fac',varID) + status = nf90_get_var(ncid_sw_clds,varID,radice_fac_sw) + status = nf90_inq_varid(ncid_sw_clds,'lut_extliq',varID) + status = nf90_get_var(ncid_sw_clds,varID,lut_extliq_sw) + status = nf90_inq_varid(ncid_sw_clds,'lut_ssaliq',varID) + status = nf90_get_var(ncid_sw_clds,varID,lut_ssaliq_sw) + status = nf90_inq_varid(ncid_sw_clds,'lut_asyliq',varID) + status = nf90_get_var(ncid_sw_clds,varID,lut_asyliq_sw) + status = nf90_inq_varid(ncid_sw_clds,'lut_extice',varID) + status = nf90_get_var(ncid_sw_clds,varID,lut_extice_sw) + status = nf90_inq_varid(ncid_sw_clds,'lut_ssaice',varID) + status = nf90_get_var(ncid_sw_clds,varID,lut_ssaice_sw) + status = nf90_inq_varid(ncid_sw_clds,'lut_asyice',varID) + status = nf90_get_var(ncid_sw_clds,varID,lut_asyice_sw) + status = nf90_inq_varid(ncid_sw_clds,'bnd_limits_wavenumber',varID) + status = nf90_get_var(ncid_sw_clds,varID,band_lims_cldy_sw) + status = nf90_close(ncid_sw_clds) + endif + endif + ! + if (Model%rrtmgp_cld_optics .eq. 2) then + ! + if(nf90_open(trim(sw_cloud_props_file), NF90_WRITE, ncid_sw_clds) == NF90_NOERR) then + status = nf90_inq_varid(ncid_sw_clds,'radliq_lwr',varID) + status = nf90_get_var(ncid_sw_clds,varID,radliq_lwr_sw) + status = nf90_inq_varid(ncid_sw_clds,'radliq_upr',varID) + status = nf90_get_var(ncid_sw_clds,varID,radliq_upr_sw) + status = nf90_inq_varid(ncid_sw_clds,'radliq_fac',varID) + status = nf90_get_var(ncid_sw_clds,varID,radliq_fac_sw) + status = nf90_inq_varid(ncid_sw_clds,'radice_lwr',varID) + status = nf90_get_var(ncid_sw_clds,varID,radice_lwr_sw) + status = nf90_inq_varid(ncid_sw_clds,'radice_upr',varID) + status = nf90_get_var(ncid_sw_clds,varID,radice_upr_sw) + status = nf90_inq_varid(ncid_sw_clds,'radice_fac',varID) + status = nf90_get_var(ncid_sw_clds,varID,radice_fac_sw) + status = nf90_inq_varid(ncid_sw_clds,'pade_extliq',varID) + status = nf90_get_var(ncid_sw_clds,varID,pade_extliq_sw) + status = nf90_inq_varid(ncid_sw_clds,'pade_ssaliq',varID) + status = nf90_get_var(ncid_sw_clds,varID,pade_ssaliq_sw) + status = nf90_inq_varid(ncid_sw_clds,'pade_asyliq',varID) + status = nf90_get_var(ncid_sw_clds,varID,pade_asyliq_sw) + status = nf90_inq_varid(ncid_sw_clds,'pade_extice',varID) + status = nf90_get_var(ncid_sw_clds,varID,pade_extice_sw) + status = nf90_inq_varid(ncid_sw_clds,'pade_ssaice',varID) + status = nf90_get_var(ncid_sw_clds,varID,pade_ssaice_sw) + status = nf90_inq_varid(ncid_sw_clds,'pade_asyice',varID) + status = nf90_get_var(ncid_sw_clds,varID,pade_asyice_sw) + status = nf90_inq_varid(ncid_sw_clds,'pade_sizreg_extliq',varID) + status = nf90_get_var(ncid_sw_clds,varID,pade_sizereg_extliq_sw) + status = nf90_inq_varid(ncid_sw_clds,'pade_sizreg_ssaliq',varID) + status = nf90_get_var(ncid_sw_clds,varID,pade_sizereg_ssaliq_sw) + status = nf90_inq_varid(ncid_sw_clds,'pade_sizreg_asyliq',varID) + status = nf90_get_var(ncid_sw_clds,varID,pade_sizereg_asyliq_sw) + status = nf90_inq_varid(ncid_sw_clds,'pade_sizreg_extice',varID) + status = nf90_get_var(ncid_sw_clds,varID,pade_sizereg_extice_sw) + status = nf90_inq_varid(ncid_sw_clds,'pade_sizreg_ssaice',varID) + status = nf90_get_var(ncid_sw_clds,varID,pade_sizereg_ssaice_sw) + status = nf90_inq_varid(ncid_sw_clds,'pade_sizreg_asyice',varID) + status = nf90_get_var(ncid_sw_clds,varID,pade_sizereg_asyice_sw) + status = nf90_inq_varid(ncid_sw_clds,'bnd_limits_wavenumber',varID) + status = nf90_get_var(ncid_sw_clds,varID,band_lims_cldy_sw) + status = nf90_close(ncid_sw_clds) + endif + endif + endif + + ! Broadcast arrays to all processors +#ifdef MPI + if (Model%rrtmgp_cld_optics .eq. 1) then + call MPI_BCAST(radliq_lwr_sw, size(radliq_lwr_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(radliq_upr_sw, size(radliq_upr_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(radliq_fac_sw, size(radliq_fac_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(radice_lwr_sw, size(radice_lwr_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(radice_upr_sw, size(radice_upr_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(radice_fac_sw, size(radice_fac_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_extliq_sw, size(lut_extliq_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_ssaliq_sw, size(lut_ssaliq_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_asyliq_sw, size(lut_asyliq_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_extice_sw, size(lut_extice_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_ssaice_sw, size(lut_ssaice_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_asyice_sw, size(lut_asyice_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(band_lims_cldy_sw), size(band_lims_cldy_sw), kind_phys, mpiroot, mpicomm, ierr) + endif + if (Model%rrtmgp_cld_optics .eq. 2) then + call MPI_BCAST(pade_extliq_sw, size(pade_extliq_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_ssaliq_sw, size(pade_ssaliq_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_asyliq_sw, size(pade_asyliq_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_extice_sw, size(pade_extice_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_ssaice_sw, size(pade_ssaice_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_asyice_sw, size(pade_asyice_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_extliq_sw), size(pade_sizereg_extliq_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_ssaliq_sw), size(pade_sizereg_ssaliq_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_asyliq_sw), size(pade_sizereg_asyliq_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_extice_sw), size(pade_sizereg_extice_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_ssaice_sw), size(pade_sizereg_ssaice_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_asyice_sw), size(pade_sizereg_asyice_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(band_lims_cldy_sw), size(band_lims_cldy_sw), kind_phys, mpiroot, mpicomm, ierr) + endif +#endif + + ! Load tables data for RRTGMP cloud-optics + if (Model%rrtmgp_cld_optics .eq. 1) then + call check_error_msg('sw_cloud_optics_init',sw_cloud_props%set_ice_roughness(nrghice_sw)) + call check_error_msg('sw_cloud_optics_init',sw_cloud_props%load(band_lims_cldy_sw, & + radliq_lwr_sw, radliq_upr_sw, radliq_fac_sw, radice_lwr_sw, radice_upr_sw, & + radice_fac_sw, lut_extliq_sw, lut_ssaliq_sw, lut_asyliq_sw, lut_extice_sw, & + lut_ssaice_sw, lut_asyice_sw)) + endif + if (Model%rrtmgp_cld_optics .eq. 2) then + call check_error_msg('sw_cloud_optics_init',sw_cloud_props%set_ice_roughness(nrghice_sw)) + call check_error_msg('sw_cloud_optics_init', sw_cloud_props%load(band_lims_cldy_sw, & + pade_extliq_sw, pade_ssaliq_sw, pade_asyliq_sw, pade_extice_sw, pade_ssaice_sw, & + pade_asyice_sw, pade_sizereg_extliq_sw, pade_sizereg_ssaliq_sw, & + pade_sizereg_asyliq_sw, pade_sizereg_extice_sw, pade_sizereg_ssaice_sw, & + pade_sizereg_asyice_sw)) + endif + + end subroutine sw_cloud_optics_init + + ! ######################################################################################### + ! SUBROUTINE check_error_msg + ! ######################################################################################### + subroutine check_error_msg(routine_name, error_msg) + character(len=*), intent(in) :: & + error_msg, routine_name + + if(error_msg /= "") then + print*,"ERROR("//trim(routine_name)//"): " + print*,trim(error_msg) + return + end if + end subroutine check_error_msg +end module rrtmgp_aux diff --git a/physics/rrtmgp_lw.F90 b/physics/rrtmgp_lw.F90 index c70f8bec1..e94ad41a8 100644 --- a/physics/rrtmgp_lw.F90 +++ b/physics/rrtmgp_lw.F90 @@ -10,37 +10,26 @@ module rrtmgp_lw use mo_rrtmgp_clr_all_sky, only: rte_lw use mo_gas_concentrations, only: ty_gas_concs use mo_fluxes_byband, only: ty_fluxes_byband - - ! Parameters - integer,parameter :: nGases = 6 - real(kind_phys),parameter :: epsilon=1.0e-6 - character(len=3),parameter, dimension(nGases) :: & - active_gases = (/ 'h2o', 'co2', 'o3 ', 'n2o', 'ch4', 'o2 '/) - integer :: nrghice, ipsdlw0 + use rrtmgp_aux, only: lw_gas_optics_init, lw_cloud_optics_init, check_error_msg public rrtmgp_lw_init, rrtmgp_lw_run, rrtmgp_lw_finalize contains !! \section arg_table_rrtmgp_lw_init Argument Table -!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | -!! |--------------------|-------------------------------------------------|---------------------------------------------------------------------------|-------|------|----------------------|-----------|--------|----------| -!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | -!! | mpirank | mpi_rank | current MPI rank | index | 0 | integer | | in | F | -!! | mpiroot | mpi_root | master MPI rank | index | 0 | integer | | in | F | -!! | mpicomm | mpi_comm | MPI communicator | index | 0 | integer | | in | F | -!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | -!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | -!! | kdist_lw | K_distribution_file_for_RRTMGP_LW_scheme | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | inout | F | -!! | kdist_cldy_lw | K_distribution_file_for_cloudy_RRTMGP_LW_scheme | DDT containing spectral information for cloudy RRTMGP LW radiation scheme | DDT | 0 | ty_cloud_optics | | inout | F | +!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | +!! |----------------|----------------------------------|---------------------------------------------------------------------------|-------|------|----------------------|-----------|--------|----------| +!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | +!! | mpirank | mpi_rank | current MPI rank | index | 0 | integer | | in | F | +!! | mpiroot | mpi_root | master MPI rank | index | 0 | integer | | in | F | +!! | mpicomm | mpi_comm | MPI communicator | index | 0 | integer | | in | F | +!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | +!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! | lw_gas_props | coefficients_for_lw_gas_optics | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | inout | F | +!! | lw_cloud_props | coefficients_for_lw_cloud_optics | DDT containing spectral information for cloudy RRTMGP LW radiation scheme | DDT | 0 | ty_cloud_optics | | inout | F | !! ! ######################################################################################### - subroutine rrtmgp_lw_init(Model, mpicomm, mpirank, mpiroot, kdist_lw, kdist_cldy_lw, & + subroutine rrtmgp_lw_init(Model, mpicomm, mpirank, mpiroot, lw_gas_props, lw_cloud_props, & errmsg, errflg) - use netcdf - -#ifdef MPI - use mpi -#endif ! Inputs type(GFS_control_type), intent(in) :: & @@ -50,9 +39,9 @@ subroutine rrtmgp_lw_init(Model, mpicomm, mpirank, mpiroot, kdist_lw, kdist_cldy mpirank, & ! Current MPI rank mpiroot ! Master MPI rank type(ty_gas_optics_rrtmgp),intent(inout) :: & - kdist_lw + lw_gas_props type(ty_cloud_optics),intent(inout) :: & - kdist_cldy_lw + lw_cloud_props ! Outputs character(len=*), intent(out) :: & @@ -60,599 +49,12 @@ subroutine rrtmgp_lw_init(Model, mpicomm, mpirank, mpiroot, kdist_lw, kdist_cldy integer, intent(out) :: & errflg ! Error code - ! Variables that will be passed to gas_optics%load() - type(ty_gas_concs) :: & - gas_concentrations - integer, dimension(:), allocatable :: & - kminor_start_lower, & ! used by RRTGMP gas optics - kminor_start_upper ! used by RRTGMP gas optics - integer, dimension(:,:), allocatable :: & - band2gpt, & ! used by RRTGMP gas optics - minor_limits_gpt_lower, & ! used by RRTGMP gas optics - minor_limits_gpt_upper ! used by RRTGMP gas optics - integer, dimension(:,:,:), allocatable :: & - key_species ! used by RRTGMP gas optics - real(kind_phys) :: & - press_ref_trop, & ! used by RRTGMP gas optics - temp_ref_p, & ! used by RRTGMP gas optics - temp_ref_t, & ! used by RRTGMP gas optics - radliq_lwr, & ! used by RRTGMP cloud optics - radliq_upr, & ! used by RRTGMP cloud optics - radliq_fac, & ! used by RRTGMP cloud optics - radice_lwr, & ! used by RRTGMP cloud optics - radice_upr, & ! used by RRTGMP cloud optics - radice_fac ! used by RRTGMP cloud optics - real(kind_phys), dimension(:), allocatable :: & - press_ref, & ! used by RRTGMP gas optics - temp_ref, & ! used by RRTGMP gas optics - pade_sizereg_extliq, & ! used by RRTGMP cloud optics - pade_sizereg_ssaliq, & ! used by RRTGMP cloud optics - pade_sizereg_asyliq, & ! used by RRTGMP cloud optics - pade_sizereg_extice, & ! used by RRTGMP cloud optics - pade_sizereg_ssaice, & ! used by RRTGMP cloud optics - pade_sizereg_asyice ! used by RRTGMP cloud optics - real(kind_phys), dimension(:,:), allocatable :: & - band_lims, & ! used by RRTGMP gas optics - totplnk, & ! used by RRTGMP gas optics - lut_extliq, & ! used by RRTGMP cloud optics - lut_ssaliq, & ! used by RRTGMP cloud optics - lut_asyliq, & ! used by RRTGMP cloud optics - band_lims_cldy ! used by RRTGMP cloud optics - - real(kind_phys), dimension(:,:,:), allocatable :: & - vmr_ref, & ! used by RRTGMP gas optics - kminor_lower, & ! used by RRTGMP gas optics - kminor_upper, & ! used by RRTGMP gas optics - rayl_lower, & ! used by RRTGMP gas optics - rayl_upper, & ! used by RRTGMP gas optics - lut_extice, & ! used by RRTGMP cloud optics - lut_ssaice, & ! used by RRTGMP cloud optics - lut_asyice, & ! used by RRTGMP cloud optics - pade_extliq, & ! used by RRTGMP cloud optics - pade_ssaliq, & ! used by RRTGMP cloud optics - pade_asyliq ! used by RRTGMP cloud optics - real(kind_phys), dimension(:,:,:,:), allocatable :: & - kmajor, & ! used by RRTGMP gas optics - planck_frac, & ! used by RRTGMP gas optics - pade_extice, & ! used by RRTGMP cloud optics - pade_ssaice, & ! used by RRTGMP cloud optics - pade_asyice ! used by RRTGMP cloud optics - character(len=32), dimension(:), allocatable :: & - gas_names, & ! used by RRTGMP gas optics - gas_minor, & ! used by RRTGMP gas optics - identifier_minor, & ! used by RRTGMP gas optics - minor_gases_lower, & ! used by RRTGMP gas optics - minor_gases_upper, & ! used by RRTGMP gas optics - scaling_gas_lower, & ! used by RRTGMP gas optics - scaling_gas_upper ! used by RRTGMP gas optics - logical(wl), dimension(:), allocatable :: & - minor_scales_with_density_lower, & ! used by RRTGMP gas optics - minor_scales_with_density_upper, & ! used by RRTGMP gas optics - scale_by_complement_lower, & ! used by RRTGMP gas optics - scale_by_complement_upper ! used by RRTGMP gas optics - - ! Dimensions (to be broadcast across all processors) - integer :: & - ntemps, & ! used by RRTGMP gas optics - npress, & ! used by RRTGMP gas optics - nabsorbers, & ! used by RRTGMP gas optics - nextrabsorbers, & ! used by RRTGMP gas optics - nminorabsorbers, & ! used by RRTGMP gas optics - nmixingfracs, & ! used by RRTGMP gas optics - nlayers, & ! used by RRTGMP gas optics - nbnds, & ! used by RRTGMP gas optics - ngpts, & ! used by RRTGMP gas optics - npairs, & ! used by RRTGMP gas optics - ninternalSourcetemps, & ! used by RRTGMP gas optics - nminor_absorber_intervals_lower, & ! used by RRTGMP gas optics - nminor_absorber_intervals_upper, & ! used by RRTGMP gas optics - ncontributors_lower, & ! used by RRTGMP gas optics - ncontributors_upper, & ! used by RRTGMP gas optics - nbandLWcldy, & ! used by RRTGMP cloud optics - nsize_liq, & ! used by RRTGMP cloud optics - nsize_ice, & ! used by RRTGMP cloud optics - nsizereg, & ! used by RRTGMP cloud optics - ncoeff_ext, & ! used by RRTGMP cloud optics - ncoeff_ssa_g, & ! used by RRTGMP cloud optics - nbound, & ! used by RRTGMP cloud optics - npairsLWcldy ! used by RRTGMP cloud optics - - ! Local variables - integer :: ncid_lw,dimID,varID,status,igpt,iGas,ij,ierr,ncid_lw_clds - integer,dimension(:),allocatable :: temp1,temp2,temp3,temp4,temp_log_array1,& - temp_log_array2, temp_log_array3, temp_log_array4 - character(len=264) :: kdist_file,kdist_cldy_file - integer,parameter :: max_strlen=256 - - ! Initialize - errmsg = '' - errflg = 0 + ! Load gas-optics + call lw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, lw_gas_props, errmsg, errflg) - ! How are we handling cloud-optics? - rrtmgp_lw_cld_phys = Model%rrtmgp_cld_phys - - ! Filenames are set in the gfs_physics_nml (scm/src/GFS_typedefs.F90) - kdist_file = trim(Model%rrtmgp_root)//trim(Model%kdist_lw_file_gas) - kdist_cldy_file = trim(Model%rrtmgp_root)//trim(Model%kdist_lw_file_clouds) - - ! Read dimensions for k-distribution fields (only on master processor(0)) - if (mpirank .eq. mpiroot) then - if(nf90_open(trim(kdist_file), NF90_WRITE, ncid_lw) .eq. NF90_NOERR) then - status = nf90_inq_dimid(ncid_lw, 'temperature', dimid) - status = nf90_inquire_dimension(ncid_lw, dimid, len=ntemps) - status = nf90_inq_dimid(ncid_lw, 'pressure', dimid) - status = nf90_inquire_dimension(ncid_lw, dimid, len=npress) - status = nf90_inq_dimid(ncid_lw, 'absorber', dimid) - status = nf90_inquire_dimension(ncid_lw, dimid, len=nabsorbers) - status = nf90_inq_dimid(ncid_lw, 'minor_absorber', dimid) - status = nf90_inquire_dimension(ncid_lw, dimid, len=nminorabsorbers) - status = nf90_inq_dimid(ncid_lw, 'absorber_ext', dimid) - status = nf90_inquire_dimension(ncid_lw, dimid, len=nextrabsorbers) - status = nf90_inq_dimid(ncid_lw, 'mixing_fraction', dimid) - status = nf90_inquire_dimension(ncid_lw, dimid, len=nmixingfracs) - status = nf90_inq_dimid(ncid_lw, 'atmos_layer', dimid) - status = nf90_inquire_dimension(ncid_lw, dimid, len=nlayers) - status = nf90_inq_dimid(ncid_lw, 'bnd', dimid) - status = nf90_inquire_dimension(ncid_lw, dimid, len=nbnds) - status = nf90_inq_dimid(ncid_lw, 'gpt', dimid) - status = nf90_inquire_dimension(ncid_lw, dimid, len=ngpts) - status = nf90_inq_dimid(ncid_lw, 'pair', dimid) - status = nf90_inquire_dimension(ncid_lw, dimid, len=npairs) - status = nf90_inq_dimid(ncid_lw, 'contributors_lower', dimid) - status = nf90_inquire_dimension(ncid_lw, dimid, len=ncontributors_lower) - status = nf90_inq_dimid(ncid_lw, 'contributors_upper', dimid) - status = nf90_inquire_dimension(ncid_lw, dimid, len=ncontributors_upper) - status = nf90_inq_dimid(ncid_lw, 'minor_absorber_intervals_lower', dimid) - status = nf90_inquire_dimension(ncid_lw, dimid, len=nminor_absorber_intervals_lower) - status = nf90_inq_dimid(ncid_lw, 'minor_absorber_intervals_upper', dimid) - status = nf90_inquire_dimension(ncid_lw, dimid, len=nminor_absorber_intervals_upper) - status = nf90_inq_dimid(ncid_lw, 'temperature_Planck', dimid) - status = nf90_inquire_dimension(ncid_lw, dimid, len=ninternalSourcetemps) - status = nf90_close(ncid_lw) - endif - endif - - ! Broadcast dimensions to all processors -#ifdef MPI - call MPI_BCAST(ntemps, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(npress, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nminorabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nextraabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nmixingfracs, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nlayers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nbnds, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(ngpts, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(npairs, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(ncontributors_lower, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(ncontributors_upper, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nminor_absorber_intervals_lower, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nminor_absorber_intervals_upper, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(ninternalSourcetemps, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -#endif - - !if (mpirank .eq. mpiroot) then - ! Allocate space for arrays - allocate(gas_names(nabsorbers)) - allocate(scaling_gas_lower(nminor_absorber_intervals_lower)) - allocate(scaling_gas_upper(nminor_absorber_intervals_upper)) - allocate(gas_minor(nminorabsorbers)) - allocate(identifier_minor(nminorabsorbers)) - allocate(minor_gases_lower(nminor_absorber_intervals_lower)) - allocate(minor_gases_upper(nminor_absorber_intervals_upper)) - allocate(minor_limits_gpt_lower(npairs,nminor_absorber_intervals_lower)) - allocate(minor_limits_gpt_upper(npairs,nminor_absorber_intervals_upper)) - allocate(band2gpt(2,nbnds)) - allocate(key_species(2,nlayers,nbnds)) - allocate(band_lims(2,nbnds)) - allocate(press_ref(npress)) - allocate(temp_ref(ntemps)) - allocate(vmr_ref(nlayers, nextrabsorbers, ntemps)) - allocate(kminor_lower(ncontributors_lower, nmixingfracs, ntemps)) - allocate(kmajor(ngpts, nmixingfracs, npress+1, ntemps)) - allocate(kminor_start_lower(nminor_absorber_intervals_lower)) - allocate(kminor_upper(ncontributors_upper, nmixingfracs, ntemps)) - allocate(kminor_start_upper(nminor_absorber_intervals_upper)) - allocate(minor_scales_with_density_lower(nminor_absorber_intervals_lower)) - allocate(minor_scales_with_density_upper(nminor_absorber_intervals_upper)) - allocate(scale_by_complement_lower(nminor_absorber_intervals_lower)) - allocate(scale_by_complement_upper(nminor_absorber_intervals_upper)) - allocate(temp1(nminor_absorber_intervals_lower)) - allocate(temp2(nminor_absorber_intervals_upper)) - allocate(temp3(nminor_absorber_intervals_lower)) - allocate(temp4(nminor_absorber_intervals_upper)) - allocate(totplnk(ninternalSourcetemps, nbnds)) - allocate(planck_frac(ngpts, nmixingfracs, npress+1, ntemps)) - - if (mpirank .eq. mpiroot) then - ! Read in fields from file - if(nf90_open(trim(kdist_file), NF90_WRITE, ncid_lw) .eq. NF90_NOERR) then - status = nf90_inq_varid(ncid_lw,'gas_names',varID) - status = nf90_get_var(ncid_lw,varID,gas_names) - ! - status = nf90_inq_varid(ncid_lw,'scaling_gas_lower',varID) - status = nf90_get_var(ncid_lw,varID,scaling_gas_lower) - ! - status = nf90_inq_varid(ncid_lw,'scaling_gas_upper',varID) - status = nf90_get_var(ncid_lw,varID,scaling_gas_upper) - ! - status = nf90_inq_varid(ncid_lw,'gas_minor',varID) - status = nf90_get_var(ncid_lw,varID,gas_minor) - ! - status = nf90_inq_varid(ncid_lw,'identifier_minor',varID) - status = nf90_get_var(ncid_lw,varID,identifier_minor) - ! - status = nf90_inq_varid(ncid_lw,'minor_gases_lower',varID) - status = nf90_get_var(ncid_lw,varID,minor_gases_lower) - ! - status = nf90_inq_varid(ncid_lw,'minor_gases_upper',varID) - status = nf90_get_var(ncid_lw,varID,minor_gases_upper) - ! - status = nf90_inq_varid(ncid_lw,'minor_limits_gpt_lower',varID) - status = nf90_get_var(ncid_lw,varID,minor_limits_gpt_lower) - ! - status = nf90_inq_varid(ncid_lw,'minor_limits_gpt_upper',varID) - status = nf90_get_var(ncid_lw,varID,minor_limits_gpt_upper) - ! - status = nf90_inq_varid(ncid_lw,'bnd_limits_gpt',varID) - status = nf90_get_var(ncid_lw,varID,band2gpt) - ! - status = nf90_inq_varid(ncid_lw,'key_species',varID) - status = nf90_get_var(ncid_lw,varID,key_species) - ! - status = nf90_inq_varid(ncid_lw,'bnd_limits_wavenumber',varID) - status = nf90_get_var(ncid_lw,varID,band_lims) - ! - status = nf90_inq_varid(ncid_lw,'press_ref',varID) - status = nf90_get_var(ncid_lw,varID,press_ref) - ! - status = nf90_inq_varid(ncid_lw,'temp_ref',varID) - status = nf90_get_var(ncid_lw,varID,temp_ref) - ! - status = nf90_inq_varid(ncid_lw,'absorption_coefficient_ref_P',varID) - status = nf90_get_var(ncid_lw,varID,temp_ref_p) - ! - status = nf90_inq_varid(ncid_lw,'absorption_coefficient_ref_T',varID) - status = nf90_get_var(ncid_lw,varID,temp_ref_t) - ! - status = nf90_inq_varid(ncid_lw,'press_ref_trop',varID) - status = nf90_get_var(ncid_lw,varID,press_ref_trop) - ! - status = nf90_inq_varid(ncid_lw,'kminor_lower',varID) - status = nf90_get_var(ncid_lw,varID,kminor_lower) - ! - status = nf90_inq_varid(ncid_lw,'kminor_upper',varID) - status = nf90_get_var(ncid_lw,varID,kminor_upper) - ! - status = nf90_inq_varid(ncid_lw,'vmr_ref',varID) - status = nf90_get_var(ncid_lw,varID,vmr_ref) - ! - status = nf90_inq_varid(ncid_lw,'kmajor',varID) - status = nf90_get_var(ncid_lw,varID,kmajor) - ! - status = nf90_inq_varid(ncid_lw,'kminor_start_lower',varID) - status = nf90_get_var(ncid_lw,varID,kminor_start_lower) - ! - status = nf90_inq_varid(ncid_lw,'kminor_start_upper',varID) - status = nf90_get_var(ncid_lw,varID,kminor_start_upper) - ! - status = nf90_inq_varid(ncid_lw,'totplnk',varID) - status = nf90_get_var(ncid_lw,varID,totplnk) - ! - status = nf90_inq_varid(ncid_lw,'plank_fraction',varID) - status = nf90_get_var(ncid_lw,varID,planck_frac) - - ! Logical fields are read in as integers and then converted to logicals. - status = nf90_inq_varid(ncid_lw,'minor_scales_with_density_lower',varID) - status = nf90_get_var(ncid_lw,varID,temp1) - minor_scales_with_density_lower(:) = .false. - where(temp1 .eq. 1) minor_scales_with_density_lower(:) = .true. - ! - status = nf90_inq_varid(ncid_lw,'minor_scales_with_density_upper',varID) - status = nf90_get_var(ncid_lw,varID,temp2) - minor_scales_with_density_upper(:) = .false. - where(temp2 .eq. 1) minor_scales_with_density_upper(:) = .true. - ! - status = nf90_inq_varid(ncid_lw,'scale_by_complement_lower',varID) - status = nf90_get_var(ncid_lw,varID,temp3) - scale_by_complement_lower(:) = .false. - where(temp3 .eq. 1) scale_by_complement_lower(:) = .true. - ! - status = nf90_inq_varid(ncid_lw,'scale_by_complement_upper',varID) - status = nf90_get_var(ncid_lw,varID,temp4) - scale_by_complement_upper(:) = .false. - where(temp4 .eq. 1) scale_by_complement_upper(:) = .true. - - ! Close - status = nf90_close(ncid_lw) - endif - endif - - ! Broadcast arrays to all processors -#ifdef MPI - call MPI_BCAST(minor_limits_gpt_upper, size(minor_limits_gpt_upper), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(minor_limits_gpt_lower, size(minor_limits_gpt_lower), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(kminor_start_upper, size(kminor_start_upper), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(kminor_start_lower, size(kminor_start_lower), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(key_species, size(key_species), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(band2gpt, size(band2gpt), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(band_lims, size(band_lims), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(press_ref, size(press_ref), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(temp_ref, size(temp_ref), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(kminor_lower, size(kminor_lower), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(kminor_upper, size(kminor_upper), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(scaling_gas_lower, size(scaling_gas_lower), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(scaling_gas_upper, size(scaling_gas_upper), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(vmr_ref, size(vmr_ref), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(kmajor, size(kmajor), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(temp_ref_p, 1, kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(temp_ref_t, 1, kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(press_ref_trop, 1, kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(totplnk, size(totplnk), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(planck_frac, size(planck_frac), kind_phys, mpiroot, mpicomm, ierr) - ! Character arrays - do ij=1,nabsorbers - call MPI_BCAST(gas_names(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) - enddo - do ij=1,nminorabsorbers - call MPI_BCAST(gas_minor(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) - call MPI_BCAST(identifier_minor(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) - enddo - do ij=1,nminor_absorber_intervals_lower - call MPI_BCAST(minor_gases_lower(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) - enddo - do ij=1,nminor_absorber_intervals_upper - call MPI_BCAST(minor_gases_upper(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) - enddo - ! Logical arrays (First convert to integer-array, then broadcast) - ! - allocate(temp_log_array1(nminor_absorber_intervals_lower)) - where(minor_scales_with_density_lower) - temp_log_array1 = 1 - elsewhere - temp_log_array1 = 0 - end where - call MPI_BCAST(temp_log_array1, size(temp_log_array1), MPI_INTEGER, mpiroot, mpicomm, ierr) - ! - allocate(temp_log_array2(nminor_absorber_intervals_lower)) - where(scale_by_complement_lower) - temp_log_array2 = 1 - elsewhere - temp_log_array2 = 0 - end where - call MPI_BCAST(temp_log_array2, size(temp_log_array2), MPI_INTEGER, mpiroot, mpicomm, ierr) - ! - allocate(temp_log_array3(nminor_absorber_intervals_upper)) - where(minor_scales_with_density_upper) - temp_log_array3 = 1 - elsewhere - temp_log_array3 = 0 - end where - call MPI_BCAST(temp_log_array3, size(temp_log_array3), MPI_INTEGER, mpiroot, mpicomm, ierr) - ! - allocate(temp_log_array4(nminor_absorber_intervals_upper)) - where(scale_by_complement_upper) - temp_log_array4 = 1 - elsewhere - temp_log_array4 = 0 - end where - call MPI_BCAST(temp_log_array4, size(temp_log_array4), MPI_INTEGER, mpiroot, mpicomm, ierr) -#endif - - ! Initialize gas concentrations and gas optics class with data - do iGas=1,nGases - call check_error_msg('rrtmgp_lw_init',gas_concentrations%set_vmr(active_gases(iGas), 0._kind_phys)) - enddo - call check_error_msg('rrtmgp_lw_init',kdist_lw%load(gas_concentrations, gas_names, key_species, band2gpt, & - band_lims, press_ref, press_ref_trop, temp_ref, temp_ref_p, temp_ref_t, & - vmr_ref, kmajor, kminor_lower, kminor_upper, gas_minor,identifier_minor, & - minor_gases_lower, minor_gases_upper, minor_limits_gpt_lower, & - minor_limits_gpt_upper, minor_scales_with_density_lower, & - minor_scales_with_density_upper, scaling_gas_lower, & - scaling_gas_upper, scale_by_complement_lower, & - scale_by_complement_upper, kminor_start_lower, kminor_start_upper, & - totplnk, planck_frac, rayl_lower, rayl_upper)) - - ! Set initial permutation seed for McICA, initially set to number of G-points - ipsdlw0 = kdist_lw%get_ngpt() - - ! ####################################################################################### - ! If RRTMGP cloud-optics are requested, read tables and broadcast. - ! ####################################################################################### - ! Read dimensions for k-distribution fields (only on master processor(0)) - if (mpirank .eq. mpiroot) then - if(nf90_open(trim(kdist_cldy_file), NF90_WRITE, ncid_lw_clds) == NF90_NOERR) then - status = nf90_inq_dimid(ncid_lw_clds, 'nband', dimid) - status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=nbandLWcldy) - status = nf90_inq_dimid(ncid_lw_clds, 'nrghice', dimid) - status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=nrghice) - status = nf90_inq_dimid(ncid_lw_clds, 'nsize_liq', dimid) - status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=nsize_liq) - status = nf90_inq_dimid(ncid_lw_clds, 'nsize_ice', dimid) - status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=nsize_ice) - status = nf90_inq_dimid(ncid_lw_clds, 'nsizereg', dimid) - status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=nsizereg) - status = nf90_inq_dimid(ncid_lw_clds, 'ncoeff_ext', dimid) - status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=ncoeff_ext) - status = nf90_inq_dimid(ncid_lw_clds, 'ncoeff_ssa_g', dimid) - status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=ncoeff_ssa_g) - status = nf90_inq_dimid(ncid_lw_clds, 'nbound', dimid) - status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=nbound) - status = nf90_inq_dimid(ncid_lw_clds, 'pair', dimid) - status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=npairsLWcldy) - status = nf90_close(ncid_lw_clds) - endif - endif - - ! Broadcast dimensions to all processors -#ifdef MPI - if (rrtmgp_lw_cld_phys .eq. 1 .or. rrtmgp_lw_cld_phys .eq. 2) then - call MPI_BCAST(nbandLWcldy, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nrghice, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nsize_liq, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nsize_ice, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nsizereg, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(ncoeff_ext, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(ncoeff_ssa_g, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nbound, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(npairsLWcldy, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - endif -#endif - - if (rrtmgp_lw_cld_phys .eq. 1) then - allocate(lut_extliq(nsize_liq, nBandLWcldy)) - allocate(lut_ssaliq(nsize_liq, nBandLWcldy)) - allocate(lut_asyliq(nsize_liq, nBandLWcldy)) - allocate(lut_extice(nsize_ice, nBandLWcldy, nrghice)) - allocate(lut_ssaice(nsize_ice, nBandLWcldy, nrghice)) - allocate(lut_asyice(nsize_ice, nBandLWcldy, nrghice)) - allocate(band_lims_cldy(2, nBandLWcldy)) - endif - if (rrtmgp_lw_cld_phys .eq. 2) then - allocate(pade_extliq(nbandLWcldy, nsizereg, ncoeff_ext )) - allocate(pade_ssaliq(nbandLWcldy, nsizereg, ncoeff_ssa_g)) - allocate(pade_asyliq(nbandLWcldy, nsizereg, ncoeff_ssa_g)) - allocate(pade_extice(nbandLWcldy, nsizereg, ncoeff_ext, nrghice)) - allocate(pade_ssaice(nbandLWcldy, nsizereg, ncoeff_ssa_g, nrghice)) - allocate(pade_asyice(nbandLWcldy, nsizereg, ncoeff_ssa_g, nrghice)) - allocate(pade_sizereg_extliq(nbound)) - allocate(pade_sizereg_ssaliq(nbound)) - allocate(pade_sizereg_asyliq(nbound)) - allocate(pade_sizereg_extice(nbound)) - allocate(pade_sizereg_ssaice(nbound)) - allocate(pade_sizereg_asyice(nbound)) - allocate(band_lims_cldy(2,nbandLWcldy)) - endif - - ! On master processor, allocate space, read in fields, broadcast to all processors - if (mpirank .eq. mpiroot) then - ! - if (rrtmgp_lw_cld_phys .eq. 1) then - ! - if(nf90_open(trim(kdist_cldy_file), NF90_WRITE, ncid_lw_clds) == NF90_NOERR) then - status = nf90_inq_varid(ncid_lw_clds,'radliq_lwr',varID) - status = nf90_get_var(ncid_lw_clds,varID,radliq_lwr) - status = nf90_inq_varid(ncid_lw_clds,'radliq_upr',varID) - status = nf90_get_var(ncid_lw_clds,varID,radliq_upr) - status = nf90_inq_varid(ncid_lw_clds,'radliq_fac',varID) - status = nf90_get_var(ncid_lw_clds,varID,radliq_fac) - status = nf90_inq_varid(ncid_lw_clds,'radice_lwr',varID) - status = nf90_get_var(ncid_lw_clds,varID,radice_lwr) - status = nf90_inq_varid(ncid_lw_clds,'radice_upr',varID) - status = nf90_get_var(ncid_lw_clds,varID,radice_upr) - status = nf90_inq_varid(ncid_lw_clds,'radice_fac',varID) - status = nf90_get_var(ncid_lw_clds,varID,radice_fac) - status = nf90_inq_varid(ncid_lw_clds,'lut_extliq',varID) - status = nf90_get_var(ncid_lw_clds,varID,lut_extliq) - status = nf90_inq_varid(ncid_lw_clds,'lut_ssaliq',varID) - status = nf90_get_var(ncid_lw_clds,varID,lut_ssaliq) - status = nf90_inq_varid(ncid_lw_clds,'lut_asyliq',varID) - status = nf90_get_var(ncid_lw_clds,varID,lut_asyliq) - status = nf90_inq_varid(ncid_lw_clds,'lut_extice',varID) - status = nf90_get_var(ncid_lw_clds,varID,lut_extice) - status = nf90_inq_varid(ncid_lw_clds,'lut_ssaice',varID) - status = nf90_get_var(ncid_lw_clds,varID,lut_ssaice) - status = nf90_inq_varid(ncid_lw_clds,'lut_asyice',varID) - status = nf90_get_var(ncid_lw_clds,varID,lut_asyice) - status = nf90_inq_varid(ncid_lw_clds,'bnd_limits_wavenumber',varID) - status = nf90_get_var(ncid_lw_clds,varID,band_lims_cldy) - status = nf90_close(ncid_lw_clds) - endif - endif - ! - if (rrtmgp_lw_cld_phys .eq. 2) then - ! - if(nf90_open(trim(kdist_cldy_file), NF90_WRITE, ncid_lw_clds) == NF90_NOERR) then - status = nf90_inq_varid(ncid_lw_clds,'radliq_lwr',varID) - status = nf90_get_var(ncid_lw_clds,varID,radliq_lwr) - status = nf90_inq_varid(ncid_lw_clds,'radliq_upr',varID) - status = nf90_get_var(ncid_lw_clds,varID,radliq_upr) - status = nf90_inq_varid(ncid_lw_clds,'radliq_fac',varID) - status = nf90_get_var(ncid_lw_clds,varID,radliq_fac) - status = nf90_inq_varid(ncid_lw_clds,'radice_lwr',varID) - status = nf90_get_var(ncid_lw_clds,varID,radice_lwr) - status = nf90_inq_varid(ncid_lw_clds,'radice_upr',varID) - status = nf90_get_var(ncid_lw_clds,varID,radice_upr) - status = nf90_inq_varid(ncid_lw_clds,'radice_fac',varID) - status = nf90_get_var(ncid_lw_clds,varID,radice_fac) - status = nf90_inq_varid(ncid_lw_clds,'pade_extliq',varID) - status = nf90_get_var(ncid_lw_clds,varID,pade_extliq) - status = nf90_inq_varid(ncid_lw_clds,'pade_ssaliq',varID) - status = nf90_get_var(ncid_lw_clds,varID,pade_ssaliq) - status = nf90_inq_varid(ncid_lw_clds,'pade_asyliq',varID) - status = nf90_get_var(ncid_lw_clds,varID,pade_asyliq) - status = nf90_inq_varid(ncid_lw_clds,'pade_extice',varID) - status = nf90_get_var(ncid_lw_clds,varID,pade_extice) - status = nf90_inq_varid(ncid_lw_clds,'pade_ssaice',varID) - status = nf90_get_var(ncid_lw_clds,varID,pade_ssaice) - status = nf90_inq_varid(ncid_lw_clds,'pade_asyice',varID) - status = nf90_get_var(ncid_lw_clds,varID,pade_asyice) - status = nf90_inq_varid(ncid_lw_clds,'pade_sizreg_extliq',varID) - status = nf90_get_var(ncid_lw_clds,varID,pade_sizereg_extliq) - status = nf90_inq_varid(ncid_lw_clds,'pade_sizreg_ssaliq',varID) - status = nf90_get_var(ncid_lw_clds,varID,pade_sizereg_ssaliq) - status = nf90_inq_varid(ncid_lw_clds,'pade_sizreg_asyliq',varID) - status = nf90_get_var(ncid_lw_clds,varID,pade_sizereg_asyliq) - status = nf90_inq_varid(ncid_lw_clds,'pade_sizreg_extice',varID) - status = nf90_get_var(ncid_lw_clds,varID,pade_sizereg_extice) - status = nf90_inq_varid(ncid_lw_clds,'pade_sizreg_ssaice',varID) - status = nf90_get_var(ncid_lw_clds,varID,pade_sizereg_ssaice) - status = nf90_inq_varid(ncid_lw_clds,'pade_sizreg_asyice',varID) - status = nf90_get_var(ncid_lw_clds,varID,pade_sizereg_asyice) - status = nf90_inq_varid(ncid_lw_clds,'bnd_limits_wavenumber',varID) - status = nf90_get_var(ncid_lw_clds,varID,band_lims_cldy) - status = nf90_close(ncid_lw_clds) - endif - endif - endif - - ! Broadcast arrays to all processors -#ifdef MPI - if (rrtmgp_lw_cld_phys .eq. 1) then - call MPI_BCAST(radliq_lwr, size(radliq_lwr), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(radliq_upr, size(radliq_upr), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(radliq_fac, size(radliq_fac), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(radice_lwr, size(radice_lwr), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(radice_upr, size(radice_upr), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(radice_fac, size(radice_fac), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_extliq, size(lut_extliq), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_ssaliq, size(lut_ssaliq), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_asyliq, size(lut_asyliq), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_extice, size(lut_extice), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_ssaice, size(lut_ssaice), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_asyice, size(lut_asyice), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(band_lims_cldy), size(band_lims_cldy), kind_phys, mpiroot, mpicomm, ierr) - endif - if (rrtmgp_lw_cld_phys .eq. 2) then - call MPI_BCAST(pade_extliq, size(pade_extliq), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_ssaliq, size(pade_ssaliq), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_asyliq, size(pade_asyliq), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_extice, size(pade_extice), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_ssaice, size(pade_ssaice), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_asyice, size(pade_asyice), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_extliq), size(pade_sizereg_extliq), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_ssaliq), size(pade_sizereg_ssaliq), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_asyliq), size(pade_sizereg_asyliq), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_extice), size(pade_sizereg_extice), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_ssaice), size(pade_sizereg_ssaice), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_asyice), size(pade_sizereg_asyice), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(band_lims_cldy), size(band_lims_cldy), kind_phys, mpiroot, mpicomm, ierr) - endif -#endif - - ! Load tables data for RRTGMP cloud-optics - if (rrtmgp_lw_cld_phys .eq. 1) then - call check_error_msg('rrtmgp_lw_init',kdist_cldy_lw%set_ice_roughness(nrghice)) - call check_error_msg('rrtmgp_lw_init',kdist_cldy_lw%load(band_lims_cldy, radliq_lwr, radliq_upr, & - radliq_fac, radice_lwr, radice_upr, radice_fac, lut_extliq, lut_ssaliq, & - lut_asyliq, lut_extice, lut_ssaice, lut_asyice)) - endif - if (rrtmgp_lw_cld_phys .eq. 2) then - call check_error_msg('rrtmgp_lw_init',kdist_cldy_lw%set_ice_roughness(nrghice)) - call check_error_msg('rrtmgp_lw_init',kdist_cldy_lw%load(band_lims_cldy, pade_extliq, & - pade_ssaliq, pade_asyliq, pade_extice, pade_ssaice, pade_asyice, & - pade_sizereg_extliq, pade_sizereg_ssaliq, pade_sizereg_asyliq, & - pade_sizereg_extice, pade_sizereg_ssaice, pade_sizereg_asyice)) + ! Load cloud optics + if (Model%rrtmgp_cld_optics .gt. 0) then + call lw_cloud_optics_init(Model, mpicomm, mpirank, mpiroot, lw_cloud_props, errmsg, errflg) endif end subroutine rrtmgp_lw_init @@ -669,7 +71,7 @@ end subroutine rrtmgp_lw_init !! | t_lay | air_temperature_at_layer_for_RRTMGP | air temperature layer | K | 2 | real | kind_phys | in | F | !! | skt | surface_ground_temperature_for_radiation | surface ground temperature for radiation | K | 1 | real | kind_phys | in | F | !! | sfc_emiss | surface_longwave_emissivity_in_each_band | surface lw emissivity in fraction in each LW band | frac | 2 | real | kind_phys | in | F | -!! | kdist_lw | K_distribution_file_for_RRTMGP_LW_scheme | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | +!! | lw_gas_props | coefficients_for_lw_gas_optics | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | !! | optical_propsLW_clds | longwave_optical_properties_for_cloudy_atmosphere | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_1scl | | in | F | !! | optical_propsLW_aerosol | longwave_optical_properties_for_aerosols | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_1scl | | in | F | !! | gas_concentrations | Gas_concentrations_for_RRTMGP_suite | DDT containing gas concentrations for RRTMGP radiation scheme | DDT | 0 | ty_gas_concs | | in | F | @@ -683,7 +85,7 @@ end subroutine rrtmgp_lw_init !! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | !! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | !! - subroutine rrtmgp_lw_run(Model, ncol, kdist_lw, p_lay, t_lay, p_lev, skt, & + subroutine rrtmgp_lw_run(Model, ncol, lw_gas_props, p_lay, t_lay, p_lev, skt, & sfc_emiss, gas_concentrations, optical_propsLW_clds, optical_propsLW_aerosol,& lslwr, fluxUP_allsky, fluxDOWN_allsky, fluxUP_clrsky, fluxDOWN_clrsky, hlw0, hlwb, errmsg, errflg) @@ -699,8 +101,8 @@ subroutine rrtmgp_lw_run(Model, ncol, kdist_lw, p_lay, t_lay, p_lev, skt, & real(kind_phys), dimension(ncol), intent(in) :: & skt ! Surface(skin) temperature (K) type(ty_gas_optics_rrtmgp),intent(in) :: & - kdist_lw ! DDT containing LW spectral information - real(kind_phys), dimension(kdist_lw%get_nband(),ncol) :: & + lw_gas_props ! DDT containing LW spectral information + real(kind_phys), dimension(lw_gas_props%get_nband(),ncol) :: & sfc_emiss ! Surface emissivity (1) type(ty_optical_props_1scl),intent(in) :: & optical_propsLW_clds, & ! RRTMGP DDT: longwave cloud radiative properties @@ -720,7 +122,7 @@ subroutine rrtmgp_lw_run(Model, ncol, kdist_lw, p_lay, t_lay, p_lev, skt, & fluxDOWN_clrsky ! All-sky flux (W/m2) ! Outputs (optional) - real(kind_phys), dimension(ncol,model%levs,kdist_lw%get_nband()), optional, intent(inout) :: & + real(kind_phys), dimension(ncol,model%levs,lw_gas_props%get_nband()), optional, intent(inout) :: & hlwb ! All-sky heating rate, by band (K/sec) real(kind_phys), dimension(ncol,model%levs), optional, intent(inout) :: & hlw0 ! Clear-sky heating rate (K/sec) @@ -731,7 +133,7 @@ subroutine rrtmgp_lw_run(Model, ncol, kdist_lw, p_lay, t_lay, p_lev, skt, & flux_clrsky ! Clear-sky flux (W/m2) real(kind_phys), dimension(ncol,model%levs+1),target :: & fluxLW_up_allsky, fluxLW_up_clrsky, fluxLW_dn_allsky, fluxLW_dn_clrsky - real(kind_phys), dimension(ncol,model%levs+1,kdist_lw%get_nband()),target :: & + real(kind_phys), dimension(ncol,model%levs+1,lw_gas_props%get_nband()),target :: & fluxLWBB_up_allsky, fluxLWBB_dn_allsky logical :: l_ClrSky_HR, l_AllSky_HR_byband integer :: k @@ -758,7 +160,7 @@ subroutine rrtmgp_lw_run(Model, ncol, kdist_lw, p_lay, t_lay, p_lev, skt, & ! Call RRTMGP LW scheme call check_error_msg('rrtmgp_lw_run',rte_lw( & - kdist_lw, & ! IN - spectral information + lw_gas_props, & ! IN - spectral information gas_concentrations, & ! IN - gas concentrations (vmr) p_lay, & ! IN - pressure at layer interfaces (Pa) t_lay, & ! IN - temperature at layer interfaes (K) @@ -778,14 +180,6 @@ end subroutine rrtmgp_lw_run subroutine rrtmgp_lw_finalize() end subroutine rrtmgp_lw_finalize - subroutine check_error_msg(routine_name, error_msg) - character(len=*), intent(in) :: & - error_msg, routine_name - - if(error_msg /= "") then - print*,"ERROR("//trim(routine_name)//"): " - print*,trim(error_msg) - return - end if - end subroutine check_error_msg + + end module rrtmgp_lw diff --git a/physics/rrtmgp_sw.F90 b/physics/rrtmgp_sw.F90 index 97d485f2f..3592a7b55 100644 --- a/physics/rrtmgp_sw.F90 +++ b/physics/rrtmgp_sw.F90 @@ -11,38 +11,27 @@ module rrtmgp_sw use mo_gas_concentrations, only: ty_gas_concs use mo_fluxes_byband, only: ty_fluxes_byband use module_radsw_parameters, only: cmpfsw_type - - ! Parameters - integer,parameter :: nGases = 6 - real(kind_phys),parameter :: epsilon=1.0e-6 - character(len=3),parameter, dimension(nGases) :: & - active_gases = (/ 'h2o', 'co2', 'o3 ', 'n2o', 'ch4', 'o2 '/) - integer :: nrghice, ipsdsw0 + use rrtmgp_aux, only: sw_gas_optics_init, sw_cloud_optics_init, check_error_msg, active_gases public rrtmgp_sw_init, rrtmgp_sw_run, rrtmgp_sw_finalize -contains +contains !! \section arg_table_rrtmgp_sw_init Argument Table -!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | -!! |--------------------|-------------------------------------------------|---------------------------------------------------------------------------|-------|------|----------------------|-----------|--------|----------| -!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | -!! | mpirank | mpi_rank | current MPI rank | index | 0 | integer | | in | F | -!! | mpiroot | mpi_root | master MPI rank | index | 0 | integer | | in | F | -!! | mpicomm | mpi_comm | MPI communicator | index | 0 | integer | | in | F | -!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | -!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | -!! | kdist_sw | K_distribution_file_for_RRTMGP_SW_scheme | DDT containing spectral information for RRTMGP SW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | inout | F | -!! | kdist_cldy_sw | K_distribution_file_for_cloudy_RRTMGP_SW_scheme | DDT containing spectral information for cloudy RRTMGP SW radiation scheme | DDT | 0 | ty_cloud_optics | | inout | F | +!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | +!! |--------------------|----------------------------------|---------------------------------------------------------------------------|-------|------|----------------------|-----------|--------|----------| +!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | +!! | mpirank | mpi_rank | current MPI rank | index | 0 | integer | | in | F | +!! | mpiroot | mpi_root | master MPI rank | index | 0 | integer | | in | F | +!! | mpicomm | mpi_comm | MPI communicator | index | 0 | integer | | in | F | +!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | +!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! | sw_gas_props | coefficients_for_sw_gas_optics | DDT containing spectral information for RRTMGP SW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | inout | F | +!! | sw_cloud_props | coefficients_for_sw_cloud_optics | DDT containing spectral information for cloudy RRTMGP SW radiation scheme | DDT | 0 | ty_cloud_optics | | inout | F | !! ! ######################################################################################### - subroutine rrtmgp_sw_init(Model,mpicomm, mpirank, mpiroot, kdist_sw, kdist_cldy_sw, & + subroutine rrtmgp_sw_init(Model,mpicomm, mpirank, mpiroot, sw_gas_props, sw_cloud_props, & errmsg, errflg) - use netcdf - -#ifdef MPI - use mpi -#endif ! Inputs type(GFS_control_type), intent(in) :: & @@ -52,9 +41,9 @@ subroutine rrtmgp_sw_init(Model,mpicomm, mpirank, mpiroot, kdist_sw, kdist_cldy_ mpirank, & ! Current MPI rank mpiroot ! Master MPI rank type(ty_gas_optics_rrtmgp),intent(inout) :: & - kdist_sw + sw_gas_props type(ty_cloud_optics),intent(inout) :: & - kdist_cldy_sw + sw_cloud_props ! Outputs character(len=*), intent(out) :: & @@ -62,606 +51,13 @@ subroutine rrtmgp_sw_init(Model,mpicomm, mpirank, mpiroot, kdist_sw, kdist_cldy_ integer, intent(out) :: & errflg ! Error code - ! Fields from the K-distribution files - ! Variables that will be passed to gas_optics%load() - type(ty_gas_concs) :: & - gas_concentrations - integer, dimension(:), allocatable :: & - kminor_start_lower_sw, & ! used by RRTGMP gas optics - kminor_start_upper_sw ! used by RRTGMP gas optics - integer, dimension(:,:), allocatable :: & - band2gpt_sw, & ! used by RRTGMP gas optics - minor_limits_gpt_lower_sw, & ! used by RRTGMP gas optics - minor_limits_gpt_upper_sw ! used by RRTGMP gas optics - integer, dimension(:,:,:), allocatable :: & - key_species_sw ! used by RRTGMP gas optics - real(kind_phys) :: & - press_ref_trop_sw, & ! used by RRTGMP gas optics - temp_ref_p_sw, & ! used by RRTGMP gas optics - temp_ref_t_sw, & ! used by RRTGMP gas optics - radliq_lwr_sw, & ! used by RRTGMP cloud optics - radliq_upr_sw, & ! used by RRTGMP cloud optics - radliq_fac_sw, & ! used by RRTGMP cloud optics - radice_lwr_sw, & ! used by RRTGMP cloud optics - radice_upr_sw, & ! used by RRTGMP cloud optics - radice_fac_sw ! used by RRTGMP cloud optics - - real(kind_phys), dimension(:), allocatable :: & - press_ref_sw, & ! used by RRTGMP gas optics - temp_ref_sw, & ! used by RRTGMP gas optics - solar_source_sw, & ! used by RRTGMP gas optics - pade_sizereg_extliq_sw, & ! used by RRTGMP cloud optics - pade_sizereg_ssaliq_sw, & ! used by RRTGMP cloud optics - pade_sizereg_asyliq_sw, & ! used by RRTGMP cloud optics - pade_sizereg_extice_sw, & ! used by RRTGMP cloud optics - pade_sizereg_ssaice_sw, & ! used by RRTGMP cloud optics - pade_sizereg_asyice_sw ! used by RRTGMP cloud optics - real(kind_phys), dimension(:,:), allocatable :: & - band_lims_sw, & ! used by RRTGMP gas optics - lut_extliq_sw, & ! used by RRTGMP cloud optics - lut_ssaliq_sw, & ! used by RRTGMP cloud optics - lut_asyliq_sw, & ! used by RRTGMP cloud optics - band_lims_cldy_sw ! used by RRTGMP cloud optics - - real(kind_phys), dimension(:,:,:), allocatable :: & - vmr_ref_sw, & ! used by RRTGMP gas optics - kminor_lower_sw, & ! used by RRTGMP gas optics - kminor_upper_sw, & ! used by RRTGMP gas optics - rayl_lower_sw, & ! used by RRTGMP gas optics - rayl_upper_sw, & ! used by RRTGMP gas optics - lut_extice_sw, & ! used by RRTGMP cloud optics - lut_ssaice_sw, & ! used by RRTGMP cloud optics - lut_asyice_sw, & ! used by RRTGMP cloud optics - pade_extliq_sw, & ! used by RRTGMP cloud optics - pade_ssaliq_sw, & ! used by RRTGMP cloud optics - pade_asyliq_sw ! used by RRTGMP cloud optics - real(kind_phys), dimension(:,:,:,:), allocatable :: & - kmajor_sw, & ! used by RRTGMP gas optics - pade_extice_sw, & ! used by RRTGMP cloud optics - pade_ssaice_sw, & ! used by RRTGMP cloud optics - pade_asyice_sw ! used by RRTGMP cloud optics - character(len=32), dimension(:), allocatable :: & - gas_names_sw, & ! used by RRTGMP gas optics - gas_minor_sw, & ! used by RRTGMP gas optics - identifier_minor_sw, & ! used by RRTGMP gas optics - minor_gases_lower_sw, & ! used by RRTGMP gas optics - minor_gases_upper_sw, & ! used by RRTGMP gas optics - scaling_gas_lower_sw, & ! used by RRTGMP gas optics - scaling_gas_upper_sw ! used by RRTGMP gas optics - logical(wl), dimension(:), allocatable :: & - minor_scales_with_density_lower_sw, & ! used by RRTGMP gas optics - minor_scales_with_density_upper_sw, & ! used by RRTGMP gas optics - scale_by_complement_lower_sw, & ! used by RRTGMP gas optics - scale_by_complement_upper_sw ! used by RRTGMP gas optics - ! Dimensions (to be broadcast across all processors) - integer :: & - ntemps_sw, & ! used by RRTGMP gas optics - npress_sw, & ! used by RRTGMP gas optics - nabsorbers_sw, & ! used by RRTGMP gas optics - nextrabsorbers_sw, & ! used by RRTGMP gas optics - nminorabsorbers_sw, & ! used by RRTGMP gas optics - nmixingfracs_sw, & ! used by RRTGMP gas optics - nlayers_sw, & ! used by RRTGMP gas optics - nbnds_sw, & ! used by RRTGMP gas optics - ngpts_sw, & ! used by RRTGMP gas optics - npairs_sw, & ! used by RRTGMP gas optics - nminor_absorber_intervals_lower_sw, & ! used by RRTGMP gas optics - nminor_absorber_intervals_upper_sw, & ! used by RRTGMP gas optics - ncontributors_lower_sw, & ! used by RRTGMP gas optics - ncontributors_upper_sw, & ! used by RRTGMP gas optics - nbandSWcldy_sw, & ! used by RRTGMP cloud optics - nsize_liq_sw, & ! used by RRTGMP cloud optics - nsize_ice_sw, & ! used by RRTGMP cloud optics - nsizereg_sw, & ! used by RRTGMP cloud optics - ncoeff_ext_sw, & ! used by RRTGMP cloud optics - ncoeff_ssa_g_sw, & ! used by RRTGMP cloud optics - nbound_sw, & ! used by RRTGMP cloud optics - npairsSWcldy_sw ! used by RRTGMP cloud optics - - ! Local variables - integer :: status,ncid_sw,ncid_sw_clds,dimid,varID,ij,iGas - character(len=264) :: kdist_file, kdist_cldy_file - integer,dimension(:),allocatable :: temp1,temp2,temp3,temp4,temp_log_array1,& - temp_log_array2, temp_log_array3, temp_log_array4 - - ! Initialize - errmsg = '' - errflg = 0 - - ! How are we handling cloud-optics? - rrtmgp_sw_cld_phys = Model%rrtmgp_cld_phys + ! Load gas-optics + call sw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, sw_gas_props, errmsg, errflg) - ! Filenames are set in the gfs_physics_nml (scm/src/GFS_typedefs.F90) - kdist_file = trim(Model%rrtmgp_root)//trim(Model%kdist_sw_file_gas) - kdist_cldy_file = trim(Model%rrtmgp_root)//trim(Model%kdist_sw_file_clouds) - - ! Read dimensions for k-distribution fields (only on master processor(0)) - if (mpirank .eq. mpiroot) then - if(nf90_open(trim(kdist_file), NF90_WRITE, ncid_sw) .eq. NF90_NOERR) then - status = nf90_inq_dimid(ncid_sw, 'temperature', dimid) - status = nf90_inquire_dimension(ncid_sw, dimid, len=ntemps_sw) - status = nf90_inq_dimid(ncid_sw, 'pressure', dimid) - status = nf90_inquire_dimension(ncid_sw, dimid, len=npress_sw) - status = nf90_inq_dimid(ncid_sw, 'absorber', dimid) - status = nf90_inquire_dimension(ncid_sw, dimid, len=nabsorbers_sw) - status = nf90_inq_dimid(ncid_sw, 'minor_absorber', dimid) - status = nf90_inquire_dimension(ncid_sw, dimid, len=nminorabsorbers_sw) - status = nf90_inq_dimid(ncid_sw, 'absorber_ext', dimid) - status = nf90_inquire_dimension(ncid_sw, dimid, len=nextrabsorbers_sw) - status = nf90_inq_dimid(ncid_sw, 'mixing_fraction', dimid) - status = nf90_inquire_dimension(ncid_sw, dimid, len=nmixingfracs_sw) - status = nf90_inq_dimid(ncid_sw, 'atmos_layer', dimid) - status = nf90_inquire_dimension(ncid_sw, dimid, len=nlayers_sw) - status = nf90_inq_dimid(ncid_sw, 'bnd', dimid) - status = nf90_inquire_dimension(ncid_sw, dimid, len=nbnds_sw) - status = nf90_inq_dimid(ncid_sw, 'gpt', dimid) - status = nf90_inquire_dimension(ncid_sw, dimid, len=ngpts_sw) - status = nf90_inq_dimid(ncid_sw, 'pair', dimid) - status = nf90_inquire_dimension(ncid_sw, dimid, len=npairs_sw) - status = nf90_inq_dimid(ncid_sw, 'contributors_lower', dimid) - status = nf90_inquire_dimension(ncid_sw, dimid, len=ncontributors_lower_sw) - status = nf90_inq_dimid(ncid_sw, 'contributors_upper', dimid) - status = nf90_inquire_dimension(ncid_sw, dimid, len=ncontributors_upper_sw) - status = nf90_inq_dimid(ncid_sw, 'minor_absorber_intervals_lower', dimid) - status = nf90_inquire_dimension(ncid_sw, dimid, len=nminor_absorber_intervals_lower_sw) - status = nf90_inq_dimid(ncid_sw, 'minor_absorber_intervals_upper', dimid) - status = nf90_inquire_dimension(ncid_sw, dimid, len=nminor_absorber_intervals_upper_sw) - status = nf90_close(ncid_sw) - endif + ! Load cloud optics + if (Model%rrtmgp_cld_optics .gt. 0) then + call sw_cloud_optics_init(Model, mpicomm, mpirank, mpiroot, sw_cloud_props, errmsg, errflg) endif - - ! Broadcast dimensions to all processors -#ifdef MPI - call MPI_BCAST(ntemps_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(npress_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nabsorbers_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nminorabsorbers_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nextraabsorbers_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nmixingfracs_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nlayers_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nbnds_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(ngpts_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(npairs_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(ncontributors_lower_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(ncontributors_upper_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nminor_absorber_intervals_lower_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nminor_absorber_intervals_upper_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -#endif - - ! Allocate space for arrays - allocate(gas_names_sw(nabsorbers_sw)) - allocate(scaling_gas_lower_sw(nminor_absorber_intervals_lower_sw)) - allocate(scaling_gas_upper_sw(nminor_absorber_intervals_upper_sw)) - allocate(gas_minor_sw(nminorabsorbers_sw)) - allocate(identifier_minor_sw(nminorabsorbers_sw)) - allocate(minor_gases_lower_sw(nminor_absorber_intervals_lower_sw)) - allocate(minor_gases_upper_sw(nminor_absorber_intervals_upper_sw)) - allocate(minor_limits_gpt_lower_sw(npairs_sw,nminor_absorber_intervals_lower_sw)) - allocate(minor_limits_gpt_upper_sw(npairs_sw,nminor_absorber_intervals_upper_sw)) - allocate(band2gpt_sw(2,nbnds_sw)) - allocate(key_species_sw(2,nlayers_sw,nbnds_sw)) - allocate(band_lims_sw(2,nbnds_sw)) - allocate(press_ref_sw(npress_sw)) - allocate(temp_ref_sw(ntemps_sw)) - allocate(vmr_ref_sw(nlayers_sw, nextrabsorbers_sw, ntemps_sw)) - allocate(kminor_lower_sw(ncontributors_lower_sw, nmixingfracs_sw, ntemps_sw)) - allocate(kmajor_sw(ngpts_sw, nmixingfracs_sw, npress_sw+1, ntemps_sw)) - allocate(kminor_start_lower_sw(nminor_absorber_intervals_lower_sw)) - allocate(kminor_upper_sw(ncontributors_upper_sw, nmixingfracs_sw, ntemps_sw)) - allocate(kminor_start_upper_sw(nminor_absorber_intervals_upper_sw)) - allocate(minor_scales_with_density_lower_sw(nminor_absorber_intervals_lower_sw)) - allocate(minor_scales_with_density_upper_sw(nminor_absorber_intervals_upper_sw)) - allocate(scale_by_complement_lower_sw(nminor_absorber_intervals_lower_sw)) - allocate(scale_by_complement_upper_sw(nminor_absorber_intervals_upper_sw)) - allocate(rayl_upper_sw(ngpts_sw, nmixingfracs_sw, ntemps_sw)) - allocate(rayl_lower_sw(ngpts_sw, nmixingfracs_sw, ntemps_sw)) - allocate(solar_source_sw(ngpts_sw)) - allocate(temp1(nminor_absorber_intervals_lower_sw)) - allocate(temp2(nminor_absorber_intervals_upper_sw)) - allocate(temp3(nminor_absorber_intervals_lower_sw)) - allocate(temp4(nminor_absorber_intervals_upper_sw)) - - ! On master processor, read in fields, broadcast to all processors - if (mpirank .eq. mpiroot) then - ! Read in fields from file - if(nf90_open(trim(kdist_file), NF90_WRITE, ncid_sw) .eq. NF90_NOERR) then - status = nf90_inq_varid(ncid_sw,'gas_names',varID) - status = nf90_get_var(ncid_sw,varID,gas_names_sw) - ! - status = nf90_inq_varid(ncid_sw,'scaling_gas_lower',varID) - status = nf90_get_var(ncid_sw,varID,scaling_gas_lower_sw) - ! - status = nf90_inq_varid(ncid_sw,'scaling_gas_upper',varID) - status = nf90_get_var(ncid_sw,varID,scaling_gas_upper_sw) - ! - status = nf90_inq_varid(ncid_sw,'gas_minor',varID) - status = nf90_get_var(ncid_sw,varID,gas_minor_sw) - ! - status = nf90_inq_varid(ncid_sw,'identifier_minor',varID) - status = nf90_get_var(ncid_sw,varID,identifier_minor_sw) - ! - status = nf90_inq_varid(ncid_sw,'minor_gases_lower',varID) - status = nf90_get_var(ncid_sw,varID,minor_gases_lower_sw) - ! - status = nf90_inq_varid(ncid_sw,'minor_gases_upper',varID) - status = nf90_get_var(ncid_sw,varID,minor_gases_upper_sw) - ! - status = nf90_inq_varid(ncid_sw,'minor_limits_gpt_lower',varID) - status = nf90_get_var(ncid_sw,varID,minor_limits_gpt_lower_sw) - ! - status = nf90_inq_varid(ncid_sw,'minor_limits_gpt_upper',varID) - status = nf90_get_var(ncid_sw,varID,minor_limits_gpt_upper_sw) - ! - status = nf90_inq_varid(ncid_sw,'bnd_limits_gpt',varID) - status = nf90_get_var(ncid_sw,varID,band2gpt_sw) - ! - status = nf90_inq_varid(ncid_sw,'key_species',varID) - status = nf90_get_var(ncid_sw,varID,key_species_sw) - ! - status = nf90_inq_varid(ncid_sw,'bnd_limits_wavenumber',varID) - status = nf90_get_var(ncid_sw,varID,band_lims_sw) - ! - status = nf90_inq_varid(ncid_sw,'press_ref',varID) - status = nf90_get_var(ncid_sw,varID,press_ref_sw) - ! - status = nf90_inq_varid(ncid_sw,'temp_ref',varID) - status = nf90_get_var(ncid_sw,varID,temp_ref_sw) - ! - status = nf90_inq_varid(ncid_sw,'absorption_coefficient_ref_P',varID) - status = nf90_get_var(ncid_sw,varID,temp_ref_p_sw) - ! - status = nf90_inq_varid(ncid_sw,'absorption_coefficient_ref_T',varID) - status = nf90_get_var(ncid_sw,varID,temp_ref_t_sw) - ! - status = nf90_inq_varid(ncid_sw,'press_ref_trop',varID) - status = nf90_get_var(ncid_sw,varID,press_ref_trop_sw) - ! - status = nf90_inq_varid(ncid_sw,'kminor_lower',varID) - status = nf90_get_var(ncid_sw,varID,kminor_lower_sw) - ! - status = nf90_inq_varid(ncid_sw,'kminor_upper',varID) - status = nf90_get_var(ncid_sw,varID,kminor_upper_sw) - ! - status = nf90_inq_varid(ncid_sw,'vmr_ref',varID) - status = nf90_get_var(ncid_sw,varID,vmr_ref_sw) - ! - status = nf90_inq_varid(ncid_sw,'kmajor',varID) - status = nf90_get_var(ncid_sw,varID,kmajor_sw) - ! - status = nf90_inq_varid(ncid_sw,'kminor_start_lower',varID) - status = nf90_get_var(ncid_sw,varID,kminor_start_lower_sw) - ! - status = nf90_inq_varid(ncid_sw,'kminor_start_upper',varID) - status = nf90_get_var(ncid_sw,varID,kminor_start_upper_sw) - ! - status = nf90_inq_varid(ncid_sw,'solar_source',varID) - status = nf90_get_var(ncid_sw,varID,solar_source_sw) - ! - status = nf90_inq_varid(ncid_sw,'rayl_lower',varID) - status = nf90_get_var(ncid_sw,varID,rayl_lower_sw) - - status = nf90_inq_varid(ncid_sw,'rayl_upper',varID) - status = nf90_get_var(ncid_sw,varID,rayl_upper_sw) - - ! Logical fields are read in as integers and then converted to logicals. - status = nf90_inq_varid(ncid_sw,'minor_scales_with_density_lower',varID) - status = nf90_get_var(ncid_sw,varID,temp1) - minor_scales_with_density_lower_sw(:) = .false. - where(temp1 .eq. 1) minor_scales_with_density_lower_sw(:) = .true. - ! - status = nf90_inq_varid(ncid_sw,'minor_scales_with_density_upper',varID) - status = nf90_get_var(ncid_sw,varID,temp2) - minor_scales_with_density_upper_sw(:) = .false. - where(temp2 .eq. 1) minor_scales_with_density_upper_sw(:) = .true. - ! - status = nf90_inq_varid(ncid_sw,'scale_by_complement_lower',varID) - status = nf90_get_var(ncid_sw,varID,temp3) - scale_by_complement_lower_sw(:) = .false. - where(temp3 .eq. 1) scale_by_complement_lower_sw(:) = .true. - ! - status = nf90_inq_varid(ncid_sw,'scale_by_complement_upper',varID) - status = nf90_get_var(ncid_sw,varID,temp4) - scale_by_complement_upper_sw(:) = .false. - where(temp4 .eq. 1) scale_by_complement_upper_sw(:) = .true. - - ! Close - status = nf90_close(ncid_sw) - endif - endif - - ! Broadcast arrays to all processors -#ifdef MPI - call MPI_BCAST(minor_limits_gpt_upper_sw, size(minor_limits_gpt_upper_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(minor_limits_gpt_lower_sw, size(minor_limits_gpt_lower_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(kminor_start_upper_sw, size(kminor_start_upper_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(kminor_start_lower_sw, size(kminor_start_lower_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(key_species_sw, size(key_species_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(band2gpt_sw, size(band2gpt_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(band_lims_sw, size(band_lims_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(press_ref_sw, size(press_ref_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(temp_ref_sw, size(temp_ref_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(kminor_lower_sw, size(kminor_lower_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(kminor_upper_sw, size(kminor_upper_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(scaling_gas_lower_sw, size(scaling_gas_lower_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(scaling_gas_upper_sw, size(scaling_gas_upper_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(vmr_ref_sw, size(vmr_ref_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(kmajor_sw, size(kmajor_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(temp_ref_p_sw, 1, kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(temp_ref_t_sw, 1, kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(press_ref_trop_sw, 1, kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(solar_source_sw, size(solar_source_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(rayl_lower_sw, size(rayl_lower_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(rayl_upper_sw, size(rayl_upper_sw), kind_phys, mpiroot, mpicomm, ierr) - ! Character arrays - do ij=1,nabsorbers_sw - call MPI_BCAST(gas_names_sw(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) - enddo - do ij=1,nminorabsorbers_sw - call MPI_BCAST(gas_minor_sw(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) - call MPI_BCAST(identifier_minor_sw(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) - enddo - do ij=1,nminor_absorber_intervals_lower_sw - call MPI_BCAST(minor_gases_lower_sw(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) - enddo - do ij=1,nminor_absorber_intervals_upper_sw - call MPI_BCAST(minor_gases_upper_sw(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) - enddo - ! Logical arrays (First convert to integer-array, then broadcast) - ! - allocate(temp_log_array1(nminor_absorber_intervals_lower_sw)) - where(minor_scales_with_density_lower_sw) - temp_log_array1 = 1 - elsewhere - temp_log_array1 = 0 - end where - call MPI_BCAST(temp_log_array1, size(temp_log_array1), MPI_INTEGER, mpiroot, mpicomm, ierr) - ! - allocate(temp_log_array2(nminor_absorber_intervals_lower_sw)) - where(scale_by_complement_lower_sw) - temp_log_array2 = 1 - elsewhere - temp_log_array2 = 0 - end where - call MPI_BCAST(temp_log_array2, size(temp_log_array2), MPI_INTEGER, mpiroot, mpicomm, ierr) - ! - allocate(temp_log_array3(nminor_absorber_intervals_upper_sw)) - where(minor_scales_with_density_upper_sw) - temp_log_array3 = 1 - elsewhere - temp_log_array3 = 0 - end where - call MPI_BCAST(temp_log_array3, size(temp_log_array3), MPI_INTEGER, mpiroot, mpicomm, ierr) - ! - allocate(temp_log_array4(nminor_absorber_intervals_upper_sw)) - where(scale_by_complement_upper_sw) - temp_log_array4 = 1 - elsewhere - temp_log_array4 = 0 - end where - call MPI_BCAST(temp_log_array4, size(temp_log_array4), MPI_INTEGER, mpiroot, mpicomm, ierr) -#endif - - ! Initialize gas concentrations and gas optics class with data - do iGas=1,nGases - call check_error_msg('rrtmgp_sw_init',gas_concentrations%set_vmr(active_gases(iGas), 0._kind_phys)) - enddo - call check_error_msg('rrtmgp_sw_init',kdist_sw%load(gas_concentrations, gas_names_sw, key_species_sw, band2gpt_sw, & - band_lims_sw, press_ref_sw, press_ref_trop_sw, temp_ref_sw, temp_ref_p_sw, temp_ref_t_sw, & - vmr_ref_sw, kmajor_sw, kminor_lower_sw, kminor_upper_sw, gas_minor_sw,identifier_minor_sw, & - minor_gases_lower_sw, minor_gases_upper_sw, minor_limits_gpt_lower_sw, & - minor_limits_gpt_upper_sw, minor_scales_with_density_lower_sw, & - minor_scales_with_density_upper_sw, scaling_gas_lower_sw, & - scaling_gas_upper_sw, scale_by_complement_lower_sw, & - scale_by_complement_upper_sw, kminor_start_lower_sw, kminor_start_upper_sw, & - solar_source_sw, rayl_lower_sw, rayl_upper_sw)) - - ! Set band index by g-point array - nBandsSW = kdist_sw%get_nband() - nGptsSW = kdist_sw%get_ngpt() - - ! Set initial permutation seed for McICA, initially set to number of G-points - ipsdsw0 = kdist_sw%get_ngpt() - - ! ####################################################################################### - ! If RRTMGP cloud-optics are requested, read tables and broadcast. - ! ####################################################################################### - ! Read dimensions for k-distribution fields (only on master processor(0)) - if (mpirank .eq. mpiroot) then - if(nf90_open(trim(kdist_cldy_file), NF90_WRITE, ncid_sw_clds) == NF90_NOERR) then - status = nf90_inq_dimid(ncid_sw_clds, 'nband', dimid) - status = nf90_inquire_dimension(ncid_sw_clds, dimid, len=nbandSWcldy_sw) - status = nf90_inq_dimid(ncid_sw_clds, 'nrghice', dimid) - status = nf90_inquire_dimension(ncid_sw_clds, dimid, len=nrghice) - status = nf90_inq_dimid(ncid_sw_clds, 'nsize_liq', dimid) - status = nf90_inquire_dimension(ncid_sw_clds, dimid, len=nsize_liq_sw) - status = nf90_inq_dimid(ncid_sw_clds, 'nsize_ice', dimid) - status = nf90_inquire_dimension(ncid_sw_clds, dimid, len=nsize_ice_sw) - status = nf90_inq_dimid(ncid_sw_clds, 'nsizereg', dimid) - status = nf90_inquire_dimension(ncid_sw_clds, dimid, len=nsizereg_sw) - status = nf90_inq_dimid(ncid_sw_clds, 'ncoeff_ext', dimid) - status = nf90_inquire_dimension(ncid_sw_clds, dimid, len=ncoeff_ext_sw) - status = nf90_inq_dimid(ncid_sw_clds, 'ncoeff_ssa_g', dimid) - status = nf90_inquire_dimension(ncid_sw_clds, dimid, len=ncoeff_ssa_g_sw) - status = nf90_inq_dimid(ncid_sw_clds, 'nbound', dimid) - status = nf90_inquire_dimension(ncid_sw_clds, dimid, len=nbound_sw) - status = nf90_inq_dimid(ncid_sw_clds, 'pair', dimid) - status = nf90_inquire_dimension(ncid_sw_clds, dimid, len=npairsSWcldy_sw) - status = nf90_close(ncid_sw_clds) - endif - endif - - ! Broadcast dimensions to all processors -#ifdef MPI - if (rrtmgp_sw_cld_phys .eq. 1 .or. rrtmgp_sw_cld_phys .eq. 2) then - call MPI_BCAST(nbandSWcldy_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nrghice, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nsize_liq_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nsize_ice_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nsizereg_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(ncoeff_ext_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(ncoeff_ssa_g_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nbound_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(npairsSWcldy_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - endif -#endif - - if (rrtmgp_sw_cld_phys .eq. 1) then - allocate(lut_extliq_sw(nsize_liq_sw, nBandSWcldy_sw)) - allocate(lut_ssaliq_sw(nsize_liq_sw, nBandSWcldy_sw)) - allocate(lut_asyliq_sw(nsize_liq_sw, nBandSWcldy_sw)) - allocate(lut_extice_sw(nsize_ice_sw, nBandSWcldy_sw, nrghice)) - allocate(lut_ssaice_sw(nsize_ice_sw, nBandSWcldy_sw, nrghice)) - allocate(lut_asyice_sw(nsize_ice_sw, nBandSWcldy_sw, nrghice)) - allocate(band_lims_cldy_sw(2, nBandSWcldy_sw)) - endif - if (rrtmgp_sw_cld_phys .eq. 2) then - allocate(pade_extliq_sw(nbandSWcldy_sw, nsizereg_sw, ncoeff_ext_sw )) - allocate(pade_ssaliq_sw(nbandSWcldy_sw, nsizereg_sw, ncoeff_ssa_g_sw)) - allocate(pade_asyliq_sw(nbandSWcldy_sw, nsizereg_sw, ncoeff_ssa_g_sw)) - allocate(pade_extice_sw(nbandSWcldy_sw, nsizereg_sw, ncoeff_ext_sw, nrghice)) - allocate(pade_ssaice_sw(nbandSWcldy_sw, nsizereg_sw, ncoeff_ssa_g_sw, nrghice)) - allocate(pade_asyice_sw(nbandSWcldy_sw, nsizereg_sw, ncoeff_ssa_g_sw, nrghice)) - allocate(pade_sizereg_extliq_sw(nbound_sw)) - allocate(pade_sizereg_ssaliq_sw(nbound_sw)) - allocate(pade_sizereg_asyliq_sw(nbound_sw)) - allocate(pade_sizereg_extice_sw(nbound_sw)) - allocate(pade_sizereg_ssaice_sw(nbound_sw)) - allocate(pade_sizereg_asyice_sw(nbound_sw)) - allocate(band_lims_cldy_sw(2,nbandSWcldy_sw)) - endif - - ! On master processor, allocate space, read in fields, broadcast to all processors - if (mpirank .eq. mpiroot) then - ! - if (rrtmgp_sw_cld_phys .eq. 1) then - ! - if(nf90_open(trim(kdist_cldy_file), NF90_WRITE, ncid_sw_clds) == NF90_NOERR) then - status = nf90_inq_varid(ncid_sw_clds,'radliq_lwr',varID) - status = nf90_get_var(ncid_sw_clds,varID,radliq_lwr_sw) - status = nf90_inq_varid(ncid_sw_clds,'radliq_upr',varID) - status = nf90_get_var(ncid_sw_clds,varID,radliq_upr_sw) - status = nf90_inq_varid(ncid_sw_clds,'radliq_fac',varID) - status = nf90_get_var(ncid_sw_clds,varID,radliq_fac_sw) - status = nf90_inq_varid(ncid_sw_clds,'radice_lwr',varID) - status = nf90_get_var(ncid_sw_clds,varID,radice_lwr_sw) - status = nf90_inq_varid(ncid_sw_clds,'radice_upr',varID) - status = nf90_get_var(ncid_sw_clds,varID,radice_upr_sw) - status = nf90_inq_varid(ncid_sw_clds,'radice_fac',varID) - status = nf90_get_var(ncid_sw_clds,varID,radice_fac_sw) - status = nf90_inq_varid(ncid_sw_clds,'lut_extliq',varID) - status = nf90_get_var(ncid_sw_clds,varID,lut_extliq_sw) - status = nf90_inq_varid(ncid_sw_clds,'lut_ssaliq',varID) - status = nf90_get_var(ncid_sw_clds,varID,lut_ssaliq_sw) - status = nf90_inq_varid(ncid_sw_clds,'lut_asyliq',varID) - status = nf90_get_var(ncid_sw_clds,varID,lut_asyliq_sw) - status = nf90_inq_varid(ncid_sw_clds,'lut_extice',varID) - status = nf90_get_var(ncid_sw_clds,varID,lut_extice_sw) - status = nf90_inq_varid(ncid_sw_clds,'lut_ssaice',varID) - status = nf90_get_var(ncid_sw_clds,varID,lut_ssaice_sw) - status = nf90_inq_varid(ncid_sw_clds,'lut_asyice',varID) - status = nf90_get_var(ncid_sw_clds,varID,lut_asyice_sw) - status = nf90_inq_varid(ncid_sw_clds,'bnd_limits_wavenumber',varID) - status = nf90_get_var(ncid_sw_clds,varID,band_lims_cldy_sw) - status = nf90_close(ncid_sw_clds) - endif - endif - ! - if (rrtmgp_sw_cld_phys .eq. 2) then - ! - if(nf90_open(trim(kdist_cldy_file), NF90_WRITE, ncid_sw_clds) == NF90_NOERR) then - status = nf90_inq_varid(ncid_sw_clds,'radliq_lwr',varID) - status = nf90_get_var(ncid_sw_clds,varID,radliq_lwr_sw) - status = nf90_inq_varid(ncid_sw_clds,'radliq_upr',varID) - status = nf90_get_var(ncid_sw_clds,varID,radliq_upr_sw) - status = nf90_inq_varid(ncid_sw_clds,'radliq_fac',varID) - status = nf90_get_var(ncid_sw_clds,varID,radliq_fac_sw) - status = nf90_inq_varid(ncid_sw_clds,'radice_lwr',varID) - status = nf90_get_var(ncid_sw_clds,varID,radice_lwr_sw) - status = nf90_inq_varid(ncid_sw_clds,'radice_upr',varID) - status = nf90_get_var(ncid_sw_clds,varID,radice_upr_sw) - status = nf90_inq_varid(ncid_sw_clds,'radice_fac',varID) - status = nf90_get_var(ncid_sw_clds,varID,radice_fac_sw) - status = nf90_inq_varid(ncid_sw_clds,'pade_extliq',varID) - status = nf90_get_var(ncid_sw_clds,varID,pade_extliq_sw) - status = nf90_inq_varid(ncid_sw_clds,'pade_ssaliq',varID) - status = nf90_get_var(ncid_sw_clds,varID,pade_ssaliq_sw) - status = nf90_inq_varid(ncid_sw_clds,'pade_asyliq',varID) - status = nf90_get_var(ncid_sw_clds,varID,pade_asyliq_sw) - status = nf90_inq_varid(ncid_sw_clds,'pade_extice',varID) - status = nf90_get_var(ncid_sw_clds,varID,pade_extice_sw) - status = nf90_inq_varid(ncid_sw_clds,'pade_ssaice',varID) - status = nf90_get_var(ncid_sw_clds,varID,pade_ssaice_sw) - status = nf90_inq_varid(ncid_sw_clds,'pade_asyice',varID) - status = nf90_get_var(ncid_sw_clds,varID,pade_asyice_sw) - status = nf90_inq_varid(ncid_sw_clds,'pade_sizreg_extliq',varID) - status = nf90_get_var(ncid_sw_clds,varID,pade_sizereg_extliq_sw) - status = nf90_inq_varid(ncid_sw_clds,'pade_sizreg_ssaliq',varID) - status = nf90_get_var(ncid_sw_clds,varID,pade_sizereg_ssaliq_sw) - status = nf90_inq_varid(ncid_sw_clds,'pade_sizreg_asyliq',varID) - status = nf90_get_var(ncid_sw_clds,varID,pade_sizereg_asyliq_sw) - status = nf90_inq_varid(ncid_sw_clds,'pade_sizreg_extice',varID) - status = nf90_get_var(ncid_sw_clds,varID,pade_sizereg_extice_sw) - status = nf90_inq_varid(ncid_sw_clds,'pade_sizreg_ssaice',varID) - status = nf90_get_var(ncid_sw_clds,varID,pade_sizereg_ssaice_sw) - status = nf90_inq_varid(ncid_sw_clds,'pade_sizreg_asyice',varID) - status = nf90_get_var(ncid_sw_clds,varID,pade_sizereg_asyice_sw) - status = nf90_inq_varid(ncid_sw_clds,'bnd_limits_wavenumber',varID) - status = nf90_get_var(ncid_sw_clds,varID,band_lims_cldy_sw) - status = nf90_close(ncid_sw_clds) - endif - endif - endif - - ! Broadcast arrays to all processors -#ifdef MPI - if (rrtmgp_sw_cld_phys .eq. 1) then - call MPI_BCAST(radliq_lwr_sw, size(radliq_lwr_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(radliq_upr_sw, size(radliq_upr_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(radliq_fac_sw, size(radliq_fac_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(radice_lwr_sw, size(radice_lwr_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(radice_upr_sw, size(radice_upr_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(radice_fac_sw, size(radice_fac_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_extliq_sw, size(lut_extliq_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_ssaliq_sw, size(lut_ssaliq_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_asyliq_sw, size(lut_asyliq_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_extice_sw, size(lut_extice_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_ssaice_sw, size(lut_ssaice_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_asyice_sw, size(lut_asyice_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(band_lims_cldy_sw), size(band_lims_cldy_sw), kind_phys, mpiroot, mpicomm, ierr) - endif - if (rrtmgp_sw_cld_phys .eq. 2) then - call MPI_BCAST(pade_extliq_sw, size(pade_extliq_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_ssaliq_sw, size(pade_ssaliq_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_asyliq_sw, size(pade_asyliq_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_extice_sw, size(pade_extice_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_ssaice_sw, size(pade_ssaice_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_asyice_sw, size(pade_asyice_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_extliq_sw), size(pade_sizereg_extliq_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_ssaliq_sw), size(pade_sizereg_ssaliq_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_asyliq_sw), size(pade_sizereg_asyliq_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_extice_sw), size(pade_sizereg_extice_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_ssaice_sw), size(pade_sizereg_ssaice_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_asyice_sw), size(pade_sizereg_asyice_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(band_lims_cldy_sw), size(band_lims_cldy_sw), kind_phys, mpiroot, mpicomm, ierr) - endif -#endif - - ! Load tables data for RRTGMP cloud-optics - if (rrtmgp_sw_cld_phys .eq. 1) then - call check_error_msg('rrtmgp_sw_init',kdist_cldy_sw%set_ice_roughness(nrghice)) - call check_error_msg('rrtmgp_sw_init',kdist_cldy_sw%load(band_lims_cldy_sw, radliq_lwr_sw, & - radliq_upr_sw, radliq_fac_sw, radice_lwr_sw, radice_upr_sw, radice_fac_sw, & - lut_extliq_sw, lut_ssaliq_sw, lut_asyliq_sw, lut_extice_sw, lut_ssaice_sw, & - lut_asyice_sw)) - endif - if (rrtmgp_sw_cld_phys .eq. 2) then - call check_error_msg('rrtmgp_sw_init',kdist_cldy_sw%set_ice_roughness(nrghice)) - call check_error_msg('rrtmgp_sw_init', kdist_cldy_sw%load(band_lims_cldy_sw, pade_extliq_sw, & - pade_ssaliq_sw, pade_asyliq_sw, pade_extice_sw, pade_ssaice_sw, pade_asyice_sw, & - pade_sizereg_extliq_sw, pade_sizereg_ssaliq_sw, pade_sizereg_asyliq_sw, & - pade_sizereg_extice_sw, pade_sizereg_ssaice_sw, pade_sizereg_asyice_sw)) - endif - end subroutine rrtmgp_sw_init ! ######################################################################################### @@ -674,7 +70,7 @@ end subroutine rrtmgp_sw_init !! | p_lay | air_pressure_at_layer_for_RRTMGP_in_hPa | air pressure layer | hPa | 2 | real | kind_phys | in | F | !! | p_lev | air_pressure_at_interface_for_RRTMGP_in_hPa | air pressure level | hPa | 2 | real | kind_phys | in | F | !! | t_lay | air_temperature_at_layer_for_RRTMGP | air temperature layer | K | 2 | real | kind_phys | in | F | -!! | kdist_sw | K_distribution_file_for_RRTMGP_SW_scheme | DDT containing spectral information for RRTMGP SW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | +!! | sw_gas_props | coefficients_for_sw_gas_optics | DDT containing spectral information for RRTMGP SW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | !! | optical_props_clds | shortwave_optical_properties_for_cloudy_atmosphere | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_2str | | in | F | !! | optical_props_aerosol | shortwave_optical_properties_for_aerosols | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_2str | | in | F | !! | gas_concentrations | Gas_concentrations_for_RRTMGP_suite | DDT containing gas concentrations for RRTMGP radiation scheme | DDT | 0 | ty_gas_concs | | in | F | @@ -694,7 +90,7 @@ end subroutine rrtmgp_sw_init !! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | !! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | !! - subroutine rrtmgp_sw_run(Model, ncol, kdist_sw, p_lay, t_lay, p_lev, gas_concentrations, & + subroutine rrtmgp_sw_run(Model, ncol, sw_gas_props, p_lay, t_lay, p_lev, gas_concentrations, & optical_props_clds, optical_props_aerosol,& lsswr, sfcalb_nir_dir, sfcalb_nir_dif, cossza, nday, idxday, hsw0, hswb, scmpsw, & fluxUP_allsky, fluxDOWN_allsky, fluxUP_clrsky, fluxDOWN_clrsky, errmsg, errflg) @@ -712,8 +108,8 @@ subroutine rrtmgp_sw_run(Model, ncol, kdist_sw, p_lay, t_lay, p_lev, gas_concent real(kind_phys), dimension(ncol,Model%levs+1), intent(in) :: & p_lev ! Pressure @ model layer-interfaces (hPa) type(ty_gas_optics_rrtmgp),intent(in) :: & - kdist_sw ! DDT containing SW spectral information - real(kind_phys), dimension(kdist_sw%get_nband(),ncol), intent(in) :: & + sw_gas_props ! DDT containing SW spectral information + real(kind_phys), dimension(sw_gas_props%get_nband(),ncol), intent(in) :: & sfcalb_nir_dir, & ! Surface albedo direct (near-IR) (1) sfcalb_nir_dif ! Surface albedo diffuse (near-IR) (1) real(kind_phys), dimension(ncol), intent(in) :: & @@ -739,7 +135,7 @@ subroutine rrtmgp_sw_run(Model, ncol, kdist_sw, p_lay, t_lay, p_lev, gas_concent ! Inputs (optional) (NOTE. We only need the optional arguments to know what fluxes to output, HR's are computed later) real(kind_phys), dimension(ncol,Model%levs), optional, intent(inout) :: & hsw0 ! Clear-sky heating rate (K/sec) - real(kind_phys), dimension(ncol,Model%levs,kdist_sw%get_nband()), intent(inout), optional :: & + real(kind_phys), dimension(ncol,Model%levs,sw_gas_props%get_nband()), intent(inout), optional :: & hswb ! All-sky heating rate, by band (K/sec) ! Outputs (optional) type(cmpfsw_type), dimension(ncol), intent(inout),optional :: & @@ -757,7 +153,7 @@ subroutine rrtmgp_sw_run(Model, ncol, kdist_sw, p_lay, t_lay, p_lev, gas_concent flux_clrsky ! Clear-sky flux (W/m2) real(kind_phys), dimension(nday,Model%levs+1),target :: & fluxSW_up_allsky, fluxSW_up_clrsky, fluxSW_dn_allsky, fluxSW_dn_clrsky - real(kind_phys), dimension(nday,Model%levs+1,kdist_sw%get_nband()),target :: & + real(kind_phys), dimension(nday,Model%levs+1,sw_gas_props%get_nband()),target :: & fluxSWBB_up_allsky, fluxSWBB_dn_allsky real(kind_phys), dimension(ncol,Model%levs) :: vmrTemp logical :: l_ClrSky_HR=.false., l_AllSky_HR_byband=.false., l_scmpsw=.false. @@ -790,20 +186,20 @@ subroutine rrtmgp_sw_run(Model, ncol, kdist_sw, p_lay, t_lay, p_lev, gas_concent ! Subset the cloud and aerosol radiative properties over daylit points. ! Cloud optics [nDay,Model%levs,nBands] - call check_error_msg('rrtmgp_sw_run',optical_props_clds_daylit%alloc_2str(nday, Model%levs, kdist_sw)) + call check_error_msg('rrtmgp_sw_run',optical_props_clds_daylit%alloc_2str(nday, Model%levs, sw_gas_props)) optical_props_clds_daylit%tau = optical_props_clds%tau(idxday,:,:) optical_props_clds_daylit%ssa = optical_props_clds%ssa(idxday,:,:) optical_props_clds_daylit%g = optical_props_clds%g(idxday,:,:) ! Aerosol optics [nDay,Model%levs,nBands] - call check_error_msg('rrtmgp_sw_run',optical_props_aerosol_daylit%alloc_2str(nday, Model%levs, kdist_sw%get_band_lims_wavenumber())) + call check_error_msg('rrtmgp_sw_run',optical_props_aerosol_daylit%alloc_2str(nday, Model%levs, sw_gas_props%get_band_lims_wavenumber())) optical_props_aerosol_daylit%tau = optical_props_aerosol%tau(idxday,:,:) optical_props_aerosol_daylit%ssa = optical_props_aerosol%ssa(idxday,:,:) optical_props_aerosol_daylit%g = optical_props_aerosol%g(idxday,:,:) ! Similarly, subset the gas concentrations. - do iGas=1,nGases + do iGas=1,size(active_gases,1) call check_error_msg('rrtmgp_sw_run',gas_concentrations%get_vmr(trim(active_gases(iGas)),vmrTemp)) - call check_error_msg('rrtmgp_sw_run',gas_concentrations_daylit%set_vmr(active_gases(iGas),vmrTemp(idxday,:))) + call check_error_msg('rrtmgp_sw_run',gas_concentrations_daylit%set_vmr(trim(active_gases(iGas)),vmrTemp(idxday,:))) enddo ! Initialize RRTMGP DDT containing 2D(3D) fluxes @@ -819,7 +215,7 @@ subroutine rrtmgp_sw_run(Model, ncol, kdist_sw, p_lay, t_lay, p_lev, gas_concent ! Call RRTMGP SW scheme call check_error_msg('rrtmgp_sw_run',rte_sw( & - kdist_sw, & ! IN - spectral information + sw_gas_props, & ! IN - spectral information gas_concentrations_daylit, & ! IN - gas concentrations (vmr) p_lay(idxday,1:Model%levs), & ! IN - pressure at layer interfaces (Pa) t_lay(idxday,1:Model%levs), & ! IN - temperature at layer interfaes (K) @@ -841,14 +237,4 @@ end subroutine rrtmgp_sw_run subroutine rrtmgp_sw_finalize() end subroutine rrtmgp_sw_finalize - subroutine check_error_msg(routine_name, error_msg) - character(len=*), intent(in) :: & - error_msg, routine_name - - if(error_msg /= "") then - print*,"ERROR("//trim(routine_name)//"): " - print*,trim(error_msg) - return - end if - end subroutine check_error_msg end module rrtmgp_sw diff --git a/physics/rrtmgp_sw_pre.F90 b/physics/rrtmgp_sw_pre.F90 index 4f3fefa5f..1891cf2b9 100644 --- a/physics/rrtmgp_sw_pre.F90 +++ b/physics/rrtmgp_sw_pre.F90 @@ -27,7 +27,7 @@ end subroutine rrtmgp_sw_pre_init !! | idxday | daytime_points | daytime points | index | 1 | integer | | out | F | !! | tsfg | surface_ground_temperature_for_radiation | surface ground temperature for radiation | K | 1 | real | kind_phys | in | F | !! | tsfa | surface_air_temperature_for_radiation | lowest model layer air temperature for radiation | K | 1 | real | kind_phys | in | F | -!! | kdist_sw | K_distribution_file_for_RRTMGP_SW_scheme | DDT containing spectral information for RRTMGP SW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | +!! | sw_gas_props | coefficients_for_sw_gas_optics | DDT containing spectral information for RRTMGP SW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | !! | sfc_alb_nir_dir | surface_shortwave_albedo_near_infrared_direct_in_each_band | surface sw near-infrared direct albedo in each SW band | frac | 2 | real | kind_phys | out | F | !! | sfc_alb_nir_dif | surface_shortwave_albedo_near_infrared_diffuse_in_each_band | surface sw near-infrared diffuse albedo in each SW band | frac | 2 | real | kind_phys | out | F | !! | sfc_alb_uvvis_dir | surface_shortwave_albedo_uv_visible_direct_in_each_band | surface sw uv-visible direct albedo in each SW band | frac | 2 | real | kind_phys | out | F | @@ -36,13 +36,13 @@ end subroutine rrtmgp_sw_pre_init !! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | !! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | !! - subroutine rrtmgp_sw_pre_run (Model, Grid, Sfcprop, Radtend, im, kdist_sw, & + subroutine rrtmgp_sw_pre_run (Model, Grid, Sfcprop, Radtend, im, sw_gas_props, & nday, idxday, tsfg, tsfa, sfc_alb_nir_dir, sfc_alb_nir_dif, sfc_alb_uvvis_dir, & sfc_alb_uvvis_dif, alb1d, errmsg, errflg) ! Inputs type(ty_gas_optics_rrtmgp),intent(in) :: & - kdist_sw ! RRTMGP DDT containing spectral information for SW calculation + sw_gas_props ! RRTMGP DDT containing spectral information for SW calculation type(GFS_control_type), intent(in) :: Model type(GFS_radtend_type), intent(inout) :: Radtend type(GFS_sfcprop_type), intent(in) :: Sfcprop @@ -54,7 +54,7 @@ subroutine rrtmgp_sw_pre_run (Model, Grid, Sfcprop, Radtend, im, kdist_sw, & real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(in) :: alb1d ! Outputs - real(kind_phys),dimension(kdist_sw%get_nband(),IM),intent(out) :: & + real(kind_phys),dimension(sw_gas_props%get_nband(),IM),intent(out) :: & sfc_alb_nir_dir, & ! Shortwave surface albedo (nIR-direct) sfc_alb_nir_dif, & ! Shortwave surface albedo (nIR-diffuse) sfc_alb_uvvis_dir, & ! Shortwave surface albedo (uvvis-direct) @@ -100,7 +100,7 @@ subroutine rrtmgp_sw_pre_run (Model, Grid, Sfcprop, Radtend, im, kdist_sw, & endif ! Spread across all SW bands - do iBand=1,kdist_sw%get_nband() + do iBand=1,sw_gas_props%get_nband() sfc_alb_nir_dir(iBand,1:IM) = sfcalb(1:IM,1) sfc_alb_nir_dif(iBand,1:IM) = sfcalb(1:IM,2) sfc_alb_uvvis_dir(iBand,1:IM) = sfcalb(1:IM,3) From a4bdffeaab6b44b9237af0836d99d288fdd947c5 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Wed, 5 Jun 2019 16:45:48 -0600 Subject: [PATCH 033/167] Major reorganization. Added schemes for cloud-optics and gas optics. Added RRTMGP active gases to gfs_physics_nml. --- physics/GFS_rrtmgp_gas_optics.F90 | 68 + physics/GFS_rrtmgp_lw.F90 | 218 --- physics/GFS_rrtmgp_lw_post.F90 | 2 +- physics/GFS_rrtmgp_pre.F90 | 8 +- physics/GFS_rrtmgp_sw.F90 | 218 --- physics/GFS_rrtmgp_sw_post.F90 | 2 +- physics/rrtmg_lw_cloud_optics.F90 | 802 ++++++++ physics/rrtmg_sw_cloud_optics.F90 | 2412 +++++++++++++++++++++++ physics/rrtmgp_aux.F90 | 1370 ------------- physics/rrtmgp_lw.F90 | 72 +- physics/rrtmgp_lw_cloud_optics.F90 | 1272 +++++------- physics/rrtmgp_lw_gas_optics.F90 | 430 +++++ physics/rrtmgp_sw.F90 | 66 +- physics/rrtmgp_sw_cloud_optics.F90 | 2894 +++++----------------------- physics/rrtmgp_sw_gas_optics.F90 | 432 +++++ 15 files changed, 5183 insertions(+), 5083 deletions(-) create mode 100644 physics/GFS_rrtmgp_gas_optics.F90 delete mode 100644 physics/GFS_rrtmgp_lw.F90 delete mode 100644 physics/GFS_rrtmgp_sw.F90 create mode 100644 physics/rrtmg_lw_cloud_optics.F90 create mode 100644 physics/rrtmg_sw_cloud_optics.F90 delete mode 100644 physics/rrtmgp_aux.F90 create mode 100644 physics/rrtmgp_lw_gas_optics.F90 create mode 100644 physics/rrtmgp_sw_gas_optics.F90 diff --git a/physics/GFS_rrtmgp_gas_optics.F90 b/physics/GFS_rrtmgp_gas_optics.F90 new file mode 100644 index 000000000..d13d77a37 --- /dev/null +++ b/physics/GFS_rrtmgp_gas_optics.F90 @@ -0,0 +1,68 @@ +module GFS_rrtmgp_gas_optics + use machine, only: kind_phys + use GFS_typedefs, only: GFS_control_type,GFS_radtend_type +contains + +!! \section arg_table_GFS_rrtmgp_gas_optics_init Argument Table +!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | +!! |--------------|-----------------------------------|---------------------------------------------------------|----------|------|-----------------------|-----------|--------|----------| +!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | +!! | Radtend | GFS_radtend_type_instance | Fortran DDT containing FV3-GFS radiation tendencies | DDT | 0 | GFS_radtend_type | | inout | F | +!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | +!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! + ! ######################################################################################### + ! SUBROUTINE GFS_rrtmgp_gas_optics_init() + ! ######################################################################################### + subroutine GFS_rrtmgp_gas_optics_init(Model, Radtend, errmsg, errflg) + ! Inputs + type(GFS_control_type), intent(in) :: & + Model ! DDT containing model control parameters + type(GFS_radtend_type), intent(inout) :: & + Radtend ! Fortran DDT containing FV3-GFS radiation tendencies + ! Outputs + character(len=*), intent(out) :: & + errmsg ! Error message + integer, intent(out) :: & + errflg ! Error flag + + ! Local variables + character(len=1) :: tempstr + integer :: ij, count + integer,dimension(Model%ngases,2) :: gasIndices + + ! Initialize + errmsg = '' + errflg = 0 + + + ! Which gases are active? Provided via physics namelist. + if (len(Model%active_gases) .gt. 0) then + + ! Pull out gas names from list... + ! First grab indices in character array corresponding to start:end of gas name. + gasIndices(1,1)=1 + count=1 + do ij=1,len(Model%active_gases) + tempstr=trim(Model%active_gases(ij:ij)) + if (tempstr .eq. '_') then + gasIndices(count,2)=ij-1 + gasIndices(count+1,1)=ij+1 + count=count+1 + endif + enddo + gasIndices(Model%ngases,2)=len(trim(Model%active_gases)) + ! Now extract the gas names + do ij=1,Model%ngases + Radtend%active_gases(ij) = Model%active_gases(gasIndices(ij,1):gasIndices(ij,2)) + enddo + endif + end subroutine GFS_rrtmgp_gas_optics_init + ! + subroutine GFS_rrtmgp_gas_optics_run() + end subroutine GFS_rrtmgp_gas_optics_run + ! + subroutine GFS_rrtmgp_gas_optics_finalize() + end subroutine GFS_rrtmgp_gas_optics_finalize + ! +end module GFS_rrtmgp_gas_optics diff --git a/physics/GFS_rrtmgp_lw.F90 b/physics/GFS_rrtmgp_lw.F90 deleted file mode 100644 index 2721ed495..000000000 --- a/physics/GFS_rrtmgp_lw.F90 +++ /dev/null @@ -1,218 +0,0 @@ -module GFS_rrtmgp_lw - use GFS_typedefs, only: GFS_control_type - use machine, only: kind_phys - use physparam, only: isubclw, iovrlw - use rrtmgp_aux, only: nrghice_lw, ipsdlw0 - use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp - use mo_cloud_optics, only: ty_cloud_optics - use mo_optical_props, only: ty_optical_props_1scl, ty_optical_props_2str - use mo_cloud_sampling, only: sampled_mask_max_ran, sampled_mask_exp_ran, draw_samples - use mo_gas_concentrations, only: ty_gas_concs - use mersenne_twister, only: random_setseed, random_number, random_stat - use mo_rrtmgp_lw_cloud_optics, only: rrtmgp_lw_cloud_optics - public GFS_rrtmgp_lw_run,GFS_rrtmgp_lw_init,GFS_rrtmgp_lw_finalize - -contains - - subroutine GFS_rrtmgp_lw_init() - end subroutine GFS_rrtmgp_lw_init - ! ######################################################################################### - ! ######################################################################################### -!! \section arg_table_GFS_rrtmgp_lw_run Argument Table -!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | -!! |-----------------------|-----------------------------------------------------|------------------------------------------------------------------------------|---------|------|-----------------------|-----------|--------|----------| -!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | -!! | ncol | horizontal_loop_extent | horizontal dimension | count | 0 | integer | | in | F | -!! | p_lay | air_pressure_at_layer_for_RRTMGP_in_hPa | air pressure layer | hPa | 2 | real | kind_phys | in | F | -!! | t_lay | air_temperature_at_layer_for_RRTMGP | air temperature layer | K | 2 | real | kind_phys | in | F | -!! | p_lev | air_pressure_at_interface_for_RRTMGP_in_hPa | air pressure level | hPa | 2 | real | kind_phys | in | F | -!! | cld_frac | total_cloud_fraction | layer total cloud fraction | frac | 2 | real | kind_phys | in | F | -!! | cld_lwp | cloud_liquid_water_path | layer cloud liquid water path | g m-2 | 2 | real | kind_phys | in | F | -!! | cld_reliq | mean_effective_radius_for_liquid_cloud | mean effective radius for liquid cloud | micron | 2 | real | kind_phys | in | F | -!! | cld_iwp | cloud_ice_water_path | layer cloud ice water path | g m-2 | 2 | real | kind_phys | in | F | -!! | cld_reice | mean_effective_radius_for_ice_cloud | mean effective radius for ice cloud | micron | 2 | real | kind_phys | in | F | -!! | cld_swp | cloud_snow_water_path | layer cloud snow water path | g m-2 | 2 | real | kind_phys | in | F | -!! | cld_resnow | mean_effective_radius_for_snow_flake | mean effective radius for snow cloud | micron | 2 | real | kind_phys | in | F | -!! | cld_rwp | cloud_rain_water_path | layer cloud rain water path | g m-2 | 2 | real | kind_phys | in | F | -!! | cld_rerain | mean_effective_radius_for_rain_drop | mean effective radius for rain cloud | micron | 2 | real | kind_phys | in | F | -!! | gas_concentrations | Gas_concentrations_for_RRTMGP_suite | DDT containing gas concentrations for RRTMGP radiation scheme | DDT | 0 | ty_gas_concs | | in | F | -!! | icseed_lw | seed_random_numbers_sw | seed for random number generation for shortwave radiation | none | 1 | integer | | in | F | -!! | lw_gas_props | coefficients_for_lw_gas_optics | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | -!! | aerosols | aerosol_optical_properties_for_longwave_bands_01-16 | aerosol optical properties for longwave bands 01-16 | various | 4 | real | kind_phys | in | F | -!! | lw_cloud_props | coefficients_for_lw_cloud_optics | DDT containing spectral information for cloudy RRTMGP LW radiation scheme | DDT | 0 | ty_cloud_optics | | in | F | -!! | optical_props_clouds | longwave_optical_properties_for_cloudy_atmosphere | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_1scl | | out | F | -!! | optical_props_aerosol | longwave_optical_properties_for_aerosols | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_1scl | | out | F | -!! | cldtaulw | cloud_optical_depth_layers_at_10mu_band | approx 10mu band layer cloud optical depth | none | 2 | real | kind_phys | out | F | -!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | -!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | -!! - ! ######################################################################################### - ! ######################################################################################### - subroutine GFS_rrtmgp_lw_run(Model, ncol, icseed_lw, p_lay, t_lay, p_lev, cld_frac, & - cld_lwp, cld_reliq, cld_iwp, cld_reice, cld_swp, cld_resnow, cld_rwp, cld_rerain, & - gas_concentrations, lw_gas_props, aerosols, lw_cloud_props, & - optical_props_clouds, optical_props_aerosol, cldtaulw, errmsg, errflg) - - ! Inputs - type(GFS_control_type), intent(in) :: & - Model - integer, intent(in) :: & - ncol ! Number of horizontal gridpoints - integer,intent(in),dimension(ncol) :: & - icseed_lw ! auxiliary special cloud related array when module - ! variable isubclw=2, it provides permutation seed - ! for each column profile that are used for generating - ! random numbers. when isubclw /=2, it will not be used. - real(kind_phys), dimension(ncol,model%levs), intent(in) :: & - p_lay, & ! Pressure @ model layer-centers (hPa) - t_lay ! Temperature (K) - real(kind_phys), dimension(ncol,model%levs+1), intent(in) :: & - p_lev ! Pressure @ model layer-interfaces (hPa) - real(kind_phys), dimension(ncol,model%levs),intent(in) :: & - cld_frac, & ! Total cloud fraction by layer - cld_lwp, & ! Cloud liquid water path - cld_reliq, & ! Cloud liquid effective radius - cld_iwp, & ! Cloud ice water path - cld_reice, & ! Cloud ice effective radius - cld_swp, & ! Cloud snow water path - cld_resnow, & ! Cloud snow effective radius - cld_rwp, & ! Cloud rain water path - cld_rerain ! Cloud rain effective radius - type(ty_gas_concs),intent(in) :: & - gas_concentrations ! - type(ty_gas_optics_rrtmgp),intent(in) :: & - lw_gas_props ! RRTMGP DDT containing spectral information for LW calculation - type(ty_cloud_optics),intent(in) :: & - lw_cloud_props ! - real(kind_phys), intent(in),dimension(ncol, model%levs, lw_gas_props%get_nband(),3) :: & - aerosols ! - real(kind_phys), dimension(ncol,Model%levs), intent(out) :: & - cldtaulw ! approx 10.mu band layer cloud optical depth - - ! Outputs - type(ty_optical_props_1scl),intent(out) :: & - optical_props_clouds, & - optical_props_aerosol - integer, intent(out) :: errflg - character(len=*), intent(out) :: errmsg - - ! Local variables - integer :: iCol - integer,dimension(ncol) :: ipseed_lw - logical,dimension(ncol,model%levs) :: liqmask, icemask - type(ty_optical_props_1scl) :: optical_props_cloudsByBand - type(random_stat) :: rng_stat - real(kind_phys), dimension(lw_gas_props%get_ngpt(),model%levs,ncol) :: rng3D - real(kind_phys), dimension(lw_gas_props%get_ngpt()*model%levs) :: rng1D - logical, dimension(ncol,model%levs,lw_gas_props%get_ngpt()) :: cldfracMCICA - real(kind_phys), dimension(ncol,model%levs,lw_gas_props%get_nband()) :: & - tau_cld - - ! Initialize CCPP error handling variables - errmsg = '' - errflg = 0 - - if (.not. Model%lslwr) return - - ! ####################################################################################### - ! Change random number seed value for each radiation invocation (isubclw =1 or 2). - ! ####################################################################################### - if(isubclw == 1) then ! advance prescribed permutation seed - do iCol = 1, nCol - ipseed_lw(iCol) = ipsdlw0 + iCol - enddo - elseif (isubclw == 2) then ! use input array of permutaion seeds - do iCol = 1, nCol - ipseed_lw(iCol) = icseed_lw(iCol) - enddo - endif - - ! ####################################################################################### - ! Compute ice/liquid cloud masks, needed by rrtmgp_cloud_optics - ! ####################################################################################### - liqmask = (cld_frac .gt. 0 .and. cld_lwp .gt. 0) - icemask = (cld_frac .gt. 0 .and. cld_iwp .gt. 0) - - ! ####################################################################################### - ! Allocate space for RRTMGP DDTs containing cloud and aerosol radiative properties - ! ####################################################################################### - ! Cloud optics [nCol,model%levs,nBands] - call check_error_msg('GFS_rrtmgp_lw_run',optical_props_cloudsByBand%alloc_1scl(ncol, model%levs, lw_gas_props%get_band_lims_wavenumber())) - ! Aerosol optics [Ccol,model%levs,nBands] - call check_error_msg('GFS_rrtmgp_lw_run',optical_props_aerosol%alloc_1scl(ncol, model%levs, lw_gas_props%get_band_lims_wavenumber())) - ! Cloud optics [nCol,model%levs,nGpts] - call check_error_msg('GFS_rrtmgp_lw_run',optical_props_clouds%alloc_1scl(ncol, model%levs, lw_gas_props)) - - ! ####################################################################################### - ! Copy aerosol optical information to RRTMGP DDT - ! ####################################################################################### - optical_props_aerosol%tau = aerosols(:,:,:,1) * (1. - aerosols(:,:,:,2)) - - ! ####################################################################################### - ! Compute cloud-optics for RTE. - ! ####################################################################################### - if (Model%rrtmgp_cld_optics .gt. 0) then - ! i) RRTMGP cloud-optics. - call check_error_msg('GFS_rrtmgp_lw_run',lw_cloud_props%cloud_optics(& - ncol, & ! IN - Number of horizontal gridpoints - model%levs, & ! IN - Number of vertical layers - lw_gas_props%get_nband(), & ! IN - Number of LW bands - nrghice_lw, & ! IN - Number of ice-roughness categories - liqmask, & ! IN - Liquid-cloud mask - icemask, & ! IN - Ice-cloud mask - cld_lwp, & ! IN - Cloud liquid water path - cld_iwp, & ! IN - Cloud ice water path - cld_reliq, & ! IN - Cloud liquid effective radius - cld_reice, & ! IN - Cloud ice effective radius - optical_props_cloudsByBand)) ! OUT - RRTMGP DDT containing cloud radiative properties - ! in each band - else - ! ii) RRTMG cloud-optics. - if (any(cld_frac .gt. 0)) then - call rrtmgp_lw_cloud_optics(ncol, model%levs, lw_gas_props%get_nband(), cld_lwp, & - cld_reliq, cld_iwp, cld_reice, cld_rwp, cld_rerain, cld_swp, cld_resnow, & - cld_frac, tau_cld) - optical_props_cloudsByBand%tau = tau_cld - endif - endif - - ! ####################################################################################### - ! Call McICA to generate subcolumns. - ! ####################################################################################### - ! Call RNG. Mersennse Twister accepts 1D array, so loop over columns and collapse along G-points - ! and layers. ([nGpts,model%levs,nColumn]-> [nGpts*model%levs]*nColumn) - do iCol=1,ncol - call random_setseed(ipseed_lw(icol),rng_stat) - call random_number(rng1D,rng_stat) - rng3D(:,:,iCol) = reshape(source = rng1D,shape=[lw_gas_props%get_ngpt(),model%levs]) - enddo - - ! Call McICA - select case ( iovrlw ) - ! Maximumn-random - case(1) - call check_error_msg('GFS_rrtmgp_lw_run',sampled_mask_max_ran(rng3D,cld_frac,cldfracMCICA)) - end select - - ! Map band optical depth to each g-point using McICA - call check_error_msg('GFS_rrtmgp_lw_run',draw_samples(cldfracMCICA,optical_props_cloudsByBand,optical_props_clouds)) - - ! GFS_RRTMGP_POST_RUN() requires the LW optical depth ~10microns - cldtaulw = optical_props_cloudsByBand%tau(:,:,7) - - end subroutine GFS_rrtmgp_lw_run - - subroutine GFS_rrtmgp_lw_finalize() - end subroutine GFS_rrtmgp_lw_finalize - - subroutine check_error_msg(routine_name, error_msg) - character(len=*), intent(in) :: & - error_msg, routine_name - - if(error_msg /= "") then - print*,"ERROR("//trim(routine_name)//"): " - print*,trim(error_msg) - return - end if - end subroutine check_error_msg -end module GFS_rrtmgp_lw diff --git a/physics/GFS_rrtmgp_lw_post.F90 b/physics/GFS_rrtmgp_lw_post.F90 index 3562be382..ab8c1b2e7 100644 --- a/physics/GFS_rrtmgp_lw_post.F90 +++ b/physics/GFS_rrtmgp_lw_post.F90 @@ -14,7 +14,7 @@ module GFS_rrtmgp_lw_post use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp use mo_fluxes_byband, only: ty_fluxes_byband use mo_heating_rates, only: compute_heating_rate - use rrtmgp_aux, only: check_error_msg + use rrtmgp_lw_gas_optics, only: check_error_msg implicit none public GFS_rrtmgp_lw_post_init,GFS_rrtmgp_lw_post_run,GFS_rrtmgp_lw_post_finalize diff --git a/physics/GFS_rrtmgp_pre.F90 b/physics/GFS_rrtmgp_pre.F90 index 7a9c42cf1..85b151bc2 100644 --- a/physics/GFS_rrtmgp_pre.F90 +++ b/physics/GFS_rrtmgp_pre.F90 @@ -54,7 +54,7 @@ module GFS_rrtmgp_pre ! RRTMGP types use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp use mo_gas_concentrations, only: ty_gas_concs - use rrtmgp_aux, only: check_error_msg + use rrtmgp_lw_gas_optics, only: check_error_msg real(kind_phys), parameter :: & amd = 28.9644_kind_phys, & ! Molecular weight of dry-air (g/mol) @@ -66,11 +66,7 @@ module GFS_rrtmgp_pre public GFS_rrtmgp_pre_run,GFS_rrtmgp_pre_init,GFS_rrtmgp_pre_finalize contains - -!> \defgroup GFS_rrtmgp_pre GFS RRTMGP Scheme Pre -!! @{ -!! \section arg_table_GFS_rrtmgp_pre_init Argument Table -!! + subroutine GFS_rrtmgp_pre_init () end subroutine GFS_rrtmgp_pre_init diff --git a/physics/GFS_rrtmgp_sw.F90 b/physics/GFS_rrtmgp_sw.F90 deleted file mode 100644 index ab2880eab..000000000 --- a/physics/GFS_rrtmgp_sw.F90 +++ /dev/null @@ -1,218 +0,0 @@ -module GFS_rrtmgp_sw - use GFS_typedefs, only: GFS_control_type - use machine, only: kind_phys - use physparam, only: isubcsw, iovrsw - use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp - use mo_cloud_optics, only: ty_cloud_optics - use mo_optical_props, only: ty_optical_props_2str - use mo_cloud_sampling, only: sampled_mask_max_ran, sampled_mask_exp_ran, draw_samples - use mersenne_twister, only: random_setseed, random_number, random_stat - use mo_rrtmgp_sw_cloud_optics, only: rrtmgp_sw_cloud_optics - use rrtmgp_aux, only: check_error_msg, nrghice_sw, ipsdsw0 - - public GFS_rrtmgp_sw_run,GFS_rrtmgp_sw_init,GFS_rrtmgp_sw_finalize - -contains - - ! ######################################################################################### - ! ######################################################################################### - subroutine GFS_rrtmgp_sw_init() - end subroutine GFS_rrtmgp_sw_init - -!! \section arg_table_GFS_rrtmgp_sw_run Argument Table -!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | -!! |-----------------------|------------------------------------------------------|------------------------------------------------------------------------------|---------|------|-----------------------|-----------|--------|----------| -!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | -!! | ncol | horizontal_loop_extent | horizontal dimension | count | 0 | integer | | in | F | -!! | p_lay | air_pressure_at_layer_for_RRTMGP_in_hPa | air pressure layer | hPa | 2 | real | kind_phys | in | F | -!! | t_lay | air_temperature_at_layer_for_RRTMGP | air temperature layer | K | 2 | real | kind_phys | in | F | -!! | p_lev | air_pressure_at_interface_for_RRTMGP_in_hPa | air pressure level | hPa | 2 | real | kind_phys | in | F | -!! | cld_frac | total_cloud_fraction | layer total cloud fraction | frac | 2 | real | kind_phys | in | F | -!! | cld_lwp | cloud_liquid_water_path | layer cloud liquid water path | g m-2 | 2 | real | kind_phys | in | F | -!! | cld_reliq | mean_effective_radius_for_liquid_cloud | mean effective radius for liquid cloud | micron | 2 | real | kind_phys | in | F | -!! | cld_iwp | cloud_ice_water_path | layer cloud ice water path | g m-2 | 2 | real | kind_phys | in | F | -!! | cld_reice | mean_effective_radius_for_ice_cloud | mean effective radius for ice cloud | micron | 2 | real | kind_phys | in | F | -!! | cld_swp | cloud_snow_water_path | layer cloud snow water path | g m-2 | 2 | real | kind_phys | in | F | -!! | cld_resnow | mean_effective_radius_for_snow_flake | mean effective radius for snow cloud | micron | 2 | real | kind_phys | in | F | -!! | cld_rwp | cloud_rain_water_path | layer cloud rain water path | g m-2 | 2 | real | kind_phys | in | F | -!! | cld_rerain | mean_effective_radius_for_rain_drop | mean effective radius for rain cloud | micron | 2 | real | kind_phys | in | F | -!! | icseed_sw | seed_random_numbers_sw | seed for random number generation for shortwave radiation | none | 1 | integer | | in | F | -!! | sw_gas_props | coefficients_for_sw_gas_optics | DDT containing spectral information for RRTMGP SW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | -!! | aerosols | aerosol_optical_properties_for_shortwave_bands_01-16 | aerosol optical properties for shortwave bands 01-16 | various | 4 | real | kind_phys | in | F | -!! | sw_cloud_props | coefficients_for_sw_cloud_optics | DDT containing spectral information for cloudy RRTMGP SW radiation scheme | DDT | 0 | ty_cloud_optics | | in | F | -!! | nday | daytime_points_dimension | daytime points dimension | count | 0 | integer | | in | F | -!! | idxday | daytime_points | daytime points | index | 1 | integer | | in | F | -!! | optical_props_clouds | shortwave_optical_properties_for_cloudy_atmosphere | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_2str | | out | F | -!! | optical_props_aerosol | shortwave_optical_properties_for_aerosols | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_2str | | out | F | -!! | cldtausw | cloud_optical_depth_layers_at_0.55mu_band | approx .55mu band layer cloud optical depth | none | 2 | real | kind_phys | out | F | -!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | -!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | -!! - ! ######################################################################################### - ! ######################################################################################### - subroutine GFS_rrtmgp_sw_run(Model, ncol, icseed_sw, p_lay, t_lay, p_lev, cld_frac, & ! IN - cld_lwp, cld_reliq, cld_iwp, cld_reice, cld_swp, cld_resnow, cld_rwp, cld_rerain, & ! IN - sw_gas_props, aerosols, sw_cloud_props, nday, idxday, & ! IN - optical_props_clouds, optical_props_aerosol, cldtausw, errmsg, errflg) ! OUT - - ! Inputs - type(GFS_control_type), intent(in) :: & - Model - integer, intent(in) :: & - ncol, & ! Number of horizontal gridpoints - nday ! Number of daylit points. - integer,intent(in),dimension(nday) :: & - idxday ! Indices for daylit points. - integer,intent(in),dimension(ncol) :: & - icseed_sw ! auxiliary special cloud related array when module - ! variable isubcsw=2, it provides permutation seed - ! for each column profile that are used for generating - ! random numbers. when isubcsw /=2, it will not be used. - real(kind_phys), dimension(ncol,model%levs), intent(in) :: & - p_lay, & ! Pressure @ model layer-centers (hPa) - t_lay ! Temperature (K) - real(kind_phys), dimension(ncol,model%levs+1), intent(in) :: & - p_lev ! Pressure @ model layer-interfaces (hPa) - real(kind_phys), dimension(ncol,model%levs),intent(in) :: & - cld_frac, & ! Total cloud fraction by layer - cld_lwp, & ! Cloud liquid water path - cld_reliq, & ! Cloud liquid effective radius - cld_iwp, & ! Cloud ice water path - cld_reice, & ! Cloud ice effective radius - cld_swp, & ! Cloud snow water path - cld_resnow, & ! Cloud snow effective radius - cld_rwp, & ! Cloud rain water path - cld_rerain ! Cloud rain effective radius - type(ty_gas_optics_rrtmgp),intent(in) :: & - sw_gas_props ! RRTMGP DDT containing spectral information for SW calculation - type(ty_cloud_optics),intent(in) :: & - sw_cloud_props ! - real(kind_phys), intent(in),dimension(ncol, model%levs, sw_gas_props%get_nband(),3) :: & - aerosols ! - - ! Outputs - type(ty_optical_props_2str),intent(out) :: & - optical_props_clouds, & - optical_props_aerosol - real(kind_phys), dimension(ncol,Model%levs), intent(out) :: & - cldtausw ! approx 10.mu band layer cloud optical depth - integer, intent(out) :: errflg - character(len=*), intent(out) :: errmsg - - ! Local variables - integer :: iCol - integer,dimension(ncol) :: ipseed_sw - logical,dimension(ncol,model%levs) :: liqmask, icemask - type(ty_optical_props_2str) :: optical_props_cloudsByBand - type(random_stat) :: rng_stat - real(kind_phys), dimension(sw_gas_props%get_ngpt(),model%levs,ncol) :: rng3D - real(kind_phys), dimension(sw_gas_props%get_ngpt()*model%levs) :: rng1D - logical, dimension(ncol,model%levs,sw_gas_props%get_ngpt()) :: cldfracMCICA - real(kind_phys), dimension(nday,model%levs,sw_gas_props%get_nband()) :: & - tau_cld, ssa_cld, asy_cld - - ! Initialize CCPP error handling variables - errmsg = '' - errflg = 0 - - if (.not. Model%lsswr) return - - ! ####################################################################################### - ! Change random number seed value for each radiation invocation (isubcsw =1 or 2). - ! ####################################################################################### - if(isubcsw == 1) then ! advance prescribed permutation seed - do iCol = 1, ncol - ipseed_sw(iCol) = ipsdsw0 + iCol - enddo - elseif (isubcsw == 2) then ! use input array of permutaion seeds - do iCol = 1, ncol - ipseed_sw(iCol) = icseed_sw(iCol) - enddo - endif - - ! ####################################################################################### - ! Compute ice/liquid cloud masks, needed by rrtmgp_cloud_optics - ! ####################################################################################### - liqmask = (cld_frac .gt. 0 .and. cld_lwp .gt. 0) - icemask = (cld_frac .gt. 0 .and. cld_iwp .gt. 0) - - ! ####################################################################################### - ! Allocate space for RRTMGP DDTs containing cloud and aerosol radiative properties - ! ####################################################################################### - ! Cloud optics [ncol,model%levs,nBands] - call check_error_msg('GFS_rrtmgp_sw_run',optical_props_cloudsByBand%alloc_2str(ncol, model%levs, sw_gas_props%get_band_lims_wavenumber())) - ! Aerosol optics [ncol,model%levs,nBands] - call check_error_msg('GFS_rrtmgp_sw_run',optical_props_aerosol%alloc_2str(ncol, model%levs, sw_gas_props%get_band_lims_wavenumber())) - ! Cloud optics [ncol,model%levs,nGpts] - call check_error_msg('GFS_rrtmgp_sw_run',optical_props_clouds%alloc_2str(ncol, model%levs, sw_gas_props)) - - ! ####################################################################################### - ! Copy aerosol optical information to RRTMGP DDT - ! ####################################################################################### - optical_props_aerosol%tau = aerosols(:,:,:,1) - optical_props_aerosol%ssa = aerosols(:,:,:,2) - optical_props_aerosol%g = aerosols(:,:,:,3) - - ! ####################################################################################### - ! Compute cloud-optics for RTE. - ! ####################################################################################### - if (Model%rrtmgp_cld_optics .gt. 0) then - ! RRTMGP cloud-optics. - call check_error_msg('GFS_rrtmgp_sw_run',sw_cloud_props%cloud_optics(& - ncol, & ! IN - Number of daylit gridpoints - model%levs, & ! IN - Number of vertical layers - sw_gas_props%get_nband(), & ! IN - Number of SW bands - nrghice_sw, & ! IN - Number of ice-roughness categories - liqmask, & ! IN - Liquid-cloud mask - icemask, & ! IN - Ice-cloud mask - cld_lwp, & ! IN - Cloud liquid water path - cld_iwp, & ! IN - Cloud ice water path - cld_reliq, & ! IN - Cloud liquid effective radius - cld_reice, & ! IN - Cloud ice effective radius - optical_props_cloudsByBand)) ! OUT - RRTMGP DDT containing cloud radiative properties - ! in each band - else - ! RRTMG cloud-optics - if (any(cld_frac .gt. 0)) then - optical_props_cloudsByBand%tau(:,:,:) = 0._kind_phys - optical_props_cloudsByBand%ssa(:,:,:) = 0._kind_phys - optical_props_cloudsByBand%g(:,:,:) = 0._kind_phys - call rrtmgp_sw_cloud_optics(nday, model%levs, sw_gas_props%get_nband(), cld_lwp(idxday,:), & - cld_reliq(idxday,:), cld_iwp(idxday,:), cld_reice(idxday,:), cld_rwp(idxday,:), & - cld_rerain(idxday,:), cld_swp(idxday,:), cld_resnow(idxday,:), cld_frac(idxday,:),& - tau_cld, ssa_cld, asy_cld) - optical_props_cloudsByBand%tau(idxday,:,:) = tau_cld - optical_props_cloudsByBand%ssa(idxday,:,:) = ssa_cld - optical_props_cloudsByBand%g(idxday,:,:) = asy_cld - endif - endif - ! ####################################################################################### - ! Call McICA to generate subcolumns. - ! ####################################################################################### - ! Call RNG. Mersennse Twister accepts 1D array, so loop over columns and collapse along G-points - ! and layers. ([nGpts,model%levs,nColumn]-> [nGpts*model%levs]*nColumn) - do iCol=1,ncol - call random_setseed(ipseed_sw(icol),rng_stat) - call random_number(rng1D,rng_stat) - rng3D(:,:,iCol) = reshape(source = rng1D,shape=[sw_gas_props%get_ngpt(),model%levs]) - enddo - - ! Call McICA - select case ( iovrsw ) - ! Maximumn-random - case(1) - call check_error_msg('GFS_rrtmgp_sw_run',sampled_mask_max_ran(rng3D,cld_frac,cldfracMCICA)) - end select - - ! Map band optical depth to each g-point using McICA - call check_error_msg('GFS_rrtmgp_sw_run',draw_samples(cldfracMCICA,optical_props_cloudsByBand,optical_props_clouds)) - - ! GFS_RRTMGP_POST_RUN() requires the SW optical depth ~0.55microns - cldtausw = optical_props_cloudsByBand%tau(:,:,11) - - end subroutine GFS_rrtmgp_sw_run - - subroutine GFS_rrtmgp_sw_finalize() - end subroutine GFS_rrtmgp_sw_finalize - -end module GFS_rrtmgp_sw diff --git a/physics/GFS_rrtmgp_sw_post.F90 b/physics/GFS_rrtmgp_sw_post.F90 index 122ce3f44..a804a2e01 100644 --- a/physics/GFS_rrtmgp_sw_post.F90 +++ b/physics/GFS_rrtmgp_sw_post.F90 @@ -14,7 +14,7 @@ module GFS_rrtmgp_sw_post use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp use mo_fluxes_byband, only: ty_fluxes_byband use mo_heating_rates, only: compute_heating_rate - use rrtmgp_aux, only: check_error_msg + use rrtmgp_sw_gas_optics, only: check_error_msg implicit none public GFS_rrtmgp_sw_post_init,GFS_rrtmgp_sw_post_run,GFS_rrtmgp_sw_post_finalize diff --git a/physics/rrtmg_lw_cloud_optics.F90 b/physics/rrtmg_lw_cloud_optics.F90 new file mode 100644 index 000000000..217b3fa4d --- /dev/null +++ b/physics/rrtmg_lw_cloud_optics.F90 @@ -0,0 +1,802 @@ +module mo_rrtmg_lw_cloud_optics + use machine, only: kind_phys + use physparam, only: ilwcliq, ilwcice, iovrlw + use mersenne_twister, only: random_setseed, random_number, random_stat + + implicit none + + ! Parameter used for RRTMG cloud-optics + integer,parameter :: & + nBandsLW_RRTMG = 16 + ! ipat is bands index for ebert & curry ice cloud (for iflagice=1) + integer,dimension(nBandsLW_RRTMG),parameter :: & + ipat = (/ 1, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 /) + real(kind_phys), parameter :: & + absrain = 0.33e-3, & ! Rain drop absorption coefficient \f$(m^{2}/g)\f$ . + abssnow0 = 1.5, & ! Snow flake absorption coefficient (micron), fu coeff + abssnow1 = 2.34e-3 ! Snow flake absorption coefficient \f$(m^{2}/g)\f$, ncar coef + + ! RRTMG LW cloud property coefficients + real(kind_phys) , dimension(58,nBandsLW_RRTMG),parameter :: & + absliq1 = reshape(source=(/ & + 1.64047e-03, 6.90533e-02, 7.72017e-02, 7.78054e-02, 7.69523e-02, & !1 + 7.58058e-02, 7.46400e-02, 7.35123e-02, 7.24162e-02, 7.13225e-02, & !1 + 6.99145e-02, 6.66409e-02, 6.36582e-02, 6.09425e-02, 5.84593e-02, & !1 + 5.61743e-02, 5.40571e-02, 5.20812e-02, 5.02245e-02, 4.84680e-02, & !1 + 4.67959e-02, 4.51944e-02, 4.36516e-02, 4.21570e-02, 4.07015e-02, & !1 + 3.92766e-02, 3.78747e-02, 3.64886e-02, 3.53632e-02, 3.41992e-02, & !1 + 3.31016e-02, 3.20643e-02, 3.10817e-02, 3.01490e-02, 2.92620e-02, & !1 + 2.84171e-02, 2.76108e-02, 2.68404e-02, 2.61031e-02, 2.53966e-02, & !1 + 2.47189e-02, 2.40678e-02, 2.34418e-02, 2.28392e-02, 2.22586e-02, & !1 + 2.16986e-02, 2.11580e-02, 2.06356e-02, 2.01305e-02, 1.96417e-02, & !1 + 1.91682e-02, 1.87094e-02, 1.82643e-02, 1.78324e-02, 1.74129e-02, & !1 + 1.70052e-02, 1.66088e-02, 1.62231e-02, & !1 + 2.19486e-01, 1.80687e-01, 1.59150e-01, 1.44731e-01, 1.33703e-01, & !2 + 1.24355e-01, 1.15756e-01, 1.07318e-01, 9.86119e-02, 8.92739e-02, & !2 + 8.34911e-02, 7.70773e-02, 7.15240e-02, 6.66615e-02, 6.23641e-02, & !2 + 5.85359e-02, 5.51020e-02, 5.20032e-02, 4.91916e-02, 4.66283e-02, & !2 + 4.42813e-02, 4.21236e-02, 4.01330e-02, 3.82905e-02, 3.65797e-02, & !2 + 3.49869e-02, 3.35002e-02, 3.21090e-02, 3.08957e-02, 2.97601e-02, & !2 + 2.86966e-02, 2.76984e-02, 2.67599e-02, 2.58758e-02, 2.50416e-02, & !2 + 2.42532e-02, 2.35070e-02, 2.27997e-02, 2.21284e-02, 2.14904e-02, & !2 + 2.08834e-02, 2.03051e-02, 1.97536e-02, 1.92271e-02, 1.87239e-02, & !2 + 1.82425e-02, 1.77816e-02, 1.73399e-02, 1.69162e-02, 1.65094e-02, & !2 + 1.61187e-02, 1.57430e-02, 1.53815e-02, 1.50334e-02, 1.46981e-02, & !2 + 1.43748e-02, 1.40628e-02, 1.37617e-02, & !2 + 2.95174e-01, 2.34765e-01, 1.98038e-01, 1.72114e-01, 1.52083e-01, & !3 + 1.35654e-01, 1.21613e-01, 1.09252e-01, 9.81263e-02, 8.79448e-02, & !3 + 8.12566e-02, 7.44563e-02, 6.86374e-02, 6.36042e-02, 5.92094e-02, & !3 + 5.53402e-02, 5.19087e-02, 4.88455e-02, 4.60951e-02, 4.36124e-02, & !3 + 4.13607e-02, 3.93096e-02, 3.74338e-02, 3.57119e-02, 3.41261e-02, & !3 + 3.26610e-02, 3.13036e-02, 3.00425e-02, 2.88497e-02, 2.78077e-02, & !3 + 2.68317e-02, 2.59158e-02, 2.50545e-02, 2.42430e-02, 2.34772e-02, & !3 + 2.27533e-02, 2.20679e-02, 2.14181e-02, 2.08011e-02, 2.02145e-02, & !3 + 1.96561e-02, 1.91239e-02, 1.86161e-02, 1.81311e-02, 1.76673e-02, & !3 + 1.72234e-02, 1.67981e-02, 1.63903e-02, 1.59989e-02, 1.56230e-02, & !3 + 1.52615e-02, 1.49138e-02, 1.45791e-02, 1.42565e-02, 1.39455e-02, & !3 + 1.36455e-02, 1.33559e-02, 1.30761e-02, & !3 + 3.00925e-01, 2.36949e-01, 1.96947e-01, 1.68692e-01, 1.47190e-01, & !4 + 1.29986e-01, 1.15719e-01, 1.03568e-01, 9.30028e-02, 8.36658e-02, & !4 + 7.71075e-02, 7.07002e-02, 6.52284e-02, 6.05024e-02, 5.63801e-02, & !4 + 5.27534e-02, 4.95384e-02, 4.66690e-02, 4.40925e-02, 4.17664e-02, & !4 + 3.96559e-02, 3.77326e-02, 3.59727e-02, 3.43561e-02, 3.28662e-02, & !4 + 3.14885e-02, 3.02110e-02, 2.90231e-02, 2.78948e-02, 2.69109e-02, & !4 + 2.59884e-02, 2.51217e-02, 2.43058e-02, 2.35364e-02, 2.28096e-02, & !4 + 2.21218e-02, 2.14700e-02, 2.08515e-02, 2.02636e-02, 1.97041e-02, & !4 + 1.91711e-02, 1.86625e-02, 1.81769e-02, 1.77126e-02, 1.72683e-02, & !4 + 1.68426e-02, 1.64344e-02, 1.60427e-02, 1.56664e-02, 1.53046e-02, & !4 + 1.49565e-02, 1.46214e-02, 1.42985e-02, 1.39871e-02, 1.36866e-02, & !4 + 1.33965e-02, 1.31162e-02, 1.28453e-02, & !4 + 2.64691e-01, 2.12018e-01, 1.78009e-01, 1.53539e-01, 1.34721e-01, & !5 + 1.19580e-01, 1.06996e-01, 9.62772e-02, 8.69710e-02, 7.87670e-02, & !5 + 7.29272e-02, 6.70920e-02, 6.20977e-02, 5.77732e-02, 5.39910e-02, & !5 + 5.06538e-02, 4.76866e-02, 4.50301e-02, 4.26374e-02, 4.04704e-02, & !5 + 3.84981e-02, 3.66948e-02, 3.50394e-02, 3.35141e-02, 3.21038e-02, & !5 + 3.07957e-02, 2.95788e-02, 2.84438e-02, 2.73790e-02, 2.64390e-02, & !5 + 2.55565e-02, 2.47263e-02, 2.39437e-02, 2.32047e-02, 2.25056e-02, & !5 + 2.18433e-02, 2.12149e-02, 2.06177e-02, 2.00495e-02, 1.95081e-02, & !5 + 1.89917e-02, 1.84984e-02, 1.80269e-02, 1.75755e-02, 1.71431e-02, & !5 + 1.67283e-02, 1.63303e-02, 1.59478e-02, 1.55801e-02, 1.52262e-02, & !5 + 1.48853e-02, 1.45568e-02, 1.42400e-02, 1.39342e-02, 1.36388e-02, & !5 + 1.33533e-02, 1.30773e-02, 1.28102e-02, & !5 + 8.81182e-02, 1.06745e-01, 9.79753e-02, 8.99625e-02, 8.35200e-02, & !6 + 7.81899e-02, 7.35939e-02, 6.94696e-02, 6.56266e-02, 6.19148e-02, & !6 + 5.83355e-02, 5.49306e-02, 5.19642e-02, 4.93325e-02, 4.69659e-02, & !6 + 4.48148e-02, 4.28431e-02, 4.10231e-02, 3.93332e-02, 3.77563e-02, & !6 + 3.62785e-02, 3.48882e-02, 3.35758e-02, 3.23333e-02, 3.11536e-02, & !6 + 3.00310e-02, 2.89601e-02, 2.79365e-02, 2.70502e-02, 2.62618e-02, & !6 + 2.55025e-02, 2.47728e-02, 2.40726e-02, 2.34013e-02, 2.27583e-02, & !6 + 2.21422e-02, 2.15522e-02, 2.09869e-02, 2.04453e-02, 1.99260e-02, & !6 + 1.94280e-02, 1.89501e-02, 1.84913e-02, 1.80506e-02, 1.76270e-02, & !6 + 1.72196e-02, 1.68276e-02, 1.64500e-02, 1.60863e-02, 1.57357e-02, & !6 + 1.53975e-02, 1.50710e-02, 1.47558e-02, 1.44511e-02, 1.41566e-02, & !6 + 1.38717e-02, 1.35960e-02, 1.33290e-02, & !6 + 4.32174e-02, 7.36078e-02, 6.98340e-02, 6.65231e-02, 6.41948e-02, & !7 + 6.23551e-02, 6.06638e-02, 5.88680e-02, 5.67124e-02, 5.38629e-02, & !7 + 4.99579e-02, 4.86289e-02, 4.70120e-02, 4.52854e-02, 4.35466e-02, & !7 + 4.18480e-02, 4.02169e-02, 3.86658e-02, 3.71992e-02, 3.58168e-02, & !7 + 3.45155e-02, 3.32912e-02, 3.21390e-02, 3.10538e-02, 3.00307e-02, & !7 + 2.90651e-02, 2.81524e-02, 2.72885e-02, 2.62821e-02, 2.55744e-02, & !7 + 2.48799e-02, 2.42029e-02, 2.35460e-02, 2.29108e-02, 2.22981e-02, & !7 + 2.17079e-02, 2.11402e-02, 2.05945e-02, 2.00701e-02, 1.95663e-02, & !7 + 1.90824e-02, 1.86174e-02, 1.81706e-02, 1.77411e-02, 1.73281e-02, & !7 + 1.69307e-02, 1.65483e-02, 1.61801e-02, 1.58254e-02, 1.54835e-02, & !7 + 1.51538e-02, 1.48358e-02, 1.45288e-02, 1.42322e-02, 1.39457e-02, & !7 + 1.36687e-02, 1.34008e-02, 1.31416e-02, & !7 + 1.41881e-01, 7.15419e-02, 6.30335e-02, 6.11132e-02, 6.01931e-02, & !8 + 5.92420e-02, 5.78968e-02, 5.58876e-02, 5.28923e-02, 4.84462e-02, & !8 + 4.60839e-02, 4.56013e-02, 4.45410e-02, 4.31866e-02, 4.17026e-02, & !8 + 4.01850e-02, 3.86892e-02, 3.72461e-02, 3.58722e-02, 3.45749e-02, & !8 + 3.33564e-02, 3.22155e-02, 3.11494e-02, 3.01541e-02, 2.92253e-02, & !8 + 2.83584e-02, 2.75488e-02, 2.67925e-02, 2.57692e-02, 2.50704e-02, & !8 + 2.43918e-02, 2.37350e-02, 2.31005e-02, 2.24888e-02, 2.18996e-02, & !8 + 2.13325e-02, 2.07870e-02, 2.02623e-02, 1.97577e-02, 1.92724e-02, & !8 + 1.88056e-02, 1.83564e-02, 1.79241e-02, 1.75079e-02, 1.71070e-02, & !8 + 1.67207e-02, 1.63482e-02, 1.59890e-02, 1.56424e-02, 1.53077e-02, & !8 + 1.49845e-02, 1.46722e-02, 1.43702e-02, 1.40782e-02, 1.37955e-02, & !8 + 1.35219e-02, 1.32569e-02, 1.30000e-02, & !8 + 6.72726e-02, 6.61013e-02, 6.47866e-02, 6.33780e-02, 6.18985e-02, & !9 + 6.03335e-02, 5.86136e-02, 5.65876e-02, 5.39839e-02, 5.03536e-02, & !9 + 4.71608e-02, 4.63630e-02, 4.50313e-02, 4.34526e-02, 4.17876e-02, & !9 + 4.01261e-02, 3.85171e-02, 3.69860e-02, 3.55442e-02, 3.41954e-02, & !9 + 3.29384e-02, 3.17693e-02, 3.06832e-02, 2.96745e-02, 2.87374e-02, & !9 + 2.78662e-02, 2.70557e-02, 2.63008e-02, 2.52450e-02, 2.45424e-02, & !9 + 2.38656e-02, 2.32144e-02, 2.25885e-02, 2.19873e-02, 2.14099e-02, & !9 + 2.08554e-02, 2.03230e-02, 1.98116e-02, 1.93203e-02, 1.88482e-02, & !9 + 1.83944e-02, 1.79578e-02, 1.75378e-02, 1.71335e-02, 1.67440e-02, & !9 + 1.63687e-02, 1.60069e-02, 1.56579e-02, 1.53210e-02, 1.49958e-02, & !9 + 1.46815e-02, 1.43778e-02, 1.40841e-02, 1.37999e-02, 1.35249e-02, & !9 + 1.32585e-02, 1.30004e-02, 1.27502e-02, & !9 + 7.97040e-02, 7.63844e-02, 7.36499e-02, 7.13525e-02, 6.93043e-02, & !10 + 6.72807e-02, 6.50227e-02, 6.22395e-02, 5.86093e-02, 5.37815e-02, & !10 + 5.14682e-02, 4.97214e-02, 4.77392e-02, 4.56961e-02, 4.36858e-02, & !10 + 4.17569e-02, 3.99328e-02, 3.82224e-02, 3.66265e-02, 3.51416e-02, & !10 + 3.37617e-02, 3.24798e-02, 3.12887e-02, 3.01812e-02, 2.91505e-02, & !10 + 2.81900e-02, 2.72939e-02, 2.64568e-02, 2.54165e-02, 2.46832e-02, & !10 + 2.39783e-02, 2.33017e-02, 2.26531e-02, 2.20314e-02, 2.14359e-02, & !10 + 2.08653e-02, 2.03187e-02, 1.97947e-02, 1.92924e-02, 1.88106e-02, & !10 + 1.83483e-02, 1.79043e-02, 1.74778e-02, 1.70678e-02, 1.66735e-02, & !10 + 1.62941e-02, 1.59286e-02, 1.55766e-02, 1.52371e-02, 1.49097e-02, & !10 + 1.45937e-02, 1.42885e-02, 1.39936e-02, 1.37085e-02, 1.34327e-02, & !10 + 1.31659e-02, 1.29075e-02, 1.26571e-02, & !10 + 1.49438e-01, 1.33535e-01, 1.21542e-01, 1.11743e-01, 1.03263e-01, & !11 + 9.55774e-02, 8.83382e-02, 8.12943e-02, 7.42533e-02, 6.70609e-02, & !11 + 6.38761e-02, 5.97788e-02, 5.59841e-02, 5.25318e-02, 4.94132e-02, & !11 + 4.66014e-02, 4.40644e-02, 4.17706e-02, 3.96910e-02, 3.77998e-02, & !11 + 3.60742e-02, 3.44947e-02, 3.30442e-02, 3.17079e-02, 3.04730e-02, & !11 + 2.93283e-02, 2.82642e-02, 2.72720e-02, 2.61789e-02, 2.53277e-02, & !11 + 2.45237e-02, 2.37635e-02, 2.30438e-02, 2.23615e-02, 2.17140e-02, & !11 + 2.10987e-02, 2.05133e-02, 1.99557e-02, 1.94241e-02, 1.89166e-02, & !11 + 1.84317e-02, 1.79679e-02, 1.75238e-02, 1.70983e-02, 1.66901e-02, & !11 + 1.62983e-02, 1.59219e-02, 1.55599e-02, 1.52115e-02, 1.48761e-02, & !11 + 1.45528e-02, 1.42411e-02, 1.39402e-02, 1.36497e-02, 1.33690e-02, & !11 + 1.30976e-02, 1.28351e-02, 1.25810e-02, & !11 + 3.71985e-02, 3.88586e-02, 3.99070e-02, 4.04351e-02, 4.04610e-02, & !12 + 3.99834e-02, 3.89953e-02, 3.74886e-02, 3.54551e-02, 3.28870e-02, & !12 + 3.32576e-02, 3.22444e-02, 3.12384e-02, 3.02584e-02, 2.93146e-02, & !12 + 2.84120e-02, 2.75525e-02, 2.67361e-02, 2.59618e-02, 2.52280e-02, & !12 + 2.45327e-02, 2.38736e-02, 2.32487e-02, 2.26558e-02, 2.20929e-02, & !12 + 2.15579e-02, 2.10491e-02, 2.05648e-02, 1.99749e-02, 1.95704e-02, & !12 + 1.91731e-02, 1.87839e-02, 1.84032e-02, 1.80315e-02, 1.76689e-02, & !12 + 1.73155e-02, 1.69712e-02, 1.66362e-02, 1.63101e-02, 1.59928e-02, & !12 + 1.56842e-02, 1.53840e-02, 1.50920e-02, 1.48080e-02, 1.45318e-02, & !12 + 1.42631e-02, 1.40016e-02, 1.37472e-02, 1.34996e-02, 1.32586e-02, & !12 + 1.30239e-02, 1.27954e-02, 1.25728e-02, 1.23559e-02, 1.21445e-02, & !12 + 1.19385e-02, 1.17376e-02, 1.15417e-02, & !12 + 3.11868e-02, 4.48357e-02, 4.90224e-02, 4.96406e-02, 4.86806e-02, & !13 + 4.69610e-02, 4.48630e-02, 4.25795e-02, 4.02138e-02, 3.78236e-02, & !13 + 3.74266e-02, 3.60384e-02, 3.47074e-02, 3.34434e-02, 3.22499e-02, & !13 + 3.11264e-02, 3.00704e-02, 2.90784e-02, 2.81463e-02, 2.72702e-02, & !13 + 2.64460e-02, 2.56698e-02, 2.49381e-02, 2.42475e-02, 2.35948e-02, & !13 + 2.29774e-02, 2.23925e-02, 2.18379e-02, 2.11793e-02, 2.07076e-02, & !13 + 2.02470e-02, 1.97981e-02, 1.93613e-02, 1.89367e-02, 1.85243e-02, & !13 + 1.81240e-02, 1.77356e-02, 1.73588e-02, 1.69935e-02, 1.66392e-02, & !13 + 1.62956e-02, 1.59624e-02, 1.56393e-02, 1.53259e-02, 1.50219e-02, & !13 + 1.47268e-02, 1.44404e-02, 1.41624e-02, 1.38925e-02, 1.36302e-02, & !13 + 1.33755e-02, 1.31278e-02, 1.28871e-02, 1.26530e-02, 1.24253e-02, & !13 + 1.22038e-02, 1.19881e-02, 1.17782e-02, & !13 + 1.58988e-02, 3.50652e-02, 4.00851e-02, 4.07270e-02, 3.98101e-02, & !14 + 3.83306e-02, 3.66829e-02, 3.50327e-02, 3.34497e-02, 3.19609e-02, & !14 + 3.13712e-02, 3.03348e-02, 2.93415e-02, 2.83973e-02, 2.75037e-02, & !14 + 2.66604e-02, 2.58654e-02, 2.51161e-02, 2.44100e-02, 2.37440e-02, & !14 + 2.31154e-02, 2.25215e-02, 2.19599e-02, 2.14282e-02, 2.09242e-02, & !14 + 2.04459e-02, 1.99915e-02, 1.95594e-02, 1.90254e-02, 1.86598e-02, & !14 + 1.82996e-02, 1.79455e-02, 1.75983e-02, 1.72584e-02, 1.69260e-02, & !14 + 1.66013e-02, 1.62843e-02, 1.59752e-02, 1.56737e-02, 1.53799e-02, & !14 + 1.50936e-02, 1.48146e-02, 1.45429e-02, 1.42782e-02, 1.40203e-02, & !14 + 1.37691e-02, 1.35243e-02, 1.32858e-02, 1.30534e-02, 1.28270e-02, & !14 + 1.26062e-02, 1.23909e-02, 1.21810e-02, 1.19763e-02, 1.17766e-02, & !14 + 1.15817e-02, 1.13915e-02, 1.12058e-02, & !14 + 5.02079e-03, 2.17615e-02, 2.55449e-02, 2.59484e-02, 2.53650e-02, & !15 + 2.45281e-02, 2.36843e-02, 2.29159e-02, 2.22451e-02, 2.16716e-02, & !15 + 2.11451e-02, 2.05817e-02, 2.00454e-02, 1.95372e-02, 1.90567e-02, & !15 + 1.86028e-02, 1.81742e-02, 1.77693e-02, 1.73866e-02, 1.70244e-02, & !15 + 1.66815e-02, 1.63563e-02, 1.60477e-02, 1.57544e-02, 1.54755e-02, & !15 + 1.52097e-02, 1.49564e-02, 1.47146e-02, 1.43684e-02, 1.41728e-02, & !15 + 1.39762e-02, 1.37797e-02, 1.35838e-02, 1.33891e-02, 1.31961e-02, & !15 + 1.30051e-02, 1.28164e-02, 1.26302e-02, 1.24466e-02, 1.22659e-02, & !15 + 1.20881e-02, 1.19131e-02, 1.17412e-02, 1.15723e-02, 1.14063e-02, & !15 + 1.12434e-02, 1.10834e-02, 1.09264e-02, 1.07722e-02, 1.06210e-02, & !15 + 1.04725e-02, 1.03269e-02, 1.01839e-02, 1.00436e-02, 9.90593e-03, & !15 + 9.77080e-03, 9.63818e-03, 9.50800e-03, & !15 + 5.64971e-02, 9.04736e-02, 8.11726e-02, 7.05450e-02, 6.20052e-02, & !16 + 5.54286e-02, 5.03503e-02, 4.63791e-02, 4.32290e-02, 4.06959e-02, & !16 + 3.74690e-02, 3.52964e-02, 3.33799e-02, 3.16774e-02, 3.01550e-02, & !16 + 2.87856e-02, 2.75474e-02, 2.64223e-02, 2.53953e-02, 2.44542e-02, & !16 + 2.35885e-02, 2.27894e-02, 2.20494e-02, 2.13622e-02, 2.07222e-02, & !16 + 2.01246e-02, 1.95654e-02, 1.90408e-02, 1.84398e-02, 1.80021e-02, & !16 + 1.75816e-02, 1.71775e-02, 1.67889e-02, 1.64152e-02, 1.60554e-02, & !16 + 1.57089e-02, 1.53751e-02, 1.50531e-02, 1.47426e-02, 1.44428e-02, & !16 + 1.41532e-02, 1.38734e-02, 1.36028e-02, 1.33410e-02, 1.30875e-02, & !16 + 1.28420e-02, 1.26041e-02, 1.23735e-02, 1.21497e-02, 1.19325e-02, & !16 + 1.17216e-02, 1.15168e-02, 1.13177e-02, 1.11241e-02, 1.09358e-02, & !16 + 1.07525e-02, 1.05741e-02, 1.04003e-02/), & !16 + shape=(/58,nBandsLW_RRTMG/)) + + real(kind_phys), dimension(2),parameter :: & + absice0 = (/0.005,1.0/) + + real(kind_phys), dimension(2,5),parameter :: & + absice1 = reshape(source=(/ & + 0.0036, 1.136, 0.0068, 0.600, 0.0003, 1.338, 0.0016, 1.166, 0.0020, 1.118 /),& + shape=(/2,5/)) + + real(kind_phys), dimension(43, nBandsLW_RRTMG),parameter :: & + absice2 = reshape(source=(/ & + 7.798999e-02, 6.340479e-02, 5.417973e-02, 4.766245e-02, 4.272663e-02, & !1 + 3.880939e-02, 3.559544e-02, 3.289241e-02, 3.057511e-02, 2.855800e-02, & !1 + 2.678022e-02, 2.519712e-02, 2.377505e-02, 2.248806e-02, 2.131578e-02, & !1 + 2.024194e-02, 1.925337e-02, 1.833926e-02, 1.749067e-02, 1.670007e-02, & !1 + 1.596113e-02, 1.526845e-02, 1.461739e-02, 1.400394e-02, 1.342462e-02, & !1 + 1.287639e-02, 1.235656e-02, 1.186279e-02, 1.139297e-02, 1.094524e-02, & !1 + 1.051794e-02, 1.010956e-02, 9.718755e-03, 9.344316e-03, 8.985139e-03, & !1 + 8.640223e-03, 8.308656e-03, 7.989606e-03, 7.682312e-03, 7.386076e-03, & !1 + 7.100255e-03, 6.824258e-03, 6.557540e-03, & !1 + 2.784879e-02, 2.709863e-02, 2.619165e-02, 2.529230e-02, 2.443225e-02, & !2 + 2.361575e-02, 2.284021e-02, 2.210150e-02, 2.139548e-02, 2.071840e-02, & !2 + 2.006702e-02, 1.943856e-02, 1.883064e-02, 1.824120e-02, 1.766849e-02, & !2 + 1.711099e-02, 1.656737e-02, 1.603647e-02, 1.551727e-02, 1.500886e-02, & !2 + 1.451045e-02, 1.402132e-02, 1.354084e-02, 1.306842e-02, 1.260355e-02, & !2 + 1.214575e-02, 1.169460e-02, 1.124971e-02, 1.081072e-02, 1.037731e-02, & !2 + 9.949167e-03, 9.526021e-03, 9.107615e-03, 8.693714e-03, 8.284096e-03, & !2 + 7.878558e-03, 7.476910e-03, 7.078974e-03, 6.684586e-03, 6.293589e-03, & !2 + 5.905839e-03, 5.521200e-03, 5.139543e-03, & !2 + 1.065397e-01, 8.005726e-02, 6.546428e-02, 5.589131e-02, 4.898681e-02, & !3 + 4.369932e-02, 3.947901e-02, 3.600676e-02, 3.308299e-02, 3.057561e-02, & !3 + 2.839325e-02, 2.647040e-02, 2.475872e-02, 2.322164e-02, 2.183091e-02, & !3 + 2.056430e-02, 1.940407e-02, 1.833586e-02, 1.734787e-02, 1.643034e-02, & !3 + 1.557512e-02, 1.477530e-02, 1.402501e-02, 1.331924e-02, 1.265364e-02, & !3 + 1.202445e-02, 1.142838e-02, 1.086257e-02, 1.032445e-02, 9.811791e-03, & !3 + 9.322587e-03, 8.855053e-03, 8.407591e-03, 7.978763e-03, 7.567273e-03, & !3 + 7.171949e-03, 6.791728e-03, 6.425642e-03, 6.072809e-03, 5.732424e-03, & !3 + 5.403748e-03, 5.086103e-03, 4.778865e-03, & !3 + 1.804566e-01, 1.168987e-01, 8.680442e-02, 6.910060e-02, 5.738174e-02, & !4 + 4.902332e-02, 4.274585e-02, 3.784923e-02, 3.391734e-02, 3.068690e-02, & !4 + 2.798301e-02, 2.568480e-02, 2.370600e-02, 2.198337e-02, 2.046940e-02, & !4 + 1.912777e-02, 1.793016e-02, 1.685420e-02, 1.588193e-02, 1.499882e-02, & !4 + 1.419293e-02, 1.345440e-02, 1.277496e-02, 1.214769e-02, 1.156669e-02, & !4 + 1.102694e-02, 1.052412e-02, 1.005451e-02, 9.614854e-03, 9.202335e-03, & !4 + 8.814470e-03, 8.449077e-03, 8.104223e-03, 7.778195e-03, 7.469466e-03, & !4 + 7.176671e-03, 6.898588e-03, 6.634117e-03, 6.382264e-03, 6.142134e-03, & !4 + 5.912913e-03, 5.693862e-03, 5.484308e-03, & !4 + 2.131806e-01, 1.311372e-01, 9.407171e-02, 7.299442e-02, 5.941273e-02, & !5 + 4.994043e-02, 4.296242e-02, 3.761113e-02, 3.337910e-02, 2.994978e-02, & !5 + 2.711556e-02, 2.473461e-02, 2.270681e-02, 2.095943e-02, 1.943839e-02, & !5 + 1.810267e-02, 1.692057e-02, 1.586719e-02, 1.492275e-02, 1.407132e-02, & !5 + 1.329989e-02, 1.259780e-02, 1.195618e-02, 1.136761e-02, 1.082583e-02, & !5 + 1.032552e-02, 9.862158e-03, 9.431827e-03, 9.031157e-03, 8.657217e-03, & !5 + 8.307449e-03, 7.979609e-03, 7.671724e-03, 7.382048e-03, 7.109032e-03, & !5 + 6.851298e-03, 6.607615e-03, 6.376881e-03, 6.158105e-03, 5.950394e-03, & !5 + 5.752942e-03, 5.565019e-03, 5.385963e-03, & !5 + 1.546177e-01, 1.039251e-01, 7.910347e-02, 6.412429e-02, 5.399997e-02, & !6 + 4.664937e-02, 4.104237e-02, 3.660781e-02, 3.300218e-02, 3.000586e-02, & !6 + 2.747148e-02, 2.529633e-02, 2.340647e-02, 2.174723e-02, 2.027731e-02, & !6 + 1.896487e-02, 1.778492e-02, 1.671761e-02, 1.574692e-02, 1.485978e-02, & !6 + 1.404543e-02, 1.329489e-02, 1.260066e-02, 1.195636e-02, 1.135657e-02, & !6 + 1.079664e-02, 1.027257e-02, 9.780871e-03, 9.318505e-03, 8.882815e-03, & !6 + 8.471458e-03, 8.082364e-03, 7.713696e-03, 7.363817e-03, 7.031264e-03, & !6 + 6.714725e-03, 6.413021e-03, 6.125086e-03, 5.849958e-03, 5.586764e-03, & !6 + 5.334707e-03, 5.093066e-03, 4.861179e-03, & !6 + 7.583404e-02, 6.181558e-02, 5.312027e-02, 4.696039e-02, 4.225986e-02, & !7 + 3.849735e-02, 3.538340e-02, 3.274182e-02, 3.045798e-02, 2.845343e-02, & !7 + 2.667231e-02, 2.507353e-02, 2.362606e-02, 2.230595e-02, 2.109435e-02, & !7 + 1.997617e-02, 1.893916e-02, 1.797328e-02, 1.707016e-02, 1.622279e-02, & !7 + 1.542523e-02, 1.467241e-02, 1.395997e-02, 1.328414e-02, 1.264164e-02, & !7 + 1.202958e-02, 1.144544e-02, 1.088697e-02, 1.035218e-02, 9.839297e-03, & !7 + 9.346733e-03, 8.873057e-03, 8.416980e-03, 7.977335e-03, 7.553066e-03, & !7 + 7.143210e-03, 6.746888e-03, 6.363297e-03, 5.991700e-03, 5.631422e-03, & !7 + 5.281840e-03, 4.942378e-03, 4.612505e-03, & !7 + 9.022185e-02, 6.922700e-02, 5.710674e-02, 4.898377e-02, 4.305946e-02, & !8 + 3.849553e-02, 3.484183e-02, 3.183220e-02, 2.929794e-02, 2.712627e-02, & !8 + 2.523856e-02, 2.357810e-02, 2.210286e-02, 2.078089e-02, 1.958747e-02, & !8 + 1.850310e-02, 1.751218e-02, 1.660205e-02, 1.576232e-02, 1.498440e-02, & !8 + 1.426107e-02, 1.358624e-02, 1.295474e-02, 1.236212e-02, 1.180456e-02, & !8 + 1.127874e-02, 1.078175e-02, 1.031106e-02, 9.864433e-03, 9.439878e-03, & !8 + 9.035637e-03, 8.650140e-03, 8.281981e-03, 7.929895e-03, 7.592746e-03, & !8 + 7.269505e-03, 6.959238e-03, 6.661100e-03, 6.374317e-03, 6.098185e-03, & !8 + 5.832059e-03, 5.575347e-03, 5.327504e-03, & !8 + 1.294087e-01, 8.788217e-02, 6.728288e-02, 5.479720e-02, 4.635049e-02, & !9 + 4.022253e-02, 3.555576e-02, 3.187259e-02, 2.888498e-02, 2.640843e-02, & !9 + 2.431904e-02, 2.253038e-02, 2.098024e-02, 1.962267e-02, 1.842293e-02, & !9 + 1.735426e-02, 1.639571e-02, 1.553060e-02, 1.474552e-02, 1.402953e-02, & !9 + 1.337363e-02, 1.277033e-02, 1.221336e-02, 1.169741e-02, 1.121797e-02, & !9 + 1.077117e-02, 1.035369e-02, 9.962643e-03, 9.595509e-03, 9.250088e-03, & !9 + 8.924447e-03, 8.616876e-03, 8.325862e-03, 8.050057e-03, 7.788258e-03, & !9 + 7.539388e-03, 7.302478e-03, 7.076656e-03, 6.861134e-03, 6.655197e-03, & !9 + 6.458197e-03, 6.269543e-03, 6.088697e-03, & !9 + 1.593628e-01, 1.014552e-01, 7.458955e-02, 5.903571e-02, 4.887582e-02, & !10 + 4.171159e-02, 3.638480e-02, 3.226692e-02, 2.898717e-02, 2.631256e-02, & !10 + 2.408925e-02, 2.221156e-02, 2.060448e-02, 1.921325e-02, 1.799699e-02, & !10 + 1.692456e-02, 1.597177e-02, 1.511961e-02, 1.435289e-02, 1.365933e-02, & !10 + 1.302890e-02, 1.245334e-02, 1.192576e-02, 1.144037e-02, 1.099230e-02, & !10 + 1.057739e-02, 1.019208e-02, 9.833302e-03, 9.498395e-03, 9.185047e-03, & !10 + 8.891237e-03, 8.615185e-03, 8.355325e-03, 8.110267e-03, 7.878778e-03, & !10 + 7.659759e-03, 7.452224e-03, 7.255291e-03, 7.068166e-03, 6.890130e-03, & !10 + 6.720536e-03, 6.558794e-03, 6.404371e-03, & !10 + 1.656227e-01, 1.032129e-01, 7.487359e-02, 5.871431e-02, 4.828355e-02, & !11 + 4.099989e-02, 3.562924e-02, 3.150755e-02, 2.824593e-02, 2.560156e-02, & !11 + 2.341503e-02, 2.157740e-02, 2.001169e-02, 1.866199e-02, 1.748669e-02, & !11 + 1.645421e-02, 1.554015e-02, 1.472535e-02, 1.399457e-02, 1.333553e-02, & !11 + 1.273821e-02, 1.219440e-02, 1.169725e-02, 1.124104e-02, 1.082096e-02, & !11 + 1.043290e-02, 1.007336e-02, 9.739338e-03, 9.428223e-03, 9.137756e-03, & !11 + 8.865964e-03, 8.611115e-03, 8.371686e-03, 8.146330e-03, 7.933852e-03, & !11 + 7.733187e-03, 7.543386e-03, 7.363597e-03, 7.193056e-03, 7.031072e-03, & !11 + 6.877024e-03, 6.730348e-03, 6.590531e-03, & !11 + 9.194591e-02, 6.446867e-02, 4.962034e-02, 4.042061e-02, 3.418456e-02, & !12 + 2.968856e-02, 2.629900e-02, 2.365572e-02, 2.153915e-02, 1.980791e-02, & !12 + 1.836689e-02, 1.714979e-02, 1.610900e-02, 1.520946e-02, 1.442476e-02, & !12 + 1.373468e-02, 1.312345e-02, 1.257858e-02, 1.209010e-02, 1.164990e-02, & !12 + 1.125136e-02, 1.088901e-02, 1.055827e-02, 1.025531e-02, 9.976896e-03, & !12 + 9.720255e-03, 9.483022e-03, 9.263160e-03, 9.058902e-03, 8.868710e-03, & !12 + 8.691240e-03, 8.525312e-03, 8.369886e-03, 8.224042e-03, 8.086961e-03, & !12 + 7.957917e-03, 7.836258e-03, 7.721400e-03, 7.612821e-03, 7.510045e-03, & !12 + 7.412648e-03, 7.320242e-03, 7.232476e-03, & !12 + 1.437021e-01, 8.872535e-02, 6.392420e-02, 4.991833e-02, 4.096790e-02, & !13 + 3.477881e-02, 3.025782e-02, 2.681909e-02, 2.412102e-02, 2.195132e-02, & !13 + 2.017124e-02, 1.868641e-02, 1.743044e-02, 1.635529e-02, 1.542540e-02, & !13 + 1.461388e-02, 1.390003e-02, 1.326766e-02, 1.270395e-02, 1.219860e-02, & !13 + 1.174326e-02, 1.133107e-02, 1.095637e-02, 1.061442e-02, 1.030126e-02, & !13 + 1.001352e-02, 9.748340e-03, 9.503256e-03, 9.276155e-03, 9.065205e-03, & !13 + 8.868808e-03, 8.685571e-03, 8.514268e-03, 8.353820e-03, 8.203272e-03, & !13 + 8.061776e-03, 7.928578e-03, 7.803001e-03, 7.684443e-03, 7.572358e-03, & !13 + 7.466258e-03, 7.365701e-03, 7.270286e-03, & !13 + 1.288870e-01, 8.160295e-02, 5.964745e-02, 4.703790e-02, 3.888637e-02, & !14 + 3.320115e-02, 2.902017e-02, 2.582259e-02, 2.330224e-02, 2.126754e-02, & !14 + 1.959258e-02, 1.819130e-02, 1.700289e-02, 1.598320e-02, 1.509942e-02, & !14 + 1.432666e-02, 1.364572e-02, 1.304156e-02, 1.250220e-02, 1.201803e-02, & !14 + 1.158123e-02, 1.118537e-02, 1.082513e-02, 1.049605e-02, 1.019440e-02, & !14 + 9.916989e-03, 9.661116e-03, 9.424457e-03, 9.205005e-03, 9.001022e-03, & !14 + 8.810992e-03, 8.633588e-03, 8.467646e-03, 8.312137e-03, 8.166151e-03, & !14 + 8.028878e-03, 7.899597e-03, 7.777663e-03, 7.662498e-03, 7.553581e-03, & !14 + 7.450444e-03, 7.352662e-03, 7.259851e-03, & !14 + 8.254229e-02, 5.808787e-02, 4.492166e-02, 3.675028e-02, 3.119623e-02, & !15 + 2.718045e-02, 2.414450e-02, 2.177073e-02, 1.986526e-02, 1.830306e-02, & !15 + 1.699991e-02, 1.589698e-02, 1.495199e-02, 1.413374e-02, 1.341870e-02, & !15 + 1.278883e-02, 1.223002e-02, 1.173114e-02, 1.128322e-02, 1.087900e-02, & !15 + 1.051254e-02, 1.017890e-02, 9.873991e-03, 9.594347e-03, 9.337044e-03, & !15 + 9.099589e-03, 8.879842e-03, 8.675960e-03, 8.486341e-03, 8.309594e-03, & !15 + 8.144500e-03, 7.989986e-03, 7.845109e-03, 7.709031e-03, 7.581007e-03, & !15 + 7.460376e-03, 7.346544e-03, 7.238978e-03, 7.137201e-03, 7.040780e-03, & !15 + 6.949325e-03, 6.862483e-03, 6.779931e-03, & !15 + 1.382062e-01, 8.643227e-02, 6.282935e-02, 4.934783e-02, 4.063891e-02, & !16 + 3.455591e-02, 3.007059e-02, 2.662897e-02, 2.390631e-02, 2.169972e-02, & !16 + 1.987596e-02, 1.834393e-02, 1.703924e-02, 1.591513e-02, 1.493679e-02, & !16 + 1.407780e-02, 1.331775e-02, 1.264061e-02, 1.203364e-02, 1.148655e-02, & !16 + 1.099099e-02, 1.054006e-02, 1.012807e-02, 9.750215e-03, 9.402477e-03, & !16 + 9.081428e-03, 8.784143e-03, 8.508107e-03, 8.251146e-03, 8.011373e-03, & !16 + 7.787140e-03, 7.577002e-03, 7.379687e-03, 7.194071e-03, 7.019158e-03, & !16 + 6.854061e-03, 6.697986e-03, 6.550224e-03, 6.410138e-03, 6.277153e-03, & !16 + 6.150751e-03, 6.030462e-03, 5.915860e-03/), & !16 + shape=(/43,nBandsLW_RRTMG/)) + + real(kind_phys) , dimension(46,nBandsLW_RRTMG),parameter :: & + absice3 = reshape(source=(/ & + 3.110649e-03, 4.666352e-02, 6.606447e-02, 6.531678e-02, 6.012598e-02, & !1 + 5.437494e-02, 4.906411e-02, 4.441146e-02, 4.040585e-02, 3.697334e-02, & !1 + 3.403027e-02, 3.149979e-02, 2.931596e-02, 2.742365e-02, 2.577721e-02, & !1 + 2.433888e-02, 2.307732e-02, 2.196644e-02, 2.098437e-02, 2.011264e-02, & !1 + 1.933561e-02, 1.863992e-02, 1.801407e-02, 1.744812e-02, 1.693346e-02, & !1 + 1.646252e-02, 1.602866e-02, 1.562600e-02, 1.524933e-02, 1.489399e-02, & !1 + 1.455580e-02, 1.423098e-02, 1.391612e-02, 1.360812e-02, 1.330413e-02, & !1 + 1.300156e-02, 1.269801e-02, 1.239127e-02, 1.207928e-02, 1.176014e-02, & !1 + 1.143204e-02, 1.109334e-02, 1.074243e-02, 1.037786e-02, 9.998198e-03, & !1 + 9.602126e-03, & !1 + 3.984966e-04, 1.681097e-02, 2.627680e-02, 2.767465e-02, 2.700722e-02, & !2 + 2.579180e-02, 2.448677e-02, 2.323890e-02, 2.209096e-02, 2.104882e-02, & !2 + 2.010547e-02, 1.925003e-02, 1.847128e-02, 1.775883e-02, 1.710358e-02, & !2 + 1.649769e-02, 1.593449e-02, 1.540829e-02, 1.491429e-02, 1.444837e-02, & !2 + 1.400704e-02, 1.358729e-02, 1.318654e-02, 1.280258e-02, 1.243346e-02, & !2 + 1.207750e-02, 1.173325e-02, 1.139941e-02, 1.107487e-02, 1.075861e-02, & !2 + 1.044975e-02, 1.014753e-02, 9.851229e-03, 9.560240e-03, 9.274003e-03, & !2 + 8.992020e-03, 8.713845e-03, 8.439074e-03, 8.167346e-03, 7.898331e-03, & !2 + 7.631734e-03, 7.367286e-03, 7.104742e-03, 6.843882e-03, 6.584504e-03, & !2 + 6.326424e-03, & !2 + 6.933163e-02, 8.540475e-02, 7.701816e-02, 6.771158e-02, 5.986953e-02, & !3 + 5.348120e-02, 4.824962e-02, 4.390563e-02, 4.024411e-02, 3.711404e-02, & !3 + 3.440426e-02, 3.203200e-02, 2.993478e-02, 2.806474e-02, 2.638464e-02, & !3 + 2.486516e-02, 2.348288e-02, 2.221890e-02, 2.105780e-02, 1.998687e-02, & !3 + 1.899552e-02, 1.807490e-02, 1.721750e-02, 1.641693e-02, 1.566773e-02, & !3 + 1.496515e-02, 1.430509e-02, 1.368398e-02, 1.309865e-02, 1.254634e-02, & !3 + 1.202456e-02, 1.153114e-02, 1.106409e-02, 1.062166e-02, 1.020224e-02, & !3 + 9.804381e-03, 9.426771e-03, 9.068205e-03, 8.727578e-03, 8.403876e-03, & !3 + 8.096160e-03, 7.803564e-03, 7.525281e-03, 7.260560e-03, 7.008697e-03, & !3 + 6.769036e-03, & !3 + 1.765735e-01, 1.382700e-01, 1.095129e-01, 8.987475e-02, 7.591185e-02, & !4 + 6.554169e-02, 5.755500e-02, 5.122083e-02, 4.607610e-02, 4.181475e-02, & !4 + 3.822697e-02, 3.516432e-02, 3.251897e-02, 3.021073e-02, 2.817876e-02, & !4 + 2.637607e-02, 2.476582e-02, 2.331871e-02, 2.201113e-02, 2.082388e-02, & !4 + 1.974115e-02, 1.874983e-02, 1.783894e-02, 1.699922e-02, 1.622280e-02, & !4 + 1.550296e-02, 1.483390e-02, 1.421064e-02, 1.362880e-02, 1.308460e-02, & !4 + 1.257468e-02, 1.209611e-02, 1.164628e-02, 1.122287e-02, 1.082381e-02, & !4 + 1.044725e-02, 1.009154e-02, 9.755166e-03, 9.436783e-03, 9.135163e-03, & !4 + 8.849193e-03, 8.577856e-03, 8.320225e-03, 8.075451e-03, 7.842755e-03, & !4 + 7.621418e-03, & !4 + 2.339673e-01, 1.692124e-01, 1.291656e-01, 1.033837e-01, 8.562949e-02, & !5 + 7.273526e-02, 6.298262e-02, 5.537015e-02, 4.927787e-02, 4.430246e-02, & !5 + 4.017061e-02, 3.669072e-02, 3.372455e-02, 3.116995e-02, 2.894977e-02, & !5 + 2.700471e-02, 2.528842e-02, 2.376420e-02, 2.240256e-02, 2.117959e-02, & !5 + 2.007567e-02, 1.907456e-02, 1.816271e-02, 1.732874e-02, 1.656300e-02, & !5 + 1.585725e-02, 1.520445e-02, 1.459852e-02, 1.403419e-02, 1.350689e-02, & !5 + 1.301260e-02, 1.254781e-02, 1.210941e-02, 1.169468e-02, 1.130118e-02, & !5 + 1.092675e-02, 1.056945e-02, 1.022757e-02, 9.899560e-03, 9.584021e-03, & !5 + 9.279705e-03, 8.985479e-03, 8.700322e-03, 8.423306e-03, 8.153590e-03, & !5 + 7.890412e-03, & !5 + 1.145369e-01, 1.174566e-01, 9.917866e-02, 8.332990e-02, 7.104263e-02, & !6 + 6.153370e-02, 5.405472e-02, 4.806281e-02, 4.317918e-02, 3.913795e-02, & !6 + 3.574916e-02, 3.287437e-02, 3.041067e-02, 2.828017e-02, 2.642292e-02, & !6 + 2.479206e-02, 2.335051e-02, 2.206851e-02, 2.092195e-02, 1.989108e-02, & !6 + 1.895958e-02, 1.811385e-02, 1.734245e-02, 1.663573e-02, 1.598545e-02, & !6 + 1.538456e-02, 1.482700e-02, 1.430750e-02, 1.382150e-02, 1.336499e-02, & !6 + 1.293447e-02, 1.252685e-02, 1.213939e-02, 1.176968e-02, 1.141555e-02, & !6 + 1.107508e-02, 1.074655e-02, 1.042839e-02, 1.011923e-02, 9.817799e-03, & !6 + 9.522962e-03, 9.233688e-03, 8.949041e-03, 8.668171e-03, 8.390301e-03, & !6 + 8.114723e-03, & !6 + 1.222345e-02, 5.344230e-02, 5.523465e-02, 5.128759e-02, 4.676925e-02, & !7 + 4.266150e-02, 3.910561e-02, 3.605479e-02, 3.342843e-02, 3.115052e-02, & !7 + 2.915776e-02, 2.739935e-02, 2.583499e-02, 2.443266e-02, 2.316681e-02, & !7 + 2.201687e-02, 2.096619e-02, 2.000112e-02, 1.911044e-02, 1.828481e-02, & !7 + 1.751641e-02, 1.679866e-02, 1.612598e-02, 1.549360e-02, 1.489742e-02, & !7 + 1.433392e-02, 1.380002e-02, 1.329305e-02, 1.281068e-02, 1.235084e-02, & !7 + 1.191172e-02, 1.149171e-02, 1.108936e-02, 1.070341e-02, 1.033271e-02, & !7 + 9.976220e-03, 9.633021e-03, 9.302273e-03, 8.983216e-03, 8.675161e-03, & !7 + 8.377478e-03, 8.089595e-03, 7.810986e-03, 7.541170e-03, 7.279706e-03, & !7 + 7.026186e-03, & !7 + 6.711058e-02, 6.918198e-02, 6.127484e-02, 5.411944e-02, 4.836902e-02, & !8 + 4.375293e-02, 3.998077e-02, 3.683587e-02, 3.416508e-02, 3.186003e-02, & !8 + 2.984290e-02, 2.805671e-02, 2.645895e-02, 2.501733e-02, 2.370689e-02, & !8 + 2.250808e-02, 2.140532e-02, 2.038609e-02, 1.944018e-02, 1.855918e-02, & !8 + 1.773609e-02, 1.696504e-02, 1.624106e-02, 1.555990e-02, 1.491793e-02, & !8 + 1.431197e-02, 1.373928e-02, 1.319743e-02, 1.268430e-02, 1.219799e-02, & !8 + 1.173682e-02, 1.129925e-02, 1.088393e-02, 1.048961e-02, 1.011516e-02, & !8 + 9.759543e-03, 9.421813e-03, 9.101089e-03, 8.796559e-03, 8.507464e-03, & !8 + 8.233098e-03, 7.972798e-03, 7.725942e-03, 7.491940e-03, 7.270238e-03, & !8 + 7.060305e-03, & !8 + 1.236780e-01, 9.222386e-02, 7.383997e-02, 6.204072e-02, 5.381029e-02, & !9 + 4.770678e-02, 4.296928e-02, 3.916131e-02, 3.601540e-02, 3.335878e-02, & !9 + 3.107493e-02, 2.908247e-02, 2.732282e-02, 2.575276e-02, 2.433968e-02, & !9 + 2.305852e-02, 2.188966e-02, 2.081757e-02, 1.982974e-02, 1.891599e-02, & !9 + 1.806794e-02, 1.727865e-02, 1.654227e-02, 1.585387e-02, 1.520924e-02, & !9 + 1.460476e-02, 1.403730e-02, 1.350416e-02, 1.300293e-02, 1.253153e-02, & !9 + 1.208808e-02, 1.167094e-02, 1.127862e-02, 1.090979e-02, 1.056323e-02, & !9 + 1.023786e-02, 9.932665e-03, 9.646744e-03, 9.379250e-03, 9.129409e-03, & !9 + 8.896500e-03, 8.679856e-03, 8.478852e-03, 8.292904e-03, 8.121463e-03, & !9 + 7.964013e-03, & !9 + 1.655966e-01, 1.134205e-01, 8.714344e-02, 7.129241e-02, 6.063739e-02, & !10 + 5.294203e-02, 4.709309e-02, 4.247476e-02, 3.871892e-02, 3.559206e-02, & !10 + 3.293893e-02, 3.065226e-02, 2.865558e-02, 2.689288e-02, 2.532221e-02, & !10 + 2.391150e-02, 2.263582e-02, 2.147549e-02, 2.041476e-02, 1.944089e-02, & !10 + 1.854342e-02, 1.771371e-02, 1.694456e-02, 1.622989e-02, 1.556456e-02, & !10 + 1.494415e-02, 1.436491e-02, 1.382354e-02, 1.331719e-02, 1.284339e-02, & !10 + 1.239992e-02, 1.198486e-02, 1.159647e-02, 1.123323e-02, 1.089375e-02, & !10 + 1.057679e-02, 1.028124e-02, 1.000607e-02, 9.750376e-03, 9.513303e-03, & !10 + 9.294082e-03, 9.092003e-03, 8.906412e-03, 8.736702e-03, 8.582314e-03, & !10 + 8.442725e-03, & !10 + 1.775615e-01, 1.180046e-01, 8.929607e-02, 7.233500e-02, 6.108333e-02, & !11 + 5.303642e-02, 4.696927e-02, 4.221206e-02, 3.836768e-02, 3.518576e-02, & !11 + 3.250063e-02, 3.019825e-02, 2.819758e-02, 2.643943e-02, 2.487953e-02, & !11 + 2.348414e-02, 2.222705e-02, 2.108762e-02, 2.004936e-02, 1.909892e-02, & !11 + 1.822539e-02, 1.741975e-02, 1.667449e-02, 1.598330e-02, 1.534084e-02, & !11 + 1.474253e-02, 1.418446e-02, 1.366325e-02, 1.317597e-02, 1.272004e-02, & !11 + 1.229321e-02, 1.189350e-02, 1.151915e-02, 1.116859e-02, 1.084042e-02, & !11 + 1.053338e-02, 1.024636e-02, 9.978326e-03, 9.728357e-03, 9.495613e-03, & !11 + 9.279327e-03, 9.078798e-03, 8.893383e-03, 8.722488e-03, 8.565568e-03, & !11 + 8.422115e-03, & !11 + 9.465447e-02, 6.432047e-02, 5.060973e-02, 4.267283e-02, 3.741843e-02, & !12 + 3.363096e-02, 3.073531e-02, 2.842405e-02, 2.651789e-02, 2.490518e-02, & !12 + 2.351273e-02, 2.229056e-02, 2.120335e-02, 2.022541e-02, 1.933763e-02, & !12 + 1.852546e-02, 1.777763e-02, 1.708528e-02, 1.644134e-02, 1.584009e-02, & !12 + 1.527684e-02, 1.474774e-02, 1.424955e-02, 1.377957e-02, 1.333549e-02, & !12 + 1.291534e-02, 1.251743e-02, 1.214029e-02, 1.178265e-02, 1.144337e-02, & !12 + 1.112148e-02, 1.081609e-02, 1.052642e-02, 1.025178e-02, 9.991540e-03, & !12 + 9.745130e-03, 9.512038e-03, 9.291797e-03, 9.083980e-03, 8.888195e-03, & !12 + 8.704081e-03, 8.531306e-03, 8.369560e-03, 8.218558e-03, 8.078032e-03, & !12 + 7.947730e-03, & !12 + 1.560311e-01, 9.961097e-02, 7.502949e-02, 6.115022e-02, 5.214952e-02, & !13 + 4.578149e-02, 4.099731e-02, 3.724174e-02, 3.419343e-02, 3.165356e-02, & !13 + 2.949251e-02, 2.762222e-02, 2.598073e-02, 2.452322e-02, 2.321642e-02, & !13 + 2.203516e-02, 2.096002e-02, 1.997579e-02, 1.907036e-02, 1.823401e-02, & !13 + 1.745879e-02, 1.673819e-02, 1.606678e-02, 1.544003e-02, 1.485411e-02, & !13 + 1.430574e-02, 1.379215e-02, 1.331092e-02, 1.285996e-02, 1.243746e-02, & !13 + 1.204183e-02, 1.167164e-02, 1.132567e-02, 1.100281e-02, 1.070207e-02, & !13 + 1.042258e-02, 1.016352e-02, 9.924197e-03, 9.703953e-03, 9.502199e-03, & !13 + 9.318400e-03, 9.152066e-03, 9.002749e-03, 8.870038e-03, 8.753555e-03, & !13 + 8.652951e-03, & !13 + 1.559547e-01, 9.896700e-02, 7.441231e-02, 6.061469e-02, 5.168730e-02, & !14 + 4.537821e-02, 4.064106e-02, 3.692367e-02, 3.390714e-02, 3.139438e-02, & !14 + 2.925702e-02, 2.740783e-02, 2.578547e-02, 2.434552e-02, 2.305506e-02, & !14 + 2.188910e-02, 2.082842e-02, 1.985789e-02, 1.896553e-02, 1.814165e-02, & !14 + 1.737839e-02, 1.666927e-02, 1.600891e-02, 1.539279e-02, 1.481712e-02, & !14 + 1.427865e-02, 1.377463e-02, 1.330266e-02, 1.286068e-02, 1.244689e-02, & !14 + 1.205973e-02, 1.169780e-02, 1.135989e-02, 1.104492e-02, 1.075192e-02, & !14 + 1.048004e-02, 1.022850e-02, 9.996611e-03, 9.783753e-03, 9.589361e-03, & !14 + 9.412924e-03, 9.253977e-03, 9.112098e-03, 8.986903e-03, 8.878039e-03, & !14 + 8.785184e-03, & !14 + 1.102926e-01, 7.176622e-02, 5.530316e-02, 4.606056e-02, 4.006116e-02, & !15 + 3.579628e-02, 3.256909e-02, 3.001360e-02, 2.791920e-02, 2.615617e-02, & !15 + 2.464023e-02, 2.331426e-02, 2.213817e-02, 2.108301e-02, 2.012733e-02, & !15 + 1.925493e-02, 1.845331e-02, 1.771269e-02, 1.702531e-02, 1.638493e-02, & !15 + 1.578648e-02, 1.522579e-02, 1.469940e-02, 1.420442e-02, 1.373841e-02, & !15 + 1.329931e-02, 1.288535e-02, 1.249502e-02, 1.212700e-02, 1.178015e-02, & !15 + 1.145348e-02, 1.114612e-02, 1.085730e-02, 1.058633e-02, 1.033263e-02, & !15 + 1.009564e-02, 9.874895e-03, 9.669960e-03, 9.480449e-03, 9.306014e-03, & !15 + 9.146339e-03, 9.001138e-03, 8.870154e-03, 8.753148e-03, 8.649907e-03, & !15 + 8.560232e-03, & !15 + 1.688344e-01, 1.077072e-01, 7.994467e-02, 6.403862e-02, 5.369850e-02, & !16 + 4.641582e-02, 4.099331e-02, 3.678724e-02, 3.342069e-02, 3.065831e-02, & !16 + 2.834557e-02, 2.637680e-02, 2.467733e-02, 2.319286e-02, 2.188299e-02, & !16 + 2.071701e-02, 1.967121e-02, 1.872692e-02, 1.786931e-02, 1.708641e-02, & !16 + 1.636846e-02, 1.570743e-02, 1.509665e-02, 1.453052e-02, 1.400433e-02, & !16 + 1.351407e-02, 1.305631e-02, 1.262810e-02, 1.222688e-02, 1.185044e-02, & !16 + 1.149683e-02, 1.116436e-02, 1.085153e-02, 1.055701e-02, 1.027961e-02, & !16 + 1.001831e-02, 9.772141e-03, 9.540280e-03, 9.321966e-03, 9.116517e-03, & !16 + 8.923315e-03, 8.741803e-03, 8.571472e-03, 8.411860e-03, 8.262543e-03, & !16 + 8.123136e-03/), & !16 + shape=(/46,nBandsLW_RRTMG/)) +contains + ! ####################################################################################### + ! subroutine rrtmg_lw_cloud_optics + ! ####################################################################################### + subroutine rrtmg_lw_cloud_optics(ncol, nlay, nBandsLW, cld_lwp, cld_ref_liq, cld_iwp, & + cld_ref_ice, cld_rwp, cld_ref_rain, cld_swp, cld_ref_snow, cld_frac, tau_cld) + ! Inputs + integer,intent(in) :: & + nBandsLW, & ! Number of spectral bands + ncol, & ! Number of horizontal gridpoints + nlay ! Number of vertical layers + real(kind_phys), dimension(ncol,nlay), intent(in) :: & + cld_frac, & ! Cloud-fraction (1) + cld_lwp, & ! Cloud liquid water path (g/m2) + cld_ref_liq, & ! Effective radius (liquid) (micron) + cld_iwp, & ! Cloud ice water path (g/m2) + cld_ref_ice, & ! Effective radius (ice) (micron) + cld_rwp, & ! Cloud rain water path (g/m2) + cld_ref_rain, & ! Effective radius (rain-drop) (micron) + cld_swp, & ! Cloud snow-water path (g/m2) + cld_ref_snow ! Effective radius (snow-flake) (micron) + + ! Outputs + real(kind_phys),dimension(ncol,nlay,nBandsLW),intent(out) :: & + tau_cld + + ! Local variables + integer :: ij,ik,ib,index,ia + real(kind_phys) :: factor,fint,cld_ref_iceTemp,tau_snow, tau_rain + real(kind_phys),dimension(nBandsLW) :: tau_liq, tau_ice + + if (ilwcliq .gt. 0) then + do ij=1,ncol + do ik=1,nlay + if (cld_frac(ij,ik) .gt. 0.) then + ! Rain optical-depth (No band dependence) + tau_rain = absrain*cld_rwp(ij,ik) + + ! Snow optical-depth (No band dependence) + if (cld_swp(ij,ik) .gt. 0. .and. cld_ref_snow(ij,ik) .gt. 10._kind_phys) then + tau_snow = abssnow0*1.05756*cld_swp(ij,ik)/cld_ref_snow(ij,ik) + else + tau_snow = 0. + endif + + ! Liquid water opitcal-depth + if (cld_lwp(ij,ik) .le. 0.) then + tau_liq(:) = 0. + else + if (ilwcliq .eq. 1) then + factor = cld_ref_liq(ij,ik) - 1.5 + index = max( 1, min( 57, int( factor ) )) + fint = factor - float(index) + do ib=1,nBandsLW + tau_liq(ib) = max(0., cld_lwp(ij,ik)*(absliq1(index,ib) + & + fint*(absliq1(index+1,ib)-absliq1(index,ib)) )) + enddo + endif + endif + + ! Ice water optical-depth + if (cld_iwp(ij,ik) .le. 0.) then + tau_ice(:) = 0. + else + ! 1) Ebert and curry approach for all particle sizes. (bound between 13-130microns) + if (ilwcice .eq. 1) then + cld_ref_iceTemp = min(130., max(13.,real(cld_ref_ice(ij,ik)))) + do ib=1,nBandsLW + ia = ipat(ib) ! eb_&_c band index for ice cloud coeff + tau_ice(ib) = max(0., cld_iwp(ij,ik)*(absice1(1,ia) + absice1(2,ia)/cld_ref_iceTemp) ) + enddo + + ! 2) Streamer approach for ice effective radius between 5.0 and 131.0 microns + ! and ebert and curry approach for ice eff radius greater than 131.0 microns. + ! no smoothing between the transition of the two methods + elseif (ilwcice .eq. 2) then + factor = (cld_ref_ice(ij,ik) - 2.) / 3. + index = max( 1, min( 42, int( factor ) )) + fint = factor - float(index) + do ib = 1, nBandsLW + tau_ice(ib) = max(0., cld_iwp(ij,ik)*(absice2(index,ib) + & + fint*(absice2(index+1,ib) - absice2(index,ib)) )) + enddo + ! 3) Fu's approach for ice effective radius between 4.8 and 135 microns + ! (generalized effective size from 5 to 140 microns) + elseif (ilwcice .eq. 3) then + cld_ref_iceTemp = max(5., 1.0315*cld_ref_ice(ij,ik)) ! v4.71 value + factor = (cld_ref_iceTemp - 2.) / 3. + index = max( 1, min( 45, int( factor ) )) + fint = factor - float(index) + do ib = 1, nBandsLW + tau_ice(ib) = max(0., cld_iwp(ij,ik)*(absice3(index,ib) + & + fint*(absice3(index+1,ib) - absice3(index,ib)) )) + enddo + endif + endif + else + tau_rain = 0. + tau_snow = 0. + tau_liq(:) = 0. + tau_ice(:) = 0. + endif + ! Cloud optical depth + do ib = 1, nBandsLW + tau_cld(ij,ik,ib) = tau_ice(ib) + tau_liq(ib) + tau_rain + tau_snow + enddo + end do + end do + endif + end subroutine rrtmg_lw_cloud_optics + ! ####################################################################################### + ! SUBROUTINE mcica_subcol_lw + ! ####################################################################################### + subroutine mcica_subcol_lw(ncol, nlay, ngpts, cld_frac, icseed, dzlyr, de_lgth, cld_frac_mcica) + ! Inputs + integer,intent(in) :: & + ncol, & ! Number of horizontal gridpoints + nlay, & ! Number of vertical layers + ngpts ! Number of spectral g-points + integer,dimension(ncol),intent(in) :: & + icseed ! Permutation seed for each column. + real(kind_phys), dimension(ncol), intent(in) :: & + de_lgth ! Cloud decorrelation length (km) + real(kind_phys), dimension(ncol,nlay), intent(in) :: & + cld_frac, & ! Cloud-fraction + dzlyr ! Layer thinkness (km) + ! Outputs + !real(kind_phys),dimension(ncol,nlay,ngpts),intent(out) :: & + logical,dimension(ncol,nlay,ngpts),intent(out) :: & + cld_frac_mcica + ! Local variables + type(random_stat) :: stat + integer :: icol,n,k,k1 + real(kind_phys) :: tem1 + real(kind_phys),dimension(ngpts) :: rand1D + real(kind_phys),dimension(nlay*ngpts) :: rand2D + real(kind_phys),dimension(ngpts,nlay) :: cdfunc,cdfun2 + real(kind_phys),dimension(nlay) :: fac_lcf + logical,dimension(ngpts,nlay) :: lcloudy + + ! Loop over all columns + do icol=1,ncol + ! Call random_setseed() to advance random number generator by "icseed" values. + call random_setseed(icseed(icol),stat) + + ! ################################################################################### + ! Sub-column set up according to overlapping assumption: + ! - For random overlap, pick a random value at every level + ! - For max-random overlap, pick a random value at every level + ! - For maximum overlap, pick same random numebr at every level + ! ################################################################################### + select case ( iovrlw ) + ! ################################################################################### + ! 0) Random overlap + ! ################################################################################### + case( 0 ) + call random_number(rand2D,stat) + k1 = 0 + do n = 1, ngpts + do k = 1, nlay + k1 = k1 + 1 + cdfunc(n,k) = rand2d(k1) + enddo + enddo + + ! ################################################################################### + ! 1) Maximum-random overlap + ! ################################################################################### + case(1) + call random_number(rand2D,stat) + k1 = 0 + do n = 1, ngpts + do k = 1, nlay + k1 = k1 + 1 + cdfunc(n,k) = rand2d(k1) + enddo + enddo + + ! First pick a random number for bottom (or top) layer. + ! then walk up the column: (aer's code) + ! if layer below is cloudy, use the same rand num in the layer below + ! if layer below is clear, use a new random number + do k = 2, nlay + k1 = k - 1 + tem1 = 1._kind_phys - cld_frac(icol,k1) + do n = 1, ngpts + if ( cdfunc(n,k1) > tem1 ) then + cdfunc(n,k) = cdfunc(n,k1) + else + cdfunc(n,k) = cdfunc(n,k) * tem1 + endif + enddo + enddo + + ! ################################################################################### + ! 2) Maximum overlap + ! ################################################################################### + case(2) + call random_number(rand1d,stat) + do n = 1, ngpts + tem1 = rand1d(n) + do k = 1, nlay + cdfunc(n,k) = tem1 + enddo + enddo + + ! ################################################################################### + ! 3) Decorrelation length + ! ################################################################################### + case(3) + ! Compute overlapping factors based on layer midpoint distances and decorrelation + ! depths + do k = nlay, 2, -1 + fac_lcf(k) = exp( -0.5 * (dzlyr(iCol,k)+dzlyr(iCol,k-1)) / de_lgth(iCol) ) + enddo + + ! Setup 2 sets of random numbers + call random_number ( rand2d, stat ) + k1 = 0 + do k = 1, nlay + do n = 1, ngpts + k1 = k1 + 1 + cdfunc(n,k) = rand2d(k1) + enddo + enddo + ! + call random_number ( rand2d, stat ) + k1 = 0 + do k = 1, nlay + do n = 1, ngpts + k1 = k1 + 1 + cdfun2(n,k) = rand2d(k1) + enddo + enddo + + ! Then working from the top down: + ! if a random number (from an independent set -cdfun2) is smaller then the + ! scale factor: use the upper layer's number, otherwise use a new random + ! number (keep the original assigned one). + do k = nlay-1, 1, -1 + k1 = k + 1 + do n = 1, ngpts + if ( cdfun2(n,k) <= fac_lcf(k1) ) then + cdfunc(n,k) = cdfunc(n,k1) + endif + enddo + enddo + + end select + + ! ################################################################################### + ! Generate subcolumn cloud mask (.false./.true. for clear/cloudy) + ! ################################################################################### + do k = 1, nlay + tem1 = 1._kind_phys - cld_frac(icol,k) + do n = 1, ngpts + lcloudy(n,k) = cdfunc(n,k) >= tem1 + if (lcloudy(n,k)) then + cld_frac_mcica(icol,k,n) = .true. + else + cld_frac_mcica(icol,k,n) = .false. + endif + enddo + enddo + enddo ! END LOOP OVER COLUMNS + end subroutine mcica_subcol_lw + +end module mo_rrtmg_lw_cloud_optics diff --git a/physics/rrtmg_sw_cloud_optics.F90 b/physics/rrtmg_sw_cloud_optics.F90 new file mode 100644 index 000000000..d4b280032 --- /dev/null +++ b/physics/rrtmg_sw_cloud_optics.F90 @@ -0,0 +1,2412 @@ +module mo_rrtmg_sw_cloud_optics + use machine, only: kind_phys + use physparam, only: iswcliq, iswcice, iovrsw + use mersenne_twister, only: random_setseed, random_number, random_stat + implicit none + + ! Parameters used for RRTMG cloud-optics + integer,parameter :: & + nBandsSW_RRTMG = 14 + real(kind_phys),parameter :: & + a0r = 3.07e-3 + real(kind_phys),dimension(nBandsSW_RRTMG),parameter :: & + b0r = (/0.466, 0.437, 0.416, 0.391, 0.374, 0.352, 0.183, & + 0.048, 0.012, 0.000, 0.000, 0.000, 0.000, 0.496/) + real(kind_phys),dimension(nBandsSW_RRTMG),parameter :: & + b0s = (/0.460, 0.460, 0.460, 0.460, 0.460, 0.460, 0.460, & + 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.460/) + real(kind_phys),dimension(nBandsSW_RRTMG),parameter :: & + b1s = (/0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, & + 1.62e-5, 1.62e-5, 0.000, 0.000, 0.000, 0.000, 0.000/) + real(kind_phys),dimension(nBandsSW_RRTMG),parameter :: & + c0r = (/0.975, 0.965, 0.960, 0.955, 0.952, 0.950, 0.944, & + 0.894, 0.884, 0.883, 0.883, 0.883, 0.883, 0.980/) + real(kind_phys),dimension(nBandsSW_RRTMG),parameter :: & + c0s = (/0.970, 0.970, 0.970, 0.970, 0.970, 0.970, 0.970, & + 0.970, 0.970, 0.700, 0.700, 0.700, 0.700, 0.970/) + + ! RRTMG SW cloud property coefficients + ! Liquid + real(kind_phys),dimension(58,nBandsSW_RRTMG),parameter :: & ! + extliq1 = reshape(source= (/ & ! + 8.981463e-01, 6.317895e-01, 4.557508e-01, 3.481624e-01, 2.797950e-01, & ! 1 + 2.342753e-01, 2.026934e-01, 1.800102e-01, 1.632408e-01, 1.505384e-01, & ! + 1.354524e-01, 1.246520e-01, 1.154342e-01, 1.074756e-01, 1.005353e-01, & ! + 9.442987e-02, 8.901760e-02, 8.418693e-02, 7.984904e-02, 7.593229e-02, & ! + 7.237827e-02, 6.913887e-02, 6.617415e-02, 6.345061e-02, 6.094001e-02, & ! + 5.861834e-02, 5.646506e-02, 5.446250e-02, 5.249596e-02, 5.081114e-02, & ! + 4.922243e-02, 4.772189e-02, 4.630243e-02, 4.495766e-02, 4.368189e-02, & ! + 4.246995e-02, 4.131720e-02, 4.021941e-02, 3.917276e-02, 3.817376e-02, & ! + 3.721926e-02, 3.630635e-02, 3.543237e-02, 3.459491e-02, 3.379171e-02, & ! + 3.302073e-02, 3.228007e-02, 3.156798e-02, 3.088284e-02, 3.022315e-02, & ! + 2.958753e-02, 2.897468e-02, 2.838340e-02, 2.781258e-02, 2.726117e-02, & ! + 2.672821e-02, 2.621278e-02, 2.5714e-02, & ! + 8.293797e-01, 6.048371e-01, 4.465706e-01, 3.460387e-01, 2.800064e-01, & ! 2 + 2.346584e-01, 2.022399e-01, 1.782626e-01, 1.600153e-01, 1.457903e-01, & ! + 1.334061e-01, 1.228548e-01, 1.138396e-01, 1.060486e-01, 9.924856e-02, & ! + 9.326208e-02, 8.795158e-02, 8.320883e-02, 7.894750e-02, 7.509792e-02, & ! + 7.160323e-02, 6.841653e-02, 6.549889e-02, 6.281763e-02, 6.034516e-02, & ! + 5.805802e-02, 5.593615e-02, 5.396226e-02, 5.202302e-02, 5.036246e-02, & ! + 4.879606e-02, 4.731610e-02, 4.591565e-02, 4.458852e-02, 4.332912e-02, & ! + 4.213243e-02, 4.099390e-02, 3.990941e-02, 3.887522e-02, 3.788792e-02, & ! + 3.694440e-02, 3.604183e-02, 3.517760e-02, 3.434934e-02, 3.355485e-02, & ! + 3.279211e-02, 3.205925e-02, 3.135458e-02, 3.067648e-02, 3.002349e-02, & ! + 2.939425e-02, 2.878748e-02, 2.820200e-02, 2.763673e-02, 2.709062e-02, & ! + 2.656272e-02, 2.605214e-02, 2.5558e-02, & ! + 9.193685e-01, 6.128292e-01, 4.344150e-01, 3.303048e-01, 2.659500e-01, & ! 3 + 2.239727e-01, 1.953457e-01, 1.751012e-01, 1.603515e-01, 1.493360e-01, & ! + 1.323791e-01, 1.219335e-01, 1.130076e-01, 1.052926e-01, 9.855839e-02, & ! + 9.262925e-02, 8.736918e-02, 8.267112e-02, 7.844965e-02, 7.463585e-02, & ! + 7.117343e-02, 6.801601e-02, 6.512503e-02, 6.246815e-02, 6.001806e-02, & ! + 5.775154e-02, 5.564872e-02, 5.369250e-02, 5.176284e-02, 5.011536e-02, & ! + 4.856099e-02, 4.709211e-02, 4.570193e-02, 4.438430e-02, 4.313375e-02, & ! + 4.194529e-02, 4.081443e-02, 3.973712e-02, 3.870966e-02, 3.772866e-02, & ! + 3.679108e-02, 3.589409e-02, 3.503514e-02, 3.421185e-02, 3.342206e-02, & ! + 3.266377e-02, 3.193513e-02, 3.123447e-02, 3.056018e-02, 2.991081e-02, & ! + 2.928502e-02, 2.868154e-02, 2.809920e-02, 2.753692e-02, 2.699367e-02, & ! + 2.646852e-02, 2.596057e-02, 2.5469e-02, & ! + 9.136931e-01, 5.743244e-01, 4.080708e-01, 3.150572e-01, 2.577261e-01, & ! 4 + 2.197900e-01, 1.933037e-01, 1.740212e-01, 1.595056e-01, 1.482756e-01, & ! + 1.312164e-01, 1.209246e-01, 1.121227e-01, 1.045095e-01, 9.785967e-02, & ! + 9.200149e-02, 8.680170e-02, 8.215531e-02, 7.797850e-02, 7.420361e-02, & ! + 7.077530e-02, 6.764798e-02, 6.478369e-02, 6.215063e-02, 5.972189e-02, & ! + 5.747458e-02, 5.538913e-02, 5.344866e-02, 5.153216e-02, 4.989745e-02, & ! + 4.835476e-02, 4.689661e-02, 4.551629e-02, 4.420777e-02, 4.296563e-02, & ! + 4.178497e-02, 4.066137e-02, 3.959081e-02, 3.856963e-02, 3.759452e-02, & ! + 3.666244e-02, 3.577061e-02, 3.491650e-02, 3.409777e-02, 3.331227e-02, & ! + 3.255803e-02, 3.183322e-02, 3.113617e-02, 3.046530e-02, 2.981918e-02, & ! + 2.919646e-02, 2.859591e-02, 2.801635e-02, 2.745671e-02, 2.691599e-02, & ! + 2.639324e-02, 2.588759e-02, 2.5398e-02, & ! + 8.447548e-01, 5.326840e-01, 3.921523e-01, 3.119082e-01, 2.597055e-01, & ! 5 + 2.228737e-01, 1.954157e-01, 1.741155e-01, 1.570881e-01, 1.431520e-01, & ! + 1.302034e-01, 1.200491e-01, 1.113571e-01, 1.038330e-01, 9.725657e-02, & ! + 9.145949e-02, 8.631112e-02, 8.170840e-02, 7.756901e-02, 7.382641e-02, & ! + 7.042616e-02, 6.732338e-02, 6.448069e-02, 6.186672e-02, 5.945494e-02, & ! + 5.722277e-02, 5.515089e-02, 5.322262e-02, 5.132153e-02, 4.969799e-02, & ! + 4.816556e-02, 4.671686e-02, 4.534525e-02, 4.404480e-02, 4.281014e-02, & ! + 4.163643e-02, 4.051930e-02, 3.945479e-02, 3.843927e-02, 3.746945e-02, & ! + 3.654234e-02, 3.565518e-02, 3.480547e-02, 3.399088e-02, 3.320930e-02, & ! + 3.245876e-02, 3.173745e-02, 3.104371e-02, 3.037600e-02, 2.973287e-02, & ! + 2.911300e-02, 2.851516e-02, 2.793818e-02, 2.738101e-02, 2.684264e-02, & ! + 2.632214e-02, 2.581863e-02, 2.5331e-02, & ! + 7.727642e-01, 5.034865e-01, 3.808673e-01, 3.080333e-01, 2.586453e-01, & ! 6 + 2.224989e-01, 1.947060e-01, 1.725821e-01, 1.545096e-01, 1.394456e-01, & ! + 1.288683e-01, 1.188852e-01, 1.103317e-01, 1.029214e-01, 9.643967e-02, & ! + 9.072239e-02, 8.564194e-02, 8.109758e-02, 7.700875e-02, 7.331026e-02, & ! + 6.994879e-02, 6.688028e-02, 6.406807e-02, 6.148133e-02, 5.909400e-02, & ! + 5.688388e-02, 5.483197e-02, 5.292185e-02, 5.103763e-02, 4.942905e-02, & ! + 4.791039e-02, 4.647438e-02, 4.511453e-02, 4.382497e-02, 4.260043e-02, & ! + 4.143616e-02, 4.032784e-02, 3.927155e-02, 3.826375e-02, 3.730117e-02, & ! + 3.638087e-02, 3.550013e-02, 3.465646e-02, 3.384759e-02, 3.307141e-02, & ! + 3.232598e-02, 3.160953e-02, 3.092040e-02, 3.025706e-02, 2.961810e-02, & ! + 2.900220e-02, 2.840814e-02, 2.783478e-02, 2.728106e-02, 2.674599e-02, & ! + 2.622864e-02, 2.572816e-02, 2.5244e-02, & ! + 7.416833e-01, 4.959591e-01, 3.775057e-01, 3.056353e-01, 2.565943e-01, & ! 7 + 2.206935e-01, 1.931479e-01, 1.712860e-01, 1.534837e-01, 1.386906e-01, & ! + 1.281198e-01, 1.182344e-01, 1.097595e-01, 1.024137e-01, 9.598552e-02, & ! + 9.031320e-02, 8.527093e-02, 8.075927e-02, 7.669869e-02, 7.302481e-02, & ! + 6.968491e-02, 6.663542e-02, 6.384008e-02, 6.126838e-02, 5.889452e-02, & ! + 5.669654e-02, 5.465558e-02, 5.275540e-02, 5.087937e-02, 4.927904e-02, & ! + 4.776796e-02, 4.633895e-02, 4.498557e-02, 4.370202e-02, 4.248306e-02, & ! + 4.132399e-02, 4.022052e-02, 3.916878e-02, 3.816523e-02, 3.720665e-02, & ! + 3.629011e-02, 3.541290e-02, 3.457257e-02, 3.376685e-02, 3.299365e-02, & ! + 3.225105e-02, 3.153728e-02, 3.085069e-02, 3.018977e-02, 2.955310e-02, & ! + 2.893940e-02, 2.834742e-02, 2.777606e-02, 2.722424e-02, 2.669099e-02, & ! + 2.617539e-02, 2.567658e-02, 2.5194e-02, & ! + 7.058580e-01, 4.866573e-01, 3.712238e-01, 2.998638e-01, 2.513441e-01, & ! 8 + 2.161972e-01, 1.895576e-01, 1.686669e-01, 1.518437e-01, 1.380046e-01, & ! + 1.267564e-01, 1.170399e-01, 1.087026e-01, 1.014704e-01, 9.513729e-02, & ! + 8.954555e-02, 8.457221e-02, 8.012009e-02, 7.611136e-02, 7.248294e-02, & ! + 6.918317e-02, 6.616934e-02, 6.340584e-02, 6.086273e-02, 5.851465e-02, & ! + 5.634001e-02, 5.432027e-02, 5.243946e-02, 5.058070e-02, 4.899628e-02, & ! + 4.749975e-02, 4.608411e-02, 4.474303e-02, 4.347082e-02, 4.226237e-02, & ! + 4.111303e-02, 4.001861e-02, 3.897528e-02, 3.797959e-02, 3.702835e-02, & ! + 3.611867e-02, 3.524791e-02, 3.441364e-02, 3.361360e-02, 3.284577e-02, & ! + 3.210823e-02, 3.139923e-02, 3.071716e-02, 3.006052e-02, 2.942791e-02, & ! + 2.881806e-02, 2.822974e-02, 2.766185e-02, 2.711335e-02, 2.658326e-02, & ! + 2.607066e-02, 2.557473e-02, 2.5095e-02, & ! + 6.822779e-01, 4.750373e-01, 3.634834e-01, 2.940726e-01, 2.468060e-01, & ! 9 + 2.125768e-01, 1.866586e-01, 1.663588e-01, 1.500326e-01, 1.366192e-01, & ! + 1.253472e-01, 1.158052e-01, 1.076101e-01, 1.004954e-01, 9.426089e-02, & ! + 8.875268e-02, 8.385090e-02, 7.946063e-02, 7.550578e-02, 7.192466e-02, & ! + 6.866669e-02, 6.569001e-02, 6.295971e-02, 6.044642e-02, 5.812526e-02, & ! + 5.597500e-02, 5.397746e-02, 5.211690e-02, 5.027505e-02, 4.870703e-02, & ! + 4.722555e-02, 4.582373e-02, 4.449540e-02, 4.323497e-02, 4.203742e-02, & ! + 4.089821e-02, 3.981321e-02, 3.877867e-02, 3.779118e-02, 3.684762e-02, & ! + 3.594514e-02, 3.508114e-02, 3.425322e-02, 3.345917e-02, 3.269698e-02, & ! + 3.196477e-02, 3.126082e-02, 3.058352e-02, 2.993141e-02, 2.930310e-02, & ! + 2.869732e-02, 2.811289e-02, 2.754869e-02, 2.700371e-02, 2.647698e-02, & ! + 2.596760e-02, 2.547473e-02, 2.4998e-02, & ! + 6.666233e-01, 4.662044e-01, 3.579517e-01, 2.902984e-01, 2.440475e-01, & ! 10 + 2.104431e-01, 1.849277e-01, 1.648970e-01, 1.487555e-01, 1.354714e-01, & ! + 1.244173e-01, 1.149913e-01, 1.068903e-01, 9.985323e-02, 9.368351e-02, & ! + 8.823009e-02, 8.337507e-02, 7.902511e-02, 7.510529e-02, 7.155482e-02, & ! + 6.832386e-02, 6.537113e-02, 6.266218e-02, 6.016802e-02, 5.786408e-02, & ! + 5.572939e-02, 5.374598e-02, 5.189830e-02, 5.006825e-02, 4.851081e-02, & ! + 4.703906e-02, 4.564623e-02, 4.432621e-02, 4.307349e-02, 4.188312e-02, & ! + 4.075060e-02, 3.967183e-02, 3.864313e-02, 3.766111e-02, 3.672269e-02, & ! + 3.582505e-02, 3.496559e-02, 3.414196e-02, 3.335198e-02, 3.259362e-02, & ! + 3.186505e-02, 3.116454e-02, 3.049052e-02, 2.984152e-02, 2.921617e-02, & ! + 2.861322e-02, 2.803148e-02, 2.746986e-02, 2.692733e-02, 2.640295e-02, & ! + 2.589582e-02, 2.540510e-02, 2.4930e-02, & ! + 6.535669e-01, 4.585865e-01, 3.529226e-01, 2.867245e-01, 2.413848e-01, & ! 11 + 2.083956e-01, 1.833191e-01, 1.636150e-01, 1.477247e-01, 1.346392e-01, & ! + 1.236449e-01, 1.143095e-01, 1.062828e-01, 9.930773e-02, 9.319029e-02, & ! + 8.778150e-02, 8.296497e-02, 7.864847e-02, 7.475799e-02, 7.123343e-02, & ! + 6.802549e-02, 6.509332e-02, 6.240285e-02, 5.992538e-02, 5.763657e-02, & ! + 5.551566e-02, 5.354483e-02, 5.170870e-02, 4.988866e-02, 4.834061e-02, & ! + 4.687751e-02, 4.549264e-02, 4.417999e-02, 4.293410e-02, 4.175006e-02, & ! + 4.062344e-02, 3.955019e-02, 3.852663e-02, 3.754943e-02, 3.661553e-02, & ! + 3.572214e-02, 3.486669e-02, 3.404683e-02, 3.326040e-02, 3.250542e-02, & ! + 3.178003e-02, 3.108254e-02, 3.041139e-02, 2.976511e-02, 2.914235e-02, & ! + 2.854187e-02, 2.796247e-02, 2.740309e-02, 2.686271e-02, 2.634038e-02, & ! + 2.583520e-02, 2.534636e-02, 2.4873e-02, & ! + 6.448790e-01, 4.541425e-01, 3.503348e-01, 2.850494e-01, 2.401966e-01, & ! 12 + 2.074811e-01, 1.825631e-01, 1.629515e-01, 1.471142e-01, 1.340574e-01, & ! + 1.231462e-01, 1.138628e-01, 1.058802e-01, 9.894286e-02, 9.285818e-02, & ! + 8.747802e-02, 8.268676e-02, 7.839271e-02, 7.452230e-02, 7.101580e-02, & ! + 6.782418e-02, 6.490685e-02, 6.222991e-02, 5.976484e-02, 5.748742e-02, & ! + 5.537703e-02, 5.341593e-02, 5.158883e-02, 4.977355e-02, 4.823172e-02, & ! + 4.677430e-02, 4.539465e-02, 4.408680e-02, 4.284533e-02, 4.166539e-02, & ! + 4.054257e-02, 3.947283e-02, 3.845256e-02, 3.747842e-02, 3.654737e-02, & ! + 3.565665e-02, 3.480370e-02, 3.398620e-02, 3.320198e-02, 3.244908e-02, & ! + 3.172566e-02, 3.103002e-02, 3.036062e-02, 2.971600e-02, 2.909482e-02, & ! + 2.849582e-02, 2.791785e-02, 2.735982e-02, 2.682072e-02, 2.629960e-02, & ! + 2.579559e-02, 2.530786e-02, 2.4836e-02, & ! + 6.422688e-01, 4.528453e-01, 3.497232e-01, 2.847724e-01, 2.400815e-01, & ! 13 + 2.074403e-01, 1.825502e-01, 1.629415e-01, 1.470934e-01, 1.340183e-01, & ! + 1.230935e-01, 1.138049e-01, 1.058201e-01, 9.888245e-02, 9.279878e-02, & ! + 8.742053e-02, 8.263175e-02, 7.834058e-02, 7.447327e-02, 7.097000e-02, & ! + 6.778167e-02, 6.486765e-02, 6.219400e-02, 5.973215e-02, 5.745790e-02, & ! + 5.535059e-02, 5.339250e-02, 5.156831e-02, 4.975308e-02, 4.821235e-02, & ! + 4.675596e-02, 4.537727e-02, 4.407030e-02, 4.282968e-02, 4.165053e-02, & ! + 4.052845e-02, 3.945941e-02, 3.843980e-02, 3.746628e-02, 3.653583e-02, & ! + 3.564567e-02, 3.479326e-02, 3.397626e-02, 3.319253e-02, 3.244008e-02, & ! + 3.171711e-02, 3.102189e-02, 3.035289e-02, 2.970866e-02, 2.908784e-02, & ! + 2.848920e-02, 2.791156e-02, 2.735385e-02, 2.681507e-02, 2.629425e-02, & ! + 2.579053e-02, 2.530308e-02, 2.4831e-02, & ! + 4.614710e-01, 4.556116e-01, 4.056568e-01, 3.529833e-01, 3.060334e-01, & ! 14 + 2.658127e-01, 2.316095e-01, 2.024325e-01, 1.773749e-01, 1.556867e-01, & ! + 1.455558e-01, 1.332882e-01, 1.229052e-01, 1.140067e-01, 1.062981e-01, & ! + 9.955703e-02, 9.361333e-02, 8.833420e-02, 8.361467e-02, 7.937071e-02, & ! + 7.553420e-02, 7.204942e-02, 6.887031e-02, 6.595851e-02, 6.328178e-02, & ! + 6.081286e-02, 5.852854e-02, 5.640892e-02, 5.431269e-02, 5.252561e-02, & ! + 5.084345e-02, 4.925727e-02, 4.775910e-02, 4.634182e-02, 4.499907e-02, & ! + 4.372512e-02, 4.251484e-02, 4.136357e-02, 4.026710e-02, 3.922162e-02, & ! + 3.822365e-02, 3.727004e-02, 3.635790e-02, 3.548457e-02, 3.464764e-02, & ! + 3.384488e-02, 3.307424e-02, 3.233384e-02, 3.162192e-02, 3.093688e-02, & ! + 3.027723e-02, 2.964158e-02, 2.902864e-02, 2.843722e-02, 2.786621e-02, & ! + 2.731457e-02, 2.678133e-02, 2.6266e-02/), & ! + shape = (/58,nBandsSW_RRTMG/)) + + real(kind_phys),dimension(58,nBandsSW_RRTMG),parameter :: & ! + extliq2 = reshape(source= (/ & ! + 9.004493E-01, 6.366723E-01, 4.542354E-01, 3.468253E-01, 2.816431E-01, & ! 1 + 2.383415E-01, 2.070854E-01, 1.831854E-01, 1.642115E-01, 1.487539E-01, & ! + 1.359169E-01, 1.250900E-01, 1.158354E-01, 1.078400E-01, 1.008646E-01, & ! + 9.472307E-02, 8.928000E-02, 8.442308E-02, 8.005924E-02, 7.612231E-02, & ! + 7.255153E-02, 6.929539E-02, 6.631769E-02, 6.358153E-02, 6.106231E-02, & ! + 5.873077E-02, 5.656924E-02, 5.455769E-02, 5.267846E-02, 5.091923E-02, & ! + 4.926692E-02, 4.771154E-02, 4.623923E-02, 4.484385E-02, 4.351539E-02, & ! + 4.224615E-02, 4.103385E-02, 3.986538E-02, 3.874077E-02, 3.765462E-02, & ! + 3.660077E-02, 3.557384E-02, 3.457615E-02, 3.360308E-02, 3.265000E-02, & ! + 3.171770E-02, 3.080538E-02, 2.990846E-02, 2.903000E-02, 2.816461E-02, & ! + 2.731539E-02, 2.648231E-02, 2.566308E-02, 2.485923E-02, 2.407000E-02, & ! + 2.329615E-02, 2.253769E-02, 2.179615E-02, & ! + 6.741200e-01, 5.390739e-01, 4.198767e-01, 3.332553e-01, 2.735633e-01, & ! 2 + 2.317727e-01, 2.012760e-01, 1.780400e-01, 1.596927e-01, 1.447980e-01, & ! + 1.324480e-01, 1.220347e-01, 1.131327e-01, 1.054313e-01, 9.870534e-02, & ! + 9.278200e-02, 8.752599e-02, 8.282933e-02, 7.860600e-02, 7.479133e-02, & ! + 7.132800e-02, 6.816733e-02, 6.527401e-02, 6.261266e-02, 6.015934e-02, & ! + 5.788867e-02, 5.578134e-02, 5.381667e-02, 5.198133e-02, 5.026067e-02, & ! + 4.864466e-02, 4.712267e-02, 4.568066e-02, 4.431200e-02, 4.300867e-02, & ! + 4.176600e-02, 4.057400e-02, 3.942534e-02, 3.832066e-02, 3.725068e-02, & ! + 3.621400e-02, 3.520533e-02, 3.422333e-02, 3.326400e-02, 3.232467e-02, & ! + 3.140535e-02, 3.050400e-02, 2.962000e-02, 2.875267e-02, 2.789800e-02, & ! + 2.705934e-02, 2.623667e-02, 2.542667e-02, 2.463200e-02, 2.385267e-02, & ! + 2.308667e-02, 2.233667e-02, 2.160067e-02, & ! + 9.250861e-01, 6.245692e-01, 4.347038e-01, 3.320208e-01, 2.714869e-01, & ! 3 + 2.309516e-01, 2.012592e-01, 1.783315e-01, 1.600369e-01, 1.451000e-01, & ! + 1.326838e-01, 1.222069e-01, 1.132554e-01, 1.055146e-01, 9.876000e-02, & ! + 9.281386e-02, 8.754000e-02, 8.283078e-02, 7.860077e-02, 7.477769e-02, & ! + 7.130847e-02, 6.814461e-02, 6.524615e-02, 6.258462e-02, 6.012847e-02, & ! + 5.785462e-02, 5.574231e-02, 5.378000e-02, 5.194461e-02, 5.022462e-02, & ! + 4.860846e-02, 4.708462e-02, 4.564154e-02, 4.427462e-02, 4.297231e-02, & ! + 4.172769e-02, 4.053693e-02, 3.939000e-02, 3.828462e-02, 3.721692e-02, & ! + 3.618000e-02, 3.517077e-02, 3.418923e-02, 3.323077e-02, 3.229154e-02, & ! + 3.137154e-02, 3.047154e-02, 2.959077e-02, 2.872308e-02, 2.786846e-02, & ! + 2.703077e-02, 2.620923e-02, 2.540077e-02, 2.460615e-02, 2.382693e-02, & ! + 2.306231e-02, 2.231231e-02, 2.157923e-02, & ! + 9.298960e-01, 5.776460e-01, 4.083450e-01, 3.211160e-01, 2.666390e-01, & ! 4 + 2.281990e-01, 1.993250e-01, 1.768080e-01, 1.587810e-01, 1.440390e-01, & ! + 1.317720e-01, 1.214150e-01, 1.125540e-01, 1.048890e-01, 9.819600e-02, & ! + 9.230201e-02, 8.706900e-02, 8.239698e-02, 7.819500e-02, 7.439899e-02, & ! + 7.095300e-02, 6.780700e-02, 6.492900e-02, 6.228600e-02, 5.984600e-02, & ! + 5.758599e-02, 5.549099e-02, 5.353801e-02, 5.171400e-02, 5.000500e-02, & ! + 4.840000e-02, 4.688500e-02, 4.545100e-02, 4.409300e-02, 4.279700e-02, & ! + 4.156100e-02, 4.037700e-02, 3.923800e-02, 3.813800e-02, 3.707600e-02, & ! + 3.604500e-02, 3.504300e-02, 3.406500e-02, 3.310800e-02, 3.217700e-02, & ! + 3.126600e-02, 3.036800e-02, 2.948900e-02, 2.862400e-02, 2.777500e-02, & ! + 2.694200e-02, 2.612300e-02, 2.531700e-02, 2.452800e-02, 2.375100e-02, & ! + 2.299100e-02, 2.224300e-02, 2.151201e-02, & ! + 8.780964e-01, 5.407031e-01, 3.961100e-01, 3.166645e-01, 2.640455e-01, & ! 5 + 2.261070e-01, 1.974820e-01, 1.751775e-01, 1.573415e-01, 1.427725e-01, & ! + 1.306535e-01, 1.204195e-01, 1.116650e-01, 1.040915e-01, 9.747550e-02, & ! + 9.164800e-02, 8.647649e-02, 8.185501e-02, 7.770200e-02, 7.394749e-02, & ! + 7.053800e-02, 6.742700e-02, 6.457999e-02, 6.196149e-02, 5.954450e-02, & ! + 5.730650e-02, 5.522949e-02, 5.329450e-02, 5.148500e-02, 4.979000e-02, & ! + 4.819600e-02, 4.669301e-02, 4.527050e-02, 4.391899e-02, 4.263500e-02, & ! + 4.140500e-02, 4.022850e-02, 3.909500e-02, 3.800199e-02, 3.694600e-02, & ! + 3.592000e-02, 3.492250e-02, 3.395050e-02, 3.300150e-02, 3.207250e-02, & ! + 3.116250e-02, 3.027100e-02, 2.939500e-02, 2.853500e-02, 2.768900e-02, & ! + 2.686000e-02, 2.604350e-02, 2.524150e-02, 2.445350e-02, 2.368049e-02, & ! + 2.292150e-02, 2.217800e-02, 2.144800e-02, & ! + 7.937480e-01, 5.123036e-01, 3.858181e-01, 3.099622e-01, 2.586829e-01, & ! 6 + 2.217587e-01, 1.939755e-01, 1.723397e-01, 1.550258e-01, 1.408600e-01, & ! + 1.290545e-01, 1.190661e-01, 1.105039e-01, 1.030848e-01, 9.659387e-02, & ! + 9.086775e-02, 8.577807e-02, 8.122452e-02, 7.712711e-02, 7.342193e-02, & ! + 7.005387e-02, 6.697840e-02, 6.416000e-02, 6.156903e-02, 5.917484e-02, & ! + 5.695807e-02, 5.489968e-02, 5.298097e-02, 5.118806e-02, 4.950645e-02, & ! + 4.792710e-02, 4.643581e-02, 4.502484e-02, 4.368547e-02, 4.241001e-02, & ! + 4.118936e-02, 4.002193e-02, 3.889711e-02, 3.781322e-02, 3.676387e-02, & ! + 3.574549e-02, 3.475548e-02, 3.379033e-02, 3.284678e-02, 3.192420e-02, & ! + 3.102032e-02, 3.013484e-02, 2.926258e-02, 2.840839e-02, 2.756742e-02, & ! + 2.674258e-02, 2.593064e-02, 2.513258e-02, 2.435000e-02, 2.358064e-02, & ! + 2.282581e-02, 2.208548e-02, 2.135936e-02, & ! + 7.533129e-01, 5.033129e-01, 3.811271e-01, 3.062757e-01, 2.558729e-01, & ! 7 + 2.196828e-01, 1.924372e-01, 1.711714e-01, 1.541086e-01, 1.401114e-01, & ! + 1.284257e-01, 1.185200e-01, 1.100243e-01, 1.026529e-01, 9.620142e-02, & ! + 9.050714e-02, 8.544428e-02, 8.091714e-02, 7.684000e-02, 7.315429e-02, & ! + 6.980143e-02, 6.673999e-02, 6.394000e-02, 6.136000e-02, 5.897715e-02, & ! + 5.677000e-02, 5.472285e-02, 5.281286e-02, 5.102858e-02, 4.935429e-02, & ! + 4.778000e-02, 4.629714e-02, 4.489142e-02, 4.355857e-02, 4.228715e-02, & ! + 4.107285e-02, 3.990857e-02, 3.879000e-02, 3.770999e-02, 3.666429e-02, & ! + 3.565000e-02, 3.466286e-02, 3.370143e-02, 3.276143e-02, 3.184143e-02, & ! + 3.094000e-02, 3.005714e-02, 2.919000e-02, 2.833714e-02, 2.750000e-02, & ! + 2.667714e-02, 2.586714e-02, 2.507143e-02, 2.429143e-02, 2.352428e-02, & ! + 2.277143e-02, 2.203429e-02, 2.130857e-02, & ! + 7.079894e-01, 4.878198e-01, 3.719852e-01, 3.001873e-01, 2.514795e-01, & ! 8 + 2.163013e-01, 1.897100e-01, 1.689033e-01, 1.521793e-01, 1.384449e-01, & ! + 1.269666e-01, 1.172326e-01, 1.088745e-01, 1.016224e-01, 9.527085e-02, & ! + 8.966240e-02, 8.467543e-02, 8.021144e-02, 7.619344e-02, 7.255676e-02, & ! + 6.924996e-02, 6.623030e-02, 6.346261e-02, 6.091499e-02, 5.856325e-02, & ! + 5.638385e-02, 5.435930e-02, 5.247156e-02, 5.070699e-02, 4.905230e-02, & ! + 4.749499e-02, 4.602611e-02, 4.463581e-02, 4.331543e-02, 4.205647e-02, & ! + 4.085241e-02, 3.969978e-02, 3.859033e-02, 3.751877e-02, 3.648168e-02, & ! + 3.547468e-02, 3.449553e-02, 3.354072e-02, 3.260732e-02, 3.169438e-02, & ! + 3.079969e-02, 2.992146e-02, 2.905875e-02, 2.821201e-02, 2.737873e-02, & ! + 2.656052e-02, 2.575586e-02, 2.496511e-02, 2.418783e-02, 2.342500e-02, & ! + 2.267646e-02, 2.194177e-02, 2.122146e-02, & ! + 6.850164e-01, 4.762468e-01, 3.642001e-01, 2.946012e-01, 2.472001e-01, & ! 9 + 2.128588e-01, 1.868537e-01, 1.664893e-01, 1.501142e-01, 1.366620e-01, & ! + 1.254147e-01, 1.158721e-01, 1.076732e-01, 1.005530e-01, 9.431306e-02, & ! + 8.879891e-02, 8.389232e-02, 7.949714e-02, 7.553857e-02, 7.195474e-02, & ! + 6.869413e-02, 6.571444e-02, 6.298286e-02, 6.046779e-02, 5.814474e-02, & ! + 5.599141e-02, 5.399114e-02, 5.212443e-02, 5.037870e-02, 4.874321e-02, & ! + 4.720219e-02, 4.574813e-02, 4.437160e-02, 4.306460e-02, 4.181810e-02, & ! + 4.062603e-02, 3.948252e-02, 3.838256e-02, 3.732049e-02, 3.629192e-02, & ! + 3.529301e-02, 3.432190e-02, 3.337412e-02, 3.244842e-02, 3.154175e-02, & ! + 3.065253e-02, 2.978063e-02, 2.892367e-02, 2.808221e-02, 2.725478e-02, & ! + 2.644174e-02, 2.564175e-02, 2.485508e-02, 2.408303e-02, 2.332365e-02, & ! + 2.257890e-02, 2.184824e-02, 2.113224e-02, & ! + 6.673017e-01, 4.664520e-01, 3.579398e-01, 2.902234e-01, 2.439904e-01, & ! 10 + 2.104149e-01, 1.849277e-01, 1.649234e-01, 1.488087e-01, 1.355515e-01, & ! + 1.244562e-01, 1.150329e-01, 1.069321e-01, 9.989310e-02, 9.372070e-02, & ! + 8.826450e-02, 8.340622e-02, 7.905378e-02, 7.513109e-02, 7.157859e-02, & ! + 6.834588e-02, 6.539114e-02, 6.268150e-02, 6.018621e-02, 5.788098e-02, & ! + 5.574351e-02, 5.375699e-02, 5.190412e-02, 5.017099e-02, 4.854497e-02, & ! + 4.701490e-02, 4.557030e-02, 4.420249e-02, 4.290304e-02, 4.166427e-02, & ! + 4.047820e-02, 3.934232e-02, 3.824778e-02, 3.719236e-02, 3.616931e-02, & ! + 3.517597e-02, 3.420856e-02, 3.326566e-02, 3.234346e-02, 3.144122e-02, & ! + 3.055684e-02, 2.968798e-02, 2.883519e-02, 2.799635e-02, 2.717228e-02, & ! + 2.636182e-02, 2.556424e-02, 2.478114e-02, 2.401086e-02, 2.325657e-02, & ! + 2.251506e-02, 2.178594e-02, 2.107301e-02, & ! + 6.552414e-01, 4.599454e-01, 3.538626e-01, 2.873547e-01, 2.418033e-01, & ! 11 + 2.086660e-01, 1.834885e-01, 1.637142e-01, 1.477767e-01, 1.346583e-01, & ! + 1.236734e-01, 1.143412e-01, 1.063148e-01, 9.933905e-02, 9.322026e-02, & ! + 8.780979e-02, 8.299230e-02, 7.867554e-02, 7.478450e-02, 7.126053e-02, & ! + 6.805276e-02, 6.512143e-02, 6.243211e-02, 5.995541e-02, 5.766712e-02, & ! + 5.554484e-02, 5.357246e-02, 5.173222e-02, 5.001069e-02, 4.839505e-02, & ! + 4.687471e-02, 4.543861e-02, 4.407857e-02, 4.278577e-02, 4.155331e-02, & ! + 4.037322e-02, 3.924302e-02, 3.815376e-02, 3.710172e-02, 3.608296e-02, & ! + 3.509330e-02, 3.412980e-02, 3.319009e-02, 3.227106e-02, 3.137157e-02, & ! + 3.048950e-02, 2.962365e-02, 2.877297e-02, 2.793726e-02, 2.711500e-02, & ! + 2.630666e-02, 2.551206e-02, 2.473052e-02, 2.396287e-02, 2.320861e-02, & ! + 2.246810e-02, 2.174162e-02, 2.102927e-02, & ! + 6.430901e-01, 4.532134e-01, 3.496132e-01, 2.844655e-01, 2.397347e-01, & ! 12 + 2.071236e-01, 1.822976e-01, 1.627640e-01, 1.469961e-01, 1.340006e-01, & ! + 1.231069e-01, 1.138441e-01, 1.058706e-01, 9.893678e-02, 9.285166e-02, & ! + 8.746871e-02, 8.267411e-02, 7.837656e-02, 7.450257e-02, 7.099318e-02, & ! + 6.779929e-02, 6.487987e-02, 6.220168e-02, 5.973530e-02, 5.745636e-02, & ! + 5.534344e-02, 5.337986e-02, 5.154797e-02, 4.983404e-02, 4.822582e-02, & ! + 4.671228e-02, 4.528321e-02, 4.392997e-02, 4.264325e-02, 4.141647e-02, & ! + 4.024259e-02, 3.911767e-02, 3.803309e-02, 3.698782e-02, 3.597140e-02, & ! + 3.498774e-02, 3.402852e-02, 3.309340e-02, 3.217818e-02, 3.128292e-02, & ! + 3.040486e-02, 2.954230e-02, 2.869545e-02, 2.786261e-02, 2.704372e-02, & ! + 2.623813e-02, 2.544668e-02, 2.466788e-02, 2.390313e-02, 2.315136e-02, & ! + 2.241391e-02, 2.168921e-02, 2.097903e-02, & ! + 6.367074e-01, 4.495768e-01, 3.471263e-01, 2.826149e-01, 2.382868e-01, & ! 13 + 2.059640e-01, 1.813562e-01, 1.619881e-01, 1.463436e-01, 1.334402e-01, & ! + 1.226166e-01, 1.134096e-01, 1.054829e-01, 9.858838e-02, 9.253790e-02, & ! + 8.718582e-02, 8.241830e-02, 7.814482e-02, 7.429212e-02, 7.080165e-02, & ! + 6.762385e-02, 6.471838e-02, 6.205388e-02, 5.959726e-02, 5.732871e-02, & ! + 5.522402e-02, 5.326793e-02, 5.144230e-02, 4.973440e-02, 4.813188e-02, & ! + 4.662283e-02, 4.519798e-02, 4.384833e-02, 4.256541e-02, 4.134253e-02, & ! + 4.017136e-02, 3.904911e-02, 3.796779e-02, 3.692364e-02, 3.591182e-02, & ! + 3.492930e-02, 3.397230e-02, 3.303920e-02, 3.212572e-02, 3.123278e-02, & ! + 3.035519e-02, 2.949493e-02, 2.864985e-02, 2.781840e-02, 2.700197e-02, & ! + 2.619682e-02, 2.540674e-02, 2.462966e-02, 2.386613e-02, 2.311602e-02, & ! + 2.237846e-02, 2.165660e-02, 2.094756e-02, & ! + 4.298416e-01, 4.391639e-01, 3.975030e-01, 3.443028e-01, 2.957345e-01, & ! 14 + 2.556461e-01, 2.234755e-01, 1.976636e-01, 1.767428e-01, 1.595611e-01, & ! + 1.452636e-01, 1.332156e-01, 1.229481e-01, 1.141059e-01, 1.064208e-01, & ! + 9.968527e-02, 9.373833e-02, 8.845221e-02, 8.372112e-02, 7.946667e-02, & ! + 7.561807e-02, 7.212029e-02, 6.893166e-02, 6.600944e-02, 6.332277e-02, & ! + 6.084277e-02, 5.854721e-02, 5.641361e-02, 5.442639e-02, 5.256750e-02, & ! + 5.082499e-02, 4.918556e-02, 4.763694e-02, 4.617222e-02, 4.477861e-02, & ! + 4.344861e-02, 4.217999e-02, 4.096111e-02, 3.978638e-02, 3.865361e-02, & ! + 3.755473e-02, 3.649028e-02, 3.545361e-02, 3.444361e-02, 3.345666e-02, & ! + 3.249167e-02, 3.154722e-02, 3.062083e-02, 2.971250e-02, 2.882083e-02, & ! + 2.794611e-02, 2.708778e-02, 2.624500e-02, 2.541750e-02, 2.460528e-02, & ! + 2.381194e-02, 2.303250e-02, 2.226833e-02/), & ! + shape = (/58,nBandsSW_RRTMG/)) + + real(kind_phys),dimension(58,nBandsSW_RRTMG),parameter :: & ! + ssaliq1 = reshape(source= (/ & ! + 8.143821e-01, 7.836739e-01, 7.550722e-01, 7.306269e-01, 7.105612e-01, & ! 1 + 6.946649e-01, 6.825556e-01, 6.737762e-01, 6.678448e-01, 6.642830e-01, & ! + 6.679741e-01, 6.584607e-01, 6.505598e-01, 6.440951e-01, 6.388901e-01, & ! + 6.347689e-01, 6.315549e-01, 6.290718e-01, 6.271432e-01, 6.255928e-01, & ! + 6.242441e-01, 6.229207e-01, 6.214464e-01, 6.196445e-01, 6.173388e-01, & ! + 6.143527e-01, 6.105099e-01, 6.056339e-01, 6.108290e-01, 6.073939e-01, & ! + 6.043073e-01, 6.015473e-01, 5.990913e-01, 5.969173e-01, 5.950028e-01, & ! + 5.933257e-01, 5.918636e-01, 5.905944e-01, 5.894957e-01, 5.885453e-01, & ! + 5.877209e-01, 5.870003e-01, 5.863611e-01, 5.857811e-01, 5.852381e-01, & ! + 5.847098e-01, 5.841738e-01, 5.836081e-01, 5.829901e-01, 5.822979e-01, & ! + 5.815089e-01, 5.806011e-01, 5.795521e-01, 5.783396e-01, 5.769413e-01, & ! + 5.753351e-01, 5.734986e-01, 5.7141e-01, & ! + 8.165821e-01, 8.002015e-01, 7.816921e-01, 7.634131e-01, 7.463721e-01, & ! 2 + 7.312469e-01, 7.185883e-01, 7.088975e-01, 7.026671e-01, 7.004020e-01, & ! + 7.042138e-01, 6.960930e-01, 6.894243e-01, 6.840459e-01, 6.797957e-01, & ! + 6.765119e-01, 6.740325e-01, 6.721955e-01, 6.708391e-01, 6.698013e-01, & ! + 6.689201e-01, 6.680339e-01, 6.669805e-01, 6.655982e-01, 6.637250e-01, & ! + 6.611992e-01, 6.578588e-01, 6.535420e-01, 6.584449e-01, 6.553992e-01, & ! + 6.526547e-01, 6.501917e-01, 6.479905e-01, 6.460313e-01, 6.442945e-01, & ! + 6.427605e-01, 6.414094e-01, 6.402217e-01, 6.391775e-01, 6.382573e-01, & ! + 6.374413e-01, 6.367099e-01, 6.360433e-01, 6.354218e-01, 6.348257e-01, & ! + 6.342355e-01, 6.336313e-01, 6.329935e-01, 6.323023e-01, 6.315383e-01, & ! + 6.306814e-01, 6.297122e-01, 6.286110e-01, 6.273579e-01, 6.259333e-01, & ! + 6.243176e-01, 6.224910e-01, 6.2043e-01, & ! + 9.900163e-01, 9.854307e-01, 9.797730e-01, 9.733113e-01, 9.664245e-01, & ! 3 + 9.594976e-01, 9.529055e-01, 9.470112e-01, 9.421695e-01, 9.387304e-01, & ! + 9.344918e-01, 9.305302e-01, 9.267048e-01, 9.230072e-01, 9.194289e-01, & ! + 9.159616e-01, 9.125968e-01, 9.093260e-01, 9.061409e-01, 9.030330e-01, & ! + 8.999940e-01, 8.970154e-01, 8.940888e-01, 8.912058e-01, 8.883579e-01, & ! + 8.855368e-01, 8.827341e-01, 8.799413e-01, 8.777423e-01, 8.749566e-01, & ! + 8.722298e-01, 8.695605e-01, 8.669469e-01, 8.643875e-01, 8.618806e-01, & ! + 8.594246e-01, 8.570179e-01, 8.546589e-01, 8.523459e-01, 8.500773e-01, & ! + 8.478516e-01, 8.456670e-01, 8.435219e-01, 8.414148e-01, 8.393439e-01, & ! + 8.373078e-01, 8.353047e-01, 8.333330e-01, 8.313911e-01, 8.294774e-01, & ! + 8.275904e-01, 8.257282e-01, 8.238893e-01, 8.220721e-01, 8.202751e-01, & ! + 8.184965e-01, 8.167346e-01, 8.1499e-01, & ! + 9.999916e-01, 9.987396e-01, 9.966900e-01, 9.950738e-01, 9.937531e-01, & ! 4 + 9.925912e-01, 9.914525e-01, 9.902018e-01, 9.887046e-01, 9.868263e-01, & ! + 9.849039e-01, 9.832372e-01, 9.815265e-01, 9.797770e-01, 9.779940e-01, & ! + 9.761827e-01, 9.743481e-01, 9.724955e-01, 9.706303e-01, 9.687575e-01, & ! + 9.668823e-01, 9.650100e-01, 9.631457e-01, 9.612947e-01, 9.594622e-01, & ! + 9.576534e-01, 9.558734e-01, 9.541275e-01, 9.522059e-01, 9.504258e-01, & ! + 9.486459e-01, 9.468676e-01, 9.450921e-01, 9.433208e-01, 9.415548e-01, & ! + 9.397955e-01, 9.380441e-01, 9.363022e-01, 9.345706e-01, 9.328510e-01, & ! + 9.311445e-01, 9.294524e-01, 9.277761e-01, 9.261167e-01, 9.244755e-01, & ! + 9.228540e-01, 9.212534e-01, 9.196748e-01, 9.181197e-01, 9.165894e-01, & ! + 9.150851e-01, 9.136080e-01, 9.121596e-01, 9.107410e-01, 9.093536e-01, & ! + 9.079987e-01, 9.066775e-01, 9.0539e-01, & ! + 9.979493e-01, 9.964113e-01, 9.950014e-01, 9.937045e-01, 9.924964e-01, & ! 5 + 9.913546e-01, 9.902575e-01, 9.891843e-01, 9.881136e-01, 9.870238e-01, & ! + 9.859934e-01, 9.849372e-01, 9.838873e-01, 9.828434e-01, 9.818052e-01, & ! + 9.807725e-01, 9.797450e-01, 9.787225e-01, 9.777047e-01, 9.766914e-01, & ! + 9.756823e-01, 9.746771e-01, 9.736756e-01, 9.726775e-01, 9.716827e-01, & ! + 9.706907e-01, 9.697014e-01, 9.687145e-01, 9.678060e-01, 9.668108e-01, & ! + 9.658218e-01, 9.648391e-01, 9.638629e-01, 9.628936e-01, 9.619313e-01, & ! + 9.609763e-01, 9.600287e-01, 9.590888e-01, 9.581569e-01, 9.572330e-01, & ! + 9.563176e-01, 9.554108e-01, 9.545128e-01, 9.536239e-01, 9.527443e-01, & ! + 9.518741e-01, 9.510137e-01, 9.501633e-01, 9.493230e-01, 9.484931e-01, & ! + 9.476740e-01, 9.468656e-01, 9.460683e-01, 9.452824e-01, 9.445080e-01, & ! + 9.437454e-01, 9.429948e-01, 9.4226e-01, & ! + 9.988742e-01, 9.982668e-01, 9.976935e-01, 9.971497e-01, 9.966314e-01, & ! 6 + 9.961344e-01, 9.956545e-01, 9.951873e-01, 9.947286e-01, 9.942741e-01, & ! + 9.938457e-01, 9.933947e-01, 9.929473e-01, 9.925032e-01, 9.920621e-01, & ! + 9.916237e-01, 9.911875e-01, 9.907534e-01, 9.903209e-01, 9.898898e-01, & ! + 9.894597e-01, 9.890304e-01, 9.886015e-01, 9.881726e-01, 9.877435e-01, & ! + 9.873138e-01, 9.868833e-01, 9.864516e-01, 9.860698e-01, 9.856317e-01, & ! + 9.851957e-01, 9.847618e-01, 9.843302e-01, 9.839008e-01, 9.834739e-01, & ! + 9.830494e-01, 9.826275e-01, 9.822083e-01, 9.817918e-01, 9.813782e-01, & ! + 9.809675e-01, 9.805598e-01, 9.801552e-01, 9.797538e-01, 9.793556e-01, & ! + 9.789608e-01, 9.785695e-01, 9.781817e-01, 9.777975e-01, 9.774171e-01, & ! + 9.770404e-01, 9.766676e-01, 9.762988e-01, 9.759340e-01, 9.755733e-01, & ! + 9.752169e-01, 9.748649e-01, 9.7452e-01, & ! + 9.994441e-01, 9.991608e-01, 9.988949e-01, 9.986439e-01, 9.984054e-01, & ! 7 + 9.981768e-01, 9.979557e-01, 9.977396e-01, 9.975258e-01, 9.973120e-01, & ! + 9.971011e-01, 9.968852e-01, 9.966708e-01, 9.964578e-01, 9.962462e-01, & ! + 9.960357e-01, 9.958264e-01, 9.956181e-01, 9.954108e-01, 9.952043e-01, & ! + 9.949987e-01, 9.947937e-01, 9.945892e-01, 9.943853e-01, 9.941818e-01, & ! + 9.939786e-01, 9.937757e-01, 9.935728e-01, 9.933922e-01, 9.931825e-01, & ! + 9.929739e-01, 9.927661e-01, 9.925592e-01, 9.923534e-01, 9.921485e-01, & ! + 9.919447e-01, 9.917421e-01, 9.915406e-01, 9.913403e-01, 9.911412e-01, & ! + 9.909435e-01, 9.907470e-01, 9.905519e-01, 9.903581e-01, 9.901659e-01, & ! + 9.899751e-01, 9.897858e-01, 9.895981e-01, 9.894120e-01, 9.892276e-01, & ! + 9.890447e-01, 9.888637e-01, 9.886845e-01, 9.885070e-01, 9.883314e-01, & ! + 9.881576e-01, 9.879859e-01, 9.8782e-01, & ! + 9.999138e-01, 9.998730e-01, 9.998338e-01, 9.997965e-01, 9.997609e-01, & ! 8 + 9.997270e-01, 9.996944e-01, 9.996629e-01, 9.996321e-01, 9.996016e-01, & ! + 9.995690e-01, 9.995372e-01, 9.995057e-01, 9.994744e-01, 9.994433e-01, & ! + 9.994124e-01, 9.993817e-01, 9.993510e-01, 9.993206e-01, 9.992903e-01, & ! + 9.992600e-01, 9.992299e-01, 9.991998e-01, 9.991698e-01, 9.991398e-01, & ! + 9.991098e-01, 9.990799e-01, 9.990499e-01, 9.990231e-01, 9.989920e-01, & ! + 9.989611e-01, 9.989302e-01, 9.988996e-01, 9.988690e-01, 9.988386e-01, & ! + 9.988084e-01, 9.987783e-01, 9.987485e-01, 9.987187e-01, 9.986891e-01, & ! + 9.986598e-01, 9.986306e-01, 9.986017e-01, 9.985729e-01, 9.985443e-01, & ! + 9.985160e-01, 9.984879e-01, 9.984600e-01, 9.984324e-01, 9.984050e-01, & ! + 9.983778e-01, 9.983509e-01, 9.983243e-01, 9.982980e-01, 9.982719e-01, & ! + 9.982461e-01, 9.982206e-01, 9.9820e-01, & ! + 9.999985e-01, 9.999979e-01, 9.999972e-01, 9.999966e-01, 9.999961e-01, & ! 9 + 9.999955e-01, 9.999950e-01, 9.999944e-01, 9.999938e-01, 9.999933e-01, & ! + 9.999927e-01, 9.999921e-01, 9.999915e-01, 9.999910e-01, 9.999904e-01, & ! + 9.999899e-01, 9.999893e-01, 9.999888e-01, 9.999882e-01, 9.999877e-01, & ! + 9.999871e-01, 9.999866e-01, 9.999861e-01, 9.999855e-01, 9.999850e-01, & ! + 9.999844e-01, 9.999839e-01, 9.999833e-01, 9.999828e-01, 9.999823e-01, & ! + 9.999817e-01, 9.999812e-01, 9.999807e-01, 9.999801e-01, 9.999796e-01, & ! + 9.999791e-01, 9.999786e-01, 9.999781e-01, 9.999776e-01, 9.999770e-01, & ! + 9.999765e-01, 9.999761e-01, 9.999756e-01, 9.999751e-01, 9.999746e-01, & ! + 9.999741e-01, 9.999736e-01, 9.999732e-01, 9.999727e-01, 9.999722e-01, & ! + 9.999718e-01, 9.999713e-01, 9.999709e-01, 9.999705e-01, 9.999701e-01, & ! + 9.999697e-01, 9.999692e-01, 9.9997e-01, & ! + 9.999999e-01, 9.999998e-01, 9.999997e-01, 9.999997e-01, 9.999997e-01, & ! 10 + 9.999996e-01, 9.999996e-01, 9.999995e-01, 9.999995e-01, 9.999994e-01, & ! + 9.999994e-01, 9.999993e-01, 9.999993e-01, 9.999992e-01, 9.999992e-01, & ! + 9.999991e-01, 9.999991e-01, 9.999991e-01, 9.999990e-01, 9.999989e-01, & ! + 9.999989e-01, 9.999989e-01, 9.999988e-01, 9.999988e-01, 9.999987e-01, & ! + 9.999987e-01, 9.999986e-01, 9.999986e-01, 9.999985e-01, 9.999985e-01, & ! + 9.999984e-01, 9.999984e-01, 9.999984e-01, 9.999983e-01, 9.999983e-01, & ! + 9.999982e-01, 9.999982e-01, 9.999982e-01, 9.999981e-01, 9.999980e-01, & ! + 9.999980e-01, 9.999980e-01, 9.999979e-01, 9.999979e-01, 9.999978e-01, & ! + 9.999978e-01, 9.999977e-01, 9.999977e-01, 9.999977e-01, 9.999976e-01, & ! + 9.999976e-01, 9.999975e-01, 9.999975e-01, 9.999974e-01, 9.999974e-01, & ! + 9.999974e-01, 9.999973e-01, 1.0000e+00, & ! + 9.999997e-01, 9.999995e-01, 9.999993e-01, 9.999992e-01, 9.999990e-01, & ! 11 + 9.999989e-01, 9.999988e-01, 9.999987e-01, 9.999986e-01, 9.999985e-01, & ! + 9.999984e-01, 9.999983e-01, 9.999982e-01, 9.999981e-01, 9.999980e-01, & ! + 9.999978e-01, 9.999977e-01, 9.999976e-01, 9.999975e-01, 9.999974e-01, & ! + 9.999973e-01, 9.999972e-01, 9.999970e-01, 9.999969e-01, 9.999968e-01, & ! + 9.999967e-01, 9.999966e-01, 9.999965e-01, 9.999964e-01, 9.999963e-01, & ! + 9.999962e-01, 9.999961e-01, 9.999959e-01, 9.999958e-01, 9.999957e-01, & ! + 9.999956e-01, 9.999955e-01, 9.999954e-01, 9.999953e-01, 9.999952e-01, & ! + 9.999951e-01, 9.999949e-01, 9.999949e-01, 9.999947e-01, 9.999946e-01, & ! + 9.999945e-01, 9.999944e-01, 9.999943e-01, 9.999942e-01, 9.999941e-01, & ! + 9.999940e-01, 9.999939e-01, 9.999938e-01, 9.999937e-01, 9.999936e-01, & ! + 9.999935e-01, 9.999934e-01, 9.9999e-01, & ! + 9.999984e-01, 9.999976e-01, 9.999969e-01, 9.999962e-01, 9.999956e-01, & ! 12 + 9.999950e-01, 9.999945e-01, 9.999940e-01, 9.999935e-01, 9.999931e-01, & ! + 9.999926e-01, 9.999920e-01, 9.999914e-01, 9.999908e-01, 9.999903e-01, & ! + 9.999897e-01, 9.999891e-01, 9.999886e-01, 9.999880e-01, 9.999874e-01, & ! + 9.999868e-01, 9.999863e-01, 9.999857e-01, 9.999851e-01, 9.999846e-01, & ! + 9.999840e-01, 9.999835e-01, 9.999829e-01, 9.999824e-01, 9.999818e-01, & ! + 9.999812e-01, 9.999806e-01, 9.999800e-01, 9.999795e-01, 9.999789e-01, & ! + 9.999783e-01, 9.999778e-01, 9.999773e-01, 9.999767e-01, 9.999761e-01, & ! + 9.999756e-01, 9.999750e-01, 9.999745e-01, 9.999739e-01, 9.999734e-01, & ! + 9.999729e-01, 9.999723e-01, 9.999718e-01, 9.999713e-01, 9.999708e-01, & ! + 9.999703e-01, 9.999697e-01, 9.999692e-01, 9.999687e-01, 9.999683e-01, & ! + 9.999678e-01, 9.999673e-01, 9.9997e-01, & ! + 9.999981e-01, 9.999973e-01, 9.999965e-01, 9.999958e-01, 9.999951e-01, & ! 13 + 9.999943e-01, 9.999937e-01, 9.999930e-01, 9.999924e-01, 9.999918e-01, & ! + 9.999912e-01, 9.999905e-01, 9.999897e-01, 9.999890e-01, 9.999883e-01, & ! + 9.999876e-01, 9.999869e-01, 9.999862e-01, 9.999855e-01, 9.999847e-01, & ! + 9.999840e-01, 9.999834e-01, 9.999827e-01, 9.999819e-01, 9.999812e-01, & ! + 9.999805e-01, 9.999799e-01, 9.999791e-01, 9.999785e-01, 9.999778e-01, & ! + 9.999771e-01, 9.999764e-01, 9.999757e-01, 9.999750e-01, 9.999743e-01, & ! + 9.999736e-01, 9.999729e-01, 9.999722e-01, 9.999715e-01, 9.999709e-01, & ! + 9.999701e-01, 9.999695e-01, 9.999688e-01, 9.999682e-01, 9.999675e-01, & ! + 9.999669e-01, 9.999662e-01, 9.999655e-01, 9.999649e-01, 9.999642e-01, & ! + 9.999636e-01, 9.999630e-01, 9.999624e-01, 9.999618e-01, 9.999612e-01, & ! + 9.999606e-01, 9.999600e-01, 9.9996e-01, & ! + 8.505737e-01, 8.465102e-01, 8.394829e-01, 8.279508e-01, 8.110806e-01, & ! 14 + 7.900397e-01, 7.669615e-01, 7.444422e-01, 7.253055e-01, 7.124831e-01, & ! + 7.016434e-01, 6.885485e-01, 6.767340e-01, 6.661029e-01, 6.565577e-01, & ! + 6.480013e-01, 6.403373e-01, 6.334697e-01, 6.273034e-01, 6.217440e-01, & ! + 6.166983e-01, 6.120740e-01, 6.077796e-01, 6.037249e-01, 5.998207e-01, & ! + 5.959788e-01, 5.921123e-01, 5.881354e-01, 5.891285e-01, 5.851143e-01, & ! + 5.814653e-01, 5.781606e-01, 5.751792e-01, 5.724998e-01, 5.701016e-01, & ! + 5.679634e-01, 5.660642e-01, 5.643829e-01, 5.628984e-01, 5.615898e-01, & ! + 5.604359e-01, 5.594158e-01, 5.585083e-01, 5.576924e-01, 5.569470e-01, & ! + 5.562512e-01, 5.555838e-01, 5.549239e-01, 5.542503e-01, 5.535420e-01, & ! + 5.527781e-01, 5.519374e-01, 5.509989e-01, 5.499417e-01, 5.487445e-01, & ! + 5.473865e-01, 5.458466e-01, 5.4410e-01 /), & ! + shape = (/58,nBandsSW_RRTMG/)) + + real(kind_phys),dimension(58,nBandsSW_RRTMG),parameter :: & ! + ssaliq2 = reshape(source= (/ & ! + 8.362119e-01, 8.098460e-01, 7.762291e-01, 7.486042e-01, 7.294172e-01, & ! 1 + 7.161000e-01, 7.060656e-01, 6.978387e-01, 6.907193e-01, 6.843551e-01, & ! + 6.785668e-01, 6.732450e-01, 6.683191e-01, 6.637264e-01, 6.594307e-01, & ! + 6.554033e-01, 6.516115e-01, 6.480295e-01, 6.446429e-01, 6.414306e-01, & ! + 6.383783e-01, 6.354750e-01, 6.327068e-01, 6.300665e-01, 6.275376e-01, & ! + 6.251245e-01, 6.228136e-01, 6.205944e-01, 6.184720e-01, 6.164330e-01, & ! + 6.144742e-01, 6.125962e-01, 6.108004e-01, 6.090740e-01, 6.074200e-01, & ! + 6.058381e-01, 6.043209e-01, 6.028681e-01, 6.014836e-01, 6.001626e-01, & ! + 5.988957e-01, 5.976864e-01, 5.965390e-01, 5.954379e-01, 5.943972e-01, & ! + 5.934019e-01, 5.924624e-01, 5.915579e-01, 5.907025e-01, 5.898913e-01, & ! + 5.891213e-01, 5.883815e-01, 5.876851e-01, 5.870158e-01, 5.863868e-01, & ! + 5.857821e-01, 5.852111e-01, 5.846579e-01, & ! + 6.995459e-01, 7.158012e-01, 7.076001e-01, 6.927244e-01, 6.786434e-01, & ! 2 + 6.673545e-01, 6.585859e-01, 6.516314e-01, 6.459010e-01, 6.410225e-01, & ! + 6.367574e-01, 6.329554e-01, 6.295119e-01, 6.263595e-01, 6.234462e-01, & ! + 6.207274e-01, 6.181755e-01, 6.157678e-01, 6.134880e-01, 6.113173e-01, & ! + 6.092495e-01, 6.072689e-01, 6.053717e-01, 6.035507e-01, 6.018001e-01, & ! + 6.001134e-01, 5.984951e-01, 5.969294e-01, 5.954256e-01, 5.939698e-01, & ! + 5.925716e-01, 5.912265e-01, 5.899270e-01, 5.886771e-01, 5.874746e-01, & ! + 5.863185e-01, 5.852077e-01, 5.841460e-01, 5.831249e-01, 5.821474e-01, & ! + 5.812078e-01, 5.803173e-01, 5.794616e-01, 5.786443e-01, 5.778617e-01, & ! + 5.771236e-01, 5.764191e-01, 5.757400e-01, 5.750971e-01, 5.744842e-01, & ! + 5.739012e-01, 5.733482e-01, 5.728175e-01, 5.723214e-01, 5.718383e-01, & ! + 5.713827e-01, 5.709471e-01, 5.705330e-01, & ! + 9.929711e-01, 9.896942e-01, 9.852408e-01, 9.806820e-01, 9.764512e-01, & ! 3 + 9.725375e-01, 9.688677e-01, 9.653832e-01, 9.620552e-01, 9.588522e-01, & ! + 9.557475e-01, 9.527265e-01, 9.497731e-01, 9.468756e-01, 9.440270e-01, & ! + 9.412230e-01, 9.384592e-01, 9.357287e-01, 9.330369e-01, 9.303778e-01, & ! + 9.277502e-01, 9.251546e-01, 9.225907e-01, 9.200553e-01, 9.175521e-01, & ! + 9.150773e-01, 9.126352e-01, 9.102260e-01, 9.078485e-01, 9.055057e-01, & ! + 9.031978e-01, 9.009306e-01, 8.987010e-01, 8.965177e-01, 8.943774e-01, & ! + 8.922869e-01, 8.902430e-01, 8.882551e-01, 8.863182e-01, 8.844373e-01, & ! + 8.826143e-01, 8.808499e-01, 8.791413e-01, 8.774940e-01, 8.759019e-01, & ! + 8.743650e-01, 8.728941e-01, 8.714712e-01, 8.701065e-01, 8.688008e-01, & ! + 8.675409e-01, 8.663295e-01, 8.651714e-01, 8.640637e-01, 8.629943e-01, & ! + 8.619762e-01, 8.609995e-01, 8.600581e-01, & ! + 9.910612e-01, 9.854226e-01, 9.795008e-01, 9.742920e-01, 9.695996e-01, & ! 4 + 9.652274e-01, 9.610648e-01, 9.570521e-01, 9.531397e-01, 9.493086e-01, & ! + 9.455413e-01, 9.418362e-01, 9.381902e-01, 9.346016e-01, 9.310718e-01, & ! + 9.275957e-01, 9.241757e-01, 9.208038e-01, 9.174802e-01, 9.142058e-01, & ! + 9.109753e-01, 9.077895e-01, 9.046433e-01, 9.015409e-01, 8.984784e-01, & ! + 8.954572e-01, 8.924748e-01, 8.895367e-01, 8.866395e-01, 8.837864e-01, & ! + 8.809819e-01, 8.782267e-01, 8.755231e-01, 8.728712e-01, 8.702802e-01, & ! + 8.677443e-01, 8.652733e-01, 8.628678e-01, 8.605300e-01, 8.582593e-01, & ! + 8.560596e-01, 8.539352e-01, 8.518782e-01, 8.498915e-01, 8.479790e-01, & ! + 8.461384e-01, 8.443645e-01, 8.426613e-01, 8.410229e-01, 8.394495e-01, & ! + 8.379428e-01, 8.364967e-01, 8.351117e-01, 8.337820e-01, 8.325091e-01, & ! + 8.312874e-01, 8.301169e-01, 8.289985e-01, & ! + 9.969802e-01, 9.950445e-01, 9.931448e-01, 9.914272e-01, 9.898652e-01, & ! 5 + 9.884250e-01, 9.870637e-01, 9.857482e-01, 9.844558e-01, 9.831755e-01, & ! + 9.819068e-01, 9.806477e-01, 9.794000e-01, 9.781666e-01, 9.769461e-01, & ! + 9.757386e-01, 9.745459e-01, 9.733650e-01, 9.721953e-01, 9.710398e-01, & ! + 9.698936e-01, 9.687583e-01, 9.676334e-01, 9.665192e-01, 9.654132e-01, & ! + 9.643208e-01, 9.632374e-01, 9.621625e-01, 9.611003e-01, 9.600518e-01, & ! + 9.590144e-01, 9.579922e-01, 9.569864e-01, 9.559948e-01, 9.550239e-01, & ! + 9.540698e-01, 9.531382e-01, 9.522280e-01, 9.513409e-01, 9.504772e-01, & ! + 9.496360e-01, 9.488220e-01, 9.480327e-01, 9.472693e-01, 9.465333e-01, & ! + 9.458211e-01, 9.451344e-01, 9.444732e-01, 9.438372e-01, 9.432268e-01, & ! + 9.426391e-01, 9.420757e-01, 9.415308e-01, 9.410102e-01, 9.405115e-01, & ! + 9.400326e-01, 9.395716e-01, 9.391313e-01, & ! + 9.980034e-01, 9.968572e-01, 9.958696e-01, 9.949747e-01, 9.941241e-01, & ! 6 + 9.933043e-01, 9.924971e-01, 9.916978e-01, 9.909023e-01, 9.901046e-01, & ! + 9.893087e-01, 9.885146e-01, 9.877195e-01, 9.869283e-01, 9.861379e-01, & ! + 9.853523e-01, 9.845715e-01, 9.837945e-01, 9.830217e-01, 9.822567e-01, & ! + 9.814935e-01, 9.807356e-01, 9.799815e-01, 9.792332e-01, 9.784845e-01, & ! + 9.777424e-01, 9.770042e-01, 9.762695e-01, 9.755416e-01, 9.748152e-01, & ! + 9.740974e-01, 9.733873e-01, 9.726813e-01, 9.719861e-01, 9.713010e-01, & ! + 9.706262e-01, 9.699647e-01, 9.693144e-01, 9.686794e-01, 9.680596e-01, & ! + 9.674540e-01, 9.668657e-01, 9.662926e-01, 9.657390e-01, 9.652019e-01, & ! + 9.646820e-01, 9.641784e-01, 9.636945e-01, 9.632260e-01, 9.627743e-01, & ! + 9.623418e-01, 9.619227e-01, 9.615194e-01, 9.611341e-01, 9.607629e-01, & ! + 9.604057e-01, 9.600622e-01, 9.597322e-01, & ! + 9.988219e-01, 9.981767e-01, 9.976168e-01, 9.971066e-01, 9.966195e-01, & ! 7 + 9.961566e-01, 9.956995e-01, 9.952481e-01, 9.947982e-01, 9.943495e-01, & ! + 9.938955e-01, 9.934368e-01, 9.929825e-01, 9.925239e-01, 9.920653e-01, & ! + 9.916096e-01, 9.911552e-01, 9.907067e-01, 9.902594e-01, 9.898178e-01, & ! + 9.893791e-01, 9.889453e-01, 9.885122e-01, 9.880837e-01, 9.876567e-01, & ! + 9.872331e-01, 9.868121e-01, 9.863938e-01, 9.859790e-01, 9.855650e-01, & ! + 9.851548e-01, 9.847491e-01, 9.843496e-01, 9.839521e-01, 9.835606e-01, & ! + 9.831771e-01, 9.827975e-01, 9.824292e-01, 9.820653e-01, 9.817124e-01, & ! + 9.813644e-01, 9.810291e-01, 9.807020e-01, 9.803864e-01, 9.800782e-01, & ! + 9.797821e-01, 9.794958e-01, 9.792179e-01, 9.789509e-01, 9.786940e-01, & ! + 9.784460e-01, 9.782090e-01, 9.779789e-01, 9.777553e-01, 9.775425e-01, & ! + 9.773387e-01, 9.771420e-01, 9.769529e-01, & ! + 9.998902e-01, 9.998395e-01, 9.997915e-01, 9.997442e-01, 9.997016e-01, & ! 8 + 9.996600e-01, 9.996200e-01, 9.995806e-01, 9.995411e-01, 9.995005e-01, & ! + 9.994589e-01, 9.994178e-01, 9.993766e-01, 9.993359e-01, 9.992948e-01, & ! + 9.992533e-01, 9.992120e-01, 9.991723e-01, 9.991313e-01, 9.990906e-01, & ! + 9.990510e-01, 9.990113e-01, 9.989716e-01, 9.989323e-01, 9.988923e-01, & ! + 9.988532e-01, 9.988140e-01, 9.987761e-01, 9.987373e-01, 9.986989e-01, & ! + 9.986597e-01, 9.986239e-01, 9.985861e-01, 9.985485e-01, 9.985123e-01, & ! + 9.984762e-01, 9.984415e-01, 9.984065e-01, 9.983722e-01, 9.983398e-01, & ! + 9.983078e-01, 9.982758e-01, 9.982461e-01, 9.982157e-01, 9.981872e-01, & ! + 9.981595e-01, 9.981324e-01, 9.981068e-01, 9.980811e-01, 9.980580e-01, & ! + 9.980344e-01, 9.980111e-01, 9.979908e-01, 9.979690e-01, 9.979492e-01, & ! + 9.979316e-01, 9.979116e-01, 9.978948e-01, & ! + 9.999978e-01, 9.999948e-01, 9.999915e-01, 9.999905e-01, 9.999896e-01, & ! 9 + 9.999887e-01, 9.999888e-01, 9.999888e-01, 9.999870e-01, 9.999854e-01, & ! + 9.999855e-01, 9.999856e-01, 9.999839e-01, 9.999834e-01, 9.999829e-01, & ! + 9.999809e-01, 9.999816e-01, 9.999793e-01, 9.999782e-01, 9.999779e-01, & ! + 9.999772e-01, 9.999764e-01, 9.999756e-01, 9.999744e-01, 9.999744e-01, & ! + 9.999736e-01, 9.999729e-01, 9.999716e-01, 9.999706e-01, 9.999692e-01, & ! + 9.999690e-01, 9.999675e-01, 9.999673e-01, 9.999660e-01, 9.999654e-01, & ! + 9.999647e-01, 9.999647e-01, 9.999625e-01, 9.999620e-01, 9.999614e-01, & ! + 9.999613e-01, 9.999607e-01, 9.999604e-01, 9.999594e-01, 9.999589e-01, & ! + 9.999586e-01, 9.999567e-01, 9.999550e-01, 9.999557e-01, 9.999542e-01, & ! + 9.999546e-01, 9.999539e-01, 9.999536e-01, 9.999526e-01, 9.999523e-01, & ! + 9.999508e-01, 9.999534e-01, 9.999507e-01, & ! + 1.000000e+00, 1.000000e+00, 1.000000e+00, 1.000000e+00, 1.000000e+00, & ! 10 + 1.000000e+00, 1.000000e+00, 1.000000e+00, 1.000000e+00, 1.000000e+00, & ! + 1.000000e+00, 1.000000e+00, 1.000000e+00, 1.000000e+00, 1.000000e+00, & ! + 1.000000e+00, 1.000000e+00, 1.000000e+00, 1.000000e+00, 9.999995e-01, & ! + 9.999995e-01, 9.999990e-01, 9.999991e-01, 9.999991e-01, 9.999990e-01, & ! + 9.999989e-01, 9.999988e-01, 9.999988e-01, 9.999986e-01, 9.999988e-01, & ! + 9.999986e-01, 9.999987e-01, 9.999986e-01, 9.999985e-01, 9.999985e-01, & ! + 9.999985e-01, 9.999985e-01, 9.999983e-01, 9.999983e-01, 9.999981e-01, & ! + 9.999981e-01, 9.999986e-01, 9.999985e-01, 9.999983e-01, 9.999984e-01, & ! + 9.999982e-01, 9.999983e-01, 9.999982e-01, 9.999980e-01, 9.999981e-01, & ! + 9.999978e-01, 9.999979e-01, 9.999985e-01, 9.999985e-01, 9.999983e-01, & ! + 9.999983e-01, 9.999983e-01, 9.999983e-01, & ! + 1.000000e+00, 1.000000e+00, 1.000000e+00, 1.000000e+00, 1.000000e+00, & ! 11 + 1.000000e+00, 1.000000e+00, 1.000000e+00, 1.000000e+00, 1.000000e+00, & ! + 1.000000e+00, 1.000000e+00, 1.000000e+00, 1.000000e+00, 1.000000e+00, & ! + 1.000000e+00, 1.000000e+00, 1.000000e+00, 1.000000e+00, 9.999991e-01, & ! + 9.999990e-01, 9.999992e-01, 9.999995e-01, 9.999986e-01, 9.999994e-01, & ! + 9.999985e-01, 9.999980e-01, 9.999984e-01, 9.999983e-01, 9.999979e-01, & ! + 9.999969e-01, 9.999977e-01, 9.999971e-01, 9.999969e-01, 9.999969e-01, & ! + 9.999965e-01, 9.999970e-01, 9.999985e-01, 9.999973e-01, 9.999961e-01, & ! + 9.999968e-01, 9.999952e-01, 9.999970e-01, 9.999974e-01, 9.999965e-01, & ! + 9.999969e-01, 9.999970e-01, 9.999970e-01, 9.999960e-01, 9.999923e-01, & ! + 9.999958e-01, 9.999937e-01, 9.999960e-01, 9.999953e-01, 9.999946e-01, & ! + 9.999946e-01, 9.999957e-01, 9.999951e-01, & ! + 1.000000e+00, 1.000000e+00, 9.999983e-01, 9.999979e-01, 9.999965e-01, & ! 12 + 9.999949e-01, 9.999948e-01, 9.999918e-01, 9.999917e-01, 9.999923e-01, & ! + 9.999908e-01, 9.999889e-01, 9.999902e-01, 9.999895e-01, 9.999881e-01, & ! + 9.999882e-01, 9.999876e-01, 9.999866e-01, 9.999866e-01, 9.999858e-01, & ! + 9.999860e-01, 9.999852e-01, 9.999836e-01, 9.999831e-01, 9.999818e-01, & ! + 9.999808e-01, 9.999816e-01, 9.999800e-01, 9.999783e-01, 9.999780e-01, & ! + 9.999763e-01, 9.999746e-01, 9.999731e-01, 9.999713e-01, 9.999762e-01, & ! + 9.999740e-01, 9.999670e-01, 9.999703e-01, 9.999687e-01, 9.999666e-01, & ! + 9.999683e-01, 9.999667e-01, 9.999611e-01, 9.999635e-01, 9.999600e-01, & ! + 9.999635e-01, 9.999594e-01, 9.999601e-01, 9.999586e-01, 9.999559e-01, & ! + 9.999569e-01, 9.999558e-01, 9.999523e-01, 9.999535e-01, 9.999529e-01, & ! + 9.999553e-01, 9.999495e-01, 9.999490e-01, & ! + 9.999920e-01, 9.999873e-01, 9.999855e-01, 9.999832e-01, 9.999807e-01, & ! 13 + 9.999778e-01, 9.999754e-01, 9.999721e-01, 9.999692e-01, 9.999651e-01, & ! + 9.999621e-01, 9.999607e-01, 9.999567e-01, 9.999546e-01, 9.999521e-01, & ! + 9.999491e-01, 9.999457e-01, 9.999439e-01, 9.999403e-01, 9.999374e-01, & ! + 9.999353e-01, 9.999315e-01, 9.999282e-01, 9.999244e-01, 9.999234e-01, & ! + 9.999189e-01, 9.999130e-01, 9.999117e-01, 9.999073e-01, 9.999020e-01, & ! + 9.998993e-01, 9.998987e-01, 9.998922e-01, 9.998893e-01, 9.998869e-01, & ! + 9.998805e-01, 9.998778e-01, 9.998751e-01, 9.998708e-01, 9.998676e-01, & ! + 9.998624e-01, 9.998642e-01, 9.998582e-01, 9.998547e-01, 9.998546e-01, & ! + 9.998477e-01, 9.998487e-01, 9.998466e-01, 9.998403e-01, 9.998412e-01, & ! + 9.998406e-01, 9.998342e-01, 9.998326e-01, 9.998333e-01, 9.998328e-01, & ! + 9.998290e-01, 9.998276e-01, 9.998249e-01, & ! + 8.383753e-01, 8.461471e-01, 8.373325e-01, 8.212889e-01, 8.023834e-01, & ! 14 + 7.829501e-01, 7.641777e-01, 7.466000e-01, 7.304023e-01, 7.155998e-01, & ! + 7.021259e-01, 6.898840e-01, 6.787615e-01, 6.686479e-01, 6.594414e-01, & ! + 6.510417e-01, 6.433668e-01, 6.363335e-01, 6.298788e-01, 6.239398e-01, & ! + 6.184633e-01, 6.134055e-01, 6.087228e-01, 6.043786e-01, 6.003439e-01, & ! + 5.965910e-01, 5.930917e-01, 5.898280e-01, 5.867798e-01, 5.839264e-01, & ! + 5.812576e-01, 5.787592e-01, 5.764163e-01, 5.742189e-01, 5.721598e-01, & ! + 5.702286e-01, 5.684182e-01, 5.667176e-01, 5.651237e-01, 5.636253e-01, & ! + 5.622228e-01, 5.609074e-01, 5.596713e-01, 5.585089e-01, 5.574223e-01, & ! + 5.564002e-01, 5.554411e-01, 5.545397e-01, 5.536914e-01, 5.528967e-01, & ! + 5.521495e-01, 5.514457e-01, 5.507818e-01, 5.501623e-01, 5.495750e-01, & ! + 5.490192e-01, 5.484980e-01, 5.480046e-01/), & ! + shape = (/58,nBandsSW_RRTMG/)) + + real(kind_phys),dimension(58,nBandsSW_RRTMG),parameter :: & ! + asyliq1 = reshape(source= (/ & ! + 8.133297e-01, 8.133528e-01, 8.173865e-01, 8.243205e-01, 8.333063e-01, & ! 1 + 8.436317e-01, 8.546611e-01, 8.657934e-01, 8.764345e-01, 8.859837e-01, & ! + 8.627394e-01, 8.824569e-01, 8.976887e-01, 9.089541e-01, 9.167699e-01, & ! + 9.216517e-01, 9.241147e-01, 9.246743e-01, 9.238469e-01, 9.221504e-01, & ! + 9.201045e-01, 9.182299e-01, 9.170491e-01, 9.170862e-01, 9.188653e-01, & ! + 9.229111e-01, 9.297468e-01, 9.398950e-01, 9.203269e-01, 9.260693e-01, & ! + 9.309373e-01, 9.349918e-01, 9.382935e-01, 9.409030e-01, 9.428809e-01, & ! + 9.442881e-01, 9.451851e-01, 9.456331e-01, 9.456926e-01, 9.454247e-01, & ! + 9.448902e-01, 9.441503e-01, 9.432661e-01, 9.422987e-01, 9.413094e-01, & ! + 9.403594e-01, 9.395102e-01, 9.388230e-01, 9.383594e-01, 9.381810e-01, & ! + 9.383489e-01, 9.389251e-01, 9.399707e-01, 9.415475e-01, 9.437167e-01, & ! + 9.465399e-01, 9.500786e-01, 9.5439e-01, & ! + 8.794448e-01, 8.819306e-01, 8.837667e-01, 8.853832e-01, 8.871010e-01, & ! 2 + 8.892675e-01, 8.922584e-01, 8.964666e-01, 9.022940e-01, 9.101456e-01, & ! + 8.839999e-01, 9.035610e-01, 9.184568e-01, 9.292315e-01, 9.364282e-01, & ! + 9.405887e-01, 9.422554e-01, 9.419703e-01, 9.402759e-01, 9.377159e-01, & ! + 9.348345e-01, 9.321769e-01, 9.302888e-01, 9.297166e-01, 9.310075e-01, & ! + 9.347080e-01, 9.413643e-01, 9.515216e-01, 9.306286e-01, 9.361781e-01, & ! + 9.408374e-01, 9.446692e-01, 9.477363e-01, 9.501013e-01, 9.518268e-01, & ! + 9.529756e-01, 9.536105e-01, 9.537938e-01, 9.535886e-01, 9.530574e-01, & ! + 9.522633e-01, 9.512688e-01, 9.501370e-01, 9.489306e-01, 9.477126e-01, & ! + 9.465459e-01, 9.454934e-01, 9.446183e-01, 9.439833e-01, 9.436519e-01, & ! + 9.436866e-01, 9.441508e-01, 9.451073e-01, 9.466195e-01, 9.487501e-01, & ! + 9.515621e-01, 9.551185e-01, 9.5948e-01, & ! + 8.478817e-01, 8.269312e-01, 8.161352e-01, 8.135960e-01, 8.173586e-01, & ! 3 + 8.254167e-01, 8.357072e-01, 8.461167e-01, 8.544952e-01, 8.586776e-01, & ! + 8.335562e-01, 8.524273e-01, 8.669052e-01, 8.775014e-01, 8.847277e-01, & ! + 8.890958e-01, 8.911173e-01, 8.913038e-01, 8.901669e-01, 8.882182e-01, & ! + 8.859692e-01, 8.839315e-01, 8.826164e-01, 8.825356e-01, 8.842004e-01, & ! + 8.881223e-01, 8.948131e-01, 9.047837e-01, 8.855951e-01, 8.911796e-01, & ! + 8.959229e-01, 8.998837e-01, 9.031209e-01, 9.056939e-01, 9.076609e-01, & ! + 9.090812e-01, 9.100134e-01, 9.105167e-01, 9.106496e-01, 9.104712e-01, & ! + 9.100404e-01, 9.094159e-01, 9.086568e-01, 9.078218e-01, 9.069697e-01, & ! + 9.061595e-01, 9.054499e-01, 9.048999e-01, 9.045683e-01, 9.045142e-01, & ! + 9.047962e-01, 9.054730e-01, 9.066037e-01, 9.082472e-01, 9.104623e-01, & ! + 9.133079e-01, 9.168427e-01, 9.2113e-01, & ! + 8.216697e-01, 7.982871e-01, 7.891147e-01, 7.909083e-01, 8.003833e-01, & ! 4 + 8.142516e-01, 8.292290e-01, 8.420356e-01, 8.493945e-01, 8.480316e-01, & ! + 8.212381e-01, 8.394984e-01, 8.534095e-01, 8.634813e-01, 8.702242e-01, & ! + 8.741483e-01, 8.757638e-01, 8.755808e-01, 8.741095e-01, 8.718604e-01, & ! + 8.693433e-01, 8.670686e-01, 8.655464e-01, 8.652872e-01, 8.668006e-01, & ! + 8.705973e-01, 8.771874e-01, 8.870809e-01, 8.678284e-01, 8.732315e-01, & ! + 8.778084e-01, 8.816166e-01, 8.847146e-01, 8.871603e-01, 8.890116e-01, & ! + 8.903266e-01, 8.911632e-01, 8.915796e-01, 8.916337e-01, 8.913834e-01, & ! + 8.908869e-01, 8.902022e-01, 8.893873e-01, 8.885001e-01, 8.875986e-01, & ! + 8.867411e-01, 8.859852e-01, 8.853891e-01, 8.850111e-01, 8.849089e-01, & ! + 8.851405e-01, 8.857639e-01, 8.868372e-01, 8.884185e-01, 8.905656e-01, & ! + 8.933368e-01, 8.967899e-01, 9.0098e-01, & ! + 8.063610e-01, 7.938147e-01, 7.921304e-01, 7.985092e-01, 8.101339e-01, & ! 5 + 8.242175e-01, 8.379913e-01, 8.486920e-01, 8.535547e-01, 8.498083e-01, & ! + 8.224849e-01, 8.405509e-01, 8.542436e-01, 8.640770e-01, 8.705653e-01, & ! + 8.742227e-01, 8.755630e-01, 8.751004e-01, 8.733491e-01, 8.708231e-01, & ! + 8.680365e-01, 8.655035e-01, 8.637381e-01, 8.632544e-01, 8.645665e-01, & ! + 8.681885e-01, 8.746346e-01, 8.844188e-01, 8.648180e-01, 8.700563e-01, & ! + 8.744672e-01, 8.781087e-01, 8.810393e-01, 8.833174e-01, 8.850011e-01, & ! + 8.861485e-01, 8.868183e-01, 8.870687e-01, 8.869579e-01, 8.865441e-01, & ! + 8.858857e-01, 8.850412e-01, 8.840686e-01, 8.830263e-01, 8.819726e-01, & ! + 8.809658e-01, 8.800642e-01, 8.793260e-01, 8.788099e-01, 8.785737e-01, & ! + 8.786758e-01, 8.791746e-01, 8.801283e-01, 8.815955e-01, 8.836340e-01, & ! + 8.863024e-01, 8.896592e-01, 8.9376e-01, & ! + 7.885899e-01, 7.937172e-01, 8.020658e-01, 8.123971e-01, 8.235502e-01, & ! 6 + 8.343776e-01, 8.437336e-01, 8.504711e-01, 8.534421e-01, 8.514978e-01, & ! + 8.238888e-01, 8.417463e-01, 8.552057e-01, 8.647853e-01, 8.710038e-01, & ! + 8.743798e-01, 8.754319e-01, 8.746786e-01, 8.726386e-01, 8.698303e-01, & ! + 8.667724e-01, 8.639836e-01, 8.619823e-01, 8.612870e-01, 8.624165e-01, & ! + 8.658893e-01, 8.722241e-01, 8.819394e-01, 8.620216e-01, 8.671239e-01, & ! + 8.713983e-01, 8.749032e-01, 8.776970e-01, 8.798385e-01, 8.813860e-01, & ! + 8.823980e-01, 8.829332e-01, 8.830500e-01, 8.828068e-01, 8.822623e-01, & ! + 8.814750e-01, 8.805031e-01, 8.794056e-01, 8.782407e-01, 8.770672e-01, & ! + 8.759432e-01, 8.749275e-01, 8.740784e-01, 8.734547e-01, 8.731146e-01, & ! + 8.731170e-01, 8.735199e-01, 8.743823e-01, 8.757625e-01, 8.777191e-01, & ! + 8.803105e-01, 8.835953e-01, 8.8763e-01, & ! + 7.811516e-01, 7.962229e-01, 8.096199e-01, 8.212996e-01, 8.312212e-01, & ! 7 + 8.393430e-01, 8.456236e-01, 8.500214e-01, 8.524950e-01, 8.530031e-01, & ! + 8.251485e-01, 8.429043e-01, 8.562461e-01, 8.656954e-01, 8.717737e-01, & ! + 8.750020e-01, 8.759022e-01, 8.749953e-01, 8.728027e-01, 8.698461e-01, & ! + 8.666466e-01, 8.637257e-01, 8.616047e-01, 8.608051e-01, 8.618483e-01, & ! + 8.652557e-01, 8.715487e-01, 8.812485e-01, 8.611645e-01, 8.662052e-01, & ! + 8.704173e-01, 8.738594e-01, 8.765901e-01, 8.786678e-01, 8.801517e-01, & ! + 8.810999e-01, 8.815713e-01, 8.816246e-01, 8.813185e-01, 8.807114e-01, & ! + 8.798621e-01, 8.788290e-01, 8.776713e-01, 8.764470e-01, 8.752152e-01, & ! + 8.740343e-01, 8.729631e-01, 8.720602e-01, 8.713842e-01, 8.709936e-01, & ! + 8.709475e-01, 8.713041e-01, 8.721221e-01, 8.734602e-01, 8.753774e-01, & ! + 8.779319e-01, 8.811825e-01, 8.8519e-01, & ! + 7.865744e-01, 8.093340e-01, 8.257596e-01, 8.369940e-01, 8.441574e-01, & ! 8 + 8.483602e-01, 8.507096e-01, 8.523139e-01, 8.542834e-01, 8.577321e-01, & ! + 8.288960e-01, 8.465308e-01, 8.597175e-01, 8.689830e-01, 8.748542e-01, & ! + 8.778584e-01, 8.785222e-01, 8.773728e-01, 8.749370e-01, 8.717419e-01, & ! + 8.683145e-01, 8.651816e-01, 8.628704e-01, 8.619077e-01, 8.628205e-01, & ! + 8.661356e-01, 8.723803e-01, 8.820815e-01, 8.616715e-01, 8.666389e-01, & ! + 8.707753e-01, 8.741398e-01, 8.767912e-01, 8.787885e-01, 8.801908e-01, & ! + 8.810570e-01, 8.814460e-01, 8.814167e-01, 8.810283e-01, 8.803395e-01, & ! + 8.794095e-01, 8.782971e-01, 8.770613e-01, 8.757610e-01, 8.744553e-01, & ! + 8.732031e-01, 8.720634e-01, 8.710951e-01, 8.703572e-01, 8.699086e-01, & ! + 8.698084e-01, 8.701155e-01, 8.708887e-01, 8.721872e-01, 8.740698e-01, & ! + 8.765957e-01, 8.798235e-01, 8.8381e-01, & ! + 8.069513e-01, 8.262939e-01, 8.398241e-01, 8.486352e-01, 8.538213e-01, & ! 9 + 8.564743e-01, 8.576854e-01, 8.585455e-01, 8.601452e-01, 8.635755e-01, & ! + 8.337383e-01, 8.512655e-01, 8.643049e-01, 8.733896e-01, 8.790535e-01, & ! + 8.818295e-01, 8.822518e-01, 8.808533e-01, 8.781676e-01, 8.747284e-01, & ! + 8.710690e-01, 8.677229e-01, 8.652236e-01, 8.641047e-01, 8.648993e-01, & ! + 8.681413e-01, 8.743640e-01, 8.841007e-01, 8.633558e-01, 8.682719e-01, & ! + 8.723543e-01, 8.756621e-01, 8.782547e-01, 8.801915e-01, 8.815318e-01, & ! + 8.823347e-01, 8.826598e-01, 8.825663e-01, 8.821135e-01, 8.813608e-01, & ! + 8.803674e-01, 8.791928e-01, 8.778960e-01, 8.765366e-01, 8.751738e-01, & ! + 8.738670e-01, 8.726755e-01, 8.716585e-01, 8.708755e-01, 8.703856e-01, & ! + 8.702483e-01, 8.705229e-01, 8.712687e-01, 8.725448e-01, 8.744109e-01, & ! + 8.769260e-01, 8.801496e-01, 8.8414e-01, & ! + 8.252182e-01, 8.379244e-01, 8.471709e-01, 8.535760e-01, 8.577540e-01, & ! 10 + 8.603183e-01, 8.618820e-01, 8.630578e-01, 8.644587e-01, 8.666970e-01, & ! + 8.362159e-01, 8.536817e-01, 8.666387e-01, 8.756240e-01, 8.811746e-01, & ! + 8.838273e-01, 8.841191e-01, 8.825871e-01, 8.797681e-01, 8.761992e-01, & ! + 8.724174e-01, 8.689593e-01, 8.663623e-01, 8.651632e-01, 8.658988e-01, & ! + 8.691064e-01, 8.753226e-01, 8.850847e-01, 8.641620e-01, 8.690500e-01, & ! + 8.731026e-01, 8.763795e-01, 8.789400e-01, 8.808438e-01, 8.821503e-01, & ! + 8.829191e-01, 8.832095e-01, 8.830813e-01, 8.825938e-01, 8.818064e-01, & ! + 8.807787e-01, 8.795704e-01, 8.782408e-01, 8.768493e-01, 8.754557e-01, & ! + 8.741193e-01, 8.728995e-01, 8.718561e-01, 8.710484e-01, 8.705360e-01, & ! + 8.703782e-01, 8.706347e-01, 8.713650e-01, 8.726285e-01, 8.744849e-01, & ! + 8.769933e-01, 8.802136e-01, 8.8421e-01, & ! + 8.370583e-01, 8.467920e-01, 8.537769e-01, 8.585136e-01, 8.615034e-01, & ! 11 + 8.632474e-01, 8.642468e-01, 8.650026e-01, 8.660161e-01, 8.677882e-01, & ! + 8.369760e-01, 8.543821e-01, 8.672699e-01, 8.761782e-01, 8.816454e-01, & ! + 8.842103e-01, 8.844114e-01, 8.827872e-01, 8.798766e-01, 8.762179e-01, & ! + 8.723500e-01, 8.688112e-01, 8.661403e-01, 8.648758e-01, 8.655563e-01, & ! + 8.687206e-01, 8.749072e-01, 8.846546e-01, 8.636289e-01, 8.684849e-01, & ! + 8.725054e-01, 8.757501e-01, 8.782785e-01, 8.801503e-01, 8.814249e-01, & ! + 8.821620e-01, 8.824211e-01, 8.822620e-01, 8.817440e-01, 8.809268e-01, & ! + 8.798699e-01, 8.786330e-01, 8.772756e-01, 8.758572e-01, 8.744374e-01, & ! + 8.730760e-01, 8.718323e-01, 8.707660e-01, 8.699366e-01, 8.694039e-01, & ! + 8.692271e-01, 8.694661e-01, 8.701803e-01, 8.714293e-01, 8.732727e-01, & ! + 8.757702e-01, 8.789811e-01, 8.8297e-01, & ! + 8.430819e-01, 8.510060e-01, 8.567270e-01, 8.606533e-01, 8.631934e-01, & ! 12 + 8.647554e-01, 8.657471e-01, 8.665760e-01, 8.676496e-01, 8.693754e-01, & ! + 8.384298e-01, 8.557913e-01, 8.686214e-01, 8.774605e-01, 8.828495e-01, & ! + 8.853287e-01, 8.854393e-01, 8.837215e-01, 8.807161e-01, 8.769639e-01, & ! + 8.730053e-01, 8.693812e-01, 8.666321e-01, 8.652988e-01, 8.659219e-01, & ! + 8.690419e-01, 8.751999e-01, 8.849360e-01, 8.638013e-01, 8.686371e-01, & ! + 8.726369e-01, 8.758605e-01, 8.783674e-01, 8.802176e-01, 8.814705e-01, & ! + 8.821859e-01, 8.824234e-01, 8.822429e-01, 8.817038e-01, 8.808658e-01, & ! + 8.797887e-01, 8.785323e-01, 8.771560e-01, 8.757196e-01, 8.742828e-01, & ! + 8.729052e-01, 8.716467e-01, 8.705666e-01, 8.697250e-01, 8.691812e-01, & ! + 8.689950e-01, 8.692264e-01, 8.699346e-01, 8.711795e-01, 8.730209e-01, & ! + 8.755181e-01, 8.787312e-01, 8.8272e-01, & ! + 8.452284e-01, 8.522700e-01, 8.572973e-01, 8.607031e-01, 8.628802e-01, & ! 13 + 8.642215e-01, 8.651198e-01, 8.659679e-01, 8.671588e-01, 8.690853e-01, & ! + 8.383803e-01, 8.557485e-01, 8.685851e-01, 8.774303e-01, 8.828245e-01, & ! + 8.853077e-01, 8.854207e-01, 8.837034e-01, 8.806962e-01, 8.769398e-01, & ! + 8.729740e-01, 8.693393e-01, 8.665761e-01, 8.652247e-01, 8.658253e-01, & ! + 8.689182e-01, 8.750438e-01, 8.847424e-01, 8.636140e-01, 8.684449e-01, & ! + 8.724400e-01, 8.756589e-01, 8.781613e-01, 8.800072e-01, 8.812559e-01, & ! + 8.819671e-01, 8.822007e-01, 8.820165e-01, 8.814737e-01, 8.806322e-01, & ! + 8.795518e-01, 8.782923e-01, 8.769129e-01, 8.754737e-01, 8.740342e-01, & ! + 8.726542e-01, 8.713934e-01, 8.703111e-01, 8.694677e-01, 8.689222e-01, & ! + 8.687344e-01, 8.689646e-01, 8.696715e-01, 8.709156e-01, 8.727563e-01, & ! + 8.752531e-01, 8.784659e-01, 8.8245e-01, & ! + 7.800869e-01, 8.091120e-01, 8.325369e-01, 8.466266e-01, 8.515495e-01, & ! 14 + 8.499371e-01, 8.456203e-01, 8.430521e-01, 8.470286e-01, 8.625431e-01, & ! + 8.402261e-01, 8.610822e-01, 8.776608e-01, 8.904485e-01, 8.999294e-01, & ! + 9.065860e-01, 9.108995e-01, 9.133503e-01, 9.144187e-01, 9.145855e-01, & ! + 9.143320e-01, 9.141402e-01, 9.144933e-01, 9.158754e-01, 9.187716e-01, & ! + 9.236677e-01, 9.310503e-01, 9.414058e-01, 9.239108e-01, 9.300719e-01, & ! + 9.353612e-01, 9.398378e-01, 9.435609e-01, 9.465895e-01, 9.489829e-01, & ! + 9.508000e-01, 9.521002e-01, 9.529424e-01, 9.533860e-01, 9.534902e-01, & ! + 9.533143e-01, 9.529177e-01, 9.523596e-01, 9.516997e-01, 9.509973e-01, & ! + 9.503121e-01, 9.497037e-01, 9.492317e-01, 9.489558e-01, 9.489356e-01, & ! + 9.492311e-01, 9.499019e-01, 9.510077e-01, 9.526084e-01, 9.547636e-01, & ! + 9.575331e-01, 9.609766e-01, 9.6515e-01 /), & ! + shape = (/58,nBandsSW_RRTMG/)) + + real(kind_phys),dimension(58,nBandsSW_RRTMG),parameter :: & ! + asyliq2 = reshape(source= (/ & ! + 8.038165e-01, 8.014154e-01, 7.942381e-01, 7.970521e-01, 8.086621e-01, & ! 1 + 8.233392e-01, 8.374127e-01, 8.495742e-01, 8.596945e-01, 8.680497e-01, & ! + 8.750005e-01, 8.808589e-01, 8.858749e-01, 8.902403e-01, 8.940939e-01, & ! + 8.975379e-01, 9.006450e-01, 9.034741e-01, 9.060659e-01, 9.084561e-01, & ! + 9.106675e-01, 9.127198e-01, 9.146332e-01, 9.164194e-01, 9.180970e-01, & ! + 9.196658e-01, 9.211421e-01, 9.225352e-01, 9.238443e-01, 9.250841e-01, & ! + 9.262541e-01, 9.273620e-01, 9.284081e-01, 9.294002e-01, 9.303395e-01, & ! + 9.312285e-01, 9.320715e-01, 9.328716e-01, 9.336271e-01, 9.343427e-01, & ! + 9.350219e-01, 9.356647e-01, 9.362728e-01, 9.368495e-01, 9.373956e-01, & ! + 9.379113e-01, 9.383987e-01, 9.388608e-01, 9.392986e-01, 9.397132e-01, & ! + 9.401063e-01, 9.404776e-01, 9.408299e-01, 9.411641e-01, 9.414800e-01, & ! + 9.417787e-01, 9.420633e-01, 9.423364e-01, & ! + 8.941000e-01, 9.054049e-01, 9.049510e-01, 9.027216e-01, 9.021636e-01, & ! 2 + 9.037878e-01, 9.069852e-01, 9.109817e-01, 9.152013e-01, 9.193040e-01, & ! + 9.231177e-01, 9.265712e-01, 9.296606e-01, 9.324048e-01, 9.348419e-01, & ! + 9.370131e-01, 9.389529e-01, 9.406954e-01, 9.422727e-01, 9.437088e-01, & ! + 9.450221e-01, 9.462308e-01, 9.473488e-01, 9.483830e-01, 9.493492e-01, & ! + 9.502541e-01, 9.510999e-01, 9.518971e-01, 9.526455e-01, 9.533554e-01, & ! + 9.540249e-01, 9.546571e-01, 9.552551e-01, 9.558258e-01, 9.563603e-01, & ! + 9.568713e-01, 9.573569e-01, 9.578141e-01, 9.582485e-01, 9.586604e-01, & ! + 9.590525e-01, 9.594218e-01, 9.597710e-01, 9.601052e-01, 9.604181e-01, & ! + 9.607159e-01, 9.609979e-01, 9.612655e-01, 9.615184e-01, 9.617564e-01, & ! + 9.619860e-01, 9.622009e-01, 9.624031e-01, 9.625957e-01, 9.627792e-01, & ! + 9.629530e-01, 9.631171e-01, 9.632746e-01, & ! + 8.574638e-01, 8.351383e-01, 8.142977e-01, 8.083068e-01, 8.129284e-01, & ! 3 + 8.215827e-01, 8.307238e-01, 8.389963e-01, 8.460481e-01, 8.519273e-01, & ! + 8.568153e-01, 8.609116e-01, 8.643892e-01, 8.673941e-01, 8.700248e-01, & ! + 8.723707e-01, 8.744902e-01, 8.764240e-01, 8.782057e-01, 8.798593e-01, & ! + 8.814063e-01, 8.828573e-01, 8.842261e-01, 8.855196e-01, 8.867497e-01, & ! + 8.879164e-01, 8.890316e-01, 8.900941e-01, 8.911118e-01, 8.920832e-01, & ! + 8.930156e-01, 8.939091e-01, 8.947663e-01, 8.955888e-01, 8.963786e-01, & ! + 8.971350e-01, 8.978617e-01, 8.985590e-01, 8.992243e-01, 8.998631e-01, & ! + 9.004753e-01, 9.010602e-01, 9.016192e-01, 9.021542e-01, 9.026644e-01, & ! + 9.031535e-01, 9.036194e-01, 9.040656e-01, 9.044894e-01, 9.048933e-01, & ! + 9.052789e-01, 9.056481e-01, 9.060004e-01, 9.063343e-01, 9.066544e-01, & ! + 9.069604e-01, 9.072512e-01, 9.075290e-01, & ! + 8.349569e-01, 8.034579e-01, 7.932136e-01, 8.010156e-01, 8.137083e-01, & ! 4 + 8.255339e-01, 8.351938e-01, 8.428286e-01, 8.488944e-01, 8.538187e-01, & ! + 8.579255e-01, 8.614473e-01, 8.645338e-01, 8.672908e-01, 8.697947e-01, & ! + 8.720843e-01, 8.742015e-01, 8.761718e-01, 8.780160e-01, 8.797479e-01, & ! + 8.813810e-01, 8.829250e-01, 8.843907e-01, 8.857822e-01, 8.871059e-01, & ! + 8.883724e-01, 8.895810e-01, 8.907384e-01, 8.918456e-01, 8.929083e-01, & ! + 8.939284e-01, 8.949060e-01, 8.958463e-01, 8.967486e-01, 8.976129e-01, & ! + 8.984463e-01, 8.992439e-01, 9.000094e-01, 9.007438e-01, 9.014496e-01, & ! + 9.021235e-01, 9.027699e-01, 9.033859e-01, 9.039772e-01, 9.045419e-01, & ! + 9.050819e-01, 9.055975e-01, 9.060907e-01, 9.065607e-01, 9.070093e-01, & ! + 9.074389e-01, 9.078475e-01, 9.082388e-01, 9.086117e-01, 9.089678e-01, & ! + 9.093081e-01, 9.096307e-01, 9.099410e-01, & ! + 8.109692e-01, 7.846657e-01, 7.881928e-01, 8.009509e-01, 8.131208e-01, & ! 5 + 8.230400e-01, 8.309448e-01, 8.372920e-01, 8.424837e-01, 8.468166e-01, & ! + 8.504947e-01, 8.536642e-01, 8.564256e-01, 8.588513e-01, 8.610011e-01, & ! + 8.629122e-01, 8.646262e-01, 8.661720e-01, 8.675752e-01, 8.688582e-01, & ! + 8.700379e-01, 8.711300e-01, 8.721485e-01, 8.731027e-01, 8.740010e-01, & ! + 8.748499e-01, 8.756564e-01, 8.764239e-01, 8.771542e-01, 8.778523e-01, & ! + 8.785211e-01, 8.791601e-01, 8.797725e-01, 8.803589e-01, 8.809173e-01, & ! + 8.814552e-01, 8.819705e-01, 8.824611e-01, 8.829311e-01, 8.833791e-01, & ! + 8.838078e-01, 8.842148e-01, 8.846044e-01, 8.849756e-01, 8.853291e-01, & ! + 8.856645e-01, 8.859841e-01, 8.862904e-01, 8.865801e-01, 8.868551e-01, & ! + 8.871182e-01, 8.873673e-01, 8.876059e-01, 8.878307e-01, 8.880462e-01, & ! + 8.882501e-01, 8.884453e-01, 8.886339e-01, & ! + 7.838510e-01, 7.803151e-01, 7.980477e-01, 8.144160e-01, 8.261784e-01, & ! 6 + 8.344240e-01, 8.404278e-01, 8.450391e-01, 8.487593e-01, 8.518741e-01, & ! + 8.545484e-01, 8.568890e-01, 8.589560e-01, 8.607983e-01, 8.624504e-01, & ! + 8.639408e-01, 8.652945e-01, 8.665301e-01, 8.676634e-01, 8.687121e-01, & ! + 8.696855e-01, 8.705933e-01, 8.714448e-01, 8.722454e-01, 8.730014e-01, & ! + 8.737180e-01, 8.743982e-01, 8.750436e-01, 8.756598e-01, 8.762481e-01, & ! + 8.768089e-01, 8.773427e-01, 8.778532e-01, 8.783434e-01, 8.788089e-01, & ! + 8.792530e-01, 8.796784e-01, 8.800845e-01, 8.804716e-01, 8.808411e-01, & ! + 8.811923e-01, 8.815276e-01, 8.818472e-01, 8.821504e-01, 8.824408e-01, & ! + 8.827155e-01, 8.829777e-01, 8.832269e-01, 8.834631e-01, 8.836892e-01, & ! + 8.839034e-01, 8.841075e-01, 8.843021e-01, 8.844866e-01, 8.846631e-01, & ! + 8.848304e-01, 8.849910e-01, 8.851425e-01, & ! + 7.760783e-01, 7.890215e-01, 8.090192e-01, 8.230252e-01, 8.321369e-01, & ! 7 + 8.384258e-01, 8.431529e-01, 8.469558e-01, 8.501499e-01, 8.528899e-01, & ! + 8.552899e-01, 8.573956e-01, 8.592570e-01, 8.609098e-01, 8.623897e-01, & ! + 8.637169e-01, 8.649184e-01, 8.660097e-01, 8.670096e-01, 8.679338e-01, & ! + 8.687896e-01, 8.695880e-01, 8.703365e-01, 8.710422e-01, 8.717092e-01, & ! + 8.723378e-01, 8.729363e-01, 8.735063e-01, 8.740475e-01, 8.745661e-01, & ! + 8.750560e-01, 8.755275e-01, 8.759731e-01, 8.764000e-01, 8.768071e-01, & ! + 8.771942e-01, 8.775628e-01, 8.779126e-01, 8.782483e-01, 8.785626e-01, & ! + 8.788610e-01, 8.791482e-01, 8.794180e-01, 8.796765e-01, 8.799207e-01, & ! + 8.801522e-01, 8.803707e-01, 8.805777e-01, 8.807749e-01, 8.809605e-01, & ! + 8.811362e-01, 8.813047e-01, 8.814647e-01, 8.816131e-01, 8.817588e-01, & ! + 8.818930e-01, 8.820230e-01, 8.821445e-01, & ! + 7.847907e-01, 8.099917e-01, 8.257428e-01, 8.350423e-01, 8.411971e-01, & ! 8 + 8.457241e-01, 8.493010e-01, 8.522565e-01, 8.547660e-01, 8.569311e-01, & ! + 8.588181e-01, 8.604729e-01, 8.619296e-01, 8.632208e-01, 8.643725e-01, & ! + 8.654050e-01, 8.663363e-01, 8.671835e-01, 8.679590e-01, 8.686707e-01, & ! + 8.693308e-01, 8.699433e-01, 8.705147e-01, 8.710490e-01, 8.715497e-01, & ! + 8.720219e-01, 8.724669e-01, 8.728849e-01, 8.732806e-01, 8.736550e-01, & ! + 8.740099e-01, 8.743435e-01, 8.746601e-01, 8.749610e-01, 8.752449e-01, & ! + 8.755143e-01, 8.757688e-01, 8.760095e-01, 8.762375e-01, 8.764532e-01, & ! + 8.766579e-01, 8.768506e-01, 8.770323e-01, 8.772049e-01, 8.773690e-01, & ! + 8.775226e-01, 8.776679e-01, 8.778062e-01, 8.779360e-01, 8.780587e-01, & ! + 8.781747e-01, 8.782852e-01, 8.783892e-01, 8.784891e-01, 8.785824e-01, & ! + 8.786705e-01, 8.787546e-01, 8.788336e-01, & ! + 8.054324e-01, 8.266282e-01, 8.378075e-01, 8.449848e-01, 8.502166e-01, & ! 9 + 8.542268e-01, 8.573477e-01, 8.598022e-01, 8.617689e-01, 8.633859e-01, & ! + 8.647536e-01, 8.659354e-01, 8.669807e-01, 8.679143e-01, 8.687577e-01, & ! + 8.695222e-01, 8.702207e-01, 8.708591e-01, 8.714446e-01, 8.719836e-01, & ! + 8.724812e-01, 8.729426e-01, 8.733689e-01, 8.737665e-01, 8.741373e-01, & ! + 8.744834e-01, 8.748070e-01, 8.751131e-01, 8.754011e-01, 8.756676e-01, & ! + 8.759219e-01, 8.761599e-01, 8.763857e-01, 8.765984e-01, 8.767999e-01, & ! + 8.769889e-01, 8.771669e-01, 8.773373e-01, 8.774969e-01, 8.776469e-01, & ! + 8.777894e-01, 8.779237e-01, 8.780505e-01, 8.781703e-01, 8.782820e-01, & ! + 8.783886e-01, 8.784894e-01, 8.785844e-01, 8.786736e-01, 8.787584e-01, & ! + 8.788379e-01, 8.789130e-01, 8.789849e-01, 8.790506e-01, 8.791141e-01, & ! + 8.791750e-01, 8.792324e-01, 8.792867e-01, & ! + 8.249534e-01, 8.391988e-01, 8.474107e-01, 8.526860e-01, 8.563983e-01, & ! 10 + 8.592389e-01, 8.615144e-01, 8.633790e-01, 8.649325e-01, 8.662504e-01, & ! + 8.673841e-01, 8.683741e-01, 8.692495e-01, 8.700309e-01, 8.707328e-01, & ! + 8.713650e-01, 8.719432e-01, 8.724676e-01, 8.729498e-01, 8.733922e-01, & ! + 8.737981e-01, 8.741745e-01, 8.745225e-01, 8.748467e-01, 8.751512e-01, & ! + 8.754315e-01, 8.756962e-01, 8.759450e-01, 8.761774e-01, 8.763945e-01, & ! + 8.766021e-01, 8.767970e-01, 8.769803e-01, 8.771511e-01, 8.773151e-01, & ! + 8.774689e-01, 8.776147e-01, 8.777533e-01, 8.778831e-01, 8.780050e-01, & ! + 8.781197e-01, 8.782301e-01, 8.783323e-01, 8.784312e-01, 8.785222e-01, & ! + 8.786096e-01, 8.786916e-01, 8.787688e-01, 8.788411e-01, 8.789122e-01, & ! + 8.789762e-01, 8.790373e-01, 8.790954e-01, 8.791514e-01, 8.792018e-01, & ! + 8.792517e-01, 8.792990e-01, 8.793429e-01, & ! + 8.323091e-01, 8.429776e-01, 8.498123e-01, 8.546929e-01, 8.584295e-01, & ! 11 + 8.613489e-01, 8.636324e-01, 8.654303e-01, 8.668675e-01, 8.680404e-01, & ! + 8.690174e-01, 8.698495e-01, 8.705666e-01, 8.711961e-01, 8.717556e-01, & ! + 8.722546e-01, 8.727063e-01, 8.731170e-01, 8.734933e-01, 8.738382e-01, & ! + 8.741590e-01, 8.744525e-01, 8.747295e-01, 8.749843e-01, 8.752210e-01, & ! + 8.754437e-01, 8.756524e-01, 8.758472e-01, 8.760288e-01, 8.762030e-01, & ! + 8.763603e-01, 8.765122e-01, 8.766539e-01, 8.767894e-01, 8.769130e-01, & ! + 8.770310e-01, 8.771422e-01, 8.772437e-01, 8.773419e-01, 8.774355e-01, & ! + 8.775221e-01, 8.776047e-01, 8.776802e-01, 8.777539e-01, 8.778216e-01, & ! + 8.778859e-01, 8.779473e-01, 8.780031e-01, 8.780562e-01, 8.781097e-01, & ! + 8.781570e-01, 8.782021e-01, 8.782463e-01, 8.782845e-01, 8.783235e-01, & ! + 8.783610e-01, 8.783953e-01, 8.784273e-01, & ! + 8.396448e-01, 8.480172e-01, 8.535934e-01, 8.574145e-01, 8.600835e-01, & ! 12 + 8.620347e-01, 8.635500e-01, 8.648003e-01, 8.658758e-01, 8.668248e-01, & ! + 8.676697e-01, 8.684220e-01, 8.690893e-01, 8.696807e-01, 8.702046e-01, & ! + 8.706676e-01, 8.710798e-01, 8.714478e-01, 8.717778e-01, 8.720747e-01, & ! + 8.723431e-01, 8.725889e-01, 8.728144e-01, 8.730201e-01, 8.732129e-01, & ! + 8.733907e-01, 8.735541e-01, 8.737100e-01, 8.738533e-01, 8.739882e-01, & ! + 8.741164e-01, 8.742362e-01, 8.743485e-01, 8.744530e-01, 8.745512e-01, & ! + 8.746471e-01, 8.747373e-01, 8.748186e-01, 8.748973e-01, 8.749732e-01, & ! + 8.750443e-01, 8.751105e-01, 8.751747e-01, 8.752344e-01, 8.752902e-01, & ! + 8.753412e-01, 8.753917e-01, 8.754393e-01, 8.754843e-01, 8.755282e-01, & ! + 8.755662e-01, 8.756039e-01, 8.756408e-01, 8.756722e-01, 8.757072e-01, & ! + 8.757352e-01, 8.757653e-01, 8.757932e-01, & ! + 8.374590e-01, 8.465669e-01, 8.518701e-01, 8.547627e-01, 8.565745e-01, & ! 13 + 8.579065e-01, 8.589717e-01, 8.598632e-01, 8.606363e-01, 8.613268e-01, & ! + 8.619560e-01, 8.625340e-01, 8.630689e-01, 8.635601e-01, 8.640084e-01, & ! + 8.644180e-01, 8.647885e-01, 8.651220e-01, 8.654218e-01, 8.656908e-01, & ! + 8.659294e-01, 8.661422e-01, 8.663334e-01, 8.665037e-01, 8.666543e-01, & ! + 8.667913e-01, 8.669156e-01, 8.670242e-01, 8.671249e-01, 8.672161e-01, & ! + 8.672993e-01, 8.673733e-01, 8.674457e-01, 8.675103e-01, 8.675713e-01, & ! + 8.676267e-01, 8.676798e-01, 8.677286e-01, 8.677745e-01, 8.678178e-01, & ! + 8.678601e-01, 8.678986e-01, 8.679351e-01, 8.679693e-01, 8.680013e-01, & ! + 8.680334e-01, 8.680624e-01, 8.680915e-01, 8.681178e-01, 8.681428e-01, & ! + 8.681654e-01, 8.681899e-01, 8.682103e-01, 8.682317e-01, 8.682498e-01, & ! + 8.682677e-01, 8.682861e-01, 8.683041e-01, & ! + 7.877069e-01, 8.244281e-01, 8.367971e-01, 8.409074e-01, 8.429859e-01, & ! 14 + 8.454386e-01, 8.489350e-01, 8.534141e-01, 8.585814e-01, 8.641267e-01, & ! + 8.697999e-01, 8.754223e-01, 8.808785e-01, 8.860944e-01, 8.910354e-01, & ! + 8.956837e-01, 9.000392e-01, 9.041091e-01, 9.079071e-01, 9.114479e-01, & ! + 9.147462e-01, 9.178234e-01, 9.206903e-01, 9.233663e-01, 9.258668e-01, & ! + 9.282006e-01, 9.303847e-01, 9.324288e-01, 9.343418e-01, 9.361356e-01, & ! + 9.378176e-01, 9.393939e-01, 9.408736e-01, 9.422622e-01, 9.435670e-01, & ! + 9.447900e-01, 9.459395e-01, 9.470199e-01, 9.480335e-01, 9.489852e-01, & ! + 9.498782e-01, 9.507168e-01, 9.515044e-01, 9.522470e-01, 9.529409e-01, & ! + 9.535946e-01, 9.542071e-01, 9.547838e-01, 9.553256e-01, 9.558351e-01, & ! + 9.563139e-01, 9.567660e-01, 9.571915e-01, 9.575901e-01, 9.579685e-01, & ! + 9.583239e-01, 9.586602e-01, 9.589766e-01/), & ! + shape = (/58,nBandsSW_RRTMG/)) + + real(kind_phys),dimension(43,nBandsSW_RRTMG),parameter :: & ! + extice2 = reshape(source= (/ & ! + 4.101824e-01, 2.435514e-01, 1.713697e-01, 1.314865e-01, 1.063406e-01, & ! 1 + 8.910701e-02, 7.659480e-02, 6.711784e-02, 5.970353e-02, 5.375249e-02, & ! + 4.887577e-02, 4.481025e-02, 4.137171e-02, 3.842744e-02, 3.587948e-02, & ! + 3.365396e-02, 3.169419e-02, 2.995593e-02, 2.840419e-02, 2.701091e-02, & ! + 2.575336e-02, 2.461293e-02, 2.357423e-02, 2.262443e-02, 2.175276e-02, & ! + 2.095012e-02, 2.020875e-02, 1.952199e-02, 1.888412e-02, 1.829018e-02, & ! + 1.773586e-02, 1.721738e-02, 1.673144e-02, 1.627510e-02, 1.584579e-02, & ! + 1.544122e-02, 1.505934e-02, 1.469833e-02, 1.435654e-02, 1.403251e-02, & ! + 1.372492e-02, 1.343255e-02, 1.315433e-02, & ! + 3.836650e-01, 2.304055e-01, 1.637265e-01, 1.266681e-01, 1.031602e-01, & ! 2 + 8.695191e-02, 7.511544e-02, 6.610009e-02, 5.900909e-02, 5.328833e-02, & ! + 4.857728e-02, 4.463133e-02, 4.127880e-02, 3.839567e-02, 3.589013e-02, & ! + 3.369280e-02, 3.175027e-02, 3.002079e-02, 2.847121e-02, 2.707493e-02, & ! + 2.581031e-02, 2.465962e-02, 2.360815e-02, 2.264363e-02, 2.175571e-02, & ! + 2.093563e-02, 2.017592e-02, 1.947015e-02, 1.881278e-02, 1.819901e-02, & ! + 1.762463e-02, 1.708598e-02, 1.657982e-02, 1.610330e-02, 1.565390e-02, & ! + 1.522937e-02, 1.482768e-02, 1.444706e-02, 1.408588e-02, 1.374270e-02, & ! + 1.341619e-02, 1.310517e-02, 1.280857e-02, & ! + 4.152673e-01, 2.436816e-01, 1.702243e-01, 1.299704e-01, 1.047528e-01, & ! 3 + 8.756039e-02, 7.513327e-02, 6.575690e-02, 5.844616e-02, 5.259609e-02, & ! + 4.781531e-02, 4.383980e-02, 4.048517e-02, 3.761891e-02, 3.514342e-02, & ! + 3.298525e-02, 3.108814e-02, 2.940825e-02, 2.791096e-02, 2.656858e-02, & ! + 2.535869e-02, 2.426297e-02, 2.326627e-02, 2.235602e-02, 2.152164e-02, & ! + 2.075420e-02, 2.004613e-02, 1.939091e-02, 1.878296e-02, 1.821744e-02, & ! + 1.769015e-02, 1.719741e-02, 1.673600e-02, 1.630308e-02, 1.589615e-02, & ! + 1.551298e-02, 1.515159e-02, 1.481021e-02, 1.448726e-02, 1.418131e-02, & ! + 1.389109e-02, 1.361544e-02, 1.335330e-02, & ! + 3.873250e-01, 2.331609e-01, 1.655002e-01, 1.277753e-01, 1.038247e-01, & ! 4 + 8.731780e-02, 7.527638e-02, 6.611873e-02, 5.892850e-02, 5.313885e-02, & ! + 4.838068e-02, 4.440356e-02, 4.103167e-02, 3.813804e-02, 3.562870e-02, & ! + 3.343269e-02, 3.149539e-02, 2.977414e-02, 2.823510e-02, 2.685112e-02, & ! + 2.560015e-02, 2.446411e-02, 2.342805e-02, 2.247948e-02, 2.160789e-02, & ! + 2.080438e-02, 2.006139e-02, 1.937238e-02, 1.873177e-02, 1.813469e-02, & ! + 1.757689e-02, 1.705468e-02, 1.656479e-02, 1.610435e-02, 1.567081e-02, & ! + 1.526192e-02, 1.487565e-02, 1.451020e-02, 1.416396e-02, 1.383546e-02, & ! + 1.352339e-02, 1.322657e-02, 1.294392e-02, & ! + 3.784280e-01, 2.291396e-01, 1.632551e-01, 1.263775e-01, 1.028944e-01, & ! 5 + 8.666975e-02, 7.480952e-02, 6.577335e-02, 5.866714e-02, 5.293694e-02, & ! + 4.822153e-02, 4.427547e-02, 4.092626e-02, 3.804918e-02, 3.555184e-02, & ! + 3.336440e-02, 3.143307e-02, 2.971577e-02, 2.817912e-02, 2.679632e-02, & ! + 2.554558e-02, 2.440903e-02, 2.337187e-02, 2.242173e-02, 2.154821e-02, & ! + 2.074249e-02, 1.999706e-02, 1.930546e-02, 1.866212e-02, 1.806221e-02, & ! + 1.750152e-02, 1.697637e-02, 1.648352e-02, 1.602010e-02, 1.558358e-02, & ! + 1.517172e-02, 1.478250e-02, 1.441413e-02, 1.406498e-02, 1.373362e-02, & ! + 1.341872e-02, 1.311911e-02, 1.283371e-02, & ! + 3.719909e-01, 2.259490e-01, 1.613144e-01, 1.250648e-01, 1.019462e-01, & ! 6 + 8.595358e-02, 7.425064e-02, 6.532618e-02, 5.830218e-02, 5.263421e-02, & ! + 4.796697e-02, 4.405891e-02, 4.074013e-02, 3.788776e-02, 3.541071e-02, & ! + 3.324008e-02, 3.132280e-02, 2.961733e-02, 2.809071e-02, 2.671645e-02, & ! + 2.547302e-02, 2.434276e-02, 2.331102e-02, 2.236558e-02, 2.149614e-02, & ! + 2.069397e-02, 1.995163e-02, 1.926272e-02, 1.862174e-02, 1.802389e-02, & ! + 1.746500e-02, 1.694142e-02, 1.644994e-02, 1.598772e-02, 1.555225e-02, & ! + 1.514129e-02, 1.475286e-02, 1.438515e-02, 1.403659e-02, 1.370572e-02, & ! + 1.339124e-02, 1.309197e-02, 1.280685e-02, & ! + 3.713158e-01, 2.253816e-01, 1.608461e-01, 1.246718e-01, 1.016109e-01, & ! 7 + 8.566332e-02, 7.399666e-02, 6.510199e-02, 5.810290e-02, 5.245608e-02, & ! + 4.780702e-02, 4.391478e-02, 4.060989e-02, 3.776982e-02, 3.530374e-02, & ! + 3.314296e-02, 3.123458e-02, 2.953719e-02, 2.801794e-02, 2.665043e-02, & ! + 2.541321e-02, 2.428868e-02, 2.326224e-02, 2.232173e-02, 2.145688e-02, & ! + 2.065899e-02, 1.992067e-02, 1.923552e-02, 1.859808e-02, 1.800356e-02, & ! + 1.744782e-02, 1.692721e-02, 1.643855e-02, 1.597900e-02, 1.554606e-02, & ! + 1.513751e-02, 1.475137e-02, 1.438586e-02, 1.403938e-02, 1.371050e-02, & ! + 1.339793e-02, 1.310050e-02, 1.281713e-02, & ! + 3.605883e-01, 2.204388e-01, 1.580431e-01, 1.229033e-01, 1.004203e-01, & ! 8 + 8.482616e-02, 7.338941e-02, 6.465105e-02, 5.776176e-02, 5.219398e-02, & ! + 4.760288e-02, 4.375369e-02, 4.048111e-02, 3.766539e-02, 3.521771e-02, & ! + 3.307079e-02, 3.117277e-02, 2.948303e-02, 2.796929e-02, 2.660560e-02, & ! + 2.537086e-02, 2.424772e-02, 2.322182e-02, 2.228114e-02, 2.141556e-02, & ! + 2.061649e-02, 1.987661e-02, 1.918962e-02, 1.855009e-02, 1.795330e-02, & ! + 1.739514e-02, 1.687199e-02, 1.638069e-02, 1.591845e-02, 1.548276e-02, & ! + 1.507143e-02, 1.468249e-02, 1.431416e-02, 1.396486e-02, 1.363318e-02, & ! + 1.331781e-02, 1.301759e-02, 1.273147e-02, & ! + 3.527890e-01, 2.168469e-01, 1.560090e-01, 1.216216e-01, 9.955787e-02, & ! 9 + 8.421942e-02, 7.294827e-02, 6.432192e-02, 5.751081e-02, 5.199888e-02, & ! + 4.744835e-02, 4.362899e-02, 4.037847e-02, 3.757910e-02, 3.514351e-02, & ! + 3.300546e-02, 3.111382e-02, 2.942853e-02, 2.791775e-02, 2.655584e-02, & ! + 2.532195e-02, 2.419892e-02, 2.317255e-02, 2.223092e-02, 2.136402e-02, & ! + 2.056334e-02, 1.982160e-02, 1.913258e-02, 1.849087e-02, 1.789178e-02, & ! + 1.733124e-02, 1.680565e-02, 1.631187e-02, 1.584711e-02, 1.540889e-02, & ! + 1.499502e-02, 1.460354e-02, 1.423269e-02, 1.388088e-02, 1.354670e-02, & ! + 1.322887e-02, 1.292620e-02, 1.263767e-02, & ! + 3.477874e-01, 2.143515e-01, 1.544887e-01, 1.205942e-01, 9.881779e-02, & ! 10 + 8.366261e-02, 7.251586e-02, 6.397790e-02, 5.723183e-02, 5.176908e-02, & ! + 4.725658e-02, 4.346715e-02, 4.024055e-02, 3.746055e-02, 3.504080e-02, & ! + 3.291583e-02, 3.103507e-02, 2.935891e-02, 2.785582e-02, 2.650042e-02, & ! + 2.527206e-02, 2.415376e-02, 2.313142e-02, 2.219326e-02, 2.132934e-02, & ! + 2.053122e-02, 1.979169e-02, 1.910456e-02, 1.846448e-02, 1.786680e-02, & ! + 1.730745e-02, 1.678289e-02, 1.628998e-02, 1.582595e-02, 1.538835e-02, & ! + 1.497499e-02, 1.458393e-02, 1.421341e-02, 1.386187e-02, 1.352788e-02, & ! + 1.321019e-02, 1.290762e-02, 1.261913e-02, & ! + 3.453721e-01, 2.130744e-01, 1.536698e-01, 1.200140e-01, 9.838078e-02, & ! 11 + 8.331940e-02, 7.223803e-02, 6.374775e-02, 5.703770e-02, 5.160290e-02, & ! + 4.711259e-02, 4.334110e-02, 4.012923e-02, 3.736150e-02, 3.495208e-02, & ! + 3.283589e-02, 3.096267e-02, 2.929302e-02, 2.779560e-02, 2.644517e-02, & ! + 2.522119e-02, 2.410677e-02, 2.308788e-02, 2.215281e-02, 2.129165e-02, & ! + 2.049602e-02, 1.975874e-02, 1.907365e-02, 1.843542e-02, 1.783943e-02, & ! + 1.728162e-02, 1.675847e-02, 1.626685e-02, 1.580401e-02, 1.536750e-02, & ! + 1.495515e-02, 1.456502e-02, 1.419537e-02, 1.384463e-02, 1.351139e-02, & ! + 1.319438e-02, 1.289246e-02, 1.260456e-02, & ! + 3.417883e-01, 2.113379e-01, 1.526395e-01, 1.193347e-01, 9.790253e-02, & ! 12 + 8.296715e-02, 7.196979e-02, 6.353806e-02, 5.687024e-02, 5.146670e-02, & ! + 4.700001e-02, 4.324667e-02, 4.004894e-02, 3.729233e-02, 3.489172e-02, & ! + 3.278257e-02, 3.091499e-02, 2.924987e-02, 2.775609e-02, 2.640859e-02, & ! + 2.518695e-02, 2.407439e-02, 2.305697e-02, 2.212303e-02, 2.126273e-02, & ! + 2.046774e-02, 1.973090e-02, 1.904610e-02, 1.840801e-02, 1.781204e-02, & ! + 1.725417e-02, 1.673086e-02, 1.623902e-02, 1.577590e-02, 1.533906e-02, & ! + 1.492634e-02, 1.453580e-02, 1.416571e-02, 1.381450e-02, 1.348078e-02, & ! + 1.316327e-02, 1.286082e-02, 1.257240e-02, & ! + 3.416111e-01, 2.114124e-01, 1.527734e-01, 1.194809e-01, 9.804612e-02, & ! 13 + 8.310287e-02, 7.209595e-02, 6.365442e-02, 5.697710e-02, 5.156460e-02, & ! + 4.708957e-02, 4.332850e-02, 4.012361e-02, 3.736037e-02, 3.495364e-02, & ! + 3.283879e-02, 3.096593e-02, 2.929589e-02, 2.779751e-02, 2.644571e-02, & ! + 2.522004e-02, 2.410369e-02, 2.308271e-02, 2.214542e-02, 2.128195e-02, & ! + 2.048396e-02, 1.974429e-02, 1.905679e-02, 1.841614e-02, 1.781774e-02, & ! + 1.725754e-02, 1.673203e-02, 1.623807e-02, 1.577293e-02, 1.533416e-02, & ! + 1.491958e-02, 1.452727e-02, 1.415547e-02, 1.380262e-02, 1.346732e-02, & ! + 1.314830e-02, 1.284439e-02, 1.255456e-02, & ! + 4.196611e-01, 2.493642e-01, 1.761261e-01, 1.357197e-01, 1.102161e-01, & ! 14 + 9.269376e-02, 7.992985e-02, 7.022538e-02, 6.260168e-02, 5.645603e-02, & ! + 5.139732e-02, 4.716088e-02, 4.356133e-02, 4.046498e-02, 3.777303e-02, & ! + 3.541094e-02, 3.332137e-02, 3.145954e-02, 2.978998e-02, 2.828419e-02, & ! + 2.691905e-02, 2.567559e-02, 2.453811e-02, 2.349350e-02, 2.253072e-02, & ! + 2.164042e-02, 2.081464e-02, 2.004652e-02, 1.933015e-02, 1.866041e-02, & ! + 1.803283e-02, 1.744348e-02, 1.688894e-02, 1.636616e-02, 1.587244e-02, & ! + 1.540539e-02, 1.496287e-02, 1.454295e-02, 1.414392e-02, 1.376423e-02, & ! + 1.340247e-02, 1.305739e-02, 1.272784e-02/), & ! + shape = (/43,nBandsSW_RRTMG/)) + + real(kind_phys),dimension(43,nBandsSW_RRTMG),parameter :: & ! + ssaice2 = reshape(source= (/ & ! + 6.630615e-01, 6.451169e-01, 6.333696e-01, 6.246927e-01, 6.178420e-01, & ! 1 + 6.121976e-01, 6.074069e-01, 6.032505e-01, 5.995830e-01, 5.963030e-01, & ! + 5.933372e-01, 5.906311e-01, 5.881427e-01, 5.858395e-01, 5.836955e-01, & ! + 5.816896e-01, 5.798046e-01, 5.780264e-01, 5.763429e-01, 5.747441e-01, & ! + 5.732213e-01, 5.717672e-01, 5.703754e-01, 5.690403e-01, 5.677571e-01, & ! + 5.665215e-01, 5.653297e-01, 5.641782e-01, 5.630643e-01, 5.619850e-01, & ! + 5.609381e-01, 5.599214e-01, 5.589328e-01, 5.579707e-01, 5.570333e-01, & ! + 5.561193e-01, 5.552272e-01, 5.543558e-01, 5.535041e-01, 5.526708e-01, & ! + 5.518551e-01, 5.510561e-01, 5.502729e-01, & ! + 7.689749e-01, 7.398171e-01, 7.205819e-01, 7.065690e-01, 6.956928e-01, & ! 2 + 6.868989e-01, 6.795813e-01, 6.733606e-01, 6.679838e-01, 6.632742e-01, & ! + 6.591036e-01, 6.553766e-01, 6.520197e-01, 6.489757e-01, 6.461991e-01, & ! + 6.436531e-01, 6.413075e-01, 6.391375e-01, 6.371221e-01, 6.352438e-01, & ! + 6.334876e-01, 6.318406e-01, 6.302918e-01, 6.288315e-01, 6.274512e-01, & ! + 6.261436e-01, 6.249022e-01, 6.237211e-01, 6.225953e-01, 6.215201e-01, & ! + 6.204914e-01, 6.195055e-01, 6.185592e-01, 6.176492e-01, 6.167730e-01, & ! + 6.159280e-01, 6.151120e-01, 6.143228e-01, 6.135587e-01, 6.128177e-01, & ! + 6.120984e-01, 6.113993e-01, 6.107189e-01, & ! + 9.956167e-01, 9.814770e-01, 9.716104e-01, 9.639746e-01, 9.577179e-01, & ! 3 + 9.524010e-01, 9.477672e-01, 9.436527e-01, 9.399467e-01, 9.365708e-01, & ! + 9.334672e-01, 9.305921e-01, 9.279118e-01, 9.253993e-01, 9.230330e-01, & ! + 9.207954e-01, 9.186719e-01, 9.166501e-01, 9.147199e-01, 9.128722e-01, & ! + 9.110997e-01, 9.093956e-01, 9.077544e-01, 9.061708e-01, 9.046406e-01, & ! + 9.031598e-01, 9.017248e-01, 9.003326e-01, 8.989804e-01, 8.976655e-01, & ! + 8.963857e-01, 8.951389e-01, 8.939233e-01, 8.927370e-01, 8.915785e-01, & ! + 8.904464e-01, 8.893392e-01, 8.882559e-01, 8.871951e-01, 8.861559e-01, & ! + 8.851373e-01, 8.841383e-01, 8.831581e-01, & ! + 9.723177e-01, 9.452119e-01, 9.267592e-01, 9.127393e-01, 9.014238e-01, & ! 4 + 8.919334e-01, 8.837584e-01, 8.765773e-01, 8.701736e-01, 8.643950e-01, & ! + 8.591299e-01, 8.542942e-01, 8.498230e-01, 8.456651e-01, 8.417794e-01, & ! + 8.381324e-01, 8.346964e-01, 8.314484e-01, 8.283687e-01, 8.254408e-01, & ! + 8.226505e-01, 8.199854e-01, 8.174348e-01, 8.149891e-01, 8.126403e-01, & ! + 8.103808e-01, 8.082041e-01, 8.061044e-01, 8.040765e-01, 8.021156e-01, & ! + 8.002174e-01, 7.983781e-01, 7.965941e-01, 7.948622e-01, 7.931795e-01, & ! + 7.915432e-01, 7.899508e-01, 7.884002e-01, 7.868891e-01, 7.854156e-01, & ! + 7.839779e-01, 7.825742e-01, 7.812031e-01, & ! + 9.933294e-01, 9.860917e-01, 9.811564e-01, 9.774008e-01, 9.743652e-01, & ! 5 + 9.718155e-01, 9.696159e-01, 9.676810e-01, 9.659531e-01, 9.643915e-01, & ! + 9.629667e-01, 9.616561e-01, 9.604426e-01, 9.593125e-01, 9.582548e-01, & ! + 9.572607e-01, 9.563227e-01, 9.554347e-01, 9.545915e-01, 9.537888e-01, & ! + 9.530226e-01, 9.522898e-01, 9.515874e-01, 9.509130e-01, 9.502643e-01, & ! + 9.496394e-01, 9.490366e-01, 9.484542e-01, 9.478910e-01, 9.473456e-01, & ! + 9.468169e-01, 9.463039e-01, 9.458056e-01, 9.453212e-01, 9.448499e-01, & ! + 9.443910e-01, 9.439438e-01, 9.435077e-01, 9.430821e-01, 9.426666e-01, & ! + 9.422607e-01, 9.418638e-01, 9.414756e-01, & ! + 9.900787e-01, 9.828880e-01, 9.779258e-01, 9.741173e-01, 9.710184e-01, & ! 6 + 9.684012e-01, 9.661332e-01, 9.641301e-01, 9.623352e-01, 9.607083e-01, & ! + 9.592198e-01, 9.578474e-01, 9.565739e-01, 9.553856e-01, 9.542715e-01, & ! + 9.532226e-01, 9.522314e-01, 9.512919e-01, 9.503986e-01, 9.495472e-01, & ! + 9.487337e-01, 9.479549e-01, 9.472077e-01, 9.464897e-01, 9.457985e-01, & ! + 9.451322e-01, 9.444890e-01, 9.438673e-01, 9.432656e-01, 9.426826e-01, & ! + 9.421173e-01, 9.415684e-01, 9.410351e-01, 9.405164e-01, 9.400115e-01, & ! + 9.395198e-01, 9.390404e-01, 9.385728e-01, 9.381164e-01, 9.376707e-01, & ! + 9.372350e-01, 9.368091e-01, 9.363923e-01, & ! + 9.986793e-01, 9.985239e-01, 9.983911e-01, 9.982715e-01, 9.981606e-01, & ! 7 + 9.980562e-01, 9.979567e-01, 9.978613e-01, 9.977691e-01, 9.976798e-01, & ! + 9.975929e-01, 9.975081e-01, 9.974251e-01, 9.973438e-01, 9.972640e-01, & ! + 9.971855e-01, 9.971083e-01, 9.970322e-01, 9.969571e-01, 9.968830e-01, & ! + 9.968099e-01, 9.967375e-01, 9.966660e-01, 9.965951e-01, 9.965250e-01, & ! + 9.964555e-01, 9.963867e-01, 9.963185e-01, 9.962508e-01, 9.961836e-01, & ! + 9.961170e-01, 9.960508e-01, 9.959851e-01, 9.959198e-01, 9.958550e-01, & ! + 9.957906e-01, 9.957266e-01, 9.956629e-01, 9.955997e-01, 9.955367e-01, & ! + 9.954742e-01, 9.954119e-01, 9.953500e-01, & ! + 9.997944e-01, 9.997791e-01, 9.997664e-01, 9.997547e-01, 9.997436e-01, & ! 8 + 9.997327e-01, 9.997219e-01, 9.997110e-01, 9.996999e-01, 9.996886e-01, & ! + 9.996771e-01, 9.996653e-01, 9.996533e-01, 9.996409e-01, 9.996282e-01, & ! + 9.996152e-01, 9.996019e-01, 9.995883e-01, 9.995743e-01, 9.995599e-01, & ! + 9.995453e-01, 9.995302e-01, 9.995149e-01, 9.994992e-01, 9.994831e-01, & ! + 9.994667e-01, 9.994500e-01, 9.994329e-01, 9.994154e-01, 9.993976e-01, & ! + 9.993795e-01, 9.993610e-01, 9.993422e-01, 9.993230e-01, 9.993035e-01, & ! + 9.992837e-01, 9.992635e-01, 9.992429e-01, 9.992221e-01, 9.992008e-01, & ! + 9.991793e-01, 9.991574e-01, 9.991352e-01, & ! + 9.999949e-01, 9.999947e-01, 9.999943e-01, 9.999939e-01, 9.999934e-01, & ! 9 + 9.999927e-01, 9.999920e-01, 9.999913e-01, 9.999904e-01, 9.999895e-01, & ! + 9.999885e-01, 9.999874e-01, 9.999863e-01, 9.999851e-01, 9.999838e-01, & ! + 9.999824e-01, 9.999810e-01, 9.999795e-01, 9.999780e-01, 9.999764e-01, & ! + 9.999747e-01, 9.999729e-01, 9.999711e-01, 9.999692e-01, 9.999673e-01, & ! + 9.999653e-01, 9.999632e-01, 9.999611e-01, 9.999589e-01, 9.999566e-01, & ! + 9.999543e-01, 9.999519e-01, 9.999495e-01, 9.999470e-01, 9.999444e-01, & ! + 9.999418e-01, 9.999392e-01, 9.999364e-01, 9.999336e-01, 9.999308e-01, & ! + 9.999279e-01, 9.999249e-01, 9.999219e-01, & ! + 9.999997e-01, 9.999997e-01, 9.999997e-01, 9.999996e-01, 9.999996e-01, & ! 10 + 9.999995e-01, 9.999994e-01, 9.999993e-01, 9.999993e-01, 9.999992e-01, & ! + 9.999991e-01, 9.999989e-01, 9.999988e-01, 9.999987e-01, 9.999986e-01, & ! + 9.999984e-01, 9.999983e-01, 9.999981e-01, 9.999980e-01, 9.999978e-01, & ! + 9.999976e-01, 9.999974e-01, 9.999972e-01, 9.999971e-01, 9.999969e-01, & ! + 9.999966e-01, 9.999964e-01, 9.999962e-01, 9.999960e-01, 9.999957e-01, & ! + 9.999955e-01, 9.999953e-01, 9.999950e-01, 9.999947e-01, 9.999945e-01, & ! + 9.999942e-01, 9.999939e-01, 9.999936e-01, 9.999934e-01, 9.999931e-01, & ! + 9.999928e-01, 9.999925e-01, 9.999921e-01, & ! + 9.999997e-01, 9.999996e-01, 9.999996e-01, 9.999995e-01, 9.999994e-01, & ! 11 + 9.999993e-01, 9.999992e-01, 9.999991e-01, 9.999990e-01, 9.999989e-01, & ! + 9.999987e-01, 9.999986e-01, 9.999984e-01, 9.999982e-01, 9.999980e-01, & ! + 9.999978e-01, 9.999976e-01, 9.999974e-01, 9.999972e-01, 9.999970e-01, & ! + 9.999967e-01, 9.999965e-01, 9.999962e-01, 9.999959e-01, 9.999956e-01, & ! + 9.999954e-01, 9.999951e-01, 9.999947e-01, 9.999944e-01, 9.999941e-01, & ! + 9.999938e-01, 9.999934e-01, 9.999931e-01, 9.999927e-01, 9.999923e-01, & ! + 9.999920e-01, 9.999916e-01, 9.999912e-01, 9.999908e-01, 9.999904e-01, & ! + 9.999899e-01, 9.999895e-01, 9.999891e-01, & ! + 9.999987e-01, 9.999987e-01, 9.999985e-01, 9.999984e-01, 9.999982e-01, & ! 12 + 9.999980e-01, 9.999978e-01, 9.999976e-01, 9.999973e-01, 9.999970e-01, & ! + 9.999967e-01, 9.999964e-01, 9.999960e-01, 9.999956e-01, 9.999952e-01, & ! + 9.999948e-01, 9.999944e-01, 9.999939e-01, 9.999934e-01, 9.999929e-01, & ! + 9.999924e-01, 9.999918e-01, 9.999913e-01, 9.999907e-01, 9.999901e-01, & ! + 9.999894e-01, 9.999888e-01, 9.999881e-01, 9.999874e-01, 9.999867e-01, & ! + 9.999860e-01, 9.999853e-01, 9.999845e-01, 9.999837e-01, 9.999829e-01, & ! + 9.999821e-01, 9.999813e-01, 9.999804e-01, 9.999796e-01, 9.999787e-01, & ! + 9.999778e-01, 9.999768e-01, 9.999759e-01, & ! + 9.999989e-01, 9.999989e-01, 9.999987e-01, 9.999986e-01, 9.999984e-01, & ! 13 + 9.999982e-01, 9.999980e-01, 9.999978e-01, 9.999975e-01, 9.999972e-01, & ! + 9.999969e-01, 9.999966e-01, 9.999962e-01, 9.999958e-01, 9.999954e-01, & ! + 9.999950e-01, 9.999945e-01, 9.999941e-01, 9.999936e-01, 9.999931e-01, & ! + 9.999925e-01, 9.999920e-01, 9.999914e-01, 9.999908e-01, 9.999902e-01, & ! + 9.999896e-01, 9.999889e-01, 9.999883e-01, 9.999876e-01, 9.999869e-01, & ! + 9.999861e-01, 9.999854e-01, 9.999846e-01, 9.999838e-01, 9.999830e-01, & ! + 9.999822e-01, 9.999814e-01, 9.999805e-01, 9.999796e-01, 9.999787e-01, & ! + 9.999778e-01, 9.999769e-01, 9.999759e-01, & ! + 7.042143e-01, 6.691161e-01, 6.463240e-01, 6.296590e-01, 6.166381e-01, & ! 14 + 6.060183e-01, 5.970908e-01, 5.894144e-01, 5.826968e-01, 5.767343e-01, & ! + 5.713804e-01, 5.665256e-01, 5.620867e-01, 5.579987e-01, 5.542101e-01, & ! + 5.506794e-01, 5.473727e-01, 5.442620e-01, 5.413239e-01, 5.385389e-01, & ! + 5.358901e-01, 5.333633e-01, 5.309460e-01, 5.286277e-01, 5.263988e-01, & ! + 5.242512e-01, 5.221777e-01, 5.201719e-01, 5.182280e-01, 5.163410e-01, & ! + 5.145062e-01, 5.127197e-01, 5.109776e-01, 5.092766e-01, 5.076137e-01, & ! + 5.059860e-01, 5.043911e-01, 5.028266e-01, 5.012904e-01, 4.997805e-01, & ! + 4.982951e-01, 4.968326e-01, 4.953913e-01/), & ! + shape = (/43,nBandsSW_RRTMG/)) + + real(kind_phys),dimension(43,nBandsSW_RRTMG),parameter :: & ! + asyice2 = reshape(source= (/ & ! + 7.946655e-01, 8.547685e-01, 8.806016e-01, 8.949880e-01, 9.041676e-01, & ! 1 + 9.105399e-01, 9.152249e-01, 9.188160e-01, 9.216573e-01, 9.239620e-01, & ! + 9.258695e-01, 9.274745e-01, 9.288441e-01, 9.300267e-01, 9.310584e-01, & ! + 9.319665e-01, 9.327721e-01, 9.334918e-01, 9.341387e-01, 9.347236e-01, & ! + 9.352551e-01, 9.357402e-01, 9.361850e-01, 9.365942e-01, 9.369722e-01, & ! + 9.373225e-01, 9.376481e-01, 9.379516e-01, 9.382352e-01, 9.385010e-01, & ! + 9.387505e-01, 9.389854e-01, 9.392070e-01, 9.394163e-01, 9.396145e-01, & ! + 9.398024e-01, 9.399809e-01, 9.401508e-01, 9.403126e-01, 9.404670e-01, & ! + 9.406144e-01, 9.407555e-01, 9.408906e-01, & ! + 9.078091e-01, 9.195850e-01, 9.267250e-01, 9.317083e-01, 9.354632e-01, & ! 2 + 9.384323e-01, 9.408597e-01, 9.428935e-01, 9.446301e-01, 9.461351e-01, & ! + 9.474555e-01, 9.486259e-01, 9.496722e-01, 9.506146e-01, 9.514688e-01, & ! + 9.522476e-01, 9.529612e-01, 9.536181e-01, 9.542251e-01, 9.547883e-01, & ! + 9.553124e-01, 9.558019e-01, 9.562601e-01, 9.566904e-01, 9.570953e-01, & ! + 9.574773e-01, 9.578385e-01, 9.581806e-01, 9.585054e-01, 9.588142e-01, & ! + 9.591083e-01, 9.593888e-01, 9.596569e-01, 9.599135e-01, 9.601593e-01, & ! + 9.603952e-01, 9.606219e-01, 9.608399e-01, 9.610499e-01, 9.612523e-01, & ! + 9.614477e-01, 9.616365e-01, 9.618192e-01, & ! + 8.322045e-01, 8.528693e-01, 8.648167e-01, 8.729163e-01, 8.789054e-01, & ! 3 + 8.835845e-01, 8.873819e-01, 8.905511e-01, 8.932532e-01, 8.955965e-01, & ! + 8.976567e-01, 8.994887e-01, 9.011334e-01, 9.026221e-01, 9.039791e-01, & ! + 9.052237e-01, 9.063715e-01, 9.074349e-01, 9.084245e-01, 9.093489e-01, & ! + 9.102154e-01, 9.110303e-01, 9.117987e-01, 9.125253e-01, 9.132140e-01, & ! + 9.138682e-01, 9.144910e-01, 9.150850e-01, 9.156524e-01, 9.161955e-01, & ! + 9.167160e-01, 9.172157e-01, 9.176959e-01, 9.181581e-01, 9.186034e-01, & ! + 9.190330e-01, 9.194478e-01, 9.198488e-01, 9.202368e-01, 9.206126e-01, & ! + 9.209768e-01, 9.213301e-01, 9.216731e-01, & ! + 8.116560e-01, 8.488278e-01, 8.674331e-01, 8.788148e-01, 8.865810e-01, & ! 4 + 8.922595e-01, 8.966149e-01, 9.000747e-01, 9.028980e-01, 9.052513e-01, & ! + 9.072468e-01, 9.089632e-01, 9.104574e-01, 9.117713e-01, 9.129371e-01, & ! + 9.139793e-01, 9.149174e-01, 9.157668e-01, 9.165400e-01, 9.172473e-01, & ! + 9.178970e-01, 9.184962e-01, 9.190508e-01, 9.195658e-01, 9.200455e-01, & ! + 9.204935e-01, 9.209130e-01, 9.213067e-01, 9.216771e-01, 9.220262e-01, & ! + 9.223560e-01, 9.226680e-01, 9.229636e-01, 9.232443e-01, 9.235112e-01, & ! + 9.237652e-01, 9.240074e-01, 9.242385e-01, 9.244594e-01, 9.246708e-01, & ! + 9.248733e-01, 9.250674e-01, 9.252536e-01, & ! + 8.047113e-01, 8.402864e-01, 8.570332e-01, 8.668455e-01, 8.733206e-01, & ! 5 + 8.779272e-01, 8.813796e-01, 8.840676e-01, 8.862225e-01, 8.879904e-01, & ! + 8.894682e-01, 8.907228e-01, 8.918019e-01, 8.927404e-01, 8.935645e-01, & ! + 8.942943e-01, 8.949452e-01, 8.955296e-01, 8.960574e-01, 8.965366e-01, & ! + 8.969736e-01, 8.973740e-01, 8.977422e-01, 8.980820e-01, 8.983966e-01, & ! + 8.986889e-01, 8.989611e-01, 8.992153e-01, 8.994533e-01, 8.996766e-01, & ! + 8.998865e-01, 9.000843e-01, 9.002709e-01, 9.004474e-01, 9.006146e-01, & ! + 9.007731e-01, 9.009237e-01, 9.010670e-01, 9.012034e-01, 9.013336e-01, & ! + 9.014579e-01, 9.015767e-01, 9.016904e-01, & ! + 8.179122e-01, 8.480726e-01, 8.621945e-01, 8.704354e-01, 8.758555e-01, & ! 6 + 8.797007e-01, 8.825750e-01, 8.848078e-01, 8.865939e-01, 8.880564e-01, & ! + 8.892765e-01, 8.903105e-01, 8.911982e-01, 8.919689e-01, 8.926446e-01, & ! + 8.932419e-01, 8.937738e-01, 8.942506e-01, 8.946806e-01, 8.950702e-01, & ! + 8.954251e-01, 8.957497e-01, 8.960477e-01, 8.963223e-01, 8.965762e-01, & ! + 8.968116e-01, 8.970306e-01, 8.972347e-01, 8.974255e-01, 8.976042e-01, & ! + 8.977720e-01, 8.979298e-01, 8.980784e-01, 8.982188e-01, 8.983515e-01, & ! + 8.984771e-01, 8.985963e-01, 8.987095e-01, 8.988171e-01, 8.989195e-01, & ! + 8.990172e-01, 8.991104e-01, 8.991994e-01, & ! + 8.169789e-01, 8.455024e-01, 8.586925e-01, 8.663283e-01, 8.713217e-01, & ! 7 + 8.748488e-01, 8.774765e-01, 8.795122e-01, 8.811370e-01, 8.824649e-01, & ! + 8.835711e-01, 8.845073e-01, 8.853103e-01, 8.860068e-01, 8.866170e-01, & ! + 8.871560e-01, 8.876358e-01, 8.880658e-01, 8.884533e-01, 8.888044e-01, & ! + 8.891242e-01, 8.894166e-01, 8.896851e-01, 8.899324e-01, 8.901612e-01, & ! + 8.903733e-01, 8.905706e-01, 8.907545e-01, 8.909265e-01, 8.910876e-01, & ! + 8.912388e-01, 8.913812e-01, 8.915153e-01, 8.916419e-01, 8.917617e-01, & ! + 8.918752e-01, 8.919829e-01, 8.920851e-01, 8.921824e-01, 8.922751e-01, & ! + 8.923635e-01, 8.924478e-01, 8.925284e-01, & ! + 8.387642e-01, 8.569979e-01, 8.658630e-01, 8.711825e-01, 8.747605e-01, & ! 8 + 8.773472e-01, 8.793129e-01, 8.808621e-01, 8.821179e-01, 8.831583e-01, & ! + 8.840361e-01, 8.847875e-01, 8.854388e-01, 8.860094e-01, 8.865138e-01, & ! + 8.869634e-01, 8.873668e-01, 8.877310e-01, 8.880617e-01, 8.883635e-01, & ! + 8.886401e-01, 8.888947e-01, 8.891298e-01, 8.893477e-01, 8.895504e-01, & ! + 8.897393e-01, 8.899159e-01, 8.900815e-01, 8.902370e-01, 8.903833e-01, & ! + 8.905214e-01, 8.906518e-01, 8.907753e-01, 8.908924e-01, 8.910036e-01, & ! + 8.911094e-01, 8.912101e-01, 8.913062e-01, 8.913979e-01, 8.914856e-01, & ! + 8.915695e-01, 8.916498e-01, 8.917269e-01, & ! + 8.522208e-01, 8.648132e-01, 8.711224e-01, 8.749901e-01, 8.776354e-01, & ! 9 + 8.795743e-01, 8.810649e-01, 8.822518e-01, 8.832225e-01, 8.840333e-01, & ! + 8.847224e-01, 8.853162e-01, 8.858342e-01, 8.862906e-01, 8.866962e-01, & ! + 8.870595e-01, 8.873871e-01, 8.876842e-01, 8.879551e-01, 8.882032e-01, & ! + 8.884316e-01, 8.886425e-01, 8.888380e-01, 8.890199e-01, 8.891895e-01, & ! + 8.893481e-01, 8.894968e-01, 8.896366e-01, 8.897683e-01, 8.898926e-01, & ! + 8.900102e-01, 8.901215e-01, 8.902272e-01, 8.903276e-01, 8.904232e-01, & ! + 8.905144e-01, 8.906014e-01, 8.906845e-01, 8.907640e-01, 8.908402e-01, & ! + 8.909132e-01, 8.909834e-01, 8.910507e-01, & ! + 8.578202e-01, 8.683033e-01, 8.735431e-01, 8.767488e-01, 8.789378e-01, & ! 10 + 8.805399e-01, 8.817701e-01, 8.827485e-01, 8.835480e-01, 8.842152e-01, & ! + 8.847817e-01, 8.852696e-01, 8.856949e-01, 8.860694e-01, 8.864020e-01, & ! + 8.866997e-01, 8.869681e-01, 8.872113e-01, 8.874330e-01, 8.876360e-01, & ! + 8.878227e-01, 8.879951e-01, 8.881548e-01, 8.883033e-01, 8.884418e-01, & ! + 8.885712e-01, 8.886926e-01, 8.888066e-01, 8.889139e-01, 8.890152e-01, & ! + 8.891110e-01, 8.892017e-01, 8.892877e-01, 8.893695e-01, 8.894473e-01, & ! + 8.895214e-01, 8.895921e-01, 8.896597e-01, 8.897243e-01, 8.897862e-01, & ! + 8.898456e-01, 8.899025e-01, 8.899572e-01, & ! + 8.625615e-01, 8.713831e-01, 8.755799e-01, 8.780560e-01, 8.796983e-01, & ! 11 + 8.808714e-01, 8.817534e-01, 8.824420e-01, 8.829953e-01, 8.834501e-01, & ! + 8.838310e-01, 8.841549e-01, 8.844338e-01, 8.846767e-01, 8.848902e-01, & ! + 8.850795e-01, 8.852484e-01, 8.854002e-01, 8.855374e-01, 8.856620e-01, & ! + 8.857758e-01, 8.858800e-01, 8.859759e-01, 8.860644e-01, 8.861464e-01, & ! + 8.862225e-01, 8.862935e-01, 8.863598e-01, 8.864218e-01, 8.864800e-01, & ! + 8.865347e-01, 8.865863e-01, 8.866349e-01, 8.866809e-01, 8.867245e-01, & ! + 8.867658e-01, 8.868050e-01, 8.868423e-01, 8.868778e-01, 8.869117e-01, & ! + 8.869440e-01, 8.869749e-01, 8.870044e-01, & ! + 8.587495e-01, 8.684764e-01, 8.728189e-01, 8.752872e-01, 8.768846e-01, & ! 12 + 8.780060e-01, 8.788386e-01, 8.794824e-01, 8.799960e-01, 8.804159e-01, & ! + 8.807660e-01, 8.810626e-01, 8.813175e-01, 8.815390e-01, 8.817335e-01, & ! + 8.819057e-01, 8.820593e-01, 8.821973e-01, 8.823220e-01, 8.824353e-01, & ! + 8.825387e-01, 8.826336e-01, 8.827209e-01, 8.828016e-01, 8.828764e-01, & ! + 8.829459e-01, 8.830108e-01, 8.830715e-01, 8.831283e-01, 8.831817e-01, & ! + 8.832320e-01, 8.832795e-01, 8.833244e-01, 8.833668e-01, 8.834071e-01, & ! + 8.834454e-01, 8.834817e-01, 8.835164e-01, 8.835495e-01, 8.835811e-01, & ! + 8.836113e-01, 8.836402e-01, 8.836679e-01, & ! + 8.561110e-01, 8.678583e-01, 8.727554e-01, 8.753892e-01, 8.770154e-01, & ! 13 + 8.781109e-01, 8.788949e-01, 8.794812e-01, 8.799348e-01, 8.802952e-01, & ! + 8.805880e-01, 8.808300e-01, 8.810331e-01, 8.812058e-01, 8.813543e-01, & ! + 8.814832e-01, 8.815960e-01, 8.816956e-01, 8.817839e-01, 8.818629e-01, & ! + 8.819339e-01, 8.819979e-01, 8.820560e-01, 8.821089e-01, 8.821573e-01, & ! + 8.822016e-01, 8.822425e-01, 8.822801e-01, 8.823150e-01, 8.823474e-01, & ! + 8.823775e-01, 8.824056e-01, 8.824318e-01, 8.824564e-01, 8.824795e-01, & ! + 8.825011e-01, 8.825215e-01, 8.825408e-01, 8.825589e-01, 8.825761e-01, & ! + 8.825924e-01, 8.826078e-01, 8.826224e-01, & ! + 8.311124e-01, 8.688197e-01, 8.900274e-01, 9.040696e-01, 9.142334e-01, & ! 14 + 9.220181e-01, 9.282195e-01, 9.333048e-01, 9.375689e-01, 9.412085e-01, & ! + 9.443604e-01, 9.471230e-01, 9.495694e-01, 9.517549e-01, 9.537224e-01, & ! + 9.555057e-01, 9.571316e-01, 9.586222e-01, 9.599952e-01, 9.612656e-01, & ! + 9.624458e-01, 9.635461e-01, 9.645756e-01, 9.655418e-01, 9.664513e-01, & ! + 9.673098e-01, 9.681222e-01, 9.688928e-01, 9.696256e-01, 9.703237e-01, & ! + 9.709903e-01, 9.716280e-01, 9.722391e-01, 9.728258e-01, 9.733901e-01, & ! + 9.739336e-01, 9.744579e-01, 9.749645e-01, 9.754546e-01, 9.759294e-01, & ! + 9.763901e-01, 9.768376e-01, 9.772727e-01/), & ! + shape = (/43,nBandsSW_RRTMG/)) + + real(kind_phys),dimension(46,nBandsSW_RRTMG),parameter :: & ! + extice3 = reshape(source= (/ & ! + 5.194013e-01, 3.215089e-01, 2.327917e-01, 1.824424e-01, 1.499977e-01, & ! 1 + 1.273492e-01, 1.106421e-01, 9.780982e-02, 8.764435e-02, 7.939266e-02, & ! + 7.256081e-02, 6.681137e-02, 6.190600e-02, 5.767154e-02, 5.397915e-02, & ! + 5.073102e-02, 4.785151e-02, 4.528125e-02, 4.297296e-02, 4.088853e-02, & ! + 3.899690e-02, 3.727251e-02, 3.569411e-02, 3.424393e-02, 3.290694e-02, & ! + 3.167040e-02, 3.052340e-02, 2.945654e-02, 2.846172e-02, 2.753188e-02, & ! + 2.666085e-02, 2.584322e-02, 2.507423e-02, 2.434967e-02, 2.366579e-02, & ! + 2.301926e-02, 2.240711e-02, 2.182666e-02, 2.127551e-02, 2.075150e-02, & ! + 2.025267e-02, 1.977725e-02, 1.932364e-02, 1.889035e-02, 1.847607e-02, & ! + 1.807956e-02, & ! + 4.901155e-01, 3.065286e-01, 2.230800e-01, 1.753951e-01, 1.445402e-01, & ! 2 + 1.229417e-01, 1.069777e-01, 9.469760e-02, 8.495824e-02, 7.704501e-02, & ! + 7.048834e-02, 6.496693e-02, 6.025353e-02, 5.618286e-02, 5.263186e-02, & ! + 4.950698e-02, 4.673585e-02, 4.426164e-02, 4.203904e-02, 4.003153e-02, & ! + 3.820932e-02, 3.654790e-02, 3.502688e-02, 3.362919e-02, 3.234041e-02, & ! + 3.114829e-02, 3.004234e-02, 2.901356e-02, 2.805413e-02, 2.715727e-02, & ! + 2.631705e-02, 2.552828e-02, 2.478637e-02, 2.408725e-02, 2.342734e-02, & ! + 2.280343e-02, 2.221264e-02, 2.165242e-02, 2.112043e-02, 2.061461e-02, & ! + 2.013308e-02, 1.967411e-02, 1.923616e-02, 1.881783e-02, 1.841781e-02, & ! + 1.803494e-02, & ! + 5.056264e-01, 3.160261e-01, 2.298442e-01, 1.805973e-01, 1.487318e-01, & ! 3 + 1.264258e-01, 1.099389e-01, 9.725656e-02, 8.719819e-02, 7.902576e-02, & ! + 7.225433e-02, 6.655206e-02, 6.168427e-02, 5.748028e-02, 5.381296e-02, & ! + 5.058572e-02, 4.772383e-02, 4.516857e-02, 4.287317e-02, 4.079990e-02, & ! + 3.891801e-02, 3.720217e-02, 3.563133e-02, 3.418786e-02, 3.285686e-02, & ! + 3.162569e-02, 3.048352e-02, 2.942104e-02, 2.843018e-02, 2.750395e-02, & ! + 2.663621e-02, 2.582160e-02, 2.505539e-02, 2.433337e-02, 2.365185e-02, & ! + 2.300750e-02, 2.239736e-02, 2.181878e-02, 2.126937e-02, 2.074699e-02, & ! + 2.024968e-02, 1.977567e-02, 1.932338e-02, 1.889134e-02, 1.847823e-02, & ! + 1.808281e-02, & ! + 4.881605e-01, 3.055237e-01, 2.225070e-01, 1.750688e-01, 1.443736e-01, & ! 4 + 1.228869e-01, 1.070054e-01, 9.478893e-02, 8.509997e-02, 7.722769e-02, & ! + 7.070495e-02, 6.521211e-02, 6.052311e-02, 5.647351e-02, 5.294088e-02, & ! + 4.983217e-02, 4.707539e-02, 4.461398e-02, 4.240288e-02, 4.040575e-02, & ! + 3.859298e-02, 3.694016e-02, 3.542701e-02, 3.403655e-02, 3.275444e-02, & ! + 3.156849e-02, 3.046827e-02, 2.944481e-02, 2.849034e-02, 2.759812e-02, & ! + 2.676226e-02, 2.597757e-02, 2.523949e-02, 2.454400e-02, 2.388750e-02, & ! + 2.326682e-02, 2.267909e-02, 2.212176e-02, 2.159253e-02, 2.108933e-02, & ! + 2.061028e-02, 2.015369e-02, 1.971801e-02, 1.930184e-02, 1.890389e-02, & ! + 1.852300e-02, & ! + 5.103703e-01, 3.188144e-01, 2.317435e-01, 1.819887e-01, 1.497944e-01, & ! 5 + 1.272584e-01, 1.106013e-01, 9.778822e-02, 8.762610e-02, 7.936938e-02, & ! + 7.252809e-02, 6.676701e-02, 6.184901e-02, 5.760165e-02, 5.389651e-02, & ! + 5.063598e-02, 4.774457e-02, 4.516295e-02, 4.284387e-02, 4.074922e-02, & ! + 3.884792e-02, 3.711438e-02, 3.552734e-02, 3.406898e-02, 3.272425e-02, & ! + 3.148038e-02, 3.032643e-02, 2.925299e-02, 2.825191e-02, 2.731612e-02, & ! + 2.643943e-02, 2.561642e-02, 2.484230e-02, 2.411284e-02, 2.342429e-02, & ! + 2.277329e-02, 2.215686e-02, 2.157231e-02, 2.101724e-02, 2.048946e-02, & ! + 1.998702e-02, 1.950813e-02, 1.905118e-02, 1.861468e-02, 1.819730e-02, & ! + 1.779781e-02, & ! + 5.031161e-01, 3.144511e-01, 2.286942e-01, 1.796903e-01, 1.479819e-01, & ! 6 + 1.257860e-01, 1.093803e-01, 9.676059e-02, 8.675183e-02, 7.861971e-02, & ! + 7.188168e-02, 6.620754e-02, 6.136376e-02, 5.718050e-02, 5.353127e-02, & ! + 5.031995e-02, 4.747218e-02, 4.492952e-02, 4.264544e-02, 4.058240e-02, & ! + 3.870979e-02, 3.700242e-02, 3.543933e-02, 3.400297e-02, 3.267854e-02, & ! + 3.145345e-02, 3.031691e-02, 2.925967e-02, 2.827370e-02, 2.735203e-02, & ! + 2.648858e-02, 2.567798e-02, 2.491555e-02, 2.419710e-02, 2.351893e-02, & ! + 2.287776e-02, 2.227063e-02, 2.169491e-02, 2.114821e-02, 2.062840e-02, & ! + 2.013354e-02, 1.966188e-02, 1.921182e-02, 1.878191e-02, 1.837083e-02, & ! + 1.797737e-02, & ! + 4.949453e-01, 3.095918e-01, 2.253402e-01, 1.771964e-01, 1.460446e-01, & ! 7 + 1.242383e-01, 1.081206e-01, 9.572235e-02, 8.588928e-02, 7.789990e-02, & ! + 7.128013e-02, 6.570559e-02, 6.094684e-02, 5.683701e-02, 5.325183e-02, & ! + 5.009688e-02, 4.729909e-02, 4.480106e-02, 4.255708e-02, 4.053025e-02, & ! + 3.869051e-02, 3.701310e-02, 3.547745e-02, 3.406631e-02, 3.276512e-02, & ! + 3.156153e-02, 3.044494e-02, 2.940626e-02, 2.843759e-02, 2.753211e-02, & ! + 2.668381e-02, 2.588744e-02, 2.513839e-02, 2.443255e-02, 2.376629e-02, & ! + 2.313637e-02, 2.253990e-02, 2.197428e-02, 2.143718e-02, 2.092649e-02, & ! + 2.044032e-02, 1.997694e-02, 1.953478e-02, 1.911241e-02, 1.870855e-02, & ! + 1.832199e-02, & ! + 5.052816e-01, 3.157665e-01, 2.296233e-01, 1.803986e-01, 1.485473e-01, & ! 8 + 1.262514e-01, 1.097718e-01, 9.709524e-02, 8.704139e-02, 7.887264e-02, & ! + 7.210424e-02, 6.640454e-02, 6.153894e-02, 5.733683e-02, 5.367116e-02, & ! + 5.044537e-02, 4.758477e-02, 4.503066e-02, 4.273629e-02, 4.066395e-02, & ! + 3.878291e-02, 3.706784e-02, 3.549771e-02, 3.405488e-02, 3.272448e-02, & ! + 3.149387e-02, 3.035221e-02, 2.929020e-02, 2.829979e-02, 2.737397e-02, & ! + 2.650663e-02, 2.569238e-02, 2.492651e-02, 2.420482e-02, 2.352361e-02, & ! + 2.287954e-02, 2.226968e-02, 2.169136e-02, 2.114220e-02, 2.062005e-02, & ! + 2.012296e-02, 1.964917e-02, 1.919709e-02, 1.876524e-02, 1.835231e-02, & ! + 1.795707e-02, & ! + 5.042067e-01, 3.151195e-01, 2.291708e-01, 1.800573e-01, 1.482779e-01, & ! 9 + 1.260324e-01, 1.095900e-01, 9.694202e-02, 8.691087e-02, 7.876056e-02, & ! + 7.200745e-02, 6.632062e-02, 6.146600e-02, 5.727338e-02, 5.361599e-02, & ! + 5.039749e-02, 4.754334e-02, 4.499500e-02, 4.270580e-02, 4.063815e-02, & ! + 3.876135e-02, 3.705016e-02, 3.548357e-02, 3.404400e-02, 3.271661e-02, & ! + 3.148877e-02, 3.034969e-02, 2.929008e-02, 2.830191e-02, 2.737818e-02, & ! + 2.651279e-02, 2.570039e-02, 2.493624e-02, 2.421618e-02, 2.353650e-02, & ! + 2.289390e-02, 2.228541e-02, 2.170840e-02, 2.116048e-02, 2.063950e-02, & ! + 2.014354e-02, 1.967082e-02, 1.921975e-02, 1.878888e-02, 1.837688e-02, & ! + 1.798254e-02, & ! + 5.022507e-01, 3.139246e-01, 2.283218e-01, 1.794059e-01, 1.477544e-01, & ! 10 + 1.255984e-01, 1.092222e-01, 9.662516e-02, 8.663439e-02, 7.851688e-02, & ! + 7.179095e-02, 6.612700e-02, 6.129193e-02, 5.711618e-02, 5.347351e-02, & ! + 5.026796e-02, 4.742530e-02, 4.488721e-02, 4.260724e-02, 4.054790e-02, & ! + 3.867866e-02, 3.697435e-02, 3.541407e-02, 3.398029e-02, 3.265824e-02, & ! + 3.143535e-02, 3.030085e-02, 2.924551e-02, 2.826131e-02, 2.734130e-02, & ! + 2.647939e-02, 2.567026e-02, 2.490919e-02, 2.419203e-02, 2.351509e-02, & ! + 2.287507e-02, 2.226903e-02, 2.169434e-02, 2.114862e-02, 2.062975e-02, & ! + 2.013578e-02, 1.966496e-02, 1.921571e-02, 1.878658e-02, 1.837623e-02, & ! + 1.798348e-02, & ! + 5.068316e-01, 3.166869e-01, 2.302576e-01, 1.808693e-01, 1.489122e-01, & ! 11 + 1.265423e-01, 1.100080e-01, 9.728926e-02, 8.720201e-02, 7.900612e-02, & ! + 7.221524e-02, 6.649660e-02, 6.161484e-02, 5.739877e-02, 5.372093e-02, & ! + 5.048442e-02, 4.761431e-02, 4.505172e-02, 4.274972e-02, 4.067050e-02, & ! + 3.878321e-02, 3.706244e-02, 3.548710e-02, 3.403948e-02, 3.270466e-02, & ! + 3.146995e-02, 3.032450e-02, 2.925897e-02, 2.826527e-02, 2.733638e-02, & ! + 2.646615e-02, 2.564920e-02, 2.488078e-02, 2.415670e-02, 2.347322e-02, & ! + 2.282702e-02, 2.221513e-02, 2.163489e-02, 2.108390e-02, 2.056002e-02, & ! + 2.006128e-02, 1.958591e-02, 1.913232e-02, 1.869904e-02, 1.828474e-02, & ! + 1.788819e-02, & ! + 5.077707e-01, 3.172636e-01, 2.306695e-01, 1.811871e-01, 1.491691e-01, & ! 12 + 1.267565e-01, 1.101907e-01, 9.744773e-02, 8.734125e-02, 7.912973e-02, & ! + 7.232591e-02, 6.659637e-02, 6.170530e-02, 5.748120e-02, 5.379634e-02, & ! + 5.055367e-02, 4.767809e-02, 4.511061e-02, 4.280423e-02, 4.072104e-02, & ! + 3.883015e-02, 3.710611e-02, 3.552776e-02, 3.407738e-02, 3.274002e-02, & ! + 3.150296e-02, 3.035532e-02, 2.928776e-02, 2.829216e-02, 2.736150e-02, & ! + 2.648961e-02, 2.567111e-02, 2.490123e-02, 2.417576e-02, 2.349098e-02, & ! + 2.284354e-02, 2.223049e-02, 2.164914e-02, 2.109711e-02, 2.057222e-02, & ! + 2.007253e-02, 1.959626e-02, 1.914181e-02, 1.870770e-02, 1.829261e-02, & ! + 1.789531e-02, & ! + 5.062281e-01, 3.163402e-01, 2.300275e-01, 1.807060e-01, 1.487921e-01, & ! 13 + 1.264523e-01, 1.099403e-01, 9.723879e-02, 8.716516e-02, 7.898034e-02, & ! + 7.219863e-02, 6.648771e-02, 6.161254e-02, 5.740217e-02, 5.372929e-02, & ! + 5.049716e-02, 4.763092e-02, 4.507179e-02, 4.277290e-02, 4.069649e-02, & ! + 3.881175e-02, 3.709331e-02, 3.552008e-02, 3.407442e-02, 3.274141e-02, & ! + 3.150837e-02, 3.036447e-02, 2.930037e-02, 2.830801e-02, 2.738037e-02, & ! + 2.651132e-02, 2.569547e-02, 2.492810e-02, 2.420499e-02, 2.352243e-02, & ! + 2.287710e-02, 2.226604e-02, 2.168658e-02, 2.113634e-02, 2.061316e-02, & ! + 2.011510e-02, 1.964038e-02, 1.918740e-02, 1.875471e-02, 1.834096e-02, & ! + 1.794495e-02, & ! + 1.338834e-01, 1.924912e-01, 1.755523e-01, 1.534793e-01, 1.343937e-01, & ! 14 + 1.187883e-01, 1.060654e-01, 9.559106e-02, 8.685880e-02, 7.948698e-02, & ! + 7.319086e-02, 6.775669e-02, 6.302215e-02, 5.886236e-02, 5.517996e-02, & ! + 5.189810e-02, 4.895539e-02, 4.630225e-02, 4.389823e-02, 4.171002e-02, & ! + 3.970998e-02, 3.787493e-02, 3.618537e-02, 3.462471e-02, 3.317880e-02, & ! + 3.183547e-02, 3.058421e-02, 2.941590e-02, 2.832256e-02, 2.729724e-02, & ! + 2.633377e-02, 2.542675e-02, 2.457136e-02, 2.376332e-02, 2.299882e-02, & ! + 2.227443e-02, 2.158707e-02, 2.093400e-02, 2.031270e-02, 1.972091e-02, & ! + 1.915659e-02, 1.861787e-02, 1.810304e-02, 1.761055e-02, 1.713899e-02, & ! + 1.668704e-02 /), & ! + shape = (/46,nBandsSW_RRTMG/)) + + real(kind_phys),dimension(46,nBandsSW_RRTMG),parameter :: & ! + ssaice3 = reshape(source= (/ & ! + 6.749442e-01, 6.649947e-01, 6.565828e-01, 6.489928e-01, 6.420046e-01, & ! 1 + 6.355231e-01, 6.294964e-01, 6.238901e-01, 6.186783e-01, 6.138395e-01, & ! + 6.093543e-01, 6.052049e-01, 6.013742e-01, 5.978457e-01, 5.946030e-01, & ! + 5.916302e-01, 5.889115e-01, 5.864310e-01, 5.841731e-01, 5.821221e-01, & ! + 5.802624e-01, 5.785785e-01, 5.770549e-01, 5.756759e-01, 5.744262e-01, & ! + 5.732901e-01, 5.722524e-01, 5.712974e-01, 5.704097e-01, 5.695739e-01, & ! + 5.687747e-01, 5.679964e-01, 5.672238e-01, 5.664415e-01, 5.656340e-01, & ! + 5.647860e-01, 5.638821e-01, 5.629070e-01, 5.618452e-01, 5.606815e-01, & ! + 5.594006e-01, 5.579870e-01, 5.564255e-01, 5.547008e-01, 5.527976e-01, & ! + 5.507005e-01, & ! + 7.628550e-01, 7.567297e-01, 7.508463e-01, 7.451972e-01, 7.397745e-01, & ! 2 + 7.345705e-01, 7.295775e-01, 7.247881e-01, 7.201945e-01, 7.157894e-01, & ! + 7.115652e-01, 7.075145e-01, 7.036300e-01, 6.999044e-01, 6.963304e-01, & ! + 6.929007e-01, 6.896083e-01, 6.864460e-01, 6.834067e-01, 6.804833e-01, & ! + 6.776690e-01, 6.749567e-01, 6.723397e-01, 6.698109e-01, 6.673637e-01, & ! + 6.649913e-01, 6.626870e-01, 6.604441e-01, 6.582561e-01, 6.561163e-01, & ! + 6.540182e-01, 6.519554e-01, 6.499215e-01, 6.479099e-01, 6.459145e-01, & ! + 6.439289e-01, 6.419468e-01, 6.399621e-01, 6.379686e-01, 6.359601e-01, & ! + 6.339306e-01, 6.318740e-01, 6.297845e-01, 6.276559e-01, 6.254825e-01, & ! + 6.232583e-01, & ! + 9.924147e-01, 9.882792e-01, 9.842257e-01, 9.802522e-01, 9.763566e-01, & ! 3 + 9.725367e-01, 9.687905e-01, 9.651157e-01, 9.615104e-01, 9.579725e-01, & ! + 9.544997e-01, 9.510901e-01, 9.477416e-01, 9.444520e-01, 9.412194e-01, & ! + 9.380415e-01, 9.349165e-01, 9.318421e-01, 9.288164e-01, 9.258373e-01, & ! + 9.229027e-01, 9.200106e-01, 9.171589e-01, 9.143457e-01, 9.115688e-01, & ! + 9.088263e-01, 9.061161e-01, 9.034362e-01, 9.007846e-01, 8.981592e-01, & ! + 8.955581e-01, 8.929792e-01, 8.904206e-01, 8.878803e-01, 8.853562e-01, & ! + 8.828464e-01, 8.803488e-01, 8.778616e-01, 8.753827e-01, 8.729102e-01, & ! + 8.704421e-01, 8.679764e-01, 8.655112e-01, 8.630445e-01, 8.605744e-01, & ! + 8.580989e-01, & ! + 9.629413e-01, 9.517182e-01, 9.409209e-01, 9.305366e-01, 9.205529e-01, & ! 4 + 9.109569e-01, 9.017362e-01, 8.928780e-01, 8.843699e-01, 8.761992e-01, & ! + 8.683536e-01, 8.608204e-01, 8.535873e-01, 8.466417e-01, 8.399712e-01, & ! + 8.335635e-01, 8.274062e-01, 8.214868e-01, 8.157932e-01, 8.103129e-01, & ! + 8.050336e-01, 7.999432e-01, 7.950294e-01, 7.902798e-01, 7.856825e-01, & ! + 7.812250e-01, 7.768954e-01, 7.726815e-01, 7.685711e-01, 7.645522e-01, & ! + 7.606126e-01, 7.567404e-01, 7.529234e-01, 7.491498e-01, 7.454074e-01, & ! + 7.416844e-01, 7.379688e-01, 7.342485e-01, 7.305118e-01, 7.267468e-01, & ! + 7.229415e-01, 7.190841e-01, 7.151628e-01, 7.111657e-01, 7.070811e-01, & ! + 7.028972e-01, & ! + 9.942270e-01, 9.909206e-01, 9.876775e-01, 9.844960e-01, 9.813746e-01, & ! 5 + 9.783114e-01, 9.753049e-01, 9.723535e-01, 9.694553e-01, 9.666088e-01, & ! + 9.638123e-01, 9.610641e-01, 9.583626e-01, 9.557060e-01, 9.530928e-01, & ! + 9.505211e-01, 9.479895e-01, 9.454961e-01, 9.430393e-01, 9.406174e-01, & ! + 9.382288e-01, 9.358717e-01, 9.335446e-01, 9.312456e-01, 9.289731e-01, & ! + 9.267255e-01, 9.245010e-01, 9.222980e-01, 9.201147e-01, 9.179496e-01, & ! + 9.158008e-01, 9.136667e-01, 9.115457e-01, 9.094359e-01, 9.073358e-01, & ! + 9.052436e-01, 9.031577e-01, 9.010763e-01, 8.989977e-01, 8.969203e-01, & ! + 8.948423e-01, 8.927620e-01, 8.906778e-01, 8.885879e-01, 8.864907e-01, & ! + 8.843843e-01, & ! + 9.934014e-01, 9.899331e-01, 9.865537e-01, 9.832610e-01, 9.800523e-01, & ! 6 + 9.769254e-01, 9.738777e-01, 9.709069e-01, 9.680106e-01, 9.651862e-01, & ! + 9.624315e-01, 9.597439e-01, 9.571212e-01, 9.545608e-01, 9.520605e-01, & ! + 9.496177e-01, 9.472301e-01, 9.448954e-01, 9.426111e-01, 9.403749e-01, & ! + 9.381843e-01, 9.360370e-01, 9.339307e-01, 9.318629e-01, 9.298313e-01, & ! + 9.278336e-01, 9.258673e-01, 9.239302e-01, 9.220198e-01, 9.201338e-01, & ! + 9.182700e-01, 9.164258e-01, 9.145991e-01, 9.127874e-01, 9.109884e-01, & ! + 9.091999e-01, 9.074194e-01, 9.056447e-01, 9.038735e-01, 9.021033e-01, & ! + 9.003320e-01, 8.985572e-01, 8.967766e-01, 8.949879e-01, 8.931888e-01, & ! + 8.913770e-01, & ! + 9.994833e-01, 9.992055e-01, 9.989278e-01, 9.986500e-01, 9.983724e-01, & ! 7 + 9.980947e-01, 9.978172e-01, 9.975397e-01, 9.972623e-01, 9.969849e-01, & ! + 9.967077e-01, 9.964305e-01, 9.961535e-01, 9.958765e-01, 9.955997e-01, & ! + 9.953230e-01, 9.950464e-01, 9.947699e-01, 9.944936e-01, 9.942174e-01, & ! + 9.939414e-01, 9.936656e-01, 9.933899e-01, 9.931144e-01, 9.928390e-01, & ! + 9.925639e-01, 9.922889e-01, 9.920141e-01, 9.917396e-01, 9.914652e-01, & ! + 9.911911e-01, 9.909171e-01, 9.906434e-01, 9.903700e-01, 9.900967e-01, & ! + 9.898237e-01, 9.895510e-01, 9.892784e-01, 9.890062e-01, 9.887342e-01, & ! + 9.884625e-01, 9.881911e-01, 9.879199e-01, 9.876490e-01, 9.873784e-01, & ! + 9.871081e-01, & ! + 9.999343e-01, 9.998917e-01, 9.998492e-01, 9.998067e-01, 9.997642e-01, & ! 8 + 9.997218e-01, 9.996795e-01, 9.996372e-01, 9.995949e-01, 9.995528e-01, & ! + 9.995106e-01, 9.994686e-01, 9.994265e-01, 9.993845e-01, 9.993426e-01, & ! + 9.993007e-01, 9.992589e-01, 9.992171e-01, 9.991754e-01, 9.991337e-01, & ! + 9.990921e-01, 9.990505e-01, 9.990089e-01, 9.989674e-01, 9.989260e-01, & ! + 9.988846e-01, 9.988432e-01, 9.988019e-01, 9.987606e-01, 9.987194e-01, & ! + 9.986782e-01, 9.986370e-01, 9.985959e-01, 9.985549e-01, 9.985139e-01, & ! + 9.984729e-01, 9.984319e-01, 9.983910e-01, 9.983502e-01, 9.983094e-01, & ! + 9.982686e-01, 9.982279e-01, 9.981872e-01, 9.981465e-01, 9.981059e-01, & ! + 9.980653e-01, & ! + 9.999978e-01, 9.999965e-01, 9.999952e-01, 9.999939e-01, 9.999926e-01, & ! 9 + 9.999913e-01, 9.999900e-01, 9.999887e-01, 9.999873e-01, 9.999860e-01, & ! + 9.999847e-01, 9.999834e-01, 9.999821e-01, 9.999808e-01, 9.999795e-01, & ! + 9.999782e-01, 9.999769e-01, 9.999756e-01, 9.999743e-01, 9.999730e-01, & ! + 9.999717e-01, 9.999704e-01, 9.999691e-01, 9.999678e-01, 9.999665e-01, & ! + 9.999652e-01, 9.999639e-01, 9.999626e-01, 9.999613e-01, 9.999600e-01, & ! + 9.999587e-01, 9.999574e-01, 9.999561e-01, 9.999548e-01, 9.999535e-01, & ! + 9.999522e-01, 9.999509e-01, 9.999496e-01, 9.999483e-01, 9.999470e-01, & ! + 9.999457e-01, 9.999444e-01, 9.999431e-01, 9.999418e-01, 9.999405e-01, & ! + 9.999392e-01, & ! + 9.999994e-01, 9.999993e-01, 9.999991e-01, 9.999990e-01, 9.999989e-01, & ! 10 + 9.999987e-01, 9.999986e-01, 9.999984e-01, 9.999983e-01, 9.999982e-01, & ! + 9.999980e-01, 9.999979e-01, 9.999977e-01, 9.999976e-01, 9.999975e-01, & ! + 9.999973e-01, 9.999972e-01, 9.999970e-01, 9.999969e-01, 9.999967e-01, & ! + 9.999966e-01, 9.999965e-01, 9.999963e-01, 9.999962e-01, 9.999960e-01, & ! + 9.999959e-01, 9.999957e-01, 9.999956e-01, 9.999954e-01, 9.999953e-01, & ! + 9.999952e-01, 9.999950e-01, 9.999949e-01, 9.999947e-01, 9.999946e-01, & ! + 9.999944e-01, 9.999943e-01, 9.999941e-01, 9.999940e-01, 9.999939e-01, & ! + 9.999937e-01, 9.999936e-01, 9.999934e-01, 9.999933e-01, 9.999931e-01, & ! + 9.999930e-01, & ! + 9.999997e-01, 9.999995e-01, 9.999992e-01, 9.999990e-01, 9.999987e-01, & ! 11 + 9.999985e-01, 9.999983e-01, 9.999980e-01, 9.999978e-01, 9.999976e-01, & ! + 9.999973e-01, 9.999971e-01, 9.999969e-01, 9.999967e-01, 9.999965e-01, & ! + 9.999963e-01, 9.999960e-01, 9.999958e-01, 9.999956e-01, 9.999954e-01, & ! + 9.999952e-01, 9.999950e-01, 9.999948e-01, 9.999946e-01, 9.999944e-01, & ! + 9.999942e-01, 9.999939e-01, 9.999937e-01, 9.999935e-01, 9.999933e-01, & ! + 9.999931e-01, 9.999929e-01, 9.999927e-01, 9.999925e-01, 9.999923e-01, & ! + 9.999920e-01, 9.999918e-01, 9.999916e-01, 9.999914e-01, 9.999911e-01, & ! + 9.999909e-01, 9.999907e-01, 9.999905e-01, 9.999902e-01, 9.999900e-01, & ! + 9.999897e-01, & ! + 9.999991e-01, 9.999985e-01, 9.999980e-01, 9.999974e-01, 9.999968e-01, & ! 12 + 9.999963e-01, 9.999957e-01, 9.999951e-01, 9.999946e-01, 9.999940e-01, & ! + 9.999934e-01, 9.999929e-01, 9.999923e-01, 9.999918e-01, 9.999912e-01, & ! + 9.999907e-01, 9.999901e-01, 9.999896e-01, 9.999891e-01, 9.999885e-01, & ! + 9.999880e-01, 9.999874e-01, 9.999869e-01, 9.999863e-01, 9.999858e-01, & ! + 9.999853e-01, 9.999847e-01, 9.999842e-01, 9.999836e-01, 9.999831e-01, & ! + 9.999826e-01, 9.999820e-01, 9.999815e-01, 9.999809e-01, 9.999804e-01, & ! + 9.999798e-01, 9.999793e-01, 9.999787e-01, 9.999782e-01, 9.999776e-01, & ! + 9.999770e-01, 9.999765e-01, 9.999759e-01, 9.999754e-01, 9.999748e-01, & ! + 9.999742e-01, & ! + 9.999975e-01, 9.999961e-01, 9.999946e-01, 9.999931e-01, 9.999917e-01, & ! 13 + 9.999903e-01, 9.999888e-01, 9.999874e-01, 9.999859e-01, 9.999845e-01, & ! + 9.999831e-01, 9.999816e-01, 9.999802e-01, 9.999788e-01, 9.999774e-01, & ! + 9.999759e-01, 9.999745e-01, 9.999731e-01, 9.999717e-01, 9.999702e-01, & ! + 9.999688e-01, 9.999674e-01, 9.999660e-01, 9.999646e-01, 9.999631e-01, & ! + 9.999617e-01, 9.999603e-01, 9.999589e-01, 9.999574e-01, 9.999560e-01, & ! + 9.999546e-01, 9.999532e-01, 9.999517e-01, 9.999503e-01, 9.999489e-01, & ! + 9.999474e-01, 9.999460e-01, 9.999446e-01, 9.999431e-01, 9.999417e-01, & ! + 9.999403e-01, 9.999388e-01, 9.999374e-01, 9.999359e-01, 9.999345e-01, & ! + 9.999330e-01, & ! + 4.526500e-01, 5.287890e-01, 5.410487e-01, 5.459865e-01, 5.485149e-01, & ! 14 + 5.498914e-01, 5.505895e-01, 5.508310e-01, 5.507364e-01, 5.503793e-01, & ! + 5.498090e-01, 5.490612e-01, 5.481637e-01, 5.471395e-01, 5.460083e-01, & ! + 5.447878e-01, 5.434946e-01, 5.421442e-01, 5.407514e-01, 5.393309e-01, & ! + 5.378970e-01, 5.364641e-01, 5.350464e-01, 5.336582e-01, 5.323140e-01, & ! + 5.310283e-01, 5.298158e-01, 5.286914e-01, 5.276704e-01, 5.267680e-01, & ! + 5.260000e-01, 5.253823e-01, 5.249311e-01, 5.246629e-01, 5.245946e-01, & ! + 5.247434e-01, 5.251268e-01, 5.257626e-01, 5.266693e-01, 5.278653e-01, & ! + 5.293698e-01, 5.312022e-01, 5.333823e-01, 5.359305e-01, 5.388676e-01, & ! + 5.422146e-01/), & ! + shape = (/46,nBandsSW_RRTMG/)) + + real(kind_phys),dimension(46,nBandsSW_RRTMG),parameter :: & ! + asyice3 = reshape(source= (/ & ! + 8.340752e-01, 8.435170e-01, 8.517487e-01, 8.592064e-01, 8.660387e-01, & ! 1 + 8.723204e-01, 8.780997e-01, 8.834137e-01, 8.882934e-01, 8.927662e-01, & ! + 8.968577e-01, 9.005914e-01, 9.039899e-01, 9.070745e-01, 9.098659e-01, & ! + 9.123836e-01, 9.146466e-01, 9.166734e-01, 9.184817e-01, 9.200886e-01, & ! + 9.215109e-01, 9.227648e-01, 9.238661e-01, 9.248304e-01, 9.256727e-01, & ! + 9.264078e-01, 9.270505e-01, 9.276150e-01, 9.281156e-01, 9.285662e-01, & ! + 9.289806e-01, 9.293726e-01, 9.297557e-01, 9.301435e-01, 9.305491e-01, & ! + 9.309859e-01, 9.314671e-01, 9.320055e-01, 9.326140e-01, 9.333053e-01, & ! + 9.340919e-01, 9.349861e-01, 9.360000e-01, 9.371451e-01, 9.384329e-01, & ! + 9.398744e-01, & ! + 8.728160e-01, 8.777333e-01, 8.823754e-01, 8.867535e-01, 8.908785e-01, & ! 2 + 8.947611e-01, 8.984118e-01, 9.018408e-01, 9.050582e-01, 9.080739e-01, & ! + 9.108976e-01, 9.135388e-01, 9.160068e-01, 9.183106e-01, 9.204595e-01, & ! + 9.224620e-01, 9.243271e-01, 9.260632e-01, 9.276788e-01, 9.291822e-01, & ! + 9.305817e-01, 9.318853e-01, 9.331012e-01, 9.342372e-01, 9.353013e-01, & ! + 9.363013e-01, 9.372450e-01, 9.381400e-01, 9.389939e-01, 9.398145e-01, & ! + 9.406092e-01, 9.413856e-01, 9.421511e-01, 9.429131e-01, 9.436790e-01, & ! + 9.444561e-01, 9.452517e-01, 9.460729e-01, 9.469270e-01, 9.478209e-01, & ! + 9.487617e-01, 9.497562e-01, 9.508112e-01, 9.519335e-01, 9.531294e-01, & ! + 9.544055e-01, & ! + 7.897566e-01, 7.948704e-01, 7.998041e-01, 8.045623e-01, 8.091495e-01, & ! 3 + 8.135702e-01, 8.178290e-01, 8.219305e-01, 8.258790e-01, 8.296792e-01, & ! + 8.333355e-01, 8.368524e-01, 8.402343e-01, 8.434856e-01, 8.466108e-01, & ! + 8.496143e-01, 8.525004e-01, 8.552737e-01, 8.579384e-01, 8.604990e-01, & ! + 8.629597e-01, 8.653250e-01, 8.675992e-01, 8.697867e-01, 8.718916e-01, & ! + 8.739185e-01, 8.758715e-01, 8.777551e-01, 8.795734e-01, 8.813308e-01, & ! + 8.830315e-01, 8.846799e-01, 8.862802e-01, 8.878366e-01, 8.893534e-01, & ! + 8.908350e-01, 8.922854e-01, 8.937090e-01, 8.951099e-01, 8.964925e-01, & ! + 8.978609e-01, 8.992192e-01, 9.005718e-01, 9.019229e-01, 9.032765e-01, & ! + 9.046369e-01, & ! + 7.812615e-01, 7.887764e-01, 7.959664e-01, 8.028413e-01, 8.094109e-01, & ! 4 + 8.156849e-01, 8.216730e-01, 8.273846e-01, 8.328294e-01, 8.380166e-01, & ! + 8.429556e-01, 8.476556e-01, 8.521258e-01, 8.563753e-01, 8.604131e-01, & ! + 8.642481e-01, 8.678893e-01, 8.713455e-01, 8.746254e-01, 8.777378e-01, & ! + 8.806914e-01, 8.834948e-01, 8.861566e-01, 8.886854e-01, 8.910897e-01, & ! + 8.933779e-01, 8.955586e-01, 8.976402e-01, 8.996311e-01, 9.015398e-01, & ! + 9.033745e-01, 9.051436e-01, 9.068555e-01, 9.085185e-01, 9.101410e-01, & ! + 9.117311e-01, 9.132972e-01, 9.148476e-01, 9.163905e-01, 9.179340e-01, & ! + 9.194864e-01, 9.210559e-01, 9.226505e-01, 9.242784e-01, 9.259476e-01, & ! + 9.276661e-01, & ! + 7.640720e-01, 7.691119e-01, 7.739941e-01, 7.787222e-01, 7.832998e-01, & ! 5 + 7.877304e-01, 7.920177e-01, 7.961652e-01, 8.001765e-01, 8.040551e-01, & ! + 8.078044e-01, 8.114280e-01, 8.149294e-01, 8.183119e-01, 8.215791e-01, & ! + 8.247344e-01, 8.277812e-01, 8.307229e-01, 8.335629e-01, 8.363046e-01, & ! + 8.389514e-01, 8.415067e-01, 8.439738e-01, 8.463560e-01, 8.486568e-01, & ! + 8.508795e-01, 8.530274e-01, 8.551039e-01, 8.571122e-01, 8.590558e-01, & ! + 8.609378e-01, 8.627618e-01, 8.645309e-01, 8.662485e-01, 8.679178e-01, & ! + 8.695423e-01, 8.711251e-01, 8.726697e-01, 8.741792e-01, 8.756571e-01, & ! + 8.771065e-01, 8.785307e-01, 8.799331e-01, 8.813169e-01, 8.826854e-01, & ! + 8.840419e-01, & ! + 7.602598e-01, 7.651572e-01, 7.699014e-01, 7.744962e-01, 7.789452e-01, & ! 6 + 7.832522e-01, 7.874205e-01, 7.914538e-01, 7.953555e-01, 7.991290e-01, & ! + 8.027777e-01, 8.063049e-01, 8.097140e-01, 8.130081e-01, 8.161906e-01, & ! + 8.192645e-01, 8.222331e-01, 8.250993e-01, 8.278664e-01, 8.305374e-01, & ! + 8.331153e-01, 8.356030e-01, 8.380037e-01, 8.403201e-01, 8.425553e-01, & ! + 8.447121e-01, 8.467935e-01, 8.488022e-01, 8.507412e-01, 8.526132e-01, & ! + 8.544210e-01, 8.561675e-01, 8.578554e-01, 8.594875e-01, 8.610665e-01, & ! + 8.625951e-01, 8.640760e-01, 8.655119e-01, 8.669055e-01, 8.682594e-01, & ! + 8.695763e-01, 8.708587e-01, 8.721094e-01, 8.733308e-01, 8.745255e-01, & ! + 8.756961e-01, & ! + 7.568957e-01, 7.606995e-01, 7.644072e-01, 7.680204e-01, 7.715402e-01, & ! 7 + 7.749682e-01, 7.783057e-01, 7.815541e-01, 7.847148e-01, 7.877892e-01, & ! + 7.907786e-01, 7.936846e-01, 7.965084e-01, 7.992515e-01, 8.019153e-01, & ! + 8.045011e-01, 8.070103e-01, 8.094444e-01, 8.118048e-01, 8.140927e-01, & ! + 8.163097e-01, 8.184571e-01, 8.205364e-01, 8.225488e-01, 8.244958e-01, & ! + 8.263789e-01, 8.281993e-01, 8.299586e-01, 8.316580e-01, 8.332991e-01, & ! + 8.348831e-01, 8.364115e-01, 8.378857e-01, 8.393071e-01, 8.406770e-01, & ! + 8.419969e-01, 8.432682e-01, 8.444923e-01, 8.456706e-01, 8.468044e-01, & ! + 8.478952e-01, 8.489444e-01, 8.499533e-01, 8.509234e-01, 8.518561e-01, & ! + 8.527528e-01, & ! + 7.575066e-01, 7.606912e-01, 7.638236e-01, 7.669035e-01, 7.699306e-01, & ! 8 + 7.729046e-01, 7.758254e-01, 7.786926e-01, 7.815060e-01, 7.842654e-01, & ! + 7.869705e-01, 7.896211e-01, 7.922168e-01, 7.947574e-01, 7.972428e-01, & ! + 7.996726e-01, 8.020466e-01, 8.043646e-01, 8.066262e-01, 8.088313e-01, & ! + 8.109796e-01, 8.130709e-01, 8.151049e-01, 8.170814e-01, 8.190001e-01, & ! + 8.208608e-01, 8.226632e-01, 8.244071e-01, 8.260924e-01, 8.277186e-01, & ! + 8.292856e-01, 8.307932e-01, 8.322411e-01, 8.336291e-01, 8.349570e-01, & ! + 8.362244e-01, 8.374312e-01, 8.385772e-01, 8.396621e-01, 8.406856e-01, & ! + 8.416476e-01, 8.425479e-01, 8.433861e-01, 8.441620e-01, 8.448755e-01, & ! + 8.455263e-01, & ! + 7.568829e-01, 7.597947e-01, 7.626745e-01, 7.655212e-01, 7.683337e-01, & ! 9 + 7.711111e-01, 7.738523e-01, 7.765565e-01, 7.792225e-01, 7.818494e-01, & ! + 7.844362e-01, 7.869819e-01, 7.894854e-01, 7.919459e-01, 7.943623e-01, & ! + 7.967337e-01, 7.990590e-01, 8.013373e-01, 8.035676e-01, 8.057488e-01, & ! + 8.078802e-01, 8.099605e-01, 8.119890e-01, 8.139645e-01, 8.158862e-01, & ! + 8.177530e-01, 8.195641e-01, 8.213183e-01, 8.230149e-01, 8.246527e-01, & ! + 8.262308e-01, 8.277483e-01, 8.292042e-01, 8.305976e-01, 8.319275e-01, & ! + 8.331929e-01, 8.343929e-01, 8.355265e-01, 8.365928e-01, 8.375909e-01, & ! + 8.385197e-01, 8.393784e-01, 8.401659e-01, 8.408815e-01, 8.415240e-01, & ! + 8.420926e-01, & ! + 7.548616e-01, 7.575454e-01, 7.602153e-01, 7.628696e-01, 7.655067e-01, & ! 10 + 7.681249e-01, 7.707225e-01, 7.732978e-01, 7.758492e-01, 7.783750e-01, & ! + 7.808735e-01, 7.833430e-01, 7.857819e-01, 7.881886e-01, 7.905612e-01, & ! + 7.928983e-01, 7.951980e-01, 7.974588e-01, 7.996789e-01, 8.018567e-01, & ! + 8.039905e-01, 8.060787e-01, 8.081196e-01, 8.101115e-01, 8.120527e-01, & ! + 8.139416e-01, 8.157764e-01, 8.175557e-01, 8.192776e-01, 8.209405e-01, & ! + 8.225427e-01, 8.240826e-01, 8.255585e-01, 8.269688e-01, 8.283117e-01, & ! + 8.295856e-01, 8.307889e-01, 8.319198e-01, 8.329767e-01, 8.339579e-01, & ! + 8.348619e-01, 8.356868e-01, 8.364311e-01, 8.370930e-01, 8.376710e-01, & ! + 8.381633e-01, & ! + 7.491854e-01, 7.518523e-01, 7.545089e-01, 7.571534e-01, 7.597839e-01, & ! 11 + 7.623987e-01, 7.649959e-01, 7.675737e-01, 7.701303e-01, 7.726639e-01, & ! + 7.751727e-01, 7.776548e-01, 7.801084e-01, 7.825318e-01, 7.849230e-01, & ! + 7.872804e-01, 7.896020e-01, 7.918862e-01, 7.941309e-01, 7.963345e-01, & ! + 7.984951e-01, 8.006109e-01, 8.026802e-01, 8.047009e-01, 8.066715e-01, & ! + 8.085900e-01, 8.104546e-01, 8.122636e-01, 8.140150e-01, 8.157072e-01, & ! + 8.173382e-01, 8.189063e-01, 8.204096e-01, 8.218464e-01, 8.232148e-01, & ! + 8.245130e-01, 8.257391e-01, 8.268915e-01, 8.279682e-01, 8.289675e-01, & ! + 8.298875e-01, 8.307264e-01, 8.314824e-01, 8.321537e-01, 8.327385e-01, & ! + 8.332350e-01, & ! + 7.397086e-01, 7.424069e-01, 7.450955e-01, 7.477725e-01, 7.504362e-01, & ! 12 + 7.530846e-01, 7.557159e-01, 7.583283e-01, 7.609199e-01, 7.634888e-01, & ! + 7.660332e-01, 7.685512e-01, 7.710411e-01, 7.735009e-01, 7.759288e-01, & ! + 7.783229e-01, 7.806814e-01, 7.830024e-01, 7.852841e-01, 7.875246e-01, & ! + 7.897221e-01, 7.918748e-01, 7.939807e-01, 7.960380e-01, 7.980449e-01, & ! + 7.999995e-01, 8.019000e-01, 8.037445e-01, 8.055311e-01, 8.072581e-01, & ! + 8.089235e-01, 8.105255e-01, 8.120623e-01, 8.135319e-01, 8.149326e-01, & ! + 8.162626e-01, 8.175198e-01, 8.187025e-01, 8.198089e-01, 8.208371e-01, & ! + 8.217852e-01, 8.226514e-01, 8.234338e-01, 8.241306e-01, 8.247399e-01, & ! + 8.252599e-01, & ! + 7.224533e-01, 7.251681e-01, 7.278728e-01, 7.305654e-01, 7.332444e-01, & ! 13 + 7.359078e-01, 7.385539e-01, 7.411808e-01, 7.437869e-01, 7.463702e-01, & ! + 7.489291e-01, 7.514616e-01, 7.539661e-01, 7.564408e-01, 7.588837e-01, & ! + 7.612933e-01, 7.636676e-01, 7.660049e-01, 7.683034e-01, 7.705612e-01, & ! + 7.727767e-01, 7.749480e-01, 7.770733e-01, 7.791509e-01, 7.811789e-01, & ! + 7.831556e-01, 7.850791e-01, 7.869478e-01, 7.887597e-01, 7.905131e-01, & ! + 7.922062e-01, 7.938372e-01, 7.954044e-01, 7.969059e-01, 7.983399e-01, & ! + 7.997047e-01, 8.009985e-01, 8.022195e-01, 8.033658e-01, 8.044357e-01, & ! + 8.054275e-01, 8.063392e-01, 8.071692e-01, 8.079157e-01, 8.085768e-01, & ! + 8.091507e-01, & ! + 8.850026e-01, 9.005489e-01, 9.069242e-01, 9.121799e-01, 9.168987e-01, & ! 14 + 9.212259e-01, 9.252176e-01, 9.289028e-01, 9.323000e-01, 9.354235e-01, & ! + 9.382858e-01, 9.408985e-01, 9.432734e-01, 9.454218e-01, 9.473557e-01, & ! + 9.490871e-01, 9.506282e-01, 9.519917e-01, 9.531904e-01, 9.542374e-01, & ! + 9.551461e-01, 9.559298e-01, 9.566023e-01, 9.571775e-01, 9.576692e-01, & ! + 9.580916e-01, 9.584589e-01, 9.587853e-01, 9.590851e-01, 9.593729e-01, & ! + 9.596632e-01, 9.599705e-01, 9.603096e-01, 9.606954e-01, 9.611427e-01, & ! + 9.616667e-01, 9.622826e-01, 9.630060e-01, 9.638524e-01, 9.648379e-01, & ! + 9.659788e-01, 9.672916e-01, 9.687933e-01, 9.705014e-01, 9.724337e-01, & ! + 9.746084e-01/), & ! + shape = (/46,nBandsSW_RRTMG/)) + + real(kind_phys),dimension(46,nBandsSW_RRTMG),parameter :: & ! + fdlice3 = reshape(source= (/ & ! + 4.959277e-02, 4.685292e-02, 4.426104e-02, 4.181231e-02, 3.950191e-02, & ! + 3.732500e-02, 3.527675e-02, 3.335235e-02, 3.154697e-02, 2.985578e-02, & ! + 2.827395e-02, 2.679666e-02, 2.541909e-02, 2.413640e-02, 2.294378e-02, & ! + 2.183639e-02, 2.080940e-02, 1.985801e-02, 1.897736e-02, 1.816265e-02, & ! + 1.740905e-02, 1.671172e-02, 1.606585e-02, 1.546661e-02, 1.490917e-02, & ! + 1.438870e-02, 1.390038e-02, 1.343939e-02, 1.300089e-02, 1.258006e-02, & ! + 1.217208e-02, 1.177212e-02, 1.137536e-02, 1.097696e-02, 1.057210e-02, & ! + 1.015596e-02, 9.723704e-03, 9.270516e-03, 8.791565e-03, 8.282026e-03, & ! + 7.737072e-03, 7.151879e-03, 6.521619e-03, 5.841467e-03, 5.106597e-03, & ! + 4.312183e-03, & ! + 5.071224e-02, 5.000217e-02, 4.933872e-02, 4.871992e-02, 4.814380e-02, & ! + 4.760839e-02, 4.711170e-02, 4.665177e-02, 4.622662e-02, 4.583426e-02, & ! + 4.547274e-02, 4.514007e-02, 4.483428e-02, 4.455340e-02, 4.429544e-02, & ! + 4.405844e-02, 4.384041e-02, 4.363939e-02, 4.345340e-02, 4.328047e-02, & ! + 4.311861e-02, 4.296586e-02, 4.282024e-02, 4.267977e-02, 4.254248e-02, & ! + 4.240640e-02, 4.226955e-02, 4.212995e-02, 4.198564e-02, 4.183462e-02, & ! + 4.167494e-02, 4.150462e-02, 4.132167e-02, 4.112413e-02, 4.091003e-02, & ! + 4.067737e-02, 4.042420e-02, 4.014854e-02, 3.984840e-02, 3.952183e-02, & ! + 3.916683e-02, 3.878144e-02, 3.836368e-02, 3.791158e-02, 3.742316e-02, & ! + 3.689645e-02, & ! + 1.062938e-01, 1.065234e-01, 1.067822e-01, 1.070682e-01, 1.073793e-01, & ! + 1.077137e-01, 1.080693e-01, 1.084442e-01, 1.088364e-01, 1.092439e-01, & ! + 1.096647e-01, 1.100970e-01, 1.105387e-01, 1.109878e-01, 1.114423e-01, & ! + 1.119004e-01, 1.123599e-01, 1.128190e-01, 1.132757e-01, 1.137279e-01, & ! + 1.141738e-01, 1.146113e-01, 1.150385e-01, 1.154534e-01, 1.158540e-01, & ! + 1.162383e-01, 1.166045e-01, 1.169504e-01, 1.172741e-01, 1.175738e-01, & ! + 1.178472e-01, 1.180926e-01, 1.183080e-01, 1.184913e-01, 1.186405e-01, & ! + 1.187538e-01, 1.188291e-01, 1.188645e-01, 1.188580e-01, 1.188076e-01, & ! + 1.187113e-01, 1.185672e-01, 1.183733e-01, 1.181277e-01, 1.178282e-01, & ! + 1.174731e-01, & ! + 1.076195e-01, 1.065195e-01, 1.054696e-01, 1.044673e-01, 1.035099e-01, & ! + 1.025951e-01, 1.017203e-01, 1.008831e-01, 1.000808e-01, 9.931116e-02, & ! + 9.857151e-02, 9.785939e-02, 9.717230e-02, 9.650774e-02, 9.586322e-02, & ! + 9.523623e-02, 9.462427e-02, 9.402484e-02, 9.343544e-02, 9.285358e-02, & ! + 9.227675e-02, 9.170245e-02, 9.112818e-02, 9.055144e-02, 8.996974e-02, & ! + 8.938056e-02, 8.878142e-02, 8.816981e-02, 8.754323e-02, 8.689919e-02, & ! + 8.623517e-02, 8.554869e-02, 8.483724e-02, 8.409832e-02, 8.332943e-02, & ! + 8.252807e-02, 8.169175e-02, 8.081795e-02, 7.990419e-02, 7.894796e-02, & ! + 7.794676e-02, 7.689809e-02, 7.579945e-02, 7.464834e-02, 7.344227e-02, & ! + 7.217872e-02, & ! + 1.119014e-01, 1.122706e-01, 1.126690e-01, 1.130947e-01, 1.135456e-01, & ! + 1.140199e-01, 1.145154e-01, 1.150302e-01, 1.155623e-01, 1.161096e-01, & ! + 1.166703e-01, 1.172422e-01, 1.178233e-01, 1.184118e-01, 1.190055e-01, & ! + 1.196025e-01, 1.202008e-01, 1.207983e-01, 1.213931e-01, 1.219832e-01, & ! + 1.225665e-01, 1.231411e-01, 1.237050e-01, 1.242561e-01, 1.247926e-01, & ! + 1.253122e-01, 1.258132e-01, 1.262934e-01, 1.267509e-01, 1.271836e-01, & ! + 1.275896e-01, 1.279669e-01, 1.283134e-01, 1.286272e-01, 1.289063e-01, & ! + 1.291486e-01, 1.293522e-01, 1.295150e-01, 1.296351e-01, 1.297104e-01, & ! + 1.297390e-01, 1.297189e-01, 1.296480e-01, 1.295244e-01, 1.293460e-01, & ! + 1.291109e-01, & ! + 1.133298e-01, 1.136777e-01, 1.140556e-01, 1.144615e-01, 1.148934e-01, & ! + 1.153492e-01, 1.158269e-01, 1.163243e-01, 1.168396e-01, 1.173706e-01, & ! + 1.179152e-01, 1.184715e-01, 1.190374e-01, 1.196108e-01, 1.201897e-01, & ! + 1.207720e-01, 1.213558e-01, 1.219389e-01, 1.225194e-01, 1.230951e-01, & ! + 1.236640e-01, 1.242241e-01, 1.247733e-01, 1.253096e-01, 1.258309e-01, & ! + 1.263352e-01, 1.268205e-01, 1.272847e-01, 1.277257e-01, 1.281415e-01, & ! + 1.285300e-01, 1.288893e-01, 1.292173e-01, 1.295118e-01, 1.297710e-01, & ! + 1.299927e-01, 1.301748e-01, 1.303154e-01, 1.304124e-01, 1.304637e-01, & ! + 1.304673e-01, 1.304212e-01, 1.303233e-01, 1.301715e-01, 1.299638e-01, & ! + 1.296983e-01, & ! + 1.145360e-01, 1.153256e-01, 1.161453e-01, 1.169929e-01, 1.178666e-01, & ! + 1.187641e-01, 1.196835e-01, 1.206227e-01, 1.215796e-01, 1.225522e-01, & ! + 1.235383e-01, 1.245361e-01, 1.255433e-01, 1.265579e-01, 1.275779e-01, & ! + 1.286011e-01, 1.296257e-01, 1.306494e-01, 1.316703e-01, 1.326862e-01, & ! + 1.336951e-01, 1.346950e-01, 1.356838e-01, 1.366594e-01, 1.376198e-01, & ! + 1.385629e-01, 1.394866e-01, 1.403889e-01, 1.412678e-01, 1.421212e-01, & ! + 1.429469e-01, 1.437430e-01, 1.445074e-01, 1.452381e-01, 1.459329e-01, & ! + 1.465899e-01, 1.472069e-01, 1.477819e-01, 1.483128e-01, 1.487976e-01, & ! + 1.492343e-01, 1.496207e-01, 1.499548e-01, 1.502346e-01, 1.504579e-01, & ! + 1.506227e-01, & ! + 1.153263e-01, 1.161445e-01, 1.169932e-01, 1.178703e-01, 1.187738e-01, & ! + 1.197016e-01, 1.206516e-01, 1.216217e-01, 1.226099e-01, 1.236141e-01, & ! + 1.246322e-01, 1.256621e-01, 1.267017e-01, 1.277491e-01, 1.288020e-01, & ! + 1.298584e-01, 1.309163e-01, 1.319736e-01, 1.330281e-01, 1.340778e-01, & ! + 1.351207e-01, 1.361546e-01, 1.371775e-01, 1.381873e-01, 1.391820e-01, & ! + 1.401593e-01, 1.411174e-01, 1.420540e-01, 1.429671e-01, 1.438547e-01, & ! + 1.447146e-01, 1.455449e-01, 1.463433e-01, 1.471078e-01, 1.478364e-01, & ! + 1.485270e-01, 1.491774e-01, 1.497857e-01, 1.503497e-01, 1.508674e-01, & ! + 1.513367e-01, 1.517554e-01, 1.521216e-01, 1.524332e-01, 1.526880e-01, & ! + 1.528840e-01, & ! + 1.160842e-01, 1.169118e-01, 1.177697e-01, 1.186556e-01, 1.195676e-01, & ! + 1.205036e-01, 1.214616e-01, 1.224394e-01, 1.234349e-01, 1.244463e-01, & ! + 1.254712e-01, 1.265078e-01, 1.275539e-01, 1.286075e-01, 1.296664e-01, & ! + 1.307287e-01, 1.317923e-01, 1.328550e-01, 1.339149e-01, 1.349699e-01, & ! + 1.360179e-01, 1.370567e-01, 1.380845e-01, 1.390991e-01, 1.400984e-01, & ! + 1.410803e-01, 1.420429e-01, 1.429840e-01, 1.439016e-01, 1.447936e-01, & ! + 1.456579e-01, 1.464925e-01, 1.472953e-01, 1.480642e-01, 1.487972e-01, & ! + 1.494923e-01, 1.501472e-01, 1.507601e-01, 1.513287e-01, 1.518511e-01, & ! + 1.523252e-01, 1.527489e-01, 1.531201e-01, 1.534368e-01, 1.536969e-01, & ! + 1.538984e-01, & ! + 1.168725e-01, 1.177088e-01, 1.185747e-01, 1.194680e-01, 1.203867e-01, & ! + 1.213288e-01, 1.222923e-01, 1.232750e-01, 1.242750e-01, 1.252903e-01, & ! + 1.263187e-01, 1.273583e-01, 1.284069e-01, 1.294626e-01, 1.305233e-01, & ! + 1.315870e-01, 1.326517e-01, 1.337152e-01, 1.347756e-01, 1.358308e-01, & ! + 1.368788e-01, 1.379175e-01, 1.389449e-01, 1.399590e-01, 1.409577e-01, & ! + 1.419389e-01, 1.429007e-01, 1.438410e-01, 1.447577e-01, 1.456488e-01, & ! + 1.465123e-01, 1.473461e-01, 1.481483e-01, 1.489166e-01, 1.496492e-01, & ! + 1.503439e-01, 1.509988e-01, 1.516118e-01, 1.521808e-01, 1.527038e-01, & ! + 1.531788e-01, 1.536037e-01, 1.539764e-01, 1.542951e-01, 1.545575e-01, & ! + 1.547617e-01, & ! + 1.180509e-01, 1.189025e-01, 1.197820e-01, 1.206875e-01, 1.216171e-01, & ! + 1.225687e-01, 1.235404e-01, 1.245303e-01, 1.255363e-01, 1.265564e-01, & ! + 1.275888e-01, 1.286313e-01, 1.296821e-01, 1.307392e-01, 1.318006e-01, & ! + 1.328643e-01, 1.339284e-01, 1.349908e-01, 1.360497e-01, 1.371029e-01, & ! + 1.381486e-01, 1.391848e-01, 1.402095e-01, 1.412208e-01, 1.422165e-01, & ! + 1.431949e-01, 1.441539e-01, 1.450915e-01, 1.460058e-01, 1.468947e-01, & ! + 1.477564e-01, 1.485888e-01, 1.493900e-01, 1.501580e-01, 1.508907e-01, & ! + 1.515864e-01, 1.522428e-01, 1.528582e-01, 1.534305e-01, 1.539578e-01, & ! + 1.544380e-01, 1.548692e-01, 1.552494e-01, 1.555767e-01, 1.558490e-01, & ! + 1.560645e-01, & ! + 1.200480e-01, 1.209267e-01, 1.218304e-01, 1.227575e-01, 1.237059e-01, & ! + 1.246739e-01, 1.256595e-01, 1.266610e-01, 1.276765e-01, 1.287041e-01, & ! + 1.297420e-01, 1.307883e-01, 1.318412e-01, 1.328988e-01, 1.339593e-01, & ! + 1.350207e-01, 1.360813e-01, 1.371393e-01, 1.381926e-01, 1.392396e-01, & ! + 1.402783e-01, 1.413069e-01, 1.423235e-01, 1.433263e-01, 1.443134e-01, & ! + 1.452830e-01, 1.462332e-01, 1.471622e-01, 1.480681e-01, 1.489490e-01, & ! + 1.498032e-01, 1.506286e-01, 1.514236e-01, 1.521863e-01, 1.529147e-01, & ! + 1.536070e-01, 1.542614e-01, 1.548761e-01, 1.554491e-01, 1.559787e-01, & ! + 1.564629e-01, 1.568999e-01, 1.572879e-01, 1.576249e-01, 1.579093e-01, & ! + 1.581390e-01, & ! + 1.247813e-01, 1.256496e-01, 1.265417e-01, 1.274560e-01, 1.283905e-01, & ! + 1.293436e-01, 1.303135e-01, 1.312983e-01, 1.322964e-01, 1.333060e-01, & ! + 1.343252e-01, 1.353523e-01, 1.363855e-01, 1.374231e-01, 1.384632e-01, & ! + 1.395042e-01, 1.405441e-01, 1.415813e-01, 1.426140e-01, 1.436404e-01, & ! + 1.446587e-01, 1.456672e-01, 1.466640e-01, 1.476475e-01, 1.486157e-01, & ! + 1.495671e-01, 1.504997e-01, 1.514117e-01, 1.523016e-01, 1.531673e-01, & ! + 1.540073e-01, 1.548197e-01, 1.556026e-01, 1.563545e-01, 1.570734e-01, & ! + 1.577576e-01, 1.584054e-01, 1.590149e-01, 1.595843e-01, 1.601120e-01, & ! + 1.605962e-01, 1.610349e-01, 1.614266e-01, 1.617693e-01, 1.620614e-01, & ! + 1.623011e-01, & ! + 1.006055e-01, 9.549582e-02, 9.063960e-02, 8.602900e-02, 8.165612e-02, & ! + 7.751308e-02, 7.359199e-02, 6.988496e-02, 6.638412e-02, 6.308156e-02, & ! + 5.996942e-02, 5.703979e-02, 5.428481e-02, 5.169657e-02, 4.926719e-02, & ! + 4.698880e-02, 4.485349e-02, 4.285339e-02, 4.098061e-02, 3.922727e-02, & ! + 3.758547e-02, 3.604733e-02, 3.460497e-02, 3.325051e-02, 3.197604e-02, & ! + 3.077369e-02, 2.963558e-02, 2.855381e-02, 2.752050e-02, 2.652776e-02, & ! + 2.556772e-02, 2.463247e-02, 2.371415e-02, 2.280485e-02, 2.189670e-02, & ! + 2.098180e-02, 2.005228e-02, 1.910024e-02, 1.811781e-02, 1.709709e-02, & ! + 1.603020e-02, 1.490925e-02, 1.372635e-02, 1.247363e-02, 1.114319e-02, & ! + 9.727157e-03/), & ! + shape = (/46,nBandsSW_RRTMG/)) + + + + real(kind_phys),dimension(5) :: & + abari = (/ 3.448e-03,3.448e-03,3.448e-03,3.448e-03,3.448e-03 /), & + bbari = (/ 2.431e+00,2.431e+00,2.431e+00,2.431e+00,2.431e+00 /), & + cbari = (/ 1.000e-05,1.100e-04,1.240e-02,3.779e-02,4.666e-01 /), & + dbari = (/ 0.000e+00,1.405e-05,6.867e-04,1.284e-03,2.050e-05 /), & + ebari = (/ 7.661e-01,7.730e-01,7.865e-01,8.172e-01,9.595e-01 /), & + fbari = (/ 5.851e-04,5.665e-04,7.204e-04,7.463e-04,1.076e-04 /) + + ! ipat is bands index for ebert & curry ice cloud (for iflagice=1) + integer,dimension(nBandsSW_RRTMG),parameter :: & + ipat = (/ 5, 5, 4, 4, 3, 3, 2, 2, 1, 1, 1, 1, 1, 5 /) + +contains + ! ######################################################################################### + ! rrtmg_sw_cloud_optics + ! ######################################################################################### + subroutine rrtmg_sw_cloud_optics(ncol, nlay, nBandsSW, cld_lwp, cld_ref_liq, cld_iwp, & + cld_ref_ice, cld_rwp, cld_ref_rain, cld_swp, cld_ref_snow, cld_frac, & + tau_cld, ssa_cld, asy_cld) + ! Inputs + integer,intent(in) :: & + nBandsSW, & ! Number of spectral bands + ncol, & ! Number of horizontal gridpoints + nlay ! Number of vertical layers + real(kind_phys), dimension(ncol,nlay), intent(in) :: & + cld_frac, & ! Cloud-fraction (1) + cld_lwp, & ! Cloud liquid water path (g/m2) + cld_ref_liq, & ! Effective radius (liquid) (micron) + cld_iwp, & ! Cloud ice water path (g/m2) + cld_ref_ice, & ! Effective radius (ice) (micron) + cld_rwp, & ! Cloud rain water path (g/m2) + cld_ref_rain, & ! Effective radius (rain-drop) (micron) + cld_swp, & ! Cloud snow-water path (g/m2) + cld_ref_snow ! Effective radius (snow-flake) (micron) + + ! Outputs + real(kind_phys),dimension(ncol,nlay,nBandsSW),intent(out) :: & + tau_cld, & ! In-cloud optical depth (1) + ssa_cld, & ! In-cloud single-scattering albedo (1) + asy_cld ! In-cloud asymmetry parameter (1) + + ! Local variables + integer :: iCol, iLay, iBand, index, ia, istr + real(kind_phys) :: tau_rain, tau_snow, factor, fint, cld_ref_iceTemp,asyw,ssaw,za1,za2 + + real(kind_phys), dimension(nBandsSW) :: ssa_rain, ssa_snow, asy_rain, asy_snow, & + tau_liq, ssa_liq, asy_liq, tau_ice, ssa_ice, asy_ice, forwliq, asycoliq, & + forwice, extcoice, asycoice, ssacoice, fdelta, extcoliq, ssacoliq + + ! Initialize + tau_cld(:,:,:) = 0._kind_phys + ssa_cld(:,:,:) = 1._kind_phys + asy_cld(:,:,:) = 0._kind_phys + + ! Compute cloud radiative properties for cloud. + if (iswcliq > 0) then + do iCol=1,ncol + do iLay=1,nlay + ! Initialize + tau_liq(:) = 0._kind_phys + tau_ice(:) = 0._kind_phys + tau_rain = 0._kind_phys + tau_snow = 0._kind_phys + ssa_liq(:) = 0._kind_phys + ssa_ice(:) = 0._kind_phys + ssa_rain(:) = 0._kind_phys + ssa_snow(:) = 0._kind_phys + asy_liq(:) = 0._kind_phys + asy_ice(:) = 0._kind_phys + asy_rain(:) = 0._kind_phys + asy_snow(:) = 0._kind_phys + if (cld_frac(iCol,iLay) .gt. 0._kind_phys) then + ! ########################################################################### + ! Rain clouds + ! ########################################################################### + ! Rain optical depth (No band dependence) + tau_rain = cld_rwp(iCol,iLay)*a0r + + ! Rain single-scattering albedo and asymmetry (Band dependent) + do iBand=1,nBandsSW + ssa_rain(iBand) = tau_rain*(1.-b0r(iBand)) + asy_rain(iBand) = ssa_rain(iBand)*c0r(iBand) + enddo + + ! ########################################################################### + ! Snow clouds + ! ########################################################################### + ! Snow optical depth (No band dependence) + if (cld_swp(iCol,iLay) .gt. 0. .and. cld_ref_snow(iCol,iLay) .gt. 10._kind_phys) then + tau_snow = cld_swp(iCol,iLay) + else + tau_snow = 0._kind_phys + endif + + ! Snow single-scattering albedo and asymmetry (Band dependent) + do iBand=1,nBandsSW + ssa_snow(iBand) = tau_snow*(1.-(b0s(iBand)+b1s(iBand)*1.0315*cld_ref_snow(iCol,iLay))) + asy_snow(iBand) = ssa_snow(iBand)*c0s(iBand) + enddo + + ! ########################################################################### + ! Liquid clouds + ! ########################################################################### + if (cld_lwp(iCol,iLay) .gt. 0) then + ! Find index in coefficient LUT for corresponding partice size. + factor = cld_ref_liq(iCol,iLay) - 1.5 + index = max( 1, min( 57, int( factor ) )) + fint = factor - float(index) + + ! Extract coefficents for all bands and compute radiative properties + do iBand=1,nBandsSW + ! Interpolate coefficients + if ( iswcliq == 1 ) then + extcoliq(iBand) = max(0._kind_phys, extliq1(index,iBand) + & + fint*(extliq1(index+1,iBand)-extliq1(index,iBand))) + ssacoliq(iBand) = max(0._kind_phys, min(1._kind_phys, ssaliq1(index,iBand) + & + fint*(ssaliq1(index+1,iBand)-ssaliq1(index,iBand)))) + asycoliq(iBand) = max(0._kind_phys, min(1._kind_phys, asyliq1(index,iBand) + & + fint*(asyliq1(index+1,iBand)-asyliq1(index,iBand)))) + elseif ( iswcliq == 2 ) then ! use updated coeffs + extcoliq(iBand) = max(0._kind_phys, extliq2(index,iBand) + & + fint*(extliq2(index+1,iBand)-extliq2(index,iBand))) + ssacoliq(iBand) = max(0._kind_phys, min(1._kind_phys, ssaliq2(index,iBand) + & + fint*(ssaliq2(index+1,iBand)-ssaliq2(index,iBand)))) + asycoliq(iBand) = max(0._kind_phys, min(1._kind_phys, asyliq2(index,iBand) + & + fint*(asyliq2(index+1,iBand)-asyliq2(index,iBand)))) + endif + if (fint .lt. 0._kind_phys .and. ssacoliq(iBand) .gt. 1._kind_phys) then + ssacoliq(iBand) = ssaliq1(index,iBand) + endif + tau_liq(iBand) = cld_lwp(iCol,iLay) * extcoliq(iBand) + ssa_liq(iBand) = tau_liq(iBand) * ssacoliq(iBand) + asy_liq(iBand) = ssa_liq(iBand) * asycoliq(iBand) + enddo + endif ! IF cloudy with liquid condensate + + ! ########################################################################### + ! Ice clouds + ! ########################################################################### + if (cld_iwp(iCol,iLay) .gt. 0) then + ! Ebert and curry approach for all particle sizes though somewhat + ! unjustified for large ice particles. + if ( iswcice == 1 ) then + cld_ref_iceTemp = min(130._kind_phys, max(13._kind_phys,cld_ref_ice(iCol,iLay))) + do iBand=1,nBandsSW + ia = ipat(iBand) ! eb_&_c band index for ice cloud coeff + extcoice(iBand) = abari(ia) + bbari(ia) / cld_ref_iceTemp + ssacoice(iBand) = 1._kind_phys - cbari(ia) - dbari(ia)*cld_ref_iceTemp + asycoice(iBand) = ebari(ia)+fbari(ia)*cld_ref_iceTemp + tau_ice(iBand) = cld_iwp(iCol,iLay) * extcoice(iBand) + ssa_ice(iBand) = tau_ice(iBand) * ssacoice(iBand) + asy_ice(iBand) = ssa_ice(iBand) * asycoice(iBand) + enddo + + ! Streamer approach for ice effective radius between 5.0 and 131.0 microns. + elseif ( iswcice == 2 ) then + cld_ref_iceTemp = min(131._kind_phys, max(5.0_kind_phys,cld_ref_ice(iCol,iLay))) + factor = (cld_ref_iceTemp - 2.) / 3. + index = max( 1, min( 42, int( factor ) )) + fint = factor - float(index) + do iBand = 1,nBandsSW + extcoice(iBand) = extice2(index,iBand) + & + fint*(extice2(index+1,iBand)-extice2(index,iBand)) + ssacoice(iBand) = ssaice2(index,iBand) + & + fint*(ssaice2(index+1,iBand)-ssaice2(index,iBand)) + asycoice(iBand) = asyice2(index,iBand) + & + fint*(asyice2(index+1,iBand)-asyice2(index,iBand)) + tau_ice(iBand) = cld_iwp(iCol,iLay) * extcoice(iBand) + ssa_ice(iBand) = tau_ice(iBand) * ssacoice(iBand) + asy_ice(iBand) = ssa_ice(iBand) * asycoice(iBand) + enddo + + ! Fu's approach for ice effective radius between 4.8 and 135 microns + ! (generalized effective size from 5 to 140 microns). + ! https://doi.org/10.1175/1520-0442(1996)009<2058:AAPOTS>2.0.CO;2 + elseif ( iswcice == 3 ) then + cld_ref_iceTemp = max( 5.0, min( 140.0, 1.0315*cld_ref_ice(iCol,iLay) )) + ! Determine indices for table interpolation. + factor = (cld_ref_iceTemp - 2._kind_phys) / 3._kind_phys + index = max( 1, min( 45, int( factor ) )) + fint = factor - float(index) + do iBand = 1,nBandsSW + ! Interpolate coefficient tables to appropriate ice-particle size. + extcoice(iBand) = max(0._kind_phys, extice3(index,iBand) + & + fint*(extice3(index+1,iBand)-extice3(index,iBand))) ! eq (3.9a) + ssacoice(iBand) = max(0._kind_phys, min(1._kind_phys, ssaice3(index,iBand) + & + fint*(ssaice3(index+1,iBand)-ssaice3(index,iBand)))) ! eq (3.9b) + asycoice(iBand) = max(0._kind_phys, min(1._kind_phys, asyice3(index,iBand) + & + fint*(asyice3(index+1,iBand)-asyice3(index,iBand)))) ! eq (3.9c) + fdelta(iBand) = fdlice3(index,iBand) + & + fint*(fdlice3(index+1,iBand)-fdlice3(index,iBand)) ! eq (3.9d) + forwice(iBand) = fdelta(iBand) + 0.5_kind_phys / ssacoice(iBand) + if (forwice(iBand) .gt. asycoice(iBand)) forwice(iBand) = asycoice(iBand) + tau_ice(iBand) = cld_iwp(iCol,iLay) * extcoice(iBand) + ssa_ice(iBand) = tau_ice(iBand) * ssacoice(iBand) + asy_ice(iBand) = ssa_ice(iBand) * asycoice(iBand) + enddo + endif + endif ! IF cloudy column with ice condensate + endif ! IF cloudy column + + ! ########################################################################### + ! Compute total cloud radiative properties (tau, omega, and g) + ! ########################################################################### + if (cld_frac(iCol,iLay) .gt. 0._kind_phys) then + do iBand = 1,nBandsSW + ! Sum up radiative properties by type. + tau_cld(iCol,iLay,iBand) = tau_liq(iBand) + tau_ice(iBand) + tau_rain + tau_snow + ssa_cld(iCol,iLay,iBand) = ssa_liq(iBand) + ssa_ice(iBand) + ssa_rain(iBand) + ssa_snow(iBand) + asy_cld(iCol,iLay,iBand) = asy_liq(iBand) + asy_ice(iBand) + asy_rain(iBand) + asy_snow(iBand) + ! Delta-scale + asyw = asy_cld(iCol,iLay,iBand)/max(0._kind_phys, ssa_cld(iCol,iLay,iBand)) + ssaw = min(1._kind_phys-0.000001, ssa_cld(iCol,iLay,iBand)/tau_cld(iCol,iLay,iBand)) + za1 = asyw * asyw + za2 = ssaw * za1 + tau_cld(iCol,iLay,iBand) = (1._kind_phys - za2) * tau_cld(iCol,iLay,iBand) + ssa_cld(iCol,iLay,iBand) = (ssaw - za2) / (1._kind_phys - za2) + asy_cld(iCol,iLay,iBand) = (asyw - za2/ssaw)/(1-za2/ssaw) + enddo ! Loop over SW bands + endif ! END sum cloudy properties + ! + enddo ! Loop over layers + enddo ! Loop over columns + endif + end subroutine rrtmg_sw_cloud_optics + + ! ####################################################################################### + ! SUBROUTINE mcica_subcol_sw + ! ###################################################################################### + subroutine mcica_subcol_sw(ncol, nlay, ngpts, cld_frac, icseed, dzlyr, de_lgth, & + cld_frac_mcica) + ! Inputs + integer,intent(in) :: & + ncol, & ! Number of horizontal gridpoints + nlay, & ! Number of vertical layers + ngpts ! Number of spectral g-points + integer,dimension(ncol),intent(in) :: & + icseed ! Permutation seed for each column. + real(kind_phys), dimension(ncol), intent(in) :: & + de_lgth ! Cloud decorrelation length (km) + real(kind_phys), dimension(ncol,nlay), intent(in) :: & + cld_frac, & ! Cloud-fraction + dzlyr ! Layer thinkness (km) + ! Outputs + logical,dimension(ncol,nlay,ngpts),intent(out) :: & + cld_frac_mcica + ! Local variables + type(random_stat) :: stat + integer :: icol,n,k,k1 + real(kind_phys) :: tem1 + real(kind_phys),dimension(ngpts) :: rand1D + real(kind_phys),dimension(nlay*ngpts) :: rand2D + real(kind_phys),dimension(ngpts,nlay) :: cdfunc,cdfun2 + real(kind_phys),dimension(nlay) :: fac_lcf + logical,dimension(ngpts,nlay) :: lcloudy + + ! Loop over all columns + do icol=1,ncol + ! Call random_setseed() to advance random number generator by "icseed" values. + call random_setseed(icseed(icol),stat) + + ! ################################################################################### + ! Sub-column set up according to overlapping assumption: + ! - For random overlap, pick a random value at every level + ! - For max-random overlap, pick a random value at every level + ! - For maximum overlap, pick same random numebr at every level + ! ################################################################################### + select case ( iovrsw ) + ! ################################################################################### + ! 0) Random overlap + ! ################################################################################### + case( 0 ) + call random_number(rand2D,stat) + k1 = 0 + do n = 1, ngpts + do k = 1, nlay + k1 = k1 + 1 + cdfunc(n,k) = rand2d(k1) + enddo + enddo + + ! ################################################################################### + ! 1) Maximum-random overlap + ! ################################################################################### + case(1) + call random_number(rand2D,stat) + k1 = 0 + do n = 1, ngpts + do k = 1, nlay + k1 = k1 + 1 + cdfunc(n,k) = rand2d(k1) + enddo + enddo + + ! First pick a random number for bottom (or top) layer. + ! then walk up the column: (aer's code) + ! if layer below is cloudy, use the same rand num in the layer below + ! if layer below is clear, use a new random number + do k = 2, nlay + k1 = k - 1 + tem1 = 1._kind_phys - cld_frac(icol,k1) + do n = 1, ngpts + if ( cdfunc(n,k1) > tem1 ) then + cdfunc(n,k) = cdfunc(n,k1) + else + cdfunc(n,k) = cdfunc(n,k) * tem1 + endif + enddo + enddo + + ! ################################################################################### + ! 2) Maximum overlap + ! ################################################################################### + case(2) + call random_number(rand1d,stat) + do n = 1, ngpts + tem1 = rand1d(n) + do k = 1, nlay + cdfunc(n,k) = tem1 + enddo + enddo + + ! ################################################################################### + ! 3) Decorrelation length + ! ################################################################################### + case(3) + ! Compute overlapping factors based on layer midpoint distances and decorrelation + ! depths + do k = nlay, 2, -1 + fac_lcf(k) = exp( -0.5 * (dzlyr(iCol,k)+dzlyr(iCol,k-1)) / de_lgth(iCol) ) + enddo + + ! Setup 2 sets of random numbers + call random_number ( rand2d, stat ) + k1 = 0 + do k = 1, nlay + do n = 1, ngpts + k1 = k1 + 1 + cdfunc(n,k) = rand2d(k1) + enddo + enddo + ! + call random_number ( rand2d, stat ) + k1 = 0 + do k = 1, nlay + do n = 1, ngpts + k1 = k1 + 1 + cdfun2(n,k) = rand2d(k1) + enddo + enddo + + ! Then working from the top down: + ! if a random number (from an independent set -cdfun2) is smaller then the + ! scale factor: use the upper layer's number, otherwise use a new random + ! number (keep the original assigned one). + do k = nlay-1, 1, -1 + k1 = k + 1 + do n = 1, ngpts + if ( cdfun2(n,k) <= fac_lcf(k1) ) then + cdfunc(n,k) = cdfunc(n,k1) + endif + enddo + enddo + + end select + + ! ################################################################################### + ! Generate subcolumn cloud mask (0/1 for clear/cloudy) + ! ################################################################################### + do k = 1, nlay + tem1 = 1._kind_phys - cld_frac(icol,k) + do n = 1, ngpts + lcloudy(n,k) = cdfunc(n,k) >= tem1 + if (lcloudy(n,k)) then + cld_frac_mcica(icol,k,n) = .true. + else + cld_frac_mcica(icol,k,n) = .false. + endif + enddo + enddo + enddo ! END LOOP OVER COLUMNS + end subroutine mcica_subcol_sw +end module mo_rrtmg_sw_cloud_optics diff --git a/physics/rrtmgp_aux.F90 b/physics/rrtmgp_aux.F90 deleted file mode 100644 index 34c885ce4..000000000 --- a/physics/rrtmgp_aux.F90 +++ /dev/null @@ -1,1370 +0,0 @@ -module rrtmgp_aux - use machine, only: kind_phys - use GFS_typedefs, only: GFS_control_type - use mo_rte_kind, only: wl - use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp - use mo_cloud_optics, only: ty_cloud_optics - use mo_gas_concentrations, only: ty_gas_concs - use netcdf - - ! Parameters - integer,parameter :: nGases = 6 - character(len=3),parameter, dimension(nGases) :: & - active_gases = (/ 'h2o', 'co2', 'o3 ', 'n2o', 'ch4', 'o2 '/) - integer :: nrghice_lw, nrghice_sw, ipsdlw0, ipsdsw0 - -contains - - subroutine rrtmgp_aux_init() - end subroutine rrtmgp_aux_init - subroutine rrtmgp_aux_run() - end subroutine rrtmgp_aux_run - subroutine rrtmgp_aux_finalize() - end subroutine rrtmgp_aux_finalize - - ! ######################################################################################### - ! SUBROUTINE rrtmgp_lw_cloud_optics_init() - ! ######################################################################################### - subroutine lw_cloud_optics_init(Model, mpicomm, mpirank, mpiroot, lw_cloud_props, & - errmsg, errflg) -#ifdef MPI - use mpi -#endif - - ! Inputs - type(GFS_control_type), intent(in) :: & - Model ! DDT containing model control parameters - integer,intent(in) :: & - mpicomm, & ! MPI communicator - mpirank, & ! Current MPI rank - mpiroot ! Master MPI rank - type(ty_cloud_optics),intent(inout) :: & - lw_cloud_props - - ! Outputs - character(len=*), intent(out) :: & - errmsg ! Error message - integer, intent(out) :: & - errflg ! Error code - - ! Variables that will be passed to cloud_optics%load() - real(kind_phys) :: & - radliq_lwr, & ! used by RRTGMP cloud optics - radliq_upr, & ! used by RRTGMP cloud optics - radliq_fac, & ! used by RRTGMP cloud optics - radice_lwr, & ! used by RRTGMP cloud optics - radice_upr, & ! used by RRTGMP cloud optics - radice_fac ! used by RRTGMP cloud optics - real(kind_phys), dimension(:), allocatable :: & - pade_sizereg_extliq, & ! used by RRTGMP cloud optics - pade_sizereg_ssaliq, & ! used by RRTGMP cloud optics - pade_sizereg_asyliq, & ! used by RRTGMP cloud optics - pade_sizereg_extice, & ! used by RRTGMP cloud optics - pade_sizereg_ssaice, & ! used by RRTGMP cloud optics - pade_sizereg_asyice ! used by RRTGMP cloud optics - real(kind_phys), dimension(:,:), allocatable :: & - lut_extliq, & ! used by RRTGMP cloud optics - lut_ssaliq, & ! used by RRTGMP cloud optics - lut_asyliq, & ! used by RRTGMP cloud optics - band_lims_cldy ! used by RRTGMP cloud optics - - real(kind_phys), dimension(:,:,:), allocatable :: & - lut_extice, & ! used by RRTGMP cloud optics - lut_ssaice, & ! used by RRTGMP cloud optics - lut_asyice, & ! used by RRTGMP cloud optics - pade_extliq, & ! used by RRTGMP cloud optics - pade_ssaliq, & ! used by RRTGMP cloud optics - pade_asyliq ! used by RRTGMP cloud optics - real(kind_phys), dimension(:,:,:,:), allocatable :: & - pade_extice, & ! used by RRTGMP cloud optics - pade_ssaice, & ! used by RRTGMP cloud optics - pade_asyice ! used by RRTGMP cloud optics - ! Dimensions - integer :: & - nbandLWcldy, & ! used by RRTGMP cloud optics - nsize_liq, & ! used by RRTGMP cloud optics - nsize_ice, & ! used by RRTGMP cloud optics - nsizereg, & ! used by RRTGMP cloud optics - ncoeff_ext, & ! used by RRTGMP cloud optics - ncoeff_ssa_g, & ! used by RRTGMP cloud optics - nbound, & ! used by RRTGMP cloud optics - npairsLWcldy ! used by RRTGMP cloud optics - - ! Local variables - integer :: dimID,varID,status,igpt,iGas,ij,ierr,ncid_lw_clds - integer,dimension(:),allocatable :: temp1,temp2,temp3,temp4,temp_log_array1,& - temp_log_array2, temp_log_array3, temp_log_array4 - character(len=264) :: lw_cloud_props_file - integer,parameter :: max_strlen=256 - - ! Initialize - errmsg = '' - errflg = 0 - - ! Filenames are set in the gfs_physics_nml (scm/src/GFS_typedefs.F90) - lw_cloud_props_file = trim(Model%rrtmgp_root)//trim(Model%lw_file_clouds) - ! Read dimensions for k-distribution fields (only on master processor(0)) - if (mpirank .eq. mpiroot) then - if(nf90_open(trim(lw_cloud_props_file), NF90_WRITE, ncid_lw_clds) == NF90_NOERR) then - status = nf90_inq_dimid(ncid_lw_clds, 'nband', dimid) - status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=nbandLWcldy) - status = nf90_inq_dimid(ncid_lw_clds, 'nrghice', dimid) - status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=nrghice_lw) - status = nf90_inq_dimid(ncid_lw_clds, 'nsize_liq', dimid) - status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=nsize_liq) - status = nf90_inq_dimid(ncid_lw_clds, 'nsize_ice', dimid) - status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=nsize_ice) - status = nf90_inq_dimid(ncid_lw_clds, 'nsizereg', dimid) - status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=nsizereg) - status = nf90_inq_dimid(ncid_lw_clds, 'ncoeff_ext', dimid) - status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=ncoeff_ext) - status = nf90_inq_dimid(ncid_lw_clds, 'ncoeff_ssa_g', dimid) - status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=ncoeff_ssa_g) - status = nf90_inq_dimid(ncid_lw_clds, 'nbound', dimid) - status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=nbound) - status = nf90_inq_dimid(ncid_lw_clds, 'pair', dimid) - status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=npairsLWcldy) - status = nf90_close(ncid_lw_clds) - endif - endif - - ! Broadcast dimensions to all processors -#ifdef MPI - if (Model%rrtmgp_cld_optics .eq. 1 .or. Model%rrtmgp_cld_optics .eq. 2) then - call MPI_BCAST(nbandLWcldy, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nrghice_lw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nsize_liq, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nsize_ice, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nsizereg, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(ncoeff_ext, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(ncoeff_ssa_g, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nbound, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(npairsLWcldy, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - endif -#endif - - if (Model%rrtmgp_cld_optics .eq. 1) then - allocate(lut_extliq(nsize_liq, nBandLWcldy)) - allocate(lut_ssaliq(nsize_liq, nBandLWcldy)) - allocate(lut_asyliq(nsize_liq, nBandLWcldy)) - allocate(lut_extice(nsize_ice, nBandLWcldy, nrghice_lw)) - allocate(lut_ssaice(nsize_ice, nBandLWcldy, nrghice_lw)) - allocate(lut_asyice(nsize_ice, nBandLWcldy, nrghice_lw)) - allocate(band_lims_cldy(2, nBandLWcldy)) - endif - if (Model%rrtmgp_cld_optics .eq. 2) then - allocate(pade_extliq(nbandLWcldy, nsizereg, ncoeff_ext )) - allocate(pade_ssaliq(nbandLWcldy, nsizereg, ncoeff_ssa_g)) - allocate(pade_asyliq(nbandLWcldy, nsizereg, ncoeff_ssa_g)) - allocate(pade_extice(nbandLWcldy, nsizereg, ncoeff_ext, nrghice_lw)) - allocate(pade_ssaice(nbandLWcldy, nsizereg, ncoeff_ssa_g, nrghice_lw)) - allocate(pade_asyice(nbandLWcldy, nsizereg, ncoeff_ssa_g, nrghice_lw)) - allocate(pade_sizereg_extliq(nbound)) - allocate(pade_sizereg_ssaliq(nbound)) - allocate(pade_sizereg_asyliq(nbound)) - allocate(pade_sizereg_extice(nbound)) - allocate(pade_sizereg_ssaice(nbound)) - allocate(pade_sizereg_asyice(nbound)) - allocate(band_lims_cldy(2,nbandLWcldy)) - endif - - ! On master processor, allocate space, read in fields, broadcast to all processors - if (mpirank .eq. mpiroot) then - ! - if (Model%rrtmgp_cld_optics .eq. 1) then - ! - if(nf90_open(trim(lw_cloud_props_file), NF90_WRITE, ncid_lw_clds) == NF90_NOERR) then - status = nf90_inq_varid(ncid_lw_clds,'radliq_lwr',varID) - status = nf90_get_var(ncid_lw_clds,varID,radliq_lwr) - status = nf90_inq_varid(ncid_lw_clds,'radliq_upr',varID) - status = nf90_get_var(ncid_lw_clds,varID,radliq_upr) - status = nf90_inq_varid(ncid_lw_clds,'radliq_fac',varID) - status = nf90_get_var(ncid_lw_clds,varID,radliq_fac) - status = nf90_inq_varid(ncid_lw_clds,'radice_lwr',varID) - status = nf90_get_var(ncid_lw_clds,varID,radice_lwr) - status = nf90_inq_varid(ncid_lw_clds,'radice_upr',varID) - status = nf90_get_var(ncid_lw_clds,varID,radice_upr) - status = nf90_inq_varid(ncid_lw_clds,'radice_fac',varID) - status = nf90_get_var(ncid_lw_clds,varID,radice_fac) - status = nf90_inq_varid(ncid_lw_clds,'lut_extliq',varID) - status = nf90_get_var(ncid_lw_clds,varID,lut_extliq) - status = nf90_inq_varid(ncid_lw_clds,'lut_ssaliq',varID) - status = nf90_get_var(ncid_lw_clds,varID,lut_ssaliq) - status = nf90_inq_varid(ncid_lw_clds,'lut_asyliq',varID) - status = nf90_get_var(ncid_lw_clds,varID,lut_asyliq) - status = nf90_inq_varid(ncid_lw_clds,'lut_extice',varID) - status = nf90_get_var(ncid_lw_clds,varID,lut_extice) - status = nf90_inq_varid(ncid_lw_clds,'lut_ssaice',varID) - status = nf90_get_var(ncid_lw_clds,varID,lut_ssaice) - status = nf90_inq_varid(ncid_lw_clds,'lut_asyice',varID) - status = nf90_get_var(ncid_lw_clds,varID,lut_asyice) - status = nf90_inq_varid(ncid_lw_clds,'bnd_limits_wavenumber',varID) - status = nf90_get_var(ncid_lw_clds,varID,band_lims_cldy) - status = nf90_close(ncid_lw_clds) - endif - endif - ! - if (Model%rrtmgp_cld_optics .eq. 2) then - ! - if(nf90_open(trim(lw_cloud_props_file), NF90_WRITE, ncid_lw_clds) == NF90_NOERR) then - status = nf90_inq_varid(ncid_lw_clds,'radliq_lwr',varID) - status = nf90_get_var(ncid_lw_clds,varID,radliq_lwr) - status = nf90_inq_varid(ncid_lw_clds,'radliq_upr',varID) - status = nf90_get_var(ncid_lw_clds,varID,radliq_upr) - status = nf90_inq_varid(ncid_lw_clds,'radliq_fac',varID) - status = nf90_get_var(ncid_lw_clds,varID,radliq_fac) - status = nf90_inq_varid(ncid_lw_clds,'radice_lwr',varID) - status = nf90_get_var(ncid_lw_clds,varID,radice_lwr) - status = nf90_inq_varid(ncid_lw_clds,'radice_upr',varID) - status = nf90_get_var(ncid_lw_clds,varID,radice_upr) - status = nf90_inq_varid(ncid_lw_clds,'radice_fac',varID) - status = nf90_get_var(ncid_lw_clds,varID,radice_fac) - status = nf90_inq_varid(ncid_lw_clds,'pade_extliq',varID) - status = nf90_get_var(ncid_lw_clds,varID,pade_extliq) - status = nf90_inq_varid(ncid_lw_clds,'pade_ssaliq',varID) - status = nf90_get_var(ncid_lw_clds,varID,pade_ssaliq) - status = nf90_inq_varid(ncid_lw_clds,'pade_asyliq',varID) - status = nf90_get_var(ncid_lw_clds,varID,pade_asyliq) - status = nf90_inq_varid(ncid_lw_clds,'pade_extice',varID) - status = nf90_get_var(ncid_lw_clds,varID,pade_extice) - status = nf90_inq_varid(ncid_lw_clds,'pade_ssaice',varID) - status = nf90_get_var(ncid_lw_clds,varID,pade_ssaice) - status = nf90_inq_varid(ncid_lw_clds,'pade_asyice',varID) - status = nf90_get_var(ncid_lw_clds,varID,pade_asyice) - status = nf90_inq_varid(ncid_lw_clds,'pade_sizreg_extliq',varID) - status = nf90_get_var(ncid_lw_clds,varID,pade_sizereg_extliq) - status = nf90_inq_varid(ncid_lw_clds,'pade_sizreg_ssaliq',varID) - status = nf90_get_var(ncid_lw_clds,varID,pade_sizereg_ssaliq) - status = nf90_inq_varid(ncid_lw_clds,'pade_sizreg_asyliq',varID) - status = nf90_get_var(ncid_lw_clds,varID,pade_sizereg_asyliq) - status = nf90_inq_varid(ncid_lw_clds,'pade_sizreg_extice',varID) - status = nf90_get_var(ncid_lw_clds,varID,pade_sizereg_extice) - status = nf90_inq_varid(ncid_lw_clds,'pade_sizreg_ssaice',varID) - status = nf90_get_var(ncid_lw_clds,varID,pade_sizereg_ssaice) - status = nf90_inq_varid(ncid_lw_clds,'pade_sizreg_asyice',varID) - status = nf90_get_var(ncid_lw_clds,varID,pade_sizereg_asyice) - status = nf90_inq_varid(ncid_lw_clds,'bnd_limits_wavenumber',varID) - status = nf90_get_var(ncid_lw_clds,varID,band_lims_cldy) - status = nf90_close(ncid_lw_clds) - endif - endif - endif - - ! Broadcast arrays to all processors -#ifdef MPI - if (Model%rrtmgp_cld_optics .eq. 1) then - call MPI_BCAST(radliq_lwr, size(radliq_lwr), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(radliq_upr, size(radliq_upr), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(radliq_fac, size(radliq_fac), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(radice_lwr, size(radice_lwr), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(radice_upr, size(radice_upr), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(radice_fac, size(radice_fac), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_extliq, size(lut_extliq), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_ssaliq, size(lut_ssaliq), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_asyliq, size(lut_asyliq), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_extice, size(lut_extice), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_ssaice, size(lut_ssaice), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_asyice, size(lut_asyice), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(band_lims_cldy), size(band_lims_cldy), kind_phys, mpiroot, mpicomm, ierr) - endif - if (Model%rrtmgp_cld_optics .eq. 2) then - call MPI_BCAST(pade_extliq, size(pade_extliq), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_ssaliq, size(pade_ssaliq), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_asyliq, size(pade_asyliq), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_extice, size(pade_extice), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_ssaice, size(pade_ssaice), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_asyice, size(pade_asyice), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_extliq), size(pade_sizereg_extliq), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_ssaliq), size(pade_sizereg_ssaliq), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_asyliq), size(pade_sizereg_asyliq), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_extice), size(pade_sizereg_extice), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_ssaice), size(pade_sizereg_ssaice), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_asyice), size(pade_sizereg_asyice), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(band_lims_cldy), size(band_lims_cldy), kind_phys, mpiroot, mpicomm, ierr) - endif -#endif - - ! Load tables data for RRTGMP cloud-optics - if (Model%rrtmgp_cld_optics .eq. 1) then - call check_error_msg('lw_cloud_optics_init',lw_cloud_props%set_ice_roughness(nrghice_lw)) - call check_error_msg('lw_cloud_optics_init',lw_cloud_props%load(band_lims_cldy, & - radliq_lwr, radliq_upr, radliq_fac, radice_lwr, radice_upr, radice_fac, & - lut_extliq, lut_ssaliq, lut_asyliq, lut_extice, lut_ssaice, lut_asyice)) - endif - if (Model%rrtmgp_cld_optics .eq. 2) then - call check_error_msg('lw_cloud_optics_init',lw_cloud_props%set_ice_roughness(nrghice_lw)) - call check_error_msg('lw_cloud_optics_init',lw_cloud_props%load(band_lims_cldy, & - pade_extliq, pade_ssaliq, pade_asyliq, pade_extice, pade_ssaice, & - pade_asyice, pade_sizereg_extliq, pade_sizereg_ssaliq, pade_sizereg_asyliq,& - pade_sizereg_extice, pade_sizereg_ssaice, pade_sizereg_asyice)) - endif - end subroutine lw_cloud_optics_init - - ! ######################################################################################### - ! SUBROUTINE rrtmgp_lw_gas_optics_init() - ! ######################################################################################### - subroutine lw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, lw_gas_props, & - errmsg, errflg) - use netcdf - -#ifdef MPI - use mpi -#endif - - ! Inputs - type(GFS_control_type), intent(in) :: & - Model ! DDT containing model control parameters - integer,intent(in) :: & - mpicomm, & ! MPI communicator - mpirank, & ! Current MPI rank - mpiroot ! Master MPI rank - type(ty_gas_optics_rrtmgp),intent(inout) :: & - lw_gas_props - - ! Outputs - character(len=*), intent(out) :: & - errmsg ! Error message - integer, intent(out) :: & - errflg ! Error code - - ! Variables that will be passed to gas_optics%load() - type(ty_gas_concs) :: & - gas_concentrations - integer, dimension(:), allocatable :: & - kminor_start_lower, & ! used by RRTGMP gas optics - kminor_start_upper ! used by RRTGMP gas optics - integer, dimension(:,:), allocatable :: & - band2gpt, & ! used by RRTGMP gas optics - minor_limits_gpt_lower, & ! used by RRTGMP gas optics - minor_limits_gpt_upper ! used by RRTGMP gas optics - integer, dimension(:,:,:), allocatable :: & - key_species ! used by RRTGMP gas optics - real(kind_phys) :: & - press_ref_trop, & ! used by RRTGMP gas optics - temp_ref_p, & ! used by RRTGMP gas optics - temp_ref_t ! used by RRTGMP gas optics - real(kind_phys), dimension(:), allocatable :: & - press_ref, & ! used by RRTGMP gas optics - temp_ref ! used by RRTGMP gas optics - real(kind_phys), dimension(:,:), allocatable :: & - band_lims, & ! used by RRTGMP gas optics - totplnk ! used by RRTGMP gas optics - real(kind_phys), dimension(:,:,:), allocatable :: & - vmr_ref, & ! used by RRTGMP gas optics - kminor_lower, & ! used by RRTGMP gas optics - kminor_upper, & ! used by RRTGMP gas optics - rayl_lower, & ! used by RRTGMP gas optics - rayl_upper ! used by RRTGMP gas optics - real(kind_phys), dimension(:,:,:,:), allocatable :: & - kmajor, & ! used by RRTGMP gas optics - planck_frac ! used by RRTGMP gas optics - character(len=32), dimension(:), allocatable :: & - gas_names, & ! used by RRTGMP gas optics - gas_minor, & ! used by RRTGMP gas optics - identifier_minor, & ! used by RRTGMP gas optics - minor_gases_lower, & ! used by RRTGMP gas optics - minor_gases_upper, & ! used by RRTGMP gas optics - scaling_gas_lower, & ! used by RRTGMP gas optics - scaling_gas_upper ! used by RRTGMP gas optics - logical(wl), dimension(:), allocatable :: & - minor_scales_with_density_lower, & ! used by RRTGMP gas optics - minor_scales_with_density_upper, & ! used by RRTGMP gas optics - scale_by_complement_lower, & ! used by RRTGMP gas optics - scale_by_complement_upper ! used by RRTGMP gas optics - - ! Dimensions (to be broadcast across all processors) - integer :: & - ntemps, & ! used by RRTGMP gas optics - npress, & ! used by RRTGMP gas optics - nabsorbers, & ! used by RRTGMP gas optics - nextrabsorbers, & ! used by RRTGMP gas optics - nminorabsorbers, & ! used by RRTGMP gas optics - nmixingfracs, & ! used by RRTGMP gas optics - nlayers, & ! used by RRTGMP gas optics - nbnds, & ! used by RRTGMP gas optics - ngpts, & ! used by RRTGMP gas optics - npairs, & ! used by RRTGMP gas optics - ninternalSourcetemps, & ! used by RRTGMP gas optics - nminor_absorber_intervals_lower, & ! used by RRTGMP gas optics - nminor_absorber_intervals_upper, & ! used by RRTGMP gas optics - ncontributors_lower, & ! used by RRTGMP gas optics - ncontributors_upper ! used by RRTGMP gas optics - - ! Local variables - integer :: ncid_lw,dimID,varID,status,igpt,iGas,ij,ierr - integer,dimension(:),allocatable :: temp1,temp2,temp3,temp4,temp_log_array1,& - temp_log_array2, temp_log_array3, temp_log_array4 - character(len=264) :: lw_gas_props_file - integer,parameter :: max_strlen=256 - - ! Initialize - errmsg = '' - errflg = 0 - - ! Filenames are set in the gfs_physics_nml (scm/src/GFS_typedefs.F90) - lw_gas_props_file = trim(Model%rrtmgp_root)//trim(Model%lw_file_gas) - - ! Read dimensions for k-distribution fields (only on master processor(0)) - if (mpirank .eq. mpiroot) then - if(nf90_open(trim(lw_gas_props_file), NF90_WRITE, ncid_lw) .eq. NF90_NOERR) then - status = nf90_inq_dimid(ncid_lw, 'temperature', dimid) - status = nf90_inquire_dimension(ncid_lw, dimid, len=ntemps) - status = nf90_inq_dimid(ncid_lw, 'pressure', dimid) - status = nf90_inquire_dimension(ncid_lw, dimid, len=npress) - status = nf90_inq_dimid(ncid_lw, 'absorber', dimid) - status = nf90_inquire_dimension(ncid_lw, dimid, len=nabsorbers) - status = nf90_inq_dimid(ncid_lw, 'minor_absorber', dimid) - status = nf90_inquire_dimension(ncid_lw, dimid, len=nminorabsorbers) - status = nf90_inq_dimid(ncid_lw, 'absorber_ext', dimid) - status = nf90_inquire_dimension(ncid_lw, dimid, len=nextrabsorbers) - status = nf90_inq_dimid(ncid_lw, 'mixing_fraction', dimid) - status = nf90_inquire_dimension(ncid_lw, dimid, len=nmixingfracs) - status = nf90_inq_dimid(ncid_lw, 'atmos_layer', dimid) - status = nf90_inquire_dimension(ncid_lw, dimid, len=nlayers) - status = nf90_inq_dimid(ncid_lw, 'bnd', dimid) - status = nf90_inquire_dimension(ncid_lw, dimid, len=nbnds) - status = nf90_inq_dimid(ncid_lw, 'gpt', dimid) - status = nf90_inquire_dimension(ncid_lw, dimid, len=ngpts) - status = nf90_inq_dimid(ncid_lw, 'pair', dimid) - status = nf90_inquire_dimension(ncid_lw, dimid, len=npairs) - status = nf90_inq_dimid(ncid_lw, 'contributors_lower', dimid) - status = nf90_inquire_dimension(ncid_lw, dimid, len=ncontributors_lower) - status = nf90_inq_dimid(ncid_lw, 'contributors_upper', dimid) - status = nf90_inquire_dimension(ncid_lw, dimid, len=ncontributors_upper) - status = nf90_inq_dimid(ncid_lw, 'minor_absorber_intervals_lower', dimid) - status = nf90_inquire_dimension(ncid_lw, dimid, len=nminor_absorber_intervals_lower) - status = nf90_inq_dimid(ncid_lw, 'minor_absorber_intervals_upper', dimid) - status = nf90_inquire_dimension(ncid_lw, dimid, len=nminor_absorber_intervals_upper) - status = nf90_inq_dimid(ncid_lw, 'temperature_Planck', dimid) - status = nf90_inquire_dimension(ncid_lw, dimid, len=ninternalSourcetemps) - status = nf90_close(ncid_lw) - endif - endif - - ! Broadcast dimensions to all processors -#ifdef MPI - call MPI_BCAST(ntemps, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(npress, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nminorabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nextraabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nmixingfracs, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nlayers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nbnds, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(ngpts, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(npairs, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(ncontributors_lower, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(ncontributors_upper, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nminor_absorber_intervals_lower, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nminor_absorber_intervals_upper, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(ninternalSourcetemps, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -#endif - - !if (mpirank .eq. mpiroot) then - ! Allocate space for arrays - allocate(gas_names(nabsorbers)) - allocate(scaling_gas_lower(nminor_absorber_intervals_lower)) - allocate(scaling_gas_upper(nminor_absorber_intervals_upper)) - allocate(gas_minor(nminorabsorbers)) - allocate(identifier_minor(nminorabsorbers)) - allocate(minor_gases_lower(nminor_absorber_intervals_lower)) - allocate(minor_gases_upper(nminor_absorber_intervals_upper)) - allocate(minor_limits_gpt_lower(npairs,nminor_absorber_intervals_lower)) - allocate(minor_limits_gpt_upper(npairs,nminor_absorber_intervals_upper)) - allocate(band2gpt(2,nbnds)) - allocate(key_species(2,nlayers,nbnds)) - allocate(band_lims(2,nbnds)) - allocate(press_ref(npress)) - allocate(temp_ref(ntemps)) - allocate(vmr_ref(nlayers, nextrabsorbers, ntemps)) - allocate(kminor_lower(ncontributors_lower, nmixingfracs, ntemps)) - allocate(kmajor(ngpts, nmixingfracs, npress+1, ntemps)) - allocate(kminor_start_lower(nminor_absorber_intervals_lower)) - allocate(kminor_upper(ncontributors_upper, nmixingfracs, ntemps)) - allocate(kminor_start_upper(nminor_absorber_intervals_upper)) - allocate(minor_scales_with_density_lower(nminor_absorber_intervals_lower)) - allocate(minor_scales_with_density_upper(nminor_absorber_intervals_upper)) - allocate(scale_by_complement_lower(nminor_absorber_intervals_lower)) - allocate(scale_by_complement_upper(nminor_absorber_intervals_upper)) - allocate(temp1(nminor_absorber_intervals_lower)) - allocate(temp2(nminor_absorber_intervals_upper)) - allocate(temp3(nminor_absorber_intervals_lower)) - allocate(temp4(nminor_absorber_intervals_upper)) - allocate(totplnk(ninternalSourcetemps, nbnds)) - allocate(planck_frac(ngpts, nmixingfracs, npress+1, ntemps)) - - if (mpirank .eq. mpiroot) then - ! Read in fields from file - if(nf90_open(trim(lw_gas_props_file), NF90_WRITE, ncid_lw) .eq. NF90_NOERR) then - status = nf90_inq_varid(ncid_lw,'gas_names',varID) - status = nf90_get_var(ncid_lw,varID,gas_names) - ! - status = nf90_inq_varid(ncid_lw,'scaling_gas_lower',varID) - status = nf90_get_var(ncid_lw,varID,scaling_gas_lower) - ! - status = nf90_inq_varid(ncid_lw,'scaling_gas_upper',varID) - status = nf90_get_var(ncid_lw,varID,scaling_gas_upper) - ! - status = nf90_inq_varid(ncid_lw,'gas_minor',varID) - status = nf90_get_var(ncid_lw,varID,gas_minor) - ! - status = nf90_inq_varid(ncid_lw,'identifier_minor',varID) - status = nf90_get_var(ncid_lw,varID,identifier_minor) - ! - status = nf90_inq_varid(ncid_lw,'minor_gases_lower',varID) - status = nf90_get_var(ncid_lw,varID,minor_gases_lower) - ! - status = nf90_inq_varid(ncid_lw,'minor_gases_upper',varID) - status = nf90_get_var(ncid_lw,varID,minor_gases_upper) - ! - status = nf90_inq_varid(ncid_lw,'minor_limits_gpt_lower',varID) - status = nf90_get_var(ncid_lw,varID,minor_limits_gpt_lower) - ! - status = nf90_inq_varid(ncid_lw,'minor_limits_gpt_upper',varID) - status = nf90_get_var(ncid_lw,varID,minor_limits_gpt_upper) - ! - status = nf90_inq_varid(ncid_lw,'bnd_limits_gpt',varID) - status = nf90_get_var(ncid_lw,varID,band2gpt) - ! - status = nf90_inq_varid(ncid_lw,'key_species',varID) - status = nf90_get_var(ncid_lw,varID,key_species) - ! - status = nf90_inq_varid(ncid_lw,'bnd_limits_wavenumber',varID) - status = nf90_get_var(ncid_lw,varID,band_lims) - ! - status = nf90_inq_varid(ncid_lw,'press_ref',varID) - status = nf90_get_var(ncid_lw,varID,press_ref) - ! - status = nf90_inq_varid(ncid_lw,'temp_ref',varID) - status = nf90_get_var(ncid_lw,varID,temp_ref) - ! - status = nf90_inq_varid(ncid_lw,'absorption_coefficient_ref_P',varID) - status = nf90_get_var(ncid_lw,varID,temp_ref_p) - ! - status = nf90_inq_varid(ncid_lw,'absorption_coefficient_ref_T',varID) - status = nf90_get_var(ncid_lw,varID,temp_ref_t) - ! - status = nf90_inq_varid(ncid_lw,'press_ref_trop',varID) - status = nf90_get_var(ncid_lw,varID,press_ref_trop) - ! - status = nf90_inq_varid(ncid_lw,'kminor_lower',varID) - status = nf90_get_var(ncid_lw,varID,kminor_lower) - ! - status = nf90_inq_varid(ncid_lw,'kminor_upper',varID) - status = nf90_get_var(ncid_lw,varID,kminor_upper) - ! - status = nf90_inq_varid(ncid_lw,'vmr_ref',varID) - status = nf90_get_var(ncid_lw,varID,vmr_ref) - ! - status = nf90_inq_varid(ncid_lw,'kmajor',varID) - status = nf90_get_var(ncid_lw,varID,kmajor) - ! - status = nf90_inq_varid(ncid_lw,'kminor_start_lower',varID) - status = nf90_get_var(ncid_lw,varID,kminor_start_lower) - ! - status = nf90_inq_varid(ncid_lw,'kminor_start_upper',varID) - status = nf90_get_var(ncid_lw,varID,kminor_start_upper) - ! - status = nf90_inq_varid(ncid_lw,'totplnk',varID) - status = nf90_get_var(ncid_lw,varID,totplnk) - ! - status = nf90_inq_varid(ncid_lw,'plank_fraction',varID) - status = nf90_get_var(ncid_lw,varID,planck_frac) - - ! Logical fields are read in as integers and then converted to logicals. - status = nf90_inq_varid(ncid_lw,'minor_scales_with_density_lower',varID) - status = nf90_get_var(ncid_lw,varID,temp1) - minor_scales_with_density_lower(:) = .false. - where(temp1 .eq. 1) minor_scales_with_density_lower(:) = .true. - ! - status = nf90_inq_varid(ncid_lw,'minor_scales_with_density_upper',varID) - status = nf90_get_var(ncid_lw,varID,temp2) - minor_scales_with_density_upper(:) = .false. - where(temp2 .eq. 1) minor_scales_with_density_upper(:) = .true. - ! - status = nf90_inq_varid(ncid_lw,'scale_by_complement_lower',varID) - status = nf90_get_var(ncid_lw,varID,temp3) - scale_by_complement_lower(:) = .false. - where(temp3 .eq. 1) scale_by_complement_lower(:) = .true. - ! - status = nf90_inq_varid(ncid_lw,'scale_by_complement_upper',varID) - status = nf90_get_var(ncid_lw,varID,temp4) - scale_by_complement_upper(:) = .false. - where(temp4 .eq. 1) scale_by_complement_upper(:) = .true. - - ! Close - status = nf90_close(ncid_lw) - endif - endif - - ! Broadcast arrays to all processors -#ifdef MPI - call MPI_BCAST(minor_limits_gpt_upper, size(minor_limits_gpt_upper), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(minor_limits_gpt_lower, size(minor_limits_gpt_lower), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(kminor_start_upper, size(kminor_start_upper), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(kminor_start_lower, size(kminor_start_lower), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(key_species, size(key_species), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(band2gpt, size(band2gpt), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(band_lims, size(band_lims), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(press_ref, size(press_ref), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(temp_ref, size(temp_ref), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(kminor_lower, size(kminor_lower), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(kminor_upper, size(kminor_upper), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(scaling_gas_lower, size(scaling_gas_lower), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(scaling_gas_upper, size(scaling_gas_upper), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(vmr_ref, size(vmr_ref), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(kmajor, size(kmajor), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(temp_ref_p, 1, kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(temp_ref_t, 1, kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(press_ref_trop, 1, kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(totplnk, size(totplnk), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(planck_frac, size(planck_frac), kind_phys, mpiroot, mpicomm, ierr) - ! Character arrays - do ij=1,nabsorbers - call MPI_BCAST(gas_names(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) - enddo - do ij=1,nminorabsorbers - call MPI_BCAST(gas_minor(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) - call MPI_BCAST(identifier_minor(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) - enddo - do ij=1,nminor_absorber_intervals_lower - call MPI_BCAST(minor_gases_lower(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) - enddo - do ij=1,nminor_absorber_intervals_upper - call MPI_BCAST(minor_gases_upper(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) - enddo - ! Logical arrays (First convert to integer-array, then broadcast) - ! - allocate(temp_log_array1(nminor_absorber_intervals_lower)) - where(minor_scales_with_density_lower) - temp_log_array1 = 1 - elsewhere - temp_log_array1 = 0 - end where - call MPI_BCAST(temp_log_array1, size(temp_log_array1), MPI_INTEGER, mpiroot, mpicomm, ierr) - ! - allocate(temp_log_array2(nminor_absorber_intervals_lower)) - where(scale_by_complement_lower) - temp_log_array2 = 1 - elsewhere - temp_log_array2 = 0 - end where - call MPI_BCAST(temp_log_array2, size(temp_log_array2), MPI_INTEGER, mpiroot, mpicomm, ierr) - ! - allocate(temp_log_array3(nminor_absorber_intervals_upper)) - where(minor_scales_with_density_upper) - temp_log_array3 = 1 - elsewhere - temp_log_array3 = 0 - end where - call MPI_BCAST(temp_log_array3, size(temp_log_array3), MPI_INTEGER, mpiroot, mpicomm, ierr) - ! - allocate(temp_log_array4(nminor_absorber_intervals_upper)) - where(scale_by_complement_upper) - temp_log_array4 = 1 - elsewhere - temp_log_array4 = 0 - end where - call MPI_BCAST(temp_log_array4, size(temp_log_array4), MPI_INTEGER, mpiroot, mpicomm, ierr) -#endif - - ! Initialize gas concentrations and gas optics class with data - do iGas=1,nGases - call check_error_msg('lw_gas_optics_init',gas_concentrations%set_vmr(active_gases(iGas), 0._kind_phys)) - enddo - call check_error_msg('lw_gas_optics_init',lw_gas_props%load(gas_concentrations, gas_names, & - key_species, band2gpt, band_lims, press_ref, press_ref_trop, temp_ref, temp_ref_p, & - temp_ref_t, vmr_ref, kmajor, kminor_lower, kminor_upper, gas_minor,identifier_minor, & - minor_gases_lower, minor_gases_upper, minor_limits_gpt_lower, minor_limits_gpt_upper, & - minor_scales_with_density_lower, minor_scales_with_density_upper, scaling_gas_lower, & - scaling_gas_upper, scale_by_complement_lower, scale_by_complement_upper, & - kminor_start_lower, kminor_start_upper, totplnk, planck_frac, rayl_lower, rayl_upper)) - - ! Set initial permutation seed for McICA, initially set to number of G-points - ipsdlw0 = lw_gas_props%get_ngpt() - - end subroutine lw_gas_optics_init - - ! ######################################################################################### - ! SUBROUTINE sw_gas_optics_init - ! ######################################################################################### - subroutine sw_gas_optics_init(Model,mpicomm, mpirank, mpiroot, sw_gas_props, & - errmsg, errflg) - use netcdf -#ifdef MPI - use mpi -#endif - - ! Inputs - type(GFS_control_type), intent(in) :: & - Model ! DDT containing model control parameters - integer,intent(in) :: & - mpicomm, & ! MPI communicator - mpirank, & ! Current MPI rank - mpiroot ! Master MPI rank - type(ty_gas_optics_rrtmgp),intent(inout) :: & - sw_gas_props - - ! Outputs - character(len=*), intent(out) :: & - errmsg ! Error message - integer, intent(out) :: & - errflg ! Error code - - ! Fields from the K-distribution files - ! Variables that will be passed to gas_optics%load() - type(ty_gas_concs) :: & - gas_concentrations - integer, dimension(:), allocatable :: & - kminor_start_lower_sw, & ! used by RRTGMP gas optics - kminor_start_upper_sw ! used by RRTGMP gas optics - integer, dimension(:,:), allocatable :: & - band2gpt_sw, & ! used by RRTGMP gas optics - minor_limits_gpt_lower_sw, & ! used by RRTGMP gas optics - minor_limits_gpt_upper_sw ! used by RRTGMP gas optics - integer, dimension(:,:,:), allocatable :: & - key_species_sw ! used by RRTGMP gas optics - real(kind_phys) :: & - press_ref_trop_sw, & ! used by RRTGMP gas optics - temp_ref_p_sw, & ! used by RRTGMP gas optics - temp_ref_t_sw ! used by RRTGMP gas optics - real(kind_phys), dimension(:), allocatable :: & - press_ref_sw, & ! used by RRTGMP gas optics - temp_ref_sw, & ! used by RRTGMP gas optics - solar_source_sw ! used by RRTGMP gas optics - real(kind_phys), dimension(:,:), allocatable :: & - band_lims_sw ! used by RRTGMP gas optics - - real(kind_phys), dimension(:,:,:), allocatable :: & - vmr_ref_sw, & ! used by RRTGMP gas optics - kminor_lower_sw, & ! used by RRTGMP gas optics - kminor_upper_sw, & ! used by RRTGMP gas optics - rayl_lower_sw, & ! used by RRTGMP gas optics - rayl_upper_sw ! used by RRTGMP gas optics - real(kind_phys), dimension(:,:,:,:), allocatable :: & - kmajor_sw ! used by RRTGMP gas optics - character(len=32), dimension(:), allocatable :: & - gas_names_sw, & ! used by RRTGMP gas optics - gas_minor_sw, & ! used by RRTGMP gas optics - identifier_minor_sw, & ! used by RRTGMP gas optics - minor_gases_lower_sw, & ! used by RRTGMP gas optics - minor_gases_upper_sw, & ! used by RRTGMP gas optics - scaling_gas_lower_sw, & ! used by RRTGMP gas optics - scaling_gas_upper_sw ! used by RRTGMP gas optics - logical(wl), dimension(:), allocatable :: & - minor_scales_with_density_lower_sw, & ! used by RRTGMP gas optics - minor_scales_with_density_upper_sw, & ! used by RRTGMP gas optics - scale_by_complement_lower_sw, & ! used by RRTGMP gas optics - scale_by_complement_upper_sw ! used by RRTGMP gas optics - ! Dimensions (to be broadcast across all processors) - integer :: & - ntemps_sw, & ! used by RRTGMP gas optics - npress_sw, & ! used by RRTGMP gas optics - nabsorbers_sw, & ! used by RRTGMP gas optics - nextrabsorbers_sw, & ! used by RRTGMP gas optics - nminorabsorbers_sw, & ! used by RRTGMP gas optics - nmixingfracs_sw, & ! used by RRTGMP gas optics - nlayers_sw, & ! used by RRTGMP gas optics - nbnds_sw, & ! used by RRTGMP gas optics - ngpts_sw, & ! used by RRTGMP gas optics - npairs_sw, & ! used by RRTGMP gas optics - nminor_absorber_intervals_lower_sw, & ! used by RRTGMP gas optics - nminor_absorber_intervals_upper_sw, & ! used by RRTGMP gas optics - ncontributors_lower_sw, & ! used by RRTGMP gas optics - ncontributors_upper_sw ! used by RRTGMP gas optics - - ! Local variables - integer :: status,ncid_sw,ncid_sw_clds,dimid,varID,ij,iGas - integer,dimension(:),allocatable :: temp1,temp2,temp3,temp4,temp_log_array1,& - temp_log_array2, temp_log_array3, temp_log_array4 - character(len=264) :: sw_gas_props_file - - ! Initialize - errmsg = '' - errflg = 0 - - ! Filenames are set in the gfs_physics_nml (scm/src/GFS_typedefs.F90) - sw_gas_props_file = trim(Model%rrtmgp_root)//trim(Model%sw_file_gas) - - ! Read dimensions for k-distribution fields (only on master processor(0)) - if (mpirank .eq. mpiroot) then - if(nf90_open(trim(sw_gas_props_file), NF90_WRITE, ncid_sw) .eq. NF90_NOERR) then - status = nf90_inq_dimid(ncid_sw, 'temperature', dimid) - status = nf90_inquire_dimension(ncid_sw, dimid, len=ntemps_sw) - status = nf90_inq_dimid(ncid_sw, 'pressure', dimid) - status = nf90_inquire_dimension(ncid_sw, dimid, len=npress_sw) - status = nf90_inq_dimid(ncid_sw, 'absorber', dimid) - status = nf90_inquire_dimension(ncid_sw, dimid, len=nabsorbers_sw) - status = nf90_inq_dimid(ncid_sw, 'minor_absorber', dimid) - status = nf90_inquire_dimension(ncid_sw, dimid, len=nminorabsorbers_sw) - status = nf90_inq_dimid(ncid_sw, 'absorber_ext', dimid) - status = nf90_inquire_dimension(ncid_sw, dimid, len=nextrabsorbers_sw) - status = nf90_inq_dimid(ncid_sw, 'mixing_fraction', dimid) - status = nf90_inquire_dimension(ncid_sw, dimid, len=nmixingfracs_sw) - status = nf90_inq_dimid(ncid_sw, 'atmos_layer', dimid) - status = nf90_inquire_dimension(ncid_sw, dimid, len=nlayers_sw) - status = nf90_inq_dimid(ncid_sw, 'bnd', dimid) - status = nf90_inquire_dimension(ncid_sw, dimid, len=nbnds_sw) - status = nf90_inq_dimid(ncid_sw, 'gpt', dimid) - status = nf90_inquire_dimension(ncid_sw, dimid, len=ngpts_sw) - status = nf90_inq_dimid(ncid_sw, 'pair', dimid) - status = nf90_inquire_dimension(ncid_sw, dimid, len=npairs_sw) - status = nf90_inq_dimid(ncid_sw, 'contributors_lower', dimid) - status = nf90_inquire_dimension(ncid_sw, dimid, len=ncontributors_lower_sw) - status = nf90_inq_dimid(ncid_sw, 'contributors_upper', dimid) - status = nf90_inquire_dimension(ncid_sw, dimid, len=ncontributors_upper_sw) - status = nf90_inq_dimid(ncid_sw, 'minor_absorber_intervals_lower', dimid) - status = nf90_inquire_dimension(ncid_sw, dimid, len=nminor_absorber_intervals_lower_sw) - status = nf90_inq_dimid(ncid_sw, 'minor_absorber_intervals_upper', dimid) - status = nf90_inquire_dimension(ncid_sw, dimid, len=nminor_absorber_intervals_upper_sw) - status = nf90_close(ncid_sw) - endif - endif - - ! Broadcast dimensions to all processors -#ifdef MPI - call MPI_BCAST(ntemps_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(npress_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nabsorbers_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nminorabsorbers_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nextraabsorbers_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nmixingfracs_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nlayers_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nbnds_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(ngpts_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(npairs_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(ncontributors_lower_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(ncontributors_upper_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nminor_absorber_intervals_lower_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nminor_absorber_intervals_upper_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -#endif - - ! Allocate space for arrays - allocate(gas_names_sw(nabsorbers_sw)) - allocate(scaling_gas_lower_sw(nminor_absorber_intervals_lower_sw)) - allocate(scaling_gas_upper_sw(nminor_absorber_intervals_upper_sw)) - allocate(gas_minor_sw(nminorabsorbers_sw)) - allocate(identifier_minor_sw(nminorabsorbers_sw)) - allocate(minor_gases_lower_sw(nminor_absorber_intervals_lower_sw)) - allocate(minor_gases_upper_sw(nminor_absorber_intervals_upper_sw)) - allocate(minor_limits_gpt_lower_sw(npairs_sw,nminor_absorber_intervals_lower_sw)) - allocate(minor_limits_gpt_upper_sw(npairs_sw,nminor_absorber_intervals_upper_sw)) - allocate(band2gpt_sw(2,nbnds_sw)) - allocate(key_species_sw(2,nlayers_sw,nbnds_sw)) - allocate(band_lims_sw(2,nbnds_sw)) - allocate(press_ref_sw(npress_sw)) - allocate(temp_ref_sw(ntemps_sw)) - allocate(vmr_ref_sw(nlayers_sw, nextrabsorbers_sw, ntemps_sw)) - allocate(kminor_lower_sw(ncontributors_lower_sw, nmixingfracs_sw, ntemps_sw)) - allocate(kmajor_sw(ngpts_sw, nmixingfracs_sw, npress_sw+1, ntemps_sw)) - allocate(kminor_start_lower_sw(nminor_absorber_intervals_lower_sw)) - allocate(kminor_upper_sw(ncontributors_upper_sw, nmixingfracs_sw, ntemps_sw)) - allocate(kminor_start_upper_sw(nminor_absorber_intervals_upper_sw)) - allocate(minor_scales_with_density_lower_sw(nminor_absorber_intervals_lower_sw)) - allocate(minor_scales_with_density_upper_sw(nminor_absorber_intervals_upper_sw)) - allocate(scale_by_complement_lower_sw(nminor_absorber_intervals_lower_sw)) - allocate(scale_by_complement_upper_sw(nminor_absorber_intervals_upper_sw)) - allocate(rayl_upper_sw(ngpts_sw, nmixingfracs_sw, ntemps_sw)) - allocate(rayl_lower_sw(ngpts_sw, nmixingfracs_sw, ntemps_sw)) - allocate(solar_source_sw(ngpts_sw)) - allocate(temp1(nminor_absorber_intervals_lower_sw)) - allocate(temp2(nminor_absorber_intervals_upper_sw)) - allocate(temp3(nminor_absorber_intervals_lower_sw)) - allocate(temp4(nminor_absorber_intervals_upper_sw)) - - ! On master processor, read in fields, broadcast to all processors - if (mpirank .eq. mpiroot) then - ! Read in fields from file - if(nf90_open(trim(sw_gas_props_file), NF90_WRITE, ncid_sw) .eq. NF90_NOERR) then - status = nf90_inq_varid(ncid_sw,'gas_names',varID) - status = nf90_get_var(ncid_sw,varID,gas_names_sw) - ! - status = nf90_inq_varid(ncid_sw,'scaling_gas_lower',varID) - status = nf90_get_var(ncid_sw,varID,scaling_gas_lower_sw) - ! - status = nf90_inq_varid(ncid_sw,'scaling_gas_upper',varID) - status = nf90_get_var(ncid_sw,varID,scaling_gas_upper_sw) - ! - status = nf90_inq_varid(ncid_sw,'gas_minor',varID) - status = nf90_get_var(ncid_sw,varID,gas_minor_sw) - ! - status = nf90_inq_varid(ncid_sw,'identifier_minor',varID) - status = nf90_get_var(ncid_sw,varID,identifier_minor_sw) - ! - status = nf90_inq_varid(ncid_sw,'minor_gases_lower',varID) - status = nf90_get_var(ncid_sw,varID,minor_gases_lower_sw) - ! - status = nf90_inq_varid(ncid_sw,'minor_gases_upper',varID) - status = nf90_get_var(ncid_sw,varID,minor_gases_upper_sw) - ! - status = nf90_inq_varid(ncid_sw,'minor_limits_gpt_lower',varID) - status = nf90_get_var(ncid_sw,varID,minor_limits_gpt_lower_sw) - ! - status = nf90_inq_varid(ncid_sw,'minor_limits_gpt_upper',varID) - status = nf90_get_var(ncid_sw,varID,minor_limits_gpt_upper_sw) - ! - status = nf90_inq_varid(ncid_sw,'bnd_limits_gpt',varID) - status = nf90_get_var(ncid_sw,varID,band2gpt_sw) - ! - status = nf90_inq_varid(ncid_sw,'key_species',varID) - status = nf90_get_var(ncid_sw,varID,key_species_sw) - ! - status = nf90_inq_varid(ncid_sw,'bnd_limits_wavenumber',varID) - status = nf90_get_var(ncid_sw,varID,band_lims_sw) - ! - status = nf90_inq_varid(ncid_sw,'press_ref',varID) - status = nf90_get_var(ncid_sw,varID,press_ref_sw) - ! - status = nf90_inq_varid(ncid_sw,'temp_ref',varID) - status = nf90_get_var(ncid_sw,varID,temp_ref_sw) - ! - status = nf90_inq_varid(ncid_sw,'absorption_coefficient_ref_P',varID) - status = nf90_get_var(ncid_sw,varID,temp_ref_p_sw) - ! - status = nf90_inq_varid(ncid_sw,'absorption_coefficient_ref_T',varID) - status = nf90_get_var(ncid_sw,varID,temp_ref_t_sw) - ! - status = nf90_inq_varid(ncid_sw,'press_ref_trop',varID) - status = nf90_get_var(ncid_sw,varID,press_ref_trop_sw) - ! - status = nf90_inq_varid(ncid_sw,'kminor_lower',varID) - status = nf90_get_var(ncid_sw,varID,kminor_lower_sw) - ! - status = nf90_inq_varid(ncid_sw,'kminor_upper',varID) - status = nf90_get_var(ncid_sw,varID,kminor_upper_sw) - ! - status = nf90_inq_varid(ncid_sw,'vmr_ref',varID) - status = nf90_get_var(ncid_sw,varID,vmr_ref_sw) - ! - status = nf90_inq_varid(ncid_sw,'kmajor',varID) - status = nf90_get_var(ncid_sw,varID,kmajor_sw) - ! - status = nf90_inq_varid(ncid_sw,'kminor_start_lower',varID) - status = nf90_get_var(ncid_sw,varID,kminor_start_lower_sw) - ! - status = nf90_inq_varid(ncid_sw,'kminor_start_upper',varID) - status = nf90_get_var(ncid_sw,varID,kminor_start_upper_sw) - ! - status = nf90_inq_varid(ncid_sw,'solar_source',varID) - status = nf90_get_var(ncid_sw,varID,solar_source_sw) - ! - status = nf90_inq_varid(ncid_sw,'rayl_lower',varID) - status = nf90_get_var(ncid_sw,varID,rayl_lower_sw) - - status = nf90_inq_varid(ncid_sw,'rayl_upper',varID) - status = nf90_get_var(ncid_sw,varID,rayl_upper_sw) - - ! Logical fields are read in as integers and then converted to logicals. - status = nf90_inq_varid(ncid_sw,'minor_scales_with_density_lower',varID) - status = nf90_get_var(ncid_sw,varID,temp1) - minor_scales_with_density_lower_sw(:) = .false. - where(temp1 .eq. 1) minor_scales_with_density_lower_sw(:) = .true. - ! - status = nf90_inq_varid(ncid_sw,'minor_scales_with_density_upper',varID) - status = nf90_get_var(ncid_sw,varID,temp2) - minor_scales_with_density_upper_sw(:) = .false. - where(temp2 .eq. 1) minor_scales_with_density_upper_sw(:) = .true. - ! - status = nf90_inq_varid(ncid_sw,'scale_by_complement_lower',varID) - status = nf90_get_var(ncid_sw,varID,temp3) - scale_by_complement_lower_sw(:) = .false. - where(temp3 .eq. 1) scale_by_complement_lower_sw(:) = .true. - ! - status = nf90_inq_varid(ncid_sw,'scale_by_complement_upper',varID) - status = nf90_get_var(ncid_sw,varID,temp4) - scale_by_complement_upper_sw(:) = .false. - where(temp4 .eq. 1) scale_by_complement_upper_sw(:) = .true. - - ! Close - status = nf90_close(ncid_sw) - endif - endif - - ! Broadcast arrays to all processors -#ifdef MPI - call MPI_BCAST(minor_limits_gpt_upper_sw, size(minor_limits_gpt_upper_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(minor_limits_gpt_lower_sw, size(minor_limits_gpt_lower_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(kminor_start_upper_sw, size(kminor_start_upper_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(kminor_start_lower_sw, size(kminor_start_lower_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(key_species_sw, size(key_species_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(band2gpt_sw, size(band2gpt_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(band_lims_sw, size(band_lims_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(press_ref_sw, size(press_ref_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(temp_ref_sw, size(temp_ref_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(kminor_lower_sw, size(kminor_lower_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(kminor_upper_sw, size(kminor_upper_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(scaling_gas_lower_sw, size(scaling_gas_lower_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(scaling_gas_upper_sw, size(scaling_gas_upper_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(vmr_ref_sw, size(vmr_ref_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(kmajor_sw, size(kmajor_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(temp_ref_p_sw, 1, kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(temp_ref_t_sw, 1, kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(press_ref_trop_sw, 1, kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(solar_source_sw, size(solar_source_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(rayl_lower_sw, size(rayl_lower_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(rayl_upper_sw, size(rayl_upper_sw), kind_phys, mpiroot, mpicomm, ierr) - ! Character arrays - do ij=1,nabsorbers_sw - call MPI_BCAST(gas_names_sw(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) - enddo - do ij=1,nminorabsorbers_sw - call MPI_BCAST(gas_minor_sw(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) - call MPI_BCAST(identifier_minor_sw(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) - enddo - do ij=1,nminor_absorber_intervals_lower_sw - call MPI_BCAST(minor_gases_lower_sw(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) - enddo - do ij=1,nminor_absorber_intervals_upper_sw - call MPI_BCAST(minor_gases_upper_sw(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) - enddo - ! Logical arrays (First convert to integer-array, then broadcast) - ! - allocate(temp_log_array1(nminor_absorber_intervals_lower_sw)) - where(minor_scales_with_density_lower_sw) - temp_log_array1 = 1 - elsewhere - temp_log_array1 = 0 - end where - call MPI_BCAST(temp_log_array1, size(temp_log_array1), MPI_INTEGER, mpiroot, mpicomm, ierr) - ! - allocate(temp_log_array2(nminor_absorber_intervals_lower_sw)) - where(scale_by_complement_lower_sw) - temp_log_array2 = 1 - elsewhere - temp_log_array2 = 0 - end where - call MPI_BCAST(temp_log_array2, size(temp_log_array2), MPI_INTEGER, mpiroot, mpicomm, ierr) - ! - allocate(temp_log_array3(nminor_absorber_intervals_upper_sw)) - where(minor_scales_with_density_upper_sw) - temp_log_array3 = 1 - elsewhere - temp_log_array3 = 0 - end where - call MPI_BCAST(temp_log_array3, size(temp_log_array3), MPI_INTEGER, mpiroot, mpicomm, ierr) - ! - allocate(temp_log_array4(nminor_absorber_intervals_upper_sw)) - where(scale_by_complement_upper_sw) - temp_log_array4 = 1 - elsewhere - temp_log_array4 = 0 - end where - call MPI_BCAST(temp_log_array4, size(temp_log_array4), MPI_INTEGER, mpiroot, mpicomm, ierr) -#endif - - ! Initialize gas concentrations and gas optics class with data - do iGas=1,nGases - call check_error_msg('sw_gas_optics_init',gas_concentrations%set_vmr(active_gases(iGas), 0._kind_phys)) - enddo - call check_error_msg('sw_gas_optics_init',sw_gas_props%load(gas_concentrations, gas_names_sw, & - key_species_sw, band2gpt_sw, band_lims_sw, press_ref_sw, press_ref_trop_sw, temp_ref_sw, & - temp_ref_p_sw, temp_ref_t_sw, vmr_ref_sw, kmajor_sw, kminor_lower_sw, kminor_upper_sw, & - gas_minor_sw,identifier_minor_sw, minor_gases_lower_sw, minor_gases_upper_sw, & - minor_limits_gpt_lower_sw,minor_limits_gpt_upper_sw, minor_scales_with_density_lower_sw, & - minor_scales_with_density_upper_sw, scaling_gas_lower_sw, & - scaling_gas_upper_sw, scale_by_complement_lower_sw, & - scale_by_complement_upper_sw, kminor_start_lower_sw, kminor_start_upper_sw, & - solar_source_sw, rayl_lower_sw, rayl_upper_sw)) - - ! Set initial permutation seed for McICA, initially set to number of G-points - ipsdsw0 = sw_gas_props%get_ngpt() - - end subroutine sw_gas_optics_init - - ! ######################################################################################### - ! SUBROUTINE sw_cloud_optics_init - ! ######################################################################################### - subroutine sw_cloud_optics_init(Model,mpicomm, mpirank, mpiroot, sw_cloud_props, & - errmsg, errflg) - use netcdf -#ifdef MPI - use mpi -#endif - - ! Inputs - type(GFS_control_type), intent(in) :: & - Model ! DDT containing model control parameters - integer,intent(in) :: & - mpicomm, & ! MPI communicator - mpirank, & ! Current MPI rank - mpiroot ! Master MPI rank - type(ty_cloud_optics),intent(inout) :: & - sw_cloud_props - - ! Outputs - character(len=*), intent(out) :: & - errmsg ! Error message - integer, intent(out) :: & - errflg ! Error code - - ! Variables that will be passed to gas_optics%load() - real(kind_phys) :: & - radliq_lwr_sw, & ! used by RRTGMP cloud optics - radliq_upr_sw, & ! used by RRTGMP cloud optics - radliq_fac_sw, & ! used by RRTGMP cloud optics - radice_lwr_sw, & ! used by RRTGMP cloud optics - radice_upr_sw, & ! used by RRTGMP cloud optics - radice_fac_sw ! used by RRTGMP cloud optics - - real(kind_phys), dimension(:), allocatable :: & - pade_sizereg_extliq_sw, & ! used by RRTGMP cloud optics - pade_sizereg_ssaliq_sw, & ! used by RRTGMP cloud optics - pade_sizereg_asyliq_sw, & ! used by RRTGMP cloud optics - pade_sizereg_extice_sw, & ! used by RRTGMP cloud optics - pade_sizereg_ssaice_sw, & ! used by RRTGMP cloud optics - pade_sizereg_asyice_sw ! used by RRTGMP cloud optics - real(kind_phys), dimension(:,:), allocatable :: & - lut_extliq_sw, & ! used by RRTGMP cloud optics - lut_ssaliq_sw, & ! used by RRTGMP cloud optics - lut_asyliq_sw, & ! used by RRTGMP cloud optics - band_lims_cldy_sw ! used by RRTGMP cloud optics - - real(kind_phys), dimension(:,:,:), allocatable :: & - lut_extice_sw, & ! used by RRTGMP cloud optics - lut_ssaice_sw, & ! used by RRTGMP cloud optics - lut_asyice_sw, & ! used by RRTGMP cloud optics - pade_extliq_sw, & ! used by RRTGMP cloud optics - pade_ssaliq_sw, & ! used by RRTGMP cloud optics - pade_asyliq_sw ! used by RRTGMP cloud optics - real(kind_phys), dimension(:,:,:,:), allocatable :: & - pade_extice_sw, & ! used by RRTGMP cloud optics - pade_ssaice_sw, & ! used by RRTGMP cloud optics - pade_asyice_sw ! used by RRTGMP cloud optics - ! Dimensions (to be broadcast across all processors) - integer :: & - nbandSWcldy_sw, & ! used by RRTGMP cloud optics - nsize_liq_sw, & ! used by RRTGMP cloud optics - nsize_ice_sw, & ! used by RRTGMP cloud optics - nsizereg_sw, & ! used by RRTGMP cloud optics - ncoeff_ext_sw, & ! used by RRTGMP cloud optics - ncoeff_ssa_g_sw, & ! used by RRTGMP cloud optics - nbound_sw, & ! used by RRTGMP cloud optics - npairsSWcldy_sw ! used by RRTGMP cloud optics - - ! Local variables - integer :: status,ncid_sw,ncid_sw_clds,dimid,varID,ij,iGas - integer,dimension(:),allocatable :: temp1,temp2,temp3,temp4,temp_log_array1,& - temp_log_array2, temp_log_array3, temp_log_array4 - character(len=264) :: sw_cloud_props_file - - ! Initialize - errmsg = '' - errflg = 0 - - ! Filenames are set in the gfs_physics_nml (scm/src/GFS_typedefs.F90) - sw_cloud_props_file = trim(Model%rrtmgp_root)//trim(Model%sw_file_clouds) - - ! Read dimensions for k-distribution fields (only on master processor(0)) - if (mpirank .eq. mpiroot) then - if(nf90_open(trim(sw_cloud_props_file), NF90_WRITE, ncid_sw_clds) == NF90_NOERR) then - status = nf90_inq_dimid(ncid_sw_clds, 'nband', dimid) - status = nf90_inquire_dimension(ncid_sw_clds, dimid, len=nbandSWcldy_sw) - status = nf90_inq_dimid(ncid_sw_clds, 'nrghice', dimid) - status = nf90_inquire_dimension(ncid_sw_clds, dimid, len=nrghice_sw) - status = nf90_inq_dimid(ncid_sw_clds, 'nsize_liq', dimid) - status = nf90_inquire_dimension(ncid_sw_clds, dimid, len=nsize_liq_sw) - status = nf90_inq_dimid(ncid_sw_clds, 'nsize_ice', dimid) - status = nf90_inquire_dimension(ncid_sw_clds, dimid, len=nsize_ice_sw) - status = nf90_inq_dimid(ncid_sw_clds, 'nsizereg', dimid) - status = nf90_inquire_dimension(ncid_sw_clds, dimid, len=nsizereg_sw) - status = nf90_inq_dimid(ncid_sw_clds, 'ncoeff_ext', dimid) - status = nf90_inquire_dimension(ncid_sw_clds, dimid, len=ncoeff_ext_sw) - status = nf90_inq_dimid(ncid_sw_clds, 'ncoeff_ssa_g', dimid) - status = nf90_inquire_dimension(ncid_sw_clds, dimid, len=ncoeff_ssa_g_sw) - status = nf90_inq_dimid(ncid_sw_clds, 'nbound', dimid) - status = nf90_inquire_dimension(ncid_sw_clds, dimid, len=nbound_sw) - status = nf90_inq_dimid(ncid_sw_clds, 'pair', dimid) - status = nf90_inquire_dimension(ncid_sw_clds, dimid, len=npairsSWcldy_sw) - status = nf90_close(ncid_sw_clds) - endif - endif - - ! Broadcast dimensions to all processors -#ifdef MPI - if (Model%rrtmgp_cld_optics .eq. 1 .or. Model%rrtmgp_cld_optics .eq. 2) then - call MPI_BCAST(nbandSWcldy_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nrghice_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nsize_liq_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nsize_ice_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nsizereg_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(ncoeff_ext_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(ncoeff_ssa_g_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nbound_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(npairsSWcldy_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - endif -#endif - - if (Model%rrtmgp_cld_optics .eq. 1) then - allocate(lut_extliq_sw(nsize_liq_sw, nBandSWcldy_sw)) - allocate(lut_ssaliq_sw(nsize_liq_sw, nBandSWcldy_sw)) - allocate(lut_asyliq_sw(nsize_liq_sw, nBandSWcldy_sw)) - allocate(lut_extice_sw(nsize_ice_sw, nBandSWcldy_sw, nrghice_sw)) - allocate(lut_ssaice_sw(nsize_ice_sw, nBandSWcldy_sw, nrghice_sw)) - allocate(lut_asyice_sw(nsize_ice_sw, nBandSWcldy_sw, nrghice_sw)) - allocate(band_lims_cldy_sw(2, nBandSWcldy_sw)) - endif - if (Model%rrtmgp_cld_optics .eq. 2) then - allocate(pade_extliq_sw(nbandSWcldy_sw, nsizereg_sw, ncoeff_ext_sw )) - allocate(pade_ssaliq_sw(nbandSWcldy_sw, nsizereg_sw, ncoeff_ssa_g_sw)) - allocate(pade_asyliq_sw(nbandSWcldy_sw, nsizereg_sw, ncoeff_ssa_g_sw)) - allocate(pade_extice_sw(nbandSWcldy_sw, nsizereg_sw, ncoeff_ext_sw, nrghice_sw)) - allocate(pade_ssaice_sw(nbandSWcldy_sw, nsizereg_sw, ncoeff_ssa_g_sw, nrghice_sw)) - allocate(pade_asyice_sw(nbandSWcldy_sw, nsizereg_sw, ncoeff_ssa_g_sw, nrghice_sw)) - allocate(pade_sizereg_extliq_sw(nbound_sw)) - allocate(pade_sizereg_ssaliq_sw(nbound_sw)) - allocate(pade_sizereg_asyliq_sw(nbound_sw)) - allocate(pade_sizereg_extice_sw(nbound_sw)) - allocate(pade_sizereg_ssaice_sw(nbound_sw)) - allocate(pade_sizereg_asyice_sw(nbound_sw)) - allocate(band_lims_cldy_sw(2,nbandSWcldy_sw)) - endif - - ! On master processor, allocate space, read in fields, broadcast to all processors - if (mpirank .eq. mpiroot) then - ! - if (Model%rrtmgp_cld_optics .eq. 1) then - ! - if(nf90_open(trim(sw_cloud_props_file), NF90_WRITE, ncid_sw_clds) == NF90_NOERR) then - status = nf90_inq_varid(ncid_sw_clds,'radliq_lwr',varID) - status = nf90_get_var(ncid_sw_clds,varID,radliq_lwr_sw) - status = nf90_inq_varid(ncid_sw_clds,'radliq_upr',varID) - status = nf90_get_var(ncid_sw_clds,varID,radliq_upr_sw) - status = nf90_inq_varid(ncid_sw_clds,'radliq_fac',varID) - status = nf90_get_var(ncid_sw_clds,varID,radliq_fac_sw) - status = nf90_inq_varid(ncid_sw_clds,'radice_lwr',varID) - status = nf90_get_var(ncid_sw_clds,varID,radice_lwr_sw) - status = nf90_inq_varid(ncid_sw_clds,'radice_upr',varID) - status = nf90_get_var(ncid_sw_clds,varID,radice_upr_sw) - status = nf90_inq_varid(ncid_sw_clds,'radice_fac',varID) - status = nf90_get_var(ncid_sw_clds,varID,radice_fac_sw) - status = nf90_inq_varid(ncid_sw_clds,'lut_extliq',varID) - status = nf90_get_var(ncid_sw_clds,varID,lut_extliq_sw) - status = nf90_inq_varid(ncid_sw_clds,'lut_ssaliq',varID) - status = nf90_get_var(ncid_sw_clds,varID,lut_ssaliq_sw) - status = nf90_inq_varid(ncid_sw_clds,'lut_asyliq',varID) - status = nf90_get_var(ncid_sw_clds,varID,lut_asyliq_sw) - status = nf90_inq_varid(ncid_sw_clds,'lut_extice',varID) - status = nf90_get_var(ncid_sw_clds,varID,lut_extice_sw) - status = nf90_inq_varid(ncid_sw_clds,'lut_ssaice',varID) - status = nf90_get_var(ncid_sw_clds,varID,lut_ssaice_sw) - status = nf90_inq_varid(ncid_sw_clds,'lut_asyice',varID) - status = nf90_get_var(ncid_sw_clds,varID,lut_asyice_sw) - status = nf90_inq_varid(ncid_sw_clds,'bnd_limits_wavenumber',varID) - status = nf90_get_var(ncid_sw_clds,varID,band_lims_cldy_sw) - status = nf90_close(ncid_sw_clds) - endif - endif - ! - if (Model%rrtmgp_cld_optics .eq. 2) then - ! - if(nf90_open(trim(sw_cloud_props_file), NF90_WRITE, ncid_sw_clds) == NF90_NOERR) then - status = nf90_inq_varid(ncid_sw_clds,'radliq_lwr',varID) - status = nf90_get_var(ncid_sw_clds,varID,radliq_lwr_sw) - status = nf90_inq_varid(ncid_sw_clds,'radliq_upr',varID) - status = nf90_get_var(ncid_sw_clds,varID,radliq_upr_sw) - status = nf90_inq_varid(ncid_sw_clds,'radliq_fac',varID) - status = nf90_get_var(ncid_sw_clds,varID,radliq_fac_sw) - status = nf90_inq_varid(ncid_sw_clds,'radice_lwr',varID) - status = nf90_get_var(ncid_sw_clds,varID,radice_lwr_sw) - status = nf90_inq_varid(ncid_sw_clds,'radice_upr',varID) - status = nf90_get_var(ncid_sw_clds,varID,radice_upr_sw) - status = nf90_inq_varid(ncid_sw_clds,'radice_fac',varID) - status = nf90_get_var(ncid_sw_clds,varID,radice_fac_sw) - status = nf90_inq_varid(ncid_sw_clds,'pade_extliq',varID) - status = nf90_get_var(ncid_sw_clds,varID,pade_extliq_sw) - status = nf90_inq_varid(ncid_sw_clds,'pade_ssaliq',varID) - status = nf90_get_var(ncid_sw_clds,varID,pade_ssaliq_sw) - status = nf90_inq_varid(ncid_sw_clds,'pade_asyliq',varID) - status = nf90_get_var(ncid_sw_clds,varID,pade_asyliq_sw) - status = nf90_inq_varid(ncid_sw_clds,'pade_extice',varID) - status = nf90_get_var(ncid_sw_clds,varID,pade_extice_sw) - status = nf90_inq_varid(ncid_sw_clds,'pade_ssaice',varID) - status = nf90_get_var(ncid_sw_clds,varID,pade_ssaice_sw) - status = nf90_inq_varid(ncid_sw_clds,'pade_asyice',varID) - status = nf90_get_var(ncid_sw_clds,varID,pade_asyice_sw) - status = nf90_inq_varid(ncid_sw_clds,'pade_sizreg_extliq',varID) - status = nf90_get_var(ncid_sw_clds,varID,pade_sizereg_extliq_sw) - status = nf90_inq_varid(ncid_sw_clds,'pade_sizreg_ssaliq',varID) - status = nf90_get_var(ncid_sw_clds,varID,pade_sizereg_ssaliq_sw) - status = nf90_inq_varid(ncid_sw_clds,'pade_sizreg_asyliq',varID) - status = nf90_get_var(ncid_sw_clds,varID,pade_sizereg_asyliq_sw) - status = nf90_inq_varid(ncid_sw_clds,'pade_sizreg_extice',varID) - status = nf90_get_var(ncid_sw_clds,varID,pade_sizereg_extice_sw) - status = nf90_inq_varid(ncid_sw_clds,'pade_sizreg_ssaice',varID) - status = nf90_get_var(ncid_sw_clds,varID,pade_sizereg_ssaice_sw) - status = nf90_inq_varid(ncid_sw_clds,'pade_sizreg_asyice',varID) - status = nf90_get_var(ncid_sw_clds,varID,pade_sizereg_asyice_sw) - status = nf90_inq_varid(ncid_sw_clds,'bnd_limits_wavenumber',varID) - status = nf90_get_var(ncid_sw_clds,varID,band_lims_cldy_sw) - status = nf90_close(ncid_sw_clds) - endif - endif - endif - - ! Broadcast arrays to all processors -#ifdef MPI - if (Model%rrtmgp_cld_optics .eq. 1) then - call MPI_BCAST(radliq_lwr_sw, size(radliq_lwr_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(radliq_upr_sw, size(radliq_upr_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(radliq_fac_sw, size(radliq_fac_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(radice_lwr_sw, size(radice_lwr_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(radice_upr_sw, size(radice_upr_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(radice_fac_sw, size(radice_fac_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_extliq_sw, size(lut_extliq_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_ssaliq_sw, size(lut_ssaliq_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_asyliq_sw, size(lut_asyliq_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_extice_sw, size(lut_extice_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_ssaice_sw, size(lut_ssaice_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_asyice_sw, size(lut_asyice_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(band_lims_cldy_sw), size(band_lims_cldy_sw), kind_phys, mpiroot, mpicomm, ierr) - endif - if (Model%rrtmgp_cld_optics .eq. 2) then - call MPI_BCAST(pade_extliq_sw, size(pade_extliq_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_ssaliq_sw, size(pade_ssaliq_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_asyliq_sw, size(pade_asyliq_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_extice_sw, size(pade_extice_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_ssaice_sw, size(pade_ssaice_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_asyice_sw, size(pade_asyice_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_extliq_sw), size(pade_sizereg_extliq_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_ssaliq_sw), size(pade_sizereg_ssaliq_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_asyliq_sw), size(pade_sizereg_asyliq_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_extice_sw), size(pade_sizereg_extice_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_ssaice_sw), size(pade_sizereg_ssaice_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_asyice_sw), size(pade_sizereg_asyice_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(band_lims_cldy_sw), size(band_lims_cldy_sw), kind_phys, mpiroot, mpicomm, ierr) - endif -#endif - - ! Load tables data for RRTGMP cloud-optics - if (Model%rrtmgp_cld_optics .eq. 1) then - call check_error_msg('sw_cloud_optics_init',sw_cloud_props%set_ice_roughness(nrghice_sw)) - call check_error_msg('sw_cloud_optics_init',sw_cloud_props%load(band_lims_cldy_sw, & - radliq_lwr_sw, radliq_upr_sw, radliq_fac_sw, radice_lwr_sw, radice_upr_sw, & - radice_fac_sw, lut_extliq_sw, lut_ssaliq_sw, lut_asyliq_sw, lut_extice_sw, & - lut_ssaice_sw, lut_asyice_sw)) - endif - if (Model%rrtmgp_cld_optics .eq. 2) then - call check_error_msg('sw_cloud_optics_init',sw_cloud_props%set_ice_roughness(nrghice_sw)) - call check_error_msg('sw_cloud_optics_init', sw_cloud_props%load(band_lims_cldy_sw, & - pade_extliq_sw, pade_ssaliq_sw, pade_asyliq_sw, pade_extice_sw, pade_ssaice_sw, & - pade_asyice_sw, pade_sizereg_extliq_sw, pade_sizereg_ssaliq_sw, & - pade_sizereg_asyliq_sw, pade_sizereg_extice_sw, pade_sizereg_ssaice_sw, & - pade_sizereg_asyice_sw)) - endif - - end subroutine sw_cloud_optics_init - - ! ######################################################################################### - ! SUBROUTINE check_error_msg - ! ######################################################################################### - subroutine check_error_msg(routine_name, error_msg) - character(len=*), intent(in) :: & - error_msg, routine_name - - if(error_msg /= "") then - print*,"ERROR("//trim(routine_name)//"): " - print*,trim(error_msg) - return - end if - end subroutine check_error_msg -end module rrtmgp_aux diff --git a/physics/rrtmgp_lw.F90 b/physics/rrtmgp_lw.F90 index e94ad41a8..e9471d178 100644 --- a/physics/rrtmgp_lw.F90 +++ b/physics/rrtmgp_lw.F90 @@ -1,65 +1,29 @@ ! ########################################################################################### ! ########################################################################################### module rrtmgp_lw - use machine, only: kind_phys - use GFS_typedefs, only: GFS_control_type - use mo_rte_kind, only: wl - use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp - use mo_cloud_optics, only: ty_cloud_optics - use mo_optical_props, only: ty_optical_props_1scl - use mo_rrtmgp_clr_all_sky, only: rte_lw - use mo_gas_concentrations, only: ty_gas_concs - use mo_fluxes_byband, only: ty_fluxes_byband - use rrtmgp_aux, only: lw_gas_optics_init, lw_cloud_optics_init, check_error_msg + use machine, only: kind_phys + use GFS_typedefs, only: GFS_control_type, GFS_radtend_type + use mo_rte_kind, only: wl + use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp + use mo_cloud_optics, only: ty_cloud_optics + use mo_optical_props, only: ty_optical_props_1scl + use mo_rrtmgp_clr_all_sky, only: rte_lw + use mo_gas_concentrations, only: ty_gas_concs + use mo_fluxes_byband, only: ty_fluxes_byband + use rrtmgp_lw_cloud_optics, only: rrtmgp_lw_cloud_optics_init + use rrtmgp_lw_gas_optics, only: rrtmgp_lw_gas_optics_init, check_error_msg public rrtmgp_lw_init, rrtmgp_lw_run, rrtmgp_lw_finalize contains -!! \section arg_table_rrtmgp_lw_init Argument Table -!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | -!! |----------------|----------------------------------|---------------------------------------------------------------------------|-------|------|----------------------|-----------|--------|----------| -!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | -!! | mpirank | mpi_rank | current MPI rank | index | 0 | integer | | in | F | -!! | mpiroot | mpi_root | master MPI rank | index | 0 | integer | | in | F | -!! | mpicomm | mpi_comm | MPI communicator | index | 0 | integer | | in | F | -!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | -!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | -!! | lw_gas_props | coefficients_for_lw_gas_optics | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | inout | F | -!! | lw_cloud_props | coefficients_for_lw_cloud_optics | DDT containing spectral information for cloudy RRTMGP LW radiation scheme | DDT | 0 | ty_cloud_optics | | inout | F | -!! ! ######################################################################################### - subroutine rrtmgp_lw_init(Model, mpicomm, mpirank, mpiroot, lw_gas_props, lw_cloud_props, & - errmsg, errflg) - - ! Inputs - type(GFS_control_type), intent(in) :: & - Model ! DDT containing model control parameters - integer,intent(in) :: & - mpicomm, & ! MPI communicator - mpirank, & ! Current MPI rank - mpiroot ! Master MPI rank - type(ty_gas_optics_rrtmgp),intent(inout) :: & - lw_gas_props - type(ty_cloud_optics),intent(inout) :: & - lw_cloud_props - - ! Outputs - character(len=*), intent(out) :: & - errmsg ! Error message - integer, intent(out) :: & - errflg ! Error code - - ! Load gas-optics - call lw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, lw_gas_props, errmsg, errflg) - - ! Load cloud optics - if (Model%rrtmgp_cld_optics .gt. 0) then - call lw_cloud_optics_init(Model, mpicomm, mpirank, mpiroot, lw_cloud_props, errmsg, errflg) - endif - + ! SUBROUTINE rrtmgp_lw_init + ! ######################################################################################### + subroutine rrtmgp_lw_init() end subroutine rrtmgp_lw_init - + ! ######################################################################################### + ! SUBROUTINE rrtmgp_lw_run ! ######################################################################################### !! \section arg_table_rrtmgp_lw_run Argument Table !! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | @@ -136,7 +100,6 @@ subroutine rrtmgp_lw_run(Model, ncol, lw_gas_props, p_lay, t_lay, p_lev, skt, & real(kind_phys), dimension(ncol,model%levs+1,lw_gas_props%get_nband()),target :: & fluxLWBB_up_allsky, fluxLWBB_dn_allsky logical :: l_ClrSky_HR, l_AllSky_HR_byband - integer :: k ! Initialize CCPP error handling variables errmsg = '' @@ -178,6 +141,9 @@ subroutine rrtmgp_lw_run(Model, ncol, lw_gas_props, p_lay, t_lay, p_lev, skt, & end subroutine rrtmgp_lw_run + ! ######################################################################################### + ! SUBROUTINE rrtmgp_lw_finalize + ! ######################################################################################### subroutine rrtmgp_lw_finalize() end subroutine rrtmgp_lw_finalize diff --git a/physics/rrtmgp_lw_cloud_optics.F90 b/physics/rrtmgp_lw_cloud_optics.F90 index 995ad33a1..2434e025f 100644 --- a/physics/rrtmgp_lw_cloud_optics.F90 +++ b/physics/rrtmgp_lw_cloud_optics.F90 @@ -1,802 +1,518 @@ -module mo_rrtmgp_lw_cloud_optics - use machine, only: kind_phys - use physparam, only: ilwcliq, ilwcice, iovrlw - use mersenne_twister, only: random_setseed, random_number, random_stat +module rrtmgp_lw_cloud_optics + use machine, only: kind_phys + use GFS_typedefs, only: GFS_control_type + use mo_rte_kind, only: wl + use mo_cloud_optics, only: ty_cloud_optics + use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp + use physparam, only: isubclw, iovrlw + use mo_optical_props, only: ty_optical_props_1scl + use mo_cloud_sampling, only: sampled_mask_max_ran, sampled_mask_exp_ran, draw_samples + use mersenne_twister, only: random_setseed, random_number, random_stat + use mo_rrtmg_lw_cloud_optics, only: rrtmg_lw_cloud_optics + use rrtmgp_lw_gas_optics, only: ipsdlw0 + use netcdf - implicit none - - ! Parameter used for RRTMG cloud-optics - integer,parameter :: & - nBandsLW_RRTMG = 16 - ! ipat is bands index for ebert & curry ice cloud (for iflagice=1) - integer,dimension(nBandsLW_RRTMG),parameter :: & - ipat = (/ 1, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 /) - real(kind_phys), parameter :: & - absrain = 0.33e-3, & ! Rain drop absorption coefficient \f$(m^{2}/g)\f$ . - abssnow0 = 1.5, & ! Snow flake absorption coefficient (micron), fu coeff - abssnow1 = 2.34e-3 ! Snow flake absorption coefficient \f$(m^{2}/g)\f$, ncar coef - - ! RRTMG LW cloud property coefficients - real(kind_phys) , dimension(58,nBandsLW_RRTMG),parameter :: & - absliq1 = reshape(source=(/ & - 1.64047e-03, 6.90533e-02, 7.72017e-02, 7.78054e-02, 7.69523e-02, & !1 - 7.58058e-02, 7.46400e-02, 7.35123e-02, 7.24162e-02, 7.13225e-02, & !1 - 6.99145e-02, 6.66409e-02, 6.36582e-02, 6.09425e-02, 5.84593e-02, & !1 - 5.61743e-02, 5.40571e-02, 5.20812e-02, 5.02245e-02, 4.84680e-02, & !1 - 4.67959e-02, 4.51944e-02, 4.36516e-02, 4.21570e-02, 4.07015e-02, & !1 - 3.92766e-02, 3.78747e-02, 3.64886e-02, 3.53632e-02, 3.41992e-02, & !1 - 3.31016e-02, 3.20643e-02, 3.10817e-02, 3.01490e-02, 2.92620e-02, & !1 - 2.84171e-02, 2.76108e-02, 2.68404e-02, 2.61031e-02, 2.53966e-02, & !1 - 2.47189e-02, 2.40678e-02, 2.34418e-02, 2.28392e-02, 2.22586e-02, & !1 - 2.16986e-02, 2.11580e-02, 2.06356e-02, 2.01305e-02, 1.96417e-02, & !1 - 1.91682e-02, 1.87094e-02, 1.82643e-02, 1.78324e-02, 1.74129e-02, & !1 - 1.70052e-02, 1.66088e-02, 1.62231e-02, & !1 - 2.19486e-01, 1.80687e-01, 1.59150e-01, 1.44731e-01, 1.33703e-01, & !2 - 1.24355e-01, 1.15756e-01, 1.07318e-01, 9.86119e-02, 8.92739e-02, & !2 - 8.34911e-02, 7.70773e-02, 7.15240e-02, 6.66615e-02, 6.23641e-02, & !2 - 5.85359e-02, 5.51020e-02, 5.20032e-02, 4.91916e-02, 4.66283e-02, & !2 - 4.42813e-02, 4.21236e-02, 4.01330e-02, 3.82905e-02, 3.65797e-02, & !2 - 3.49869e-02, 3.35002e-02, 3.21090e-02, 3.08957e-02, 2.97601e-02, & !2 - 2.86966e-02, 2.76984e-02, 2.67599e-02, 2.58758e-02, 2.50416e-02, & !2 - 2.42532e-02, 2.35070e-02, 2.27997e-02, 2.21284e-02, 2.14904e-02, & !2 - 2.08834e-02, 2.03051e-02, 1.97536e-02, 1.92271e-02, 1.87239e-02, & !2 - 1.82425e-02, 1.77816e-02, 1.73399e-02, 1.69162e-02, 1.65094e-02, & !2 - 1.61187e-02, 1.57430e-02, 1.53815e-02, 1.50334e-02, 1.46981e-02, & !2 - 1.43748e-02, 1.40628e-02, 1.37617e-02, & !2 - 2.95174e-01, 2.34765e-01, 1.98038e-01, 1.72114e-01, 1.52083e-01, & !3 - 1.35654e-01, 1.21613e-01, 1.09252e-01, 9.81263e-02, 8.79448e-02, & !3 - 8.12566e-02, 7.44563e-02, 6.86374e-02, 6.36042e-02, 5.92094e-02, & !3 - 5.53402e-02, 5.19087e-02, 4.88455e-02, 4.60951e-02, 4.36124e-02, & !3 - 4.13607e-02, 3.93096e-02, 3.74338e-02, 3.57119e-02, 3.41261e-02, & !3 - 3.26610e-02, 3.13036e-02, 3.00425e-02, 2.88497e-02, 2.78077e-02, & !3 - 2.68317e-02, 2.59158e-02, 2.50545e-02, 2.42430e-02, 2.34772e-02, & !3 - 2.27533e-02, 2.20679e-02, 2.14181e-02, 2.08011e-02, 2.02145e-02, & !3 - 1.96561e-02, 1.91239e-02, 1.86161e-02, 1.81311e-02, 1.76673e-02, & !3 - 1.72234e-02, 1.67981e-02, 1.63903e-02, 1.59989e-02, 1.56230e-02, & !3 - 1.52615e-02, 1.49138e-02, 1.45791e-02, 1.42565e-02, 1.39455e-02, & !3 - 1.36455e-02, 1.33559e-02, 1.30761e-02, & !3 - 3.00925e-01, 2.36949e-01, 1.96947e-01, 1.68692e-01, 1.47190e-01, & !4 - 1.29986e-01, 1.15719e-01, 1.03568e-01, 9.30028e-02, 8.36658e-02, & !4 - 7.71075e-02, 7.07002e-02, 6.52284e-02, 6.05024e-02, 5.63801e-02, & !4 - 5.27534e-02, 4.95384e-02, 4.66690e-02, 4.40925e-02, 4.17664e-02, & !4 - 3.96559e-02, 3.77326e-02, 3.59727e-02, 3.43561e-02, 3.28662e-02, & !4 - 3.14885e-02, 3.02110e-02, 2.90231e-02, 2.78948e-02, 2.69109e-02, & !4 - 2.59884e-02, 2.51217e-02, 2.43058e-02, 2.35364e-02, 2.28096e-02, & !4 - 2.21218e-02, 2.14700e-02, 2.08515e-02, 2.02636e-02, 1.97041e-02, & !4 - 1.91711e-02, 1.86625e-02, 1.81769e-02, 1.77126e-02, 1.72683e-02, & !4 - 1.68426e-02, 1.64344e-02, 1.60427e-02, 1.56664e-02, 1.53046e-02, & !4 - 1.49565e-02, 1.46214e-02, 1.42985e-02, 1.39871e-02, 1.36866e-02, & !4 - 1.33965e-02, 1.31162e-02, 1.28453e-02, & !4 - 2.64691e-01, 2.12018e-01, 1.78009e-01, 1.53539e-01, 1.34721e-01, & !5 - 1.19580e-01, 1.06996e-01, 9.62772e-02, 8.69710e-02, 7.87670e-02, & !5 - 7.29272e-02, 6.70920e-02, 6.20977e-02, 5.77732e-02, 5.39910e-02, & !5 - 5.06538e-02, 4.76866e-02, 4.50301e-02, 4.26374e-02, 4.04704e-02, & !5 - 3.84981e-02, 3.66948e-02, 3.50394e-02, 3.35141e-02, 3.21038e-02, & !5 - 3.07957e-02, 2.95788e-02, 2.84438e-02, 2.73790e-02, 2.64390e-02, & !5 - 2.55565e-02, 2.47263e-02, 2.39437e-02, 2.32047e-02, 2.25056e-02, & !5 - 2.18433e-02, 2.12149e-02, 2.06177e-02, 2.00495e-02, 1.95081e-02, & !5 - 1.89917e-02, 1.84984e-02, 1.80269e-02, 1.75755e-02, 1.71431e-02, & !5 - 1.67283e-02, 1.63303e-02, 1.59478e-02, 1.55801e-02, 1.52262e-02, & !5 - 1.48853e-02, 1.45568e-02, 1.42400e-02, 1.39342e-02, 1.36388e-02, & !5 - 1.33533e-02, 1.30773e-02, 1.28102e-02, & !5 - 8.81182e-02, 1.06745e-01, 9.79753e-02, 8.99625e-02, 8.35200e-02, & !6 - 7.81899e-02, 7.35939e-02, 6.94696e-02, 6.56266e-02, 6.19148e-02, & !6 - 5.83355e-02, 5.49306e-02, 5.19642e-02, 4.93325e-02, 4.69659e-02, & !6 - 4.48148e-02, 4.28431e-02, 4.10231e-02, 3.93332e-02, 3.77563e-02, & !6 - 3.62785e-02, 3.48882e-02, 3.35758e-02, 3.23333e-02, 3.11536e-02, & !6 - 3.00310e-02, 2.89601e-02, 2.79365e-02, 2.70502e-02, 2.62618e-02, & !6 - 2.55025e-02, 2.47728e-02, 2.40726e-02, 2.34013e-02, 2.27583e-02, & !6 - 2.21422e-02, 2.15522e-02, 2.09869e-02, 2.04453e-02, 1.99260e-02, & !6 - 1.94280e-02, 1.89501e-02, 1.84913e-02, 1.80506e-02, 1.76270e-02, & !6 - 1.72196e-02, 1.68276e-02, 1.64500e-02, 1.60863e-02, 1.57357e-02, & !6 - 1.53975e-02, 1.50710e-02, 1.47558e-02, 1.44511e-02, 1.41566e-02, & !6 - 1.38717e-02, 1.35960e-02, 1.33290e-02, & !6 - 4.32174e-02, 7.36078e-02, 6.98340e-02, 6.65231e-02, 6.41948e-02, & !7 - 6.23551e-02, 6.06638e-02, 5.88680e-02, 5.67124e-02, 5.38629e-02, & !7 - 4.99579e-02, 4.86289e-02, 4.70120e-02, 4.52854e-02, 4.35466e-02, & !7 - 4.18480e-02, 4.02169e-02, 3.86658e-02, 3.71992e-02, 3.58168e-02, & !7 - 3.45155e-02, 3.32912e-02, 3.21390e-02, 3.10538e-02, 3.00307e-02, & !7 - 2.90651e-02, 2.81524e-02, 2.72885e-02, 2.62821e-02, 2.55744e-02, & !7 - 2.48799e-02, 2.42029e-02, 2.35460e-02, 2.29108e-02, 2.22981e-02, & !7 - 2.17079e-02, 2.11402e-02, 2.05945e-02, 2.00701e-02, 1.95663e-02, & !7 - 1.90824e-02, 1.86174e-02, 1.81706e-02, 1.77411e-02, 1.73281e-02, & !7 - 1.69307e-02, 1.65483e-02, 1.61801e-02, 1.58254e-02, 1.54835e-02, & !7 - 1.51538e-02, 1.48358e-02, 1.45288e-02, 1.42322e-02, 1.39457e-02, & !7 - 1.36687e-02, 1.34008e-02, 1.31416e-02, & !7 - 1.41881e-01, 7.15419e-02, 6.30335e-02, 6.11132e-02, 6.01931e-02, & !8 - 5.92420e-02, 5.78968e-02, 5.58876e-02, 5.28923e-02, 4.84462e-02, & !8 - 4.60839e-02, 4.56013e-02, 4.45410e-02, 4.31866e-02, 4.17026e-02, & !8 - 4.01850e-02, 3.86892e-02, 3.72461e-02, 3.58722e-02, 3.45749e-02, & !8 - 3.33564e-02, 3.22155e-02, 3.11494e-02, 3.01541e-02, 2.92253e-02, & !8 - 2.83584e-02, 2.75488e-02, 2.67925e-02, 2.57692e-02, 2.50704e-02, & !8 - 2.43918e-02, 2.37350e-02, 2.31005e-02, 2.24888e-02, 2.18996e-02, & !8 - 2.13325e-02, 2.07870e-02, 2.02623e-02, 1.97577e-02, 1.92724e-02, & !8 - 1.88056e-02, 1.83564e-02, 1.79241e-02, 1.75079e-02, 1.71070e-02, & !8 - 1.67207e-02, 1.63482e-02, 1.59890e-02, 1.56424e-02, 1.53077e-02, & !8 - 1.49845e-02, 1.46722e-02, 1.43702e-02, 1.40782e-02, 1.37955e-02, & !8 - 1.35219e-02, 1.32569e-02, 1.30000e-02, & !8 - 6.72726e-02, 6.61013e-02, 6.47866e-02, 6.33780e-02, 6.18985e-02, & !9 - 6.03335e-02, 5.86136e-02, 5.65876e-02, 5.39839e-02, 5.03536e-02, & !9 - 4.71608e-02, 4.63630e-02, 4.50313e-02, 4.34526e-02, 4.17876e-02, & !9 - 4.01261e-02, 3.85171e-02, 3.69860e-02, 3.55442e-02, 3.41954e-02, & !9 - 3.29384e-02, 3.17693e-02, 3.06832e-02, 2.96745e-02, 2.87374e-02, & !9 - 2.78662e-02, 2.70557e-02, 2.63008e-02, 2.52450e-02, 2.45424e-02, & !9 - 2.38656e-02, 2.32144e-02, 2.25885e-02, 2.19873e-02, 2.14099e-02, & !9 - 2.08554e-02, 2.03230e-02, 1.98116e-02, 1.93203e-02, 1.88482e-02, & !9 - 1.83944e-02, 1.79578e-02, 1.75378e-02, 1.71335e-02, 1.67440e-02, & !9 - 1.63687e-02, 1.60069e-02, 1.56579e-02, 1.53210e-02, 1.49958e-02, & !9 - 1.46815e-02, 1.43778e-02, 1.40841e-02, 1.37999e-02, 1.35249e-02, & !9 - 1.32585e-02, 1.30004e-02, 1.27502e-02, & !9 - 7.97040e-02, 7.63844e-02, 7.36499e-02, 7.13525e-02, 6.93043e-02, & !10 - 6.72807e-02, 6.50227e-02, 6.22395e-02, 5.86093e-02, 5.37815e-02, & !10 - 5.14682e-02, 4.97214e-02, 4.77392e-02, 4.56961e-02, 4.36858e-02, & !10 - 4.17569e-02, 3.99328e-02, 3.82224e-02, 3.66265e-02, 3.51416e-02, & !10 - 3.37617e-02, 3.24798e-02, 3.12887e-02, 3.01812e-02, 2.91505e-02, & !10 - 2.81900e-02, 2.72939e-02, 2.64568e-02, 2.54165e-02, 2.46832e-02, & !10 - 2.39783e-02, 2.33017e-02, 2.26531e-02, 2.20314e-02, 2.14359e-02, & !10 - 2.08653e-02, 2.03187e-02, 1.97947e-02, 1.92924e-02, 1.88106e-02, & !10 - 1.83483e-02, 1.79043e-02, 1.74778e-02, 1.70678e-02, 1.66735e-02, & !10 - 1.62941e-02, 1.59286e-02, 1.55766e-02, 1.52371e-02, 1.49097e-02, & !10 - 1.45937e-02, 1.42885e-02, 1.39936e-02, 1.37085e-02, 1.34327e-02, & !10 - 1.31659e-02, 1.29075e-02, 1.26571e-02, & !10 - 1.49438e-01, 1.33535e-01, 1.21542e-01, 1.11743e-01, 1.03263e-01, & !11 - 9.55774e-02, 8.83382e-02, 8.12943e-02, 7.42533e-02, 6.70609e-02, & !11 - 6.38761e-02, 5.97788e-02, 5.59841e-02, 5.25318e-02, 4.94132e-02, & !11 - 4.66014e-02, 4.40644e-02, 4.17706e-02, 3.96910e-02, 3.77998e-02, & !11 - 3.60742e-02, 3.44947e-02, 3.30442e-02, 3.17079e-02, 3.04730e-02, & !11 - 2.93283e-02, 2.82642e-02, 2.72720e-02, 2.61789e-02, 2.53277e-02, & !11 - 2.45237e-02, 2.37635e-02, 2.30438e-02, 2.23615e-02, 2.17140e-02, & !11 - 2.10987e-02, 2.05133e-02, 1.99557e-02, 1.94241e-02, 1.89166e-02, & !11 - 1.84317e-02, 1.79679e-02, 1.75238e-02, 1.70983e-02, 1.66901e-02, & !11 - 1.62983e-02, 1.59219e-02, 1.55599e-02, 1.52115e-02, 1.48761e-02, & !11 - 1.45528e-02, 1.42411e-02, 1.39402e-02, 1.36497e-02, 1.33690e-02, & !11 - 1.30976e-02, 1.28351e-02, 1.25810e-02, & !11 - 3.71985e-02, 3.88586e-02, 3.99070e-02, 4.04351e-02, 4.04610e-02, & !12 - 3.99834e-02, 3.89953e-02, 3.74886e-02, 3.54551e-02, 3.28870e-02, & !12 - 3.32576e-02, 3.22444e-02, 3.12384e-02, 3.02584e-02, 2.93146e-02, & !12 - 2.84120e-02, 2.75525e-02, 2.67361e-02, 2.59618e-02, 2.52280e-02, & !12 - 2.45327e-02, 2.38736e-02, 2.32487e-02, 2.26558e-02, 2.20929e-02, & !12 - 2.15579e-02, 2.10491e-02, 2.05648e-02, 1.99749e-02, 1.95704e-02, & !12 - 1.91731e-02, 1.87839e-02, 1.84032e-02, 1.80315e-02, 1.76689e-02, & !12 - 1.73155e-02, 1.69712e-02, 1.66362e-02, 1.63101e-02, 1.59928e-02, & !12 - 1.56842e-02, 1.53840e-02, 1.50920e-02, 1.48080e-02, 1.45318e-02, & !12 - 1.42631e-02, 1.40016e-02, 1.37472e-02, 1.34996e-02, 1.32586e-02, & !12 - 1.30239e-02, 1.27954e-02, 1.25728e-02, 1.23559e-02, 1.21445e-02, & !12 - 1.19385e-02, 1.17376e-02, 1.15417e-02, & !12 - 3.11868e-02, 4.48357e-02, 4.90224e-02, 4.96406e-02, 4.86806e-02, & !13 - 4.69610e-02, 4.48630e-02, 4.25795e-02, 4.02138e-02, 3.78236e-02, & !13 - 3.74266e-02, 3.60384e-02, 3.47074e-02, 3.34434e-02, 3.22499e-02, & !13 - 3.11264e-02, 3.00704e-02, 2.90784e-02, 2.81463e-02, 2.72702e-02, & !13 - 2.64460e-02, 2.56698e-02, 2.49381e-02, 2.42475e-02, 2.35948e-02, & !13 - 2.29774e-02, 2.23925e-02, 2.18379e-02, 2.11793e-02, 2.07076e-02, & !13 - 2.02470e-02, 1.97981e-02, 1.93613e-02, 1.89367e-02, 1.85243e-02, & !13 - 1.81240e-02, 1.77356e-02, 1.73588e-02, 1.69935e-02, 1.66392e-02, & !13 - 1.62956e-02, 1.59624e-02, 1.56393e-02, 1.53259e-02, 1.50219e-02, & !13 - 1.47268e-02, 1.44404e-02, 1.41624e-02, 1.38925e-02, 1.36302e-02, & !13 - 1.33755e-02, 1.31278e-02, 1.28871e-02, 1.26530e-02, 1.24253e-02, & !13 - 1.22038e-02, 1.19881e-02, 1.17782e-02, & !13 - 1.58988e-02, 3.50652e-02, 4.00851e-02, 4.07270e-02, 3.98101e-02, & !14 - 3.83306e-02, 3.66829e-02, 3.50327e-02, 3.34497e-02, 3.19609e-02, & !14 - 3.13712e-02, 3.03348e-02, 2.93415e-02, 2.83973e-02, 2.75037e-02, & !14 - 2.66604e-02, 2.58654e-02, 2.51161e-02, 2.44100e-02, 2.37440e-02, & !14 - 2.31154e-02, 2.25215e-02, 2.19599e-02, 2.14282e-02, 2.09242e-02, & !14 - 2.04459e-02, 1.99915e-02, 1.95594e-02, 1.90254e-02, 1.86598e-02, & !14 - 1.82996e-02, 1.79455e-02, 1.75983e-02, 1.72584e-02, 1.69260e-02, & !14 - 1.66013e-02, 1.62843e-02, 1.59752e-02, 1.56737e-02, 1.53799e-02, & !14 - 1.50936e-02, 1.48146e-02, 1.45429e-02, 1.42782e-02, 1.40203e-02, & !14 - 1.37691e-02, 1.35243e-02, 1.32858e-02, 1.30534e-02, 1.28270e-02, & !14 - 1.26062e-02, 1.23909e-02, 1.21810e-02, 1.19763e-02, 1.17766e-02, & !14 - 1.15817e-02, 1.13915e-02, 1.12058e-02, & !14 - 5.02079e-03, 2.17615e-02, 2.55449e-02, 2.59484e-02, 2.53650e-02, & !15 - 2.45281e-02, 2.36843e-02, 2.29159e-02, 2.22451e-02, 2.16716e-02, & !15 - 2.11451e-02, 2.05817e-02, 2.00454e-02, 1.95372e-02, 1.90567e-02, & !15 - 1.86028e-02, 1.81742e-02, 1.77693e-02, 1.73866e-02, 1.70244e-02, & !15 - 1.66815e-02, 1.63563e-02, 1.60477e-02, 1.57544e-02, 1.54755e-02, & !15 - 1.52097e-02, 1.49564e-02, 1.47146e-02, 1.43684e-02, 1.41728e-02, & !15 - 1.39762e-02, 1.37797e-02, 1.35838e-02, 1.33891e-02, 1.31961e-02, & !15 - 1.30051e-02, 1.28164e-02, 1.26302e-02, 1.24466e-02, 1.22659e-02, & !15 - 1.20881e-02, 1.19131e-02, 1.17412e-02, 1.15723e-02, 1.14063e-02, & !15 - 1.12434e-02, 1.10834e-02, 1.09264e-02, 1.07722e-02, 1.06210e-02, & !15 - 1.04725e-02, 1.03269e-02, 1.01839e-02, 1.00436e-02, 9.90593e-03, & !15 - 9.77080e-03, 9.63818e-03, 9.50800e-03, & !15 - 5.64971e-02, 9.04736e-02, 8.11726e-02, 7.05450e-02, 6.20052e-02, & !16 - 5.54286e-02, 5.03503e-02, 4.63791e-02, 4.32290e-02, 4.06959e-02, & !16 - 3.74690e-02, 3.52964e-02, 3.33799e-02, 3.16774e-02, 3.01550e-02, & !16 - 2.87856e-02, 2.75474e-02, 2.64223e-02, 2.53953e-02, 2.44542e-02, & !16 - 2.35885e-02, 2.27894e-02, 2.20494e-02, 2.13622e-02, 2.07222e-02, & !16 - 2.01246e-02, 1.95654e-02, 1.90408e-02, 1.84398e-02, 1.80021e-02, & !16 - 1.75816e-02, 1.71775e-02, 1.67889e-02, 1.64152e-02, 1.60554e-02, & !16 - 1.57089e-02, 1.53751e-02, 1.50531e-02, 1.47426e-02, 1.44428e-02, & !16 - 1.41532e-02, 1.38734e-02, 1.36028e-02, 1.33410e-02, 1.30875e-02, & !16 - 1.28420e-02, 1.26041e-02, 1.23735e-02, 1.21497e-02, 1.19325e-02, & !16 - 1.17216e-02, 1.15168e-02, 1.13177e-02, 1.11241e-02, 1.09358e-02, & !16 - 1.07525e-02, 1.05741e-02, 1.04003e-02/), & !16 - shape=(/58,nBandsLW_RRTMG/)) - - real(kind_phys), dimension(2),parameter :: & - absice0 = (/0.005,1.0/) + integer :: nrghice_lw + public rrtmgp_lw_cloud_optics_init, rrtmgp_lw_cloud_optics_run, rrtmgp_lw_cloud_optics_finalize +contains - real(kind_phys), dimension(2,5),parameter :: & - absice1 = reshape(source=(/ & - 0.0036, 1.136, 0.0068, 0.600, 0.0003, 1.338, 0.0016, 1.166, 0.0020, 1.118 /),& - shape=(/2,5/)) +!! \section arg_table_rrtmgp_lw_cloud_optics_init Argument Table +!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | +!! |----------------|----------------------------------|--------------------------------------------------------------------|-------|------|------------------|-------|--------|----------| +!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | +!! | mpirank | mpi_rank | current MPI rank | index | 0 | integer | | in | F | +!! | mpiroot | mpi_root | master MPI rank | index | 0 | integer | | in | F | +!! | mpicomm | mpi_comm | MPI communicator | index | 0 | integer | | in | F | +!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | +!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! | lw_cloud_props | coefficients_for_lw_cloud_optics | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_cloud_optics | | out | F | +!! + ! ######################################################################################### + ! SUBROUTINE rrtmgp_lw_cloud_optics_init() + ! ######################################################################################### + subroutine rrtmgp_lw_cloud_optics_init(Model, mpicomm, mpirank, mpiroot, lw_cloud_props, & + errmsg, errflg) +#ifdef MPI + use mpi +#endif - real(kind_phys), dimension(43, nBandsLW_RRTMG),parameter :: & - absice2 = reshape(source=(/ & - 7.798999e-02, 6.340479e-02, 5.417973e-02, 4.766245e-02, 4.272663e-02, & !1 - 3.880939e-02, 3.559544e-02, 3.289241e-02, 3.057511e-02, 2.855800e-02, & !1 - 2.678022e-02, 2.519712e-02, 2.377505e-02, 2.248806e-02, 2.131578e-02, & !1 - 2.024194e-02, 1.925337e-02, 1.833926e-02, 1.749067e-02, 1.670007e-02, & !1 - 1.596113e-02, 1.526845e-02, 1.461739e-02, 1.400394e-02, 1.342462e-02, & !1 - 1.287639e-02, 1.235656e-02, 1.186279e-02, 1.139297e-02, 1.094524e-02, & !1 - 1.051794e-02, 1.010956e-02, 9.718755e-03, 9.344316e-03, 8.985139e-03, & !1 - 8.640223e-03, 8.308656e-03, 7.989606e-03, 7.682312e-03, 7.386076e-03, & !1 - 7.100255e-03, 6.824258e-03, 6.557540e-03, & !1 - 2.784879e-02, 2.709863e-02, 2.619165e-02, 2.529230e-02, 2.443225e-02, & !2 - 2.361575e-02, 2.284021e-02, 2.210150e-02, 2.139548e-02, 2.071840e-02, & !2 - 2.006702e-02, 1.943856e-02, 1.883064e-02, 1.824120e-02, 1.766849e-02, & !2 - 1.711099e-02, 1.656737e-02, 1.603647e-02, 1.551727e-02, 1.500886e-02, & !2 - 1.451045e-02, 1.402132e-02, 1.354084e-02, 1.306842e-02, 1.260355e-02, & !2 - 1.214575e-02, 1.169460e-02, 1.124971e-02, 1.081072e-02, 1.037731e-02, & !2 - 9.949167e-03, 9.526021e-03, 9.107615e-03, 8.693714e-03, 8.284096e-03, & !2 - 7.878558e-03, 7.476910e-03, 7.078974e-03, 6.684586e-03, 6.293589e-03, & !2 - 5.905839e-03, 5.521200e-03, 5.139543e-03, & !2 - 1.065397e-01, 8.005726e-02, 6.546428e-02, 5.589131e-02, 4.898681e-02, & !3 - 4.369932e-02, 3.947901e-02, 3.600676e-02, 3.308299e-02, 3.057561e-02, & !3 - 2.839325e-02, 2.647040e-02, 2.475872e-02, 2.322164e-02, 2.183091e-02, & !3 - 2.056430e-02, 1.940407e-02, 1.833586e-02, 1.734787e-02, 1.643034e-02, & !3 - 1.557512e-02, 1.477530e-02, 1.402501e-02, 1.331924e-02, 1.265364e-02, & !3 - 1.202445e-02, 1.142838e-02, 1.086257e-02, 1.032445e-02, 9.811791e-03, & !3 - 9.322587e-03, 8.855053e-03, 8.407591e-03, 7.978763e-03, 7.567273e-03, & !3 - 7.171949e-03, 6.791728e-03, 6.425642e-03, 6.072809e-03, 5.732424e-03, & !3 - 5.403748e-03, 5.086103e-03, 4.778865e-03, & !3 - 1.804566e-01, 1.168987e-01, 8.680442e-02, 6.910060e-02, 5.738174e-02, & !4 - 4.902332e-02, 4.274585e-02, 3.784923e-02, 3.391734e-02, 3.068690e-02, & !4 - 2.798301e-02, 2.568480e-02, 2.370600e-02, 2.198337e-02, 2.046940e-02, & !4 - 1.912777e-02, 1.793016e-02, 1.685420e-02, 1.588193e-02, 1.499882e-02, & !4 - 1.419293e-02, 1.345440e-02, 1.277496e-02, 1.214769e-02, 1.156669e-02, & !4 - 1.102694e-02, 1.052412e-02, 1.005451e-02, 9.614854e-03, 9.202335e-03, & !4 - 8.814470e-03, 8.449077e-03, 8.104223e-03, 7.778195e-03, 7.469466e-03, & !4 - 7.176671e-03, 6.898588e-03, 6.634117e-03, 6.382264e-03, 6.142134e-03, & !4 - 5.912913e-03, 5.693862e-03, 5.484308e-03, & !4 - 2.131806e-01, 1.311372e-01, 9.407171e-02, 7.299442e-02, 5.941273e-02, & !5 - 4.994043e-02, 4.296242e-02, 3.761113e-02, 3.337910e-02, 2.994978e-02, & !5 - 2.711556e-02, 2.473461e-02, 2.270681e-02, 2.095943e-02, 1.943839e-02, & !5 - 1.810267e-02, 1.692057e-02, 1.586719e-02, 1.492275e-02, 1.407132e-02, & !5 - 1.329989e-02, 1.259780e-02, 1.195618e-02, 1.136761e-02, 1.082583e-02, & !5 - 1.032552e-02, 9.862158e-03, 9.431827e-03, 9.031157e-03, 8.657217e-03, & !5 - 8.307449e-03, 7.979609e-03, 7.671724e-03, 7.382048e-03, 7.109032e-03, & !5 - 6.851298e-03, 6.607615e-03, 6.376881e-03, 6.158105e-03, 5.950394e-03, & !5 - 5.752942e-03, 5.565019e-03, 5.385963e-03, & !5 - 1.546177e-01, 1.039251e-01, 7.910347e-02, 6.412429e-02, 5.399997e-02, & !6 - 4.664937e-02, 4.104237e-02, 3.660781e-02, 3.300218e-02, 3.000586e-02, & !6 - 2.747148e-02, 2.529633e-02, 2.340647e-02, 2.174723e-02, 2.027731e-02, & !6 - 1.896487e-02, 1.778492e-02, 1.671761e-02, 1.574692e-02, 1.485978e-02, & !6 - 1.404543e-02, 1.329489e-02, 1.260066e-02, 1.195636e-02, 1.135657e-02, & !6 - 1.079664e-02, 1.027257e-02, 9.780871e-03, 9.318505e-03, 8.882815e-03, & !6 - 8.471458e-03, 8.082364e-03, 7.713696e-03, 7.363817e-03, 7.031264e-03, & !6 - 6.714725e-03, 6.413021e-03, 6.125086e-03, 5.849958e-03, 5.586764e-03, & !6 - 5.334707e-03, 5.093066e-03, 4.861179e-03, & !6 - 7.583404e-02, 6.181558e-02, 5.312027e-02, 4.696039e-02, 4.225986e-02, & !7 - 3.849735e-02, 3.538340e-02, 3.274182e-02, 3.045798e-02, 2.845343e-02, & !7 - 2.667231e-02, 2.507353e-02, 2.362606e-02, 2.230595e-02, 2.109435e-02, & !7 - 1.997617e-02, 1.893916e-02, 1.797328e-02, 1.707016e-02, 1.622279e-02, & !7 - 1.542523e-02, 1.467241e-02, 1.395997e-02, 1.328414e-02, 1.264164e-02, & !7 - 1.202958e-02, 1.144544e-02, 1.088697e-02, 1.035218e-02, 9.839297e-03, & !7 - 9.346733e-03, 8.873057e-03, 8.416980e-03, 7.977335e-03, 7.553066e-03, & !7 - 7.143210e-03, 6.746888e-03, 6.363297e-03, 5.991700e-03, 5.631422e-03, & !7 - 5.281840e-03, 4.942378e-03, 4.612505e-03, & !7 - 9.022185e-02, 6.922700e-02, 5.710674e-02, 4.898377e-02, 4.305946e-02, & !8 - 3.849553e-02, 3.484183e-02, 3.183220e-02, 2.929794e-02, 2.712627e-02, & !8 - 2.523856e-02, 2.357810e-02, 2.210286e-02, 2.078089e-02, 1.958747e-02, & !8 - 1.850310e-02, 1.751218e-02, 1.660205e-02, 1.576232e-02, 1.498440e-02, & !8 - 1.426107e-02, 1.358624e-02, 1.295474e-02, 1.236212e-02, 1.180456e-02, & !8 - 1.127874e-02, 1.078175e-02, 1.031106e-02, 9.864433e-03, 9.439878e-03, & !8 - 9.035637e-03, 8.650140e-03, 8.281981e-03, 7.929895e-03, 7.592746e-03, & !8 - 7.269505e-03, 6.959238e-03, 6.661100e-03, 6.374317e-03, 6.098185e-03, & !8 - 5.832059e-03, 5.575347e-03, 5.327504e-03, & !8 - 1.294087e-01, 8.788217e-02, 6.728288e-02, 5.479720e-02, 4.635049e-02, & !9 - 4.022253e-02, 3.555576e-02, 3.187259e-02, 2.888498e-02, 2.640843e-02, & !9 - 2.431904e-02, 2.253038e-02, 2.098024e-02, 1.962267e-02, 1.842293e-02, & !9 - 1.735426e-02, 1.639571e-02, 1.553060e-02, 1.474552e-02, 1.402953e-02, & !9 - 1.337363e-02, 1.277033e-02, 1.221336e-02, 1.169741e-02, 1.121797e-02, & !9 - 1.077117e-02, 1.035369e-02, 9.962643e-03, 9.595509e-03, 9.250088e-03, & !9 - 8.924447e-03, 8.616876e-03, 8.325862e-03, 8.050057e-03, 7.788258e-03, & !9 - 7.539388e-03, 7.302478e-03, 7.076656e-03, 6.861134e-03, 6.655197e-03, & !9 - 6.458197e-03, 6.269543e-03, 6.088697e-03, & !9 - 1.593628e-01, 1.014552e-01, 7.458955e-02, 5.903571e-02, 4.887582e-02, & !10 - 4.171159e-02, 3.638480e-02, 3.226692e-02, 2.898717e-02, 2.631256e-02, & !10 - 2.408925e-02, 2.221156e-02, 2.060448e-02, 1.921325e-02, 1.799699e-02, & !10 - 1.692456e-02, 1.597177e-02, 1.511961e-02, 1.435289e-02, 1.365933e-02, & !10 - 1.302890e-02, 1.245334e-02, 1.192576e-02, 1.144037e-02, 1.099230e-02, & !10 - 1.057739e-02, 1.019208e-02, 9.833302e-03, 9.498395e-03, 9.185047e-03, & !10 - 8.891237e-03, 8.615185e-03, 8.355325e-03, 8.110267e-03, 7.878778e-03, & !10 - 7.659759e-03, 7.452224e-03, 7.255291e-03, 7.068166e-03, 6.890130e-03, & !10 - 6.720536e-03, 6.558794e-03, 6.404371e-03, & !10 - 1.656227e-01, 1.032129e-01, 7.487359e-02, 5.871431e-02, 4.828355e-02, & !11 - 4.099989e-02, 3.562924e-02, 3.150755e-02, 2.824593e-02, 2.560156e-02, & !11 - 2.341503e-02, 2.157740e-02, 2.001169e-02, 1.866199e-02, 1.748669e-02, & !11 - 1.645421e-02, 1.554015e-02, 1.472535e-02, 1.399457e-02, 1.333553e-02, & !11 - 1.273821e-02, 1.219440e-02, 1.169725e-02, 1.124104e-02, 1.082096e-02, & !11 - 1.043290e-02, 1.007336e-02, 9.739338e-03, 9.428223e-03, 9.137756e-03, & !11 - 8.865964e-03, 8.611115e-03, 8.371686e-03, 8.146330e-03, 7.933852e-03, & !11 - 7.733187e-03, 7.543386e-03, 7.363597e-03, 7.193056e-03, 7.031072e-03, & !11 - 6.877024e-03, 6.730348e-03, 6.590531e-03, & !11 - 9.194591e-02, 6.446867e-02, 4.962034e-02, 4.042061e-02, 3.418456e-02, & !12 - 2.968856e-02, 2.629900e-02, 2.365572e-02, 2.153915e-02, 1.980791e-02, & !12 - 1.836689e-02, 1.714979e-02, 1.610900e-02, 1.520946e-02, 1.442476e-02, & !12 - 1.373468e-02, 1.312345e-02, 1.257858e-02, 1.209010e-02, 1.164990e-02, & !12 - 1.125136e-02, 1.088901e-02, 1.055827e-02, 1.025531e-02, 9.976896e-03, & !12 - 9.720255e-03, 9.483022e-03, 9.263160e-03, 9.058902e-03, 8.868710e-03, & !12 - 8.691240e-03, 8.525312e-03, 8.369886e-03, 8.224042e-03, 8.086961e-03, & !12 - 7.957917e-03, 7.836258e-03, 7.721400e-03, 7.612821e-03, 7.510045e-03, & !12 - 7.412648e-03, 7.320242e-03, 7.232476e-03, & !12 - 1.437021e-01, 8.872535e-02, 6.392420e-02, 4.991833e-02, 4.096790e-02, & !13 - 3.477881e-02, 3.025782e-02, 2.681909e-02, 2.412102e-02, 2.195132e-02, & !13 - 2.017124e-02, 1.868641e-02, 1.743044e-02, 1.635529e-02, 1.542540e-02, & !13 - 1.461388e-02, 1.390003e-02, 1.326766e-02, 1.270395e-02, 1.219860e-02, & !13 - 1.174326e-02, 1.133107e-02, 1.095637e-02, 1.061442e-02, 1.030126e-02, & !13 - 1.001352e-02, 9.748340e-03, 9.503256e-03, 9.276155e-03, 9.065205e-03, & !13 - 8.868808e-03, 8.685571e-03, 8.514268e-03, 8.353820e-03, 8.203272e-03, & !13 - 8.061776e-03, 7.928578e-03, 7.803001e-03, 7.684443e-03, 7.572358e-03, & !13 - 7.466258e-03, 7.365701e-03, 7.270286e-03, & !13 - 1.288870e-01, 8.160295e-02, 5.964745e-02, 4.703790e-02, 3.888637e-02, & !14 - 3.320115e-02, 2.902017e-02, 2.582259e-02, 2.330224e-02, 2.126754e-02, & !14 - 1.959258e-02, 1.819130e-02, 1.700289e-02, 1.598320e-02, 1.509942e-02, & !14 - 1.432666e-02, 1.364572e-02, 1.304156e-02, 1.250220e-02, 1.201803e-02, & !14 - 1.158123e-02, 1.118537e-02, 1.082513e-02, 1.049605e-02, 1.019440e-02, & !14 - 9.916989e-03, 9.661116e-03, 9.424457e-03, 9.205005e-03, 9.001022e-03, & !14 - 8.810992e-03, 8.633588e-03, 8.467646e-03, 8.312137e-03, 8.166151e-03, & !14 - 8.028878e-03, 7.899597e-03, 7.777663e-03, 7.662498e-03, 7.553581e-03, & !14 - 7.450444e-03, 7.352662e-03, 7.259851e-03, & !14 - 8.254229e-02, 5.808787e-02, 4.492166e-02, 3.675028e-02, 3.119623e-02, & !15 - 2.718045e-02, 2.414450e-02, 2.177073e-02, 1.986526e-02, 1.830306e-02, & !15 - 1.699991e-02, 1.589698e-02, 1.495199e-02, 1.413374e-02, 1.341870e-02, & !15 - 1.278883e-02, 1.223002e-02, 1.173114e-02, 1.128322e-02, 1.087900e-02, & !15 - 1.051254e-02, 1.017890e-02, 9.873991e-03, 9.594347e-03, 9.337044e-03, & !15 - 9.099589e-03, 8.879842e-03, 8.675960e-03, 8.486341e-03, 8.309594e-03, & !15 - 8.144500e-03, 7.989986e-03, 7.845109e-03, 7.709031e-03, 7.581007e-03, & !15 - 7.460376e-03, 7.346544e-03, 7.238978e-03, 7.137201e-03, 7.040780e-03, & !15 - 6.949325e-03, 6.862483e-03, 6.779931e-03, & !15 - 1.382062e-01, 8.643227e-02, 6.282935e-02, 4.934783e-02, 4.063891e-02, & !16 - 3.455591e-02, 3.007059e-02, 2.662897e-02, 2.390631e-02, 2.169972e-02, & !16 - 1.987596e-02, 1.834393e-02, 1.703924e-02, 1.591513e-02, 1.493679e-02, & !16 - 1.407780e-02, 1.331775e-02, 1.264061e-02, 1.203364e-02, 1.148655e-02, & !16 - 1.099099e-02, 1.054006e-02, 1.012807e-02, 9.750215e-03, 9.402477e-03, & !16 - 9.081428e-03, 8.784143e-03, 8.508107e-03, 8.251146e-03, 8.011373e-03, & !16 - 7.787140e-03, 7.577002e-03, 7.379687e-03, 7.194071e-03, 7.019158e-03, & !16 - 6.854061e-03, 6.697986e-03, 6.550224e-03, 6.410138e-03, 6.277153e-03, & !16 - 6.150751e-03, 6.030462e-03, 5.915860e-03/), & !16 - shape=(/43,nBandsLW_RRTMG/)) - - real(kind_phys) , dimension(46,nBandsLW_RRTMG),parameter :: & - absice3 = reshape(source=(/ & - 3.110649e-03, 4.666352e-02, 6.606447e-02, 6.531678e-02, 6.012598e-02, & !1 - 5.437494e-02, 4.906411e-02, 4.441146e-02, 4.040585e-02, 3.697334e-02, & !1 - 3.403027e-02, 3.149979e-02, 2.931596e-02, 2.742365e-02, 2.577721e-02, & !1 - 2.433888e-02, 2.307732e-02, 2.196644e-02, 2.098437e-02, 2.011264e-02, & !1 - 1.933561e-02, 1.863992e-02, 1.801407e-02, 1.744812e-02, 1.693346e-02, & !1 - 1.646252e-02, 1.602866e-02, 1.562600e-02, 1.524933e-02, 1.489399e-02, & !1 - 1.455580e-02, 1.423098e-02, 1.391612e-02, 1.360812e-02, 1.330413e-02, & !1 - 1.300156e-02, 1.269801e-02, 1.239127e-02, 1.207928e-02, 1.176014e-02, & !1 - 1.143204e-02, 1.109334e-02, 1.074243e-02, 1.037786e-02, 9.998198e-03, & !1 - 9.602126e-03, & !1 - 3.984966e-04, 1.681097e-02, 2.627680e-02, 2.767465e-02, 2.700722e-02, & !2 - 2.579180e-02, 2.448677e-02, 2.323890e-02, 2.209096e-02, 2.104882e-02, & !2 - 2.010547e-02, 1.925003e-02, 1.847128e-02, 1.775883e-02, 1.710358e-02, & !2 - 1.649769e-02, 1.593449e-02, 1.540829e-02, 1.491429e-02, 1.444837e-02, & !2 - 1.400704e-02, 1.358729e-02, 1.318654e-02, 1.280258e-02, 1.243346e-02, & !2 - 1.207750e-02, 1.173325e-02, 1.139941e-02, 1.107487e-02, 1.075861e-02, & !2 - 1.044975e-02, 1.014753e-02, 9.851229e-03, 9.560240e-03, 9.274003e-03, & !2 - 8.992020e-03, 8.713845e-03, 8.439074e-03, 8.167346e-03, 7.898331e-03, & !2 - 7.631734e-03, 7.367286e-03, 7.104742e-03, 6.843882e-03, 6.584504e-03, & !2 - 6.326424e-03, & !2 - 6.933163e-02, 8.540475e-02, 7.701816e-02, 6.771158e-02, 5.986953e-02, & !3 - 5.348120e-02, 4.824962e-02, 4.390563e-02, 4.024411e-02, 3.711404e-02, & !3 - 3.440426e-02, 3.203200e-02, 2.993478e-02, 2.806474e-02, 2.638464e-02, & !3 - 2.486516e-02, 2.348288e-02, 2.221890e-02, 2.105780e-02, 1.998687e-02, & !3 - 1.899552e-02, 1.807490e-02, 1.721750e-02, 1.641693e-02, 1.566773e-02, & !3 - 1.496515e-02, 1.430509e-02, 1.368398e-02, 1.309865e-02, 1.254634e-02, & !3 - 1.202456e-02, 1.153114e-02, 1.106409e-02, 1.062166e-02, 1.020224e-02, & !3 - 9.804381e-03, 9.426771e-03, 9.068205e-03, 8.727578e-03, 8.403876e-03, & !3 - 8.096160e-03, 7.803564e-03, 7.525281e-03, 7.260560e-03, 7.008697e-03, & !3 - 6.769036e-03, & !3 - 1.765735e-01, 1.382700e-01, 1.095129e-01, 8.987475e-02, 7.591185e-02, & !4 - 6.554169e-02, 5.755500e-02, 5.122083e-02, 4.607610e-02, 4.181475e-02, & !4 - 3.822697e-02, 3.516432e-02, 3.251897e-02, 3.021073e-02, 2.817876e-02, & !4 - 2.637607e-02, 2.476582e-02, 2.331871e-02, 2.201113e-02, 2.082388e-02, & !4 - 1.974115e-02, 1.874983e-02, 1.783894e-02, 1.699922e-02, 1.622280e-02, & !4 - 1.550296e-02, 1.483390e-02, 1.421064e-02, 1.362880e-02, 1.308460e-02, & !4 - 1.257468e-02, 1.209611e-02, 1.164628e-02, 1.122287e-02, 1.082381e-02, & !4 - 1.044725e-02, 1.009154e-02, 9.755166e-03, 9.436783e-03, 9.135163e-03, & !4 - 8.849193e-03, 8.577856e-03, 8.320225e-03, 8.075451e-03, 7.842755e-03, & !4 - 7.621418e-03, & !4 - 2.339673e-01, 1.692124e-01, 1.291656e-01, 1.033837e-01, 8.562949e-02, & !5 - 7.273526e-02, 6.298262e-02, 5.537015e-02, 4.927787e-02, 4.430246e-02, & !5 - 4.017061e-02, 3.669072e-02, 3.372455e-02, 3.116995e-02, 2.894977e-02, & !5 - 2.700471e-02, 2.528842e-02, 2.376420e-02, 2.240256e-02, 2.117959e-02, & !5 - 2.007567e-02, 1.907456e-02, 1.816271e-02, 1.732874e-02, 1.656300e-02, & !5 - 1.585725e-02, 1.520445e-02, 1.459852e-02, 1.403419e-02, 1.350689e-02, & !5 - 1.301260e-02, 1.254781e-02, 1.210941e-02, 1.169468e-02, 1.130118e-02, & !5 - 1.092675e-02, 1.056945e-02, 1.022757e-02, 9.899560e-03, 9.584021e-03, & !5 - 9.279705e-03, 8.985479e-03, 8.700322e-03, 8.423306e-03, 8.153590e-03, & !5 - 7.890412e-03, & !5 - 1.145369e-01, 1.174566e-01, 9.917866e-02, 8.332990e-02, 7.104263e-02, & !6 - 6.153370e-02, 5.405472e-02, 4.806281e-02, 4.317918e-02, 3.913795e-02, & !6 - 3.574916e-02, 3.287437e-02, 3.041067e-02, 2.828017e-02, 2.642292e-02, & !6 - 2.479206e-02, 2.335051e-02, 2.206851e-02, 2.092195e-02, 1.989108e-02, & !6 - 1.895958e-02, 1.811385e-02, 1.734245e-02, 1.663573e-02, 1.598545e-02, & !6 - 1.538456e-02, 1.482700e-02, 1.430750e-02, 1.382150e-02, 1.336499e-02, & !6 - 1.293447e-02, 1.252685e-02, 1.213939e-02, 1.176968e-02, 1.141555e-02, & !6 - 1.107508e-02, 1.074655e-02, 1.042839e-02, 1.011923e-02, 9.817799e-03, & !6 - 9.522962e-03, 9.233688e-03, 8.949041e-03, 8.668171e-03, 8.390301e-03, & !6 - 8.114723e-03, & !6 - 1.222345e-02, 5.344230e-02, 5.523465e-02, 5.128759e-02, 4.676925e-02, & !7 - 4.266150e-02, 3.910561e-02, 3.605479e-02, 3.342843e-02, 3.115052e-02, & !7 - 2.915776e-02, 2.739935e-02, 2.583499e-02, 2.443266e-02, 2.316681e-02, & !7 - 2.201687e-02, 2.096619e-02, 2.000112e-02, 1.911044e-02, 1.828481e-02, & !7 - 1.751641e-02, 1.679866e-02, 1.612598e-02, 1.549360e-02, 1.489742e-02, & !7 - 1.433392e-02, 1.380002e-02, 1.329305e-02, 1.281068e-02, 1.235084e-02, & !7 - 1.191172e-02, 1.149171e-02, 1.108936e-02, 1.070341e-02, 1.033271e-02, & !7 - 9.976220e-03, 9.633021e-03, 9.302273e-03, 8.983216e-03, 8.675161e-03, & !7 - 8.377478e-03, 8.089595e-03, 7.810986e-03, 7.541170e-03, 7.279706e-03, & !7 - 7.026186e-03, & !7 - 6.711058e-02, 6.918198e-02, 6.127484e-02, 5.411944e-02, 4.836902e-02, & !8 - 4.375293e-02, 3.998077e-02, 3.683587e-02, 3.416508e-02, 3.186003e-02, & !8 - 2.984290e-02, 2.805671e-02, 2.645895e-02, 2.501733e-02, 2.370689e-02, & !8 - 2.250808e-02, 2.140532e-02, 2.038609e-02, 1.944018e-02, 1.855918e-02, & !8 - 1.773609e-02, 1.696504e-02, 1.624106e-02, 1.555990e-02, 1.491793e-02, & !8 - 1.431197e-02, 1.373928e-02, 1.319743e-02, 1.268430e-02, 1.219799e-02, & !8 - 1.173682e-02, 1.129925e-02, 1.088393e-02, 1.048961e-02, 1.011516e-02, & !8 - 9.759543e-03, 9.421813e-03, 9.101089e-03, 8.796559e-03, 8.507464e-03, & !8 - 8.233098e-03, 7.972798e-03, 7.725942e-03, 7.491940e-03, 7.270238e-03, & !8 - 7.060305e-03, & !8 - 1.236780e-01, 9.222386e-02, 7.383997e-02, 6.204072e-02, 5.381029e-02, & !9 - 4.770678e-02, 4.296928e-02, 3.916131e-02, 3.601540e-02, 3.335878e-02, & !9 - 3.107493e-02, 2.908247e-02, 2.732282e-02, 2.575276e-02, 2.433968e-02, & !9 - 2.305852e-02, 2.188966e-02, 2.081757e-02, 1.982974e-02, 1.891599e-02, & !9 - 1.806794e-02, 1.727865e-02, 1.654227e-02, 1.585387e-02, 1.520924e-02, & !9 - 1.460476e-02, 1.403730e-02, 1.350416e-02, 1.300293e-02, 1.253153e-02, & !9 - 1.208808e-02, 1.167094e-02, 1.127862e-02, 1.090979e-02, 1.056323e-02, & !9 - 1.023786e-02, 9.932665e-03, 9.646744e-03, 9.379250e-03, 9.129409e-03, & !9 - 8.896500e-03, 8.679856e-03, 8.478852e-03, 8.292904e-03, 8.121463e-03, & !9 - 7.964013e-03, & !9 - 1.655966e-01, 1.134205e-01, 8.714344e-02, 7.129241e-02, 6.063739e-02, & !10 - 5.294203e-02, 4.709309e-02, 4.247476e-02, 3.871892e-02, 3.559206e-02, & !10 - 3.293893e-02, 3.065226e-02, 2.865558e-02, 2.689288e-02, 2.532221e-02, & !10 - 2.391150e-02, 2.263582e-02, 2.147549e-02, 2.041476e-02, 1.944089e-02, & !10 - 1.854342e-02, 1.771371e-02, 1.694456e-02, 1.622989e-02, 1.556456e-02, & !10 - 1.494415e-02, 1.436491e-02, 1.382354e-02, 1.331719e-02, 1.284339e-02, & !10 - 1.239992e-02, 1.198486e-02, 1.159647e-02, 1.123323e-02, 1.089375e-02, & !10 - 1.057679e-02, 1.028124e-02, 1.000607e-02, 9.750376e-03, 9.513303e-03, & !10 - 9.294082e-03, 9.092003e-03, 8.906412e-03, 8.736702e-03, 8.582314e-03, & !10 - 8.442725e-03, & !10 - 1.775615e-01, 1.180046e-01, 8.929607e-02, 7.233500e-02, 6.108333e-02, & !11 - 5.303642e-02, 4.696927e-02, 4.221206e-02, 3.836768e-02, 3.518576e-02, & !11 - 3.250063e-02, 3.019825e-02, 2.819758e-02, 2.643943e-02, 2.487953e-02, & !11 - 2.348414e-02, 2.222705e-02, 2.108762e-02, 2.004936e-02, 1.909892e-02, & !11 - 1.822539e-02, 1.741975e-02, 1.667449e-02, 1.598330e-02, 1.534084e-02, & !11 - 1.474253e-02, 1.418446e-02, 1.366325e-02, 1.317597e-02, 1.272004e-02, & !11 - 1.229321e-02, 1.189350e-02, 1.151915e-02, 1.116859e-02, 1.084042e-02, & !11 - 1.053338e-02, 1.024636e-02, 9.978326e-03, 9.728357e-03, 9.495613e-03, & !11 - 9.279327e-03, 9.078798e-03, 8.893383e-03, 8.722488e-03, 8.565568e-03, & !11 - 8.422115e-03, & !11 - 9.465447e-02, 6.432047e-02, 5.060973e-02, 4.267283e-02, 3.741843e-02, & !12 - 3.363096e-02, 3.073531e-02, 2.842405e-02, 2.651789e-02, 2.490518e-02, & !12 - 2.351273e-02, 2.229056e-02, 2.120335e-02, 2.022541e-02, 1.933763e-02, & !12 - 1.852546e-02, 1.777763e-02, 1.708528e-02, 1.644134e-02, 1.584009e-02, & !12 - 1.527684e-02, 1.474774e-02, 1.424955e-02, 1.377957e-02, 1.333549e-02, & !12 - 1.291534e-02, 1.251743e-02, 1.214029e-02, 1.178265e-02, 1.144337e-02, & !12 - 1.112148e-02, 1.081609e-02, 1.052642e-02, 1.025178e-02, 9.991540e-03, & !12 - 9.745130e-03, 9.512038e-03, 9.291797e-03, 9.083980e-03, 8.888195e-03, & !12 - 8.704081e-03, 8.531306e-03, 8.369560e-03, 8.218558e-03, 8.078032e-03, & !12 - 7.947730e-03, & !12 - 1.560311e-01, 9.961097e-02, 7.502949e-02, 6.115022e-02, 5.214952e-02, & !13 - 4.578149e-02, 4.099731e-02, 3.724174e-02, 3.419343e-02, 3.165356e-02, & !13 - 2.949251e-02, 2.762222e-02, 2.598073e-02, 2.452322e-02, 2.321642e-02, & !13 - 2.203516e-02, 2.096002e-02, 1.997579e-02, 1.907036e-02, 1.823401e-02, & !13 - 1.745879e-02, 1.673819e-02, 1.606678e-02, 1.544003e-02, 1.485411e-02, & !13 - 1.430574e-02, 1.379215e-02, 1.331092e-02, 1.285996e-02, 1.243746e-02, & !13 - 1.204183e-02, 1.167164e-02, 1.132567e-02, 1.100281e-02, 1.070207e-02, & !13 - 1.042258e-02, 1.016352e-02, 9.924197e-03, 9.703953e-03, 9.502199e-03, & !13 - 9.318400e-03, 9.152066e-03, 9.002749e-03, 8.870038e-03, 8.753555e-03, & !13 - 8.652951e-03, & !13 - 1.559547e-01, 9.896700e-02, 7.441231e-02, 6.061469e-02, 5.168730e-02, & !14 - 4.537821e-02, 4.064106e-02, 3.692367e-02, 3.390714e-02, 3.139438e-02, & !14 - 2.925702e-02, 2.740783e-02, 2.578547e-02, 2.434552e-02, 2.305506e-02, & !14 - 2.188910e-02, 2.082842e-02, 1.985789e-02, 1.896553e-02, 1.814165e-02, & !14 - 1.737839e-02, 1.666927e-02, 1.600891e-02, 1.539279e-02, 1.481712e-02, & !14 - 1.427865e-02, 1.377463e-02, 1.330266e-02, 1.286068e-02, 1.244689e-02, & !14 - 1.205973e-02, 1.169780e-02, 1.135989e-02, 1.104492e-02, 1.075192e-02, & !14 - 1.048004e-02, 1.022850e-02, 9.996611e-03, 9.783753e-03, 9.589361e-03, & !14 - 9.412924e-03, 9.253977e-03, 9.112098e-03, 8.986903e-03, 8.878039e-03, & !14 - 8.785184e-03, & !14 - 1.102926e-01, 7.176622e-02, 5.530316e-02, 4.606056e-02, 4.006116e-02, & !15 - 3.579628e-02, 3.256909e-02, 3.001360e-02, 2.791920e-02, 2.615617e-02, & !15 - 2.464023e-02, 2.331426e-02, 2.213817e-02, 2.108301e-02, 2.012733e-02, & !15 - 1.925493e-02, 1.845331e-02, 1.771269e-02, 1.702531e-02, 1.638493e-02, & !15 - 1.578648e-02, 1.522579e-02, 1.469940e-02, 1.420442e-02, 1.373841e-02, & !15 - 1.329931e-02, 1.288535e-02, 1.249502e-02, 1.212700e-02, 1.178015e-02, & !15 - 1.145348e-02, 1.114612e-02, 1.085730e-02, 1.058633e-02, 1.033263e-02, & !15 - 1.009564e-02, 9.874895e-03, 9.669960e-03, 9.480449e-03, 9.306014e-03, & !15 - 9.146339e-03, 9.001138e-03, 8.870154e-03, 8.753148e-03, 8.649907e-03, & !15 - 8.560232e-03, & !15 - 1.688344e-01, 1.077072e-01, 7.994467e-02, 6.403862e-02, 5.369850e-02, & !16 - 4.641582e-02, 4.099331e-02, 3.678724e-02, 3.342069e-02, 3.065831e-02, & !16 - 2.834557e-02, 2.637680e-02, 2.467733e-02, 2.319286e-02, 2.188299e-02, & !16 - 2.071701e-02, 1.967121e-02, 1.872692e-02, 1.786931e-02, 1.708641e-02, & !16 - 1.636846e-02, 1.570743e-02, 1.509665e-02, 1.453052e-02, 1.400433e-02, & !16 - 1.351407e-02, 1.305631e-02, 1.262810e-02, 1.222688e-02, 1.185044e-02, & !16 - 1.149683e-02, 1.116436e-02, 1.085153e-02, 1.055701e-02, 1.027961e-02, & !16 - 1.001831e-02, 9.772141e-03, 9.540280e-03, 9.321966e-03, 9.116517e-03, & !16 - 8.923315e-03, 8.741803e-03, 8.571472e-03, 8.411860e-03, 8.262543e-03, & !16 - 8.123136e-03/), & !16 - shape=(/46,nBandsLW_RRTMG/)) -contains - ! ####################################################################################### - ! subroutine rrtmgp_lw_cloud_optics - ! ####################################################################################### - subroutine rrtmgp_lw_cloud_optics(ncol, nlay, nBandsLW, cld_lwp, cld_ref_liq, cld_iwp, & - cld_ref_ice, cld_rwp, cld_ref_rain, cld_swp, cld_ref_snow, cld_frac, tau_cld) ! Inputs + type(GFS_control_type), intent(in) :: & + Model ! DDT containing model control parameters integer,intent(in) :: & - nBandsLW, & ! Number of spectral bands - ncol, & ! Number of horizontal gridpoints - nlay ! Number of vertical layers - real(kind_phys), dimension(ncol,nlay), intent(in) :: & - cld_frac, & ! Cloud-fraction (1) - cld_lwp, & ! Cloud liquid water path (g/m2) - cld_ref_liq, & ! Effective radius (liquid) (micron) - cld_iwp, & ! Cloud ice water path (g/m2) - cld_ref_ice, & ! Effective radius (ice) (micron) - cld_rwp, & ! Cloud rain water path (g/m2) - cld_ref_rain, & ! Effective radius (rain-drop) (micron) - cld_swp, & ! Cloud snow-water path (g/m2) - cld_ref_snow ! Effective radius (snow-flake) (micron) + mpicomm, & ! MPI communicator + mpirank, & ! Current MPI rank + mpiroot ! Master MPI rank + + ! Outputs + type(ty_cloud_optics),intent(out) :: & + lw_cloud_props ! DDT containing spectral information for RRTMGP LW radiation scheme + character(len=*), intent(out) :: & + errmsg ! Error message + integer, intent(out) :: & + errflg ! Error code - ! Outputs - real(kind_phys),dimension(ncol,nlay,nBandsLW),intent(out) :: & - tau_cld + ! Variables that will be passed to cloud_optics%load() + real(kind_phys) :: & + radliq_lwr, & ! used by RRTMGP cloud optics + radliq_upr, & ! used by RRTMGP cloud optics + radliq_fac, & ! used by RRTMGP cloud optics + radice_lwr, & ! used by RRTMGP cloud optics + radice_upr, & ! used by RRTMGP cloud optics + radice_fac ! used by RRTMGP cloud optics + real(kind_phys), dimension(:), allocatable :: & + pade_sizereg_extliq, & ! used by RRTMGP cloud optics + pade_sizereg_ssaliq, & ! used by RRTMGP cloud optics + pade_sizereg_asyliq, & ! used by RRTMGP cloud optics + pade_sizereg_extice, & ! used by RRTMGP cloud optics + pade_sizereg_ssaice, & ! used by RRTMGP cloud optics + pade_sizereg_asyice ! used by RRTMGP cloud optics + real(kind_phys), dimension(:,:), allocatable :: & + lut_extliq, & ! used by RRTMGP cloud optics + lut_ssaliq, & ! used by RRTMGP cloud optics + lut_asyliq, & ! used by RRTMGP cloud optics + band_lims_cldy ! used by RRTMGP cloud optics - ! Local variables - integer :: ij,ik,ib,index,ia - real(kind_phys) :: factor,fint,cld_ref_iceTemp,tau_snow, tau_rain - real(kind_phys),dimension(nBandsLW) :: tau_liq, tau_ice + real(kind_phys), dimension(:,:,:), allocatable :: & + lut_extice, & ! used by RRTMGP cloud optics + lut_ssaice, & ! used by RRTMGP cloud optics + lut_asyice, & ! used by RRTMGP cloud optics + pade_extliq, & ! used by RRTMGP cloud optics + pade_ssaliq, & ! used by RRTMGP cloud optics + pade_asyliq ! used by RRTMGP cloud optics + real(kind_phys), dimension(:,:,:,:), allocatable :: & + pade_extice, & ! used by RRTMGP cloud optics + pade_ssaice, & ! used by RRTMGP cloud optics + pade_asyice ! used by RRTMGP cloud optics + ! Dimensions + integer :: & + nbandLWcldy, & ! used by RRTMGP cloud optics + nsize_liq, & ! used by RRTMGP cloud optics + nsize_ice, & ! used by RRTMGP cloud optics + nsizereg, & ! used by RRTMGP cloud optics + ncoeff_ext, & ! used by RRTMGP cloud optics + ncoeff_ssa_g, & ! used by RRTMGP cloud optics + nbound, & ! used by RRTMGP cloud optics + npairsLWcldy ! used by RRTMGP cloud optics - if (ilwcliq .gt. 0) then - do ij=1,ncol - do ik=1,nlay - if (cld_frac(ij,ik) .gt. 0.) then - ! Rain optical-depth (No band dependence) - tau_rain = absrain*cld_rwp(ij,ik) + ! Local variables + integer :: dimID,varID,status,igpt,iGas,ij,ierr,ncid_lw_clds + integer,dimension(:),allocatable :: temp1,temp2,temp3,temp4,temp_log_array1,& + temp_log_array2, temp_log_array3, temp_log_array4 + character(len=264) :: lw_cloud_props_file + integer,parameter :: max_strlen=256 - ! Snow optical-depth (No band dependence) - if (cld_swp(ij,ik) .gt. 0. .and. cld_ref_snow(ij,ik) .gt. 10._kind_phys) then - tau_snow = abssnow0*1.05756*cld_swp(ij,ik)/cld_ref_snow(ij,ik) - else - tau_snow = 0. - endif + ! Initialize + errmsg = '' + errflg = 0 - ! Liquid water opitcal-depth - if (cld_lwp(ij,ik) .le. 0.) then - tau_liq(:) = 0. - else - if (ilwcliq .eq. 1) then - factor = cld_ref_liq(ij,ik) - 1.5 - index = max( 1, min( 57, int( factor ) )) - fint = factor - float(index) - do ib=1,nBandsLW - tau_liq(ib) = max(0., cld_lwp(ij,ik)*(absliq1(index,ib) + & - fint*(absliq1(index+1,ib)-absliq1(index,ib)) )) - enddo - endif - endif + ! Filenames are set in the gfs_physics_nml (scm/src/GFS_typedefs.F90) + lw_cloud_props_file = trim(Model%rrtmgp_root)//trim(Model%lw_file_clouds) + ! Read dimensions for k-distribution fields (only on master processor(0)) + if (mpirank .eq. mpiroot) then + if(nf90_open(trim(lw_cloud_props_file), NF90_WRITE, ncid_lw_clds) == NF90_NOERR) then + status = nf90_inq_dimid(ncid_lw_clds, 'nband', dimid) + status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=nbandLWcldy) + status = nf90_inq_dimid(ncid_lw_clds, 'nrghice', dimid) + status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=nrghice_lw) + status = nf90_inq_dimid(ncid_lw_clds, 'nsize_liq', dimid) + status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=nsize_liq) + status = nf90_inq_dimid(ncid_lw_clds, 'nsize_ice', dimid) + status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=nsize_ice) + status = nf90_inq_dimid(ncid_lw_clds, 'nsizereg', dimid) + status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=nsizereg) + status = nf90_inq_dimid(ncid_lw_clds, 'ncoeff_ext', dimid) + status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=ncoeff_ext) + status = nf90_inq_dimid(ncid_lw_clds, 'ncoeff_ssa_g', dimid) + status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=ncoeff_ssa_g) + status = nf90_inq_dimid(ncid_lw_clds, 'nbound', dimid) + status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=nbound) + status = nf90_inq_dimid(ncid_lw_clds, 'pair', dimid) + status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=npairsLWcldy) + status = nf90_close(ncid_lw_clds) + endif + endif - ! Ice water optical-depth - if (cld_iwp(ij,ik) .le. 0.) then - tau_ice(:) = 0. - else - ! 1) Ebert and curry approach for all particle sizes. (bound between 13-130microns) - if (ilwcice .eq. 1) then - cld_ref_iceTemp = min(130., max(13.,real(cld_ref_ice(ij,ik)))) - do ib=1,nBandsLW - ia = ipat(ib) ! eb_&_c band index for ice cloud coeff - tau_ice(ib) = max(0., cld_iwp(ij,ik)*(absice1(1,ia) + absice1(2,ia)/cld_ref_iceTemp) ) - enddo + ! Broadcast dimensions to all processors +#ifdef MPI + if (Model%rrtmgp_cld_optics .eq. 1 .or. Model%rrtmgp_cld_optics .eq. 2) then + call MPI_BCAST(nbandLWcldy, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nrghice_lw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nsize_liq, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nsize_ice, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nsizereg, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(ncoeff_ext, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(ncoeff_ssa_g, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nbound, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(npairsLWcldy, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + endif +#endif + + if (Model%rrtmgp_cld_optics .eq. 1) then + allocate(lut_extliq(nsize_liq, nBandLWcldy)) + allocate(lut_ssaliq(nsize_liq, nBandLWcldy)) + allocate(lut_asyliq(nsize_liq, nBandLWcldy)) + allocate(lut_extice(nsize_ice, nBandLWcldy, nrghice_lw)) + allocate(lut_ssaice(nsize_ice, nBandLWcldy, nrghice_lw)) + allocate(lut_asyice(nsize_ice, nBandLWcldy, nrghice_lw)) + allocate(band_lims_cldy(2, nBandLWcldy)) + endif + if (Model%rrtmgp_cld_optics .eq. 2) then + allocate(pade_extliq(nbandLWcldy, nsizereg, ncoeff_ext )) + allocate(pade_ssaliq(nbandLWcldy, nsizereg, ncoeff_ssa_g)) + allocate(pade_asyliq(nbandLWcldy, nsizereg, ncoeff_ssa_g)) + allocate(pade_extice(nbandLWcldy, nsizereg, ncoeff_ext, nrghice_lw)) + allocate(pade_ssaice(nbandLWcldy, nsizereg, ncoeff_ssa_g, nrghice_lw)) + allocate(pade_asyice(nbandLWcldy, nsizereg, ncoeff_ssa_g, nrghice_lw)) + allocate(pade_sizereg_extliq(nbound)) + allocate(pade_sizereg_ssaliq(nbound)) + allocate(pade_sizereg_asyliq(nbound)) + allocate(pade_sizereg_extice(nbound)) + allocate(pade_sizereg_ssaice(nbound)) + allocate(pade_sizereg_asyice(nbound)) + allocate(band_lims_cldy(2,nbandLWcldy)) + endif + + ! On master processor, allocate space, read in fields, broadcast to all processors + if (mpirank .eq. mpiroot) then + ! + if (Model%rrtmgp_cld_optics .eq. 1) then + ! + if(nf90_open(trim(lw_cloud_props_file), NF90_WRITE, ncid_lw_clds) == NF90_NOERR) then + status = nf90_inq_varid(ncid_lw_clds,'radliq_lwr',varID) + status = nf90_get_var(ncid_lw_clds,varID,radliq_lwr) + status = nf90_inq_varid(ncid_lw_clds,'radliq_upr',varID) + status = nf90_get_var(ncid_lw_clds,varID,radliq_upr) + status = nf90_inq_varid(ncid_lw_clds,'radliq_fac',varID) + status = nf90_get_var(ncid_lw_clds,varID,radliq_fac) + status = nf90_inq_varid(ncid_lw_clds,'radice_lwr',varID) + status = nf90_get_var(ncid_lw_clds,varID,radice_lwr) + status = nf90_inq_varid(ncid_lw_clds,'radice_upr',varID) + status = nf90_get_var(ncid_lw_clds,varID,radice_upr) + status = nf90_inq_varid(ncid_lw_clds,'radice_fac',varID) + status = nf90_get_var(ncid_lw_clds,varID,radice_fac) + status = nf90_inq_varid(ncid_lw_clds,'lut_extliq',varID) + status = nf90_get_var(ncid_lw_clds,varID,lut_extliq) + status = nf90_inq_varid(ncid_lw_clds,'lut_ssaliq',varID) + status = nf90_get_var(ncid_lw_clds,varID,lut_ssaliq) + status = nf90_inq_varid(ncid_lw_clds,'lut_asyliq',varID) + status = nf90_get_var(ncid_lw_clds,varID,lut_asyliq) + status = nf90_inq_varid(ncid_lw_clds,'lut_extice',varID) + status = nf90_get_var(ncid_lw_clds,varID,lut_extice) + status = nf90_inq_varid(ncid_lw_clds,'lut_ssaice',varID) + status = nf90_get_var(ncid_lw_clds,varID,lut_ssaice) + status = nf90_inq_varid(ncid_lw_clds,'lut_asyice',varID) + status = nf90_get_var(ncid_lw_clds,varID,lut_asyice) + status = nf90_inq_varid(ncid_lw_clds,'bnd_limits_wavenumber',varID) + status = nf90_get_var(ncid_lw_clds,varID,band_lims_cldy) + status = nf90_close(ncid_lw_clds) + endif + endif + ! + if (Model%rrtmgp_cld_optics .eq. 2) then + ! + if(nf90_open(trim(lw_cloud_props_file), NF90_WRITE, ncid_lw_clds) == NF90_NOERR) then + status = nf90_inq_varid(ncid_lw_clds,'radliq_lwr',varID) + status = nf90_get_var(ncid_lw_clds,varID,radliq_lwr) + status = nf90_inq_varid(ncid_lw_clds,'radliq_upr',varID) + status = nf90_get_var(ncid_lw_clds,varID,radliq_upr) + status = nf90_inq_varid(ncid_lw_clds,'radliq_fac',varID) + status = nf90_get_var(ncid_lw_clds,varID,radliq_fac) + status = nf90_inq_varid(ncid_lw_clds,'radice_lwr',varID) + status = nf90_get_var(ncid_lw_clds,varID,radice_lwr) + status = nf90_inq_varid(ncid_lw_clds,'radice_upr',varID) + status = nf90_get_var(ncid_lw_clds,varID,radice_upr) + status = nf90_inq_varid(ncid_lw_clds,'radice_fac',varID) + status = nf90_get_var(ncid_lw_clds,varID,radice_fac) + status = nf90_inq_varid(ncid_lw_clds,'pade_extliq',varID) + status = nf90_get_var(ncid_lw_clds,varID,pade_extliq) + status = nf90_inq_varid(ncid_lw_clds,'pade_ssaliq',varID) + status = nf90_get_var(ncid_lw_clds,varID,pade_ssaliq) + status = nf90_inq_varid(ncid_lw_clds,'pade_asyliq',varID) + status = nf90_get_var(ncid_lw_clds,varID,pade_asyliq) + status = nf90_inq_varid(ncid_lw_clds,'pade_extice',varID) + status = nf90_get_var(ncid_lw_clds,varID,pade_extice) + status = nf90_inq_varid(ncid_lw_clds,'pade_ssaice',varID) + status = nf90_get_var(ncid_lw_clds,varID,pade_ssaice) + status = nf90_inq_varid(ncid_lw_clds,'pade_asyice',varID) + status = nf90_get_var(ncid_lw_clds,varID,pade_asyice) + status = nf90_inq_varid(ncid_lw_clds,'pade_sizreg_extliq',varID) + status = nf90_get_var(ncid_lw_clds,varID,pade_sizereg_extliq) + status = nf90_inq_varid(ncid_lw_clds,'pade_sizreg_ssaliq',varID) + status = nf90_get_var(ncid_lw_clds,varID,pade_sizereg_ssaliq) + status = nf90_inq_varid(ncid_lw_clds,'pade_sizreg_asyliq',varID) + status = nf90_get_var(ncid_lw_clds,varID,pade_sizereg_asyliq) + status = nf90_inq_varid(ncid_lw_clds,'pade_sizreg_extice',varID) + status = nf90_get_var(ncid_lw_clds,varID,pade_sizereg_extice) + status = nf90_inq_varid(ncid_lw_clds,'pade_sizreg_ssaice',varID) + status = nf90_get_var(ncid_lw_clds,varID,pade_sizereg_ssaice) + status = nf90_inq_varid(ncid_lw_clds,'pade_sizreg_asyice',varID) + status = nf90_get_var(ncid_lw_clds,varID,pade_sizereg_asyice) + status = nf90_inq_varid(ncid_lw_clds,'bnd_limits_wavenumber',varID) + status = nf90_get_var(ncid_lw_clds,varID,band_lims_cldy) + status = nf90_close(ncid_lw_clds) + endif + endif + endif + + ! Broadcast arrays to all processors +#ifdef MPI + if (Model%rrtmgp_cld_optics .eq. 1) then + call MPI_BCAST(radliq_lwr, size(radliq_lwr), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(radliq_upr, size(radliq_upr), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(radliq_fac, size(radliq_fac), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(radice_lwr, size(radice_lwr), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(radice_upr, size(radice_upr), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(radice_fac, size(radice_fac), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_extliq, size(lut_extliq), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_ssaliq, size(lut_ssaliq), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_asyliq, size(lut_asyliq), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_extice, size(lut_extice), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_ssaice, size(lut_ssaice), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_asyice, size(lut_asyice), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(band_lims_cldy), size(band_lims_cldy), kind_phys, mpiroot, mpicomm, ierr) + endif + if (Model%rrtmgp_cld_optics .eq. 2) then + call MPI_BCAST(pade_extliq, size(pade_extliq), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_ssaliq, size(pade_ssaliq), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_asyliq, size(pade_asyliq), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_extice, size(pade_extice), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_ssaice, size(pade_ssaice), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_asyice, size(pade_asyice), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_extliq), size(pade_sizereg_extliq), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_ssaliq), size(pade_sizereg_ssaliq), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_asyliq), size(pade_sizereg_asyliq), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_extice), size(pade_sizereg_extice), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_ssaice), size(pade_sizereg_ssaice), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_asyice), size(pade_sizereg_asyice), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(band_lims_cldy), size(band_lims_cldy), kind_phys, mpiroot, mpicomm, ierr) + endif +#endif + + ! Load tables data for RRTMGP cloud-optics + if (Model%rrtmgp_cld_optics .eq. 1) then + call check_error_msg('lw_cloud_optics_init',lw_cloud_props%set_ice_roughness(nrghice_lw)) + call check_error_msg('lw_cloud_optics_init',lw_cloud_props%load(band_lims_cldy, & + radliq_lwr, radliq_upr, radliq_fac, radice_lwr, radice_upr, radice_fac, & + lut_extliq, lut_ssaliq, lut_asyliq, lut_extice, lut_ssaice, lut_asyice)) + endif + if (Model%rrtmgp_cld_optics .eq. 2) then + call check_error_msg('lw_cloud_optics_init',lw_cloud_props%set_ice_roughness(nrghice_lw)) + call check_error_msg('lw_cloud_optics_init',lw_cloud_props%load(band_lims_cldy, & + pade_extliq, pade_ssaliq, pade_asyliq, pade_extice, pade_ssaice, & + pade_asyice, pade_sizereg_extliq, pade_sizereg_ssaliq, pade_sizereg_asyliq,& + pade_sizereg_extice, pade_sizereg_ssaice, pade_sizereg_asyice)) + endif + end subroutine rrtmgp_lw_cloud_optics_init + + +!! \section arg_table_rrtmgp_lw_cloud_optics_run Argument Table +!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | +!! |-----------------------|-----------------------------------------------------|------------------------------------------------------------------------------|---------|------|-----------------------|-----------|--------|----------| +!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | +!! | ncol | horizontal_loop_extent | horizontal dimension | count | 0 | integer | | in | F | +!! | ngpts_lw | number_of_spectral_points_for_LW_calculation | Number of spectral points for LW RRTMGP calculation | none | 0 | integer | | in | F | +!! | p_lay | air_pressure_at_layer_for_RRTMGP_in_hPa | air pressure layer | hPa | 2 | real | kind_phys | in | F | +!! | t_lay | air_temperature_at_layer_for_RRTMGP | air temperature layer | K | 2 | real | kind_phys | in | F | +!! | p_lev | air_pressure_at_interface_for_RRTMGP_in_hPa | air pressure level | hPa | 2 | real | kind_phys | in | F | +!! | cld_frac | total_cloud_fraction | layer total cloud fraction | frac | 2 | real | kind_phys | in | F | +!! | cld_lwp | cloud_liquid_water_path | layer cloud liquid water path | g m-2 | 2 | real | kind_phys | in | F | +!! | cld_reliq | mean_effective_radius_for_liquid_cloud | mean effective radius for liquid cloud | micron | 2 | real | kind_phys | in | F | +!! | cld_iwp | cloud_ice_water_path | layer cloud ice water path | g m-2 | 2 | real | kind_phys | in | F | +!! | cld_reice | mean_effective_radius_for_ice_cloud | mean effective radius for ice cloud | micron | 2 | real | kind_phys | in | F | +!! | cld_swp | cloud_snow_water_path | layer cloud snow water path | g m-2 | 2 | real | kind_phys | in | F | +!! | cld_resnow | mean_effective_radius_for_snow_flake | mean effective radius for snow cloud | micron | 2 | real | kind_phys | in | F | +!! | cld_rwp | cloud_rain_water_path | layer cloud rain water path | g m-2 | 2 | real | kind_phys | in | F | +!! | cld_rerain | mean_effective_radius_for_rain_drop | mean effective radius for rain cloud | micron | 2 | real | kind_phys | in | F | +!! | icseed_lw | seed_random_numbers_sw | seed for random number generation for shortwave radiation | none | 1 | integer | | in | F | +!! | aerosols | aerosol_optical_properties_for_longwave_bands_01-16 | aerosol optical properties for longwave bands 01-16 | various | 4 | real | kind_phys | in | F | +!! | lw_cloud_props | coefficients_for_lw_cloud_optics | DDT containing spectral information for cloudy RRTMGP LW radiation scheme | DDT | 0 | ty_cloud_optics | | in | F | +!! | lw_gas_props | coefficients_for_lw_gas_optics | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | +!! | optical_props_clouds | longwave_optical_properties_for_cloudy_atmosphere | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_1scl | | out | F | +!! | optical_props_aerosol | longwave_optical_properties_for_aerosols | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_1scl | | out | F | +!! | cldtaulw | cloud_optical_depth_layers_at_10mu_band | approx 10mu band layer cloud optical depth | none | 2 | real | kind_phys | out | F | +!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | +!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! + ! ######################################################################################### + ! SUBROUTINE rrtmgp_lw_cloud_optics_run() + ! ######################################################################################### + subroutine rrtmgp_lw_cloud_optics_run(Model, ncol, ngpts_lw, icseed_lw, p_lay, t_lay, p_lev, cld_frac, & + cld_lwp, cld_reliq, cld_iwp, cld_reice, cld_swp, cld_resnow, cld_rwp, cld_rerain, & + aerosols, lw_cloud_props, lw_gas_props, & + optical_props_clouds, optical_props_aerosol, cldtaulw, errmsg, errflg) + + ! Inputs + type(GFS_control_type), intent(in) :: & + Model ! DDT containing FV3-GFS model control parameters + integer, intent(in) :: & + ncol, & ! Number of horizontal gridpoints + ngpts_lw ! Number of spectral points + integer,intent(in),dimension(ncol) :: & + icseed_lw ! auxiliary special cloud related array when module + ! variable isubclw=2, it provides permutation seed + ! for each column profile that are used for generating + ! random numbers. when isubclw /=2, it will not be used. + real(kind_phys), dimension(ncol,model%levs), intent(in) :: & + p_lay, & ! Pressure @ model layer-centers (hPa) + t_lay ! Temperature (K) + real(kind_phys), dimension(ncol,model%levs+1), intent(in) :: & + p_lev ! Pressure @ model layer-interfaces (hPa) + real(kind_phys), dimension(ncol,model%levs),intent(in) :: & + cld_frac, & ! Total cloud fraction by layer + cld_lwp, & ! Cloud liquid water path + cld_reliq, & ! Cloud liquid effective radius + cld_iwp, & ! Cloud ice water path + cld_reice, & ! Cloud ice effective radius + cld_swp, & ! Cloud snow water path (used only fro RRTMG scheme) + cld_resnow, & ! Cloud snow effective radius (used only fro RRTMG scheme) + cld_rwp, & ! Cloud rain water path (used only fro RRTMG scheme) + cld_rerain ! Cloud rain effective radius (used only fro RRTMG scheme) + type(ty_cloud_optics),intent(in) :: & + lw_cloud_props ! + type(ty_gas_optics_rrtmgp),intent(in) :: & + lw_gas_props + real(kind_phys), intent(in),dimension(ncol, model%levs, lw_cloud_props%get_nband(),3) :: & + aerosols ! + real(kind_phys), dimension(ncol,Model%levs), intent(out) :: & + cldtaulw ! approx 10.mu band layer cloud optical depth - ! 2) Streamer approach for ice effective radius between 5.0 and 131.0 microns - ! and ebert and curry approach for ice eff radius greater than 131.0 microns. - ! no smoothing between the transition of the two methods - elseif (ilwcice .eq. 2) then - factor = (cld_ref_ice(ij,ik) - 2.) / 3. - index = max( 1, min( 42, int( factor ) )) - fint = factor - float(index) - do ib = 1, nBandsLW - tau_ice(ib) = max(0., cld_iwp(ij,ik)*(absice2(index,ib) + & - fint*(absice2(index+1,ib) - absice2(index,ib)) )) - enddo - ! 3) Fu's approach for ice effective radius between 4.8 and 135 microns - ! (generalized effective size from 5 to 140 microns) - elseif (ilwcice .eq. 3) then - cld_ref_iceTemp = max(5., 1.0315*cld_ref_ice(ij,ik)) ! v4.71 value - factor = (cld_ref_iceTemp - 2.) / 3. - index = max( 1, min( 45, int( factor ) )) - fint = factor - float(index) - do ib = 1, nBandsLW - tau_ice(ib) = max(0., cld_iwp(ij,ik)*(absice3(index,ib) + & - fint*(absice3(index+1,ib) - absice3(index,ib)) )) - enddo - endif - endif - else - tau_rain = 0. - tau_snow = 0. - tau_liq(:) = 0. - tau_ice(:) = 0. - endif - ! Cloud optical depth - do ib = 1, nBandsLW - tau_cld(ij,ik,ib) = tau_ice(ib) + tau_liq(ib) + tau_rain + tau_snow - enddo - end do - end do - endif - end subroutine rrtmgp_lw_cloud_optics - ! ####################################################################################### - ! SUBROUTINE mcica_subcol_lw - ! ####################################################################################### - subroutine mcica_subcol_lw(ncol, nlay, ngpts, cld_frac, icseed, dzlyr, de_lgth, cld_frac_mcica) - ! Inputs - integer,intent(in) :: & - ncol, & ! Number of horizontal gridpoints - nlay, & ! Number of vertical layers - ngpts ! Number of spectral g-points - integer,dimension(ncol),intent(in) :: & - icseed ! Permutation seed for each column. - real(kind_phys), dimension(ncol), intent(in) :: & - de_lgth ! Cloud decorrelation length (km) - real(kind_phys), dimension(ncol,nlay), intent(in) :: & - cld_frac, & ! Cloud-fraction - dzlyr ! Layer thinkness (km) ! Outputs - !real(kind_phys),dimension(ncol,nlay,ngpts),intent(out) :: & - logical,dimension(ncol,nlay,ngpts),intent(out) :: & - cld_frac_mcica + type(ty_optical_props_1scl),intent(out) :: & + optical_props_clouds, & ! + optical_props_aerosol ! + integer, intent(out) :: & + errflg ! + character(len=*), intent(out) :: & + errmsg ! + ! Local variables - type(random_stat) :: stat - integer :: icol,n,k,k1 - real(kind_phys) :: tem1 - real(kind_phys),dimension(ngpts) :: rand1D - real(kind_phys),dimension(nlay*ngpts) :: rand2D - real(kind_phys),dimension(ngpts,nlay) :: cdfunc,cdfun2 - real(kind_phys),dimension(nlay) :: fac_lcf - logical,dimension(ngpts,nlay) :: lcloudy + integer :: iCol + integer,dimension(ncol) :: ipseed_lw + logical,dimension(ncol,model%levs) :: liqmask, icemask + type(ty_optical_props_1scl) :: optical_props_cloudsByBand + type(random_stat) :: rng_stat + real(kind_phys), dimension(ngpts_lw,model%levs,ncol) :: rng3D + real(kind_phys), dimension(ngpts_lw*model%levs) :: rng1D + logical, dimension(ncol,model%levs,ngpts_lw) :: cldfracMCICA + real(kind_phys), dimension(ncol,model%levs,lw_cloud_props%get_nband()) :: & + tau_cld - ! Loop over all columns - do icol=1,ncol - ! Call random_setseed() to advance random number generator by "icseed" values. - call random_setseed(icseed(icol),stat) + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 - ! ################################################################################### - ! Sub-column set up according to overlapping assumption: - ! - For random overlap, pick a random value at every level - ! - For max-random overlap, pick a random value at every level - ! - For maximum overlap, pick same random numebr at every level - ! ################################################################################### - select case ( iovrlw ) - ! ################################################################################### - ! 0) Random overlap - ! ################################################################################### - case( 0 ) - call random_number(rand2D,stat) - k1 = 0 - do n = 1, ngpts - do k = 1, nlay - k1 = k1 + 1 - cdfunc(n,k) = rand2d(k1) - enddo - enddo + if (.not. Model%lslwr) return - ! ################################################################################### - ! 1) Maximum-random overlap - ! ################################################################################### - case(1) - call random_number(rand2D,stat) - k1 = 0 - do n = 1, ngpts - do k = 1, nlay - k1 = k1 + 1 - cdfunc(n,k) = rand2d(k1) - enddo - enddo + ! ####################################################################################### + ! Change random number seed value for each radiation invocation (isubclw =1 or 2). + ! ####################################################################################### + if(isubclw == 1) then ! advance prescribed permutation seed + do iCol = 1, nCol + ipseed_lw(iCol) = ipsdlw0 + iCol + enddo + elseif (isubclw == 2) then ! use input array of permutaion seeds + do iCol = 1, nCol + ipseed_lw(iCol) = icseed_lw(iCol) + enddo + endif + + ! ####################################################################################### + ! Compute ice/liquid cloud masks, needed by rrtmgp_cloud_optics + ! ####################################################################################### + liqmask = (cld_frac .gt. 0 .and. cld_lwp .gt. 0) + icemask = (cld_frac .gt. 0 .and. cld_iwp .gt. 0) - ! First pick a random number for bottom (or top) layer. - ! then walk up the column: (aer's code) - ! if layer below is cloudy, use the same rand num in the layer below - ! if layer below is clear, use a new random number - do k = 2, nlay - k1 = k - 1 - tem1 = 1._kind_phys - cld_frac(icol,k1) - do n = 1, ngpts - if ( cdfunc(n,k1) > tem1 ) then - cdfunc(n,k) = cdfunc(n,k1) - else - cdfunc(n,k) = cdfunc(n,k) * tem1 - endif - enddo - enddo + ! ####################################################################################### + ! Allocate space for RRTMGP DDTs containing cloud and aerosol radiative properties + ! ####################################################################################### + ! Cloud optics [nCol,model%levs,nBands] + call check_error_msg('rrtmgp_lw_cloud_optics_run',optical_props_cloudsByBand%alloc_1scl(& + ncol, model%levs, lw_cloud_props%get_band_lims_wavenumber())) + ! Aerosol optics [nCol,model%levs,nBands] + call check_error_msg('rrtmgp_lw_cloud_optics_run',optical_props_aerosol%alloc_1scl( & + ncol, model%levs, lw_cloud_props%get_band_lims_wavenumber())) + ! Cloud optics [nCol,model%levs,nGpts] + call check_error_msg('rrtmgp_lw_cloud_optics_run',optical_props_clouds%alloc_1scl( & + ncol, model%levs, lw_gas_props)) - ! ################################################################################### - ! 2) Maximum overlap - ! ################################################################################### - case(2) - call random_number(rand1d,stat) - do n = 1, ngpts - tem1 = rand1d(n) - do k = 1, nlay - cdfunc(n,k) = tem1 - enddo - enddo + ! ####################################################################################### + ! Copy aerosol optical information to RRTMGP DDT + ! ####################################################################################### + optical_props_aerosol%tau = aerosols(:,:,:,1) * (1. - aerosols(:,:,:,2)) - ! ################################################################################### - ! 3) Decorrelation length - ! ################################################################################### - case(3) - ! Compute overlapping factors based on layer midpoint distances and decorrelation - ! depths - do k = nlay, 2, -1 - fac_lcf(k) = exp( -0.5 * (dzlyr(iCol,k)+dzlyr(iCol,k-1)) / de_lgth(iCol) ) - enddo + ! ####################################################################################### + ! Compute cloud-optics for RTE. + ! ####################################################################################### + if (Model%rrtmgp_cld_optics .gt. 0) then + ! i) RRTMGP cloud-optics. + call check_error_msg('rrtmgp_lw_cloud_optics_run',lw_cloud_props%cloud_optics(& + ncol, & ! IN - Number of horizontal gridpoints + model%levs, & ! IN - Number of vertical layers + lw_cloud_props%get_nband(), & ! IN - Number of LW bands + nrghice_lw, & ! IN - Number of ice-roughness categories + liqmask, & ! IN - Liquid-cloud mask + icemask, & ! IN - Ice-cloud mask + cld_lwp, & ! IN - Cloud liquid water path + cld_iwp, & ! IN - Cloud ice water path + cld_reliq, & ! IN - Cloud liquid effective radius + cld_reice, & ! IN - Cloud ice effective radius + optical_props_cloudsByBand)) ! OUT - RRTMGP DDT containing cloud radiative properties + ! in each band + else + ! ii) RRTMG cloud-optics. + if (any(cld_frac .gt. 0)) then + call rrtmg_lw_cloud_optics(ncol, model%levs, lw_cloud_props%get_nband(), cld_lwp, & + cld_reliq, cld_iwp, cld_reice, cld_rwp, cld_rerain, cld_swp, cld_resnow, & + cld_frac, tau_cld) + optical_props_cloudsByBand%tau = tau_cld + endif + endif - ! Setup 2 sets of random numbers - call random_number ( rand2d, stat ) - k1 = 0 - do k = 1, nlay - do n = 1, ngpts - k1 = k1 + 1 - cdfunc(n,k) = rand2d(k1) - enddo - enddo - ! - call random_number ( rand2d, stat ) - k1 = 0 - do k = 1, nlay - do n = 1, ngpts - k1 = k1 + 1 - cdfun2(n,k) = rand2d(k1) - enddo - enddo + ! ####################################################################################### + ! Call McICA to generate subcolumns. + ! ####################################################################################### + ! Call RNG. Mersennse Twister accepts 1D array, so loop over columns and collapse along G-points + ! and layers. ([nGpts,model%levs,nColumn]-> [nGpts*model%levs]*nColumn) + do iCol=1,ncol + call random_setseed(ipseed_lw(icol),rng_stat) + call random_number(rng1D,rng_stat) + rng3D(:,:,iCol) = reshape(source = rng1D,shape=[ngpts_lw,model%levs]) + enddo + + ! Call McICA + select case ( iovrlw ) + ! Maximumn-random + case(1) + call check_error_msg('rrtmgp_lw_cloud_optics_run',sampled_mask_max_ran(rng3D,cld_frac,cldfracMCICA)) + end select + + ! Map band optical depth to each g-point using McICA + call check_error_msg('rrtmgp_lw_cloud_optics_run',draw_samples(cldfracMCICA,optical_props_cloudsByBand,optical_props_clouds)) + + ! GFS_RRTMGP_POST_RUN() requires the LW optical depth ~10microns + cldtaulw = optical_props_cloudsByBand%tau(:,:,7) - ! Then working from the top down: - ! if a random number (from an independent set -cdfun2) is smaller then the - ! scale factor: use the upper layer's number, otherwise use a new random - ! number (keep the original assigned one). - do k = nlay-1, 1, -1 - k1 = k + 1 - do n = 1, ngpts - if ( cdfun2(n,k) <= fac_lcf(k1) ) then - cdfunc(n,k) = cdfunc(n,k1) - endif - enddo - enddo + end subroutine rrtmgp_lw_cloud_optics_run + + ! ######################################################################################### + ! SUBROUTINE rrtmgp_lw_cloud_optics_finalize() + ! ######################################################################################### + subroutine rrtmgp_lw_cloud_optics_finalize() + end subroutine rrtmgp_lw_cloud_optics_finalize - end select - - ! ################################################################################### - ! Generate subcolumn cloud mask (.false./.true. for clear/cloudy) - ! ################################################################################### - do k = 1, nlay - tem1 = 1._kind_phys - cld_frac(icol,k) - do n = 1, ngpts - lcloudy(n,k) = cdfunc(n,k) >= tem1 - if (lcloudy(n,k)) then - cld_frac_mcica(icol,k,n) = .true. - else - cld_frac_mcica(icol,k,n) = .false. - endif - enddo - enddo - enddo ! END LOOP OVER COLUMNS - end subroutine mcica_subcol_lw + ! ######################################################################################### + ! SUBROUTINE check_error_msg + ! ######################################################################################### + subroutine check_error_msg(routine_name, error_msg) + character(len=*), intent(in) :: & + error_msg, routine_name + + if(error_msg /= "") then + print*,"ERROR("//trim(routine_name)//"): " + print*,trim(error_msg) + return + end if + end subroutine check_error_msg -end module mo_rrtmgp_lw_cloud_optics +end module rrtmgp_lw_cloud_optics diff --git a/physics/rrtmgp_lw_gas_optics.F90 b/physics/rrtmgp_lw_gas_optics.F90 new file mode 100644 index 000000000..1cbe878ae --- /dev/null +++ b/physics/rrtmgp_lw_gas_optics.F90 @@ -0,0 +1,430 @@ +module rrtmgp_lw_gas_optics + use machine, only: kind_phys + use GFS_typedefs, only: GFS_control_type, GFS_radtend_type + use mo_rte_kind, only: wl + use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp + use mo_gas_concentrations, only: ty_gas_concs + use netcdf + + ! Parameters + integer :: ipsdlw0 + +contains +!! \section arg_table_rrtmgp_lw_gas_optics_init Argument Table +!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | +!! |--------------|----------------------------------------------|--------------------------------------------------------------------|-------|------|----------------------|-------|--------|----------| +!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | +!! | Radtend | GFS_radtend_type_instance | Fortran DDT containing FV3-GFS radiation tendencies | DDT | 0 | GFS_radtend_type | | in | F | +!! | mpirank | mpi_rank | current MPI rank | index | 0 | integer | | in | F | +!! | mpiroot | mpi_root | master MPI rank | index | 0 | integer | | in | F | +!! | mpicomm | mpi_comm | MPI communicator | index | 0 | integer | | in | F | +!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | +!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! | lw_gas_props | coefficients_for_lw_gas_optics | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | out | F | +!! | ngpts_lw | number_of_spectral_points_for_LW_calculation | Number of spectral points for LW RRTMGP calculation | none | 0 | integer | | out | F | +!! + ! ######################################################################################### + ! ######################################################################################### + subroutine rrtmgp_lw_gas_optics_init(Model, Radtend, mpicomm, mpirank, mpiroot, lw_gas_props, & + ngpts_lw, errmsg, errflg) + use netcdf + +#ifdef MPI + use mpi +#endif + + ! Inputs + type(GFS_control_type), intent(in) :: & + Model ! DDT containing model control parameters + type(GFS_radtend_type), intent(in) :: & + Radtend ! DDT containing FV3-GFS radiation tendencies + integer,intent(in) :: & + mpicomm, & ! MPI communicator + mpirank, & ! Current MPI rank + mpiroot ! Master MPI rank + + ! Outputs + character(len=*), intent(out) :: & + errmsg ! Error message + integer, intent(out) :: & + errflg ! Error code + integer, intent(out) :: & + ngpts_lw ! Number of g-points + type(ty_gas_optics_rrtmgp),intent(out) :: & + lw_gas_props ! DDT containing spectral information for RRTMGP LW radiation scheme + + ! Variables that will be passed to gas_optics%load() + type(ty_gas_concs) :: & + gas_concentrations + integer, dimension(:), allocatable :: & + kminor_start_lower, & ! used by RRTMGP gas optics + kminor_start_upper ! used by RRTMGP gas optics + integer, dimension(:,:), allocatable :: & + band2gpt, & ! used by RRTMGP gas optics + minor_limits_gpt_lower, & ! used by RRTMGP gas optics + minor_limits_gpt_upper ! used by RRTMGP gas optics + integer, dimension(:,:,:), allocatable :: & + key_species ! used by RRTMGP gas optics + real(kind_phys) :: & + press_ref_trop, & ! used by RRTMGP gas optics + temp_ref_p, & ! used by RRTMGP gas optics + temp_ref_t ! used by RRTMGP gas optics + real(kind_phys), dimension(:), allocatable :: & + press_ref, & ! used by RRTMGP gas optics + temp_ref ! used by RRTMGP gas optics + real(kind_phys), dimension(:,:), allocatable :: & + band_lims, & ! used by RRTMGP gas optics + totplnk ! used by RRTMGP gas optics + real(kind_phys), dimension(:,:,:), allocatable :: & + vmr_ref, & ! used by RRTMGP gas optics + kminor_lower, & ! used by RRTMGP gas optics + kminor_upper, & ! used by RRTMGP gas optics + rayl_lower, & ! used by RRTMGP gas optics + rayl_upper ! used by RRTMGP gas optics + real(kind_phys), dimension(:,:,:,:), allocatable :: & + kmajor, & ! used by RRTMGP gas optics + planck_frac ! used by RRTMGP gas optics + character(len=32), dimension(:), allocatable :: & + gas_names, & ! used by RRTMGP gas optics + gas_minor, & ! used by RRTMGP gas optics + identifier_minor, & ! used by RRTMGP gas optics + minor_gases_lower, & ! used by RRTMGP gas optics + minor_gases_upper, & ! used by RRTMGP gas optics + scaling_gas_lower, & ! used by RRTMGP gas optics + scaling_gas_upper ! used by RRTMGP gas optics + logical(wl), dimension(:), allocatable :: & + minor_scales_with_density_lower, & ! used by RRTMGP gas optics + minor_scales_with_density_upper, & ! used by RRTMGP gas optics + scale_by_complement_lower, & ! used by RRTMGP gas optics + scale_by_complement_upper ! used by RRTMGP gas optics + + ! Dimensions (to be broadcast across all processors) + integer :: & + ntemps, & ! used by RRTMGP gas optics + npress, & ! used by RRTMGP gas optics + nabsorbers, & ! used by RRTMGP gas optics + nextrabsorbers, & ! used by RRTMGP gas optics + nminorabsorbers, & ! used by RRTMGP gas optics + nmixingfracs, & ! used by RRTMGP gas optics + nlayers, & ! used by RRTMGP gas optics + nbnds, & ! used by RRTMGP gas optics + npairs, & ! used by RRTMGP gas optics + ninternalSourcetemps, & ! used by RRTMGP gas optics + nminor_absorber_intervals_lower, & ! used by RRTMGP gas optics + nminor_absorber_intervals_upper, & ! used by RRTMGP gas optics + ncontributors_lower, & ! used by RRTMGP gas optics + ncontributors_upper ! used by RRTMGP gas optics + + ! Local variables + integer :: ncid_lw,dimID,varID,status,igpt,iGas,ij,ierr + integer,dimension(:),allocatable :: temp1,temp2,temp3,temp4,temp_log_array1,& + temp_log_array2, temp_log_array3, temp_log_array4 + character(len=264) :: lw_gas_props_file + integer,parameter :: max_strlen=256 + + ! Initialize + errmsg = '' + errflg = 0 + + ! Filenames are set in the gfs_physics_nml (scm/src/GFS_typedefs.F90) + lw_gas_props_file = trim(Model%rrtmgp_root)//trim(Model%lw_file_gas) + + ! Read dimensions for k-distribution fields (only on master processor(0)) + if (mpirank .eq. mpiroot) then + if(nf90_open(trim(lw_gas_props_file), NF90_WRITE, ncid_lw) .eq. NF90_NOERR) then + status = nf90_inq_dimid(ncid_lw, 'temperature', dimid) + status = nf90_inquire_dimension(ncid_lw, dimid, len=ntemps) + status = nf90_inq_dimid(ncid_lw, 'pressure', dimid) + status = nf90_inquire_dimension(ncid_lw, dimid, len=npress) + status = nf90_inq_dimid(ncid_lw, 'absorber', dimid) + status = nf90_inquire_dimension(ncid_lw, dimid, len=nabsorbers) + status = nf90_inq_dimid(ncid_lw, 'minor_absorber', dimid) + status = nf90_inquire_dimension(ncid_lw, dimid, len=nminorabsorbers) + status = nf90_inq_dimid(ncid_lw, 'absorber_ext', dimid) + status = nf90_inquire_dimension(ncid_lw, dimid, len=nextrabsorbers) + status = nf90_inq_dimid(ncid_lw, 'mixing_fraction', dimid) + status = nf90_inquire_dimension(ncid_lw, dimid, len=nmixingfracs) + status = nf90_inq_dimid(ncid_lw, 'atmos_layer', dimid) + status = nf90_inquire_dimension(ncid_lw, dimid, len=nlayers) + status = nf90_inq_dimid(ncid_lw, 'bnd', dimid) + status = nf90_inquire_dimension(ncid_lw, dimid, len=nbnds) + status = nf90_inq_dimid(ncid_lw, 'gpt', dimid) + status = nf90_inquire_dimension(ncid_lw, dimid, len=ngpts_lw) + status = nf90_inq_dimid(ncid_lw, 'pair', dimid) + status = nf90_inquire_dimension(ncid_lw, dimid, len=npairs) + status = nf90_inq_dimid(ncid_lw, 'contributors_lower', dimid) + status = nf90_inquire_dimension(ncid_lw, dimid, len=ncontributors_lower) + status = nf90_inq_dimid(ncid_lw, 'contributors_upper', dimid) + status = nf90_inquire_dimension(ncid_lw, dimid, len=ncontributors_upper) + status = nf90_inq_dimid(ncid_lw, 'minor_absorber_intervals_lower', dimid) + status = nf90_inquire_dimension(ncid_lw, dimid, len=nminor_absorber_intervals_lower) + status = nf90_inq_dimid(ncid_lw, 'minor_absorber_intervals_upper', dimid) + status = nf90_inquire_dimension(ncid_lw, dimid, len=nminor_absorber_intervals_upper) + status = nf90_inq_dimid(ncid_lw, 'temperature_Planck', dimid) + status = nf90_inquire_dimension(ncid_lw, dimid, len=ninternalSourcetemps) + status = nf90_close(ncid_lw) + endif + endif + + ! Broadcast dimensions to all processors +#ifdef MPI + call MPI_BCAST(ntemps, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(npress, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nminorabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nextraabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nmixingfracs, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nlayers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nbnds, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(ngpts_lw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(npairs, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(ncontributors_lower, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(ncontributors_upper, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nminor_absorber_intervals_lower, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nminor_absorber_intervals_upper, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(ninternalSourcetemps, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +#endif + + !if (mpirank .eq. mpiroot) then + ! Allocate space for arrays + allocate(gas_names(nabsorbers)) + allocate(scaling_gas_lower(nminor_absorber_intervals_lower)) + allocate(scaling_gas_upper(nminor_absorber_intervals_upper)) + allocate(gas_minor(nminorabsorbers)) + allocate(identifier_minor(nminorabsorbers)) + allocate(minor_gases_lower(nminor_absorber_intervals_lower)) + allocate(minor_gases_upper(nminor_absorber_intervals_upper)) + allocate(minor_limits_gpt_lower(npairs,nminor_absorber_intervals_lower)) + allocate(minor_limits_gpt_upper(npairs,nminor_absorber_intervals_upper)) + allocate(band2gpt(2,nbnds)) + allocate(key_species(2,nlayers,nbnds)) + allocate(band_lims(2,nbnds)) + allocate(press_ref(npress)) + allocate(temp_ref(ntemps)) + allocate(vmr_ref(nlayers, nextrabsorbers, ntemps)) + allocate(kminor_lower(ncontributors_lower, nmixingfracs, ntemps)) + allocate(kmajor(ngpts_lw, nmixingfracs, npress+1, ntemps)) + allocate(kminor_start_lower(nminor_absorber_intervals_lower)) + allocate(kminor_upper(ncontributors_upper, nmixingfracs, ntemps)) + allocate(kminor_start_upper(nminor_absorber_intervals_upper)) + allocate(minor_scales_with_density_lower(nminor_absorber_intervals_lower)) + allocate(minor_scales_with_density_upper(nminor_absorber_intervals_upper)) + allocate(scale_by_complement_lower(nminor_absorber_intervals_lower)) + allocate(scale_by_complement_upper(nminor_absorber_intervals_upper)) + allocate(temp1(nminor_absorber_intervals_lower)) + allocate(temp2(nminor_absorber_intervals_upper)) + allocate(temp3(nminor_absorber_intervals_lower)) + allocate(temp4(nminor_absorber_intervals_upper)) + allocate(totplnk(ninternalSourcetemps, nbnds)) + allocate(planck_frac(ngpts_lw, nmixingfracs, npress+1, ntemps)) + + if (mpirank .eq. mpiroot) then + ! Read in fields from file + if(nf90_open(trim(lw_gas_props_file), NF90_WRITE, ncid_lw) .eq. NF90_NOERR) then + status = nf90_inq_varid(ncid_lw,'gas_names',varID) + status = nf90_get_var(ncid_lw,varID,gas_names) + ! + status = nf90_inq_varid(ncid_lw,'scaling_gas_lower',varID) + status = nf90_get_var(ncid_lw,varID,scaling_gas_lower) + ! + status = nf90_inq_varid(ncid_lw,'scaling_gas_upper',varID) + status = nf90_get_var(ncid_lw,varID,scaling_gas_upper) + ! + status = nf90_inq_varid(ncid_lw,'gas_minor',varID) + status = nf90_get_var(ncid_lw,varID,gas_minor) + ! + status = nf90_inq_varid(ncid_lw,'identifier_minor',varID) + status = nf90_get_var(ncid_lw,varID,identifier_minor) + ! + status = nf90_inq_varid(ncid_lw,'minor_gases_lower',varID) + status = nf90_get_var(ncid_lw,varID,minor_gases_lower) + ! + status = nf90_inq_varid(ncid_lw,'minor_gases_upper',varID) + status = nf90_get_var(ncid_lw,varID,minor_gases_upper) + ! + status = nf90_inq_varid(ncid_lw,'minor_limits_gpt_lower',varID) + status = nf90_get_var(ncid_lw,varID,minor_limits_gpt_lower) + ! + status = nf90_inq_varid(ncid_lw,'minor_limits_gpt_upper',varID) + status = nf90_get_var(ncid_lw,varID,minor_limits_gpt_upper) + ! + status = nf90_inq_varid(ncid_lw,'bnd_limits_gpt',varID) + status = nf90_get_var(ncid_lw,varID,band2gpt) + ! + status = nf90_inq_varid(ncid_lw,'key_species',varID) + status = nf90_get_var(ncid_lw,varID,key_species) + ! + status = nf90_inq_varid(ncid_lw,'bnd_limits_wavenumber',varID) + status = nf90_get_var(ncid_lw,varID,band_lims) + ! + status = nf90_inq_varid(ncid_lw,'press_ref',varID) + status = nf90_get_var(ncid_lw,varID,press_ref) + ! + status = nf90_inq_varid(ncid_lw,'temp_ref',varID) + status = nf90_get_var(ncid_lw,varID,temp_ref) + ! + status = nf90_inq_varid(ncid_lw,'absorption_coefficient_ref_P',varID) + status = nf90_get_var(ncid_lw,varID,temp_ref_p) + ! + status = nf90_inq_varid(ncid_lw,'absorption_coefficient_ref_T',varID) + status = nf90_get_var(ncid_lw,varID,temp_ref_t) + ! + status = nf90_inq_varid(ncid_lw,'press_ref_trop',varID) + status = nf90_get_var(ncid_lw,varID,press_ref_trop) + ! + status = nf90_inq_varid(ncid_lw,'kminor_lower',varID) + status = nf90_get_var(ncid_lw,varID,kminor_lower) + ! + status = nf90_inq_varid(ncid_lw,'kminor_upper',varID) + status = nf90_get_var(ncid_lw,varID,kminor_upper) + ! + status = nf90_inq_varid(ncid_lw,'vmr_ref',varID) + status = nf90_get_var(ncid_lw,varID,vmr_ref) + ! + status = nf90_inq_varid(ncid_lw,'kmajor',varID) + status = nf90_get_var(ncid_lw,varID,kmajor) + ! + status = nf90_inq_varid(ncid_lw,'kminor_start_lower',varID) + status = nf90_get_var(ncid_lw,varID,kminor_start_lower) + ! + status = nf90_inq_varid(ncid_lw,'kminor_start_upper',varID) + status = nf90_get_var(ncid_lw,varID,kminor_start_upper) + ! + status = nf90_inq_varid(ncid_lw,'totplnk',varID) + status = nf90_get_var(ncid_lw,varID,totplnk) + ! + status = nf90_inq_varid(ncid_lw,'plank_fraction',varID) + status = nf90_get_var(ncid_lw,varID,planck_frac) + + ! Logical fields are read in as integers and then converted to logicals. + status = nf90_inq_varid(ncid_lw,'minor_scales_with_density_lower',varID) + status = nf90_get_var(ncid_lw,varID,temp1) + minor_scales_with_density_lower(:) = .false. + where(temp1 .eq. 1) minor_scales_with_density_lower(:) = .true. + ! + status = nf90_inq_varid(ncid_lw,'minor_scales_with_density_upper',varID) + status = nf90_get_var(ncid_lw,varID,temp2) + minor_scales_with_density_upper(:) = .false. + where(temp2 .eq. 1) minor_scales_with_density_upper(:) = .true. + ! + status = nf90_inq_varid(ncid_lw,'scale_by_complement_lower',varID) + status = nf90_get_var(ncid_lw,varID,temp3) + scale_by_complement_lower(:) = .false. + where(temp3 .eq. 1) scale_by_complement_lower(:) = .true. + ! + status = nf90_inq_varid(ncid_lw,'scale_by_complement_upper',varID) + status = nf90_get_var(ncid_lw,varID,temp4) + scale_by_complement_upper(:) = .false. + where(temp4 .eq. 1) scale_by_complement_upper(:) = .true. + + ! Close + status = nf90_close(ncid_lw) + endif + endif + + ! Broadcast arrays to all processors +#ifdef MPI + call MPI_BCAST(minor_limits_gpt_upper, size(minor_limits_gpt_upper), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(minor_limits_gpt_lower, size(minor_limits_gpt_lower), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(kminor_start_upper, size(kminor_start_upper), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(kminor_start_lower, size(kminor_start_lower), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(key_species, size(key_species), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(band2gpt, size(band2gpt), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(band_lims, size(band_lims), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(press_ref, size(press_ref), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(temp_ref, size(temp_ref), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(kminor_lower, size(kminor_lower), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(kminor_upper, size(kminor_upper), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(scaling_gas_lower, size(scaling_gas_lower), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(scaling_gas_upper, size(scaling_gas_upper), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(vmr_ref, size(vmr_ref), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(kmajor, size(kmajor), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(temp_ref_p, 1, kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(temp_ref_t, 1, kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(press_ref_trop, 1, kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(totplnk, size(totplnk), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(planck_frac, size(planck_frac), kind_phys, mpiroot, mpicomm, ierr) + ! Character arrays + do ij=1,nabsorbers + call MPI_BCAST(gas_names(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) + enddo + do ij=1,nminorabsorbers + call MPI_BCAST(gas_minor(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) + call MPI_BCAST(identifier_minor(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) + enddo + do ij=1,nminor_absorber_intervals_lower + call MPI_BCAST(minor_gases_lower(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) + enddo + do ij=1,nminor_absorber_intervals_upper + call MPI_BCAST(minor_gases_upper(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) + enddo + ! Logical arrays (First convert to integer-array, then broadcast) + ! + allocate(temp_log_array1(nminor_absorber_intervals_lower)) + where(minor_scales_with_density_lower) + temp_log_array1 = 1 + elsewhere + temp_log_array1 = 0 + end where + call MPI_BCAST(temp_log_array1, size(temp_log_array1), MPI_INTEGER, mpiroot, mpicomm, ierr) + ! + allocate(temp_log_array2(nminor_absorber_intervals_lower)) + where(scale_by_complement_lower) + temp_log_array2 = 1 + elsewhere + temp_log_array2 = 0 + end where + call MPI_BCAST(temp_log_array2, size(temp_log_array2), MPI_INTEGER, mpiroot, mpicomm, ierr) + ! + allocate(temp_log_array3(nminor_absorber_intervals_upper)) + where(minor_scales_with_density_upper) + temp_log_array3 = 1 + elsewhere + temp_log_array3 = 0 + end where + call MPI_BCAST(temp_log_array3, size(temp_log_array3), MPI_INTEGER, mpiroot, mpicomm, ierr) + ! + allocate(temp_log_array4(nminor_absorber_intervals_upper)) + where(scale_by_complement_upper) + temp_log_array4 = 1 + elsewhere + temp_log_array4 = 0 + end where + call MPI_BCAST(temp_log_array4, size(temp_log_array4), MPI_INTEGER, mpiroot, mpicomm, ierr) +#endif + + ! Initialize gas concentrations and gas optics class with data + do iGas=1,Model%nGases + call check_error_msg('lw_gas_optics_init',gas_concentrations%set_vmr(Radtend%active_gases(iGas), 0._kind_phys)) + enddo + call check_error_msg('lw_gas_optics_init',lw_gas_props%load(gas_concentrations, gas_names, & + key_species, band2gpt, band_lims, press_ref, press_ref_trop, temp_ref, temp_ref_p, & + temp_ref_t, vmr_ref, kmajor, kminor_lower, kminor_upper, gas_minor,identifier_minor, & + minor_gases_lower, minor_gases_upper, minor_limits_gpt_lower, minor_limits_gpt_upper, & + minor_scales_with_density_lower, minor_scales_with_density_upper, scaling_gas_lower, & + scaling_gas_upper, scale_by_complement_lower, scale_by_complement_upper, & + kminor_start_lower, kminor_start_upper, totplnk, planck_frac, rayl_lower, rayl_upper)) + + ! Set initial permutation seed for McICA, initially set to number of G-points + ipsdlw0 = lw_gas_props%get_ngpt() + end subroutine rrtmgp_lw_gas_optics_init + + subroutine rrtmgp_lw_gas_optics_run() + end subroutine rrtmgp_lw_gas_optics_run + subroutine rrtmgp_lw_gas_optics_finalize() + end subroutine rrtmgp_lw_gas_optics_finalize + + ! ######################################################################################### + ! SUBROUTINE check_error_msg + ! ######################################################################################### + subroutine check_error_msg(routine_name, error_msg) + character(len=*), intent(in) :: & + error_msg, routine_name + + if(error_msg /= "") then + print*,"ERROR("//trim(routine_name)//"): " + print*,trim(error_msg) + return + end if + end subroutine check_error_msg +end module rrtmgp_lw_gas_optics diff --git a/physics/rrtmgp_sw.F90 b/physics/rrtmgp_sw.F90 index 3592a7b55..677113886 100644 --- a/physics/rrtmgp_sw.F90 +++ b/physics/rrtmgp_sw.F90 @@ -2,7 +2,7 @@ ! ########################################################################################### module rrtmgp_sw use machine, only: kind_phys - use GFS_typedefs, only: GFS_control_type + use GFS_typedefs, only: GFS_control_type, GFS_radtend_type use mo_rte_kind, only: wl use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp use mo_cloud_optics, only: ty_cloud_optics @@ -11,61 +11,27 @@ module rrtmgp_sw use mo_gas_concentrations, only: ty_gas_concs use mo_fluxes_byband, only: ty_fluxes_byband use module_radsw_parameters, only: cmpfsw_type - use rrtmgp_aux, only: sw_gas_optics_init, sw_cloud_optics_init, check_error_msg, active_gases + use rrtmgp_sw_cloud_optics, only: rrtmgp_sw_cloud_optics_init + use rrtmgp_sw_gas_optics, only: rrtmgp_sw_gas_optics_init, check_error_msg public rrtmgp_sw_init, rrtmgp_sw_run, rrtmgp_sw_finalize contains -!! \section arg_table_rrtmgp_sw_init Argument Table -!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | -!! |--------------------|----------------------------------|---------------------------------------------------------------------------|-------|------|----------------------|-----------|--------|----------| -!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | -!! | mpirank | mpi_rank | current MPI rank | index | 0 | integer | | in | F | -!! | mpiroot | mpi_root | master MPI rank | index | 0 | integer | | in | F | -!! | mpicomm | mpi_comm | MPI communicator | index | 0 | integer | | in | F | -!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | -!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | -!! | sw_gas_props | coefficients_for_sw_gas_optics | DDT containing spectral information for RRTMGP SW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | inout | F | -!! | sw_cloud_props | coefficients_for_sw_cloud_optics | DDT containing spectral information for cloudy RRTMGP SW radiation scheme | DDT | 0 | ty_cloud_optics | | inout | F | -!! ! ######################################################################################### - subroutine rrtmgp_sw_init(Model,mpicomm, mpirank, mpiroot, sw_gas_props, sw_cloud_props, & - errmsg, errflg) - - ! Inputs - type(GFS_control_type), intent(in) :: & - Model ! DDT containing model control parameters - integer,intent(in) :: & - mpicomm, & ! MPI communicator - mpirank, & ! Current MPI rank - mpiroot ! Master MPI rank - type(ty_gas_optics_rrtmgp),intent(inout) :: & - sw_gas_props - type(ty_cloud_optics),intent(inout) :: & - sw_cloud_props - - ! Outputs - character(len=*), intent(out) :: & - errmsg ! Error message - integer, intent(out) :: & - errflg ! Error code - - ! Load gas-optics - call sw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, sw_gas_props, errmsg, errflg) - - ! Load cloud optics - if (Model%rrtmgp_cld_optics .gt. 0) then - call sw_cloud_optics_init(Model, mpicomm, mpirank, mpiroot, sw_cloud_props, errmsg, errflg) - endif + ! SUBROUTINE rrtmgp_sw_init + ! ######################################################################################### + subroutine rrtmgp_sw_init() end subroutine rrtmgp_sw_init ! ######################################################################################### + ! SUBROUTINE rrtmgp_sw_run ! ######################################################################################### !! \section arg_table_rrtmgp_sw_run Argument Table !! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | !! |-------------------------|------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------|-------|------|-----------------------|-----------|--------|----------| !! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | +!! | Radtend | GFS_radtend_type_instance | Fortran DDT containing FV3-GFS radiation tendencies | DDT | 0 | GFS_radtend_type | | in | F | !! | ncol | horizontal_loop_extent | horizontal dimension | count | 0 | integer | | in | F | !! | p_lay | air_pressure_at_layer_for_RRTMGP_in_hPa | air pressure layer | hPa | 2 | real | kind_phys | in | F | !! | p_lev | air_pressure_at_interface_for_RRTMGP_in_hPa | air pressure level | hPa | 2 | real | kind_phys | in | F | @@ -90,13 +56,14 @@ end subroutine rrtmgp_sw_init !! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | !! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | !! - subroutine rrtmgp_sw_run(Model, ncol, sw_gas_props, p_lay, t_lay, p_lev, gas_concentrations, & - optical_props_clds, optical_props_aerosol,& + subroutine rrtmgp_sw_run(Model, Radtend, ncol, sw_gas_props, p_lay, t_lay, p_lev, gas_concentrations, & + optical_props_clds, optical_props_aerosol, & lsswr, sfcalb_nir_dir, sfcalb_nir_dif, cossza, nday, idxday, hsw0, hswb, scmpsw, & fluxUP_allsky, fluxDOWN_allsky, fluxUP_clrsky, fluxDOWN_clrsky, errmsg, errflg) ! Inputs type(GFS_control_type), intent(in) :: Model + type(GFS_radtend_type), intent(in) :: Radtend integer, intent(in) :: & ncol, & ! Number of horizontal gridpoints nday ! Number of daytime points @@ -157,7 +124,7 @@ subroutine rrtmgp_sw_run(Model, ncol, sw_gas_props, p_lay, t_lay, p_lev, gas_con fluxSWBB_up_allsky, fluxSWBB_dn_allsky real(kind_phys), dimension(ncol,Model%levs) :: vmrTemp logical :: l_ClrSky_HR=.false., l_AllSky_HR_byband=.false., l_scmpsw=.false. - integer :: k, iGas + integer :: iGas type(ty_optical_props_2str) :: & optical_props_clds_daylit, & ! RRTMGP DDT: longwave cloud radiative properties optical_props_aerosol_daylit ! RRTMGP DDT: longwave aerosol radiative properties @@ -197,9 +164,9 @@ subroutine rrtmgp_sw_run(Model, ncol, sw_gas_props, p_lay, t_lay, p_lev, gas_con optical_props_aerosol_daylit%g = optical_props_aerosol%g(idxday,:,:) ! Similarly, subset the gas concentrations. - do iGas=1,size(active_gases,1) - call check_error_msg('rrtmgp_sw_run',gas_concentrations%get_vmr(trim(active_gases(iGas)),vmrTemp)) - call check_error_msg('rrtmgp_sw_run',gas_concentrations_daylit%set_vmr(trim(active_gases(iGas)),vmrTemp(idxday,:))) + do iGas=1,Model%nGases + call check_error_msg('rrtmgp_sw_run',gas_concentrations%get_vmr(trim(Radtend%active_gases(iGas)),vmrTemp)) + call check_error_msg('rrtmgp_sw_run',gas_concentrations_daylit%set_vmr(trim(Radtend%active_gases(iGas)),vmrTemp(idxday,:))) enddo ! Initialize RRTMGP DDT containing 2D(3D) fluxes @@ -234,6 +201,9 @@ subroutine rrtmgp_sw_run(Model, ncol, sw_gas_props, p_lay, t_lay, p_lev, gas_con endif end subroutine rrtmgp_sw_run + ! ######################################################################################### + ! SUBROUTINE rrtmgp_sw_finalize + ! ######################################################################################### subroutine rrtmgp_sw_finalize() end subroutine rrtmgp_sw_finalize diff --git a/physics/rrtmgp_sw_cloud_optics.F90 b/physics/rrtmgp_sw_cloud_optics.F90 index 35e8d32b6..809be4a77 100644 --- a/physics/rrtmgp_sw_cloud_optics.F90 +++ b/physics/rrtmgp_sw_cloud_optics.F90 @@ -1,2412 +1,526 @@ -module mo_rrtmgp_sw_cloud_optics - use machine, only: kind_phys - use physparam, only: iswcliq, iswcice, iovrsw - use mersenne_twister, only: random_setseed, random_number, random_stat - implicit none - - ! Parameters used for RRTMG cloud-optics - integer,parameter :: & - nBandsSW_RRTMG = 14 - real(kind_phys),parameter :: & - a0r = 3.07e-3 - real(kind_phys),dimension(nBandsSW_RRTMG),parameter :: & - b0r = (/0.466, 0.437, 0.416, 0.391, 0.374, 0.352, 0.183, & - 0.048, 0.012, 0.000, 0.000, 0.000, 0.000, 0.496/) - real(kind_phys),dimension(nBandsSW_RRTMG),parameter :: & - b0s = (/0.460, 0.460, 0.460, 0.460, 0.460, 0.460, 0.460, & - 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.460/) - real(kind_phys),dimension(nBandsSW_RRTMG),parameter :: & - b1s = (/0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, & - 1.62e-5, 1.62e-5, 0.000, 0.000, 0.000, 0.000, 0.000/) - real(kind_phys),dimension(nBandsSW_RRTMG),parameter :: & - c0r = (/0.975, 0.965, 0.960, 0.955, 0.952, 0.950, 0.944, & - 0.894, 0.884, 0.883, 0.883, 0.883, 0.883, 0.980/) - real(kind_phys),dimension(nBandsSW_RRTMG),parameter :: & - c0s = (/0.970, 0.970, 0.970, 0.970, 0.970, 0.970, 0.970, & - 0.970, 0.970, 0.700, 0.700, 0.700, 0.700, 0.970/) - - ! RRTMG SW cloud property coefficients - ! Liquid - real(kind_phys),dimension(58,nBandsSW_RRTMG),parameter :: & ! - extliq1 = reshape(source= (/ & ! - 8.981463e-01, 6.317895e-01, 4.557508e-01, 3.481624e-01, 2.797950e-01, & ! 1 - 2.342753e-01, 2.026934e-01, 1.800102e-01, 1.632408e-01, 1.505384e-01, & ! - 1.354524e-01, 1.246520e-01, 1.154342e-01, 1.074756e-01, 1.005353e-01, & ! - 9.442987e-02, 8.901760e-02, 8.418693e-02, 7.984904e-02, 7.593229e-02, & ! - 7.237827e-02, 6.913887e-02, 6.617415e-02, 6.345061e-02, 6.094001e-02, & ! - 5.861834e-02, 5.646506e-02, 5.446250e-02, 5.249596e-02, 5.081114e-02, & ! - 4.922243e-02, 4.772189e-02, 4.630243e-02, 4.495766e-02, 4.368189e-02, & ! - 4.246995e-02, 4.131720e-02, 4.021941e-02, 3.917276e-02, 3.817376e-02, & ! - 3.721926e-02, 3.630635e-02, 3.543237e-02, 3.459491e-02, 3.379171e-02, & ! - 3.302073e-02, 3.228007e-02, 3.156798e-02, 3.088284e-02, 3.022315e-02, & ! - 2.958753e-02, 2.897468e-02, 2.838340e-02, 2.781258e-02, 2.726117e-02, & ! - 2.672821e-02, 2.621278e-02, 2.5714e-02, & ! - 8.293797e-01, 6.048371e-01, 4.465706e-01, 3.460387e-01, 2.800064e-01, & ! 2 - 2.346584e-01, 2.022399e-01, 1.782626e-01, 1.600153e-01, 1.457903e-01, & ! - 1.334061e-01, 1.228548e-01, 1.138396e-01, 1.060486e-01, 9.924856e-02, & ! - 9.326208e-02, 8.795158e-02, 8.320883e-02, 7.894750e-02, 7.509792e-02, & ! - 7.160323e-02, 6.841653e-02, 6.549889e-02, 6.281763e-02, 6.034516e-02, & ! - 5.805802e-02, 5.593615e-02, 5.396226e-02, 5.202302e-02, 5.036246e-02, & ! - 4.879606e-02, 4.731610e-02, 4.591565e-02, 4.458852e-02, 4.332912e-02, & ! - 4.213243e-02, 4.099390e-02, 3.990941e-02, 3.887522e-02, 3.788792e-02, & ! - 3.694440e-02, 3.604183e-02, 3.517760e-02, 3.434934e-02, 3.355485e-02, & ! - 3.279211e-02, 3.205925e-02, 3.135458e-02, 3.067648e-02, 3.002349e-02, & ! - 2.939425e-02, 2.878748e-02, 2.820200e-02, 2.763673e-02, 2.709062e-02, & ! - 2.656272e-02, 2.605214e-02, 2.5558e-02, & ! - 9.193685e-01, 6.128292e-01, 4.344150e-01, 3.303048e-01, 2.659500e-01, & ! 3 - 2.239727e-01, 1.953457e-01, 1.751012e-01, 1.603515e-01, 1.493360e-01, & ! - 1.323791e-01, 1.219335e-01, 1.130076e-01, 1.052926e-01, 9.855839e-02, & ! - 9.262925e-02, 8.736918e-02, 8.267112e-02, 7.844965e-02, 7.463585e-02, & ! - 7.117343e-02, 6.801601e-02, 6.512503e-02, 6.246815e-02, 6.001806e-02, & ! - 5.775154e-02, 5.564872e-02, 5.369250e-02, 5.176284e-02, 5.011536e-02, & ! - 4.856099e-02, 4.709211e-02, 4.570193e-02, 4.438430e-02, 4.313375e-02, & ! - 4.194529e-02, 4.081443e-02, 3.973712e-02, 3.870966e-02, 3.772866e-02, & ! - 3.679108e-02, 3.589409e-02, 3.503514e-02, 3.421185e-02, 3.342206e-02, & ! - 3.266377e-02, 3.193513e-02, 3.123447e-02, 3.056018e-02, 2.991081e-02, & ! - 2.928502e-02, 2.868154e-02, 2.809920e-02, 2.753692e-02, 2.699367e-02, & ! - 2.646852e-02, 2.596057e-02, 2.5469e-02, & ! - 9.136931e-01, 5.743244e-01, 4.080708e-01, 3.150572e-01, 2.577261e-01, & ! 4 - 2.197900e-01, 1.933037e-01, 1.740212e-01, 1.595056e-01, 1.482756e-01, & ! - 1.312164e-01, 1.209246e-01, 1.121227e-01, 1.045095e-01, 9.785967e-02, & ! - 9.200149e-02, 8.680170e-02, 8.215531e-02, 7.797850e-02, 7.420361e-02, & ! - 7.077530e-02, 6.764798e-02, 6.478369e-02, 6.215063e-02, 5.972189e-02, & ! - 5.747458e-02, 5.538913e-02, 5.344866e-02, 5.153216e-02, 4.989745e-02, & ! - 4.835476e-02, 4.689661e-02, 4.551629e-02, 4.420777e-02, 4.296563e-02, & ! - 4.178497e-02, 4.066137e-02, 3.959081e-02, 3.856963e-02, 3.759452e-02, & ! - 3.666244e-02, 3.577061e-02, 3.491650e-02, 3.409777e-02, 3.331227e-02, & ! - 3.255803e-02, 3.183322e-02, 3.113617e-02, 3.046530e-02, 2.981918e-02, & ! - 2.919646e-02, 2.859591e-02, 2.801635e-02, 2.745671e-02, 2.691599e-02, & ! - 2.639324e-02, 2.588759e-02, 2.5398e-02, & ! - 8.447548e-01, 5.326840e-01, 3.921523e-01, 3.119082e-01, 2.597055e-01, & ! 5 - 2.228737e-01, 1.954157e-01, 1.741155e-01, 1.570881e-01, 1.431520e-01, & ! - 1.302034e-01, 1.200491e-01, 1.113571e-01, 1.038330e-01, 9.725657e-02, & ! - 9.145949e-02, 8.631112e-02, 8.170840e-02, 7.756901e-02, 7.382641e-02, & ! - 7.042616e-02, 6.732338e-02, 6.448069e-02, 6.186672e-02, 5.945494e-02, & ! - 5.722277e-02, 5.515089e-02, 5.322262e-02, 5.132153e-02, 4.969799e-02, & ! - 4.816556e-02, 4.671686e-02, 4.534525e-02, 4.404480e-02, 4.281014e-02, & ! - 4.163643e-02, 4.051930e-02, 3.945479e-02, 3.843927e-02, 3.746945e-02, & ! - 3.654234e-02, 3.565518e-02, 3.480547e-02, 3.399088e-02, 3.320930e-02, & ! - 3.245876e-02, 3.173745e-02, 3.104371e-02, 3.037600e-02, 2.973287e-02, & ! - 2.911300e-02, 2.851516e-02, 2.793818e-02, 2.738101e-02, 2.684264e-02, & ! - 2.632214e-02, 2.581863e-02, 2.5331e-02, & ! - 7.727642e-01, 5.034865e-01, 3.808673e-01, 3.080333e-01, 2.586453e-01, & ! 6 - 2.224989e-01, 1.947060e-01, 1.725821e-01, 1.545096e-01, 1.394456e-01, & ! - 1.288683e-01, 1.188852e-01, 1.103317e-01, 1.029214e-01, 9.643967e-02, & ! - 9.072239e-02, 8.564194e-02, 8.109758e-02, 7.700875e-02, 7.331026e-02, & ! - 6.994879e-02, 6.688028e-02, 6.406807e-02, 6.148133e-02, 5.909400e-02, & ! - 5.688388e-02, 5.483197e-02, 5.292185e-02, 5.103763e-02, 4.942905e-02, & ! - 4.791039e-02, 4.647438e-02, 4.511453e-02, 4.382497e-02, 4.260043e-02, & ! - 4.143616e-02, 4.032784e-02, 3.927155e-02, 3.826375e-02, 3.730117e-02, & ! - 3.638087e-02, 3.550013e-02, 3.465646e-02, 3.384759e-02, 3.307141e-02, & ! - 3.232598e-02, 3.160953e-02, 3.092040e-02, 3.025706e-02, 2.961810e-02, & ! - 2.900220e-02, 2.840814e-02, 2.783478e-02, 2.728106e-02, 2.674599e-02, & ! - 2.622864e-02, 2.572816e-02, 2.5244e-02, & ! - 7.416833e-01, 4.959591e-01, 3.775057e-01, 3.056353e-01, 2.565943e-01, & ! 7 - 2.206935e-01, 1.931479e-01, 1.712860e-01, 1.534837e-01, 1.386906e-01, & ! - 1.281198e-01, 1.182344e-01, 1.097595e-01, 1.024137e-01, 9.598552e-02, & ! - 9.031320e-02, 8.527093e-02, 8.075927e-02, 7.669869e-02, 7.302481e-02, & ! - 6.968491e-02, 6.663542e-02, 6.384008e-02, 6.126838e-02, 5.889452e-02, & ! - 5.669654e-02, 5.465558e-02, 5.275540e-02, 5.087937e-02, 4.927904e-02, & ! - 4.776796e-02, 4.633895e-02, 4.498557e-02, 4.370202e-02, 4.248306e-02, & ! - 4.132399e-02, 4.022052e-02, 3.916878e-02, 3.816523e-02, 3.720665e-02, & ! - 3.629011e-02, 3.541290e-02, 3.457257e-02, 3.376685e-02, 3.299365e-02, & ! - 3.225105e-02, 3.153728e-02, 3.085069e-02, 3.018977e-02, 2.955310e-02, & ! - 2.893940e-02, 2.834742e-02, 2.777606e-02, 2.722424e-02, 2.669099e-02, & ! - 2.617539e-02, 2.567658e-02, 2.5194e-02, & ! - 7.058580e-01, 4.866573e-01, 3.712238e-01, 2.998638e-01, 2.513441e-01, & ! 8 - 2.161972e-01, 1.895576e-01, 1.686669e-01, 1.518437e-01, 1.380046e-01, & ! - 1.267564e-01, 1.170399e-01, 1.087026e-01, 1.014704e-01, 9.513729e-02, & ! - 8.954555e-02, 8.457221e-02, 8.012009e-02, 7.611136e-02, 7.248294e-02, & ! - 6.918317e-02, 6.616934e-02, 6.340584e-02, 6.086273e-02, 5.851465e-02, & ! - 5.634001e-02, 5.432027e-02, 5.243946e-02, 5.058070e-02, 4.899628e-02, & ! - 4.749975e-02, 4.608411e-02, 4.474303e-02, 4.347082e-02, 4.226237e-02, & ! - 4.111303e-02, 4.001861e-02, 3.897528e-02, 3.797959e-02, 3.702835e-02, & ! - 3.611867e-02, 3.524791e-02, 3.441364e-02, 3.361360e-02, 3.284577e-02, & ! - 3.210823e-02, 3.139923e-02, 3.071716e-02, 3.006052e-02, 2.942791e-02, & ! - 2.881806e-02, 2.822974e-02, 2.766185e-02, 2.711335e-02, 2.658326e-02, & ! - 2.607066e-02, 2.557473e-02, 2.5095e-02, & ! - 6.822779e-01, 4.750373e-01, 3.634834e-01, 2.940726e-01, 2.468060e-01, & ! 9 - 2.125768e-01, 1.866586e-01, 1.663588e-01, 1.500326e-01, 1.366192e-01, & ! - 1.253472e-01, 1.158052e-01, 1.076101e-01, 1.004954e-01, 9.426089e-02, & ! - 8.875268e-02, 8.385090e-02, 7.946063e-02, 7.550578e-02, 7.192466e-02, & ! - 6.866669e-02, 6.569001e-02, 6.295971e-02, 6.044642e-02, 5.812526e-02, & ! - 5.597500e-02, 5.397746e-02, 5.211690e-02, 5.027505e-02, 4.870703e-02, & ! - 4.722555e-02, 4.582373e-02, 4.449540e-02, 4.323497e-02, 4.203742e-02, & ! - 4.089821e-02, 3.981321e-02, 3.877867e-02, 3.779118e-02, 3.684762e-02, & ! - 3.594514e-02, 3.508114e-02, 3.425322e-02, 3.345917e-02, 3.269698e-02, & ! - 3.196477e-02, 3.126082e-02, 3.058352e-02, 2.993141e-02, 2.930310e-02, & ! - 2.869732e-02, 2.811289e-02, 2.754869e-02, 2.700371e-02, 2.647698e-02, & ! - 2.596760e-02, 2.547473e-02, 2.4998e-02, & ! - 6.666233e-01, 4.662044e-01, 3.579517e-01, 2.902984e-01, 2.440475e-01, & ! 10 - 2.104431e-01, 1.849277e-01, 1.648970e-01, 1.487555e-01, 1.354714e-01, & ! - 1.244173e-01, 1.149913e-01, 1.068903e-01, 9.985323e-02, 9.368351e-02, & ! - 8.823009e-02, 8.337507e-02, 7.902511e-02, 7.510529e-02, 7.155482e-02, & ! - 6.832386e-02, 6.537113e-02, 6.266218e-02, 6.016802e-02, 5.786408e-02, & ! - 5.572939e-02, 5.374598e-02, 5.189830e-02, 5.006825e-02, 4.851081e-02, & ! - 4.703906e-02, 4.564623e-02, 4.432621e-02, 4.307349e-02, 4.188312e-02, & ! - 4.075060e-02, 3.967183e-02, 3.864313e-02, 3.766111e-02, 3.672269e-02, & ! - 3.582505e-02, 3.496559e-02, 3.414196e-02, 3.335198e-02, 3.259362e-02, & ! - 3.186505e-02, 3.116454e-02, 3.049052e-02, 2.984152e-02, 2.921617e-02, & ! - 2.861322e-02, 2.803148e-02, 2.746986e-02, 2.692733e-02, 2.640295e-02, & ! - 2.589582e-02, 2.540510e-02, 2.4930e-02, & ! - 6.535669e-01, 4.585865e-01, 3.529226e-01, 2.867245e-01, 2.413848e-01, & ! 11 - 2.083956e-01, 1.833191e-01, 1.636150e-01, 1.477247e-01, 1.346392e-01, & ! - 1.236449e-01, 1.143095e-01, 1.062828e-01, 9.930773e-02, 9.319029e-02, & ! - 8.778150e-02, 8.296497e-02, 7.864847e-02, 7.475799e-02, 7.123343e-02, & ! - 6.802549e-02, 6.509332e-02, 6.240285e-02, 5.992538e-02, 5.763657e-02, & ! - 5.551566e-02, 5.354483e-02, 5.170870e-02, 4.988866e-02, 4.834061e-02, & ! - 4.687751e-02, 4.549264e-02, 4.417999e-02, 4.293410e-02, 4.175006e-02, & ! - 4.062344e-02, 3.955019e-02, 3.852663e-02, 3.754943e-02, 3.661553e-02, & ! - 3.572214e-02, 3.486669e-02, 3.404683e-02, 3.326040e-02, 3.250542e-02, & ! - 3.178003e-02, 3.108254e-02, 3.041139e-02, 2.976511e-02, 2.914235e-02, & ! - 2.854187e-02, 2.796247e-02, 2.740309e-02, 2.686271e-02, 2.634038e-02, & ! - 2.583520e-02, 2.534636e-02, 2.4873e-02, & ! - 6.448790e-01, 4.541425e-01, 3.503348e-01, 2.850494e-01, 2.401966e-01, & ! 12 - 2.074811e-01, 1.825631e-01, 1.629515e-01, 1.471142e-01, 1.340574e-01, & ! - 1.231462e-01, 1.138628e-01, 1.058802e-01, 9.894286e-02, 9.285818e-02, & ! - 8.747802e-02, 8.268676e-02, 7.839271e-02, 7.452230e-02, 7.101580e-02, & ! - 6.782418e-02, 6.490685e-02, 6.222991e-02, 5.976484e-02, 5.748742e-02, & ! - 5.537703e-02, 5.341593e-02, 5.158883e-02, 4.977355e-02, 4.823172e-02, & ! - 4.677430e-02, 4.539465e-02, 4.408680e-02, 4.284533e-02, 4.166539e-02, & ! - 4.054257e-02, 3.947283e-02, 3.845256e-02, 3.747842e-02, 3.654737e-02, & ! - 3.565665e-02, 3.480370e-02, 3.398620e-02, 3.320198e-02, 3.244908e-02, & ! - 3.172566e-02, 3.103002e-02, 3.036062e-02, 2.971600e-02, 2.909482e-02, & ! - 2.849582e-02, 2.791785e-02, 2.735982e-02, 2.682072e-02, 2.629960e-02, & ! - 2.579559e-02, 2.530786e-02, 2.4836e-02, & ! - 6.422688e-01, 4.528453e-01, 3.497232e-01, 2.847724e-01, 2.400815e-01, & ! 13 - 2.074403e-01, 1.825502e-01, 1.629415e-01, 1.470934e-01, 1.340183e-01, & ! - 1.230935e-01, 1.138049e-01, 1.058201e-01, 9.888245e-02, 9.279878e-02, & ! - 8.742053e-02, 8.263175e-02, 7.834058e-02, 7.447327e-02, 7.097000e-02, & ! - 6.778167e-02, 6.486765e-02, 6.219400e-02, 5.973215e-02, 5.745790e-02, & ! - 5.535059e-02, 5.339250e-02, 5.156831e-02, 4.975308e-02, 4.821235e-02, & ! - 4.675596e-02, 4.537727e-02, 4.407030e-02, 4.282968e-02, 4.165053e-02, & ! - 4.052845e-02, 3.945941e-02, 3.843980e-02, 3.746628e-02, 3.653583e-02, & ! - 3.564567e-02, 3.479326e-02, 3.397626e-02, 3.319253e-02, 3.244008e-02, & ! - 3.171711e-02, 3.102189e-02, 3.035289e-02, 2.970866e-02, 2.908784e-02, & ! - 2.848920e-02, 2.791156e-02, 2.735385e-02, 2.681507e-02, 2.629425e-02, & ! - 2.579053e-02, 2.530308e-02, 2.4831e-02, & ! - 4.614710e-01, 4.556116e-01, 4.056568e-01, 3.529833e-01, 3.060334e-01, & ! 14 - 2.658127e-01, 2.316095e-01, 2.024325e-01, 1.773749e-01, 1.556867e-01, & ! - 1.455558e-01, 1.332882e-01, 1.229052e-01, 1.140067e-01, 1.062981e-01, & ! - 9.955703e-02, 9.361333e-02, 8.833420e-02, 8.361467e-02, 7.937071e-02, & ! - 7.553420e-02, 7.204942e-02, 6.887031e-02, 6.595851e-02, 6.328178e-02, & ! - 6.081286e-02, 5.852854e-02, 5.640892e-02, 5.431269e-02, 5.252561e-02, & ! - 5.084345e-02, 4.925727e-02, 4.775910e-02, 4.634182e-02, 4.499907e-02, & ! - 4.372512e-02, 4.251484e-02, 4.136357e-02, 4.026710e-02, 3.922162e-02, & ! - 3.822365e-02, 3.727004e-02, 3.635790e-02, 3.548457e-02, 3.464764e-02, & ! - 3.384488e-02, 3.307424e-02, 3.233384e-02, 3.162192e-02, 3.093688e-02, & ! - 3.027723e-02, 2.964158e-02, 2.902864e-02, 2.843722e-02, 2.786621e-02, & ! - 2.731457e-02, 2.678133e-02, 2.6266e-02/), & ! - shape = (/58,nBandsSW_RRTMG/)) - - real(kind_phys),dimension(58,nBandsSW_RRTMG),parameter :: & ! - extliq2 = reshape(source= (/ & ! - 9.004493E-01, 6.366723E-01, 4.542354E-01, 3.468253E-01, 2.816431E-01, & ! 1 - 2.383415E-01, 2.070854E-01, 1.831854E-01, 1.642115E-01, 1.487539E-01, & ! - 1.359169E-01, 1.250900E-01, 1.158354E-01, 1.078400E-01, 1.008646E-01, & ! - 9.472307E-02, 8.928000E-02, 8.442308E-02, 8.005924E-02, 7.612231E-02, & ! - 7.255153E-02, 6.929539E-02, 6.631769E-02, 6.358153E-02, 6.106231E-02, & ! - 5.873077E-02, 5.656924E-02, 5.455769E-02, 5.267846E-02, 5.091923E-02, & ! - 4.926692E-02, 4.771154E-02, 4.623923E-02, 4.484385E-02, 4.351539E-02, & ! - 4.224615E-02, 4.103385E-02, 3.986538E-02, 3.874077E-02, 3.765462E-02, & ! - 3.660077E-02, 3.557384E-02, 3.457615E-02, 3.360308E-02, 3.265000E-02, & ! - 3.171770E-02, 3.080538E-02, 2.990846E-02, 2.903000E-02, 2.816461E-02, & ! - 2.731539E-02, 2.648231E-02, 2.566308E-02, 2.485923E-02, 2.407000E-02, & ! - 2.329615E-02, 2.253769E-02, 2.179615E-02, & ! - 6.741200e-01, 5.390739e-01, 4.198767e-01, 3.332553e-01, 2.735633e-01, & ! 2 - 2.317727e-01, 2.012760e-01, 1.780400e-01, 1.596927e-01, 1.447980e-01, & ! - 1.324480e-01, 1.220347e-01, 1.131327e-01, 1.054313e-01, 9.870534e-02, & ! - 9.278200e-02, 8.752599e-02, 8.282933e-02, 7.860600e-02, 7.479133e-02, & ! - 7.132800e-02, 6.816733e-02, 6.527401e-02, 6.261266e-02, 6.015934e-02, & ! - 5.788867e-02, 5.578134e-02, 5.381667e-02, 5.198133e-02, 5.026067e-02, & ! - 4.864466e-02, 4.712267e-02, 4.568066e-02, 4.431200e-02, 4.300867e-02, & ! - 4.176600e-02, 4.057400e-02, 3.942534e-02, 3.832066e-02, 3.725068e-02, & ! - 3.621400e-02, 3.520533e-02, 3.422333e-02, 3.326400e-02, 3.232467e-02, & ! - 3.140535e-02, 3.050400e-02, 2.962000e-02, 2.875267e-02, 2.789800e-02, & ! - 2.705934e-02, 2.623667e-02, 2.542667e-02, 2.463200e-02, 2.385267e-02, & ! - 2.308667e-02, 2.233667e-02, 2.160067e-02, & ! - 9.250861e-01, 6.245692e-01, 4.347038e-01, 3.320208e-01, 2.714869e-01, & ! 3 - 2.309516e-01, 2.012592e-01, 1.783315e-01, 1.600369e-01, 1.451000e-01, & ! - 1.326838e-01, 1.222069e-01, 1.132554e-01, 1.055146e-01, 9.876000e-02, & ! - 9.281386e-02, 8.754000e-02, 8.283078e-02, 7.860077e-02, 7.477769e-02, & ! - 7.130847e-02, 6.814461e-02, 6.524615e-02, 6.258462e-02, 6.012847e-02, & ! - 5.785462e-02, 5.574231e-02, 5.378000e-02, 5.194461e-02, 5.022462e-02, & ! - 4.860846e-02, 4.708462e-02, 4.564154e-02, 4.427462e-02, 4.297231e-02, & ! - 4.172769e-02, 4.053693e-02, 3.939000e-02, 3.828462e-02, 3.721692e-02, & ! - 3.618000e-02, 3.517077e-02, 3.418923e-02, 3.323077e-02, 3.229154e-02, & ! - 3.137154e-02, 3.047154e-02, 2.959077e-02, 2.872308e-02, 2.786846e-02, & ! - 2.703077e-02, 2.620923e-02, 2.540077e-02, 2.460615e-02, 2.382693e-02, & ! - 2.306231e-02, 2.231231e-02, 2.157923e-02, & ! - 9.298960e-01, 5.776460e-01, 4.083450e-01, 3.211160e-01, 2.666390e-01, & ! 4 - 2.281990e-01, 1.993250e-01, 1.768080e-01, 1.587810e-01, 1.440390e-01, & ! - 1.317720e-01, 1.214150e-01, 1.125540e-01, 1.048890e-01, 9.819600e-02, & ! - 9.230201e-02, 8.706900e-02, 8.239698e-02, 7.819500e-02, 7.439899e-02, & ! - 7.095300e-02, 6.780700e-02, 6.492900e-02, 6.228600e-02, 5.984600e-02, & ! - 5.758599e-02, 5.549099e-02, 5.353801e-02, 5.171400e-02, 5.000500e-02, & ! - 4.840000e-02, 4.688500e-02, 4.545100e-02, 4.409300e-02, 4.279700e-02, & ! - 4.156100e-02, 4.037700e-02, 3.923800e-02, 3.813800e-02, 3.707600e-02, & ! - 3.604500e-02, 3.504300e-02, 3.406500e-02, 3.310800e-02, 3.217700e-02, & ! - 3.126600e-02, 3.036800e-02, 2.948900e-02, 2.862400e-02, 2.777500e-02, & ! - 2.694200e-02, 2.612300e-02, 2.531700e-02, 2.452800e-02, 2.375100e-02, & ! - 2.299100e-02, 2.224300e-02, 2.151201e-02, & ! - 8.780964e-01, 5.407031e-01, 3.961100e-01, 3.166645e-01, 2.640455e-01, & ! 5 - 2.261070e-01, 1.974820e-01, 1.751775e-01, 1.573415e-01, 1.427725e-01, & ! - 1.306535e-01, 1.204195e-01, 1.116650e-01, 1.040915e-01, 9.747550e-02, & ! - 9.164800e-02, 8.647649e-02, 8.185501e-02, 7.770200e-02, 7.394749e-02, & ! - 7.053800e-02, 6.742700e-02, 6.457999e-02, 6.196149e-02, 5.954450e-02, & ! - 5.730650e-02, 5.522949e-02, 5.329450e-02, 5.148500e-02, 4.979000e-02, & ! - 4.819600e-02, 4.669301e-02, 4.527050e-02, 4.391899e-02, 4.263500e-02, & ! - 4.140500e-02, 4.022850e-02, 3.909500e-02, 3.800199e-02, 3.694600e-02, & ! - 3.592000e-02, 3.492250e-02, 3.395050e-02, 3.300150e-02, 3.207250e-02, & ! - 3.116250e-02, 3.027100e-02, 2.939500e-02, 2.853500e-02, 2.768900e-02, & ! - 2.686000e-02, 2.604350e-02, 2.524150e-02, 2.445350e-02, 2.368049e-02, & ! - 2.292150e-02, 2.217800e-02, 2.144800e-02, & ! - 7.937480e-01, 5.123036e-01, 3.858181e-01, 3.099622e-01, 2.586829e-01, & ! 6 - 2.217587e-01, 1.939755e-01, 1.723397e-01, 1.550258e-01, 1.408600e-01, & ! - 1.290545e-01, 1.190661e-01, 1.105039e-01, 1.030848e-01, 9.659387e-02, & ! - 9.086775e-02, 8.577807e-02, 8.122452e-02, 7.712711e-02, 7.342193e-02, & ! - 7.005387e-02, 6.697840e-02, 6.416000e-02, 6.156903e-02, 5.917484e-02, & ! - 5.695807e-02, 5.489968e-02, 5.298097e-02, 5.118806e-02, 4.950645e-02, & ! - 4.792710e-02, 4.643581e-02, 4.502484e-02, 4.368547e-02, 4.241001e-02, & ! - 4.118936e-02, 4.002193e-02, 3.889711e-02, 3.781322e-02, 3.676387e-02, & ! - 3.574549e-02, 3.475548e-02, 3.379033e-02, 3.284678e-02, 3.192420e-02, & ! - 3.102032e-02, 3.013484e-02, 2.926258e-02, 2.840839e-02, 2.756742e-02, & ! - 2.674258e-02, 2.593064e-02, 2.513258e-02, 2.435000e-02, 2.358064e-02, & ! - 2.282581e-02, 2.208548e-02, 2.135936e-02, & ! - 7.533129e-01, 5.033129e-01, 3.811271e-01, 3.062757e-01, 2.558729e-01, & ! 7 - 2.196828e-01, 1.924372e-01, 1.711714e-01, 1.541086e-01, 1.401114e-01, & ! - 1.284257e-01, 1.185200e-01, 1.100243e-01, 1.026529e-01, 9.620142e-02, & ! - 9.050714e-02, 8.544428e-02, 8.091714e-02, 7.684000e-02, 7.315429e-02, & ! - 6.980143e-02, 6.673999e-02, 6.394000e-02, 6.136000e-02, 5.897715e-02, & ! - 5.677000e-02, 5.472285e-02, 5.281286e-02, 5.102858e-02, 4.935429e-02, & ! - 4.778000e-02, 4.629714e-02, 4.489142e-02, 4.355857e-02, 4.228715e-02, & ! - 4.107285e-02, 3.990857e-02, 3.879000e-02, 3.770999e-02, 3.666429e-02, & ! - 3.565000e-02, 3.466286e-02, 3.370143e-02, 3.276143e-02, 3.184143e-02, & ! - 3.094000e-02, 3.005714e-02, 2.919000e-02, 2.833714e-02, 2.750000e-02, & ! - 2.667714e-02, 2.586714e-02, 2.507143e-02, 2.429143e-02, 2.352428e-02, & ! - 2.277143e-02, 2.203429e-02, 2.130857e-02, & ! - 7.079894e-01, 4.878198e-01, 3.719852e-01, 3.001873e-01, 2.514795e-01, & ! 8 - 2.163013e-01, 1.897100e-01, 1.689033e-01, 1.521793e-01, 1.384449e-01, & ! - 1.269666e-01, 1.172326e-01, 1.088745e-01, 1.016224e-01, 9.527085e-02, & ! - 8.966240e-02, 8.467543e-02, 8.021144e-02, 7.619344e-02, 7.255676e-02, & ! - 6.924996e-02, 6.623030e-02, 6.346261e-02, 6.091499e-02, 5.856325e-02, & ! - 5.638385e-02, 5.435930e-02, 5.247156e-02, 5.070699e-02, 4.905230e-02, & ! - 4.749499e-02, 4.602611e-02, 4.463581e-02, 4.331543e-02, 4.205647e-02, & ! - 4.085241e-02, 3.969978e-02, 3.859033e-02, 3.751877e-02, 3.648168e-02, & ! - 3.547468e-02, 3.449553e-02, 3.354072e-02, 3.260732e-02, 3.169438e-02, & ! - 3.079969e-02, 2.992146e-02, 2.905875e-02, 2.821201e-02, 2.737873e-02, & ! - 2.656052e-02, 2.575586e-02, 2.496511e-02, 2.418783e-02, 2.342500e-02, & ! - 2.267646e-02, 2.194177e-02, 2.122146e-02, & ! - 6.850164e-01, 4.762468e-01, 3.642001e-01, 2.946012e-01, 2.472001e-01, & ! 9 - 2.128588e-01, 1.868537e-01, 1.664893e-01, 1.501142e-01, 1.366620e-01, & ! - 1.254147e-01, 1.158721e-01, 1.076732e-01, 1.005530e-01, 9.431306e-02, & ! - 8.879891e-02, 8.389232e-02, 7.949714e-02, 7.553857e-02, 7.195474e-02, & ! - 6.869413e-02, 6.571444e-02, 6.298286e-02, 6.046779e-02, 5.814474e-02, & ! - 5.599141e-02, 5.399114e-02, 5.212443e-02, 5.037870e-02, 4.874321e-02, & ! - 4.720219e-02, 4.574813e-02, 4.437160e-02, 4.306460e-02, 4.181810e-02, & ! - 4.062603e-02, 3.948252e-02, 3.838256e-02, 3.732049e-02, 3.629192e-02, & ! - 3.529301e-02, 3.432190e-02, 3.337412e-02, 3.244842e-02, 3.154175e-02, & ! - 3.065253e-02, 2.978063e-02, 2.892367e-02, 2.808221e-02, 2.725478e-02, & ! - 2.644174e-02, 2.564175e-02, 2.485508e-02, 2.408303e-02, 2.332365e-02, & ! - 2.257890e-02, 2.184824e-02, 2.113224e-02, & ! - 6.673017e-01, 4.664520e-01, 3.579398e-01, 2.902234e-01, 2.439904e-01, & ! 10 - 2.104149e-01, 1.849277e-01, 1.649234e-01, 1.488087e-01, 1.355515e-01, & ! - 1.244562e-01, 1.150329e-01, 1.069321e-01, 9.989310e-02, 9.372070e-02, & ! - 8.826450e-02, 8.340622e-02, 7.905378e-02, 7.513109e-02, 7.157859e-02, & ! - 6.834588e-02, 6.539114e-02, 6.268150e-02, 6.018621e-02, 5.788098e-02, & ! - 5.574351e-02, 5.375699e-02, 5.190412e-02, 5.017099e-02, 4.854497e-02, & ! - 4.701490e-02, 4.557030e-02, 4.420249e-02, 4.290304e-02, 4.166427e-02, & ! - 4.047820e-02, 3.934232e-02, 3.824778e-02, 3.719236e-02, 3.616931e-02, & ! - 3.517597e-02, 3.420856e-02, 3.326566e-02, 3.234346e-02, 3.144122e-02, & ! - 3.055684e-02, 2.968798e-02, 2.883519e-02, 2.799635e-02, 2.717228e-02, & ! - 2.636182e-02, 2.556424e-02, 2.478114e-02, 2.401086e-02, 2.325657e-02, & ! - 2.251506e-02, 2.178594e-02, 2.107301e-02, & ! - 6.552414e-01, 4.599454e-01, 3.538626e-01, 2.873547e-01, 2.418033e-01, & ! 11 - 2.086660e-01, 1.834885e-01, 1.637142e-01, 1.477767e-01, 1.346583e-01, & ! - 1.236734e-01, 1.143412e-01, 1.063148e-01, 9.933905e-02, 9.322026e-02, & ! - 8.780979e-02, 8.299230e-02, 7.867554e-02, 7.478450e-02, 7.126053e-02, & ! - 6.805276e-02, 6.512143e-02, 6.243211e-02, 5.995541e-02, 5.766712e-02, & ! - 5.554484e-02, 5.357246e-02, 5.173222e-02, 5.001069e-02, 4.839505e-02, & ! - 4.687471e-02, 4.543861e-02, 4.407857e-02, 4.278577e-02, 4.155331e-02, & ! - 4.037322e-02, 3.924302e-02, 3.815376e-02, 3.710172e-02, 3.608296e-02, & ! - 3.509330e-02, 3.412980e-02, 3.319009e-02, 3.227106e-02, 3.137157e-02, & ! - 3.048950e-02, 2.962365e-02, 2.877297e-02, 2.793726e-02, 2.711500e-02, & ! - 2.630666e-02, 2.551206e-02, 2.473052e-02, 2.396287e-02, 2.320861e-02, & ! - 2.246810e-02, 2.174162e-02, 2.102927e-02, & ! - 6.430901e-01, 4.532134e-01, 3.496132e-01, 2.844655e-01, 2.397347e-01, & ! 12 - 2.071236e-01, 1.822976e-01, 1.627640e-01, 1.469961e-01, 1.340006e-01, & ! - 1.231069e-01, 1.138441e-01, 1.058706e-01, 9.893678e-02, 9.285166e-02, & ! - 8.746871e-02, 8.267411e-02, 7.837656e-02, 7.450257e-02, 7.099318e-02, & ! - 6.779929e-02, 6.487987e-02, 6.220168e-02, 5.973530e-02, 5.745636e-02, & ! - 5.534344e-02, 5.337986e-02, 5.154797e-02, 4.983404e-02, 4.822582e-02, & ! - 4.671228e-02, 4.528321e-02, 4.392997e-02, 4.264325e-02, 4.141647e-02, & ! - 4.024259e-02, 3.911767e-02, 3.803309e-02, 3.698782e-02, 3.597140e-02, & ! - 3.498774e-02, 3.402852e-02, 3.309340e-02, 3.217818e-02, 3.128292e-02, & ! - 3.040486e-02, 2.954230e-02, 2.869545e-02, 2.786261e-02, 2.704372e-02, & ! - 2.623813e-02, 2.544668e-02, 2.466788e-02, 2.390313e-02, 2.315136e-02, & ! - 2.241391e-02, 2.168921e-02, 2.097903e-02, & ! - 6.367074e-01, 4.495768e-01, 3.471263e-01, 2.826149e-01, 2.382868e-01, & ! 13 - 2.059640e-01, 1.813562e-01, 1.619881e-01, 1.463436e-01, 1.334402e-01, & ! - 1.226166e-01, 1.134096e-01, 1.054829e-01, 9.858838e-02, 9.253790e-02, & ! - 8.718582e-02, 8.241830e-02, 7.814482e-02, 7.429212e-02, 7.080165e-02, & ! - 6.762385e-02, 6.471838e-02, 6.205388e-02, 5.959726e-02, 5.732871e-02, & ! - 5.522402e-02, 5.326793e-02, 5.144230e-02, 4.973440e-02, 4.813188e-02, & ! - 4.662283e-02, 4.519798e-02, 4.384833e-02, 4.256541e-02, 4.134253e-02, & ! - 4.017136e-02, 3.904911e-02, 3.796779e-02, 3.692364e-02, 3.591182e-02, & ! - 3.492930e-02, 3.397230e-02, 3.303920e-02, 3.212572e-02, 3.123278e-02, & ! - 3.035519e-02, 2.949493e-02, 2.864985e-02, 2.781840e-02, 2.700197e-02, & ! - 2.619682e-02, 2.540674e-02, 2.462966e-02, 2.386613e-02, 2.311602e-02, & ! - 2.237846e-02, 2.165660e-02, 2.094756e-02, & ! - 4.298416e-01, 4.391639e-01, 3.975030e-01, 3.443028e-01, 2.957345e-01, & ! 14 - 2.556461e-01, 2.234755e-01, 1.976636e-01, 1.767428e-01, 1.595611e-01, & ! - 1.452636e-01, 1.332156e-01, 1.229481e-01, 1.141059e-01, 1.064208e-01, & ! - 9.968527e-02, 9.373833e-02, 8.845221e-02, 8.372112e-02, 7.946667e-02, & ! - 7.561807e-02, 7.212029e-02, 6.893166e-02, 6.600944e-02, 6.332277e-02, & ! - 6.084277e-02, 5.854721e-02, 5.641361e-02, 5.442639e-02, 5.256750e-02, & ! - 5.082499e-02, 4.918556e-02, 4.763694e-02, 4.617222e-02, 4.477861e-02, & ! - 4.344861e-02, 4.217999e-02, 4.096111e-02, 3.978638e-02, 3.865361e-02, & ! - 3.755473e-02, 3.649028e-02, 3.545361e-02, 3.444361e-02, 3.345666e-02, & ! - 3.249167e-02, 3.154722e-02, 3.062083e-02, 2.971250e-02, 2.882083e-02, & ! - 2.794611e-02, 2.708778e-02, 2.624500e-02, 2.541750e-02, 2.460528e-02, & ! - 2.381194e-02, 2.303250e-02, 2.226833e-02/), & ! - shape = (/58,nBandsSW_RRTMG/)) - - real(kind_phys),dimension(58,nBandsSW_RRTMG),parameter :: & ! - ssaliq1 = reshape(source= (/ & ! - 8.143821e-01, 7.836739e-01, 7.550722e-01, 7.306269e-01, 7.105612e-01, & ! 1 - 6.946649e-01, 6.825556e-01, 6.737762e-01, 6.678448e-01, 6.642830e-01, & ! - 6.679741e-01, 6.584607e-01, 6.505598e-01, 6.440951e-01, 6.388901e-01, & ! - 6.347689e-01, 6.315549e-01, 6.290718e-01, 6.271432e-01, 6.255928e-01, & ! - 6.242441e-01, 6.229207e-01, 6.214464e-01, 6.196445e-01, 6.173388e-01, & ! - 6.143527e-01, 6.105099e-01, 6.056339e-01, 6.108290e-01, 6.073939e-01, & ! - 6.043073e-01, 6.015473e-01, 5.990913e-01, 5.969173e-01, 5.950028e-01, & ! - 5.933257e-01, 5.918636e-01, 5.905944e-01, 5.894957e-01, 5.885453e-01, & ! - 5.877209e-01, 5.870003e-01, 5.863611e-01, 5.857811e-01, 5.852381e-01, & ! - 5.847098e-01, 5.841738e-01, 5.836081e-01, 5.829901e-01, 5.822979e-01, & ! - 5.815089e-01, 5.806011e-01, 5.795521e-01, 5.783396e-01, 5.769413e-01, & ! - 5.753351e-01, 5.734986e-01, 5.7141e-01, & ! - 8.165821e-01, 8.002015e-01, 7.816921e-01, 7.634131e-01, 7.463721e-01, & ! 2 - 7.312469e-01, 7.185883e-01, 7.088975e-01, 7.026671e-01, 7.004020e-01, & ! - 7.042138e-01, 6.960930e-01, 6.894243e-01, 6.840459e-01, 6.797957e-01, & ! - 6.765119e-01, 6.740325e-01, 6.721955e-01, 6.708391e-01, 6.698013e-01, & ! - 6.689201e-01, 6.680339e-01, 6.669805e-01, 6.655982e-01, 6.637250e-01, & ! - 6.611992e-01, 6.578588e-01, 6.535420e-01, 6.584449e-01, 6.553992e-01, & ! - 6.526547e-01, 6.501917e-01, 6.479905e-01, 6.460313e-01, 6.442945e-01, & ! - 6.427605e-01, 6.414094e-01, 6.402217e-01, 6.391775e-01, 6.382573e-01, & ! - 6.374413e-01, 6.367099e-01, 6.360433e-01, 6.354218e-01, 6.348257e-01, & ! - 6.342355e-01, 6.336313e-01, 6.329935e-01, 6.323023e-01, 6.315383e-01, & ! - 6.306814e-01, 6.297122e-01, 6.286110e-01, 6.273579e-01, 6.259333e-01, & ! - 6.243176e-01, 6.224910e-01, 6.2043e-01, & ! - 9.900163e-01, 9.854307e-01, 9.797730e-01, 9.733113e-01, 9.664245e-01, & ! 3 - 9.594976e-01, 9.529055e-01, 9.470112e-01, 9.421695e-01, 9.387304e-01, & ! - 9.344918e-01, 9.305302e-01, 9.267048e-01, 9.230072e-01, 9.194289e-01, & ! - 9.159616e-01, 9.125968e-01, 9.093260e-01, 9.061409e-01, 9.030330e-01, & ! - 8.999940e-01, 8.970154e-01, 8.940888e-01, 8.912058e-01, 8.883579e-01, & ! - 8.855368e-01, 8.827341e-01, 8.799413e-01, 8.777423e-01, 8.749566e-01, & ! - 8.722298e-01, 8.695605e-01, 8.669469e-01, 8.643875e-01, 8.618806e-01, & ! - 8.594246e-01, 8.570179e-01, 8.546589e-01, 8.523459e-01, 8.500773e-01, & ! - 8.478516e-01, 8.456670e-01, 8.435219e-01, 8.414148e-01, 8.393439e-01, & ! - 8.373078e-01, 8.353047e-01, 8.333330e-01, 8.313911e-01, 8.294774e-01, & ! - 8.275904e-01, 8.257282e-01, 8.238893e-01, 8.220721e-01, 8.202751e-01, & ! - 8.184965e-01, 8.167346e-01, 8.1499e-01, & ! - 9.999916e-01, 9.987396e-01, 9.966900e-01, 9.950738e-01, 9.937531e-01, & ! 4 - 9.925912e-01, 9.914525e-01, 9.902018e-01, 9.887046e-01, 9.868263e-01, & ! - 9.849039e-01, 9.832372e-01, 9.815265e-01, 9.797770e-01, 9.779940e-01, & ! - 9.761827e-01, 9.743481e-01, 9.724955e-01, 9.706303e-01, 9.687575e-01, & ! - 9.668823e-01, 9.650100e-01, 9.631457e-01, 9.612947e-01, 9.594622e-01, & ! - 9.576534e-01, 9.558734e-01, 9.541275e-01, 9.522059e-01, 9.504258e-01, & ! - 9.486459e-01, 9.468676e-01, 9.450921e-01, 9.433208e-01, 9.415548e-01, & ! - 9.397955e-01, 9.380441e-01, 9.363022e-01, 9.345706e-01, 9.328510e-01, & ! - 9.311445e-01, 9.294524e-01, 9.277761e-01, 9.261167e-01, 9.244755e-01, & ! - 9.228540e-01, 9.212534e-01, 9.196748e-01, 9.181197e-01, 9.165894e-01, & ! - 9.150851e-01, 9.136080e-01, 9.121596e-01, 9.107410e-01, 9.093536e-01, & ! - 9.079987e-01, 9.066775e-01, 9.0539e-01, & ! - 9.979493e-01, 9.964113e-01, 9.950014e-01, 9.937045e-01, 9.924964e-01, & ! 5 - 9.913546e-01, 9.902575e-01, 9.891843e-01, 9.881136e-01, 9.870238e-01, & ! - 9.859934e-01, 9.849372e-01, 9.838873e-01, 9.828434e-01, 9.818052e-01, & ! - 9.807725e-01, 9.797450e-01, 9.787225e-01, 9.777047e-01, 9.766914e-01, & ! - 9.756823e-01, 9.746771e-01, 9.736756e-01, 9.726775e-01, 9.716827e-01, & ! - 9.706907e-01, 9.697014e-01, 9.687145e-01, 9.678060e-01, 9.668108e-01, & ! - 9.658218e-01, 9.648391e-01, 9.638629e-01, 9.628936e-01, 9.619313e-01, & ! - 9.609763e-01, 9.600287e-01, 9.590888e-01, 9.581569e-01, 9.572330e-01, & ! - 9.563176e-01, 9.554108e-01, 9.545128e-01, 9.536239e-01, 9.527443e-01, & ! - 9.518741e-01, 9.510137e-01, 9.501633e-01, 9.493230e-01, 9.484931e-01, & ! - 9.476740e-01, 9.468656e-01, 9.460683e-01, 9.452824e-01, 9.445080e-01, & ! - 9.437454e-01, 9.429948e-01, 9.4226e-01, & ! - 9.988742e-01, 9.982668e-01, 9.976935e-01, 9.971497e-01, 9.966314e-01, & ! 6 - 9.961344e-01, 9.956545e-01, 9.951873e-01, 9.947286e-01, 9.942741e-01, & ! - 9.938457e-01, 9.933947e-01, 9.929473e-01, 9.925032e-01, 9.920621e-01, & ! - 9.916237e-01, 9.911875e-01, 9.907534e-01, 9.903209e-01, 9.898898e-01, & ! - 9.894597e-01, 9.890304e-01, 9.886015e-01, 9.881726e-01, 9.877435e-01, & ! - 9.873138e-01, 9.868833e-01, 9.864516e-01, 9.860698e-01, 9.856317e-01, & ! - 9.851957e-01, 9.847618e-01, 9.843302e-01, 9.839008e-01, 9.834739e-01, & ! - 9.830494e-01, 9.826275e-01, 9.822083e-01, 9.817918e-01, 9.813782e-01, & ! - 9.809675e-01, 9.805598e-01, 9.801552e-01, 9.797538e-01, 9.793556e-01, & ! - 9.789608e-01, 9.785695e-01, 9.781817e-01, 9.777975e-01, 9.774171e-01, & ! - 9.770404e-01, 9.766676e-01, 9.762988e-01, 9.759340e-01, 9.755733e-01, & ! - 9.752169e-01, 9.748649e-01, 9.7452e-01, & ! - 9.994441e-01, 9.991608e-01, 9.988949e-01, 9.986439e-01, 9.984054e-01, & ! 7 - 9.981768e-01, 9.979557e-01, 9.977396e-01, 9.975258e-01, 9.973120e-01, & ! - 9.971011e-01, 9.968852e-01, 9.966708e-01, 9.964578e-01, 9.962462e-01, & ! - 9.960357e-01, 9.958264e-01, 9.956181e-01, 9.954108e-01, 9.952043e-01, & ! - 9.949987e-01, 9.947937e-01, 9.945892e-01, 9.943853e-01, 9.941818e-01, & ! - 9.939786e-01, 9.937757e-01, 9.935728e-01, 9.933922e-01, 9.931825e-01, & ! - 9.929739e-01, 9.927661e-01, 9.925592e-01, 9.923534e-01, 9.921485e-01, & ! - 9.919447e-01, 9.917421e-01, 9.915406e-01, 9.913403e-01, 9.911412e-01, & ! - 9.909435e-01, 9.907470e-01, 9.905519e-01, 9.903581e-01, 9.901659e-01, & ! - 9.899751e-01, 9.897858e-01, 9.895981e-01, 9.894120e-01, 9.892276e-01, & ! - 9.890447e-01, 9.888637e-01, 9.886845e-01, 9.885070e-01, 9.883314e-01, & ! - 9.881576e-01, 9.879859e-01, 9.8782e-01, & ! - 9.999138e-01, 9.998730e-01, 9.998338e-01, 9.997965e-01, 9.997609e-01, & ! 8 - 9.997270e-01, 9.996944e-01, 9.996629e-01, 9.996321e-01, 9.996016e-01, & ! - 9.995690e-01, 9.995372e-01, 9.995057e-01, 9.994744e-01, 9.994433e-01, & ! - 9.994124e-01, 9.993817e-01, 9.993510e-01, 9.993206e-01, 9.992903e-01, & ! - 9.992600e-01, 9.992299e-01, 9.991998e-01, 9.991698e-01, 9.991398e-01, & ! - 9.991098e-01, 9.990799e-01, 9.990499e-01, 9.990231e-01, 9.989920e-01, & ! - 9.989611e-01, 9.989302e-01, 9.988996e-01, 9.988690e-01, 9.988386e-01, & ! - 9.988084e-01, 9.987783e-01, 9.987485e-01, 9.987187e-01, 9.986891e-01, & ! - 9.986598e-01, 9.986306e-01, 9.986017e-01, 9.985729e-01, 9.985443e-01, & ! - 9.985160e-01, 9.984879e-01, 9.984600e-01, 9.984324e-01, 9.984050e-01, & ! - 9.983778e-01, 9.983509e-01, 9.983243e-01, 9.982980e-01, 9.982719e-01, & ! - 9.982461e-01, 9.982206e-01, 9.9820e-01, & ! - 9.999985e-01, 9.999979e-01, 9.999972e-01, 9.999966e-01, 9.999961e-01, & ! 9 - 9.999955e-01, 9.999950e-01, 9.999944e-01, 9.999938e-01, 9.999933e-01, & ! - 9.999927e-01, 9.999921e-01, 9.999915e-01, 9.999910e-01, 9.999904e-01, & ! - 9.999899e-01, 9.999893e-01, 9.999888e-01, 9.999882e-01, 9.999877e-01, & ! - 9.999871e-01, 9.999866e-01, 9.999861e-01, 9.999855e-01, 9.999850e-01, & ! - 9.999844e-01, 9.999839e-01, 9.999833e-01, 9.999828e-01, 9.999823e-01, & ! - 9.999817e-01, 9.999812e-01, 9.999807e-01, 9.999801e-01, 9.999796e-01, & ! - 9.999791e-01, 9.999786e-01, 9.999781e-01, 9.999776e-01, 9.999770e-01, & ! - 9.999765e-01, 9.999761e-01, 9.999756e-01, 9.999751e-01, 9.999746e-01, & ! - 9.999741e-01, 9.999736e-01, 9.999732e-01, 9.999727e-01, 9.999722e-01, & ! - 9.999718e-01, 9.999713e-01, 9.999709e-01, 9.999705e-01, 9.999701e-01, & ! - 9.999697e-01, 9.999692e-01, 9.9997e-01, & ! - 9.999999e-01, 9.999998e-01, 9.999997e-01, 9.999997e-01, 9.999997e-01, & ! 10 - 9.999996e-01, 9.999996e-01, 9.999995e-01, 9.999995e-01, 9.999994e-01, & ! - 9.999994e-01, 9.999993e-01, 9.999993e-01, 9.999992e-01, 9.999992e-01, & ! - 9.999991e-01, 9.999991e-01, 9.999991e-01, 9.999990e-01, 9.999989e-01, & ! - 9.999989e-01, 9.999989e-01, 9.999988e-01, 9.999988e-01, 9.999987e-01, & ! - 9.999987e-01, 9.999986e-01, 9.999986e-01, 9.999985e-01, 9.999985e-01, & ! - 9.999984e-01, 9.999984e-01, 9.999984e-01, 9.999983e-01, 9.999983e-01, & ! - 9.999982e-01, 9.999982e-01, 9.999982e-01, 9.999981e-01, 9.999980e-01, & ! - 9.999980e-01, 9.999980e-01, 9.999979e-01, 9.999979e-01, 9.999978e-01, & ! - 9.999978e-01, 9.999977e-01, 9.999977e-01, 9.999977e-01, 9.999976e-01, & ! - 9.999976e-01, 9.999975e-01, 9.999975e-01, 9.999974e-01, 9.999974e-01, & ! - 9.999974e-01, 9.999973e-01, 1.0000e+00, & ! - 9.999997e-01, 9.999995e-01, 9.999993e-01, 9.999992e-01, 9.999990e-01, & ! 11 - 9.999989e-01, 9.999988e-01, 9.999987e-01, 9.999986e-01, 9.999985e-01, & ! - 9.999984e-01, 9.999983e-01, 9.999982e-01, 9.999981e-01, 9.999980e-01, & ! - 9.999978e-01, 9.999977e-01, 9.999976e-01, 9.999975e-01, 9.999974e-01, & ! - 9.999973e-01, 9.999972e-01, 9.999970e-01, 9.999969e-01, 9.999968e-01, & ! - 9.999967e-01, 9.999966e-01, 9.999965e-01, 9.999964e-01, 9.999963e-01, & ! - 9.999962e-01, 9.999961e-01, 9.999959e-01, 9.999958e-01, 9.999957e-01, & ! - 9.999956e-01, 9.999955e-01, 9.999954e-01, 9.999953e-01, 9.999952e-01, & ! - 9.999951e-01, 9.999949e-01, 9.999949e-01, 9.999947e-01, 9.999946e-01, & ! - 9.999945e-01, 9.999944e-01, 9.999943e-01, 9.999942e-01, 9.999941e-01, & ! - 9.999940e-01, 9.999939e-01, 9.999938e-01, 9.999937e-01, 9.999936e-01, & ! - 9.999935e-01, 9.999934e-01, 9.9999e-01, & ! - 9.999984e-01, 9.999976e-01, 9.999969e-01, 9.999962e-01, 9.999956e-01, & ! 12 - 9.999950e-01, 9.999945e-01, 9.999940e-01, 9.999935e-01, 9.999931e-01, & ! - 9.999926e-01, 9.999920e-01, 9.999914e-01, 9.999908e-01, 9.999903e-01, & ! - 9.999897e-01, 9.999891e-01, 9.999886e-01, 9.999880e-01, 9.999874e-01, & ! - 9.999868e-01, 9.999863e-01, 9.999857e-01, 9.999851e-01, 9.999846e-01, & ! - 9.999840e-01, 9.999835e-01, 9.999829e-01, 9.999824e-01, 9.999818e-01, & ! - 9.999812e-01, 9.999806e-01, 9.999800e-01, 9.999795e-01, 9.999789e-01, & ! - 9.999783e-01, 9.999778e-01, 9.999773e-01, 9.999767e-01, 9.999761e-01, & ! - 9.999756e-01, 9.999750e-01, 9.999745e-01, 9.999739e-01, 9.999734e-01, & ! - 9.999729e-01, 9.999723e-01, 9.999718e-01, 9.999713e-01, 9.999708e-01, & ! - 9.999703e-01, 9.999697e-01, 9.999692e-01, 9.999687e-01, 9.999683e-01, & ! - 9.999678e-01, 9.999673e-01, 9.9997e-01, & ! - 9.999981e-01, 9.999973e-01, 9.999965e-01, 9.999958e-01, 9.999951e-01, & ! 13 - 9.999943e-01, 9.999937e-01, 9.999930e-01, 9.999924e-01, 9.999918e-01, & ! - 9.999912e-01, 9.999905e-01, 9.999897e-01, 9.999890e-01, 9.999883e-01, & ! - 9.999876e-01, 9.999869e-01, 9.999862e-01, 9.999855e-01, 9.999847e-01, & ! - 9.999840e-01, 9.999834e-01, 9.999827e-01, 9.999819e-01, 9.999812e-01, & ! - 9.999805e-01, 9.999799e-01, 9.999791e-01, 9.999785e-01, 9.999778e-01, & ! - 9.999771e-01, 9.999764e-01, 9.999757e-01, 9.999750e-01, 9.999743e-01, & ! - 9.999736e-01, 9.999729e-01, 9.999722e-01, 9.999715e-01, 9.999709e-01, & ! - 9.999701e-01, 9.999695e-01, 9.999688e-01, 9.999682e-01, 9.999675e-01, & ! - 9.999669e-01, 9.999662e-01, 9.999655e-01, 9.999649e-01, 9.999642e-01, & ! - 9.999636e-01, 9.999630e-01, 9.999624e-01, 9.999618e-01, 9.999612e-01, & ! - 9.999606e-01, 9.999600e-01, 9.9996e-01, & ! - 8.505737e-01, 8.465102e-01, 8.394829e-01, 8.279508e-01, 8.110806e-01, & ! 14 - 7.900397e-01, 7.669615e-01, 7.444422e-01, 7.253055e-01, 7.124831e-01, & ! - 7.016434e-01, 6.885485e-01, 6.767340e-01, 6.661029e-01, 6.565577e-01, & ! - 6.480013e-01, 6.403373e-01, 6.334697e-01, 6.273034e-01, 6.217440e-01, & ! - 6.166983e-01, 6.120740e-01, 6.077796e-01, 6.037249e-01, 5.998207e-01, & ! - 5.959788e-01, 5.921123e-01, 5.881354e-01, 5.891285e-01, 5.851143e-01, & ! - 5.814653e-01, 5.781606e-01, 5.751792e-01, 5.724998e-01, 5.701016e-01, & ! - 5.679634e-01, 5.660642e-01, 5.643829e-01, 5.628984e-01, 5.615898e-01, & ! - 5.604359e-01, 5.594158e-01, 5.585083e-01, 5.576924e-01, 5.569470e-01, & ! - 5.562512e-01, 5.555838e-01, 5.549239e-01, 5.542503e-01, 5.535420e-01, & ! - 5.527781e-01, 5.519374e-01, 5.509989e-01, 5.499417e-01, 5.487445e-01, & ! - 5.473865e-01, 5.458466e-01, 5.4410e-01 /), & ! - shape = (/58,nBandsSW_RRTMG/)) - - real(kind_phys),dimension(58,nBandsSW_RRTMG),parameter :: & ! - ssaliq2 = reshape(source= (/ & ! - 8.362119e-01, 8.098460e-01, 7.762291e-01, 7.486042e-01, 7.294172e-01, & ! 1 - 7.161000e-01, 7.060656e-01, 6.978387e-01, 6.907193e-01, 6.843551e-01, & ! - 6.785668e-01, 6.732450e-01, 6.683191e-01, 6.637264e-01, 6.594307e-01, & ! - 6.554033e-01, 6.516115e-01, 6.480295e-01, 6.446429e-01, 6.414306e-01, & ! - 6.383783e-01, 6.354750e-01, 6.327068e-01, 6.300665e-01, 6.275376e-01, & ! - 6.251245e-01, 6.228136e-01, 6.205944e-01, 6.184720e-01, 6.164330e-01, & ! - 6.144742e-01, 6.125962e-01, 6.108004e-01, 6.090740e-01, 6.074200e-01, & ! - 6.058381e-01, 6.043209e-01, 6.028681e-01, 6.014836e-01, 6.001626e-01, & ! - 5.988957e-01, 5.976864e-01, 5.965390e-01, 5.954379e-01, 5.943972e-01, & ! - 5.934019e-01, 5.924624e-01, 5.915579e-01, 5.907025e-01, 5.898913e-01, & ! - 5.891213e-01, 5.883815e-01, 5.876851e-01, 5.870158e-01, 5.863868e-01, & ! - 5.857821e-01, 5.852111e-01, 5.846579e-01, & ! - 6.995459e-01, 7.158012e-01, 7.076001e-01, 6.927244e-01, 6.786434e-01, & ! 2 - 6.673545e-01, 6.585859e-01, 6.516314e-01, 6.459010e-01, 6.410225e-01, & ! - 6.367574e-01, 6.329554e-01, 6.295119e-01, 6.263595e-01, 6.234462e-01, & ! - 6.207274e-01, 6.181755e-01, 6.157678e-01, 6.134880e-01, 6.113173e-01, & ! - 6.092495e-01, 6.072689e-01, 6.053717e-01, 6.035507e-01, 6.018001e-01, & ! - 6.001134e-01, 5.984951e-01, 5.969294e-01, 5.954256e-01, 5.939698e-01, & ! - 5.925716e-01, 5.912265e-01, 5.899270e-01, 5.886771e-01, 5.874746e-01, & ! - 5.863185e-01, 5.852077e-01, 5.841460e-01, 5.831249e-01, 5.821474e-01, & ! - 5.812078e-01, 5.803173e-01, 5.794616e-01, 5.786443e-01, 5.778617e-01, & ! - 5.771236e-01, 5.764191e-01, 5.757400e-01, 5.750971e-01, 5.744842e-01, & ! - 5.739012e-01, 5.733482e-01, 5.728175e-01, 5.723214e-01, 5.718383e-01, & ! - 5.713827e-01, 5.709471e-01, 5.705330e-01, & ! - 9.929711e-01, 9.896942e-01, 9.852408e-01, 9.806820e-01, 9.764512e-01, & ! 3 - 9.725375e-01, 9.688677e-01, 9.653832e-01, 9.620552e-01, 9.588522e-01, & ! - 9.557475e-01, 9.527265e-01, 9.497731e-01, 9.468756e-01, 9.440270e-01, & ! - 9.412230e-01, 9.384592e-01, 9.357287e-01, 9.330369e-01, 9.303778e-01, & ! - 9.277502e-01, 9.251546e-01, 9.225907e-01, 9.200553e-01, 9.175521e-01, & ! - 9.150773e-01, 9.126352e-01, 9.102260e-01, 9.078485e-01, 9.055057e-01, & ! - 9.031978e-01, 9.009306e-01, 8.987010e-01, 8.965177e-01, 8.943774e-01, & ! - 8.922869e-01, 8.902430e-01, 8.882551e-01, 8.863182e-01, 8.844373e-01, & ! - 8.826143e-01, 8.808499e-01, 8.791413e-01, 8.774940e-01, 8.759019e-01, & ! - 8.743650e-01, 8.728941e-01, 8.714712e-01, 8.701065e-01, 8.688008e-01, & ! - 8.675409e-01, 8.663295e-01, 8.651714e-01, 8.640637e-01, 8.629943e-01, & ! - 8.619762e-01, 8.609995e-01, 8.600581e-01, & ! - 9.910612e-01, 9.854226e-01, 9.795008e-01, 9.742920e-01, 9.695996e-01, & ! 4 - 9.652274e-01, 9.610648e-01, 9.570521e-01, 9.531397e-01, 9.493086e-01, & ! - 9.455413e-01, 9.418362e-01, 9.381902e-01, 9.346016e-01, 9.310718e-01, & ! - 9.275957e-01, 9.241757e-01, 9.208038e-01, 9.174802e-01, 9.142058e-01, & ! - 9.109753e-01, 9.077895e-01, 9.046433e-01, 9.015409e-01, 8.984784e-01, & ! - 8.954572e-01, 8.924748e-01, 8.895367e-01, 8.866395e-01, 8.837864e-01, & ! - 8.809819e-01, 8.782267e-01, 8.755231e-01, 8.728712e-01, 8.702802e-01, & ! - 8.677443e-01, 8.652733e-01, 8.628678e-01, 8.605300e-01, 8.582593e-01, & ! - 8.560596e-01, 8.539352e-01, 8.518782e-01, 8.498915e-01, 8.479790e-01, & ! - 8.461384e-01, 8.443645e-01, 8.426613e-01, 8.410229e-01, 8.394495e-01, & ! - 8.379428e-01, 8.364967e-01, 8.351117e-01, 8.337820e-01, 8.325091e-01, & ! - 8.312874e-01, 8.301169e-01, 8.289985e-01, & ! - 9.969802e-01, 9.950445e-01, 9.931448e-01, 9.914272e-01, 9.898652e-01, & ! 5 - 9.884250e-01, 9.870637e-01, 9.857482e-01, 9.844558e-01, 9.831755e-01, & ! - 9.819068e-01, 9.806477e-01, 9.794000e-01, 9.781666e-01, 9.769461e-01, & ! - 9.757386e-01, 9.745459e-01, 9.733650e-01, 9.721953e-01, 9.710398e-01, & ! - 9.698936e-01, 9.687583e-01, 9.676334e-01, 9.665192e-01, 9.654132e-01, & ! - 9.643208e-01, 9.632374e-01, 9.621625e-01, 9.611003e-01, 9.600518e-01, & ! - 9.590144e-01, 9.579922e-01, 9.569864e-01, 9.559948e-01, 9.550239e-01, & ! - 9.540698e-01, 9.531382e-01, 9.522280e-01, 9.513409e-01, 9.504772e-01, & ! - 9.496360e-01, 9.488220e-01, 9.480327e-01, 9.472693e-01, 9.465333e-01, & ! - 9.458211e-01, 9.451344e-01, 9.444732e-01, 9.438372e-01, 9.432268e-01, & ! - 9.426391e-01, 9.420757e-01, 9.415308e-01, 9.410102e-01, 9.405115e-01, & ! - 9.400326e-01, 9.395716e-01, 9.391313e-01, & ! - 9.980034e-01, 9.968572e-01, 9.958696e-01, 9.949747e-01, 9.941241e-01, & ! 6 - 9.933043e-01, 9.924971e-01, 9.916978e-01, 9.909023e-01, 9.901046e-01, & ! - 9.893087e-01, 9.885146e-01, 9.877195e-01, 9.869283e-01, 9.861379e-01, & ! - 9.853523e-01, 9.845715e-01, 9.837945e-01, 9.830217e-01, 9.822567e-01, & ! - 9.814935e-01, 9.807356e-01, 9.799815e-01, 9.792332e-01, 9.784845e-01, & ! - 9.777424e-01, 9.770042e-01, 9.762695e-01, 9.755416e-01, 9.748152e-01, & ! - 9.740974e-01, 9.733873e-01, 9.726813e-01, 9.719861e-01, 9.713010e-01, & ! - 9.706262e-01, 9.699647e-01, 9.693144e-01, 9.686794e-01, 9.680596e-01, & ! - 9.674540e-01, 9.668657e-01, 9.662926e-01, 9.657390e-01, 9.652019e-01, & ! - 9.646820e-01, 9.641784e-01, 9.636945e-01, 9.632260e-01, 9.627743e-01, & ! - 9.623418e-01, 9.619227e-01, 9.615194e-01, 9.611341e-01, 9.607629e-01, & ! - 9.604057e-01, 9.600622e-01, 9.597322e-01, & ! - 9.988219e-01, 9.981767e-01, 9.976168e-01, 9.971066e-01, 9.966195e-01, & ! 7 - 9.961566e-01, 9.956995e-01, 9.952481e-01, 9.947982e-01, 9.943495e-01, & ! - 9.938955e-01, 9.934368e-01, 9.929825e-01, 9.925239e-01, 9.920653e-01, & ! - 9.916096e-01, 9.911552e-01, 9.907067e-01, 9.902594e-01, 9.898178e-01, & ! - 9.893791e-01, 9.889453e-01, 9.885122e-01, 9.880837e-01, 9.876567e-01, & ! - 9.872331e-01, 9.868121e-01, 9.863938e-01, 9.859790e-01, 9.855650e-01, & ! - 9.851548e-01, 9.847491e-01, 9.843496e-01, 9.839521e-01, 9.835606e-01, & ! - 9.831771e-01, 9.827975e-01, 9.824292e-01, 9.820653e-01, 9.817124e-01, & ! - 9.813644e-01, 9.810291e-01, 9.807020e-01, 9.803864e-01, 9.800782e-01, & ! - 9.797821e-01, 9.794958e-01, 9.792179e-01, 9.789509e-01, 9.786940e-01, & ! - 9.784460e-01, 9.782090e-01, 9.779789e-01, 9.777553e-01, 9.775425e-01, & ! - 9.773387e-01, 9.771420e-01, 9.769529e-01, & ! - 9.998902e-01, 9.998395e-01, 9.997915e-01, 9.997442e-01, 9.997016e-01, & ! 8 - 9.996600e-01, 9.996200e-01, 9.995806e-01, 9.995411e-01, 9.995005e-01, & ! - 9.994589e-01, 9.994178e-01, 9.993766e-01, 9.993359e-01, 9.992948e-01, & ! - 9.992533e-01, 9.992120e-01, 9.991723e-01, 9.991313e-01, 9.990906e-01, & ! - 9.990510e-01, 9.990113e-01, 9.989716e-01, 9.989323e-01, 9.988923e-01, & ! - 9.988532e-01, 9.988140e-01, 9.987761e-01, 9.987373e-01, 9.986989e-01, & ! - 9.986597e-01, 9.986239e-01, 9.985861e-01, 9.985485e-01, 9.985123e-01, & ! - 9.984762e-01, 9.984415e-01, 9.984065e-01, 9.983722e-01, 9.983398e-01, & ! - 9.983078e-01, 9.982758e-01, 9.982461e-01, 9.982157e-01, 9.981872e-01, & ! - 9.981595e-01, 9.981324e-01, 9.981068e-01, 9.980811e-01, 9.980580e-01, & ! - 9.980344e-01, 9.980111e-01, 9.979908e-01, 9.979690e-01, 9.979492e-01, & ! - 9.979316e-01, 9.979116e-01, 9.978948e-01, & ! - 9.999978e-01, 9.999948e-01, 9.999915e-01, 9.999905e-01, 9.999896e-01, & ! 9 - 9.999887e-01, 9.999888e-01, 9.999888e-01, 9.999870e-01, 9.999854e-01, & ! - 9.999855e-01, 9.999856e-01, 9.999839e-01, 9.999834e-01, 9.999829e-01, & ! - 9.999809e-01, 9.999816e-01, 9.999793e-01, 9.999782e-01, 9.999779e-01, & ! - 9.999772e-01, 9.999764e-01, 9.999756e-01, 9.999744e-01, 9.999744e-01, & ! - 9.999736e-01, 9.999729e-01, 9.999716e-01, 9.999706e-01, 9.999692e-01, & ! - 9.999690e-01, 9.999675e-01, 9.999673e-01, 9.999660e-01, 9.999654e-01, & ! - 9.999647e-01, 9.999647e-01, 9.999625e-01, 9.999620e-01, 9.999614e-01, & ! - 9.999613e-01, 9.999607e-01, 9.999604e-01, 9.999594e-01, 9.999589e-01, & ! - 9.999586e-01, 9.999567e-01, 9.999550e-01, 9.999557e-01, 9.999542e-01, & ! - 9.999546e-01, 9.999539e-01, 9.999536e-01, 9.999526e-01, 9.999523e-01, & ! - 9.999508e-01, 9.999534e-01, 9.999507e-01, & ! - 1.000000e+00, 1.000000e+00, 1.000000e+00, 1.000000e+00, 1.000000e+00, & ! 10 - 1.000000e+00, 1.000000e+00, 1.000000e+00, 1.000000e+00, 1.000000e+00, & ! - 1.000000e+00, 1.000000e+00, 1.000000e+00, 1.000000e+00, 1.000000e+00, & ! - 1.000000e+00, 1.000000e+00, 1.000000e+00, 1.000000e+00, 9.999995e-01, & ! - 9.999995e-01, 9.999990e-01, 9.999991e-01, 9.999991e-01, 9.999990e-01, & ! - 9.999989e-01, 9.999988e-01, 9.999988e-01, 9.999986e-01, 9.999988e-01, & ! - 9.999986e-01, 9.999987e-01, 9.999986e-01, 9.999985e-01, 9.999985e-01, & ! - 9.999985e-01, 9.999985e-01, 9.999983e-01, 9.999983e-01, 9.999981e-01, & ! - 9.999981e-01, 9.999986e-01, 9.999985e-01, 9.999983e-01, 9.999984e-01, & ! - 9.999982e-01, 9.999983e-01, 9.999982e-01, 9.999980e-01, 9.999981e-01, & ! - 9.999978e-01, 9.999979e-01, 9.999985e-01, 9.999985e-01, 9.999983e-01, & ! - 9.999983e-01, 9.999983e-01, 9.999983e-01, & ! - 1.000000e+00, 1.000000e+00, 1.000000e+00, 1.000000e+00, 1.000000e+00, & ! 11 - 1.000000e+00, 1.000000e+00, 1.000000e+00, 1.000000e+00, 1.000000e+00, & ! - 1.000000e+00, 1.000000e+00, 1.000000e+00, 1.000000e+00, 1.000000e+00, & ! - 1.000000e+00, 1.000000e+00, 1.000000e+00, 1.000000e+00, 9.999991e-01, & ! - 9.999990e-01, 9.999992e-01, 9.999995e-01, 9.999986e-01, 9.999994e-01, & ! - 9.999985e-01, 9.999980e-01, 9.999984e-01, 9.999983e-01, 9.999979e-01, & ! - 9.999969e-01, 9.999977e-01, 9.999971e-01, 9.999969e-01, 9.999969e-01, & ! - 9.999965e-01, 9.999970e-01, 9.999985e-01, 9.999973e-01, 9.999961e-01, & ! - 9.999968e-01, 9.999952e-01, 9.999970e-01, 9.999974e-01, 9.999965e-01, & ! - 9.999969e-01, 9.999970e-01, 9.999970e-01, 9.999960e-01, 9.999923e-01, & ! - 9.999958e-01, 9.999937e-01, 9.999960e-01, 9.999953e-01, 9.999946e-01, & ! - 9.999946e-01, 9.999957e-01, 9.999951e-01, & ! - 1.000000e+00, 1.000000e+00, 9.999983e-01, 9.999979e-01, 9.999965e-01, & ! 12 - 9.999949e-01, 9.999948e-01, 9.999918e-01, 9.999917e-01, 9.999923e-01, & ! - 9.999908e-01, 9.999889e-01, 9.999902e-01, 9.999895e-01, 9.999881e-01, & ! - 9.999882e-01, 9.999876e-01, 9.999866e-01, 9.999866e-01, 9.999858e-01, & ! - 9.999860e-01, 9.999852e-01, 9.999836e-01, 9.999831e-01, 9.999818e-01, & ! - 9.999808e-01, 9.999816e-01, 9.999800e-01, 9.999783e-01, 9.999780e-01, & ! - 9.999763e-01, 9.999746e-01, 9.999731e-01, 9.999713e-01, 9.999762e-01, & ! - 9.999740e-01, 9.999670e-01, 9.999703e-01, 9.999687e-01, 9.999666e-01, & ! - 9.999683e-01, 9.999667e-01, 9.999611e-01, 9.999635e-01, 9.999600e-01, & ! - 9.999635e-01, 9.999594e-01, 9.999601e-01, 9.999586e-01, 9.999559e-01, & ! - 9.999569e-01, 9.999558e-01, 9.999523e-01, 9.999535e-01, 9.999529e-01, & ! - 9.999553e-01, 9.999495e-01, 9.999490e-01, & ! - 9.999920e-01, 9.999873e-01, 9.999855e-01, 9.999832e-01, 9.999807e-01, & ! 13 - 9.999778e-01, 9.999754e-01, 9.999721e-01, 9.999692e-01, 9.999651e-01, & ! - 9.999621e-01, 9.999607e-01, 9.999567e-01, 9.999546e-01, 9.999521e-01, & ! - 9.999491e-01, 9.999457e-01, 9.999439e-01, 9.999403e-01, 9.999374e-01, & ! - 9.999353e-01, 9.999315e-01, 9.999282e-01, 9.999244e-01, 9.999234e-01, & ! - 9.999189e-01, 9.999130e-01, 9.999117e-01, 9.999073e-01, 9.999020e-01, & ! - 9.998993e-01, 9.998987e-01, 9.998922e-01, 9.998893e-01, 9.998869e-01, & ! - 9.998805e-01, 9.998778e-01, 9.998751e-01, 9.998708e-01, 9.998676e-01, & ! - 9.998624e-01, 9.998642e-01, 9.998582e-01, 9.998547e-01, 9.998546e-01, & ! - 9.998477e-01, 9.998487e-01, 9.998466e-01, 9.998403e-01, 9.998412e-01, & ! - 9.998406e-01, 9.998342e-01, 9.998326e-01, 9.998333e-01, 9.998328e-01, & ! - 9.998290e-01, 9.998276e-01, 9.998249e-01, & ! - 8.383753e-01, 8.461471e-01, 8.373325e-01, 8.212889e-01, 8.023834e-01, & ! 14 - 7.829501e-01, 7.641777e-01, 7.466000e-01, 7.304023e-01, 7.155998e-01, & ! - 7.021259e-01, 6.898840e-01, 6.787615e-01, 6.686479e-01, 6.594414e-01, & ! - 6.510417e-01, 6.433668e-01, 6.363335e-01, 6.298788e-01, 6.239398e-01, & ! - 6.184633e-01, 6.134055e-01, 6.087228e-01, 6.043786e-01, 6.003439e-01, & ! - 5.965910e-01, 5.930917e-01, 5.898280e-01, 5.867798e-01, 5.839264e-01, & ! - 5.812576e-01, 5.787592e-01, 5.764163e-01, 5.742189e-01, 5.721598e-01, & ! - 5.702286e-01, 5.684182e-01, 5.667176e-01, 5.651237e-01, 5.636253e-01, & ! - 5.622228e-01, 5.609074e-01, 5.596713e-01, 5.585089e-01, 5.574223e-01, & ! - 5.564002e-01, 5.554411e-01, 5.545397e-01, 5.536914e-01, 5.528967e-01, & ! - 5.521495e-01, 5.514457e-01, 5.507818e-01, 5.501623e-01, 5.495750e-01, & ! - 5.490192e-01, 5.484980e-01, 5.480046e-01/), & ! - shape = (/58,nBandsSW_RRTMG/)) - - real(kind_phys),dimension(58,nBandsSW_RRTMG),parameter :: & ! - asyliq1 = reshape(source= (/ & ! - 8.133297e-01, 8.133528e-01, 8.173865e-01, 8.243205e-01, 8.333063e-01, & ! 1 - 8.436317e-01, 8.546611e-01, 8.657934e-01, 8.764345e-01, 8.859837e-01, & ! - 8.627394e-01, 8.824569e-01, 8.976887e-01, 9.089541e-01, 9.167699e-01, & ! - 9.216517e-01, 9.241147e-01, 9.246743e-01, 9.238469e-01, 9.221504e-01, & ! - 9.201045e-01, 9.182299e-01, 9.170491e-01, 9.170862e-01, 9.188653e-01, & ! - 9.229111e-01, 9.297468e-01, 9.398950e-01, 9.203269e-01, 9.260693e-01, & ! - 9.309373e-01, 9.349918e-01, 9.382935e-01, 9.409030e-01, 9.428809e-01, & ! - 9.442881e-01, 9.451851e-01, 9.456331e-01, 9.456926e-01, 9.454247e-01, & ! - 9.448902e-01, 9.441503e-01, 9.432661e-01, 9.422987e-01, 9.413094e-01, & ! - 9.403594e-01, 9.395102e-01, 9.388230e-01, 9.383594e-01, 9.381810e-01, & ! - 9.383489e-01, 9.389251e-01, 9.399707e-01, 9.415475e-01, 9.437167e-01, & ! - 9.465399e-01, 9.500786e-01, 9.5439e-01, & ! - 8.794448e-01, 8.819306e-01, 8.837667e-01, 8.853832e-01, 8.871010e-01, & ! 2 - 8.892675e-01, 8.922584e-01, 8.964666e-01, 9.022940e-01, 9.101456e-01, & ! - 8.839999e-01, 9.035610e-01, 9.184568e-01, 9.292315e-01, 9.364282e-01, & ! - 9.405887e-01, 9.422554e-01, 9.419703e-01, 9.402759e-01, 9.377159e-01, & ! - 9.348345e-01, 9.321769e-01, 9.302888e-01, 9.297166e-01, 9.310075e-01, & ! - 9.347080e-01, 9.413643e-01, 9.515216e-01, 9.306286e-01, 9.361781e-01, & ! - 9.408374e-01, 9.446692e-01, 9.477363e-01, 9.501013e-01, 9.518268e-01, & ! - 9.529756e-01, 9.536105e-01, 9.537938e-01, 9.535886e-01, 9.530574e-01, & ! - 9.522633e-01, 9.512688e-01, 9.501370e-01, 9.489306e-01, 9.477126e-01, & ! - 9.465459e-01, 9.454934e-01, 9.446183e-01, 9.439833e-01, 9.436519e-01, & ! - 9.436866e-01, 9.441508e-01, 9.451073e-01, 9.466195e-01, 9.487501e-01, & ! - 9.515621e-01, 9.551185e-01, 9.5948e-01, & ! - 8.478817e-01, 8.269312e-01, 8.161352e-01, 8.135960e-01, 8.173586e-01, & ! 3 - 8.254167e-01, 8.357072e-01, 8.461167e-01, 8.544952e-01, 8.586776e-01, & ! - 8.335562e-01, 8.524273e-01, 8.669052e-01, 8.775014e-01, 8.847277e-01, & ! - 8.890958e-01, 8.911173e-01, 8.913038e-01, 8.901669e-01, 8.882182e-01, & ! - 8.859692e-01, 8.839315e-01, 8.826164e-01, 8.825356e-01, 8.842004e-01, & ! - 8.881223e-01, 8.948131e-01, 9.047837e-01, 8.855951e-01, 8.911796e-01, & ! - 8.959229e-01, 8.998837e-01, 9.031209e-01, 9.056939e-01, 9.076609e-01, & ! - 9.090812e-01, 9.100134e-01, 9.105167e-01, 9.106496e-01, 9.104712e-01, & ! - 9.100404e-01, 9.094159e-01, 9.086568e-01, 9.078218e-01, 9.069697e-01, & ! - 9.061595e-01, 9.054499e-01, 9.048999e-01, 9.045683e-01, 9.045142e-01, & ! - 9.047962e-01, 9.054730e-01, 9.066037e-01, 9.082472e-01, 9.104623e-01, & ! - 9.133079e-01, 9.168427e-01, 9.2113e-01, & ! - 8.216697e-01, 7.982871e-01, 7.891147e-01, 7.909083e-01, 8.003833e-01, & ! 4 - 8.142516e-01, 8.292290e-01, 8.420356e-01, 8.493945e-01, 8.480316e-01, & ! - 8.212381e-01, 8.394984e-01, 8.534095e-01, 8.634813e-01, 8.702242e-01, & ! - 8.741483e-01, 8.757638e-01, 8.755808e-01, 8.741095e-01, 8.718604e-01, & ! - 8.693433e-01, 8.670686e-01, 8.655464e-01, 8.652872e-01, 8.668006e-01, & ! - 8.705973e-01, 8.771874e-01, 8.870809e-01, 8.678284e-01, 8.732315e-01, & ! - 8.778084e-01, 8.816166e-01, 8.847146e-01, 8.871603e-01, 8.890116e-01, & ! - 8.903266e-01, 8.911632e-01, 8.915796e-01, 8.916337e-01, 8.913834e-01, & ! - 8.908869e-01, 8.902022e-01, 8.893873e-01, 8.885001e-01, 8.875986e-01, & ! - 8.867411e-01, 8.859852e-01, 8.853891e-01, 8.850111e-01, 8.849089e-01, & ! - 8.851405e-01, 8.857639e-01, 8.868372e-01, 8.884185e-01, 8.905656e-01, & ! - 8.933368e-01, 8.967899e-01, 9.0098e-01, & ! - 8.063610e-01, 7.938147e-01, 7.921304e-01, 7.985092e-01, 8.101339e-01, & ! 5 - 8.242175e-01, 8.379913e-01, 8.486920e-01, 8.535547e-01, 8.498083e-01, & ! - 8.224849e-01, 8.405509e-01, 8.542436e-01, 8.640770e-01, 8.705653e-01, & ! - 8.742227e-01, 8.755630e-01, 8.751004e-01, 8.733491e-01, 8.708231e-01, & ! - 8.680365e-01, 8.655035e-01, 8.637381e-01, 8.632544e-01, 8.645665e-01, & ! - 8.681885e-01, 8.746346e-01, 8.844188e-01, 8.648180e-01, 8.700563e-01, & ! - 8.744672e-01, 8.781087e-01, 8.810393e-01, 8.833174e-01, 8.850011e-01, & ! - 8.861485e-01, 8.868183e-01, 8.870687e-01, 8.869579e-01, 8.865441e-01, & ! - 8.858857e-01, 8.850412e-01, 8.840686e-01, 8.830263e-01, 8.819726e-01, & ! - 8.809658e-01, 8.800642e-01, 8.793260e-01, 8.788099e-01, 8.785737e-01, & ! - 8.786758e-01, 8.791746e-01, 8.801283e-01, 8.815955e-01, 8.836340e-01, & ! - 8.863024e-01, 8.896592e-01, 8.9376e-01, & ! - 7.885899e-01, 7.937172e-01, 8.020658e-01, 8.123971e-01, 8.235502e-01, & ! 6 - 8.343776e-01, 8.437336e-01, 8.504711e-01, 8.534421e-01, 8.514978e-01, & ! - 8.238888e-01, 8.417463e-01, 8.552057e-01, 8.647853e-01, 8.710038e-01, & ! - 8.743798e-01, 8.754319e-01, 8.746786e-01, 8.726386e-01, 8.698303e-01, & ! - 8.667724e-01, 8.639836e-01, 8.619823e-01, 8.612870e-01, 8.624165e-01, & ! - 8.658893e-01, 8.722241e-01, 8.819394e-01, 8.620216e-01, 8.671239e-01, & ! - 8.713983e-01, 8.749032e-01, 8.776970e-01, 8.798385e-01, 8.813860e-01, & ! - 8.823980e-01, 8.829332e-01, 8.830500e-01, 8.828068e-01, 8.822623e-01, & ! - 8.814750e-01, 8.805031e-01, 8.794056e-01, 8.782407e-01, 8.770672e-01, & ! - 8.759432e-01, 8.749275e-01, 8.740784e-01, 8.734547e-01, 8.731146e-01, & ! - 8.731170e-01, 8.735199e-01, 8.743823e-01, 8.757625e-01, 8.777191e-01, & ! - 8.803105e-01, 8.835953e-01, 8.8763e-01, & ! - 7.811516e-01, 7.962229e-01, 8.096199e-01, 8.212996e-01, 8.312212e-01, & ! 7 - 8.393430e-01, 8.456236e-01, 8.500214e-01, 8.524950e-01, 8.530031e-01, & ! - 8.251485e-01, 8.429043e-01, 8.562461e-01, 8.656954e-01, 8.717737e-01, & ! - 8.750020e-01, 8.759022e-01, 8.749953e-01, 8.728027e-01, 8.698461e-01, & ! - 8.666466e-01, 8.637257e-01, 8.616047e-01, 8.608051e-01, 8.618483e-01, & ! - 8.652557e-01, 8.715487e-01, 8.812485e-01, 8.611645e-01, 8.662052e-01, & ! - 8.704173e-01, 8.738594e-01, 8.765901e-01, 8.786678e-01, 8.801517e-01, & ! - 8.810999e-01, 8.815713e-01, 8.816246e-01, 8.813185e-01, 8.807114e-01, & ! - 8.798621e-01, 8.788290e-01, 8.776713e-01, 8.764470e-01, 8.752152e-01, & ! - 8.740343e-01, 8.729631e-01, 8.720602e-01, 8.713842e-01, 8.709936e-01, & ! - 8.709475e-01, 8.713041e-01, 8.721221e-01, 8.734602e-01, 8.753774e-01, & ! - 8.779319e-01, 8.811825e-01, 8.8519e-01, & ! - 7.865744e-01, 8.093340e-01, 8.257596e-01, 8.369940e-01, 8.441574e-01, & ! 8 - 8.483602e-01, 8.507096e-01, 8.523139e-01, 8.542834e-01, 8.577321e-01, & ! - 8.288960e-01, 8.465308e-01, 8.597175e-01, 8.689830e-01, 8.748542e-01, & ! - 8.778584e-01, 8.785222e-01, 8.773728e-01, 8.749370e-01, 8.717419e-01, & ! - 8.683145e-01, 8.651816e-01, 8.628704e-01, 8.619077e-01, 8.628205e-01, & ! - 8.661356e-01, 8.723803e-01, 8.820815e-01, 8.616715e-01, 8.666389e-01, & ! - 8.707753e-01, 8.741398e-01, 8.767912e-01, 8.787885e-01, 8.801908e-01, & ! - 8.810570e-01, 8.814460e-01, 8.814167e-01, 8.810283e-01, 8.803395e-01, & ! - 8.794095e-01, 8.782971e-01, 8.770613e-01, 8.757610e-01, 8.744553e-01, & ! - 8.732031e-01, 8.720634e-01, 8.710951e-01, 8.703572e-01, 8.699086e-01, & ! - 8.698084e-01, 8.701155e-01, 8.708887e-01, 8.721872e-01, 8.740698e-01, & ! - 8.765957e-01, 8.798235e-01, 8.8381e-01, & ! - 8.069513e-01, 8.262939e-01, 8.398241e-01, 8.486352e-01, 8.538213e-01, & ! 9 - 8.564743e-01, 8.576854e-01, 8.585455e-01, 8.601452e-01, 8.635755e-01, & ! - 8.337383e-01, 8.512655e-01, 8.643049e-01, 8.733896e-01, 8.790535e-01, & ! - 8.818295e-01, 8.822518e-01, 8.808533e-01, 8.781676e-01, 8.747284e-01, & ! - 8.710690e-01, 8.677229e-01, 8.652236e-01, 8.641047e-01, 8.648993e-01, & ! - 8.681413e-01, 8.743640e-01, 8.841007e-01, 8.633558e-01, 8.682719e-01, & ! - 8.723543e-01, 8.756621e-01, 8.782547e-01, 8.801915e-01, 8.815318e-01, & ! - 8.823347e-01, 8.826598e-01, 8.825663e-01, 8.821135e-01, 8.813608e-01, & ! - 8.803674e-01, 8.791928e-01, 8.778960e-01, 8.765366e-01, 8.751738e-01, & ! - 8.738670e-01, 8.726755e-01, 8.716585e-01, 8.708755e-01, 8.703856e-01, & ! - 8.702483e-01, 8.705229e-01, 8.712687e-01, 8.725448e-01, 8.744109e-01, & ! - 8.769260e-01, 8.801496e-01, 8.8414e-01, & ! - 8.252182e-01, 8.379244e-01, 8.471709e-01, 8.535760e-01, 8.577540e-01, & ! 10 - 8.603183e-01, 8.618820e-01, 8.630578e-01, 8.644587e-01, 8.666970e-01, & ! - 8.362159e-01, 8.536817e-01, 8.666387e-01, 8.756240e-01, 8.811746e-01, & ! - 8.838273e-01, 8.841191e-01, 8.825871e-01, 8.797681e-01, 8.761992e-01, & ! - 8.724174e-01, 8.689593e-01, 8.663623e-01, 8.651632e-01, 8.658988e-01, & ! - 8.691064e-01, 8.753226e-01, 8.850847e-01, 8.641620e-01, 8.690500e-01, & ! - 8.731026e-01, 8.763795e-01, 8.789400e-01, 8.808438e-01, 8.821503e-01, & ! - 8.829191e-01, 8.832095e-01, 8.830813e-01, 8.825938e-01, 8.818064e-01, & ! - 8.807787e-01, 8.795704e-01, 8.782408e-01, 8.768493e-01, 8.754557e-01, & ! - 8.741193e-01, 8.728995e-01, 8.718561e-01, 8.710484e-01, 8.705360e-01, & ! - 8.703782e-01, 8.706347e-01, 8.713650e-01, 8.726285e-01, 8.744849e-01, & ! - 8.769933e-01, 8.802136e-01, 8.8421e-01, & ! - 8.370583e-01, 8.467920e-01, 8.537769e-01, 8.585136e-01, 8.615034e-01, & ! 11 - 8.632474e-01, 8.642468e-01, 8.650026e-01, 8.660161e-01, 8.677882e-01, & ! - 8.369760e-01, 8.543821e-01, 8.672699e-01, 8.761782e-01, 8.816454e-01, & ! - 8.842103e-01, 8.844114e-01, 8.827872e-01, 8.798766e-01, 8.762179e-01, & ! - 8.723500e-01, 8.688112e-01, 8.661403e-01, 8.648758e-01, 8.655563e-01, & ! - 8.687206e-01, 8.749072e-01, 8.846546e-01, 8.636289e-01, 8.684849e-01, & ! - 8.725054e-01, 8.757501e-01, 8.782785e-01, 8.801503e-01, 8.814249e-01, & ! - 8.821620e-01, 8.824211e-01, 8.822620e-01, 8.817440e-01, 8.809268e-01, & ! - 8.798699e-01, 8.786330e-01, 8.772756e-01, 8.758572e-01, 8.744374e-01, & ! - 8.730760e-01, 8.718323e-01, 8.707660e-01, 8.699366e-01, 8.694039e-01, & ! - 8.692271e-01, 8.694661e-01, 8.701803e-01, 8.714293e-01, 8.732727e-01, & ! - 8.757702e-01, 8.789811e-01, 8.8297e-01, & ! - 8.430819e-01, 8.510060e-01, 8.567270e-01, 8.606533e-01, 8.631934e-01, & ! 12 - 8.647554e-01, 8.657471e-01, 8.665760e-01, 8.676496e-01, 8.693754e-01, & ! - 8.384298e-01, 8.557913e-01, 8.686214e-01, 8.774605e-01, 8.828495e-01, & ! - 8.853287e-01, 8.854393e-01, 8.837215e-01, 8.807161e-01, 8.769639e-01, & ! - 8.730053e-01, 8.693812e-01, 8.666321e-01, 8.652988e-01, 8.659219e-01, & ! - 8.690419e-01, 8.751999e-01, 8.849360e-01, 8.638013e-01, 8.686371e-01, & ! - 8.726369e-01, 8.758605e-01, 8.783674e-01, 8.802176e-01, 8.814705e-01, & ! - 8.821859e-01, 8.824234e-01, 8.822429e-01, 8.817038e-01, 8.808658e-01, & ! - 8.797887e-01, 8.785323e-01, 8.771560e-01, 8.757196e-01, 8.742828e-01, & ! - 8.729052e-01, 8.716467e-01, 8.705666e-01, 8.697250e-01, 8.691812e-01, & ! - 8.689950e-01, 8.692264e-01, 8.699346e-01, 8.711795e-01, 8.730209e-01, & ! - 8.755181e-01, 8.787312e-01, 8.8272e-01, & ! - 8.452284e-01, 8.522700e-01, 8.572973e-01, 8.607031e-01, 8.628802e-01, & ! 13 - 8.642215e-01, 8.651198e-01, 8.659679e-01, 8.671588e-01, 8.690853e-01, & ! - 8.383803e-01, 8.557485e-01, 8.685851e-01, 8.774303e-01, 8.828245e-01, & ! - 8.853077e-01, 8.854207e-01, 8.837034e-01, 8.806962e-01, 8.769398e-01, & ! - 8.729740e-01, 8.693393e-01, 8.665761e-01, 8.652247e-01, 8.658253e-01, & ! - 8.689182e-01, 8.750438e-01, 8.847424e-01, 8.636140e-01, 8.684449e-01, & ! - 8.724400e-01, 8.756589e-01, 8.781613e-01, 8.800072e-01, 8.812559e-01, & ! - 8.819671e-01, 8.822007e-01, 8.820165e-01, 8.814737e-01, 8.806322e-01, & ! - 8.795518e-01, 8.782923e-01, 8.769129e-01, 8.754737e-01, 8.740342e-01, & ! - 8.726542e-01, 8.713934e-01, 8.703111e-01, 8.694677e-01, 8.689222e-01, & ! - 8.687344e-01, 8.689646e-01, 8.696715e-01, 8.709156e-01, 8.727563e-01, & ! - 8.752531e-01, 8.784659e-01, 8.8245e-01, & ! - 7.800869e-01, 8.091120e-01, 8.325369e-01, 8.466266e-01, 8.515495e-01, & ! 14 - 8.499371e-01, 8.456203e-01, 8.430521e-01, 8.470286e-01, 8.625431e-01, & ! - 8.402261e-01, 8.610822e-01, 8.776608e-01, 8.904485e-01, 8.999294e-01, & ! - 9.065860e-01, 9.108995e-01, 9.133503e-01, 9.144187e-01, 9.145855e-01, & ! - 9.143320e-01, 9.141402e-01, 9.144933e-01, 9.158754e-01, 9.187716e-01, & ! - 9.236677e-01, 9.310503e-01, 9.414058e-01, 9.239108e-01, 9.300719e-01, & ! - 9.353612e-01, 9.398378e-01, 9.435609e-01, 9.465895e-01, 9.489829e-01, & ! - 9.508000e-01, 9.521002e-01, 9.529424e-01, 9.533860e-01, 9.534902e-01, & ! - 9.533143e-01, 9.529177e-01, 9.523596e-01, 9.516997e-01, 9.509973e-01, & ! - 9.503121e-01, 9.497037e-01, 9.492317e-01, 9.489558e-01, 9.489356e-01, & ! - 9.492311e-01, 9.499019e-01, 9.510077e-01, 9.526084e-01, 9.547636e-01, & ! - 9.575331e-01, 9.609766e-01, 9.6515e-01 /), & ! - shape = (/58,nBandsSW_RRTMG/)) - - real(kind_phys),dimension(58,nBandsSW_RRTMG),parameter :: & ! - asyliq2 = reshape(source= (/ & ! - 8.038165e-01, 8.014154e-01, 7.942381e-01, 7.970521e-01, 8.086621e-01, & ! 1 - 8.233392e-01, 8.374127e-01, 8.495742e-01, 8.596945e-01, 8.680497e-01, & ! - 8.750005e-01, 8.808589e-01, 8.858749e-01, 8.902403e-01, 8.940939e-01, & ! - 8.975379e-01, 9.006450e-01, 9.034741e-01, 9.060659e-01, 9.084561e-01, & ! - 9.106675e-01, 9.127198e-01, 9.146332e-01, 9.164194e-01, 9.180970e-01, & ! - 9.196658e-01, 9.211421e-01, 9.225352e-01, 9.238443e-01, 9.250841e-01, & ! - 9.262541e-01, 9.273620e-01, 9.284081e-01, 9.294002e-01, 9.303395e-01, & ! - 9.312285e-01, 9.320715e-01, 9.328716e-01, 9.336271e-01, 9.343427e-01, & ! - 9.350219e-01, 9.356647e-01, 9.362728e-01, 9.368495e-01, 9.373956e-01, & ! - 9.379113e-01, 9.383987e-01, 9.388608e-01, 9.392986e-01, 9.397132e-01, & ! - 9.401063e-01, 9.404776e-01, 9.408299e-01, 9.411641e-01, 9.414800e-01, & ! - 9.417787e-01, 9.420633e-01, 9.423364e-01, & ! - 8.941000e-01, 9.054049e-01, 9.049510e-01, 9.027216e-01, 9.021636e-01, & ! 2 - 9.037878e-01, 9.069852e-01, 9.109817e-01, 9.152013e-01, 9.193040e-01, & ! - 9.231177e-01, 9.265712e-01, 9.296606e-01, 9.324048e-01, 9.348419e-01, & ! - 9.370131e-01, 9.389529e-01, 9.406954e-01, 9.422727e-01, 9.437088e-01, & ! - 9.450221e-01, 9.462308e-01, 9.473488e-01, 9.483830e-01, 9.493492e-01, & ! - 9.502541e-01, 9.510999e-01, 9.518971e-01, 9.526455e-01, 9.533554e-01, & ! - 9.540249e-01, 9.546571e-01, 9.552551e-01, 9.558258e-01, 9.563603e-01, & ! - 9.568713e-01, 9.573569e-01, 9.578141e-01, 9.582485e-01, 9.586604e-01, & ! - 9.590525e-01, 9.594218e-01, 9.597710e-01, 9.601052e-01, 9.604181e-01, & ! - 9.607159e-01, 9.609979e-01, 9.612655e-01, 9.615184e-01, 9.617564e-01, & ! - 9.619860e-01, 9.622009e-01, 9.624031e-01, 9.625957e-01, 9.627792e-01, & ! - 9.629530e-01, 9.631171e-01, 9.632746e-01, & ! - 8.574638e-01, 8.351383e-01, 8.142977e-01, 8.083068e-01, 8.129284e-01, & ! 3 - 8.215827e-01, 8.307238e-01, 8.389963e-01, 8.460481e-01, 8.519273e-01, & ! - 8.568153e-01, 8.609116e-01, 8.643892e-01, 8.673941e-01, 8.700248e-01, & ! - 8.723707e-01, 8.744902e-01, 8.764240e-01, 8.782057e-01, 8.798593e-01, & ! - 8.814063e-01, 8.828573e-01, 8.842261e-01, 8.855196e-01, 8.867497e-01, & ! - 8.879164e-01, 8.890316e-01, 8.900941e-01, 8.911118e-01, 8.920832e-01, & ! - 8.930156e-01, 8.939091e-01, 8.947663e-01, 8.955888e-01, 8.963786e-01, & ! - 8.971350e-01, 8.978617e-01, 8.985590e-01, 8.992243e-01, 8.998631e-01, & ! - 9.004753e-01, 9.010602e-01, 9.016192e-01, 9.021542e-01, 9.026644e-01, & ! - 9.031535e-01, 9.036194e-01, 9.040656e-01, 9.044894e-01, 9.048933e-01, & ! - 9.052789e-01, 9.056481e-01, 9.060004e-01, 9.063343e-01, 9.066544e-01, & ! - 9.069604e-01, 9.072512e-01, 9.075290e-01, & ! - 8.349569e-01, 8.034579e-01, 7.932136e-01, 8.010156e-01, 8.137083e-01, & ! 4 - 8.255339e-01, 8.351938e-01, 8.428286e-01, 8.488944e-01, 8.538187e-01, & ! - 8.579255e-01, 8.614473e-01, 8.645338e-01, 8.672908e-01, 8.697947e-01, & ! - 8.720843e-01, 8.742015e-01, 8.761718e-01, 8.780160e-01, 8.797479e-01, & ! - 8.813810e-01, 8.829250e-01, 8.843907e-01, 8.857822e-01, 8.871059e-01, & ! - 8.883724e-01, 8.895810e-01, 8.907384e-01, 8.918456e-01, 8.929083e-01, & ! - 8.939284e-01, 8.949060e-01, 8.958463e-01, 8.967486e-01, 8.976129e-01, & ! - 8.984463e-01, 8.992439e-01, 9.000094e-01, 9.007438e-01, 9.014496e-01, & ! - 9.021235e-01, 9.027699e-01, 9.033859e-01, 9.039772e-01, 9.045419e-01, & ! - 9.050819e-01, 9.055975e-01, 9.060907e-01, 9.065607e-01, 9.070093e-01, & ! - 9.074389e-01, 9.078475e-01, 9.082388e-01, 9.086117e-01, 9.089678e-01, & ! - 9.093081e-01, 9.096307e-01, 9.099410e-01, & ! - 8.109692e-01, 7.846657e-01, 7.881928e-01, 8.009509e-01, 8.131208e-01, & ! 5 - 8.230400e-01, 8.309448e-01, 8.372920e-01, 8.424837e-01, 8.468166e-01, & ! - 8.504947e-01, 8.536642e-01, 8.564256e-01, 8.588513e-01, 8.610011e-01, & ! - 8.629122e-01, 8.646262e-01, 8.661720e-01, 8.675752e-01, 8.688582e-01, & ! - 8.700379e-01, 8.711300e-01, 8.721485e-01, 8.731027e-01, 8.740010e-01, & ! - 8.748499e-01, 8.756564e-01, 8.764239e-01, 8.771542e-01, 8.778523e-01, & ! - 8.785211e-01, 8.791601e-01, 8.797725e-01, 8.803589e-01, 8.809173e-01, & ! - 8.814552e-01, 8.819705e-01, 8.824611e-01, 8.829311e-01, 8.833791e-01, & ! - 8.838078e-01, 8.842148e-01, 8.846044e-01, 8.849756e-01, 8.853291e-01, & ! - 8.856645e-01, 8.859841e-01, 8.862904e-01, 8.865801e-01, 8.868551e-01, & ! - 8.871182e-01, 8.873673e-01, 8.876059e-01, 8.878307e-01, 8.880462e-01, & ! - 8.882501e-01, 8.884453e-01, 8.886339e-01, & ! - 7.838510e-01, 7.803151e-01, 7.980477e-01, 8.144160e-01, 8.261784e-01, & ! 6 - 8.344240e-01, 8.404278e-01, 8.450391e-01, 8.487593e-01, 8.518741e-01, & ! - 8.545484e-01, 8.568890e-01, 8.589560e-01, 8.607983e-01, 8.624504e-01, & ! - 8.639408e-01, 8.652945e-01, 8.665301e-01, 8.676634e-01, 8.687121e-01, & ! - 8.696855e-01, 8.705933e-01, 8.714448e-01, 8.722454e-01, 8.730014e-01, & ! - 8.737180e-01, 8.743982e-01, 8.750436e-01, 8.756598e-01, 8.762481e-01, & ! - 8.768089e-01, 8.773427e-01, 8.778532e-01, 8.783434e-01, 8.788089e-01, & ! - 8.792530e-01, 8.796784e-01, 8.800845e-01, 8.804716e-01, 8.808411e-01, & ! - 8.811923e-01, 8.815276e-01, 8.818472e-01, 8.821504e-01, 8.824408e-01, & ! - 8.827155e-01, 8.829777e-01, 8.832269e-01, 8.834631e-01, 8.836892e-01, & ! - 8.839034e-01, 8.841075e-01, 8.843021e-01, 8.844866e-01, 8.846631e-01, & ! - 8.848304e-01, 8.849910e-01, 8.851425e-01, & ! - 7.760783e-01, 7.890215e-01, 8.090192e-01, 8.230252e-01, 8.321369e-01, & ! 7 - 8.384258e-01, 8.431529e-01, 8.469558e-01, 8.501499e-01, 8.528899e-01, & ! - 8.552899e-01, 8.573956e-01, 8.592570e-01, 8.609098e-01, 8.623897e-01, & ! - 8.637169e-01, 8.649184e-01, 8.660097e-01, 8.670096e-01, 8.679338e-01, & ! - 8.687896e-01, 8.695880e-01, 8.703365e-01, 8.710422e-01, 8.717092e-01, & ! - 8.723378e-01, 8.729363e-01, 8.735063e-01, 8.740475e-01, 8.745661e-01, & ! - 8.750560e-01, 8.755275e-01, 8.759731e-01, 8.764000e-01, 8.768071e-01, & ! - 8.771942e-01, 8.775628e-01, 8.779126e-01, 8.782483e-01, 8.785626e-01, & ! - 8.788610e-01, 8.791482e-01, 8.794180e-01, 8.796765e-01, 8.799207e-01, & ! - 8.801522e-01, 8.803707e-01, 8.805777e-01, 8.807749e-01, 8.809605e-01, & ! - 8.811362e-01, 8.813047e-01, 8.814647e-01, 8.816131e-01, 8.817588e-01, & ! - 8.818930e-01, 8.820230e-01, 8.821445e-01, & ! - 7.847907e-01, 8.099917e-01, 8.257428e-01, 8.350423e-01, 8.411971e-01, & ! 8 - 8.457241e-01, 8.493010e-01, 8.522565e-01, 8.547660e-01, 8.569311e-01, & ! - 8.588181e-01, 8.604729e-01, 8.619296e-01, 8.632208e-01, 8.643725e-01, & ! - 8.654050e-01, 8.663363e-01, 8.671835e-01, 8.679590e-01, 8.686707e-01, & ! - 8.693308e-01, 8.699433e-01, 8.705147e-01, 8.710490e-01, 8.715497e-01, & ! - 8.720219e-01, 8.724669e-01, 8.728849e-01, 8.732806e-01, 8.736550e-01, & ! - 8.740099e-01, 8.743435e-01, 8.746601e-01, 8.749610e-01, 8.752449e-01, & ! - 8.755143e-01, 8.757688e-01, 8.760095e-01, 8.762375e-01, 8.764532e-01, & ! - 8.766579e-01, 8.768506e-01, 8.770323e-01, 8.772049e-01, 8.773690e-01, & ! - 8.775226e-01, 8.776679e-01, 8.778062e-01, 8.779360e-01, 8.780587e-01, & ! - 8.781747e-01, 8.782852e-01, 8.783892e-01, 8.784891e-01, 8.785824e-01, & ! - 8.786705e-01, 8.787546e-01, 8.788336e-01, & ! - 8.054324e-01, 8.266282e-01, 8.378075e-01, 8.449848e-01, 8.502166e-01, & ! 9 - 8.542268e-01, 8.573477e-01, 8.598022e-01, 8.617689e-01, 8.633859e-01, & ! - 8.647536e-01, 8.659354e-01, 8.669807e-01, 8.679143e-01, 8.687577e-01, & ! - 8.695222e-01, 8.702207e-01, 8.708591e-01, 8.714446e-01, 8.719836e-01, & ! - 8.724812e-01, 8.729426e-01, 8.733689e-01, 8.737665e-01, 8.741373e-01, & ! - 8.744834e-01, 8.748070e-01, 8.751131e-01, 8.754011e-01, 8.756676e-01, & ! - 8.759219e-01, 8.761599e-01, 8.763857e-01, 8.765984e-01, 8.767999e-01, & ! - 8.769889e-01, 8.771669e-01, 8.773373e-01, 8.774969e-01, 8.776469e-01, & ! - 8.777894e-01, 8.779237e-01, 8.780505e-01, 8.781703e-01, 8.782820e-01, & ! - 8.783886e-01, 8.784894e-01, 8.785844e-01, 8.786736e-01, 8.787584e-01, & ! - 8.788379e-01, 8.789130e-01, 8.789849e-01, 8.790506e-01, 8.791141e-01, & ! - 8.791750e-01, 8.792324e-01, 8.792867e-01, & ! - 8.249534e-01, 8.391988e-01, 8.474107e-01, 8.526860e-01, 8.563983e-01, & ! 10 - 8.592389e-01, 8.615144e-01, 8.633790e-01, 8.649325e-01, 8.662504e-01, & ! - 8.673841e-01, 8.683741e-01, 8.692495e-01, 8.700309e-01, 8.707328e-01, & ! - 8.713650e-01, 8.719432e-01, 8.724676e-01, 8.729498e-01, 8.733922e-01, & ! - 8.737981e-01, 8.741745e-01, 8.745225e-01, 8.748467e-01, 8.751512e-01, & ! - 8.754315e-01, 8.756962e-01, 8.759450e-01, 8.761774e-01, 8.763945e-01, & ! - 8.766021e-01, 8.767970e-01, 8.769803e-01, 8.771511e-01, 8.773151e-01, & ! - 8.774689e-01, 8.776147e-01, 8.777533e-01, 8.778831e-01, 8.780050e-01, & ! - 8.781197e-01, 8.782301e-01, 8.783323e-01, 8.784312e-01, 8.785222e-01, & ! - 8.786096e-01, 8.786916e-01, 8.787688e-01, 8.788411e-01, 8.789122e-01, & ! - 8.789762e-01, 8.790373e-01, 8.790954e-01, 8.791514e-01, 8.792018e-01, & ! - 8.792517e-01, 8.792990e-01, 8.793429e-01, & ! - 8.323091e-01, 8.429776e-01, 8.498123e-01, 8.546929e-01, 8.584295e-01, & ! 11 - 8.613489e-01, 8.636324e-01, 8.654303e-01, 8.668675e-01, 8.680404e-01, & ! - 8.690174e-01, 8.698495e-01, 8.705666e-01, 8.711961e-01, 8.717556e-01, & ! - 8.722546e-01, 8.727063e-01, 8.731170e-01, 8.734933e-01, 8.738382e-01, & ! - 8.741590e-01, 8.744525e-01, 8.747295e-01, 8.749843e-01, 8.752210e-01, & ! - 8.754437e-01, 8.756524e-01, 8.758472e-01, 8.760288e-01, 8.762030e-01, & ! - 8.763603e-01, 8.765122e-01, 8.766539e-01, 8.767894e-01, 8.769130e-01, & ! - 8.770310e-01, 8.771422e-01, 8.772437e-01, 8.773419e-01, 8.774355e-01, & ! - 8.775221e-01, 8.776047e-01, 8.776802e-01, 8.777539e-01, 8.778216e-01, & ! - 8.778859e-01, 8.779473e-01, 8.780031e-01, 8.780562e-01, 8.781097e-01, & ! - 8.781570e-01, 8.782021e-01, 8.782463e-01, 8.782845e-01, 8.783235e-01, & ! - 8.783610e-01, 8.783953e-01, 8.784273e-01, & ! - 8.396448e-01, 8.480172e-01, 8.535934e-01, 8.574145e-01, 8.600835e-01, & ! 12 - 8.620347e-01, 8.635500e-01, 8.648003e-01, 8.658758e-01, 8.668248e-01, & ! - 8.676697e-01, 8.684220e-01, 8.690893e-01, 8.696807e-01, 8.702046e-01, & ! - 8.706676e-01, 8.710798e-01, 8.714478e-01, 8.717778e-01, 8.720747e-01, & ! - 8.723431e-01, 8.725889e-01, 8.728144e-01, 8.730201e-01, 8.732129e-01, & ! - 8.733907e-01, 8.735541e-01, 8.737100e-01, 8.738533e-01, 8.739882e-01, & ! - 8.741164e-01, 8.742362e-01, 8.743485e-01, 8.744530e-01, 8.745512e-01, & ! - 8.746471e-01, 8.747373e-01, 8.748186e-01, 8.748973e-01, 8.749732e-01, & ! - 8.750443e-01, 8.751105e-01, 8.751747e-01, 8.752344e-01, 8.752902e-01, & ! - 8.753412e-01, 8.753917e-01, 8.754393e-01, 8.754843e-01, 8.755282e-01, & ! - 8.755662e-01, 8.756039e-01, 8.756408e-01, 8.756722e-01, 8.757072e-01, & ! - 8.757352e-01, 8.757653e-01, 8.757932e-01, & ! - 8.374590e-01, 8.465669e-01, 8.518701e-01, 8.547627e-01, 8.565745e-01, & ! 13 - 8.579065e-01, 8.589717e-01, 8.598632e-01, 8.606363e-01, 8.613268e-01, & ! - 8.619560e-01, 8.625340e-01, 8.630689e-01, 8.635601e-01, 8.640084e-01, & ! - 8.644180e-01, 8.647885e-01, 8.651220e-01, 8.654218e-01, 8.656908e-01, & ! - 8.659294e-01, 8.661422e-01, 8.663334e-01, 8.665037e-01, 8.666543e-01, & ! - 8.667913e-01, 8.669156e-01, 8.670242e-01, 8.671249e-01, 8.672161e-01, & ! - 8.672993e-01, 8.673733e-01, 8.674457e-01, 8.675103e-01, 8.675713e-01, & ! - 8.676267e-01, 8.676798e-01, 8.677286e-01, 8.677745e-01, 8.678178e-01, & ! - 8.678601e-01, 8.678986e-01, 8.679351e-01, 8.679693e-01, 8.680013e-01, & ! - 8.680334e-01, 8.680624e-01, 8.680915e-01, 8.681178e-01, 8.681428e-01, & ! - 8.681654e-01, 8.681899e-01, 8.682103e-01, 8.682317e-01, 8.682498e-01, & ! - 8.682677e-01, 8.682861e-01, 8.683041e-01, & ! - 7.877069e-01, 8.244281e-01, 8.367971e-01, 8.409074e-01, 8.429859e-01, & ! 14 - 8.454386e-01, 8.489350e-01, 8.534141e-01, 8.585814e-01, 8.641267e-01, & ! - 8.697999e-01, 8.754223e-01, 8.808785e-01, 8.860944e-01, 8.910354e-01, & ! - 8.956837e-01, 9.000392e-01, 9.041091e-01, 9.079071e-01, 9.114479e-01, & ! - 9.147462e-01, 9.178234e-01, 9.206903e-01, 9.233663e-01, 9.258668e-01, & ! - 9.282006e-01, 9.303847e-01, 9.324288e-01, 9.343418e-01, 9.361356e-01, & ! - 9.378176e-01, 9.393939e-01, 9.408736e-01, 9.422622e-01, 9.435670e-01, & ! - 9.447900e-01, 9.459395e-01, 9.470199e-01, 9.480335e-01, 9.489852e-01, & ! - 9.498782e-01, 9.507168e-01, 9.515044e-01, 9.522470e-01, 9.529409e-01, & ! - 9.535946e-01, 9.542071e-01, 9.547838e-01, 9.553256e-01, 9.558351e-01, & ! - 9.563139e-01, 9.567660e-01, 9.571915e-01, 9.575901e-01, 9.579685e-01, & ! - 9.583239e-01, 9.586602e-01, 9.589766e-01/), & ! - shape = (/58,nBandsSW_RRTMG/)) - - real(kind_phys),dimension(43,nBandsSW_RRTMG),parameter :: & ! - extice2 = reshape(source= (/ & ! - 4.101824e-01, 2.435514e-01, 1.713697e-01, 1.314865e-01, 1.063406e-01, & ! 1 - 8.910701e-02, 7.659480e-02, 6.711784e-02, 5.970353e-02, 5.375249e-02, & ! - 4.887577e-02, 4.481025e-02, 4.137171e-02, 3.842744e-02, 3.587948e-02, & ! - 3.365396e-02, 3.169419e-02, 2.995593e-02, 2.840419e-02, 2.701091e-02, & ! - 2.575336e-02, 2.461293e-02, 2.357423e-02, 2.262443e-02, 2.175276e-02, & ! - 2.095012e-02, 2.020875e-02, 1.952199e-02, 1.888412e-02, 1.829018e-02, & ! - 1.773586e-02, 1.721738e-02, 1.673144e-02, 1.627510e-02, 1.584579e-02, & ! - 1.544122e-02, 1.505934e-02, 1.469833e-02, 1.435654e-02, 1.403251e-02, & ! - 1.372492e-02, 1.343255e-02, 1.315433e-02, & ! - 3.836650e-01, 2.304055e-01, 1.637265e-01, 1.266681e-01, 1.031602e-01, & ! 2 - 8.695191e-02, 7.511544e-02, 6.610009e-02, 5.900909e-02, 5.328833e-02, & ! - 4.857728e-02, 4.463133e-02, 4.127880e-02, 3.839567e-02, 3.589013e-02, & ! - 3.369280e-02, 3.175027e-02, 3.002079e-02, 2.847121e-02, 2.707493e-02, & ! - 2.581031e-02, 2.465962e-02, 2.360815e-02, 2.264363e-02, 2.175571e-02, & ! - 2.093563e-02, 2.017592e-02, 1.947015e-02, 1.881278e-02, 1.819901e-02, & ! - 1.762463e-02, 1.708598e-02, 1.657982e-02, 1.610330e-02, 1.565390e-02, & ! - 1.522937e-02, 1.482768e-02, 1.444706e-02, 1.408588e-02, 1.374270e-02, & ! - 1.341619e-02, 1.310517e-02, 1.280857e-02, & ! - 4.152673e-01, 2.436816e-01, 1.702243e-01, 1.299704e-01, 1.047528e-01, & ! 3 - 8.756039e-02, 7.513327e-02, 6.575690e-02, 5.844616e-02, 5.259609e-02, & ! - 4.781531e-02, 4.383980e-02, 4.048517e-02, 3.761891e-02, 3.514342e-02, & ! - 3.298525e-02, 3.108814e-02, 2.940825e-02, 2.791096e-02, 2.656858e-02, & ! - 2.535869e-02, 2.426297e-02, 2.326627e-02, 2.235602e-02, 2.152164e-02, & ! - 2.075420e-02, 2.004613e-02, 1.939091e-02, 1.878296e-02, 1.821744e-02, & ! - 1.769015e-02, 1.719741e-02, 1.673600e-02, 1.630308e-02, 1.589615e-02, & ! - 1.551298e-02, 1.515159e-02, 1.481021e-02, 1.448726e-02, 1.418131e-02, & ! - 1.389109e-02, 1.361544e-02, 1.335330e-02, & ! - 3.873250e-01, 2.331609e-01, 1.655002e-01, 1.277753e-01, 1.038247e-01, & ! 4 - 8.731780e-02, 7.527638e-02, 6.611873e-02, 5.892850e-02, 5.313885e-02, & ! - 4.838068e-02, 4.440356e-02, 4.103167e-02, 3.813804e-02, 3.562870e-02, & ! - 3.343269e-02, 3.149539e-02, 2.977414e-02, 2.823510e-02, 2.685112e-02, & ! - 2.560015e-02, 2.446411e-02, 2.342805e-02, 2.247948e-02, 2.160789e-02, & ! - 2.080438e-02, 2.006139e-02, 1.937238e-02, 1.873177e-02, 1.813469e-02, & ! - 1.757689e-02, 1.705468e-02, 1.656479e-02, 1.610435e-02, 1.567081e-02, & ! - 1.526192e-02, 1.487565e-02, 1.451020e-02, 1.416396e-02, 1.383546e-02, & ! - 1.352339e-02, 1.322657e-02, 1.294392e-02, & ! - 3.784280e-01, 2.291396e-01, 1.632551e-01, 1.263775e-01, 1.028944e-01, & ! 5 - 8.666975e-02, 7.480952e-02, 6.577335e-02, 5.866714e-02, 5.293694e-02, & ! - 4.822153e-02, 4.427547e-02, 4.092626e-02, 3.804918e-02, 3.555184e-02, & ! - 3.336440e-02, 3.143307e-02, 2.971577e-02, 2.817912e-02, 2.679632e-02, & ! - 2.554558e-02, 2.440903e-02, 2.337187e-02, 2.242173e-02, 2.154821e-02, & ! - 2.074249e-02, 1.999706e-02, 1.930546e-02, 1.866212e-02, 1.806221e-02, & ! - 1.750152e-02, 1.697637e-02, 1.648352e-02, 1.602010e-02, 1.558358e-02, & ! - 1.517172e-02, 1.478250e-02, 1.441413e-02, 1.406498e-02, 1.373362e-02, & ! - 1.341872e-02, 1.311911e-02, 1.283371e-02, & ! - 3.719909e-01, 2.259490e-01, 1.613144e-01, 1.250648e-01, 1.019462e-01, & ! 6 - 8.595358e-02, 7.425064e-02, 6.532618e-02, 5.830218e-02, 5.263421e-02, & ! - 4.796697e-02, 4.405891e-02, 4.074013e-02, 3.788776e-02, 3.541071e-02, & ! - 3.324008e-02, 3.132280e-02, 2.961733e-02, 2.809071e-02, 2.671645e-02, & ! - 2.547302e-02, 2.434276e-02, 2.331102e-02, 2.236558e-02, 2.149614e-02, & ! - 2.069397e-02, 1.995163e-02, 1.926272e-02, 1.862174e-02, 1.802389e-02, & ! - 1.746500e-02, 1.694142e-02, 1.644994e-02, 1.598772e-02, 1.555225e-02, & ! - 1.514129e-02, 1.475286e-02, 1.438515e-02, 1.403659e-02, 1.370572e-02, & ! - 1.339124e-02, 1.309197e-02, 1.280685e-02, & ! - 3.713158e-01, 2.253816e-01, 1.608461e-01, 1.246718e-01, 1.016109e-01, & ! 7 - 8.566332e-02, 7.399666e-02, 6.510199e-02, 5.810290e-02, 5.245608e-02, & ! - 4.780702e-02, 4.391478e-02, 4.060989e-02, 3.776982e-02, 3.530374e-02, & ! - 3.314296e-02, 3.123458e-02, 2.953719e-02, 2.801794e-02, 2.665043e-02, & ! - 2.541321e-02, 2.428868e-02, 2.326224e-02, 2.232173e-02, 2.145688e-02, & ! - 2.065899e-02, 1.992067e-02, 1.923552e-02, 1.859808e-02, 1.800356e-02, & ! - 1.744782e-02, 1.692721e-02, 1.643855e-02, 1.597900e-02, 1.554606e-02, & ! - 1.513751e-02, 1.475137e-02, 1.438586e-02, 1.403938e-02, 1.371050e-02, & ! - 1.339793e-02, 1.310050e-02, 1.281713e-02, & ! - 3.605883e-01, 2.204388e-01, 1.580431e-01, 1.229033e-01, 1.004203e-01, & ! 8 - 8.482616e-02, 7.338941e-02, 6.465105e-02, 5.776176e-02, 5.219398e-02, & ! - 4.760288e-02, 4.375369e-02, 4.048111e-02, 3.766539e-02, 3.521771e-02, & ! - 3.307079e-02, 3.117277e-02, 2.948303e-02, 2.796929e-02, 2.660560e-02, & ! - 2.537086e-02, 2.424772e-02, 2.322182e-02, 2.228114e-02, 2.141556e-02, & ! - 2.061649e-02, 1.987661e-02, 1.918962e-02, 1.855009e-02, 1.795330e-02, & ! - 1.739514e-02, 1.687199e-02, 1.638069e-02, 1.591845e-02, 1.548276e-02, & ! - 1.507143e-02, 1.468249e-02, 1.431416e-02, 1.396486e-02, 1.363318e-02, & ! - 1.331781e-02, 1.301759e-02, 1.273147e-02, & ! - 3.527890e-01, 2.168469e-01, 1.560090e-01, 1.216216e-01, 9.955787e-02, & ! 9 - 8.421942e-02, 7.294827e-02, 6.432192e-02, 5.751081e-02, 5.199888e-02, & ! - 4.744835e-02, 4.362899e-02, 4.037847e-02, 3.757910e-02, 3.514351e-02, & ! - 3.300546e-02, 3.111382e-02, 2.942853e-02, 2.791775e-02, 2.655584e-02, & ! - 2.532195e-02, 2.419892e-02, 2.317255e-02, 2.223092e-02, 2.136402e-02, & ! - 2.056334e-02, 1.982160e-02, 1.913258e-02, 1.849087e-02, 1.789178e-02, & ! - 1.733124e-02, 1.680565e-02, 1.631187e-02, 1.584711e-02, 1.540889e-02, & ! - 1.499502e-02, 1.460354e-02, 1.423269e-02, 1.388088e-02, 1.354670e-02, & ! - 1.322887e-02, 1.292620e-02, 1.263767e-02, & ! - 3.477874e-01, 2.143515e-01, 1.544887e-01, 1.205942e-01, 9.881779e-02, & ! 10 - 8.366261e-02, 7.251586e-02, 6.397790e-02, 5.723183e-02, 5.176908e-02, & ! - 4.725658e-02, 4.346715e-02, 4.024055e-02, 3.746055e-02, 3.504080e-02, & ! - 3.291583e-02, 3.103507e-02, 2.935891e-02, 2.785582e-02, 2.650042e-02, & ! - 2.527206e-02, 2.415376e-02, 2.313142e-02, 2.219326e-02, 2.132934e-02, & ! - 2.053122e-02, 1.979169e-02, 1.910456e-02, 1.846448e-02, 1.786680e-02, & ! - 1.730745e-02, 1.678289e-02, 1.628998e-02, 1.582595e-02, 1.538835e-02, & ! - 1.497499e-02, 1.458393e-02, 1.421341e-02, 1.386187e-02, 1.352788e-02, & ! - 1.321019e-02, 1.290762e-02, 1.261913e-02, & ! - 3.453721e-01, 2.130744e-01, 1.536698e-01, 1.200140e-01, 9.838078e-02, & ! 11 - 8.331940e-02, 7.223803e-02, 6.374775e-02, 5.703770e-02, 5.160290e-02, & ! - 4.711259e-02, 4.334110e-02, 4.012923e-02, 3.736150e-02, 3.495208e-02, & ! - 3.283589e-02, 3.096267e-02, 2.929302e-02, 2.779560e-02, 2.644517e-02, & ! - 2.522119e-02, 2.410677e-02, 2.308788e-02, 2.215281e-02, 2.129165e-02, & ! - 2.049602e-02, 1.975874e-02, 1.907365e-02, 1.843542e-02, 1.783943e-02, & ! - 1.728162e-02, 1.675847e-02, 1.626685e-02, 1.580401e-02, 1.536750e-02, & ! - 1.495515e-02, 1.456502e-02, 1.419537e-02, 1.384463e-02, 1.351139e-02, & ! - 1.319438e-02, 1.289246e-02, 1.260456e-02, & ! - 3.417883e-01, 2.113379e-01, 1.526395e-01, 1.193347e-01, 9.790253e-02, & ! 12 - 8.296715e-02, 7.196979e-02, 6.353806e-02, 5.687024e-02, 5.146670e-02, & ! - 4.700001e-02, 4.324667e-02, 4.004894e-02, 3.729233e-02, 3.489172e-02, & ! - 3.278257e-02, 3.091499e-02, 2.924987e-02, 2.775609e-02, 2.640859e-02, & ! - 2.518695e-02, 2.407439e-02, 2.305697e-02, 2.212303e-02, 2.126273e-02, & ! - 2.046774e-02, 1.973090e-02, 1.904610e-02, 1.840801e-02, 1.781204e-02, & ! - 1.725417e-02, 1.673086e-02, 1.623902e-02, 1.577590e-02, 1.533906e-02, & ! - 1.492634e-02, 1.453580e-02, 1.416571e-02, 1.381450e-02, 1.348078e-02, & ! - 1.316327e-02, 1.286082e-02, 1.257240e-02, & ! - 3.416111e-01, 2.114124e-01, 1.527734e-01, 1.194809e-01, 9.804612e-02, & ! 13 - 8.310287e-02, 7.209595e-02, 6.365442e-02, 5.697710e-02, 5.156460e-02, & ! - 4.708957e-02, 4.332850e-02, 4.012361e-02, 3.736037e-02, 3.495364e-02, & ! - 3.283879e-02, 3.096593e-02, 2.929589e-02, 2.779751e-02, 2.644571e-02, & ! - 2.522004e-02, 2.410369e-02, 2.308271e-02, 2.214542e-02, 2.128195e-02, & ! - 2.048396e-02, 1.974429e-02, 1.905679e-02, 1.841614e-02, 1.781774e-02, & ! - 1.725754e-02, 1.673203e-02, 1.623807e-02, 1.577293e-02, 1.533416e-02, & ! - 1.491958e-02, 1.452727e-02, 1.415547e-02, 1.380262e-02, 1.346732e-02, & ! - 1.314830e-02, 1.284439e-02, 1.255456e-02, & ! - 4.196611e-01, 2.493642e-01, 1.761261e-01, 1.357197e-01, 1.102161e-01, & ! 14 - 9.269376e-02, 7.992985e-02, 7.022538e-02, 6.260168e-02, 5.645603e-02, & ! - 5.139732e-02, 4.716088e-02, 4.356133e-02, 4.046498e-02, 3.777303e-02, & ! - 3.541094e-02, 3.332137e-02, 3.145954e-02, 2.978998e-02, 2.828419e-02, & ! - 2.691905e-02, 2.567559e-02, 2.453811e-02, 2.349350e-02, 2.253072e-02, & ! - 2.164042e-02, 2.081464e-02, 2.004652e-02, 1.933015e-02, 1.866041e-02, & ! - 1.803283e-02, 1.744348e-02, 1.688894e-02, 1.636616e-02, 1.587244e-02, & ! - 1.540539e-02, 1.496287e-02, 1.454295e-02, 1.414392e-02, 1.376423e-02, & ! - 1.340247e-02, 1.305739e-02, 1.272784e-02/), & ! - shape = (/43,nBandsSW_RRTMG/)) - - real(kind_phys),dimension(43,nBandsSW_RRTMG),parameter :: & ! - ssaice2 = reshape(source= (/ & ! - 6.630615e-01, 6.451169e-01, 6.333696e-01, 6.246927e-01, 6.178420e-01, & ! 1 - 6.121976e-01, 6.074069e-01, 6.032505e-01, 5.995830e-01, 5.963030e-01, & ! - 5.933372e-01, 5.906311e-01, 5.881427e-01, 5.858395e-01, 5.836955e-01, & ! - 5.816896e-01, 5.798046e-01, 5.780264e-01, 5.763429e-01, 5.747441e-01, & ! - 5.732213e-01, 5.717672e-01, 5.703754e-01, 5.690403e-01, 5.677571e-01, & ! - 5.665215e-01, 5.653297e-01, 5.641782e-01, 5.630643e-01, 5.619850e-01, & ! - 5.609381e-01, 5.599214e-01, 5.589328e-01, 5.579707e-01, 5.570333e-01, & ! - 5.561193e-01, 5.552272e-01, 5.543558e-01, 5.535041e-01, 5.526708e-01, & ! - 5.518551e-01, 5.510561e-01, 5.502729e-01, & ! - 7.689749e-01, 7.398171e-01, 7.205819e-01, 7.065690e-01, 6.956928e-01, & ! 2 - 6.868989e-01, 6.795813e-01, 6.733606e-01, 6.679838e-01, 6.632742e-01, & ! - 6.591036e-01, 6.553766e-01, 6.520197e-01, 6.489757e-01, 6.461991e-01, & ! - 6.436531e-01, 6.413075e-01, 6.391375e-01, 6.371221e-01, 6.352438e-01, & ! - 6.334876e-01, 6.318406e-01, 6.302918e-01, 6.288315e-01, 6.274512e-01, & ! - 6.261436e-01, 6.249022e-01, 6.237211e-01, 6.225953e-01, 6.215201e-01, & ! - 6.204914e-01, 6.195055e-01, 6.185592e-01, 6.176492e-01, 6.167730e-01, & ! - 6.159280e-01, 6.151120e-01, 6.143228e-01, 6.135587e-01, 6.128177e-01, & ! - 6.120984e-01, 6.113993e-01, 6.107189e-01, & ! - 9.956167e-01, 9.814770e-01, 9.716104e-01, 9.639746e-01, 9.577179e-01, & ! 3 - 9.524010e-01, 9.477672e-01, 9.436527e-01, 9.399467e-01, 9.365708e-01, & ! - 9.334672e-01, 9.305921e-01, 9.279118e-01, 9.253993e-01, 9.230330e-01, & ! - 9.207954e-01, 9.186719e-01, 9.166501e-01, 9.147199e-01, 9.128722e-01, & ! - 9.110997e-01, 9.093956e-01, 9.077544e-01, 9.061708e-01, 9.046406e-01, & ! - 9.031598e-01, 9.017248e-01, 9.003326e-01, 8.989804e-01, 8.976655e-01, & ! - 8.963857e-01, 8.951389e-01, 8.939233e-01, 8.927370e-01, 8.915785e-01, & ! - 8.904464e-01, 8.893392e-01, 8.882559e-01, 8.871951e-01, 8.861559e-01, & ! - 8.851373e-01, 8.841383e-01, 8.831581e-01, & ! - 9.723177e-01, 9.452119e-01, 9.267592e-01, 9.127393e-01, 9.014238e-01, & ! 4 - 8.919334e-01, 8.837584e-01, 8.765773e-01, 8.701736e-01, 8.643950e-01, & ! - 8.591299e-01, 8.542942e-01, 8.498230e-01, 8.456651e-01, 8.417794e-01, & ! - 8.381324e-01, 8.346964e-01, 8.314484e-01, 8.283687e-01, 8.254408e-01, & ! - 8.226505e-01, 8.199854e-01, 8.174348e-01, 8.149891e-01, 8.126403e-01, & ! - 8.103808e-01, 8.082041e-01, 8.061044e-01, 8.040765e-01, 8.021156e-01, & ! - 8.002174e-01, 7.983781e-01, 7.965941e-01, 7.948622e-01, 7.931795e-01, & ! - 7.915432e-01, 7.899508e-01, 7.884002e-01, 7.868891e-01, 7.854156e-01, & ! - 7.839779e-01, 7.825742e-01, 7.812031e-01, & ! - 9.933294e-01, 9.860917e-01, 9.811564e-01, 9.774008e-01, 9.743652e-01, & ! 5 - 9.718155e-01, 9.696159e-01, 9.676810e-01, 9.659531e-01, 9.643915e-01, & ! - 9.629667e-01, 9.616561e-01, 9.604426e-01, 9.593125e-01, 9.582548e-01, & ! - 9.572607e-01, 9.563227e-01, 9.554347e-01, 9.545915e-01, 9.537888e-01, & ! - 9.530226e-01, 9.522898e-01, 9.515874e-01, 9.509130e-01, 9.502643e-01, & ! - 9.496394e-01, 9.490366e-01, 9.484542e-01, 9.478910e-01, 9.473456e-01, & ! - 9.468169e-01, 9.463039e-01, 9.458056e-01, 9.453212e-01, 9.448499e-01, & ! - 9.443910e-01, 9.439438e-01, 9.435077e-01, 9.430821e-01, 9.426666e-01, & ! - 9.422607e-01, 9.418638e-01, 9.414756e-01, & ! - 9.900787e-01, 9.828880e-01, 9.779258e-01, 9.741173e-01, 9.710184e-01, & ! 6 - 9.684012e-01, 9.661332e-01, 9.641301e-01, 9.623352e-01, 9.607083e-01, & ! - 9.592198e-01, 9.578474e-01, 9.565739e-01, 9.553856e-01, 9.542715e-01, & ! - 9.532226e-01, 9.522314e-01, 9.512919e-01, 9.503986e-01, 9.495472e-01, & ! - 9.487337e-01, 9.479549e-01, 9.472077e-01, 9.464897e-01, 9.457985e-01, & ! - 9.451322e-01, 9.444890e-01, 9.438673e-01, 9.432656e-01, 9.426826e-01, & ! - 9.421173e-01, 9.415684e-01, 9.410351e-01, 9.405164e-01, 9.400115e-01, & ! - 9.395198e-01, 9.390404e-01, 9.385728e-01, 9.381164e-01, 9.376707e-01, & ! - 9.372350e-01, 9.368091e-01, 9.363923e-01, & ! - 9.986793e-01, 9.985239e-01, 9.983911e-01, 9.982715e-01, 9.981606e-01, & ! 7 - 9.980562e-01, 9.979567e-01, 9.978613e-01, 9.977691e-01, 9.976798e-01, & ! - 9.975929e-01, 9.975081e-01, 9.974251e-01, 9.973438e-01, 9.972640e-01, & ! - 9.971855e-01, 9.971083e-01, 9.970322e-01, 9.969571e-01, 9.968830e-01, & ! - 9.968099e-01, 9.967375e-01, 9.966660e-01, 9.965951e-01, 9.965250e-01, & ! - 9.964555e-01, 9.963867e-01, 9.963185e-01, 9.962508e-01, 9.961836e-01, & ! - 9.961170e-01, 9.960508e-01, 9.959851e-01, 9.959198e-01, 9.958550e-01, & ! - 9.957906e-01, 9.957266e-01, 9.956629e-01, 9.955997e-01, 9.955367e-01, & ! - 9.954742e-01, 9.954119e-01, 9.953500e-01, & ! - 9.997944e-01, 9.997791e-01, 9.997664e-01, 9.997547e-01, 9.997436e-01, & ! 8 - 9.997327e-01, 9.997219e-01, 9.997110e-01, 9.996999e-01, 9.996886e-01, & ! - 9.996771e-01, 9.996653e-01, 9.996533e-01, 9.996409e-01, 9.996282e-01, & ! - 9.996152e-01, 9.996019e-01, 9.995883e-01, 9.995743e-01, 9.995599e-01, & ! - 9.995453e-01, 9.995302e-01, 9.995149e-01, 9.994992e-01, 9.994831e-01, & ! - 9.994667e-01, 9.994500e-01, 9.994329e-01, 9.994154e-01, 9.993976e-01, & ! - 9.993795e-01, 9.993610e-01, 9.993422e-01, 9.993230e-01, 9.993035e-01, & ! - 9.992837e-01, 9.992635e-01, 9.992429e-01, 9.992221e-01, 9.992008e-01, & ! - 9.991793e-01, 9.991574e-01, 9.991352e-01, & ! - 9.999949e-01, 9.999947e-01, 9.999943e-01, 9.999939e-01, 9.999934e-01, & ! 9 - 9.999927e-01, 9.999920e-01, 9.999913e-01, 9.999904e-01, 9.999895e-01, & ! - 9.999885e-01, 9.999874e-01, 9.999863e-01, 9.999851e-01, 9.999838e-01, & ! - 9.999824e-01, 9.999810e-01, 9.999795e-01, 9.999780e-01, 9.999764e-01, & ! - 9.999747e-01, 9.999729e-01, 9.999711e-01, 9.999692e-01, 9.999673e-01, & ! - 9.999653e-01, 9.999632e-01, 9.999611e-01, 9.999589e-01, 9.999566e-01, & ! - 9.999543e-01, 9.999519e-01, 9.999495e-01, 9.999470e-01, 9.999444e-01, & ! - 9.999418e-01, 9.999392e-01, 9.999364e-01, 9.999336e-01, 9.999308e-01, & ! - 9.999279e-01, 9.999249e-01, 9.999219e-01, & ! - 9.999997e-01, 9.999997e-01, 9.999997e-01, 9.999996e-01, 9.999996e-01, & ! 10 - 9.999995e-01, 9.999994e-01, 9.999993e-01, 9.999993e-01, 9.999992e-01, & ! - 9.999991e-01, 9.999989e-01, 9.999988e-01, 9.999987e-01, 9.999986e-01, & ! - 9.999984e-01, 9.999983e-01, 9.999981e-01, 9.999980e-01, 9.999978e-01, & ! - 9.999976e-01, 9.999974e-01, 9.999972e-01, 9.999971e-01, 9.999969e-01, & ! - 9.999966e-01, 9.999964e-01, 9.999962e-01, 9.999960e-01, 9.999957e-01, & ! - 9.999955e-01, 9.999953e-01, 9.999950e-01, 9.999947e-01, 9.999945e-01, & ! - 9.999942e-01, 9.999939e-01, 9.999936e-01, 9.999934e-01, 9.999931e-01, & ! - 9.999928e-01, 9.999925e-01, 9.999921e-01, & ! - 9.999997e-01, 9.999996e-01, 9.999996e-01, 9.999995e-01, 9.999994e-01, & ! 11 - 9.999993e-01, 9.999992e-01, 9.999991e-01, 9.999990e-01, 9.999989e-01, & ! - 9.999987e-01, 9.999986e-01, 9.999984e-01, 9.999982e-01, 9.999980e-01, & ! - 9.999978e-01, 9.999976e-01, 9.999974e-01, 9.999972e-01, 9.999970e-01, & ! - 9.999967e-01, 9.999965e-01, 9.999962e-01, 9.999959e-01, 9.999956e-01, & ! - 9.999954e-01, 9.999951e-01, 9.999947e-01, 9.999944e-01, 9.999941e-01, & ! - 9.999938e-01, 9.999934e-01, 9.999931e-01, 9.999927e-01, 9.999923e-01, & ! - 9.999920e-01, 9.999916e-01, 9.999912e-01, 9.999908e-01, 9.999904e-01, & ! - 9.999899e-01, 9.999895e-01, 9.999891e-01, & ! - 9.999987e-01, 9.999987e-01, 9.999985e-01, 9.999984e-01, 9.999982e-01, & ! 12 - 9.999980e-01, 9.999978e-01, 9.999976e-01, 9.999973e-01, 9.999970e-01, & ! - 9.999967e-01, 9.999964e-01, 9.999960e-01, 9.999956e-01, 9.999952e-01, & ! - 9.999948e-01, 9.999944e-01, 9.999939e-01, 9.999934e-01, 9.999929e-01, & ! - 9.999924e-01, 9.999918e-01, 9.999913e-01, 9.999907e-01, 9.999901e-01, & ! - 9.999894e-01, 9.999888e-01, 9.999881e-01, 9.999874e-01, 9.999867e-01, & ! - 9.999860e-01, 9.999853e-01, 9.999845e-01, 9.999837e-01, 9.999829e-01, & ! - 9.999821e-01, 9.999813e-01, 9.999804e-01, 9.999796e-01, 9.999787e-01, & ! - 9.999778e-01, 9.999768e-01, 9.999759e-01, & ! - 9.999989e-01, 9.999989e-01, 9.999987e-01, 9.999986e-01, 9.999984e-01, & ! 13 - 9.999982e-01, 9.999980e-01, 9.999978e-01, 9.999975e-01, 9.999972e-01, & ! - 9.999969e-01, 9.999966e-01, 9.999962e-01, 9.999958e-01, 9.999954e-01, & ! - 9.999950e-01, 9.999945e-01, 9.999941e-01, 9.999936e-01, 9.999931e-01, & ! - 9.999925e-01, 9.999920e-01, 9.999914e-01, 9.999908e-01, 9.999902e-01, & ! - 9.999896e-01, 9.999889e-01, 9.999883e-01, 9.999876e-01, 9.999869e-01, & ! - 9.999861e-01, 9.999854e-01, 9.999846e-01, 9.999838e-01, 9.999830e-01, & ! - 9.999822e-01, 9.999814e-01, 9.999805e-01, 9.999796e-01, 9.999787e-01, & ! - 9.999778e-01, 9.999769e-01, 9.999759e-01, & ! - 7.042143e-01, 6.691161e-01, 6.463240e-01, 6.296590e-01, 6.166381e-01, & ! 14 - 6.060183e-01, 5.970908e-01, 5.894144e-01, 5.826968e-01, 5.767343e-01, & ! - 5.713804e-01, 5.665256e-01, 5.620867e-01, 5.579987e-01, 5.542101e-01, & ! - 5.506794e-01, 5.473727e-01, 5.442620e-01, 5.413239e-01, 5.385389e-01, & ! - 5.358901e-01, 5.333633e-01, 5.309460e-01, 5.286277e-01, 5.263988e-01, & ! - 5.242512e-01, 5.221777e-01, 5.201719e-01, 5.182280e-01, 5.163410e-01, & ! - 5.145062e-01, 5.127197e-01, 5.109776e-01, 5.092766e-01, 5.076137e-01, & ! - 5.059860e-01, 5.043911e-01, 5.028266e-01, 5.012904e-01, 4.997805e-01, & ! - 4.982951e-01, 4.968326e-01, 4.953913e-01/), & ! - shape = (/43,nBandsSW_RRTMG/)) - - real(kind_phys),dimension(43,nBandsSW_RRTMG),parameter :: & ! - asyice2 = reshape(source= (/ & ! - 7.946655e-01, 8.547685e-01, 8.806016e-01, 8.949880e-01, 9.041676e-01, & ! 1 - 9.105399e-01, 9.152249e-01, 9.188160e-01, 9.216573e-01, 9.239620e-01, & ! - 9.258695e-01, 9.274745e-01, 9.288441e-01, 9.300267e-01, 9.310584e-01, & ! - 9.319665e-01, 9.327721e-01, 9.334918e-01, 9.341387e-01, 9.347236e-01, & ! - 9.352551e-01, 9.357402e-01, 9.361850e-01, 9.365942e-01, 9.369722e-01, & ! - 9.373225e-01, 9.376481e-01, 9.379516e-01, 9.382352e-01, 9.385010e-01, & ! - 9.387505e-01, 9.389854e-01, 9.392070e-01, 9.394163e-01, 9.396145e-01, & ! - 9.398024e-01, 9.399809e-01, 9.401508e-01, 9.403126e-01, 9.404670e-01, & ! - 9.406144e-01, 9.407555e-01, 9.408906e-01, & ! - 9.078091e-01, 9.195850e-01, 9.267250e-01, 9.317083e-01, 9.354632e-01, & ! 2 - 9.384323e-01, 9.408597e-01, 9.428935e-01, 9.446301e-01, 9.461351e-01, & ! - 9.474555e-01, 9.486259e-01, 9.496722e-01, 9.506146e-01, 9.514688e-01, & ! - 9.522476e-01, 9.529612e-01, 9.536181e-01, 9.542251e-01, 9.547883e-01, & ! - 9.553124e-01, 9.558019e-01, 9.562601e-01, 9.566904e-01, 9.570953e-01, & ! - 9.574773e-01, 9.578385e-01, 9.581806e-01, 9.585054e-01, 9.588142e-01, & ! - 9.591083e-01, 9.593888e-01, 9.596569e-01, 9.599135e-01, 9.601593e-01, & ! - 9.603952e-01, 9.606219e-01, 9.608399e-01, 9.610499e-01, 9.612523e-01, & ! - 9.614477e-01, 9.616365e-01, 9.618192e-01, & ! - 8.322045e-01, 8.528693e-01, 8.648167e-01, 8.729163e-01, 8.789054e-01, & ! 3 - 8.835845e-01, 8.873819e-01, 8.905511e-01, 8.932532e-01, 8.955965e-01, & ! - 8.976567e-01, 8.994887e-01, 9.011334e-01, 9.026221e-01, 9.039791e-01, & ! - 9.052237e-01, 9.063715e-01, 9.074349e-01, 9.084245e-01, 9.093489e-01, & ! - 9.102154e-01, 9.110303e-01, 9.117987e-01, 9.125253e-01, 9.132140e-01, & ! - 9.138682e-01, 9.144910e-01, 9.150850e-01, 9.156524e-01, 9.161955e-01, & ! - 9.167160e-01, 9.172157e-01, 9.176959e-01, 9.181581e-01, 9.186034e-01, & ! - 9.190330e-01, 9.194478e-01, 9.198488e-01, 9.202368e-01, 9.206126e-01, & ! - 9.209768e-01, 9.213301e-01, 9.216731e-01, & ! - 8.116560e-01, 8.488278e-01, 8.674331e-01, 8.788148e-01, 8.865810e-01, & ! 4 - 8.922595e-01, 8.966149e-01, 9.000747e-01, 9.028980e-01, 9.052513e-01, & ! - 9.072468e-01, 9.089632e-01, 9.104574e-01, 9.117713e-01, 9.129371e-01, & ! - 9.139793e-01, 9.149174e-01, 9.157668e-01, 9.165400e-01, 9.172473e-01, & ! - 9.178970e-01, 9.184962e-01, 9.190508e-01, 9.195658e-01, 9.200455e-01, & ! - 9.204935e-01, 9.209130e-01, 9.213067e-01, 9.216771e-01, 9.220262e-01, & ! - 9.223560e-01, 9.226680e-01, 9.229636e-01, 9.232443e-01, 9.235112e-01, & ! - 9.237652e-01, 9.240074e-01, 9.242385e-01, 9.244594e-01, 9.246708e-01, & ! - 9.248733e-01, 9.250674e-01, 9.252536e-01, & ! - 8.047113e-01, 8.402864e-01, 8.570332e-01, 8.668455e-01, 8.733206e-01, & ! 5 - 8.779272e-01, 8.813796e-01, 8.840676e-01, 8.862225e-01, 8.879904e-01, & ! - 8.894682e-01, 8.907228e-01, 8.918019e-01, 8.927404e-01, 8.935645e-01, & ! - 8.942943e-01, 8.949452e-01, 8.955296e-01, 8.960574e-01, 8.965366e-01, & ! - 8.969736e-01, 8.973740e-01, 8.977422e-01, 8.980820e-01, 8.983966e-01, & ! - 8.986889e-01, 8.989611e-01, 8.992153e-01, 8.994533e-01, 8.996766e-01, & ! - 8.998865e-01, 9.000843e-01, 9.002709e-01, 9.004474e-01, 9.006146e-01, & ! - 9.007731e-01, 9.009237e-01, 9.010670e-01, 9.012034e-01, 9.013336e-01, & ! - 9.014579e-01, 9.015767e-01, 9.016904e-01, & ! - 8.179122e-01, 8.480726e-01, 8.621945e-01, 8.704354e-01, 8.758555e-01, & ! 6 - 8.797007e-01, 8.825750e-01, 8.848078e-01, 8.865939e-01, 8.880564e-01, & ! - 8.892765e-01, 8.903105e-01, 8.911982e-01, 8.919689e-01, 8.926446e-01, & ! - 8.932419e-01, 8.937738e-01, 8.942506e-01, 8.946806e-01, 8.950702e-01, & ! - 8.954251e-01, 8.957497e-01, 8.960477e-01, 8.963223e-01, 8.965762e-01, & ! - 8.968116e-01, 8.970306e-01, 8.972347e-01, 8.974255e-01, 8.976042e-01, & ! - 8.977720e-01, 8.979298e-01, 8.980784e-01, 8.982188e-01, 8.983515e-01, & ! - 8.984771e-01, 8.985963e-01, 8.987095e-01, 8.988171e-01, 8.989195e-01, & ! - 8.990172e-01, 8.991104e-01, 8.991994e-01, & ! - 8.169789e-01, 8.455024e-01, 8.586925e-01, 8.663283e-01, 8.713217e-01, & ! 7 - 8.748488e-01, 8.774765e-01, 8.795122e-01, 8.811370e-01, 8.824649e-01, & ! - 8.835711e-01, 8.845073e-01, 8.853103e-01, 8.860068e-01, 8.866170e-01, & ! - 8.871560e-01, 8.876358e-01, 8.880658e-01, 8.884533e-01, 8.888044e-01, & ! - 8.891242e-01, 8.894166e-01, 8.896851e-01, 8.899324e-01, 8.901612e-01, & ! - 8.903733e-01, 8.905706e-01, 8.907545e-01, 8.909265e-01, 8.910876e-01, & ! - 8.912388e-01, 8.913812e-01, 8.915153e-01, 8.916419e-01, 8.917617e-01, & ! - 8.918752e-01, 8.919829e-01, 8.920851e-01, 8.921824e-01, 8.922751e-01, & ! - 8.923635e-01, 8.924478e-01, 8.925284e-01, & ! - 8.387642e-01, 8.569979e-01, 8.658630e-01, 8.711825e-01, 8.747605e-01, & ! 8 - 8.773472e-01, 8.793129e-01, 8.808621e-01, 8.821179e-01, 8.831583e-01, & ! - 8.840361e-01, 8.847875e-01, 8.854388e-01, 8.860094e-01, 8.865138e-01, & ! - 8.869634e-01, 8.873668e-01, 8.877310e-01, 8.880617e-01, 8.883635e-01, & ! - 8.886401e-01, 8.888947e-01, 8.891298e-01, 8.893477e-01, 8.895504e-01, & ! - 8.897393e-01, 8.899159e-01, 8.900815e-01, 8.902370e-01, 8.903833e-01, & ! - 8.905214e-01, 8.906518e-01, 8.907753e-01, 8.908924e-01, 8.910036e-01, & ! - 8.911094e-01, 8.912101e-01, 8.913062e-01, 8.913979e-01, 8.914856e-01, & ! - 8.915695e-01, 8.916498e-01, 8.917269e-01, & ! - 8.522208e-01, 8.648132e-01, 8.711224e-01, 8.749901e-01, 8.776354e-01, & ! 9 - 8.795743e-01, 8.810649e-01, 8.822518e-01, 8.832225e-01, 8.840333e-01, & ! - 8.847224e-01, 8.853162e-01, 8.858342e-01, 8.862906e-01, 8.866962e-01, & ! - 8.870595e-01, 8.873871e-01, 8.876842e-01, 8.879551e-01, 8.882032e-01, & ! - 8.884316e-01, 8.886425e-01, 8.888380e-01, 8.890199e-01, 8.891895e-01, & ! - 8.893481e-01, 8.894968e-01, 8.896366e-01, 8.897683e-01, 8.898926e-01, & ! - 8.900102e-01, 8.901215e-01, 8.902272e-01, 8.903276e-01, 8.904232e-01, & ! - 8.905144e-01, 8.906014e-01, 8.906845e-01, 8.907640e-01, 8.908402e-01, & ! - 8.909132e-01, 8.909834e-01, 8.910507e-01, & ! - 8.578202e-01, 8.683033e-01, 8.735431e-01, 8.767488e-01, 8.789378e-01, & ! 10 - 8.805399e-01, 8.817701e-01, 8.827485e-01, 8.835480e-01, 8.842152e-01, & ! - 8.847817e-01, 8.852696e-01, 8.856949e-01, 8.860694e-01, 8.864020e-01, & ! - 8.866997e-01, 8.869681e-01, 8.872113e-01, 8.874330e-01, 8.876360e-01, & ! - 8.878227e-01, 8.879951e-01, 8.881548e-01, 8.883033e-01, 8.884418e-01, & ! - 8.885712e-01, 8.886926e-01, 8.888066e-01, 8.889139e-01, 8.890152e-01, & ! - 8.891110e-01, 8.892017e-01, 8.892877e-01, 8.893695e-01, 8.894473e-01, & ! - 8.895214e-01, 8.895921e-01, 8.896597e-01, 8.897243e-01, 8.897862e-01, & ! - 8.898456e-01, 8.899025e-01, 8.899572e-01, & ! - 8.625615e-01, 8.713831e-01, 8.755799e-01, 8.780560e-01, 8.796983e-01, & ! 11 - 8.808714e-01, 8.817534e-01, 8.824420e-01, 8.829953e-01, 8.834501e-01, & ! - 8.838310e-01, 8.841549e-01, 8.844338e-01, 8.846767e-01, 8.848902e-01, & ! - 8.850795e-01, 8.852484e-01, 8.854002e-01, 8.855374e-01, 8.856620e-01, & ! - 8.857758e-01, 8.858800e-01, 8.859759e-01, 8.860644e-01, 8.861464e-01, & ! - 8.862225e-01, 8.862935e-01, 8.863598e-01, 8.864218e-01, 8.864800e-01, & ! - 8.865347e-01, 8.865863e-01, 8.866349e-01, 8.866809e-01, 8.867245e-01, & ! - 8.867658e-01, 8.868050e-01, 8.868423e-01, 8.868778e-01, 8.869117e-01, & ! - 8.869440e-01, 8.869749e-01, 8.870044e-01, & ! - 8.587495e-01, 8.684764e-01, 8.728189e-01, 8.752872e-01, 8.768846e-01, & ! 12 - 8.780060e-01, 8.788386e-01, 8.794824e-01, 8.799960e-01, 8.804159e-01, & ! - 8.807660e-01, 8.810626e-01, 8.813175e-01, 8.815390e-01, 8.817335e-01, & ! - 8.819057e-01, 8.820593e-01, 8.821973e-01, 8.823220e-01, 8.824353e-01, & ! - 8.825387e-01, 8.826336e-01, 8.827209e-01, 8.828016e-01, 8.828764e-01, & ! - 8.829459e-01, 8.830108e-01, 8.830715e-01, 8.831283e-01, 8.831817e-01, & ! - 8.832320e-01, 8.832795e-01, 8.833244e-01, 8.833668e-01, 8.834071e-01, & ! - 8.834454e-01, 8.834817e-01, 8.835164e-01, 8.835495e-01, 8.835811e-01, & ! - 8.836113e-01, 8.836402e-01, 8.836679e-01, & ! - 8.561110e-01, 8.678583e-01, 8.727554e-01, 8.753892e-01, 8.770154e-01, & ! 13 - 8.781109e-01, 8.788949e-01, 8.794812e-01, 8.799348e-01, 8.802952e-01, & ! - 8.805880e-01, 8.808300e-01, 8.810331e-01, 8.812058e-01, 8.813543e-01, & ! - 8.814832e-01, 8.815960e-01, 8.816956e-01, 8.817839e-01, 8.818629e-01, & ! - 8.819339e-01, 8.819979e-01, 8.820560e-01, 8.821089e-01, 8.821573e-01, & ! - 8.822016e-01, 8.822425e-01, 8.822801e-01, 8.823150e-01, 8.823474e-01, & ! - 8.823775e-01, 8.824056e-01, 8.824318e-01, 8.824564e-01, 8.824795e-01, & ! - 8.825011e-01, 8.825215e-01, 8.825408e-01, 8.825589e-01, 8.825761e-01, & ! - 8.825924e-01, 8.826078e-01, 8.826224e-01, & ! - 8.311124e-01, 8.688197e-01, 8.900274e-01, 9.040696e-01, 9.142334e-01, & ! 14 - 9.220181e-01, 9.282195e-01, 9.333048e-01, 9.375689e-01, 9.412085e-01, & ! - 9.443604e-01, 9.471230e-01, 9.495694e-01, 9.517549e-01, 9.537224e-01, & ! - 9.555057e-01, 9.571316e-01, 9.586222e-01, 9.599952e-01, 9.612656e-01, & ! - 9.624458e-01, 9.635461e-01, 9.645756e-01, 9.655418e-01, 9.664513e-01, & ! - 9.673098e-01, 9.681222e-01, 9.688928e-01, 9.696256e-01, 9.703237e-01, & ! - 9.709903e-01, 9.716280e-01, 9.722391e-01, 9.728258e-01, 9.733901e-01, & ! - 9.739336e-01, 9.744579e-01, 9.749645e-01, 9.754546e-01, 9.759294e-01, & ! - 9.763901e-01, 9.768376e-01, 9.772727e-01/), & ! - shape = (/43,nBandsSW_RRTMG/)) - - real(kind_phys),dimension(46,nBandsSW_RRTMG),parameter :: & ! - extice3 = reshape(source= (/ & ! - 5.194013e-01, 3.215089e-01, 2.327917e-01, 1.824424e-01, 1.499977e-01, & ! 1 - 1.273492e-01, 1.106421e-01, 9.780982e-02, 8.764435e-02, 7.939266e-02, & ! - 7.256081e-02, 6.681137e-02, 6.190600e-02, 5.767154e-02, 5.397915e-02, & ! - 5.073102e-02, 4.785151e-02, 4.528125e-02, 4.297296e-02, 4.088853e-02, & ! - 3.899690e-02, 3.727251e-02, 3.569411e-02, 3.424393e-02, 3.290694e-02, & ! - 3.167040e-02, 3.052340e-02, 2.945654e-02, 2.846172e-02, 2.753188e-02, & ! - 2.666085e-02, 2.584322e-02, 2.507423e-02, 2.434967e-02, 2.366579e-02, & ! - 2.301926e-02, 2.240711e-02, 2.182666e-02, 2.127551e-02, 2.075150e-02, & ! - 2.025267e-02, 1.977725e-02, 1.932364e-02, 1.889035e-02, 1.847607e-02, & ! - 1.807956e-02, & ! - 4.901155e-01, 3.065286e-01, 2.230800e-01, 1.753951e-01, 1.445402e-01, & ! 2 - 1.229417e-01, 1.069777e-01, 9.469760e-02, 8.495824e-02, 7.704501e-02, & ! - 7.048834e-02, 6.496693e-02, 6.025353e-02, 5.618286e-02, 5.263186e-02, & ! - 4.950698e-02, 4.673585e-02, 4.426164e-02, 4.203904e-02, 4.003153e-02, & ! - 3.820932e-02, 3.654790e-02, 3.502688e-02, 3.362919e-02, 3.234041e-02, & ! - 3.114829e-02, 3.004234e-02, 2.901356e-02, 2.805413e-02, 2.715727e-02, & ! - 2.631705e-02, 2.552828e-02, 2.478637e-02, 2.408725e-02, 2.342734e-02, & ! - 2.280343e-02, 2.221264e-02, 2.165242e-02, 2.112043e-02, 2.061461e-02, & ! - 2.013308e-02, 1.967411e-02, 1.923616e-02, 1.881783e-02, 1.841781e-02, & ! - 1.803494e-02, & ! - 5.056264e-01, 3.160261e-01, 2.298442e-01, 1.805973e-01, 1.487318e-01, & ! 3 - 1.264258e-01, 1.099389e-01, 9.725656e-02, 8.719819e-02, 7.902576e-02, & ! - 7.225433e-02, 6.655206e-02, 6.168427e-02, 5.748028e-02, 5.381296e-02, & ! - 5.058572e-02, 4.772383e-02, 4.516857e-02, 4.287317e-02, 4.079990e-02, & ! - 3.891801e-02, 3.720217e-02, 3.563133e-02, 3.418786e-02, 3.285686e-02, & ! - 3.162569e-02, 3.048352e-02, 2.942104e-02, 2.843018e-02, 2.750395e-02, & ! - 2.663621e-02, 2.582160e-02, 2.505539e-02, 2.433337e-02, 2.365185e-02, & ! - 2.300750e-02, 2.239736e-02, 2.181878e-02, 2.126937e-02, 2.074699e-02, & ! - 2.024968e-02, 1.977567e-02, 1.932338e-02, 1.889134e-02, 1.847823e-02, & ! - 1.808281e-02, & ! - 4.881605e-01, 3.055237e-01, 2.225070e-01, 1.750688e-01, 1.443736e-01, & ! 4 - 1.228869e-01, 1.070054e-01, 9.478893e-02, 8.509997e-02, 7.722769e-02, & ! - 7.070495e-02, 6.521211e-02, 6.052311e-02, 5.647351e-02, 5.294088e-02, & ! - 4.983217e-02, 4.707539e-02, 4.461398e-02, 4.240288e-02, 4.040575e-02, & ! - 3.859298e-02, 3.694016e-02, 3.542701e-02, 3.403655e-02, 3.275444e-02, & ! - 3.156849e-02, 3.046827e-02, 2.944481e-02, 2.849034e-02, 2.759812e-02, & ! - 2.676226e-02, 2.597757e-02, 2.523949e-02, 2.454400e-02, 2.388750e-02, & ! - 2.326682e-02, 2.267909e-02, 2.212176e-02, 2.159253e-02, 2.108933e-02, & ! - 2.061028e-02, 2.015369e-02, 1.971801e-02, 1.930184e-02, 1.890389e-02, & ! - 1.852300e-02, & ! - 5.103703e-01, 3.188144e-01, 2.317435e-01, 1.819887e-01, 1.497944e-01, & ! 5 - 1.272584e-01, 1.106013e-01, 9.778822e-02, 8.762610e-02, 7.936938e-02, & ! - 7.252809e-02, 6.676701e-02, 6.184901e-02, 5.760165e-02, 5.389651e-02, & ! - 5.063598e-02, 4.774457e-02, 4.516295e-02, 4.284387e-02, 4.074922e-02, & ! - 3.884792e-02, 3.711438e-02, 3.552734e-02, 3.406898e-02, 3.272425e-02, & ! - 3.148038e-02, 3.032643e-02, 2.925299e-02, 2.825191e-02, 2.731612e-02, & ! - 2.643943e-02, 2.561642e-02, 2.484230e-02, 2.411284e-02, 2.342429e-02, & ! - 2.277329e-02, 2.215686e-02, 2.157231e-02, 2.101724e-02, 2.048946e-02, & ! - 1.998702e-02, 1.950813e-02, 1.905118e-02, 1.861468e-02, 1.819730e-02, & ! - 1.779781e-02, & ! - 5.031161e-01, 3.144511e-01, 2.286942e-01, 1.796903e-01, 1.479819e-01, & ! 6 - 1.257860e-01, 1.093803e-01, 9.676059e-02, 8.675183e-02, 7.861971e-02, & ! - 7.188168e-02, 6.620754e-02, 6.136376e-02, 5.718050e-02, 5.353127e-02, & ! - 5.031995e-02, 4.747218e-02, 4.492952e-02, 4.264544e-02, 4.058240e-02, & ! - 3.870979e-02, 3.700242e-02, 3.543933e-02, 3.400297e-02, 3.267854e-02, & ! - 3.145345e-02, 3.031691e-02, 2.925967e-02, 2.827370e-02, 2.735203e-02, & ! - 2.648858e-02, 2.567798e-02, 2.491555e-02, 2.419710e-02, 2.351893e-02, & ! - 2.287776e-02, 2.227063e-02, 2.169491e-02, 2.114821e-02, 2.062840e-02, & ! - 2.013354e-02, 1.966188e-02, 1.921182e-02, 1.878191e-02, 1.837083e-02, & ! - 1.797737e-02, & ! - 4.949453e-01, 3.095918e-01, 2.253402e-01, 1.771964e-01, 1.460446e-01, & ! 7 - 1.242383e-01, 1.081206e-01, 9.572235e-02, 8.588928e-02, 7.789990e-02, & ! - 7.128013e-02, 6.570559e-02, 6.094684e-02, 5.683701e-02, 5.325183e-02, & ! - 5.009688e-02, 4.729909e-02, 4.480106e-02, 4.255708e-02, 4.053025e-02, & ! - 3.869051e-02, 3.701310e-02, 3.547745e-02, 3.406631e-02, 3.276512e-02, & ! - 3.156153e-02, 3.044494e-02, 2.940626e-02, 2.843759e-02, 2.753211e-02, & ! - 2.668381e-02, 2.588744e-02, 2.513839e-02, 2.443255e-02, 2.376629e-02, & ! - 2.313637e-02, 2.253990e-02, 2.197428e-02, 2.143718e-02, 2.092649e-02, & ! - 2.044032e-02, 1.997694e-02, 1.953478e-02, 1.911241e-02, 1.870855e-02, & ! - 1.832199e-02, & ! - 5.052816e-01, 3.157665e-01, 2.296233e-01, 1.803986e-01, 1.485473e-01, & ! 8 - 1.262514e-01, 1.097718e-01, 9.709524e-02, 8.704139e-02, 7.887264e-02, & ! - 7.210424e-02, 6.640454e-02, 6.153894e-02, 5.733683e-02, 5.367116e-02, & ! - 5.044537e-02, 4.758477e-02, 4.503066e-02, 4.273629e-02, 4.066395e-02, & ! - 3.878291e-02, 3.706784e-02, 3.549771e-02, 3.405488e-02, 3.272448e-02, & ! - 3.149387e-02, 3.035221e-02, 2.929020e-02, 2.829979e-02, 2.737397e-02, & ! - 2.650663e-02, 2.569238e-02, 2.492651e-02, 2.420482e-02, 2.352361e-02, & ! - 2.287954e-02, 2.226968e-02, 2.169136e-02, 2.114220e-02, 2.062005e-02, & ! - 2.012296e-02, 1.964917e-02, 1.919709e-02, 1.876524e-02, 1.835231e-02, & ! - 1.795707e-02, & ! - 5.042067e-01, 3.151195e-01, 2.291708e-01, 1.800573e-01, 1.482779e-01, & ! 9 - 1.260324e-01, 1.095900e-01, 9.694202e-02, 8.691087e-02, 7.876056e-02, & ! - 7.200745e-02, 6.632062e-02, 6.146600e-02, 5.727338e-02, 5.361599e-02, & ! - 5.039749e-02, 4.754334e-02, 4.499500e-02, 4.270580e-02, 4.063815e-02, & ! - 3.876135e-02, 3.705016e-02, 3.548357e-02, 3.404400e-02, 3.271661e-02, & ! - 3.148877e-02, 3.034969e-02, 2.929008e-02, 2.830191e-02, 2.737818e-02, & ! - 2.651279e-02, 2.570039e-02, 2.493624e-02, 2.421618e-02, 2.353650e-02, & ! - 2.289390e-02, 2.228541e-02, 2.170840e-02, 2.116048e-02, 2.063950e-02, & ! - 2.014354e-02, 1.967082e-02, 1.921975e-02, 1.878888e-02, 1.837688e-02, & ! - 1.798254e-02, & ! - 5.022507e-01, 3.139246e-01, 2.283218e-01, 1.794059e-01, 1.477544e-01, & ! 10 - 1.255984e-01, 1.092222e-01, 9.662516e-02, 8.663439e-02, 7.851688e-02, & ! - 7.179095e-02, 6.612700e-02, 6.129193e-02, 5.711618e-02, 5.347351e-02, & ! - 5.026796e-02, 4.742530e-02, 4.488721e-02, 4.260724e-02, 4.054790e-02, & ! - 3.867866e-02, 3.697435e-02, 3.541407e-02, 3.398029e-02, 3.265824e-02, & ! - 3.143535e-02, 3.030085e-02, 2.924551e-02, 2.826131e-02, 2.734130e-02, & ! - 2.647939e-02, 2.567026e-02, 2.490919e-02, 2.419203e-02, 2.351509e-02, & ! - 2.287507e-02, 2.226903e-02, 2.169434e-02, 2.114862e-02, 2.062975e-02, & ! - 2.013578e-02, 1.966496e-02, 1.921571e-02, 1.878658e-02, 1.837623e-02, & ! - 1.798348e-02, & ! - 5.068316e-01, 3.166869e-01, 2.302576e-01, 1.808693e-01, 1.489122e-01, & ! 11 - 1.265423e-01, 1.100080e-01, 9.728926e-02, 8.720201e-02, 7.900612e-02, & ! - 7.221524e-02, 6.649660e-02, 6.161484e-02, 5.739877e-02, 5.372093e-02, & ! - 5.048442e-02, 4.761431e-02, 4.505172e-02, 4.274972e-02, 4.067050e-02, & ! - 3.878321e-02, 3.706244e-02, 3.548710e-02, 3.403948e-02, 3.270466e-02, & ! - 3.146995e-02, 3.032450e-02, 2.925897e-02, 2.826527e-02, 2.733638e-02, & ! - 2.646615e-02, 2.564920e-02, 2.488078e-02, 2.415670e-02, 2.347322e-02, & ! - 2.282702e-02, 2.221513e-02, 2.163489e-02, 2.108390e-02, 2.056002e-02, & ! - 2.006128e-02, 1.958591e-02, 1.913232e-02, 1.869904e-02, 1.828474e-02, & ! - 1.788819e-02, & ! - 5.077707e-01, 3.172636e-01, 2.306695e-01, 1.811871e-01, 1.491691e-01, & ! 12 - 1.267565e-01, 1.101907e-01, 9.744773e-02, 8.734125e-02, 7.912973e-02, & ! - 7.232591e-02, 6.659637e-02, 6.170530e-02, 5.748120e-02, 5.379634e-02, & ! - 5.055367e-02, 4.767809e-02, 4.511061e-02, 4.280423e-02, 4.072104e-02, & ! - 3.883015e-02, 3.710611e-02, 3.552776e-02, 3.407738e-02, 3.274002e-02, & ! - 3.150296e-02, 3.035532e-02, 2.928776e-02, 2.829216e-02, 2.736150e-02, & ! - 2.648961e-02, 2.567111e-02, 2.490123e-02, 2.417576e-02, 2.349098e-02, & ! - 2.284354e-02, 2.223049e-02, 2.164914e-02, 2.109711e-02, 2.057222e-02, & ! - 2.007253e-02, 1.959626e-02, 1.914181e-02, 1.870770e-02, 1.829261e-02, & ! - 1.789531e-02, & ! - 5.062281e-01, 3.163402e-01, 2.300275e-01, 1.807060e-01, 1.487921e-01, & ! 13 - 1.264523e-01, 1.099403e-01, 9.723879e-02, 8.716516e-02, 7.898034e-02, & ! - 7.219863e-02, 6.648771e-02, 6.161254e-02, 5.740217e-02, 5.372929e-02, & ! - 5.049716e-02, 4.763092e-02, 4.507179e-02, 4.277290e-02, 4.069649e-02, & ! - 3.881175e-02, 3.709331e-02, 3.552008e-02, 3.407442e-02, 3.274141e-02, & ! - 3.150837e-02, 3.036447e-02, 2.930037e-02, 2.830801e-02, 2.738037e-02, & ! - 2.651132e-02, 2.569547e-02, 2.492810e-02, 2.420499e-02, 2.352243e-02, & ! - 2.287710e-02, 2.226604e-02, 2.168658e-02, 2.113634e-02, 2.061316e-02, & ! - 2.011510e-02, 1.964038e-02, 1.918740e-02, 1.875471e-02, 1.834096e-02, & ! - 1.794495e-02, & ! - 1.338834e-01, 1.924912e-01, 1.755523e-01, 1.534793e-01, 1.343937e-01, & ! 14 - 1.187883e-01, 1.060654e-01, 9.559106e-02, 8.685880e-02, 7.948698e-02, & ! - 7.319086e-02, 6.775669e-02, 6.302215e-02, 5.886236e-02, 5.517996e-02, & ! - 5.189810e-02, 4.895539e-02, 4.630225e-02, 4.389823e-02, 4.171002e-02, & ! - 3.970998e-02, 3.787493e-02, 3.618537e-02, 3.462471e-02, 3.317880e-02, & ! - 3.183547e-02, 3.058421e-02, 2.941590e-02, 2.832256e-02, 2.729724e-02, & ! - 2.633377e-02, 2.542675e-02, 2.457136e-02, 2.376332e-02, 2.299882e-02, & ! - 2.227443e-02, 2.158707e-02, 2.093400e-02, 2.031270e-02, 1.972091e-02, & ! - 1.915659e-02, 1.861787e-02, 1.810304e-02, 1.761055e-02, 1.713899e-02, & ! - 1.668704e-02 /), & ! - shape = (/46,nBandsSW_RRTMG/)) - - real(kind_phys),dimension(46,nBandsSW_RRTMG),parameter :: & ! - ssaice3 = reshape(source= (/ & ! - 6.749442e-01, 6.649947e-01, 6.565828e-01, 6.489928e-01, 6.420046e-01, & ! 1 - 6.355231e-01, 6.294964e-01, 6.238901e-01, 6.186783e-01, 6.138395e-01, & ! - 6.093543e-01, 6.052049e-01, 6.013742e-01, 5.978457e-01, 5.946030e-01, & ! - 5.916302e-01, 5.889115e-01, 5.864310e-01, 5.841731e-01, 5.821221e-01, & ! - 5.802624e-01, 5.785785e-01, 5.770549e-01, 5.756759e-01, 5.744262e-01, & ! - 5.732901e-01, 5.722524e-01, 5.712974e-01, 5.704097e-01, 5.695739e-01, & ! - 5.687747e-01, 5.679964e-01, 5.672238e-01, 5.664415e-01, 5.656340e-01, & ! - 5.647860e-01, 5.638821e-01, 5.629070e-01, 5.618452e-01, 5.606815e-01, & ! - 5.594006e-01, 5.579870e-01, 5.564255e-01, 5.547008e-01, 5.527976e-01, & ! - 5.507005e-01, & ! - 7.628550e-01, 7.567297e-01, 7.508463e-01, 7.451972e-01, 7.397745e-01, & ! 2 - 7.345705e-01, 7.295775e-01, 7.247881e-01, 7.201945e-01, 7.157894e-01, & ! - 7.115652e-01, 7.075145e-01, 7.036300e-01, 6.999044e-01, 6.963304e-01, & ! - 6.929007e-01, 6.896083e-01, 6.864460e-01, 6.834067e-01, 6.804833e-01, & ! - 6.776690e-01, 6.749567e-01, 6.723397e-01, 6.698109e-01, 6.673637e-01, & ! - 6.649913e-01, 6.626870e-01, 6.604441e-01, 6.582561e-01, 6.561163e-01, & ! - 6.540182e-01, 6.519554e-01, 6.499215e-01, 6.479099e-01, 6.459145e-01, & ! - 6.439289e-01, 6.419468e-01, 6.399621e-01, 6.379686e-01, 6.359601e-01, & ! - 6.339306e-01, 6.318740e-01, 6.297845e-01, 6.276559e-01, 6.254825e-01, & ! - 6.232583e-01, & ! - 9.924147e-01, 9.882792e-01, 9.842257e-01, 9.802522e-01, 9.763566e-01, & ! 3 - 9.725367e-01, 9.687905e-01, 9.651157e-01, 9.615104e-01, 9.579725e-01, & ! - 9.544997e-01, 9.510901e-01, 9.477416e-01, 9.444520e-01, 9.412194e-01, & ! - 9.380415e-01, 9.349165e-01, 9.318421e-01, 9.288164e-01, 9.258373e-01, & ! - 9.229027e-01, 9.200106e-01, 9.171589e-01, 9.143457e-01, 9.115688e-01, & ! - 9.088263e-01, 9.061161e-01, 9.034362e-01, 9.007846e-01, 8.981592e-01, & ! - 8.955581e-01, 8.929792e-01, 8.904206e-01, 8.878803e-01, 8.853562e-01, & ! - 8.828464e-01, 8.803488e-01, 8.778616e-01, 8.753827e-01, 8.729102e-01, & ! - 8.704421e-01, 8.679764e-01, 8.655112e-01, 8.630445e-01, 8.605744e-01, & ! - 8.580989e-01, & ! - 9.629413e-01, 9.517182e-01, 9.409209e-01, 9.305366e-01, 9.205529e-01, & ! 4 - 9.109569e-01, 9.017362e-01, 8.928780e-01, 8.843699e-01, 8.761992e-01, & ! - 8.683536e-01, 8.608204e-01, 8.535873e-01, 8.466417e-01, 8.399712e-01, & ! - 8.335635e-01, 8.274062e-01, 8.214868e-01, 8.157932e-01, 8.103129e-01, & ! - 8.050336e-01, 7.999432e-01, 7.950294e-01, 7.902798e-01, 7.856825e-01, & ! - 7.812250e-01, 7.768954e-01, 7.726815e-01, 7.685711e-01, 7.645522e-01, & ! - 7.606126e-01, 7.567404e-01, 7.529234e-01, 7.491498e-01, 7.454074e-01, & ! - 7.416844e-01, 7.379688e-01, 7.342485e-01, 7.305118e-01, 7.267468e-01, & ! - 7.229415e-01, 7.190841e-01, 7.151628e-01, 7.111657e-01, 7.070811e-01, & ! - 7.028972e-01, & ! - 9.942270e-01, 9.909206e-01, 9.876775e-01, 9.844960e-01, 9.813746e-01, & ! 5 - 9.783114e-01, 9.753049e-01, 9.723535e-01, 9.694553e-01, 9.666088e-01, & ! - 9.638123e-01, 9.610641e-01, 9.583626e-01, 9.557060e-01, 9.530928e-01, & ! - 9.505211e-01, 9.479895e-01, 9.454961e-01, 9.430393e-01, 9.406174e-01, & ! - 9.382288e-01, 9.358717e-01, 9.335446e-01, 9.312456e-01, 9.289731e-01, & ! - 9.267255e-01, 9.245010e-01, 9.222980e-01, 9.201147e-01, 9.179496e-01, & ! - 9.158008e-01, 9.136667e-01, 9.115457e-01, 9.094359e-01, 9.073358e-01, & ! - 9.052436e-01, 9.031577e-01, 9.010763e-01, 8.989977e-01, 8.969203e-01, & ! - 8.948423e-01, 8.927620e-01, 8.906778e-01, 8.885879e-01, 8.864907e-01, & ! - 8.843843e-01, & ! - 9.934014e-01, 9.899331e-01, 9.865537e-01, 9.832610e-01, 9.800523e-01, & ! 6 - 9.769254e-01, 9.738777e-01, 9.709069e-01, 9.680106e-01, 9.651862e-01, & ! - 9.624315e-01, 9.597439e-01, 9.571212e-01, 9.545608e-01, 9.520605e-01, & ! - 9.496177e-01, 9.472301e-01, 9.448954e-01, 9.426111e-01, 9.403749e-01, & ! - 9.381843e-01, 9.360370e-01, 9.339307e-01, 9.318629e-01, 9.298313e-01, & ! - 9.278336e-01, 9.258673e-01, 9.239302e-01, 9.220198e-01, 9.201338e-01, & ! - 9.182700e-01, 9.164258e-01, 9.145991e-01, 9.127874e-01, 9.109884e-01, & ! - 9.091999e-01, 9.074194e-01, 9.056447e-01, 9.038735e-01, 9.021033e-01, & ! - 9.003320e-01, 8.985572e-01, 8.967766e-01, 8.949879e-01, 8.931888e-01, & ! - 8.913770e-01, & ! - 9.994833e-01, 9.992055e-01, 9.989278e-01, 9.986500e-01, 9.983724e-01, & ! 7 - 9.980947e-01, 9.978172e-01, 9.975397e-01, 9.972623e-01, 9.969849e-01, & ! - 9.967077e-01, 9.964305e-01, 9.961535e-01, 9.958765e-01, 9.955997e-01, & ! - 9.953230e-01, 9.950464e-01, 9.947699e-01, 9.944936e-01, 9.942174e-01, & ! - 9.939414e-01, 9.936656e-01, 9.933899e-01, 9.931144e-01, 9.928390e-01, & ! - 9.925639e-01, 9.922889e-01, 9.920141e-01, 9.917396e-01, 9.914652e-01, & ! - 9.911911e-01, 9.909171e-01, 9.906434e-01, 9.903700e-01, 9.900967e-01, & ! - 9.898237e-01, 9.895510e-01, 9.892784e-01, 9.890062e-01, 9.887342e-01, & ! - 9.884625e-01, 9.881911e-01, 9.879199e-01, 9.876490e-01, 9.873784e-01, & ! - 9.871081e-01, & ! - 9.999343e-01, 9.998917e-01, 9.998492e-01, 9.998067e-01, 9.997642e-01, & ! 8 - 9.997218e-01, 9.996795e-01, 9.996372e-01, 9.995949e-01, 9.995528e-01, & ! - 9.995106e-01, 9.994686e-01, 9.994265e-01, 9.993845e-01, 9.993426e-01, & ! - 9.993007e-01, 9.992589e-01, 9.992171e-01, 9.991754e-01, 9.991337e-01, & ! - 9.990921e-01, 9.990505e-01, 9.990089e-01, 9.989674e-01, 9.989260e-01, & ! - 9.988846e-01, 9.988432e-01, 9.988019e-01, 9.987606e-01, 9.987194e-01, & ! - 9.986782e-01, 9.986370e-01, 9.985959e-01, 9.985549e-01, 9.985139e-01, & ! - 9.984729e-01, 9.984319e-01, 9.983910e-01, 9.983502e-01, 9.983094e-01, & ! - 9.982686e-01, 9.982279e-01, 9.981872e-01, 9.981465e-01, 9.981059e-01, & ! - 9.980653e-01, & ! - 9.999978e-01, 9.999965e-01, 9.999952e-01, 9.999939e-01, 9.999926e-01, & ! 9 - 9.999913e-01, 9.999900e-01, 9.999887e-01, 9.999873e-01, 9.999860e-01, & ! - 9.999847e-01, 9.999834e-01, 9.999821e-01, 9.999808e-01, 9.999795e-01, & ! - 9.999782e-01, 9.999769e-01, 9.999756e-01, 9.999743e-01, 9.999730e-01, & ! - 9.999717e-01, 9.999704e-01, 9.999691e-01, 9.999678e-01, 9.999665e-01, & ! - 9.999652e-01, 9.999639e-01, 9.999626e-01, 9.999613e-01, 9.999600e-01, & ! - 9.999587e-01, 9.999574e-01, 9.999561e-01, 9.999548e-01, 9.999535e-01, & ! - 9.999522e-01, 9.999509e-01, 9.999496e-01, 9.999483e-01, 9.999470e-01, & ! - 9.999457e-01, 9.999444e-01, 9.999431e-01, 9.999418e-01, 9.999405e-01, & ! - 9.999392e-01, & ! - 9.999994e-01, 9.999993e-01, 9.999991e-01, 9.999990e-01, 9.999989e-01, & ! 10 - 9.999987e-01, 9.999986e-01, 9.999984e-01, 9.999983e-01, 9.999982e-01, & ! - 9.999980e-01, 9.999979e-01, 9.999977e-01, 9.999976e-01, 9.999975e-01, & ! - 9.999973e-01, 9.999972e-01, 9.999970e-01, 9.999969e-01, 9.999967e-01, & ! - 9.999966e-01, 9.999965e-01, 9.999963e-01, 9.999962e-01, 9.999960e-01, & ! - 9.999959e-01, 9.999957e-01, 9.999956e-01, 9.999954e-01, 9.999953e-01, & ! - 9.999952e-01, 9.999950e-01, 9.999949e-01, 9.999947e-01, 9.999946e-01, & ! - 9.999944e-01, 9.999943e-01, 9.999941e-01, 9.999940e-01, 9.999939e-01, & ! - 9.999937e-01, 9.999936e-01, 9.999934e-01, 9.999933e-01, 9.999931e-01, & ! - 9.999930e-01, & ! - 9.999997e-01, 9.999995e-01, 9.999992e-01, 9.999990e-01, 9.999987e-01, & ! 11 - 9.999985e-01, 9.999983e-01, 9.999980e-01, 9.999978e-01, 9.999976e-01, & ! - 9.999973e-01, 9.999971e-01, 9.999969e-01, 9.999967e-01, 9.999965e-01, & ! - 9.999963e-01, 9.999960e-01, 9.999958e-01, 9.999956e-01, 9.999954e-01, & ! - 9.999952e-01, 9.999950e-01, 9.999948e-01, 9.999946e-01, 9.999944e-01, & ! - 9.999942e-01, 9.999939e-01, 9.999937e-01, 9.999935e-01, 9.999933e-01, & ! - 9.999931e-01, 9.999929e-01, 9.999927e-01, 9.999925e-01, 9.999923e-01, & ! - 9.999920e-01, 9.999918e-01, 9.999916e-01, 9.999914e-01, 9.999911e-01, & ! - 9.999909e-01, 9.999907e-01, 9.999905e-01, 9.999902e-01, 9.999900e-01, & ! - 9.999897e-01, & ! - 9.999991e-01, 9.999985e-01, 9.999980e-01, 9.999974e-01, 9.999968e-01, & ! 12 - 9.999963e-01, 9.999957e-01, 9.999951e-01, 9.999946e-01, 9.999940e-01, & ! - 9.999934e-01, 9.999929e-01, 9.999923e-01, 9.999918e-01, 9.999912e-01, & ! - 9.999907e-01, 9.999901e-01, 9.999896e-01, 9.999891e-01, 9.999885e-01, & ! - 9.999880e-01, 9.999874e-01, 9.999869e-01, 9.999863e-01, 9.999858e-01, & ! - 9.999853e-01, 9.999847e-01, 9.999842e-01, 9.999836e-01, 9.999831e-01, & ! - 9.999826e-01, 9.999820e-01, 9.999815e-01, 9.999809e-01, 9.999804e-01, & ! - 9.999798e-01, 9.999793e-01, 9.999787e-01, 9.999782e-01, 9.999776e-01, & ! - 9.999770e-01, 9.999765e-01, 9.999759e-01, 9.999754e-01, 9.999748e-01, & ! - 9.999742e-01, & ! - 9.999975e-01, 9.999961e-01, 9.999946e-01, 9.999931e-01, 9.999917e-01, & ! 13 - 9.999903e-01, 9.999888e-01, 9.999874e-01, 9.999859e-01, 9.999845e-01, & ! - 9.999831e-01, 9.999816e-01, 9.999802e-01, 9.999788e-01, 9.999774e-01, & ! - 9.999759e-01, 9.999745e-01, 9.999731e-01, 9.999717e-01, 9.999702e-01, & ! - 9.999688e-01, 9.999674e-01, 9.999660e-01, 9.999646e-01, 9.999631e-01, & ! - 9.999617e-01, 9.999603e-01, 9.999589e-01, 9.999574e-01, 9.999560e-01, & ! - 9.999546e-01, 9.999532e-01, 9.999517e-01, 9.999503e-01, 9.999489e-01, & ! - 9.999474e-01, 9.999460e-01, 9.999446e-01, 9.999431e-01, 9.999417e-01, & ! - 9.999403e-01, 9.999388e-01, 9.999374e-01, 9.999359e-01, 9.999345e-01, & ! - 9.999330e-01, & ! - 4.526500e-01, 5.287890e-01, 5.410487e-01, 5.459865e-01, 5.485149e-01, & ! 14 - 5.498914e-01, 5.505895e-01, 5.508310e-01, 5.507364e-01, 5.503793e-01, & ! - 5.498090e-01, 5.490612e-01, 5.481637e-01, 5.471395e-01, 5.460083e-01, & ! - 5.447878e-01, 5.434946e-01, 5.421442e-01, 5.407514e-01, 5.393309e-01, & ! - 5.378970e-01, 5.364641e-01, 5.350464e-01, 5.336582e-01, 5.323140e-01, & ! - 5.310283e-01, 5.298158e-01, 5.286914e-01, 5.276704e-01, 5.267680e-01, & ! - 5.260000e-01, 5.253823e-01, 5.249311e-01, 5.246629e-01, 5.245946e-01, & ! - 5.247434e-01, 5.251268e-01, 5.257626e-01, 5.266693e-01, 5.278653e-01, & ! - 5.293698e-01, 5.312022e-01, 5.333823e-01, 5.359305e-01, 5.388676e-01, & ! - 5.422146e-01/), & ! - shape = (/46,nBandsSW_RRTMG/)) - - real(kind_phys),dimension(46,nBandsSW_RRTMG),parameter :: & ! - asyice3 = reshape(source= (/ & ! - 8.340752e-01, 8.435170e-01, 8.517487e-01, 8.592064e-01, 8.660387e-01, & ! 1 - 8.723204e-01, 8.780997e-01, 8.834137e-01, 8.882934e-01, 8.927662e-01, & ! - 8.968577e-01, 9.005914e-01, 9.039899e-01, 9.070745e-01, 9.098659e-01, & ! - 9.123836e-01, 9.146466e-01, 9.166734e-01, 9.184817e-01, 9.200886e-01, & ! - 9.215109e-01, 9.227648e-01, 9.238661e-01, 9.248304e-01, 9.256727e-01, & ! - 9.264078e-01, 9.270505e-01, 9.276150e-01, 9.281156e-01, 9.285662e-01, & ! - 9.289806e-01, 9.293726e-01, 9.297557e-01, 9.301435e-01, 9.305491e-01, & ! - 9.309859e-01, 9.314671e-01, 9.320055e-01, 9.326140e-01, 9.333053e-01, & ! - 9.340919e-01, 9.349861e-01, 9.360000e-01, 9.371451e-01, 9.384329e-01, & ! - 9.398744e-01, & ! - 8.728160e-01, 8.777333e-01, 8.823754e-01, 8.867535e-01, 8.908785e-01, & ! 2 - 8.947611e-01, 8.984118e-01, 9.018408e-01, 9.050582e-01, 9.080739e-01, & ! - 9.108976e-01, 9.135388e-01, 9.160068e-01, 9.183106e-01, 9.204595e-01, & ! - 9.224620e-01, 9.243271e-01, 9.260632e-01, 9.276788e-01, 9.291822e-01, & ! - 9.305817e-01, 9.318853e-01, 9.331012e-01, 9.342372e-01, 9.353013e-01, & ! - 9.363013e-01, 9.372450e-01, 9.381400e-01, 9.389939e-01, 9.398145e-01, & ! - 9.406092e-01, 9.413856e-01, 9.421511e-01, 9.429131e-01, 9.436790e-01, & ! - 9.444561e-01, 9.452517e-01, 9.460729e-01, 9.469270e-01, 9.478209e-01, & ! - 9.487617e-01, 9.497562e-01, 9.508112e-01, 9.519335e-01, 9.531294e-01, & ! - 9.544055e-01, & ! - 7.897566e-01, 7.948704e-01, 7.998041e-01, 8.045623e-01, 8.091495e-01, & ! 3 - 8.135702e-01, 8.178290e-01, 8.219305e-01, 8.258790e-01, 8.296792e-01, & ! - 8.333355e-01, 8.368524e-01, 8.402343e-01, 8.434856e-01, 8.466108e-01, & ! - 8.496143e-01, 8.525004e-01, 8.552737e-01, 8.579384e-01, 8.604990e-01, & ! - 8.629597e-01, 8.653250e-01, 8.675992e-01, 8.697867e-01, 8.718916e-01, & ! - 8.739185e-01, 8.758715e-01, 8.777551e-01, 8.795734e-01, 8.813308e-01, & ! - 8.830315e-01, 8.846799e-01, 8.862802e-01, 8.878366e-01, 8.893534e-01, & ! - 8.908350e-01, 8.922854e-01, 8.937090e-01, 8.951099e-01, 8.964925e-01, & ! - 8.978609e-01, 8.992192e-01, 9.005718e-01, 9.019229e-01, 9.032765e-01, & ! - 9.046369e-01, & ! - 7.812615e-01, 7.887764e-01, 7.959664e-01, 8.028413e-01, 8.094109e-01, & ! 4 - 8.156849e-01, 8.216730e-01, 8.273846e-01, 8.328294e-01, 8.380166e-01, & ! - 8.429556e-01, 8.476556e-01, 8.521258e-01, 8.563753e-01, 8.604131e-01, & ! - 8.642481e-01, 8.678893e-01, 8.713455e-01, 8.746254e-01, 8.777378e-01, & ! - 8.806914e-01, 8.834948e-01, 8.861566e-01, 8.886854e-01, 8.910897e-01, & ! - 8.933779e-01, 8.955586e-01, 8.976402e-01, 8.996311e-01, 9.015398e-01, & ! - 9.033745e-01, 9.051436e-01, 9.068555e-01, 9.085185e-01, 9.101410e-01, & ! - 9.117311e-01, 9.132972e-01, 9.148476e-01, 9.163905e-01, 9.179340e-01, & ! - 9.194864e-01, 9.210559e-01, 9.226505e-01, 9.242784e-01, 9.259476e-01, & ! - 9.276661e-01, & ! - 7.640720e-01, 7.691119e-01, 7.739941e-01, 7.787222e-01, 7.832998e-01, & ! 5 - 7.877304e-01, 7.920177e-01, 7.961652e-01, 8.001765e-01, 8.040551e-01, & ! - 8.078044e-01, 8.114280e-01, 8.149294e-01, 8.183119e-01, 8.215791e-01, & ! - 8.247344e-01, 8.277812e-01, 8.307229e-01, 8.335629e-01, 8.363046e-01, & ! - 8.389514e-01, 8.415067e-01, 8.439738e-01, 8.463560e-01, 8.486568e-01, & ! - 8.508795e-01, 8.530274e-01, 8.551039e-01, 8.571122e-01, 8.590558e-01, & ! - 8.609378e-01, 8.627618e-01, 8.645309e-01, 8.662485e-01, 8.679178e-01, & ! - 8.695423e-01, 8.711251e-01, 8.726697e-01, 8.741792e-01, 8.756571e-01, & ! - 8.771065e-01, 8.785307e-01, 8.799331e-01, 8.813169e-01, 8.826854e-01, & ! - 8.840419e-01, & ! - 7.602598e-01, 7.651572e-01, 7.699014e-01, 7.744962e-01, 7.789452e-01, & ! 6 - 7.832522e-01, 7.874205e-01, 7.914538e-01, 7.953555e-01, 7.991290e-01, & ! - 8.027777e-01, 8.063049e-01, 8.097140e-01, 8.130081e-01, 8.161906e-01, & ! - 8.192645e-01, 8.222331e-01, 8.250993e-01, 8.278664e-01, 8.305374e-01, & ! - 8.331153e-01, 8.356030e-01, 8.380037e-01, 8.403201e-01, 8.425553e-01, & ! - 8.447121e-01, 8.467935e-01, 8.488022e-01, 8.507412e-01, 8.526132e-01, & ! - 8.544210e-01, 8.561675e-01, 8.578554e-01, 8.594875e-01, 8.610665e-01, & ! - 8.625951e-01, 8.640760e-01, 8.655119e-01, 8.669055e-01, 8.682594e-01, & ! - 8.695763e-01, 8.708587e-01, 8.721094e-01, 8.733308e-01, 8.745255e-01, & ! - 8.756961e-01, & ! - 7.568957e-01, 7.606995e-01, 7.644072e-01, 7.680204e-01, 7.715402e-01, & ! 7 - 7.749682e-01, 7.783057e-01, 7.815541e-01, 7.847148e-01, 7.877892e-01, & ! - 7.907786e-01, 7.936846e-01, 7.965084e-01, 7.992515e-01, 8.019153e-01, & ! - 8.045011e-01, 8.070103e-01, 8.094444e-01, 8.118048e-01, 8.140927e-01, & ! - 8.163097e-01, 8.184571e-01, 8.205364e-01, 8.225488e-01, 8.244958e-01, & ! - 8.263789e-01, 8.281993e-01, 8.299586e-01, 8.316580e-01, 8.332991e-01, & ! - 8.348831e-01, 8.364115e-01, 8.378857e-01, 8.393071e-01, 8.406770e-01, & ! - 8.419969e-01, 8.432682e-01, 8.444923e-01, 8.456706e-01, 8.468044e-01, & ! - 8.478952e-01, 8.489444e-01, 8.499533e-01, 8.509234e-01, 8.518561e-01, & ! - 8.527528e-01, & ! - 7.575066e-01, 7.606912e-01, 7.638236e-01, 7.669035e-01, 7.699306e-01, & ! 8 - 7.729046e-01, 7.758254e-01, 7.786926e-01, 7.815060e-01, 7.842654e-01, & ! - 7.869705e-01, 7.896211e-01, 7.922168e-01, 7.947574e-01, 7.972428e-01, & ! - 7.996726e-01, 8.020466e-01, 8.043646e-01, 8.066262e-01, 8.088313e-01, & ! - 8.109796e-01, 8.130709e-01, 8.151049e-01, 8.170814e-01, 8.190001e-01, & ! - 8.208608e-01, 8.226632e-01, 8.244071e-01, 8.260924e-01, 8.277186e-01, & ! - 8.292856e-01, 8.307932e-01, 8.322411e-01, 8.336291e-01, 8.349570e-01, & ! - 8.362244e-01, 8.374312e-01, 8.385772e-01, 8.396621e-01, 8.406856e-01, & ! - 8.416476e-01, 8.425479e-01, 8.433861e-01, 8.441620e-01, 8.448755e-01, & ! - 8.455263e-01, & ! - 7.568829e-01, 7.597947e-01, 7.626745e-01, 7.655212e-01, 7.683337e-01, & ! 9 - 7.711111e-01, 7.738523e-01, 7.765565e-01, 7.792225e-01, 7.818494e-01, & ! - 7.844362e-01, 7.869819e-01, 7.894854e-01, 7.919459e-01, 7.943623e-01, & ! - 7.967337e-01, 7.990590e-01, 8.013373e-01, 8.035676e-01, 8.057488e-01, & ! - 8.078802e-01, 8.099605e-01, 8.119890e-01, 8.139645e-01, 8.158862e-01, & ! - 8.177530e-01, 8.195641e-01, 8.213183e-01, 8.230149e-01, 8.246527e-01, & ! - 8.262308e-01, 8.277483e-01, 8.292042e-01, 8.305976e-01, 8.319275e-01, & ! - 8.331929e-01, 8.343929e-01, 8.355265e-01, 8.365928e-01, 8.375909e-01, & ! - 8.385197e-01, 8.393784e-01, 8.401659e-01, 8.408815e-01, 8.415240e-01, & ! - 8.420926e-01, & ! - 7.548616e-01, 7.575454e-01, 7.602153e-01, 7.628696e-01, 7.655067e-01, & ! 10 - 7.681249e-01, 7.707225e-01, 7.732978e-01, 7.758492e-01, 7.783750e-01, & ! - 7.808735e-01, 7.833430e-01, 7.857819e-01, 7.881886e-01, 7.905612e-01, & ! - 7.928983e-01, 7.951980e-01, 7.974588e-01, 7.996789e-01, 8.018567e-01, & ! - 8.039905e-01, 8.060787e-01, 8.081196e-01, 8.101115e-01, 8.120527e-01, & ! - 8.139416e-01, 8.157764e-01, 8.175557e-01, 8.192776e-01, 8.209405e-01, & ! - 8.225427e-01, 8.240826e-01, 8.255585e-01, 8.269688e-01, 8.283117e-01, & ! - 8.295856e-01, 8.307889e-01, 8.319198e-01, 8.329767e-01, 8.339579e-01, & ! - 8.348619e-01, 8.356868e-01, 8.364311e-01, 8.370930e-01, 8.376710e-01, & ! - 8.381633e-01, & ! - 7.491854e-01, 7.518523e-01, 7.545089e-01, 7.571534e-01, 7.597839e-01, & ! 11 - 7.623987e-01, 7.649959e-01, 7.675737e-01, 7.701303e-01, 7.726639e-01, & ! - 7.751727e-01, 7.776548e-01, 7.801084e-01, 7.825318e-01, 7.849230e-01, & ! - 7.872804e-01, 7.896020e-01, 7.918862e-01, 7.941309e-01, 7.963345e-01, & ! - 7.984951e-01, 8.006109e-01, 8.026802e-01, 8.047009e-01, 8.066715e-01, & ! - 8.085900e-01, 8.104546e-01, 8.122636e-01, 8.140150e-01, 8.157072e-01, & ! - 8.173382e-01, 8.189063e-01, 8.204096e-01, 8.218464e-01, 8.232148e-01, & ! - 8.245130e-01, 8.257391e-01, 8.268915e-01, 8.279682e-01, 8.289675e-01, & ! - 8.298875e-01, 8.307264e-01, 8.314824e-01, 8.321537e-01, 8.327385e-01, & ! - 8.332350e-01, & ! - 7.397086e-01, 7.424069e-01, 7.450955e-01, 7.477725e-01, 7.504362e-01, & ! 12 - 7.530846e-01, 7.557159e-01, 7.583283e-01, 7.609199e-01, 7.634888e-01, & ! - 7.660332e-01, 7.685512e-01, 7.710411e-01, 7.735009e-01, 7.759288e-01, & ! - 7.783229e-01, 7.806814e-01, 7.830024e-01, 7.852841e-01, 7.875246e-01, & ! - 7.897221e-01, 7.918748e-01, 7.939807e-01, 7.960380e-01, 7.980449e-01, & ! - 7.999995e-01, 8.019000e-01, 8.037445e-01, 8.055311e-01, 8.072581e-01, & ! - 8.089235e-01, 8.105255e-01, 8.120623e-01, 8.135319e-01, 8.149326e-01, & ! - 8.162626e-01, 8.175198e-01, 8.187025e-01, 8.198089e-01, 8.208371e-01, & ! - 8.217852e-01, 8.226514e-01, 8.234338e-01, 8.241306e-01, 8.247399e-01, & ! - 8.252599e-01, & ! - 7.224533e-01, 7.251681e-01, 7.278728e-01, 7.305654e-01, 7.332444e-01, & ! 13 - 7.359078e-01, 7.385539e-01, 7.411808e-01, 7.437869e-01, 7.463702e-01, & ! - 7.489291e-01, 7.514616e-01, 7.539661e-01, 7.564408e-01, 7.588837e-01, & ! - 7.612933e-01, 7.636676e-01, 7.660049e-01, 7.683034e-01, 7.705612e-01, & ! - 7.727767e-01, 7.749480e-01, 7.770733e-01, 7.791509e-01, 7.811789e-01, & ! - 7.831556e-01, 7.850791e-01, 7.869478e-01, 7.887597e-01, 7.905131e-01, & ! - 7.922062e-01, 7.938372e-01, 7.954044e-01, 7.969059e-01, 7.983399e-01, & ! - 7.997047e-01, 8.009985e-01, 8.022195e-01, 8.033658e-01, 8.044357e-01, & ! - 8.054275e-01, 8.063392e-01, 8.071692e-01, 8.079157e-01, 8.085768e-01, & ! - 8.091507e-01, & ! - 8.850026e-01, 9.005489e-01, 9.069242e-01, 9.121799e-01, 9.168987e-01, & ! 14 - 9.212259e-01, 9.252176e-01, 9.289028e-01, 9.323000e-01, 9.354235e-01, & ! - 9.382858e-01, 9.408985e-01, 9.432734e-01, 9.454218e-01, 9.473557e-01, & ! - 9.490871e-01, 9.506282e-01, 9.519917e-01, 9.531904e-01, 9.542374e-01, & ! - 9.551461e-01, 9.559298e-01, 9.566023e-01, 9.571775e-01, 9.576692e-01, & ! - 9.580916e-01, 9.584589e-01, 9.587853e-01, 9.590851e-01, 9.593729e-01, & ! - 9.596632e-01, 9.599705e-01, 9.603096e-01, 9.606954e-01, 9.611427e-01, & ! - 9.616667e-01, 9.622826e-01, 9.630060e-01, 9.638524e-01, 9.648379e-01, & ! - 9.659788e-01, 9.672916e-01, 9.687933e-01, 9.705014e-01, 9.724337e-01, & ! - 9.746084e-01/), & ! - shape = (/46,nBandsSW_RRTMG/)) - - real(kind_phys),dimension(46,nBandsSW_RRTMG),parameter :: & ! - fdlice3 = reshape(source= (/ & ! - 4.959277e-02, 4.685292e-02, 4.426104e-02, 4.181231e-02, 3.950191e-02, & ! - 3.732500e-02, 3.527675e-02, 3.335235e-02, 3.154697e-02, 2.985578e-02, & ! - 2.827395e-02, 2.679666e-02, 2.541909e-02, 2.413640e-02, 2.294378e-02, & ! - 2.183639e-02, 2.080940e-02, 1.985801e-02, 1.897736e-02, 1.816265e-02, & ! - 1.740905e-02, 1.671172e-02, 1.606585e-02, 1.546661e-02, 1.490917e-02, & ! - 1.438870e-02, 1.390038e-02, 1.343939e-02, 1.300089e-02, 1.258006e-02, & ! - 1.217208e-02, 1.177212e-02, 1.137536e-02, 1.097696e-02, 1.057210e-02, & ! - 1.015596e-02, 9.723704e-03, 9.270516e-03, 8.791565e-03, 8.282026e-03, & ! - 7.737072e-03, 7.151879e-03, 6.521619e-03, 5.841467e-03, 5.106597e-03, & ! - 4.312183e-03, & ! - 5.071224e-02, 5.000217e-02, 4.933872e-02, 4.871992e-02, 4.814380e-02, & ! - 4.760839e-02, 4.711170e-02, 4.665177e-02, 4.622662e-02, 4.583426e-02, & ! - 4.547274e-02, 4.514007e-02, 4.483428e-02, 4.455340e-02, 4.429544e-02, & ! - 4.405844e-02, 4.384041e-02, 4.363939e-02, 4.345340e-02, 4.328047e-02, & ! - 4.311861e-02, 4.296586e-02, 4.282024e-02, 4.267977e-02, 4.254248e-02, & ! - 4.240640e-02, 4.226955e-02, 4.212995e-02, 4.198564e-02, 4.183462e-02, & ! - 4.167494e-02, 4.150462e-02, 4.132167e-02, 4.112413e-02, 4.091003e-02, & ! - 4.067737e-02, 4.042420e-02, 4.014854e-02, 3.984840e-02, 3.952183e-02, & ! - 3.916683e-02, 3.878144e-02, 3.836368e-02, 3.791158e-02, 3.742316e-02, & ! - 3.689645e-02, & ! - 1.062938e-01, 1.065234e-01, 1.067822e-01, 1.070682e-01, 1.073793e-01, & ! - 1.077137e-01, 1.080693e-01, 1.084442e-01, 1.088364e-01, 1.092439e-01, & ! - 1.096647e-01, 1.100970e-01, 1.105387e-01, 1.109878e-01, 1.114423e-01, & ! - 1.119004e-01, 1.123599e-01, 1.128190e-01, 1.132757e-01, 1.137279e-01, & ! - 1.141738e-01, 1.146113e-01, 1.150385e-01, 1.154534e-01, 1.158540e-01, & ! - 1.162383e-01, 1.166045e-01, 1.169504e-01, 1.172741e-01, 1.175738e-01, & ! - 1.178472e-01, 1.180926e-01, 1.183080e-01, 1.184913e-01, 1.186405e-01, & ! - 1.187538e-01, 1.188291e-01, 1.188645e-01, 1.188580e-01, 1.188076e-01, & ! - 1.187113e-01, 1.185672e-01, 1.183733e-01, 1.181277e-01, 1.178282e-01, & ! - 1.174731e-01, & ! - 1.076195e-01, 1.065195e-01, 1.054696e-01, 1.044673e-01, 1.035099e-01, & ! - 1.025951e-01, 1.017203e-01, 1.008831e-01, 1.000808e-01, 9.931116e-02, & ! - 9.857151e-02, 9.785939e-02, 9.717230e-02, 9.650774e-02, 9.586322e-02, & ! - 9.523623e-02, 9.462427e-02, 9.402484e-02, 9.343544e-02, 9.285358e-02, & ! - 9.227675e-02, 9.170245e-02, 9.112818e-02, 9.055144e-02, 8.996974e-02, & ! - 8.938056e-02, 8.878142e-02, 8.816981e-02, 8.754323e-02, 8.689919e-02, & ! - 8.623517e-02, 8.554869e-02, 8.483724e-02, 8.409832e-02, 8.332943e-02, & ! - 8.252807e-02, 8.169175e-02, 8.081795e-02, 7.990419e-02, 7.894796e-02, & ! - 7.794676e-02, 7.689809e-02, 7.579945e-02, 7.464834e-02, 7.344227e-02, & ! - 7.217872e-02, & ! - 1.119014e-01, 1.122706e-01, 1.126690e-01, 1.130947e-01, 1.135456e-01, & ! - 1.140199e-01, 1.145154e-01, 1.150302e-01, 1.155623e-01, 1.161096e-01, & ! - 1.166703e-01, 1.172422e-01, 1.178233e-01, 1.184118e-01, 1.190055e-01, & ! - 1.196025e-01, 1.202008e-01, 1.207983e-01, 1.213931e-01, 1.219832e-01, & ! - 1.225665e-01, 1.231411e-01, 1.237050e-01, 1.242561e-01, 1.247926e-01, & ! - 1.253122e-01, 1.258132e-01, 1.262934e-01, 1.267509e-01, 1.271836e-01, & ! - 1.275896e-01, 1.279669e-01, 1.283134e-01, 1.286272e-01, 1.289063e-01, & ! - 1.291486e-01, 1.293522e-01, 1.295150e-01, 1.296351e-01, 1.297104e-01, & ! - 1.297390e-01, 1.297189e-01, 1.296480e-01, 1.295244e-01, 1.293460e-01, & ! - 1.291109e-01, & ! - 1.133298e-01, 1.136777e-01, 1.140556e-01, 1.144615e-01, 1.148934e-01, & ! - 1.153492e-01, 1.158269e-01, 1.163243e-01, 1.168396e-01, 1.173706e-01, & ! - 1.179152e-01, 1.184715e-01, 1.190374e-01, 1.196108e-01, 1.201897e-01, & ! - 1.207720e-01, 1.213558e-01, 1.219389e-01, 1.225194e-01, 1.230951e-01, & ! - 1.236640e-01, 1.242241e-01, 1.247733e-01, 1.253096e-01, 1.258309e-01, & ! - 1.263352e-01, 1.268205e-01, 1.272847e-01, 1.277257e-01, 1.281415e-01, & ! - 1.285300e-01, 1.288893e-01, 1.292173e-01, 1.295118e-01, 1.297710e-01, & ! - 1.299927e-01, 1.301748e-01, 1.303154e-01, 1.304124e-01, 1.304637e-01, & ! - 1.304673e-01, 1.304212e-01, 1.303233e-01, 1.301715e-01, 1.299638e-01, & ! - 1.296983e-01, & ! - 1.145360e-01, 1.153256e-01, 1.161453e-01, 1.169929e-01, 1.178666e-01, & ! - 1.187641e-01, 1.196835e-01, 1.206227e-01, 1.215796e-01, 1.225522e-01, & ! - 1.235383e-01, 1.245361e-01, 1.255433e-01, 1.265579e-01, 1.275779e-01, & ! - 1.286011e-01, 1.296257e-01, 1.306494e-01, 1.316703e-01, 1.326862e-01, & ! - 1.336951e-01, 1.346950e-01, 1.356838e-01, 1.366594e-01, 1.376198e-01, & ! - 1.385629e-01, 1.394866e-01, 1.403889e-01, 1.412678e-01, 1.421212e-01, & ! - 1.429469e-01, 1.437430e-01, 1.445074e-01, 1.452381e-01, 1.459329e-01, & ! - 1.465899e-01, 1.472069e-01, 1.477819e-01, 1.483128e-01, 1.487976e-01, & ! - 1.492343e-01, 1.496207e-01, 1.499548e-01, 1.502346e-01, 1.504579e-01, & ! - 1.506227e-01, & ! - 1.153263e-01, 1.161445e-01, 1.169932e-01, 1.178703e-01, 1.187738e-01, & ! - 1.197016e-01, 1.206516e-01, 1.216217e-01, 1.226099e-01, 1.236141e-01, & ! - 1.246322e-01, 1.256621e-01, 1.267017e-01, 1.277491e-01, 1.288020e-01, & ! - 1.298584e-01, 1.309163e-01, 1.319736e-01, 1.330281e-01, 1.340778e-01, & ! - 1.351207e-01, 1.361546e-01, 1.371775e-01, 1.381873e-01, 1.391820e-01, & ! - 1.401593e-01, 1.411174e-01, 1.420540e-01, 1.429671e-01, 1.438547e-01, & ! - 1.447146e-01, 1.455449e-01, 1.463433e-01, 1.471078e-01, 1.478364e-01, & ! - 1.485270e-01, 1.491774e-01, 1.497857e-01, 1.503497e-01, 1.508674e-01, & ! - 1.513367e-01, 1.517554e-01, 1.521216e-01, 1.524332e-01, 1.526880e-01, & ! - 1.528840e-01, & ! - 1.160842e-01, 1.169118e-01, 1.177697e-01, 1.186556e-01, 1.195676e-01, & ! - 1.205036e-01, 1.214616e-01, 1.224394e-01, 1.234349e-01, 1.244463e-01, & ! - 1.254712e-01, 1.265078e-01, 1.275539e-01, 1.286075e-01, 1.296664e-01, & ! - 1.307287e-01, 1.317923e-01, 1.328550e-01, 1.339149e-01, 1.349699e-01, & ! - 1.360179e-01, 1.370567e-01, 1.380845e-01, 1.390991e-01, 1.400984e-01, & ! - 1.410803e-01, 1.420429e-01, 1.429840e-01, 1.439016e-01, 1.447936e-01, & ! - 1.456579e-01, 1.464925e-01, 1.472953e-01, 1.480642e-01, 1.487972e-01, & ! - 1.494923e-01, 1.501472e-01, 1.507601e-01, 1.513287e-01, 1.518511e-01, & ! - 1.523252e-01, 1.527489e-01, 1.531201e-01, 1.534368e-01, 1.536969e-01, & ! - 1.538984e-01, & ! - 1.168725e-01, 1.177088e-01, 1.185747e-01, 1.194680e-01, 1.203867e-01, & ! - 1.213288e-01, 1.222923e-01, 1.232750e-01, 1.242750e-01, 1.252903e-01, & ! - 1.263187e-01, 1.273583e-01, 1.284069e-01, 1.294626e-01, 1.305233e-01, & ! - 1.315870e-01, 1.326517e-01, 1.337152e-01, 1.347756e-01, 1.358308e-01, & ! - 1.368788e-01, 1.379175e-01, 1.389449e-01, 1.399590e-01, 1.409577e-01, & ! - 1.419389e-01, 1.429007e-01, 1.438410e-01, 1.447577e-01, 1.456488e-01, & ! - 1.465123e-01, 1.473461e-01, 1.481483e-01, 1.489166e-01, 1.496492e-01, & ! - 1.503439e-01, 1.509988e-01, 1.516118e-01, 1.521808e-01, 1.527038e-01, & ! - 1.531788e-01, 1.536037e-01, 1.539764e-01, 1.542951e-01, 1.545575e-01, & ! - 1.547617e-01, & ! - 1.180509e-01, 1.189025e-01, 1.197820e-01, 1.206875e-01, 1.216171e-01, & ! - 1.225687e-01, 1.235404e-01, 1.245303e-01, 1.255363e-01, 1.265564e-01, & ! - 1.275888e-01, 1.286313e-01, 1.296821e-01, 1.307392e-01, 1.318006e-01, & ! - 1.328643e-01, 1.339284e-01, 1.349908e-01, 1.360497e-01, 1.371029e-01, & ! - 1.381486e-01, 1.391848e-01, 1.402095e-01, 1.412208e-01, 1.422165e-01, & ! - 1.431949e-01, 1.441539e-01, 1.450915e-01, 1.460058e-01, 1.468947e-01, & ! - 1.477564e-01, 1.485888e-01, 1.493900e-01, 1.501580e-01, 1.508907e-01, & ! - 1.515864e-01, 1.522428e-01, 1.528582e-01, 1.534305e-01, 1.539578e-01, & ! - 1.544380e-01, 1.548692e-01, 1.552494e-01, 1.555767e-01, 1.558490e-01, & ! - 1.560645e-01, & ! - 1.200480e-01, 1.209267e-01, 1.218304e-01, 1.227575e-01, 1.237059e-01, & ! - 1.246739e-01, 1.256595e-01, 1.266610e-01, 1.276765e-01, 1.287041e-01, & ! - 1.297420e-01, 1.307883e-01, 1.318412e-01, 1.328988e-01, 1.339593e-01, & ! - 1.350207e-01, 1.360813e-01, 1.371393e-01, 1.381926e-01, 1.392396e-01, & ! - 1.402783e-01, 1.413069e-01, 1.423235e-01, 1.433263e-01, 1.443134e-01, & ! - 1.452830e-01, 1.462332e-01, 1.471622e-01, 1.480681e-01, 1.489490e-01, & ! - 1.498032e-01, 1.506286e-01, 1.514236e-01, 1.521863e-01, 1.529147e-01, & ! - 1.536070e-01, 1.542614e-01, 1.548761e-01, 1.554491e-01, 1.559787e-01, & ! - 1.564629e-01, 1.568999e-01, 1.572879e-01, 1.576249e-01, 1.579093e-01, & ! - 1.581390e-01, & ! - 1.247813e-01, 1.256496e-01, 1.265417e-01, 1.274560e-01, 1.283905e-01, & ! - 1.293436e-01, 1.303135e-01, 1.312983e-01, 1.322964e-01, 1.333060e-01, & ! - 1.343252e-01, 1.353523e-01, 1.363855e-01, 1.374231e-01, 1.384632e-01, & ! - 1.395042e-01, 1.405441e-01, 1.415813e-01, 1.426140e-01, 1.436404e-01, & ! - 1.446587e-01, 1.456672e-01, 1.466640e-01, 1.476475e-01, 1.486157e-01, & ! - 1.495671e-01, 1.504997e-01, 1.514117e-01, 1.523016e-01, 1.531673e-01, & ! - 1.540073e-01, 1.548197e-01, 1.556026e-01, 1.563545e-01, 1.570734e-01, & ! - 1.577576e-01, 1.584054e-01, 1.590149e-01, 1.595843e-01, 1.601120e-01, & ! - 1.605962e-01, 1.610349e-01, 1.614266e-01, 1.617693e-01, 1.620614e-01, & ! - 1.623011e-01, & ! - 1.006055e-01, 9.549582e-02, 9.063960e-02, 8.602900e-02, 8.165612e-02, & ! - 7.751308e-02, 7.359199e-02, 6.988496e-02, 6.638412e-02, 6.308156e-02, & ! - 5.996942e-02, 5.703979e-02, 5.428481e-02, 5.169657e-02, 4.926719e-02, & ! - 4.698880e-02, 4.485349e-02, 4.285339e-02, 4.098061e-02, 3.922727e-02, & ! - 3.758547e-02, 3.604733e-02, 3.460497e-02, 3.325051e-02, 3.197604e-02, & ! - 3.077369e-02, 2.963558e-02, 2.855381e-02, 2.752050e-02, 2.652776e-02, & ! - 2.556772e-02, 2.463247e-02, 2.371415e-02, 2.280485e-02, 2.189670e-02, & ! - 2.098180e-02, 2.005228e-02, 1.910024e-02, 1.811781e-02, 1.709709e-02, & ! - 1.603020e-02, 1.490925e-02, 1.372635e-02, 1.247363e-02, 1.114319e-02, & ! - 9.727157e-03/), & ! - shape = (/46,nBandsSW_RRTMG/)) - - - - real(kind_phys),dimension(5) :: & - abari = (/ 3.448e-03,3.448e-03,3.448e-03,3.448e-03,3.448e-03 /), & - bbari = (/ 2.431e+00,2.431e+00,2.431e+00,2.431e+00,2.431e+00 /), & - cbari = (/ 1.000e-05,1.100e-04,1.240e-02,3.779e-02,4.666e-01 /), & - dbari = (/ 0.000e+00,1.405e-05,6.867e-04,1.284e-03,2.050e-05 /), & - ebari = (/ 7.661e-01,7.730e-01,7.865e-01,8.172e-01,9.595e-01 /), & - fbari = (/ 5.851e-04,5.665e-04,7.204e-04,7.463e-04,1.076e-04 /) - - ! ipat is bands index for ebert & curry ice cloud (for iflagice=1) - integer,dimension(nBandsSW_RRTMG),parameter :: & - ipat = (/ 5, 5, 4, 4, 3, 3, 2, 2, 1, 1, 1, 1, 1, 5 /) - +module rrtmgp_sw_cloud_optics + use machine, only: kind_phys + use GFS_typedefs, only: GFS_control_type + use mo_rte_kind, only: wl + use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp + use mo_cloud_optics, only: ty_cloud_optics + use physparam, only: isubcsw, iovrsw + use mo_optical_props, only: ty_optical_props_2str + use mo_cloud_sampling, only: sampled_mask_max_ran, sampled_mask_exp_ran, draw_samples + use mersenne_twister, only: random_setseed, random_number, random_stat + use mo_rrtmg_sw_cloud_optics, only: rrtmg_sw_cloud_optics + use rrtmgp_sw_gas_optics, only: ipsdsw0 + use netcdf + + integer :: nrghice_sw contains + +!! \section arg_table_rrtmgp_sw_cloud_optics_init Argument Table +!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | +!! |----------------|----------------------------------|--------------------------------------------------------------------|-------|------|------------------|-------|--------|----------| +!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | +!! | mpirank | mpi_rank | current MPI rank | index | 0 | integer | | in | F | +!! | mpiroot | mpi_root | master MPI rank | index | 0 | integer | | in | F | +!! | mpicomm | mpi_comm | MPI communicator | index | 0 | integer | | in | F | +!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | +!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! | sw_cloud_props | coefficients_for_sw_cloud_optics | DDT containing spectral information for RRTMGP SW radiation scheme | DDT | 0 | ty_cloud_optics | | out | F | +!! ! ######################################################################################### - ! rrtmgp_sw_cloud_optics + ! SUBROUTINE sw_cloud_optics_init ! ######################################################################################### - subroutine rrtmgp_sw_cloud_optics(ncol, nlay, nBandsSW, cld_lwp, cld_ref_liq, cld_iwp, & - cld_ref_ice, cld_rwp, cld_ref_rain, cld_swp, cld_ref_snow, cld_frac, & - tau_cld, ssa_cld, asy_cld) + subroutine rrtmgp_sw_cloud_optics_init(Model,mpicomm, mpirank, mpiroot, sw_cloud_props, & + errmsg, errflg) + use netcdf +#ifdef MPI + use mpi +#endif + ! Inputs + type(GFS_control_type), intent(in) :: & + Model ! DDT containing model control parameters integer,intent(in) :: & - nBandsSW, & ! Number of spectral bands - ncol, & ! Number of horizontal gridpoints - nlay ! Number of vertical layers - real(kind_phys), dimension(ncol,nlay), intent(in) :: & - cld_frac, & ! Cloud-fraction (1) - cld_lwp, & ! Cloud liquid water path (g/m2) - cld_ref_liq, & ! Effective radius (liquid) (micron) - cld_iwp, & ! Cloud ice water path (g/m2) - cld_ref_ice, & ! Effective radius (ice) (micron) - cld_rwp, & ! Cloud rain water path (g/m2) - cld_ref_rain, & ! Effective radius (rain-drop) (micron) - cld_swp, & ! Cloud snow-water path (g/m2) - cld_ref_snow ! Effective radius (snow-flake) (micron) - + mpicomm, & ! MPI communicator + mpirank, & ! Current MPI rank + mpiroot ! Master MPI rank + ! Outputs - real(kind_phys),dimension(ncol,nlay,nBandsSW),intent(out) :: & - tau_cld, & ! In-cloud optical depth (1) - ssa_cld, & ! In-cloud single-scattering albedo (1) - asy_cld ! In-cloud asymmetry parameter (1) + type(ty_cloud_optics),intent(out) :: & + sw_cloud_props ! DDT containing spectral information for RRTMGP SW radiation scheme + character(len=*), intent(out) :: & + errmsg ! Error message + integer, intent(out) :: & + errflg ! Error code + + ! Variables that will be passed to cloud_optics%load() + real(kind_phys) :: & + radliq_lwr_sw, & ! used by RRTMGP cloud optics + radliq_upr_sw, & ! used by RRTMGP cloud optics + radliq_fac_sw, & ! used by RRTMGP cloud optics + radice_lwr_sw, & ! used by RRTMGP cloud optics + radice_upr_sw, & ! used by RRTMGP cloud optics + radice_fac_sw ! used by RRTMGP cloud optics + + real(kind_phys), dimension(:), allocatable :: & + pade_sizereg_extliq_sw, & ! used by RRTMGP cloud optics + pade_sizereg_ssaliq_sw, & ! used by RRTMGP cloud optics + pade_sizereg_asyliq_sw, & ! used by RRTMGP cloud optics + pade_sizereg_extice_sw, & ! used by RRTMGP cloud optics + pade_sizereg_ssaice_sw, & ! used by RRTMGP cloud optics + pade_sizereg_asyice_sw ! used by RRTMGP cloud optics + real(kind_phys), dimension(:,:), allocatable :: & + lut_extliq_sw, & ! used by RRTMGP cloud optics + lut_ssaliq_sw, & ! used by RRTMGP cloud optics + lut_asyliq_sw, & ! used by RRTMGP cloud optics + band_lims_cldy_sw ! used by RRTMGP cloud optics + + real(kind_phys), dimension(:,:,:), allocatable :: & + lut_extice_sw, & ! used by RRTMGP cloud optics + lut_ssaice_sw, & ! used by RRTMGP cloud optics + lut_asyice_sw, & ! used by RRTMGP cloud optics + pade_extliq_sw, & ! used by RRTMGP cloud optics + pade_ssaliq_sw, & ! used by RRTMGP cloud optics + pade_asyliq_sw ! used by RRTMGP cloud optics + real(kind_phys), dimension(:,:,:,:), allocatable :: & + pade_extice_sw, & ! used by RRTMGP cloud optics + pade_ssaice_sw, & ! used by RRTMGP cloud optics + pade_asyice_sw ! used by RRTMGP cloud optics + ! Dimensions (to be broadcast across all processors) + integer :: & + nbandSWcldy_sw, & ! used by RRTMGP cloud optics + nsize_liq_sw, & ! used by RRTMGP cloud optics + nsize_ice_sw, & ! used by RRTMGP cloud optics + nsizereg_sw, & ! used by RRTMGP cloud optics + ncoeff_ext_sw, & ! used by RRTMGP cloud optics + ncoeff_ssa_g_sw, & ! used by RRTMGP cloud optics + nbound_sw, & ! used by RRTMGP cloud optics + npairsSWcldy_sw ! used by RRTMGP cloud optics ! Local variables - integer :: iCol, iLay, iBand, index, ia, istr - real(kind_phys) :: tau_rain, tau_snow, factor, fint, cld_ref_iceTemp,asyw,ssaw,za1,za2 - - real(kind_phys), dimension(nBandsSW) :: ssa_rain, ssa_snow, asy_rain, asy_snow, & - tau_liq, ssa_liq, asy_liq, tau_ice, ssa_ice, asy_ice, forwliq, asycoliq, & - forwice, extcoice, asycoice, ssacoice, fdelta, extcoliq, ssacoliq + integer :: status,ncid_sw_clds,dimid,varID,iGas + character(len=264) :: sw_cloud_props_file ! Initialize - tau_cld(:,:,:) = 0._kind_phys - ssa_cld(:,:,:) = 1._kind_phys - asy_cld(:,:,:) = 0._kind_phys - - ! Compute cloud radiative properties for cloud. - if (iswcliq > 0) then - do iCol=1,ncol - do iLay=1,nlay - ! Initialize - tau_liq(:) = 0._kind_phys - tau_ice(:) = 0._kind_phys - tau_rain = 0._kind_phys - tau_snow = 0._kind_phys - ssa_liq(:) = 0._kind_phys - ssa_ice(:) = 0._kind_phys - ssa_rain(:) = 0._kind_phys - ssa_snow(:) = 0._kind_phys - asy_liq(:) = 0._kind_phys - asy_ice(:) = 0._kind_phys - asy_rain(:) = 0._kind_phys - asy_snow(:) = 0._kind_phys - if (cld_frac(iCol,iLay) .gt. 0._kind_phys) then - ! ########################################################################### - ! Rain clouds - ! ########################################################################### - ! Rain optical depth (No band dependence) - tau_rain = cld_rwp(iCol,iLay)*a0r - - ! Rain single-scattering albedo and asymmetry (Band dependent) - do iBand=1,nBandsSW - ssa_rain(iBand) = tau_rain*(1.-b0r(iBand)) - asy_rain(iBand) = ssa_rain(iBand)*c0r(iBand) - enddo - - ! ########################################################################### - ! Snow clouds - ! ########################################################################### - ! Snow optical depth (No band dependence) - if (cld_swp(iCol,iLay) .gt. 0. .and. cld_ref_snow(iCol,iLay) .gt. 10._kind_phys) then - tau_snow = cld_swp(iCol,iLay) - else - tau_snow = 0._kind_phys - endif - - ! Snow single-scattering albedo and asymmetry (Band dependent) - do iBand=1,nBandsSW - ssa_snow(iBand) = tau_snow*(1.-(b0s(iBand)+b1s(iBand)*1.0315*cld_ref_snow(iCol,iLay))) - asy_snow(iBand) = ssa_snow(iBand)*c0s(iBand) - enddo - - ! ########################################################################### - ! Liquid clouds - ! ########################################################################### - if (cld_lwp(iCol,iLay) .gt. 0) then - ! Find index in coefficient LUT for corresponding partice size. - factor = cld_ref_liq(iCol,iLay) - 1.5 - index = max( 1, min( 57, int( factor ) )) - fint = factor - float(index) - - ! Extract coefficents for all bands and compute radiative properties - do iBand=1,nBandsSW - ! Interpolate coefficients - if ( iswcliq == 1 ) then - extcoliq(iBand) = max(0._kind_phys, extliq1(index,iBand) + & - fint*(extliq1(index+1,iBand)-extliq1(index,iBand))) - ssacoliq(iBand) = max(0._kind_phys, min(1._kind_phys, ssaliq1(index,iBand) + & - fint*(ssaliq1(index+1,iBand)-ssaliq1(index,iBand)))) - asycoliq(iBand) = max(0._kind_phys, min(1._kind_phys, asyliq1(index,iBand) + & - fint*(asyliq1(index+1,iBand)-asyliq1(index,iBand)))) - elseif ( iswcliq == 2 ) then ! use updated coeffs - extcoliq(iBand) = max(0._kind_phys, extliq2(index,iBand) + & - fint*(extliq2(index+1,iBand)-extliq2(index,iBand))) - ssacoliq(iBand) = max(0._kind_phys, min(1._kind_phys, ssaliq2(index,iBand) + & - fint*(ssaliq2(index+1,iBand)-ssaliq2(index,iBand)))) - asycoliq(iBand) = max(0._kind_phys, min(1._kind_phys, asyliq2(index,iBand) + & - fint*(asyliq2(index+1,iBand)-asyliq2(index,iBand)))) - endif - if (fint .lt. 0._kind_phys .and. ssacoliq(iBand) .gt. 1._kind_phys) then - ssacoliq(iBand) = ssaliq1(index,iBand) - endif - tau_liq(iBand) = cld_lwp(iCol,iLay) * extcoliq(iBand) - ssa_liq(iBand) = tau_liq(iBand) * ssacoliq(iBand) - asy_liq(iBand) = ssa_liq(iBand) * asycoliq(iBand) - enddo - endif ! IF cloudy with liquid condensate - - ! ########################################################################### - ! Ice clouds - ! ########################################################################### - if (cld_iwp(iCol,iLay) .gt. 0) then - ! Ebert and curry approach for all particle sizes though somewhat - ! unjustified for large ice particles. - if ( iswcice == 1 ) then - cld_ref_iceTemp = min(130._kind_phys, max(13._kind_phys,cld_ref_ice(iCol,iLay))) - do iBand=1,nBandsSW - ia = ipat(iBand) ! eb_&_c band index for ice cloud coeff - extcoice(iBand) = abari(ia) + bbari(ia) / cld_ref_iceTemp - ssacoice(iBand) = 1._kind_phys - cbari(ia) - dbari(ia)*cld_ref_iceTemp - asycoice(iBand) = ebari(ia)+fbari(ia)*cld_ref_iceTemp - tau_ice(iBand) = cld_iwp(iCol,iLay) * extcoice(iBand) - ssa_ice(iBand) = tau_ice(iBand) * ssacoice(iBand) - asy_ice(iBand) = ssa_ice(iBand) * asycoice(iBand) - enddo + errmsg = '' + errflg = 0 + + ! Filenames are set in the gfs_physics_nml (scm/src/GFS_typedefs.F90) + sw_cloud_props_file = trim(Model%rrtmgp_root)//trim(Model%sw_file_clouds) + + ! Read dimensions for k-distribution fields (only on master processor(0)) + if (mpirank .eq. mpiroot) then + if(nf90_open(trim(sw_cloud_props_file), NF90_WRITE, ncid_sw_clds) == NF90_NOERR) then + status = nf90_inq_dimid(ncid_sw_clds, 'nband', dimid) + status = nf90_inquire_dimension(ncid_sw_clds, dimid, len=nbandSWcldy_sw) + status = nf90_inq_dimid(ncid_sw_clds, 'nrghice', dimid) + status = nf90_inquire_dimension(ncid_sw_clds, dimid, len=nrghice_sw) + status = nf90_inq_dimid(ncid_sw_clds, 'nsize_liq', dimid) + status = nf90_inquire_dimension(ncid_sw_clds, dimid, len=nsize_liq_sw) + status = nf90_inq_dimid(ncid_sw_clds, 'nsize_ice', dimid) + status = nf90_inquire_dimension(ncid_sw_clds, dimid, len=nsize_ice_sw) + status = nf90_inq_dimid(ncid_sw_clds, 'nsizereg', dimid) + status = nf90_inquire_dimension(ncid_sw_clds, dimid, len=nsizereg_sw) + status = nf90_inq_dimid(ncid_sw_clds, 'ncoeff_ext', dimid) + status = nf90_inquire_dimension(ncid_sw_clds, dimid, len=ncoeff_ext_sw) + status = nf90_inq_dimid(ncid_sw_clds, 'ncoeff_ssa_g', dimid) + status = nf90_inquire_dimension(ncid_sw_clds, dimid, len=ncoeff_ssa_g_sw) + status = nf90_inq_dimid(ncid_sw_clds, 'nbound', dimid) + status = nf90_inquire_dimension(ncid_sw_clds, dimid, len=nbound_sw) + status = nf90_inq_dimid(ncid_sw_clds, 'pair', dimid) + status = nf90_inquire_dimension(ncid_sw_clds, dimid, len=npairsSWcldy_sw) + status = nf90_close(ncid_sw_clds) + endif + endif - ! Streamer approach for ice effective radius between 5.0 and 131.0 microns. - elseif ( iswcice == 2 ) then - cld_ref_iceTemp = min(131._kind_phys, max(5.0_kind_phys,cld_ref_ice(iCol,iLay))) - factor = (cld_ref_iceTemp - 2.) / 3. - index = max( 1, min( 42, int( factor ) )) - fint = factor - float(index) - do iBand = 1,nBandsSW - extcoice(iBand) = extice2(index,iBand) + & - fint*(extice2(index+1,iBand)-extice2(index,iBand)) - ssacoice(iBand) = ssaice2(index,iBand) + & - fint*(ssaice2(index+1,iBand)-ssaice2(index,iBand)) - asycoice(iBand) = asyice2(index,iBand) + & - fint*(asyice2(index+1,iBand)-asyice2(index,iBand)) - tau_ice(iBand) = cld_iwp(iCol,iLay) * extcoice(iBand) - ssa_ice(iBand) = tau_ice(iBand) * ssacoice(iBand) - asy_ice(iBand) = ssa_ice(iBand) * asycoice(iBand) - enddo + ! Broadcast dimensions to all processors +#ifdef MPI + if (Model%rrtmgp_cld_optics .eq. 1 .or. Model%rrtmgp_cld_optics .eq. 2) then + call MPI_BCAST(nbandSWcldy_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nrghice_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nsize_liq_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nsize_ice_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nsizereg_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(ncoeff_ext_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(ncoeff_ssa_g_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nbound_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(npairsSWcldy_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + endif +#endif + + if (Model%rrtmgp_cld_optics .eq. 1) then + allocate(lut_extliq_sw(nsize_liq_sw, nBandSWcldy_sw)) + allocate(lut_ssaliq_sw(nsize_liq_sw, nBandSWcldy_sw)) + allocate(lut_asyliq_sw(nsize_liq_sw, nBandSWcldy_sw)) + allocate(lut_extice_sw(nsize_ice_sw, nBandSWcldy_sw, nrghice_sw)) + allocate(lut_ssaice_sw(nsize_ice_sw, nBandSWcldy_sw, nrghice_sw)) + allocate(lut_asyice_sw(nsize_ice_sw, nBandSWcldy_sw, nrghice_sw)) + allocate(band_lims_cldy_sw(2, nBandSWcldy_sw)) + endif + if (Model%rrtmgp_cld_optics .eq. 2) then + allocate(pade_extliq_sw(nbandSWcldy_sw, nsizereg_sw, ncoeff_ext_sw )) + allocate(pade_ssaliq_sw(nbandSWcldy_sw, nsizereg_sw, ncoeff_ssa_g_sw)) + allocate(pade_asyliq_sw(nbandSWcldy_sw, nsizereg_sw, ncoeff_ssa_g_sw)) + allocate(pade_extice_sw(nbandSWcldy_sw, nsizereg_sw, ncoeff_ext_sw, nrghice_sw)) + allocate(pade_ssaice_sw(nbandSWcldy_sw, nsizereg_sw, ncoeff_ssa_g_sw, nrghice_sw)) + allocate(pade_asyice_sw(nbandSWcldy_sw, nsizereg_sw, ncoeff_ssa_g_sw, nrghice_sw)) + allocate(pade_sizereg_extliq_sw(nbound_sw)) + allocate(pade_sizereg_ssaliq_sw(nbound_sw)) + allocate(pade_sizereg_asyliq_sw(nbound_sw)) + allocate(pade_sizereg_extice_sw(nbound_sw)) + allocate(pade_sizereg_ssaice_sw(nbound_sw)) + allocate(pade_sizereg_asyice_sw(nbound_sw)) + allocate(band_lims_cldy_sw(2,nbandSWcldy_sw)) + endif - ! Fu's approach for ice effective radius between 4.8 and 135 microns - ! (generalized effective size from 5 to 140 microns). - ! https://doi.org/10.1175/1520-0442(1996)009<2058:AAPOTS>2.0.CO;2 - elseif ( iswcice == 3 ) then - cld_ref_iceTemp = max( 5.0, min( 140.0, 1.0315*cld_ref_ice(iCol,iLay) )) - ! Determine indices for table interpolation. - factor = (cld_ref_iceTemp - 2._kind_phys) / 3._kind_phys - index = max( 1, min( 45, int( factor ) )) - fint = factor - float(index) - do iBand = 1,nBandsSW - ! Interpolate coefficient tables to appropriate ice-particle size. - extcoice(iBand) = max(0._kind_phys, extice3(index,iBand) + & - fint*(extice3(index+1,iBand)-extice3(index,iBand))) ! eq (3.9a) - ssacoice(iBand) = max(0._kind_phys, min(1._kind_phys, ssaice3(index,iBand) + & - fint*(ssaice3(index+1,iBand)-ssaice3(index,iBand)))) ! eq (3.9b) - asycoice(iBand) = max(0._kind_phys, min(1._kind_phys, asyice3(index,iBand) + & - fint*(asyice3(index+1,iBand)-asyice3(index,iBand)))) ! eq (3.9c) - fdelta(iBand) = fdlice3(index,iBand) + & - fint*(fdlice3(index+1,iBand)-fdlice3(index,iBand)) ! eq (3.9d) - forwice(iBand) = fdelta(iBand) + 0.5_kind_phys / ssacoice(iBand) - if (forwice(iBand) .gt. asycoice(iBand)) forwice(iBand) = asycoice(iBand) - tau_ice(iBand) = cld_iwp(iCol,iLay) * extcoice(iBand) - ssa_ice(iBand) = tau_ice(iBand) * ssacoice(iBand) - asy_ice(iBand) = ssa_ice(iBand) * asycoice(iBand) - enddo - endif - endif ! IF cloudy column with ice condensate - endif ! IF cloudy column + ! On master processor, allocate space, read in fields, broadcast to all processors + if (mpirank .eq. mpiroot) then + ! + if (Model%rrtmgp_cld_optics .eq. 1) then + ! + if(nf90_open(trim(sw_cloud_props_file), NF90_WRITE, ncid_sw_clds) == NF90_NOERR) then + status = nf90_inq_varid(ncid_sw_clds,'radliq_lwr',varID) + status = nf90_get_var(ncid_sw_clds,varID,radliq_lwr_sw) + status = nf90_inq_varid(ncid_sw_clds,'radliq_upr',varID) + status = nf90_get_var(ncid_sw_clds,varID,radliq_upr_sw) + status = nf90_inq_varid(ncid_sw_clds,'radliq_fac',varID) + status = nf90_get_var(ncid_sw_clds,varID,radliq_fac_sw) + status = nf90_inq_varid(ncid_sw_clds,'radice_lwr',varID) + status = nf90_get_var(ncid_sw_clds,varID,radice_lwr_sw) + status = nf90_inq_varid(ncid_sw_clds,'radice_upr',varID) + status = nf90_get_var(ncid_sw_clds,varID,radice_upr_sw) + status = nf90_inq_varid(ncid_sw_clds,'radice_fac',varID) + status = nf90_get_var(ncid_sw_clds,varID,radice_fac_sw) + status = nf90_inq_varid(ncid_sw_clds,'lut_extliq',varID) + status = nf90_get_var(ncid_sw_clds,varID,lut_extliq_sw) + status = nf90_inq_varid(ncid_sw_clds,'lut_ssaliq',varID) + status = nf90_get_var(ncid_sw_clds,varID,lut_ssaliq_sw) + status = nf90_inq_varid(ncid_sw_clds,'lut_asyliq',varID) + status = nf90_get_var(ncid_sw_clds,varID,lut_asyliq_sw) + status = nf90_inq_varid(ncid_sw_clds,'lut_extice',varID) + status = nf90_get_var(ncid_sw_clds,varID,lut_extice_sw) + status = nf90_inq_varid(ncid_sw_clds,'lut_ssaice',varID) + status = nf90_get_var(ncid_sw_clds,varID,lut_ssaice_sw) + status = nf90_inq_varid(ncid_sw_clds,'lut_asyice',varID) + status = nf90_get_var(ncid_sw_clds,varID,lut_asyice_sw) + status = nf90_inq_varid(ncid_sw_clds,'bnd_limits_wavenumber',varID) + status = nf90_get_var(ncid_sw_clds,varID,band_lims_cldy_sw) + status = nf90_close(ncid_sw_clds) + endif + endif + ! + if (Model%rrtmgp_cld_optics .eq. 2) then + ! + if(nf90_open(trim(sw_cloud_props_file), NF90_WRITE, ncid_sw_clds) == NF90_NOERR) then + status = nf90_inq_varid(ncid_sw_clds,'radliq_lwr',varID) + status = nf90_get_var(ncid_sw_clds,varID,radliq_lwr_sw) + status = nf90_inq_varid(ncid_sw_clds,'radliq_upr',varID) + status = nf90_get_var(ncid_sw_clds,varID,radliq_upr_sw) + status = nf90_inq_varid(ncid_sw_clds,'radliq_fac',varID) + status = nf90_get_var(ncid_sw_clds,varID,radliq_fac_sw) + status = nf90_inq_varid(ncid_sw_clds,'radice_lwr',varID) + status = nf90_get_var(ncid_sw_clds,varID,radice_lwr_sw) + status = nf90_inq_varid(ncid_sw_clds,'radice_upr',varID) + status = nf90_get_var(ncid_sw_clds,varID,radice_upr_sw) + status = nf90_inq_varid(ncid_sw_clds,'radice_fac',varID) + status = nf90_get_var(ncid_sw_clds,varID,radice_fac_sw) + status = nf90_inq_varid(ncid_sw_clds,'pade_extliq',varID) + status = nf90_get_var(ncid_sw_clds,varID,pade_extliq_sw) + status = nf90_inq_varid(ncid_sw_clds,'pade_ssaliq',varID) + status = nf90_get_var(ncid_sw_clds,varID,pade_ssaliq_sw) + status = nf90_inq_varid(ncid_sw_clds,'pade_asyliq',varID) + status = nf90_get_var(ncid_sw_clds,varID,pade_asyliq_sw) + status = nf90_inq_varid(ncid_sw_clds,'pade_extice',varID) + status = nf90_get_var(ncid_sw_clds,varID,pade_extice_sw) + status = nf90_inq_varid(ncid_sw_clds,'pade_ssaice',varID) + status = nf90_get_var(ncid_sw_clds,varID,pade_ssaice_sw) + status = nf90_inq_varid(ncid_sw_clds,'pade_asyice',varID) + status = nf90_get_var(ncid_sw_clds,varID,pade_asyice_sw) + status = nf90_inq_varid(ncid_sw_clds,'pade_sizreg_extliq',varID) + status = nf90_get_var(ncid_sw_clds,varID,pade_sizereg_extliq_sw) + status = nf90_inq_varid(ncid_sw_clds,'pade_sizreg_ssaliq',varID) + status = nf90_get_var(ncid_sw_clds,varID,pade_sizereg_ssaliq_sw) + status = nf90_inq_varid(ncid_sw_clds,'pade_sizreg_asyliq',varID) + status = nf90_get_var(ncid_sw_clds,varID,pade_sizereg_asyliq_sw) + status = nf90_inq_varid(ncid_sw_clds,'pade_sizreg_extice',varID) + status = nf90_get_var(ncid_sw_clds,varID,pade_sizereg_extice_sw) + status = nf90_inq_varid(ncid_sw_clds,'pade_sizreg_ssaice',varID) + status = nf90_get_var(ncid_sw_clds,varID,pade_sizereg_ssaice_sw) + status = nf90_inq_varid(ncid_sw_clds,'pade_sizreg_asyice',varID) + status = nf90_get_var(ncid_sw_clds,varID,pade_sizereg_asyice_sw) + status = nf90_inq_varid(ncid_sw_clds,'bnd_limits_wavenumber',varID) + status = nf90_get_var(ncid_sw_clds,varID,band_lims_cldy_sw) + status = nf90_close(ncid_sw_clds) + endif + endif + endif - ! ########################################################################### - ! Compute total cloud radiative properties (tau, omega, and g) - ! ########################################################################### - if (cld_frac(iCol,iLay) .gt. 0._kind_phys) then - do iBand = 1,nBandsSW - ! Sum up radiative properties by type. - tau_cld(iCol,iLay,iBand) = tau_liq(iBand) + tau_ice(iBand) + tau_rain + tau_snow - ssa_cld(iCol,iLay,iBand) = ssa_liq(iBand) + ssa_ice(iBand) + ssa_rain(iBand) + ssa_snow(iBand) - asy_cld(iCol,iLay,iBand) = asy_liq(iBand) + asy_ice(iBand) + asy_rain(iBand) + asy_snow(iBand) - ! Delta-scale - asyw = asy_cld(iCol,iLay,iBand)/max(0._kind_phys, ssa_cld(iCol,iLay,iBand)) - ssaw = min(1._kind_phys-0.000001, ssa_cld(iCol,iLay,iBand)/tau_cld(iCol,iLay,iBand)) - za1 = asyw * asyw - za2 = ssaw * za1 - tau_cld(iCol,iLay,iBand) = (1._kind_phys - za2) * tau_cld(iCol,iLay,iBand) - ssa_cld(iCol,iLay,iBand) = (ssaw - za2) / (1._kind_phys - za2) - asy_cld(iCol,iLay,iBand) = (asyw - za2/ssaw)/(1-za2/ssaw) - enddo ! Loop over SW bands - endif ! END sum cloudy properties - ! - enddo ! Loop over layers - enddo ! Loop over columns + ! Broadcast arrays to all processors +#ifdef MPI + if (Model%rrtmgp_cld_optics .eq. 1) then + call MPI_BCAST(radliq_lwr_sw, size(radliq_lwr_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(radliq_upr_sw, size(radliq_upr_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(radliq_fac_sw, size(radliq_fac_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(radice_lwr_sw, size(radice_lwr_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(radice_upr_sw, size(radice_upr_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(radice_fac_sw, size(radice_fac_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_extliq_sw, size(lut_extliq_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_ssaliq_sw, size(lut_ssaliq_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_asyliq_sw, size(lut_asyliq_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_extice_sw, size(lut_extice_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_ssaice_sw, size(lut_ssaice_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_asyice_sw, size(lut_asyice_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(band_lims_cldy_sw), size(band_lims_cldy_sw), kind_phys, mpiroot, mpicomm, ierr) + endif + if (Model%rrtmgp_cld_optics .eq. 2) then + call MPI_BCAST(pade_extliq_sw, size(pade_extliq_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_ssaliq_sw, size(pade_ssaliq_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_asyliq_sw, size(pade_asyliq_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_extice_sw, size(pade_extice_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_ssaice_sw, size(pade_ssaice_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_asyice_sw, size(pade_asyice_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_extliq_sw), size(pade_sizereg_extliq_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_ssaliq_sw), size(pade_sizereg_ssaliq_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_asyliq_sw), size(pade_sizereg_asyliq_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_extice_sw), size(pade_sizereg_extice_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_ssaice_sw), size(pade_sizereg_ssaice_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_asyice_sw), size(pade_sizereg_asyice_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(band_lims_cldy_sw), size(band_lims_cldy_sw), kind_phys, mpiroot, mpicomm, ierr) + endif +#endif + + ! Load tables data for RRTMGP cloud-optics + if (Model%rrtmgp_cld_optics .eq. 1) then + call check_error_msg('sw_cloud_optics_init',sw_cloud_props%set_ice_roughness(nrghice_sw)) + call check_error_msg('sw_cloud_optics_init',sw_cloud_props%load(band_lims_cldy_sw, & + radliq_lwr_sw, radliq_upr_sw, radliq_fac_sw, radice_lwr_sw, radice_upr_sw, & + radice_fac_sw, lut_extliq_sw, lut_ssaliq_sw, lut_asyliq_sw, lut_extice_sw, & + lut_ssaice_sw, lut_asyice_sw)) + endif + if (Model%rrtmgp_cld_optics .eq. 2) then + call check_error_msg('sw_cloud_optics_init',sw_cloud_props%set_ice_roughness(nrghice_sw)) + call check_error_msg('sw_cloud_optics_init', sw_cloud_props%load(band_lims_cldy_sw, & + pade_extliq_sw, pade_ssaliq_sw, pade_asyliq_sw, pade_extice_sw, pade_ssaice_sw, & + pade_asyice_sw, pade_sizereg_extliq_sw, pade_sizereg_ssaliq_sw, & + pade_sizereg_asyliq_sw, pade_sizereg_extice_sw, pade_sizereg_ssaice_sw, & + pade_sizereg_asyice_sw)) endif - end subroutine rrtmgp_sw_cloud_optics + end subroutine rrtmgp_sw_cloud_optics_init + +!! \section arg_table_rrtmgp_sw_cloud_optics_run Argument Table +!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | +!! |-----------------------|------------------------------------------------------|------------------------------------------------------------------------------|---------|------|-----------------------|-----------|--------|----------| +!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | +!! | ncol | horizontal_loop_extent | horizontal dimension | count | 0 | integer | | in | F | +!! | ngpts_sw | number_of_spectral_points_for_SW_calculation | Number of spectral points for SW RRTMGP calculation | none | 0 | integer | | in | F | +!! | p_lay | air_pressure_at_layer_for_RRTMGP_in_hPa | air pressure layer | hPa | 2 | real | kind_phys | in | F | +!! | t_lay | air_temperature_at_layer_for_RRTMGP | air temperature layer | K | 2 | real | kind_phys | in | F | +!! | p_lev | air_pressure_at_interface_for_RRTMGP_in_hPa | air pressure level | hPa | 2 | real | kind_phys | in | F | +!! | cld_frac | total_cloud_fraction | layer total cloud fraction | frac | 2 | real | kind_phys | in | F | +!! | cld_lwp | cloud_liquid_water_path | layer cloud liquid water path | g m-2 | 2 | real | kind_phys | in | F | +!! | cld_reliq | mean_effective_radius_for_liquid_cloud | mean effective radius for liquid cloud | micron | 2 | real | kind_phys | in | F | +!! | cld_iwp | cloud_ice_water_path | layer cloud ice water path | g m-2 | 2 | real | kind_phys | in | F | +!! | cld_reice | mean_effective_radius_for_ice_cloud | mean effective radius for ice cloud | micron | 2 | real | kind_phys | in | F | +!! | cld_swp | cloud_snow_water_path | layer cloud snow water path | g m-2 | 2 | real | kind_phys | in | F | +!! | cld_resnow | mean_effective_radius_for_snow_flake | mean effective radius for snow cloud | micron | 2 | real | kind_phys | in | F | +!! | cld_rwp | cloud_rain_water_path | layer cloud rain water path | g m-2 | 2 | real | kind_phys | in | F | +!! | cld_rerain | mean_effective_radius_for_rain_drop | mean effective radius for rain cloud | micron | 2 | real | kind_phys | in | F | +!! | icseed_sw | seed_random_numbers_sw | seed for random number generation for shortwave radiation | none | 1 | integer | | in | F | +!! | aerosols | aerosol_optical_properties_for_shortwave_bands_01-16 | aerosol optical properties for shortwave bands 01-16 | various | 4 | real | kind_phys | in | F | +!! | sw_cloud_props | coefficients_for_sw_cloud_optics | DDT containing spectral information for cloudy RRTMGP SW radiation scheme | DDT | 0 | ty_cloud_optics | | in | F | +!! | sw_gas_props | coefficients_for_sw_gas_optics | DDT containing spectral information for RRTMGP SW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | +!! | nday | daytime_points_dimension | daytime points dimension | count | 0 | integer | | in | F | +!! | idxday | daytime_points | daytime points | index | 1 | integer | | in | F | +!! | optical_props_clouds | shortwave_optical_properties_for_cloudy_atmosphere | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_2str | | out | F | +!! | optical_props_aerosol | shortwave_optical_properties_for_aerosols | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_2str | | out | F | +!! | cldtausw | cloud_optical_depth_layers_at_0.55mu_band | approx .55mu band layer cloud optical depth | none | 2 | real | kind_phys | out | F | +!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | +!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! + ! ######################################################################################### + ! SUBROTUINE rrtmgp_sw_cloud_optics_run() + ! ######################################################################################### + subroutine rrtmgp_sw_cloud_optics_run(Model, ncol, ngpts_sw, icseed_sw, p_lay, t_lay, p_lev, cld_frac, & ! IN + cld_lwp, cld_reliq, cld_iwp, cld_reice, cld_swp, cld_resnow, cld_rwp, cld_rerain, & ! IN + aerosols, sw_cloud_props, sw_gas_props, nday, idxday, & ! IN + optical_props_clouds, optical_props_aerosol, cldtausw, errmsg, errflg) ! OUT + + ! Inputs + type(GFS_control_type), intent(in) :: & + Model + integer, intent(in) :: & + ncol, & ! Number of horizontal gridpoints + nday, & ! Number of daylit points. + ngpts_sw ! Number of spectral points + integer,intent(in),dimension(nday) :: & + idxday ! Indices for daylit points. + integer,intent(in),dimension(ncol) :: & + icseed_sw ! auxiliary special cloud related array when module + ! variable isubcsw=2, it provides permutation seed + ! for each column profile that are used for generating + ! random numbers. when isubcsw /=2, it will not be used. + real(kind_phys), dimension(ncol,model%levs), intent(in) :: & + p_lay, & ! Pressure @ model layer-centers (hPa) + t_lay ! Temperature (K) + real(kind_phys), dimension(ncol,model%levs+1), intent(in) :: & + p_lev ! Pressure @ model layer-interfaces (hPa) + real(kind_phys), dimension(ncol,model%levs),intent(in) :: & + cld_frac, & ! Total cloud fraction by layer + cld_lwp, & ! Cloud liquid water path + cld_reliq, & ! Cloud liquid effective radius + cld_iwp, & ! Cloud ice water path + cld_reice, & ! Cloud ice effective radius + cld_swp, & ! Cloud snow water path + cld_resnow, & ! Cloud snow effective radius + cld_rwp, & ! Cloud rain water path + cld_rerain ! Cloud rain effective radius + type(ty_cloud_optics),intent(in) :: & + sw_cloud_props ! + type(ty_gas_optics_rrtmgp),intent(in) :: & + sw_gas_props + real(kind_phys), intent(in),dimension(ncol, model%levs, sw_cloud_props%get_nband(),3) :: & + aerosols ! - ! ####################################################################################### - ! SUBROUTINE mcica_subcol_sw - ! ###################################################################################### - subroutine mcica_subcol_sw(ncol, nlay, ngpts, cld_frac, icseed, dzlyr, de_lgth, & - cld_frac_mcica) - ! Inputs - integer,intent(in) :: & - ncol, & ! Number of horizontal gridpoints - nlay, & ! Number of vertical layers - ngpts ! Number of spectral g-points - integer,dimension(ncol),intent(in) :: & - icseed ! Permutation seed for each column. - real(kind_phys), dimension(ncol), intent(in) :: & - de_lgth ! Cloud decorrelation length (km) - real(kind_phys), dimension(ncol,nlay), intent(in) :: & - cld_frac, & ! Cloud-fraction - dzlyr ! Layer thinkness (km) ! Outputs - logical,dimension(ncol,nlay,ngpts),intent(out) :: & - cld_frac_mcica - ! Local variables - type(random_stat) :: stat - integer :: icol,n,k,k1 - real(kind_phys) :: tem1 - real(kind_phys),dimension(ngpts) :: rand1D - real(kind_phys),dimension(nlay*ngpts) :: rand2D - real(kind_phys),dimension(ngpts,nlay) :: cdfunc,cdfun2 - real(kind_phys),dimension(nlay) :: fac_lcf - logical,dimension(ngpts,nlay) :: lcloudy - - ! Loop over all columns - do icol=1,ncol - ! Call random_setseed() to advance random number generator by "icseed" values. - call random_setseed(icseed(icol),stat) - - ! ################################################################################### - ! Sub-column set up according to overlapping assumption: - ! - For random overlap, pick a random value at every level - ! - For max-random overlap, pick a random value at every level - ! - For maximum overlap, pick same random numebr at every level - ! ################################################################################### - select case ( iovrsw ) - ! ################################################################################### - ! 0) Random overlap - ! ################################################################################### - case( 0 ) - call random_number(rand2D,stat) - k1 = 0 - do n = 1, ngpts - do k = 1, nlay - k1 = k1 + 1 - cdfunc(n,k) = rand2d(k1) - enddo - enddo + type(ty_optical_props_2str),intent(out) :: & + optical_props_clouds, & + optical_props_aerosol + real(kind_phys), dimension(ncol,Model%levs), intent(out) :: & + cldtausw ! approx 10.mu band layer cloud optical depth + integer, intent(out) :: errflg + character(len=*), intent(out) :: errmsg - ! ################################################################################### - ! 1) Maximum-random overlap - ! ################################################################################### - case(1) - call random_number(rand2D,stat) - k1 = 0 - do n = 1, ngpts - do k = 1, nlay - k1 = k1 + 1 - cdfunc(n,k) = rand2d(k1) - enddo - enddo - - ! First pick a random number for bottom (or top) layer. - ! then walk up the column: (aer's code) - ! if layer below is cloudy, use the same rand num in the layer below - ! if layer below is clear, use a new random number - do k = 2, nlay - k1 = k - 1 - tem1 = 1._kind_phys - cld_frac(icol,k1) - do n = 1, ngpts - if ( cdfunc(n,k1) > tem1 ) then - cdfunc(n,k) = cdfunc(n,k1) - else - cdfunc(n,k) = cdfunc(n,k) * tem1 - endif - enddo - enddo + ! Local variables + integer :: iCol + integer,dimension(ncol) :: ipseed_sw + logical,dimension(ncol,model%levs) :: liqmask, icemask + type(ty_optical_props_2str) :: optical_props_cloudsByBand + type(random_stat) :: rng_stat + real(kind_phys), dimension(ngpts_sw,model%levs,ncol) :: rng3D + real(kind_phys), dimension(ngpts_sw*model%levs) :: rng1D + logical, dimension(ncol,model%levs,ngpts_sw) :: cldfracMCICA + real(kind_phys), dimension(nday,model%levs,sw_cloud_props%get_nband()) :: & + tau_cld, ssa_cld, asy_cld + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + + if (.not. Model%lsswr) return + + ! ####################################################################################### + ! Change random number seed value for each radiation invocation (isubcsw =1 or 2). + ! ####################################################################################### + if(isubcsw == 1) then ! advance prescribed permutation seed + do iCol = 1, ncol + ipseed_sw(iCol) = ipsdsw0 + iCol + enddo + elseif (isubcsw == 2) then ! use input array of permutaion seeds + do iCol = 1, ncol + ipseed_sw(iCol) = icseed_sw(iCol) + enddo + endif + + ! ####################################################################################### + ! Compute ice/liquid cloud masks, needed by rrtmgp_cloud_optics + ! ####################################################################################### + liqmask = (cld_frac .gt. 0 .and. cld_lwp .gt. 0) + icemask = (cld_frac .gt. 0 .and. cld_iwp .gt. 0) + + ! ####################################################################################### + ! Allocate space for RRTMGP DDTs containing cloud and aerosol radiative properties + ! ####################################################################################### + ! Cloud optics [ncol,model%levs,nBands] + call check_error_msg('rrtmgp_sw_cloud_optics_run',optical_props_cloudsByBand%alloc_2str(& + ncol, model%levs, sw_cloud_props%get_band_lims_wavenumber())) + ! Aerosol optics [ncol,model%levs,nBands] + call check_error_msg('rrtmgp_sw_cloud_optics_run',optical_props_aerosol%alloc_2str( & + ncol, model%levs, sw_cloud_props%get_band_lims_wavenumber())) + ! Cloud optics [ncol,model%levs,nGpts] + call check_error_msg('rrtmgp_sw_cloud_optics_run',optical_props_clouds%alloc_2str( & + ncol, model%levs, sw_gas_props)) + + ! ####################################################################################### + ! Copy aerosol optical information to RRTMGP DDT + ! ####################################################################################### + optical_props_aerosol%tau = aerosols(:,:,:,1) + optical_props_aerosol%ssa = aerosols(:,:,:,2) + optical_props_aerosol%g = aerosols(:,:,:,3) + + ! ####################################################################################### + ! Compute cloud-optics for RTE. + ! ####################################################################################### + if (Model%rrtmgp_cld_optics .gt. 0) then + ! RRTMGP cloud-optics. + call check_error_msg('rrtmgp_sw_cloud_optics_run',sw_cloud_props%cloud_optics(& + ncol, & ! IN - Number of daylit gridpoints + model%levs, & ! IN - Number of vertical layers + sw_cloud_props%get_nband(), & ! IN - Number of SW bands + nrghice_sw, & ! IN - Number of ice-roughness categories + liqmask, & ! IN - Liquid-cloud mask + icemask, & ! IN - Ice-cloud mask + cld_lwp, & ! IN - Cloud liquid water path + cld_iwp, & ! IN - Cloud ice water path + cld_reliq, & ! IN - Cloud liquid effective radius + cld_reice, & ! IN - Cloud ice effective radius + optical_props_cloudsByBand)) ! OUT - RRTMGP DDT containing cloud radiative properties + ! in each band + else + ! RRTMG cloud-optics + if (any(cld_frac .gt. 0)) then + optical_props_cloudsByBand%tau(:,:,:) = 0._kind_phys + optical_props_cloudsByBand%ssa(:,:,:) = 0._kind_phys + optical_props_cloudsByBand%g(:,:,:) = 0._kind_phys + call rrtmg_sw_cloud_optics(nday, model%levs, sw_cloud_props%get_nband(), cld_lwp(idxday,:), & + cld_reliq(idxday,:), cld_iwp(idxday,:), cld_reice(idxday,:), cld_rwp(idxday,:), & + cld_rerain(idxday,:), cld_swp(idxday,:), cld_resnow(idxday,:), cld_frac(idxday,:),& + tau_cld, ssa_cld, asy_cld) + optical_props_cloudsByBand%tau(idxday,:,:) = tau_cld + optical_props_cloudsByBand%ssa(idxday,:,:) = ssa_cld + optical_props_cloudsByBand%g(idxday,:,:) = asy_cld + endif + endif + ! ####################################################################################### + ! Call McICA to generate subcolumns. + ! ####################################################################################### + ! Call RNG. Mersennse Twister accepts 1D array, so loop over columns and collapse along G-points + ! and layers. ([nGpts,model%levs,nColumn]-> [nGpts*model%levs]*nColumn) + do iCol=1,ncol + call random_setseed(ipseed_sw(icol),rng_stat) + call random_number(rng1D,rng_stat) + rng3D(:,:,iCol) = reshape(source = rng1D,shape=[ngpts_sw,model%levs]) + enddo + + ! Call McICA + select case ( iovrsw ) + ! Maximumn-random + case(1) + call check_error_msg('rrtmgp_sw_cloud_optics_run',sampled_mask_max_ran(rng3D,cld_frac,cldfracMCICA)) + end select + + ! Map band optical depth to each g-point using McICA + call check_error_msg('rrtmgp_sw_cloud_optics_run',draw_samples(cldfracMCICA,optical_props_cloudsByBand,optical_props_clouds)) - ! ################################################################################### - ! 2) Maximum overlap - ! ################################################################################### - case(2) - call random_number(rand1d,stat) - do n = 1, ngpts - tem1 = rand1d(n) - do k = 1, nlay - cdfunc(n,k) = tem1 - enddo - enddo + ! GFS_RRTMGP_POST_RUN() requires the SW optical depth ~0.55microns + cldtausw = optical_props_cloudsByBand%tau(:,:,11) - ! ################################################################################### - ! 3) Decorrelation length - ! ################################################################################### - case(3) - ! Compute overlapping factors based on layer midpoint distances and decorrelation - ! depths - do k = nlay, 2, -1 - fac_lcf(k) = exp( -0.5 * (dzlyr(iCol,k)+dzlyr(iCol,k-1)) / de_lgth(iCol) ) - enddo + end subroutine rrtmgp_sw_cloud_optics_run + + subroutine rrtmgp_sw_cloud_optics_finalize() + end subroutine rrtmgp_sw_cloud_optics_finalize - ! Setup 2 sets of random numbers - call random_number ( rand2d, stat ) - k1 = 0 - do k = 1, nlay - do n = 1, ngpts - k1 = k1 + 1 - cdfunc(n,k) = rand2d(k1) - enddo - enddo - ! - call random_number ( rand2d, stat ) - k1 = 0 - do k = 1, nlay - do n = 1, ngpts - k1 = k1 + 1 - cdfun2(n,k) = rand2d(k1) - enddo - enddo + ! ######################################################################################### + ! SUBROUTINE check_error_msg + ! ######################################################################################### + subroutine check_error_msg(routine_name, error_msg) + character(len=*), intent(in) :: & + error_msg, routine_name + + if(error_msg /= "") then + print*,"ERROR("//trim(routine_name)//"): " + print*,trim(error_msg) + return + end if + end subroutine check_error_msg - ! Then working from the top down: - ! if a random number (from an independent set -cdfun2) is smaller then the - ! scale factor: use the upper layer's number, otherwise use a new random - ! number (keep the original assigned one). - do k = nlay-1, 1, -1 - k1 = k + 1 - do n = 1, ngpts - if ( cdfun2(n,k) <= fac_lcf(k1) ) then - cdfunc(n,k) = cdfunc(n,k1) - endif - enddo - enddo - end select - - ! ################################################################################### - ! Generate subcolumn cloud mask (0/1 for clear/cloudy) - ! ################################################################################### - do k = 1, nlay - tem1 = 1._kind_phys - cld_frac(icol,k) - do n = 1, ngpts - lcloudy(n,k) = cdfunc(n,k) >= tem1 - if (lcloudy(n,k)) then - cld_frac_mcica(icol,k,n) = .true. - else - cld_frac_mcica(icol,k,n) = .false. - endif - enddo - enddo - enddo ! END LOOP OVER COLUMNS - end subroutine mcica_subcol_sw -end module mo_rrtmgp_sw_cloud_optics +end module rrtmgp_sw_cloud_optics diff --git a/physics/rrtmgp_sw_gas_optics.F90 b/physics/rrtmgp_sw_gas_optics.F90 new file mode 100644 index 000000000..036ac7f0f --- /dev/null +++ b/physics/rrtmgp_sw_gas_optics.F90 @@ -0,0 +1,432 @@ +module rrtmgp_sw_gas_optics + use machine, only: kind_phys + use GFS_typedefs, only: GFS_control_type, GFS_radtend_type + use mo_rte_kind, only: wl + use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp + use mo_gas_concentrations, only: ty_gas_concs + use netcdf + + ! Parameters + integer :: ipsdsw0 + +contains +!! \section arg_table_rrtmgp_sw_gas_optics_init Argument Table +!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | +!! |--------------|----------------------------------------------|--------------------------------------------------------------------|-------|------|----------------------|-------|--------|----------| +!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | +!! | Radtend | GFS_radtend_type_instance | Fortran DDT containing FV3-GFS radiation tendencies | DDT | 0 | GFS_radtend_type | | in | F | +!! | mpirank | mpi_rank | current MPI rank | index | 0 | integer | | in | F | +!! | mpiroot | mpi_root | master MPI rank | index | 0 | integer | | in | F | +!! | mpicomm | mpi_comm | MPI communicator | index | 0 | integer | | in | F | +!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | +!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! | sw_gas_props | coefficients_for_sw_gas_optics | DDT containing spectral information for RRTMGP SW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | out | F | +!! | ngpts_sw | number_of_spectral_points_for_SW_calculation | Number of spectral points for SW RRTMGP calculation | none | 0 | integer | | out | F | +!! + ! ######################################################################################### + ! SUBROUTINE sw_gas_optics_init + ! ######################################################################################### + subroutine rrtmgp_sw_gas_optics_init(Model, Radtend, mpicomm, mpirank, mpiroot, sw_gas_props, & + ngpts_sw, errmsg, errflg) + use netcdf +#ifdef MPI + use mpi +#endif + + ! Inputs + type(GFS_control_type), intent(in) :: & + Model ! DDT containing model control parameters + type(GFS_radtend_type), intent(in) :: & + Radtend + integer,intent(in) :: & + mpicomm, & ! MPI communicator + mpirank, & ! Current MPI rank + mpiroot ! Master MPI rank + + ! Outputs + character(len=*), intent(out) :: & + errmsg ! Error message + integer, intent(out) :: & + errflg ! Error code + integer, intent(out) :: & + ngpts_sw + type(ty_gas_optics_rrtmgp),intent(out) :: & + sw_gas_props + + ! Fields from the K-distribution files + ! Variables that will be passed to gas_optics%load() + type(ty_gas_concs) :: & + gas_concentrations + integer, dimension(:), allocatable :: & + kminor_start_lower_sw, & ! used by RRTMGP gas optics + kminor_start_upper_sw ! used by RRTMGP gas optics + integer, dimension(:,:), allocatable :: & + band2gpt_sw, & ! used by RRTMGP gas optics + minor_limits_gpt_lower_sw, & ! used by RRTMGP gas optics + minor_limits_gpt_upper_sw ! used by RRTMGP gas optics + integer, dimension(:,:,:), allocatable :: & + key_species_sw ! used by RRTMGP gas optics + real(kind_phys) :: & + press_ref_trop_sw, & ! used by RRTMGP gas optics + temp_ref_p_sw, & ! used by RRTMGP gas optics + temp_ref_t_sw ! used by RRTMGP gas optics + real(kind_phys), dimension(:), allocatable :: & + press_ref_sw, & ! used by RRTMGP gas optics + temp_ref_sw, & ! used by RRTMGP gas optics + solar_source_sw ! used by RRTMGP gas optics + real(kind_phys), dimension(:,:), allocatable :: & + band_lims_sw ! used by RRTMGP gas optics + + real(kind_phys), dimension(:,:,:), allocatable :: & + vmr_ref_sw, & ! used by RRTMGP gas optics + kminor_lower_sw, & ! used by RRTMGP gas optics + kminor_upper_sw, & ! used by RRTMGP gas optics + rayl_lower_sw, & ! used by RRTMGP gas optics + rayl_upper_sw ! used by RRTMGP gas optics + real(kind_phys), dimension(:,:,:,:), allocatable :: & + kmajor_sw ! used by RRTMGP gas optics + character(len=32), dimension(:), allocatable :: & + gas_names_sw, & ! used by RRTMGP gas optics + gas_minor_sw, & ! used by RRTMGP gas optics + identifier_minor_sw, & ! used by RRTMGP gas optics + minor_gases_lower_sw, & ! used by RRTMGP gas optics + minor_gases_upper_sw, & ! used by RRTMGP gas optics + scaling_gas_lower_sw, & ! used by RRTMGP gas optics + scaling_gas_upper_sw ! used by RRTMGP gas optics + logical(wl), dimension(:), allocatable :: & + minor_scales_with_density_lower_sw, & ! used by RRTMGP gas optics + minor_scales_with_density_upper_sw, & ! used by RRTMGP gas optics + scale_by_complement_lower_sw, & ! used by RRTMGP gas optics + scale_by_complement_upper_sw ! used by RRTMGP gas optics + ! Dimensions (to be broadcast across all processors) + integer :: & + ntemps_sw, & ! used by RRTMGP gas optics + npress_sw, & ! used by RRTMGP gas optics + nabsorbers_sw, & ! used by RRTMGP gas optics + nextrabsorbers_sw, & ! used by RRTMGP gas optics + nminorabsorbers_sw, & ! used by RRTMGP gas optics + nmixingfracs_sw, & ! used by RRTMGP gas optics + nlayers_sw, & ! used by RRTMGP gas optics + nbnds_sw, & ! used by RRTMGP gas optics + npairs_sw, & ! used by RRTMGP gas optics + nminor_absorber_intervals_lower_sw, & ! used by RRTMGP gas optics + nminor_absorber_intervals_upper_sw, & ! used by RRTMGP gas optics + ncontributors_lower_sw, & ! used by RRTMGP gas optics + ncontributors_upper_sw ! used by RRTMGP gas optics + + ! Local variables + integer :: status,ncid_sw,ncid_sw_clds,dimid,varID,ij,iGas + integer,dimension(:),allocatable :: temp1,temp2,temp3,temp4,temp_log_array1,& + temp_log_array2, temp_log_array3, temp_log_array4 + character(len=264) :: sw_gas_props_file + + ! Initialize + errmsg = '' + errflg = 0 + + ! Filenames are set in the gfs_physics_nml (scm/src/GFS_typedefs.F90) + sw_gas_props_file = trim(Model%rrtmgp_root)//trim(Model%sw_file_gas) + + ! Read dimensions for k-distribution fields (only on master processor(0)) + if (mpirank .eq. mpiroot) then + if(nf90_open(trim(sw_gas_props_file), NF90_WRITE, ncid_sw) .eq. NF90_NOERR) then + status = nf90_inq_dimid(ncid_sw, 'temperature', dimid) + status = nf90_inquire_dimension(ncid_sw, dimid, len=ntemps_sw) + status = nf90_inq_dimid(ncid_sw, 'pressure', dimid) + status = nf90_inquire_dimension(ncid_sw, dimid, len=npress_sw) + status = nf90_inq_dimid(ncid_sw, 'absorber', dimid) + status = nf90_inquire_dimension(ncid_sw, dimid, len=nabsorbers_sw) + status = nf90_inq_dimid(ncid_sw, 'minor_absorber', dimid) + status = nf90_inquire_dimension(ncid_sw, dimid, len=nminorabsorbers_sw) + status = nf90_inq_dimid(ncid_sw, 'absorber_ext', dimid) + status = nf90_inquire_dimension(ncid_sw, dimid, len=nextrabsorbers_sw) + status = nf90_inq_dimid(ncid_sw, 'mixing_fraction', dimid) + status = nf90_inquire_dimension(ncid_sw, dimid, len=nmixingfracs_sw) + status = nf90_inq_dimid(ncid_sw, 'atmos_layer', dimid) + status = nf90_inquire_dimension(ncid_sw, dimid, len=nlayers_sw) + status = nf90_inq_dimid(ncid_sw, 'bnd', dimid) + status = nf90_inquire_dimension(ncid_sw, dimid, len=nbnds_sw) + status = nf90_inq_dimid(ncid_sw, 'gpt', dimid) + status = nf90_inquire_dimension(ncid_sw, dimid, len=ngpts_sw) + status = nf90_inq_dimid(ncid_sw, 'pair', dimid) + status = nf90_inquire_dimension(ncid_sw, dimid, len=npairs_sw) + status = nf90_inq_dimid(ncid_sw, 'contributors_lower', dimid) + status = nf90_inquire_dimension(ncid_sw, dimid, len=ncontributors_lower_sw) + status = nf90_inq_dimid(ncid_sw, 'contributors_upper', dimid) + status = nf90_inquire_dimension(ncid_sw, dimid, len=ncontributors_upper_sw) + status = nf90_inq_dimid(ncid_sw, 'minor_absorber_intervals_lower', dimid) + status = nf90_inquire_dimension(ncid_sw, dimid, len=nminor_absorber_intervals_lower_sw) + status = nf90_inq_dimid(ncid_sw, 'minor_absorber_intervals_upper', dimid) + status = nf90_inquire_dimension(ncid_sw, dimid, len=nminor_absorber_intervals_upper_sw) + status = nf90_close(ncid_sw) + endif + endif + + ! Broadcast dimensions to all processors +#ifdef MPI + call MPI_BCAST(ntemps_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(npress_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nabsorbers_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nminorabsorbers_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nextraabsorbers_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nmixingfracs_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nlayers_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nbnds_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(ngpts_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(npairs_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(ncontributors_lower_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(ncontributors_upper_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nminor_absorber_intervals_lower_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nminor_absorber_intervals_upper_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +#endif + + ! Allocate space for arrays + allocate(gas_names_sw(nabsorbers_sw)) + allocate(scaling_gas_lower_sw(nminor_absorber_intervals_lower_sw)) + allocate(scaling_gas_upper_sw(nminor_absorber_intervals_upper_sw)) + allocate(gas_minor_sw(nminorabsorbers_sw)) + allocate(identifier_minor_sw(nminorabsorbers_sw)) + allocate(minor_gases_lower_sw(nminor_absorber_intervals_lower_sw)) + allocate(minor_gases_upper_sw(nminor_absorber_intervals_upper_sw)) + allocate(minor_limits_gpt_lower_sw(npairs_sw,nminor_absorber_intervals_lower_sw)) + allocate(minor_limits_gpt_upper_sw(npairs_sw,nminor_absorber_intervals_upper_sw)) + allocate(band2gpt_sw(2,nbnds_sw)) + allocate(key_species_sw(2,nlayers_sw,nbnds_sw)) + allocate(band_lims_sw(2,nbnds_sw)) + allocate(press_ref_sw(npress_sw)) + allocate(temp_ref_sw(ntemps_sw)) + allocate(vmr_ref_sw(nlayers_sw, nextrabsorbers_sw, ntemps_sw)) + allocate(kminor_lower_sw(ncontributors_lower_sw, nmixingfracs_sw, ntemps_sw)) + allocate(kmajor_sw(ngpts_sw, nmixingfracs_sw, npress_sw+1, ntemps_sw)) + allocate(kminor_start_lower_sw(nminor_absorber_intervals_lower_sw)) + allocate(kminor_upper_sw(ncontributors_upper_sw, nmixingfracs_sw, ntemps_sw)) + allocate(kminor_start_upper_sw(nminor_absorber_intervals_upper_sw)) + allocate(minor_scales_with_density_lower_sw(nminor_absorber_intervals_lower_sw)) + allocate(minor_scales_with_density_upper_sw(nminor_absorber_intervals_upper_sw)) + allocate(scale_by_complement_lower_sw(nminor_absorber_intervals_lower_sw)) + allocate(scale_by_complement_upper_sw(nminor_absorber_intervals_upper_sw)) + allocate(rayl_upper_sw(ngpts_sw, nmixingfracs_sw, ntemps_sw)) + allocate(rayl_lower_sw(ngpts_sw, nmixingfracs_sw, ntemps_sw)) + allocate(solar_source_sw(ngpts_sw)) + allocate(temp1(nminor_absorber_intervals_lower_sw)) + allocate(temp2(nminor_absorber_intervals_upper_sw)) + allocate(temp3(nminor_absorber_intervals_lower_sw)) + allocate(temp4(nminor_absorber_intervals_upper_sw)) + + ! On master processor, read in fields, broadcast to all processors + if (mpirank .eq. mpiroot) then + ! Read in fields from file + if(nf90_open(trim(sw_gas_props_file), NF90_WRITE, ncid_sw) .eq. NF90_NOERR) then + status = nf90_inq_varid(ncid_sw,'gas_names',varID) + status = nf90_get_var(ncid_sw,varID,gas_names_sw) + ! + status = nf90_inq_varid(ncid_sw,'scaling_gas_lower',varID) + status = nf90_get_var(ncid_sw,varID,scaling_gas_lower_sw) + ! + status = nf90_inq_varid(ncid_sw,'scaling_gas_upper',varID) + status = nf90_get_var(ncid_sw,varID,scaling_gas_upper_sw) + ! + status = nf90_inq_varid(ncid_sw,'gas_minor',varID) + status = nf90_get_var(ncid_sw,varID,gas_minor_sw) + ! + status = nf90_inq_varid(ncid_sw,'identifier_minor',varID) + status = nf90_get_var(ncid_sw,varID,identifier_minor_sw) + ! + status = nf90_inq_varid(ncid_sw,'minor_gases_lower',varID) + status = nf90_get_var(ncid_sw,varID,minor_gases_lower_sw) + ! + status = nf90_inq_varid(ncid_sw,'minor_gases_upper',varID) + status = nf90_get_var(ncid_sw,varID,minor_gases_upper_sw) + ! + status = nf90_inq_varid(ncid_sw,'minor_limits_gpt_lower',varID) + status = nf90_get_var(ncid_sw,varID,minor_limits_gpt_lower_sw) + ! + status = nf90_inq_varid(ncid_sw,'minor_limits_gpt_upper',varID) + status = nf90_get_var(ncid_sw,varID,minor_limits_gpt_upper_sw) + ! + status = nf90_inq_varid(ncid_sw,'bnd_limits_gpt',varID) + status = nf90_get_var(ncid_sw,varID,band2gpt_sw) + ! + status = nf90_inq_varid(ncid_sw,'key_species',varID) + status = nf90_get_var(ncid_sw,varID,key_species_sw) + ! + status = nf90_inq_varid(ncid_sw,'bnd_limits_wavenumber',varID) + status = nf90_get_var(ncid_sw,varID,band_lims_sw) + ! + status = nf90_inq_varid(ncid_sw,'press_ref',varID) + status = nf90_get_var(ncid_sw,varID,press_ref_sw) + ! + status = nf90_inq_varid(ncid_sw,'temp_ref',varID) + status = nf90_get_var(ncid_sw,varID,temp_ref_sw) + ! + status = nf90_inq_varid(ncid_sw,'absorption_coefficient_ref_P',varID) + status = nf90_get_var(ncid_sw,varID,temp_ref_p_sw) + ! + status = nf90_inq_varid(ncid_sw,'absorption_coefficient_ref_T',varID) + status = nf90_get_var(ncid_sw,varID,temp_ref_t_sw) + ! + status = nf90_inq_varid(ncid_sw,'press_ref_trop',varID) + status = nf90_get_var(ncid_sw,varID,press_ref_trop_sw) + ! + status = nf90_inq_varid(ncid_sw,'kminor_lower',varID) + status = nf90_get_var(ncid_sw,varID,kminor_lower_sw) + ! + status = nf90_inq_varid(ncid_sw,'kminor_upper',varID) + status = nf90_get_var(ncid_sw,varID,kminor_upper_sw) + ! + status = nf90_inq_varid(ncid_sw,'vmr_ref',varID) + status = nf90_get_var(ncid_sw,varID,vmr_ref_sw) + ! + status = nf90_inq_varid(ncid_sw,'kmajor',varID) + status = nf90_get_var(ncid_sw,varID,kmajor_sw) + ! + status = nf90_inq_varid(ncid_sw,'kminor_start_lower',varID) + status = nf90_get_var(ncid_sw,varID,kminor_start_lower_sw) + ! + status = nf90_inq_varid(ncid_sw,'kminor_start_upper',varID) + status = nf90_get_var(ncid_sw,varID,kminor_start_upper_sw) + ! + status = nf90_inq_varid(ncid_sw,'solar_source',varID) + status = nf90_get_var(ncid_sw,varID,solar_source_sw) + ! + status = nf90_inq_varid(ncid_sw,'rayl_lower',varID) + status = nf90_get_var(ncid_sw,varID,rayl_lower_sw) + + status = nf90_inq_varid(ncid_sw,'rayl_upper',varID) + status = nf90_get_var(ncid_sw,varID,rayl_upper_sw) + + ! Logical fields are read in as integers and then converted to logicals. + status = nf90_inq_varid(ncid_sw,'minor_scales_with_density_lower',varID) + status = nf90_get_var(ncid_sw,varID,temp1) + minor_scales_with_density_lower_sw(:) = .false. + where(temp1 .eq. 1) minor_scales_with_density_lower_sw(:) = .true. + ! + status = nf90_inq_varid(ncid_sw,'minor_scales_with_density_upper',varID) + status = nf90_get_var(ncid_sw,varID,temp2) + minor_scales_with_density_upper_sw(:) = .false. + where(temp2 .eq. 1) minor_scales_with_density_upper_sw(:) = .true. + ! + status = nf90_inq_varid(ncid_sw,'scale_by_complement_lower',varID) + status = nf90_get_var(ncid_sw,varID,temp3) + scale_by_complement_lower_sw(:) = .false. + where(temp3 .eq. 1) scale_by_complement_lower_sw(:) = .true. + ! + status = nf90_inq_varid(ncid_sw,'scale_by_complement_upper',varID) + status = nf90_get_var(ncid_sw,varID,temp4) + scale_by_complement_upper_sw(:) = .false. + where(temp4 .eq. 1) scale_by_complement_upper_sw(:) = .true. + + ! Close + status = nf90_close(ncid_sw) + endif + endif + + ! Broadcast arrays to all processors +#ifdef MPI + call MPI_BCAST(minor_limits_gpt_upper_sw, size(minor_limits_gpt_upper_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(minor_limits_gpt_lower_sw, size(minor_limits_gpt_lower_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(kminor_start_upper_sw, size(kminor_start_upper_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(kminor_start_lower_sw, size(kminor_start_lower_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(key_species_sw, size(key_species_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(band2gpt_sw, size(band2gpt_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(band_lims_sw, size(band_lims_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(press_ref_sw, size(press_ref_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(temp_ref_sw, size(temp_ref_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(kminor_lower_sw, size(kminor_lower_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(kminor_upper_sw, size(kminor_upper_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(scaling_gas_lower_sw, size(scaling_gas_lower_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(scaling_gas_upper_sw, size(scaling_gas_upper_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(vmr_ref_sw, size(vmr_ref_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(kmajor_sw, size(kmajor_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(temp_ref_p_sw, 1, kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(temp_ref_t_sw, 1, kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(press_ref_trop_sw, 1, kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(solar_source_sw, size(solar_source_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(rayl_lower_sw, size(rayl_lower_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(rayl_upper_sw, size(rayl_upper_sw), kind_phys, mpiroot, mpicomm, ierr) + ! Character arrays + do ij=1,nabsorbers_sw + call MPI_BCAST(gas_names_sw(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) + enddo + do ij=1,nminorabsorbers_sw + call MPI_BCAST(gas_minor_sw(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) + call MPI_BCAST(identifier_minor_sw(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) + enddo + do ij=1,nminor_absorber_intervals_lower_sw + call MPI_BCAST(minor_gases_lower_sw(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) + enddo + do ij=1,nminor_absorber_intervals_upper_sw + call MPI_BCAST(minor_gases_upper_sw(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) + enddo + ! Logical arrays (First convert to integer-array, then broadcast) + ! + allocate(temp_log_array1(nminor_absorber_intervals_lower_sw)) + where(minor_scales_with_density_lower_sw) + temp_log_array1 = 1 + elsewhere + temp_log_array1 = 0 + end where + call MPI_BCAST(temp_log_array1, size(temp_log_array1), MPI_INTEGER, mpiroot, mpicomm, ierr) + ! + allocate(temp_log_array2(nminor_absorber_intervals_lower_sw)) + where(scale_by_complement_lower_sw) + temp_log_array2 = 1 + elsewhere + temp_log_array2 = 0 + end where + call MPI_BCAST(temp_log_array2, size(temp_log_array2), MPI_INTEGER, mpiroot, mpicomm, ierr) + ! + allocate(temp_log_array3(nminor_absorber_intervals_upper_sw)) + where(minor_scales_with_density_upper_sw) + temp_log_array3 = 1 + elsewhere + temp_log_array3 = 0 + end where + call MPI_BCAST(temp_log_array3, size(temp_log_array3), MPI_INTEGER, mpiroot, mpicomm, ierr) + ! + allocate(temp_log_array4(nminor_absorber_intervals_upper_sw)) + where(scale_by_complement_upper_sw) + temp_log_array4 = 1 + elsewhere + temp_log_array4 = 0 + end where + call MPI_BCAST(temp_log_array4, size(temp_log_array4), MPI_INTEGER, mpiroot, mpicomm, ierr) +#endif + + ! Initialize gas concentrations and gas optics class with data + do iGas=1,Model%nGases + call check_error_msg('sw_gas_optics_init',gas_concentrations%set_vmr(Radtend%active_gases(iGas), 0._kind_phys)) + enddo + call check_error_msg('sw_gas_optics_init',sw_gas_props%load(gas_concentrations, gas_names_sw, & + key_species_sw, band2gpt_sw, band_lims_sw, press_ref_sw, press_ref_trop_sw, temp_ref_sw, & + temp_ref_p_sw, temp_ref_t_sw, vmr_ref_sw, kmajor_sw, kminor_lower_sw, kminor_upper_sw, & + gas_minor_sw,identifier_minor_sw, minor_gases_lower_sw, minor_gases_upper_sw, & + minor_limits_gpt_lower_sw,minor_limits_gpt_upper_sw, minor_scales_with_density_lower_sw, & + minor_scales_with_density_upper_sw, scaling_gas_lower_sw, & + scaling_gas_upper_sw, scale_by_complement_lower_sw, & + scale_by_complement_upper_sw, kminor_start_lower_sw, kminor_start_upper_sw, & + solar_source_sw, rayl_lower_sw, rayl_upper_sw)) + + ! Set initial permutation seed for McICA, initially set to number of G-points + ipsdsw0 = sw_gas_props%get_ngpt() + end subroutine rrtmgp_sw_gas_optics_init + + subroutine rrtmgp_sw_gas_optics_run() + end subroutine rrtmgp_sw_gas_optics_run + subroutine rrtmgp_sw_gas_optics_finalize() + end subroutine rrtmgp_sw_gas_optics_finalize + ! ######################################################################################### + ! SUBROUTINE check_error_msg + ! ######################################################################################### + subroutine check_error_msg(routine_name, error_msg) + character(len=*), intent(in) :: & + error_msg, routine_name + + if(error_msg /= "") then + print*,"ERROR("//trim(routine_name)//"): " + print*,trim(error_msg) + return + end if + end subroutine check_error_msg +end module rrtmgp_sw_gas_optics + From 6e2c8bdabcd53657852a1e905995131215ab5518 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Thu, 6 Jun 2019 10:24:02 -0600 Subject: [PATCH 034/167] Some cleaning up since last commit. --- physics/GFS_rrtmgp_lw_post.F90 | 7 +- physics/GFS_rrtmgp_post.F90 | 11 +-- physics/GFS_rrtmgp_pre.F90 | 2 +- physics/GFS_rrtmgp_sw_post.F90 | 2 +- physics/GFS_rrtmgp_sw_pre.F90 | 118 ------------------------ physics/rrtmgp_aux.F90 | 27 ++++++ physics/rrtmgp_lw_cloud_optics.F90 | 111 +++++++++++------------ physics/rrtmgp_lw_gas_optics.F90 | 138 +++++++++++++++-------------- physics/rrtmgp_sw.F90 | 3 +- physics/rrtmgp_sw_cloud_optics.F90 | 116 +++++++++++------------- physics/rrtmgp_sw_gas_optics.F90 | 135 ++++++++++++++-------------- physics/rrtmgp_sw_pre.F90 | 115 ------------------------ 12 files changed, 273 insertions(+), 512 deletions(-) delete mode 100644 physics/GFS_rrtmgp_sw_pre.F90 create mode 100644 physics/rrtmgp_aux.F90 delete mode 100644 physics/rrtmgp_sw_pre.F90 diff --git a/physics/GFS_rrtmgp_lw_post.F90 b/physics/GFS_rrtmgp_lw_post.F90 index ab8c1b2e7..a9415a42f 100644 --- a/physics/GFS_rrtmgp_lw_post.F90 +++ b/physics/GFS_rrtmgp_lw_post.F90 @@ -14,7 +14,7 @@ module GFS_rrtmgp_lw_post use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp use mo_fluxes_byband, only: ty_fluxes_byband use mo_heating_rates, only: compute_heating_rate - use rrtmgp_lw_gas_optics, only: check_error_msg + use rrtmgp_aux, only: check_error_msg implicit none public GFS_rrtmgp_lw_post_init,GFS_rrtmgp_lw_post_run,GFS_rrtmgp_lw_post_finalize @@ -42,7 +42,6 @@ end subroutine GFS_rrtmgp_lw_post_init !! | fluxlwDOWN_allsky | lw_flux_profile_downward_allsky | RRTMGP downward longwave all-sky flux profile | W m-2 | 2 | real | kind_phys | in | F | !! | fluxlwUP_clrsky | lw_flux_profile_upward_clrsky | RRTMGP upward longwave clr-sky flux profile | W m-2 | 2 | real | kind_phys | in | F | !! | fluxlwDOWN_clrsky | lw_flux_profile_downward_clrsky | RRTMGP downward longwave clr-sky flux profile | W m-2 | 2 | real | kind_phys | in | F | -!! | lw_gas_props | coefficients_for_lw_gas_optics | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | !! | hlwc | tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_step | longwave total sky heating rate | K s-1 | 2 | real | kind_phys | out | F | !! | topflx_lw | lw_fluxes_top_atmosphere | longwave total sky fluxes at the top of the atm | W m-2 | 1 | topflw_type | | inout | F | !! | sfcflx_lw | lw_fluxes_sfc | longwave total sky fluxes at the Earth surface | W m-2 | 1 | sfcflw_type | | inout | F | @@ -53,7 +52,7 @@ end subroutine GFS_rrtmgp_lw_post_init !! #endif subroutine GFS_rrtmgp_lw_post_run (Model, Grid, Diag, Radtend, Statein, & - Coupling, im, p_lev, lw_gas_props, & + Coupling, im, p_lev, & tsfa, fluxlwUP_allsky, fluxlwDOWN_allsky, fluxlwUP_clrsky, fluxlwDOWN_clrsky, & hlwc, topflx_lw, sfcflx_lw, flxprf_lw, hlw0, errmsg, errflg) @@ -74,8 +73,6 @@ subroutine GFS_rrtmgp_lw_post_run (Model, Grid, Diag, Radtend, Statein, & im ! Horizontal loop extent real(kind_phys), dimension(size(Grid%xlon,1)), intent(in) :: & tsfa ! Lowest model layer air temperature for radiation - type(ty_gas_optics_rrtmgp),intent(in) :: & - lw_gas_props ! DDT containing LW spectral information real(kind_phys), dimension(size(Grid%xlon,1), Model%levs+1), intent(in) :: & p_lev ! Pressure @ model layer-interfaces (hPa) real(kind_phys), dimension(size(Grid%xlon,1), Model%levs+1), intent(in) :: & diff --git a/physics/GFS_rrtmgp_post.F90 b/physics/GFS_rrtmgp_post.F90 index 020f37c86..ce18c8880 100644 --- a/physics/GFS_rrtmgp_post.F90 +++ b/physics/GFS_rrtmgp_post.F90 @@ -221,14 +221,5 @@ end subroutine GFS_rrtmgp_post_run subroutine GFS_rrtmgp_post_finalize () end subroutine GFS_rrtmgp_post_finalize - subroutine check_error_msg(routine_name, error_msg) - character(len=*), intent(in) :: & - error_msg, routine_name - - if(error_msg /= "") then - print*,"ERROR("//trim(routine_name)//"): " - print*,trim(error_msg) - return - end if - end subroutine check_error_msg + end module GFS_rrtmgp_post diff --git a/physics/GFS_rrtmgp_pre.F90 b/physics/GFS_rrtmgp_pre.F90 index 85b151bc2..5dcd9a199 100644 --- a/physics/GFS_rrtmgp_pre.F90 +++ b/physics/GFS_rrtmgp_pre.F90 @@ -54,7 +54,7 @@ module GFS_rrtmgp_pre ! RRTMGP types use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp use mo_gas_concentrations, only: ty_gas_concs - use rrtmgp_lw_gas_optics, only: check_error_msg + use rrtmgp_aux, only: check_error_msg real(kind_phys), parameter :: & amd = 28.9644_kind_phys, & ! Molecular weight of dry-air (g/mol) diff --git a/physics/GFS_rrtmgp_sw_post.F90 b/physics/GFS_rrtmgp_sw_post.F90 index a804a2e01..122ce3f44 100644 --- a/physics/GFS_rrtmgp_sw_post.F90 +++ b/physics/GFS_rrtmgp_sw_post.F90 @@ -14,7 +14,7 @@ module GFS_rrtmgp_sw_post use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp use mo_fluxes_byband, only: ty_fluxes_byband use mo_heating_rates, only: compute_heating_rate - use rrtmgp_sw_gas_optics, only: check_error_msg + use rrtmgp_aux, only: check_error_msg implicit none public GFS_rrtmgp_sw_post_init,GFS_rrtmgp_sw_post_run,GFS_rrtmgp_sw_post_finalize diff --git a/physics/GFS_rrtmgp_sw_pre.F90 b/physics/GFS_rrtmgp_sw_pre.F90 deleted file mode 100644 index 3ca2c3910..000000000 --- a/physics/GFS_rrtmgp_sw_pre.F90 +++ /dev/null @@ -1,118 +0,0 @@ -!>\file GFS_rrtmgp_sw_pre.f90 -!! This file contains a subroutine to module_radiation_surface::setalb() to -!! setup surface albedo for SW radiation. - module GFS_rrtmgp_sw_pre - contains - -!>\defgroup GFS_rrtmgp_sw_pre GFS RRTMGP scheme Pre -!! @{ -!> \section arg_table_GFS_rrtmgp_sw_pre_init Argument Table -!! - subroutine GFS_rrtmgp_sw_pre_init () - end subroutine GFS_rrtmgp_sw_pre_init - -!> \section arg_table_GFS_rrtmgp_sw_pre_run Argument Table -!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | -!! |----------------|-------------------------------------------|--------------------------------------------------------------------|----------|------|------------------|-----------|--------|----------| -!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | -!! | Grid | GFS_grid_type_instance | Fortran DDT containing FV3-GFS grid and interpolation related data | DDT | 0 | GFS_grid_type | | in | F | -!! | Sfcprop | GFS_sfcprop_type_instance | Fortran DDT containing FV3-GFS surface fields | DDT | 0 | GFS_sfcprop_type | | in | F | -!! | Radtend | GFS_radtend_type_instance | Fortran DDT containing FV3-GFS radiation tendencies | DDT | 0 | GFS_radtend_type | | inout | F | -!! | im | horizontal_loop_extent | horizontal loop extent | count | 0 | integer | | in | F | -!! | nday | daytime_points_dimension | daytime points dimension | count | 0 | integer | | out | F | -!! | idxday | daytime_points | daytime points | index | 1 | integer | | out | F | -!! | tsfg | surface_ground_temperature_for_radiation | surface ground temperature for radiation | K | 1 | real | kind_phys | in | F | -!! | tsfa | surface_air_temperature_for_radiation | lowest model layer air temperature for radiation | K | 1 | real | kind_phys | in | F | -!! | sfcalb1 | surface_albedo_due_to_near_IR_direct | surface albedo due to near IR direct beam | frac | 1 | real | kind_phys | out | F | -!! | sfcalb2 | surface_albedo_due_to_near_IR_diffused | surface albedo due to near IR diffused beam | frac | 1 | real | kind_phys | out | F | -!! | sfcalb3 | surface_albedo_due_to_UV_and_VIS_direct | surface albedo due to UV+VIS direct beam | frac | 1 | real | kind_phys | out | F | -!! | sfcalb4 | surface_albedo_due_to_UV_and_VIS_diffused | surface albedo due to UV+VIS diffused beam | frac | 1 | real | kind_phys | out | F | -!! | alb1d | surface_albedo_perturbation | surface albedo perturbation | frac | 1 | real | kind_phys | in | F | -!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | -!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | -!! - subroutine GFS_rrtmgp_sw_pre_run (Model, Grid, Sfcprop, Radtend, im, & - nday, idxday, tsfg, tsfa, sfcalb1, sfcalb2, sfcalb3, sfcalb4, & - alb1d, errmsg, errflg) - - use machine, only: kind_phys - - use GFS_typedefs, only: GFS_control_type, & - GFS_grid_type, & - GFS_radtend_type, & - GFS_sfcprop_type - use module_radiation_surface, only: NF_ALBD, setalb - - implicit none - - type(GFS_control_type), intent(in) :: Model - type(GFS_radtend_type), intent(inout) :: Radtend - type(GFS_sfcprop_type), intent(in) :: Sfcprop - type(GFS_grid_type), intent(in) :: Grid - integer, intent(in) :: im - integer, intent(out) :: nday - integer, dimension(size(Grid%xlon,1)), intent(out) :: idxday - real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(in) :: tsfa, tsfg - real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(out) :: sfcalb1, sfcalb2, sfcalb3, sfcalb4 - real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(in) :: alb1d - character(len=*), intent(out) :: errmsg - integer, intent(out) :: errflg - ! Local variables - integer :: i - real(kind=kind_phys), dimension(size(Grid%xlon,1),NF_ALBD) :: sfcalb - - ! Initialize CCPP error handling variables - errmsg = '' - errflg = 0 - -! --- ... start radiation calculations -! remember to set heating rate unit to k/sec! -!> -# Start SW radiation calculations - if (Model%lsswr) then - -!> - Check for daytime points for SW radiation. - nday = 0 - idxday = 0 - do i = 1, IM - if (Radtend%coszen(i) >= 0.0001) then - nday = nday + 1 - idxday(nday) = i - endif - enddo - -!> - Call module_radiation_surface::setalb() to setup surface albedo. -!! for SW radiation. - - call setalb (Sfcprop%slmsk, Sfcprop%snowd, Sfcprop%sncovr,& ! --- inputs: - Sfcprop%snoalb, Sfcprop%zorl, Radtend%coszen,& - tsfg, tsfa, Sfcprop%hprim, Sfcprop%alvsf, & - Sfcprop%alnsf, Sfcprop%alvwf, Sfcprop%alnwf, & - Sfcprop%facsf, Sfcprop%facwf, Sfcprop%fice, & - Sfcprop%tisfc, IM, & - alb1d, Model%pertalb, & ! mg, sfc-perts - sfcalb) ! --- outputs - -!> -# Approximate mean surface albedo from vis- and nir- diffuse values. - Radtend%sfalb(:) = max(0.01, 0.5 * (sfcalb(:,2) + sfcalb(:,4))) - else - nday = 0 - idxday = 0 - sfcalb = 0.0 - endif - - do i = 1, im - sfcalb1(i) = sfcalb(i,1) - sfcalb2(i) = sfcalb(i,2) - sfcalb3(i) = sfcalb(i,3) - sfcalb4(i) = sfcalb(i,4) - enddo - - end subroutine GFS_rrtmgp_sw_pre_run - -!> \section arg_table_GFS_rrtmgp_sw_pre_finalize Argument Table -!! - subroutine GFS_rrtmgp_sw_pre_finalize () - end subroutine GFS_rrtmgp_sw_pre_finalize - -!! @} - end module GFS_rrtmgp_sw_pre diff --git a/physics/rrtmgp_aux.F90 b/physics/rrtmgp_aux.F90 new file mode 100644 index 000000000..2df87992f --- /dev/null +++ b/physics/rrtmgp_aux.F90 @@ -0,0 +1,27 @@ +module rrtmgp_aux + implicit none +contains + ! + subroutine rrtmgp_aux_init() + end subroutine rrtmgp_aux_init + ! + subroutine rrtmgp_aux_run() + end subroutine rrtmgp_aux_run + ! + subroutine rrtmgp_aux_finalize() + end subroutine rrtmgp_aux_finalize + + ! ######################################################################################### + ! SUBROUTINE check_error_msg + ! ######################################################################################### + subroutine check_error_msg(routine_name, error_msg) + character(len=*), intent(in) :: & + error_msg, routine_name + + if(error_msg /= "") then + print*,"ERROR("//trim(routine_name)//"): " + print*,trim(error_msg) + return + end if + end subroutine check_error_msg +end module rrtmgp_aux diff --git a/physics/rrtmgp_lw_cloud_optics.F90 b/physics/rrtmgp_lw_cloud_optics.F90 index 2434e025f..884101046 100644 --- a/physics/rrtmgp_lw_cloud_optics.F90 +++ b/physics/rrtmgp_lw_cloud_optics.F90 @@ -9,10 +9,9 @@ module rrtmgp_lw_cloud_optics use mo_cloud_sampling, only: sampled_mask_max_ran, sampled_mask_exp_ran, draw_samples use mersenne_twister, only: random_setseed, random_number, random_stat use mo_rrtmg_lw_cloud_optics, only: rrtmg_lw_cloud_optics - use rrtmgp_lw_gas_optics, only: ipsdlw0 + use rrtmgp_aux, only: check_error_msg use netcdf - integer :: nrghice_lw public rrtmgp_lw_cloud_optics_init, rrtmgp_lw_cloud_optics_run, rrtmgp_lw_cloud_optics_finalize contains @@ -54,46 +53,47 @@ subroutine rrtmgp_lw_cloud_optics_init(Model, mpicomm, mpirank, mpiroot, lw_clou ! Variables that will be passed to cloud_optics%load() real(kind_phys) :: & - radliq_lwr, & ! used by RRTMGP cloud optics - radliq_upr, & ! used by RRTMGP cloud optics - radliq_fac, & ! used by RRTMGP cloud optics - radice_lwr, & ! used by RRTMGP cloud optics - radice_upr, & ! used by RRTMGP cloud optics - radice_fac ! used by RRTMGP cloud optics + radliq_lwr, & ! + radliq_upr, & ! + radliq_fac, & ! + radice_lwr, & ! + radice_upr, & ! + radice_fac ! real(kind_phys), dimension(:), allocatable :: & - pade_sizereg_extliq, & ! used by RRTMGP cloud optics - pade_sizereg_ssaliq, & ! used by RRTMGP cloud optics - pade_sizereg_asyliq, & ! used by RRTMGP cloud optics - pade_sizereg_extice, & ! used by RRTMGP cloud optics - pade_sizereg_ssaice, & ! used by RRTMGP cloud optics - pade_sizereg_asyice ! used by RRTMGP cloud optics + pade_sizereg_extliq, & ! + pade_sizereg_ssaliq, & ! + pade_sizereg_asyliq, & ! + pade_sizereg_extice, & ! + pade_sizereg_ssaice, & ! + pade_sizereg_asyice ! real(kind_phys), dimension(:,:), allocatable :: & - lut_extliq, & ! used by RRTMGP cloud optics - lut_ssaliq, & ! used by RRTMGP cloud optics - lut_asyliq, & ! used by RRTMGP cloud optics - band_lims_cldy ! used by RRTMGP cloud optics + lut_extliq, & ! + lut_ssaliq, & ! + lut_asyliq, & ! + band_lims_cldy ! real(kind_phys), dimension(:,:,:), allocatable :: & - lut_extice, & ! used by RRTMGP cloud optics - lut_ssaice, & ! used by RRTMGP cloud optics - lut_asyice, & ! used by RRTMGP cloud optics - pade_extliq, & ! used by RRTMGP cloud optics - pade_ssaliq, & ! used by RRTMGP cloud optics - pade_asyliq ! used by RRTMGP cloud optics + lut_extice, & ! + lut_ssaice, & ! + lut_asyice, & ! + pade_extliq, & ! + pade_ssaliq, & ! + pade_asyliq ! real(kind_phys), dimension(:,:,:,:), allocatable :: & - pade_extice, & ! used by RRTMGP cloud optics - pade_ssaice, & ! used by RRTMGP cloud optics - pade_asyice ! used by RRTMGP cloud optics + pade_extice, & ! + pade_ssaice, & ! + pade_asyice ! ! Dimensions integer :: & - nbandLWcldy, & ! used by RRTMGP cloud optics - nsize_liq, & ! used by RRTMGP cloud optics - nsize_ice, & ! used by RRTMGP cloud optics - nsizereg, & ! used by RRTMGP cloud optics - ncoeff_ext, & ! used by RRTMGP cloud optics - ncoeff_ssa_g, & ! used by RRTMGP cloud optics - nbound, & ! used by RRTMGP cloud optics - npairsLWcldy ! used by RRTMGP cloud optics + nrghice_lw, & ! Number of ice-roughness categories in file + nbandLWcldy, & ! + nsize_liq, & ! + nsize_ice, & ! + nsizereg, & ! + ncoeff_ext, & ! + ncoeff_ssa_g, & ! + nbound, & ! + npairsLWcldy ! ! Local variables integer :: dimID,varID,status,igpt,iGas,ij,ierr,ncid_lw_clds @@ -133,6 +133,11 @@ subroutine rrtmgp_lw_cloud_optics_init(Model, mpicomm, mpirank, mpiroot, lw_clou endif endif + ! Check to ensure that number of ice-roughness categories is feasible. + if (Model%rrtmgp_nrghice .gt. nrghice_lw) then + errmsg = 'Number of RRTMGP ice-roughness categories requested in namelist file is not allowed' + endif + ! Broadcast dimensions to all processors #ifdef MPI if (Model%rrtmgp_cld_optics .eq. 1 .or. Model%rrtmgp_cld_optics .eq. 2) then @@ -290,14 +295,13 @@ subroutine rrtmgp_lw_cloud_optics_init(Model, mpicomm, mpirank, mpiroot, lw_clou #endif ! Load tables data for RRTMGP cloud-optics + call check_error_msg('lw_cloud_optics_init',lw_cloud_props%set_ice_roughness(Model%rrtmgp_nrghice)) if (Model%rrtmgp_cld_optics .eq. 1) then - call check_error_msg('lw_cloud_optics_init',lw_cloud_props%set_ice_roughness(nrghice_lw)) call check_error_msg('lw_cloud_optics_init',lw_cloud_props%load(band_lims_cldy, & radliq_lwr, radliq_upr, radliq_fac, radice_lwr, radice_upr, radice_fac, & lut_extliq, lut_ssaliq, lut_asyliq, lut_extice, lut_ssaice, lut_asyice)) endif if (Model%rrtmgp_cld_optics .eq. 2) then - call check_error_msg('lw_cloud_optics_init',lw_cloud_props%set_ice_roughness(nrghice_lw)) call check_error_msg('lw_cloud_optics_init',lw_cloud_props%load(band_lims_cldy, & pade_extliq, pade_ssaliq, pade_asyliq, pade_extice, pade_ssaice, & pade_asyice, pade_sizereg_extliq, pade_sizereg_ssaliq, pade_sizereg_asyliq,& @@ -311,7 +315,6 @@ end subroutine rrtmgp_lw_cloud_optics_init !! |-----------------------|-----------------------------------------------------|------------------------------------------------------------------------------|---------|------|-----------------------|-----------|--------|----------| !! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | !! | ncol | horizontal_loop_extent | horizontal dimension | count | 0 | integer | | in | F | -!! | ngpts_lw | number_of_spectral_points_for_LW_calculation | Number of spectral points for LW RRTMGP calculation | none | 0 | integer | | in | F | !! | p_lay | air_pressure_at_layer_for_RRTMGP_in_hPa | air pressure layer | hPa | 2 | real | kind_phys | in | F | !! | t_lay | air_temperature_at_layer_for_RRTMGP | air temperature layer | K | 2 | real | kind_phys | in | F | !! | p_lev | air_pressure_at_interface_for_RRTMGP_in_hPa | air pressure level | hPa | 2 | real | kind_phys | in | F | @@ -328,6 +331,7 @@ end subroutine rrtmgp_lw_cloud_optics_init !! | aerosols | aerosol_optical_properties_for_longwave_bands_01-16 | aerosol optical properties for longwave bands 01-16 | various | 4 | real | kind_phys | in | F | !! | lw_cloud_props | coefficients_for_lw_cloud_optics | DDT containing spectral information for cloudy RRTMGP LW radiation scheme | DDT | 0 | ty_cloud_optics | | in | F | !! | lw_gas_props | coefficients_for_lw_gas_optics | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | +!! | ipsdlw0 | initial_permutation_seed_lw | initial seed for McICA LW | none | 0 | integer | | in | F | !! | optical_props_clouds | longwave_optical_properties_for_cloudy_atmosphere | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_1scl | | out | F | !! | optical_props_aerosol | longwave_optical_properties_for_aerosols | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_1scl | | out | F | !! | cldtaulw | cloud_optical_depth_layers_at_10mu_band | approx 10mu band layer cloud optical depth | none | 2 | real | kind_phys | out | F | @@ -337,9 +341,9 @@ end subroutine rrtmgp_lw_cloud_optics_init ! ######################################################################################### ! SUBROUTINE rrtmgp_lw_cloud_optics_run() ! ######################################################################################### - subroutine rrtmgp_lw_cloud_optics_run(Model, ncol, ngpts_lw, icseed_lw, p_lay, t_lay, p_lev, cld_frac, & + subroutine rrtmgp_lw_cloud_optics_run(Model, ncol, icseed_lw, p_lay, t_lay, p_lev, cld_frac, & cld_lwp, cld_reliq, cld_iwp, cld_reice, cld_swp, cld_resnow, cld_rwp, cld_rerain, & - aerosols, lw_cloud_props, lw_gas_props, & + aerosols, lw_cloud_props, lw_gas_props, ipsdlw0, & optical_props_clouds, optical_props_aerosol, cldtaulw, errmsg, errflg) ! Inputs @@ -347,7 +351,7 @@ subroutine rrtmgp_lw_cloud_optics_run(Model, ncol, ngpts_lw, icseed_lw, p_lay, t Model ! DDT containing FV3-GFS model control parameters integer, intent(in) :: & ncol, & ! Number of horizontal gridpoints - ngpts_lw ! Number of spectral points + ipsdlw0 ! Initial permutation seed for McICA integer,intent(in),dimension(ncol) :: & icseed_lw ! auxiliary special cloud related array when module ! variable isubclw=2, it provides permutation seed @@ -392,9 +396,9 @@ subroutine rrtmgp_lw_cloud_optics_run(Model, ncol, ngpts_lw, icseed_lw, p_lay, t logical,dimension(ncol,model%levs) :: liqmask, icemask type(ty_optical_props_1scl) :: optical_props_cloudsByBand type(random_stat) :: rng_stat - real(kind_phys), dimension(ngpts_lw,model%levs,ncol) :: rng3D - real(kind_phys), dimension(ngpts_lw*model%levs) :: rng1D - logical, dimension(ncol,model%levs,ngpts_lw) :: cldfracMCICA + real(kind_phys), dimension(lw_gas_props%get_ngpt(),model%levs,ncol) :: rng3D + real(kind_phys), dimension(lw_gas_props%get_ngpt()*model%levs) :: rng1D + logical, dimension(ncol,model%levs,lw_gas_props%get_ngpt()) :: cldfracMCICA real(kind_phys), dimension(ncol,model%levs,lw_cloud_props%get_nband()) :: & tau_cld @@ -450,7 +454,7 @@ subroutine rrtmgp_lw_cloud_optics_run(Model, ncol, ngpts_lw, icseed_lw, p_lay, t ncol, & ! IN - Number of horizontal gridpoints model%levs, & ! IN - Number of vertical layers lw_cloud_props%get_nband(), & ! IN - Number of LW bands - nrghice_lw, & ! IN - Number of ice-roughness categories + Model%rrtmgp_nrghice, & ! IN - Number of ice-roughness categories liqmask, & ! IN - Liquid-cloud mask icemask, & ! IN - Ice-cloud mask cld_lwp, & ! IN - Cloud liquid water path @@ -477,7 +481,7 @@ subroutine rrtmgp_lw_cloud_optics_run(Model, ncol, ngpts_lw, icseed_lw, p_lay, t do iCol=1,ncol call random_setseed(ipseed_lw(icol),rng_stat) call random_number(rng1D,rng_stat) - rng3D(:,:,iCol) = reshape(source = rng1D,shape=[ngpts_lw,model%levs]) + rng3D(:,:,iCol) = reshape(source = rng1D,shape=[lw_gas_props%get_ngpt(),model%levs]) enddo ! Call McICA @@ -500,19 +504,4 @@ end subroutine rrtmgp_lw_cloud_optics_run ! ######################################################################################### subroutine rrtmgp_lw_cloud_optics_finalize() end subroutine rrtmgp_lw_cloud_optics_finalize - - ! ######################################################################################### - ! SUBROUTINE check_error_msg - ! ######################################################################################### - subroutine check_error_msg(routine_name, error_msg) - character(len=*), intent(in) :: & - error_msg, routine_name - - if(error_msg /= "") then - print*,"ERROR("//trim(routine_name)//"): " - print*,trim(error_msg) - return - end if - end subroutine check_error_msg - end module rrtmgp_lw_cloud_optics diff --git a/physics/rrtmgp_lw_gas_optics.F90 b/physics/rrtmgp_lw_gas_optics.F90 index 1cbe878ae..2e28b59be 100644 --- a/physics/rrtmgp_lw_gas_optics.F90 +++ b/physics/rrtmgp_lw_gas_optics.F90 @@ -3,13 +3,18 @@ module rrtmgp_lw_gas_optics use GFS_typedefs, only: GFS_control_type, GFS_radtend_type use mo_rte_kind, only: wl use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp - use mo_gas_concentrations, only: ty_gas_concs + use mo_gas_concentrations, only: ty_gas_concs + use rrtmgp_aux, only: check_error_msg use netcdf ! Parameters - integer :: ipsdlw0 + contains + + ! ######################################################################################### + ! SUBROUTINE rrtmgp_sw_gas_optics_init + ! ######################################################################################### !! \section arg_table_rrtmgp_lw_gas_optics_init Argument Table !! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | !! |--------------|----------------------------------------------|--------------------------------------------------------------------|-------|------|----------------------|-------|--------|----------| @@ -20,13 +25,11 @@ module rrtmgp_lw_gas_optics !! | mpicomm | mpi_comm | MPI communicator | index | 0 | integer | | in | F | !! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | !! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! | ipsdlw0 | initial_permutation_seed_lw | initial seed for McICA LW | none | 0 | integer | | out | F | !! | lw_gas_props | coefficients_for_lw_gas_optics | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | out | F | -!! | ngpts_lw | number_of_spectral_points_for_LW_calculation | Number of spectral points for LW RRTMGP calculation | none | 0 | integer | | out | F | !! - ! ######################################################################################### - ! ######################################################################################### subroutine rrtmgp_lw_gas_optics_init(Model, Radtend, mpicomm, mpirank, mpiroot, lw_gas_props, & - ngpts_lw, errmsg, errflg) + ipsdlw0, errmsg, errflg) use netcdf #ifdef MPI @@ -47,9 +50,8 @@ subroutine rrtmgp_lw_gas_optics_init(Model, Radtend, mpicomm, mpirank, mpiroot, character(len=*), intent(out) :: & errmsg ! Error message integer, intent(out) :: & - errflg ! Error code - integer, intent(out) :: & - ngpts_lw ! Number of g-points + errflg, & ! Error code + ipsdlw0 type(ty_gas_optics_rrtmgp),intent(out) :: & lw_gas_props ! DDT containing spectral information for RRTMGP LW radiation scheme @@ -57,63 +59,64 @@ subroutine rrtmgp_lw_gas_optics_init(Model, Radtend, mpicomm, mpirank, mpiroot, type(ty_gas_concs) :: & gas_concentrations integer, dimension(:), allocatable :: & - kminor_start_lower, & ! used by RRTMGP gas optics - kminor_start_upper ! used by RRTMGP gas optics + kminor_start_lower, & ! + kminor_start_upper ! integer, dimension(:,:), allocatable :: & - band2gpt, & ! used by RRTMGP gas optics - minor_limits_gpt_lower, & ! used by RRTMGP gas optics - minor_limits_gpt_upper ! used by RRTMGP gas optics + band2gpt, & ! + minor_limits_gpt_lower, & ! + minor_limits_gpt_upper ! integer, dimension(:,:,:), allocatable :: & - key_species ! used by RRTMGP gas optics + key_species ! real(kind_phys) :: & - press_ref_trop, & ! used by RRTMGP gas optics - temp_ref_p, & ! used by RRTMGP gas optics - temp_ref_t ! used by RRTMGP gas optics + press_ref_trop, & ! + temp_ref_p, & ! + temp_ref_t ! real(kind_phys), dimension(:), allocatable :: & - press_ref, & ! used by RRTMGP gas optics - temp_ref ! used by RRTMGP gas optics + press_ref, & ! + temp_ref ! real(kind_phys), dimension(:,:), allocatable :: & - band_lims, & ! used by RRTMGP gas optics - totplnk ! used by RRTMGP gas optics + band_lims, & ! + totplnk ! real(kind_phys), dimension(:,:,:), allocatable :: & - vmr_ref, & ! used by RRTMGP gas optics - kminor_lower, & ! used by RRTMGP gas optics - kminor_upper, & ! used by RRTMGP gas optics - rayl_lower, & ! used by RRTMGP gas optics - rayl_upper ! used by RRTMGP gas optics + vmr_ref, & ! + kminor_lower, & ! + kminor_upper, & ! + rayl_lower, & ! + rayl_upper ! real(kind_phys), dimension(:,:,:,:), allocatable :: & - kmajor, & ! used by RRTMGP gas optics - planck_frac ! used by RRTMGP gas optics + kmajor, & ! + planck_frac ! character(len=32), dimension(:), allocatable :: & - gas_names, & ! used by RRTMGP gas optics - gas_minor, & ! used by RRTMGP gas optics - identifier_minor, & ! used by RRTMGP gas optics - minor_gases_lower, & ! used by RRTMGP gas optics - minor_gases_upper, & ! used by RRTMGP gas optics - scaling_gas_lower, & ! used by RRTMGP gas optics - scaling_gas_upper ! used by RRTMGP gas optics + gas_names, & ! + gas_minor, & ! + identifier_minor, & ! + minor_gases_lower, & ! + minor_gases_upper, & ! + scaling_gas_lower, & ! + scaling_gas_upper ! logical(wl), dimension(:), allocatable :: & - minor_scales_with_density_lower, & ! used by RRTMGP gas optics - minor_scales_with_density_upper, & ! used by RRTMGP gas optics - scale_by_complement_lower, & ! used by RRTMGP gas optics - scale_by_complement_upper ! used by RRTMGP gas optics + minor_scales_with_density_lower, & ! + minor_scales_with_density_upper, & ! + scale_by_complement_lower, & ! + scale_by_complement_upper ! ! Dimensions (to be broadcast across all processors) integer :: & - ntemps, & ! used by RRTMGP gas optics - npress, & ! used by RRTMGP gas optics - nabsorbers, & ! used by RRTMGP gas optics - nextrabsorbers, & ! used by RRTMGP gas optics - nminorabsorbers, & ! used by RRTMGP gas optics - nmixingfracs, & ! used by RRTMGP gas optics - nlayers, & ! used by RRTMGP gas optics - nbnds, & ! used by RRTMGP gas optics - npairs, & ! used by RRTMGP gas optics - ninternalSourcetemps, & ! used by RRTMGP gas optics - nminor_absorber_intervals_lower, & ! used by RRTMGP gas optics - nminor_absorber_intervals_upper, & ! used by RRTMGP gas optics - ncontributors_lower, & ! used by RRTMGP gas optics - ncontributors_upper ! used by RRTMGP gas optics + ntemps, & ! + npress, & ! + ngpts_lw, & ! + nabsorbers, & ! + nextrabsorbers, & ! + nminorabsorbers, & ! + nmixingfracs, & ! + nlayers, & ! + nbnds, & ! + npairs, & ! + ninternalSourcetemps, & ! + nminor_absorber_intervals_lower, & ! + nminor_absorber_intervals_upper, & ! + ncontributors_lower, & ! + ncontributors_upper ! ! Local variables integer :: ncid_lw,dimID,varID,status,igpt,iGas,ij,ierr @@ -409,22 +412,21 @@ subroutine rrtmgp_lw_gas_optics_init(Model, Radtend, mpicomm, mpirank, mpiroot, ipsdlw0 = lw_gas_props%get_ngpt() end subroutine rrtmgp_lw_gas_optics_init + ! ######################################################################################### + ! SUBROUTINE rrtmgp_lw_gas_optics_run + ! *NOTE* The computation of the optical properties for a gaseous (+aerosols) atmosphere are + ! handled internally by the rte-rrtmgp/extensions/mo_rrtmgp_clr_all_sky.F90:rte_sw() + ! driver. + ! If calling rte/mo_rte_sw.F90:rte_sw() directly, place calls to compute source + ! function and gas_optics() here. + ! ######################################################################################### subroutine rrtmgp_lw_gas_optics_run() end subroutine rrtmgp_lw_gas_optics_run - subroutine rrtmgp_lw_gas_optics_finalize() - end subroutine rrtmgp_lw_gas_optics_finalize - ! ######################################################################################### - ! SUBROUTINE check_error_msg ! ######################################################################################### - subroutine check_error_msg(routine_name, error_msg) - character(len=*), intent(in) :: & - error_msg, routine_name - - if(error_msg /= "") then - print*,"ERROR("//trim(routine_name)//"): " - print*,trim(error_msg) - return - end if - end subroutine check_error_msg + ! SUBROUTINE rrtmgp_lw_gas_optics_finalize + ! ######################################################################################### + subroutine rrtmgp_lw_gas_optics_finalize() + end subroutine rrtmgp_lw_gas_optics_finalize + end module rrtmgp_lw_gas_optics diff --git a/physics/rrtmgp_sw.F90 b/physics/rrtmgp_sw.F90 index 677113886..1f24190b7 100644 --- a/physics/rrtmgp_sw.F90 +++ b/physics/rrtmgp_sw.F90 @@ -12,7 +12,8 @@ module rrtmgp_sw use mo_fluxes_byband, only: ty_fluxes_byband use module_radsw_parameters, only: cmpfsw_type use rrtmgp_sw_cloud_optics, only: rrtmgp_sw_cloud_optics_init - use rrtmgp_sw_gas_optics, only: rrtmgp_sw_gas_optics_init, check_error_msg + use rrtmgp_sw_gas_optics, only: rrtmgp_sw_gas_optics_init + use rrtmgp_aux, only: check_error_msg public rrtmgp_sw_init, rrtmgp_sw_run, rrtmgp_sw_finalize diff --git a/physics/rrtmgp_sw_cloud_optics.F90 b/physics/rrtmgp_sw_cloud_optics.F90 index 809be4a77..58d62d50d 100644 --- a/physics/rrtmgp_sw_cloud_optics.F90 +++ b/physics/rrtmgp_sw_cloud_optics.F90 @@ -9,10 +9,9 @@ module rrtmgp_sw_cloud_optics use mo_cloud_sampling, only: sampled_mask_max_ran, sampled_mask_exp_ran, draw_samples use mersenne_twister, only: random_setseed, random_number, random_stat use mo_rrtmg_sw_cloud_optics, only: rrtmg_sw_cloud_optics - use rrtmgp_sw_gas_optics, only: ipsdsw0 + use rrtmgp_aux, only: check_error_msg use netcdf - integer :: nrghice_sw contains !! \section arg_table_rrtmgp_sw_cloud_optics_init Argument Table @@ -54,47 +53,48 @@ subroutine rrtmgp_sw_cloud_optics_init(Model,mpicomm, mpirank, mpiroot, sw_cloud ! Variables that will be passed to cloud_optics%load() real(kind_phys) :: & - radliq_lwr_sw, & ! used by RRTMGP cloud optics - radliq_upr_sw, & ! used by RRTMGP cloud optics - radliq_fac_sw, & ! used by RRTMGP cloud optics - radice_lwr_sw, & ! used by RRTMGP cloud optics - radice_upr_sw, & ! used by RRTMGP cloud optics - radice_fac_sw ! used by RRTMGP cloud optics + radliq_lwr_sw, & ! + radliq_upr_sw, & ! + radliq_fac_sw, & ! + radice_lwr_sw, & ! + radice_upr_sw, & ! + radice_fac_sw ! real(kind_phys), dimension(:), allocatable :: & - pade_sizereg_extliq_sw, & ! used by RRTMGP cloud optics - pade_sizereg_ssaliq_sw, & ! used by RRTMGP cloud optics - pade_sizereg_asyliq_sw, & ! used by RRTMGP cloud optics - pade_sizereg_extice_sw, & ! used by RRTMGP cloud optics - pade_sizereg_ssaice_sw, & ! used by RRTMGP cloud optics - pade_sizereg_asyice_sw ! used by RRTMGP cloud optics + pade_sizereg_extliq_sw, & ! + pade_sizereg_ssaliq_sw, & ! + pade_sizereg_asyliq_sw, & ! + pade_sizereg_extice_sw, & ! + pade_sizereg_ssaice_sw, & ! + pade_sizereg_asyice_sw ! real(kind_phys), dimension(:,:), allocatable :: & - lut_extliq_sw, & ! used by RRTMGP cloud optics - lut_ssaliq_sw, & ! used by RRTMGP cloud optics - lut_asyliq_sw, & ! used by RRTMGP cloud optics - band_lims_cldy_sw ! used by RRTMGP cloud optics + lut_extliq_sw, & ! + lut_ssaliq_sw, & ! + lut_asyliq_sw, & ! + band_lims_cldy_sw ! real(kind_phys), dimension(:,:,:), allocatable :: & - lut_extice_sw, & ! used by RRTMGP cloud optics - lut_ssaice_sw, & ! used by RRTMGP cloud optics - lut_asyice_sw, & ! used by RRTMGP cloud optics - pade_extliq_sw, & ! used by RRTMGP cloud optics - pade_ssaliq_sw, & ! used by RRTMGP cloud optics - pade_asyliq_sw ! used by RRTMGP cloud optics + lut_extice_sw, & ! + lut_ssaice_sw, & ! + lut_asyice_sw, & ! + pade_extliq_sw, & ! + pade_ssaliq_sw, & ! + pade_asyliq_sw ! real(kind_phys), dimension(:,:,:,:), allocatable :: & - pade_extice_sw, & ! used by RRTMGP cloud optics - pade_ssaice_sw, & ! used by RRTMGP cloud optics - pade_asyice_sw ! used by RRTMGP cloud optics + pade_extice_sw, & ! + pade_ssaice_sw, & ! + pade_asyice_sw ! ! Dimensions (to be broadcast across all processors) integer :: & - nbandSWcldy_sw, & ! used by RRTMGP cloud optics - nsize_liq_sw, & ! used by RRTMGP cloud optics - nsize_ice_sw, & ! used by RRTMGP cloud optics - nsizereg_sw, & ! used by RRTMGP cloud optics - ncoeff_ext_sw, & ! used by RRTMGP cloud optics - ncoeff_ssa_g_sw, & ! used by RRTMGP cloud optics - nbound_sw, & ! used by RRTMGP cloud optics - npairsSWcldy_sw ! used by RRTMGP cloud optics + nrghice_sw, & ! Number of ice-roughness categories in file + nbandSWcldy_sw, & ! + nsize_liq_sw, & ! + nsize_ice_sw, & ! + nsizereg_sw, & ! + ncoeff_ext_sw, & ! + ncoeff_ssa_g_sw, & ! + nbound_sw, & ! + npairsSWcldy_sw ! ! Local variables integer :: status,ncid_sw_clds,dimid,varID,iGas @@ -131,6 +131,11 @@ subroutine rrtmgp_sw_cloud_optics_init(Model,mpicomm, mpirank, mpiroot, sw_cloud status = nf90_close(ncid_sw_clds) endif endif + + ! Check to ensure that number of ice-roughness categories is feasible. + if (Model%rrtmgp_nrghice .gt. nrghice_sw) then + errmsg = 'Number of RRTMGP ice-roughness categories requested in namelist file is not allowed' + endif ! Broadcast dimensions to all processors #ifdef MPI @@ -289,15 +294,14 @@ subroutine rrtmgp_sw_cloud_optics_init(Model,mpicomm, mpirank, mpiroot, sw_cloud #endif ! Load tables data for RRTMGP cloud-optics + call check_error_msg('sw_cloud_optics_init',sw_cloud_props%set_ice_roughness(Model%rrtmgp_nrghice)) if (Model%rrtmgp_cld_optics .eq. 1) then - call check_error_msg('sw_cloud_optics_init',sw_cloud_props%set_ice_roughness(nrghice_sw)) call check_error_msg('sw_cloud_optics_init',sw_cloud_props%load(band_lims_cldy_sw, & radliq_lwr_sw, radliq_upr_sw, radliq_fac_sw, radice_lwr_sw, radice_upr_sw, & radice_fac_sw, lut_extliq_sw, lut_ssaliq_sw, lut_asyliq_sw, lut_extice_sw, & lut_ssaice_sw, lut_asyice_sw)) endif if (Model%rrtmgp_cld_optics .eq. 2) then - call check_error_msg('sw_cloud_optics_init',sw_cloud_props%set_ice_roughness(nrghice_sw)) call check_error_msg('sw_cloud_optics_init', sw_cloud_props%load(band_lims_cldy_sw, & pade_extliq_sw, pade_ssaliq_sw, pade_asyliq_sw, pade_extice_sw, pade_ssaice_sw, & pade_asyice_sw, pade_sizereg_extliq_sw, pade_sizereg_ssaliq_sw, & @@ -311,7 +315,6 @@ end subroutine rrtmgp_sw_cloud_optics_init !! |-----------------------|------------------------------------------------------|------------------------------------------------------------------------------|---------|------|-----------------------|-----------|--------|----------| !! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | !! | ncol | horizontal_loop_extent | horizontal dimension | count | 0 | integer | | in | F | -!! | ngpts_sw | number_of_spectral_points_for_SW_calculation | Number of spectral points for SW RRTMGP calculation | none | 0 | integer | | in | F | !! | p_lay | air_pressure_at_layer_for_RRTMGP_in_hPa | air pressure layer | hPa | 2 | real | kind_phys | in | F | !! | t_lay | air_temperature_at_layer_for_RRTMGP | air temperature layer | K | 2 | real | kind_phys | in | F | !! | p_lev | air_pressure_at_interface_for_RRTMGP_in_hPa | air pressure level | hPa | 2 | real | kind_phys | in | F | @@ -328,6 +331,7 @@ end subroutine rrtmgp_sw_cloud_optics_init !! | aerosols | aerosol_optical_properties_for_shortwave_bands_01-16 | aerosol optical properties for shortwave bands 01-16 | various | 4 | real | kind_phys | in | F | !! | sw_cloud_props | coefficients_for_sw_cloud_optics | DDT containing spectral information for cloudy RRTMGP SW radiation scheme | DDT | 0 | ty_cloud_optics | | in | F | !! | sw_gas_props | coefficients_for_sw_gas_optics | DDT containing spectral information for RRTMGP SW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | +!! | ipsdsw0 | initial_permutation_seed_sw | initial seed for McICA SW | none | 0 | integer | | in | F | !! | nday | daytime_points_dimension | daytime points dimension | count | 0 | integer | | in | F | !! | idxday | daytime_points | daytime points | index | 1 | integer | | in | F | !! | optical_props_clouds | shortwave_optical_properties_for_cloudy_atmosphere | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_2str | | out | F | @@ -339,9 +343,9 @@ end subroutine rrtmgp_sw_cloud_optics_init ! ######################################################################################### ! SUBROTUINE rrtmgp_sw_cloud_optics_run() ! ######################################################################################### - subroutine rrtmgp_sw_cloud_optics_run(Model, ncol, ngpts_sw, icseed_sw, p_lay, t_lay, p_lev, cld_frac, & ! IN + subroutine rrtmgp_sw_cloud_optics_run(Model, ncol, icseed_sw, p_lay, t_lay, p_lev, cld_frac, & ! IN cld_lwp, cld_reliq, cld_iwp, cld_reice, cld_swp, cld_resnow, cld_rwp, cld_rerain, & ! IN - aerosols, sw_cloud_props, sw_gas_props, nday, idxday, & ! IN + aerosols, sw_cloud_props, sw_gas_props, ipsdsw0, nday, idxday, & ! IN optical_props_clouds, optical_props_aerosol, cldtausw, errmsg, errflg) ! OUT ! Inputs @@ -350,7 +354,7 @@ subroutine rrtmgp_sw_cloud_optics_run(Model, ncol, ngpts_sw, icseed_sw, p_lay, t integer, intent(in) :: & ncol, & ! Number of horizontal gridpoints nday, & ! Number of daylit points. - ngpts_sw ! Number of spectral points + ipsdsw0 ! Initial permutation seed for McICA integer,intent(in),dimension(nday) :: & idxday ! Indices for daylit points. integer,intent(in),dimension(ncol) :: & @@ -395,9 +399,9 @@ subroutine rrtmgp_sw_cloud_optics_run(Model, ncol, ngpts_sw, icseed_sw, p_lay, t logical,dimension(ncol,model%levs) :: liqmask, icemask type(ty_optical_props_2str) :: optical_props_cloudsByBand type(random_stat) :: rng_stat - real(kind_phys), dimension(ngpts_sw,model%levs,ncol) :: rng3D - real(kind_phys), dimension(ngpts_sw*model%levs) :: rng1D - logical, dimension(ncol,model%levs,ngpts_sw) :: cldfracMCICA + real(kind_phys), dimension(sw_gas_props%get_ngpt(),model%levs,ncol) :: rng3D + real(kind_phys), dimension(sw_gas_props%get_ngpt()*model%levs) :: rng1D + logical, dimension(ncol,model%levs,sw_gas_props%get_ngpt()) :: cldfracMCICA real(kind_phys), dimension(nday,model%levs,sw_cloud_props%get_nband()) :: & tau_cld, ssa_cld, asy_cld @@ -435,7 +439,7 @@ subroutine rrtmgp_sw_cloud_optics_run(Model, ncol, ngpts_sw, icseed_sw, p_lay, t ! Aerosol optics [ncol,model%levs,nBands] call check_error_msg('rrtmgp_sw_cloud_optics_run',optical_props_aerosol%alloc_2str( & ncol, model%levs, sw_cloud_props%get_band_lims_wavenumber())) - ! Cloud optics [ncol,model%levs,nGpts] + ! Cloud optics [ncol,model%levs,nGpt] call check_error_msg('rrtmgp_sw_cloud_optics_run',optical_props_clouds%alloc_2str( & ncol, model%levs, sw_gas_props)) @@ -455,7 +459,7 @@ subroutine rrtmgp_sw_cloud_optics_run(Model, ncol, ngpts_sw, icseed_sw, p_lay, t ncol, & ! IN - Number of daylit gridpoints model%levs, & ! IN - Number of vertical layers sw_cloud_props%get_nband(), & ! IN - Number of SW bands - nrghice_sw, & ! IN - Number of ice-roughness categories + Model%rrtmgp_nrghice, & ! IN - Number of ice-roughness categories liqmask, & ! IN - Liquid-cloud mask icemask, & ! IN - Ice-cloud mask cld_lwp, & ! IN - Cloud liquid water path @@ -487,7 +491,7 @@ subroutine rrtmgp_sw_cloud_optics_run(Model, ncol, ngpts_sw, icseed_sw, p_lay, t do iCol=1,ncol call random_setseed(ipseed_sw(icol),rng_stat) call random_number(rng1D,rng_stat) - rng3D(:,:,iCol) = reshape(source = rng1D,shape=[ngpts_sw,model%levs]) + rng3D(:,:,iCol) = reshape(source = rng1D,shape=[sw_gas_props%get_ngpt(),model%levs]) enddo ! Call McICA @@ -506,21 +510,5 @@ subroutine rrtmgp_sw_cloud_optics_run(Model, ncol, ngpts_sw, icseed_sw, p_lay, t end subroutine rrtmgp_sw_cloud_optics_run subroutine rrtmgp_sw_cloud_optics_finalize() - end subroutine rrtmgp_sw_cloud_optics_finalize - - ! ######################################################################################### - ! SUBROUTINE check_error_msg - ! ######################################################################################### - subroutine check_error_msg(routine_name, error_msg) - character(len=*), intent(in) :: & - error_msg, routine_name - - if(error_msg /= "") then - print*,"ERROR("//trim(routine_name)//"): " - print*,trim(error_msg) - return - end if - end subroutine check_error_msg - - + end subroutine rrtmgp_sw_cloud_optics_finalize end module rrtmgp_sw_cloud_optics diff --git a/physics/rrtmgp_sw_gas_optics.F90 b/physics/rrtmgp_sw_gas_optics.F90 index 036ac7f0f..6c33684c6 100644 --- a/physics/rrtmgp_sw_gas_optics.F90 +++ b/physics/rrtmgp_sw_gas_optics.F90 @@ -4,12 +4,14 @@ module rrtmgp_sw_gas_optics use mo_rte_kind, only: wl use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp use mo_gas_concentrations, only: ty_gas_concs + use rrtmgp_aux, only: check_error_msg use netcdf - ! Parameters - integer :: ipsdsw0 - contains + + ! ######################################################################################### + ! SUBROUTINE sw_gas_optics_init + ! ######################################################################################### !! \section arg_table_rrtmgp_sw_gas_optics_init Argument Table !! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | !! |--------------|----------------------------------------------|--------------------------------------------------------------------|-------|------|----------------------|-------|--------|----------| @@ -20,14 +22,11 @@ module rrtmgp_sw_gas_optics !! | mpicomm | mpi_comm | MPI communicator | index | 0 | integer | | in | F | !! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | !! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! | ipsdsw0 | initial_permutation_seed_sw | initial seed for McICA SW | none | 0 | integer | | out | F | !! | sw_gas_props | coefficients_for_sw_gas_optics | DDT containing spectral information for RRTMGP SW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | out | F | -!! | ngpts_sw | number_of_spectral_points_for_SW_calculation | Number of spectral points for SW RRTMGP calculation | none | 0 | integer | | out | F | !! - ! ######################################################################################### - ! SUBROUTINE sw_gas_optics_init - ! ######################################################################################### subroutine rrtmgp_sw_gas_optics_init(Model, Radtend, mpicomm, mpirank, mpiroot, sw_gas_props, & - ngpts_sw, errmsg, errflg) + ipsdsw0, errmsg, errflg) use netcdf #ifdef MPI use mpi @@ -47,9 +46,8 @@ subroutine rrtmgp_sw_gas_optics_init(Model, Radtend, mpicomm, mpirank, mpiroot, character(len=*), intent(out) :: & errmsg ! Error message integer, intent(out) :: & - errflg ! Error code - integer, intent(out) :: & - ngpts_sw + errflg, & ! Error code + ipsdsw0 ! type(ty_gas_optics_rrtmgp),intent(out) :: & sw_gas_props @@ -58,61 +56,62 @@ subroutine rrtmgp_sw_gas_optics_init(Model, Radtend, mpicomm, mpirank, mpiroot, type(ty_gas_concs) :: & gas_concentrations integer, dimension(:), allocatable :: & - kminor_start_lower_sw, & ! used by RRTMGP gas optics - kminor_start_upper_sw ! used by RRTMGP gas optics + kminor_start_lower_sw, & ! + kminor_start_upper_sw ! integer, dimension(:,:), allocatable :: & - band2gpt_sw, & ! used by RRTMGP gas optics - minor_limits_gpt_lower_sw, & ! used by RRTMGP gas optics - minor_limits_gpt_upper_sw ! used by RRTMGP gas optics + band2gpt_sw, & ! + minor_limits_gpt_lower_sw, & ! + minor_limits_gpt_upper_sw ! integer, dimension(:,:,:), allocatable :: & - key_species_sw ! used by RRTMGP gas optics + key_species_sw ! real(kind_phys) :: & - press_ref_trop_sw, & ! used by RRTMGP gas optics - temp_ref_p_sw, & ! used by RRTMGP gas optics - temp_ref_t_sw ! used by RRTMGP gas optics + press_ref_trop_sw, & ! + temp_ref_p_sw, & ! + temp_ref_t_sw ! real(kind_phys), dimension(:), allocatable :: & - press_ref_sw, & ! used by RRTMGP gas optics - temp_ref_sw, & ! used by RRTMGP gas optics - solar_source_sw ! used by RRTMGP gas optics + press_ref_sw, & ! + temp_ref_sw, & ! + solar_source_sw ! real(kind_phys), dimension(:,:), allocatable :: & - band_lims_sw ! used by RRTMGP gas optics + band_lims_sw ! real(kind_phys), dimension(:,:,:), allocatable :: & - vmr_ref_sw, & ! used by RRTMGP gas optics - kminor_lower_sw, & ! used by RRTMGP gas optics - kminor_upper_sw, & ! used by RRTMGP gas optics - rayl_lower_sw, & ! used by RRTMGP gas optics - rayl_upper_sw ! used by RRTMGP gas optics + vmr_ref_sw, & ! + kminor_lower_sw, & ! + kminor_upper_sw, & ! + rayl_lower_sw, & ! + rayl_upper_sw ! real(kind_phys), dimension(:,:,:,:), allocatable :: & - kmajor_sw ! used by RRTMGP gas optics + kmajor_sw ! character(len=32), dimension(:), allocatable :: & - gas_names_sw, & ! used by RRTMGP gas optics - gas_minor_sw, & ! used by RRTMGP gas optics - identifier_minor_sw, & ! used by RRTMGP gas optics - minor_gases_lower_sw, & ! used by RRTMGP gas optics - minor_gases_upper_sw, & ! used by RRTMGP gas optics - scaling_gas_lower_sw, & ! used by RRTMGP gas optics - scaling_gas_upper_sw ! used by RRTMGP gas optics + gas_names_sw, & ! + gas_minor_sw, & ! + identifier_minor_sw, & ! + minor_gases_lower_sw, & ! + minor_gases_upper_sw, & ! + scaling_gas_lower_sw, & ! + scaling_gas_upper_sw ! logical(wl), dimension(:), allocatable :: & - minor_scales_with_density_lower_sw, & ! used by RRTMGP gas optics - minor_scales_with_density_upper_sw, & ! used by RRTMGP gas optics - scale_by_complement_lower_sw, & ! used by RRTMGP gas optics - scale_by_complement_upper_sw ! used by RRTMGP gas optics + minor_scales_with_density_lower_sw, & ! + minor_scales_with_density_upper_sw, & ! + scale_by_complement_lower_sw, & ! + scale_by_complement_upper_sw ! ! Dimensions (to be broadcast across all processors) integer :: & - ntemps_sw, & ! used by RRTMGP gas optics - npress_sw, & ! used by RRTMGP gas optics - nabsorbers_sw, & ! used by RRTMGP gas optics - nextrabsorbers_sw, & ! used by RRTMGP gas optics - nminorabsorbers_sw, & ! used by RRTMGP gas optics - nmixingfracs_sw, & ! used by RRTMGP gas optics - nlayers_sw, & ! used by RRTMGP gas optics - nbnds_sw, & ! used by RRTMGP gas optics - npairs_sw, & ! used by RRTMGP gas optics - nminor_absorber_intervals_lower_sw, & ! used by RRTMGP gas optics - nminor_absorber_intervals_upper_sw, & ! used by RRTMGP gas optics - ncontributors_lower_sw, & ! used by RRTMGP gas optics - ncontributors_upper_sw ! used by RRTMGP gas optics + ntemps_sw, & ! + npress_sw, & ! + ngpts_sw, & ! + nabsorbers_sw, & ! + nextrabsorbers_sw, & ! + nminorabsorbers_sw, & ! + nmixingfracs_sw, & ! + nlayers_sw, & ! + nbnds_sw, & ! + npairs_sw, & ! + nminor_absorber_intervals_lower_sw, & ! + nminor_absorber_intervals_upper_sw, & ! + ncontributors_lower_sw, & ! + ncontributors_upper_sw ! ! Local variables integer :: status,ncid_sw,ncid_sw_clds,dimid,varID,ij,iGas @@ -411,22 +410,22 @@ subroutine rrtmgp_sw_gas_optics_init(Model, Radtend, mpicomm, mpirank, mpiroot, ipsdsw0 = sw_gas_props%get_ngpt() end subroutine rrtmgp_sw_gas_optics_init + ! ######################################################################################### + ! SUBROUTINE rrtmgp_sw_gas_optics_run + ! *NOTE* The computation of the optical properties for a gaseous (+aerosols) atmosphere are + ! handled internally by the rte-rrtmgp/extensions/mo_rrtmgp_clr_all_sky.F90:rte_sw() + ! driver. + ! If calling rte/mo_rte_sw.F90:rte_sw() directly, place calls to compute source + ! function and gas_optics() here. + ! ######################################################################################### subroutine rrtmgp_sw_gas_optics_run() - end subroutine rrtmgp_sw_gas_optics_run - subroutine rrtmgp_sw_gas_optics_finalize() - end subroutine rrtmgp_sw_gas_optics_finalize + end subroutine rrtmgp_sw_gas_optics_run + ! ######################################################################################### - ! SUBROUTINE check_error_msg + ! SUBROUTINE rrtmgp_sw_gas_optics_finalize ! ######################################################################################### - subroutine check_error_msg(routine_name, error_msg) - character(len=*), intent(in) :: & - error_msg, routine_name - - if(error_msg /= "") then - print*,"ERROR("//trim(routine_name)//"): " - print*,trim(error_msg) - return - end if - end subroutine check_error_msg + subroutine rrtmgp_sw_gas_optics_finalize() + end subroutine rrtmgp_sw_gas_optics_finalize + end module rrtmgp_sw_gas_optics diff --git a/physics/rrtmgp_sw_pre.F90 b/physics/rrtmgp_sw_pre.F90 deleted file mode 100644 index 1891cf2b9..000000000 --- a/physics/rrtmgp_sw_pre.F90 +++ /dev/null @@ -1,115 +0,0 @@ -!>\file rrtmgp_sw_pre.f90 -!! This file contains a subroutine to module_radiation_surface::setalb() to -!! setup surface albedo for SW radiation. -module rrtmgp_sw_pre - use machine, only: kind_phys - use GFS_typedefs, only: GFS_control_type, & - GFS_grid_type, & - GFS_radtend_type, & - GFS_sfcprop_type - use module_radiation_surface, only: NF_ALBD, setalb - use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp - implicit none -contains - - subroutine rrtmgp_sw_pre_init () - end subroutine rrtmgp_sw_pre_init - -!> \section arg_table_rrtmgp_sw_pre_run Argument Table -!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | -!! |-----------------------|-------------------------------------------------------------|--------------------------------------------------------------------|----------|------|----------------------|-----------|--------|----------| -!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | -!! | Grid | GFS_grid_type_instance | Fortran DDT containing FV3-GFS grid and interpolation related data | DDT | 0 | GFS_grid_type | | in | F | -!! | Sfcprop | GFS_sfcprop_type_instance | Fortran DDT containing FV3-GFS surface fields | DDT | 0 | GFS_sfcprop_type | | in | F | -!! | Radtend | GFS_radtend_type_instance | Fortran DDT containing FV3-GFS radiation tendencies | DDT | 0 | GFS_radtend_type | | inout | F | -!! | im | horizontal_loop_extent | horizontal loop extent | count | 0 | integer | | in | F | -!! | nday | daytime_points_dimension | daytime points dimension | count | 0 | integer | | out | F | -!! | idxday | daytime_points | daytime points | index | 1 | integer | | out | F | -!! | tsfg | surface_ground_temperature_for_radiation | surface ground temperature for radiation | K | 1 | real | kind_phys | in | F | -!! | tsfa | surface_air_temperature_for_radiation | lowest model layer air temperature for radiation | K | 1 | real | kind_phys | in | F | -!! | sw_gas_props | coefficients_for_sw_gas_optics | DDT containing spectral information for RRTMGP SW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | -!! | sfc_alb_nir_dir | surface_shortwave_albedo_near_infrared_direct_in_each_band | surface sw near-infrared direct albedo in each SW band | frac | 2 | real | kind_phys | out | F | -!! | sfc_alb_nir_dif | surface_shortwave_albedo_near_infrared_diffuse_in_each_band | surface sw near-infrared diffuse albedo in each SW band | frac | 2 | real | kind_phys | out | F | -!! | sfc_alb_uvvis_dir | surface_shortwave_albedo_uv_visible_direct_in_each_band | surface sw uv-visible direct albedo in each SW band | frac | 2 | real | kind_phys | out | F | -!! | sfc_alb_uvvis_dif | surface_shortwave_albedo_uv_visible_diffuse_in_each_band | surface sw uv-visible diffuse albedo in each SW band | frac | 2 | real | kind_phys | out | F | -!! | alb1d | surface_albedo_perturbation | surface albedo perturbation | frac | 1 | real | kind_phys | in | F | -!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | -!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | -!! - subroutine rrtmgp_sw_pre_run (Model, Grid, Sfcprop, Radtend, im, sw_gas_props, & - nday, idxday, tsfg, tsfa, sfc_alb_nir_dir, sfc_alb_nir_dif, sfc_alb_uvvis_dir, & - sfc_alb_uvvis_dif, alb1d, errmsg, errflg) - - ! Inputs - type(ty_gas_optics_rrtmgp),intent(in) :: & - sw_gas_props ! RRTMGP DDT containing spectral information for SW calculation - type(GFS_control_type), intent(in) :: Model - type(GFS_radtend_type), intent(inout) :: Radtend - type(GFS_sfcprop_type), intent(in) :: Sfcprop - type(GFS_grid_type), intent(in) :: Grid - integer, intent(in) :: im - integer, intent(out) :: nday - integer, dimension(size(Grid%xlon,1)), intent(out) :: idxday - real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(in) :: tsfa, tsfg - real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(in) :: alb1d - - ! Outputs - real(kind_phys),dimension(sw_gas_props%get_nband(),IM),intent(out) :: & - sfc_alb_nir_dir, & ! Shortwave surface albedo (nIR-direct) - sfc_alb_nir_dif, & ! Shortwave surface albedo (nIR-diffuse) - sfc_alb_uvvis_dir, & ! Shortwave surface albedo (uvvis-direct) - sfc_alb_uvvis_dif ! Shortwave surface albedo (uvvis-diffuse) - character(len=*), intent(out) :: errmsg - integer, intent(out) :: errflg - - ! Local variables - integer :: i, iBand - real(kind=kind_phys), dimension(size(Grid%xlon,1),NF_ALBD) :: sfcalb - - ! Initialize CCPP error handling variables - errmsg = '' - errflg = 0 - - if (Model%lsswr) then - ! Check for daytime points for SW radiation. - nday = 0 - idxday = 0 - do i = 1, IM - if (Radtend%coszen(i) >= 0.0001) then - nday = nday + 1 - idxday(nday) = i - endif - enddo - - ! Call module_radiation_surface::setalb() to setup surface albedo. - call setalb (Sfcprop%slmsk, Sfcprop%snowd, Sfcprop%sncovr,& ! --- inputs: - Sfcprop%snoalb, Sfcprop%zorl, Radtend%coszen,& - tsfg, tsfa, Sfcprop%hprim, Sfcprop%alvsf, & - Sfcprop%alnsf, Sfcprop%alvwf, Sfcprop%alnwf, & - Sfcprop%facsf, Sfcprop%facwf, Sfcprop%fice, & - Sfcprop%tisfc, IM, & - alb1d, Model%pertalb, & ! mg, sfc-perts - sfcalb) ! --- outputs - - ! Approximate mean surface albedo from vis- and nir- diffuse values. - Radtend%sfalb(:) = max(0.01, 0.5 * (sfcalb(:,2) + sfcalb(:,4))) - else - nday = 0 - idxday = 0 - sfcalb = 0.0 - endif - - ! Spread across all SW bands - do iBand=1,sw_gas_props%get_nband() - sfc_alb_nir_dir(iBand,1:IM) = sfcalb(1:IM,1) - sfc_alb_nir_dif(iBand,1:IM) = sfcalb(1:IM,2) - sfc_alb_uvvis_dir(iBand,1:IM) = sfcalb(1:IM,3) - sfc_alb_uvvis_dif(iBand,1:IM) = sfcalb(1:IM,4) - enddo - - end subroutine rrtmgp_sw_pre_run - - subroutine rrtmgp_sw_pre_finalize () - end subroutine rrtmgp_sw_pre_finalize - -end module rrtmgp_sw_pre From 893ce888562ad7bda6392838e5406873f1c99107 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Thu, 6 Jun 2019 16:16:17 -0600 Subject: [PATCH 035/167] Some housekeeping. --- physics/GFS_DCNV_generic_post.xml | 557 -------- physics/GFS_DCNV_generic_pre.xml | 172 --- physics/GFS_MP_generic_post.xml | 832 ----------- physics/GFS_MP_generic_pre.xml | 150 -- physics/GFS_PBL_generic_post.xml | 766 ---------- physics/GFS_PBL_generic_pre.xml | 326 ----- physics/GFS_SCNV_generic_post.xml | 194 --- physics/GFS_SCNV_generic_pre.xml | 117 -- physics/GFS_phys_time_vary.xml | 151 -- physics/GFS_rad_time_vary.xml | 62 - physics/GFS_rrtmg_post.xml | 260 ---- physics/GFS_rrtmg_pre.xml | 656 --------- physics/GFS_rrtmg_setup.xml | 504 ------- physics/GFS_rrtmgp_gas_optics.F90 | 2 +- physics/GFS_rrtmgp_lw_post.F90 | 18 +- physics/GFS_rrtmgp_lw_pre.xml | 106 -- physics/GFS_rrtmgp_post.F90 | 2 +- physics/GFS_rrtmgp_post.xml | 260 ---- physics/GFS_rrtmgp_pre.F90 | 91 +- physics/GFS_rrtmgp_pre.xml | 656 --------- physics/GFS_rrtmgp_setup.F90 | 8 +- physics/GFS_rrtmgp_setup.xml | 504 ------- physics/GFS_rrtmgp_sw_post.F90 | 40 +- physics/GFS_suite_interstitial_1.xml | 304 ---- physics/GFS_suite_interstitial_2.xml | 546 -------- physics/GFS_suite_interstitial_3.xml | 491 ------- physics/GFS_suite_interstitial_4.xml | 359 ----- physics/GFS_suite_interstitial_phys_reset.xml | 51 - physics/GFS_suite_interstitial_rad_reset.xml | 40 - physics/GFS_suite_stateout_reset.xml | 150 -- physics/GFS_suite_stateout_update.xml | 205 --- physics/GFS_surface_generic_post.xml | 942 ------------- physics/GFS_surface_generic_pre.xml | 502 ------- physics/GFS_surface_loop_control_part1.xml | 73 - physics/GFS_surface_loop_control_part2.xml | 106 -- physics/GFS_time_vary_pre.xml | 86 -- physics/cnvc90.xml | 183 --- physics/cs_conv.xml | 590 -------- physics/cs_conv_aw_adj.xml | 249 ---- physics/cs_conv_post.xml | 84 -- physics/cs_conv_pre.xml | 216 --- physics/cu_gf_driver.xml | 470 ------- physics/cu_gf_driver_post.xml | 106 -- physics/cu_gf_driver_pre.xml | 172 --- physics/dcyc2t3.xml | 546 -------- physics/dcyc2t3_post.xml | 73 - physics/get_phi_fv3.xml | 106 -- physics/get_prs_fv3.xml | 117 -- physics/gfdl_cloud_microphys.xml | 504 ------- physics/gmtb_scm_sfc_flux_spec.xml | 381 ----- physics/gwdc.xml | 359 ----- physics/gwdc_post.xml | 227 --- physics/gwdc_pre.xml | 194 --- physics/gwdps.xml | 469 ------- physics/gwdps_post.xml | 172 --- physics/gwdps_pre.xml | 150 -- physics/h2ophys.xml | 161 --- physics/hedmf.xml | 612 -------- physics/lsm_noah.xml | 856 ------------ physics/lsm_ruc.xml | 1230 ----------------- physics/m_micro.xml | 1152 --------------- physics/m_micro_post.xml | 205 --- physics/m_micro_pre.xml | 381 ----- physics/machine.xml | 36 - physics/moninshoc.xml | 634 --------- physics/mp_thompson_hrrr.xml | 625 --------- physics/mp_thompson_hrrr_post.xml | 207 --- physics/mp_thompson_hrrr_pre.xml | 337 ----- physics/mynnedmf_wrapper.xml | 1052 -------------- physics/mynnrad_post.xml | 106 -- physics/mynnrad_pre.xml | 216 --- physics/mynnsfc_wrapper.xml | 700 ---------- physics/ozphys.xml | 238 ---- physics/ozphys_2015.xml | 238 ---- physics/rayleigh_damp.xml | 205 --- physics/rrtmg_lw.xml | 524 ------- physics/rrtmg_lw_post.xml | 150 -- physics/rrtmg_lw_pre.xml | 106 -- physics/rrtmg_sw.xml | 634 --------- physics/rrtmg_sw_post.xml | 216 --- physics/rrtmg_sw_pre.xml | 183 --- physics/rrtmgp_lw.F90 | 18 +- physics/rrtmgp_lw_cloud_optics.F90 | 30 +- physics/rrtmgp_lw_gas_optics.F90 | 7 +- physics/rrtmgp_lw_post.xml | 162 --- physics/rrtmgp_lw_pre.xml | 128 -- physics/rrtmgp_sw.F90 | 22 +- physics/rrtmgp_sw_cloud_optics.F90 | 27 +- physics/rrtmgp_sw_gas_optics.F90 | 7 +- physics/samfdeepcnv.xml | 700 ---------- physics/samfshalcnv.xml | 513 ------- physics/samfshalcnv_post.xml | 205 --- physics/satmedmfvdif.xml | 667 --------- physics/sfc_diag.xml | 282 ---- physics/sfc_diag_post.xml | 227 --- physics/sfc_ex_coef.xml | 392 ------ physics/sfc_nst.xml | 656 --------- physics/sfc_nst_post.xml | 216 --- physics/sfc_nst_pre.xml | 106 -- physics/sfc_ocean.xml | 260 ---- physics/sfc_sice.xml | 469 ------- physics/sfc_sice_post.xml | 95 -- physics/shoc.xml | 645 --------- physics/zhaocarr_gscond.xml | 260 ---- physics/zhaocarr_precpd.xml | 249 ---- 105 files changed, 103 insertions(+), 32901 deletions(-) delete mode 100644 physics/GFS_DCNV_generic_post.xml delete mode 100644 physics/GFS_DCNV_generic_pre.xml delete mode 100644 physics/GFS_MP_generic_post.xml delete mode 100644 physics/GFS_MP_generic_pre.xml delete mode 100644 physics/GFS_PBL_generic_post.xml delete mode 100644 physics/GFS_PBL_generic_pre.xml delete mode 100644 physics/GFS_SCNV_generic_post.xml delete mode 100644 physics/GFS_SCNV_generic_pre.xml delete mode 100644 physics/GFS_phys_time_vary.xml delete mode 100644 physics/GFS_rad_time_vary.xml delete mode 100644 physics/GFS_rrtmg_post.xml delete mode 100644 physics/GFS_rrtmg_pre.xml delete mode 100644 physics/GFS_rrtmg_setup.xml delete mode 100644 physics/GFS_rrtmgp_lw_pre.xml delete mode 100644 physics/GFS_rrtmgp_post.xml delete mode 100644 physics/GFS_rrtmgp_pre.xml delete mode 100644 physics/GFS_rrtmgp_setup.xml delete mode 100644 physics/GFS_suite_interstitial_1.xml delete mode 100644 physics/GFS_suite_interstitial_2.xml delete mode 100644 physics/GFS_suite_interstitial_3.xml delete mode 100644 physics/GFS_suite_interstitial_4.xml delete mode 100644 physics/GFS_suite_interstitial_phys_reset.xml delete mode 100644 physics/GFS_suite_interstitial_rad_reset.xml delete mode 100644 physics/GFS_suite_stateout_reset.xml delete mode 100644 physics/GFS_suite_stateout_update.xml delete mode 100644 physics/GFS_surface_generic_post.xml delete mode 100644 physics/GFS_surface_generic_pre.xml delete mode 100644 physics/GFS_surface_loop_control_part1.xml delete mode 100644 physics/GFS_surface_loop_control_part2.xml delete mode 100644 physics/GFS_time_vary_pre.xml delete mode 100644 physics/cnvc90.xml delete mode 100644 physics/cs_conv.xml delete mode 100644 physics/cs_conv_aw_adj.xml delete mode 100644 physics/cs_conv_post.xml delete mode 100644 physics/cs_conv_pre.xml delete mode 100644 physics/cu_gf_driver.xml delete mode 100644 physics/cu_gf_driver_post.xml delete mode 100644 physics/cu_gf_driver_pre.xml delete mode 100644 physics/dcyc2t3.xml delete mode 100644 physics/dcyc2t3_post.xml delete mode 100644 physics/get_phi_fv3.xml delete mode 100644 physics/get_prs_fv3.xml delete mode 100644 physics/gfdl_cloud_microphys.xml delete mode 100644 physics/gmtb_scm_sfc_flux_spec.xml delete mode 100644 physics/gwdc.xml delete mode 100644 physics/gwdc_post.xml delete mode 100644 physics/gwdc_pre.xml delete mode 100644 physics/gwdps.xml delete mode 100644 physics/gwdps_post.xml delete mode 100644 physics/gwdps_pre.xml delete mode 100644 physics/h2ophys.xml delete mode 100644 physics/hedmf.xml delete mode 100644 physics/lsm_noah.xml delete mode 100644 physics/lsm_ruc.xml delete mode 100644 physics/m_micro.xml delete mode 100644 physics/m_micro_post.xml delete mode 100644 physics/m_micro_pre.xml delete mode 100644 physics/machine.xml delete mode 100644 physics/moninshoc.xml delete mode 100644 physics/mp_thompson_hrrr.xml delete mode 100644 physics/mp_thompson_hrrr_post.xml delete mode 100644 physics/mp_thompson_hrrr_pre.xml delete mode 100644 physics/mynnedmf_wrapper.xml delete mode 100644 physics/mynnrad_post.xml delete mode 100644 physics/mynnrad_pre.xml delete mode 100644 physics/mynnsfc_wrapper.xml delete mode 100644 physics/ozphys.xml delete mode 100644 physics/ozphys_2015.xml delete mode 100644 physics/rayleigh_damp.xml delete mode 100644 physics/rrtmg_lw.xml delete mode 100644 physics/rrtmg_lw_post.xml delete mode 100644 physics/rrtmg_lw_pre.xml delete mode 100644 physics/rrtmg_sw.xml delete mode 100644 physics/rrtmg_sw_post.xml delete mode 100644 physics/rrtmg_sw_pre.xml delete mode 100644 physics/rrtmgp_lw_post.xml delete mode 100644 physics/rrtmgp_lw_pre.xml delete mode 100644 physics/samfdeepcnv.xml delete mode 100644 physics/samfshalcnv.xml delete mode 100644 physics/samfshalcnv_post.xml delete mode 100644 physics/satmedmfvdif.xml delete mode 100644 physics/sfc_diag.xml delete mode 100644 physics/sfc_diag_post.xml delete mode 100644 physics/sfc_ex_coef.xml delete mode 100644 physics/sfc_nst.xml delete mode 100644 physics/sfc_nst_post.xml delete mode 100644 physics/sfc_nst_pre.xml delete mode 100644 physics/sfc_ocean.xml delete mode 100644 physics/sfc_sice.xml delete mode 100644 physics/sfc_sice_post.xml delete mode 100644 physics/shoc.xml delete mode 100644 physics/zhaocarr_gscond.xml delete mode 100644 physics/zhaocarr_precpd.xml diff --git a/physics/GFS_DCNV_generic_post.xml b/physics/GFS_DCNV_generic_post.xml deleted file mode 100644 index 5c2965b27..000000000 --- a/physics/GFS_DCNV_generic_post.xml +++ /dev/null @@ -1,557 +0,0 @@ - - - - - - horizontal_loop_extent - horizontal loop extent - count - im - integer - - in - F - MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run - - - vertical_dimension - vertical layer dimension - count - levs - integer - - in - F - MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run - - - flag_diagnostics - logical flag for storing diagnostics - flag - lssav - logical - - in - F - MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run - - - flag_diagnostics_3D - flag for 3d diagnostic fields - flag - ldiag3d - logical - - in - F - MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run - - - flag_gocart - flag for 3d diagnostic fields for gocart 1 - flag - lgocart - logical - - in - F - MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run - - - flag_for_ras_deep_convection - flag for ras convection scheme - flag - ras - logical - - in - F - MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run - - - flag_for_Chikira_Sugiyama_deep_convection - flag for Chikira-Sugiyama convection - flag - cscnv - logical - - in - F - MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run - - - dynamics_to_physics_timestep_ratio - ratio of dynamics timestep to physics timestep - none - frain - real - - in - F - MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run - - - lwe_thickness_of_deep_convective_precipitation_amount - deep convective rainfall amount on physics timestep - m - rain1 - real - (:) - in - F - MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run - - - time_step_for_dynamics - dynamics timestep - s - dtf - real - - in - F - MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run - - - cloud_work_function - cloud work function - m2 s-2 - cld1d - real - (:) - in - F - MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run - - - x_wind_save - x-wind before entering a physics scheme - m s-1 - save_u - real - (:,:) - in - F - MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run - - - y_wind_save - y-wind before entering a physics scheme - m s-1 - save_v - real - (:,:) - in - F - MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run - - - air_temperature_save - air temperature before entering a physics scheme - K - save_t - real - (:,:) - in - F - MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run - - - water_vapor_specific_humidity_save - water vapor specific humidity before entering a physics scheme - kg kg-1 - save_qv - real - (:,:) - in - F - MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run - - - x_wind_updated_by_physics - zonal wind updated by physics - m s-1 - gu0 - real - (:,:) - in - F - MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run - - - y_wind_updated_by_physics - meridional wind updated by physics - m s-1 - gv0 - real - (:,:) - in - F - MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run - - - air_temperature_updated_by_physics - temperature updated by physics - K - gt0 - real - (:,:) - in - F - MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run - - - water_vapor_specific_humidity_updated_by_physics - water vapor specific humidity updated by physics - kg kg-1 - gq0_water_vapor - real - (:,:) - in - F - MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run - - - instantaneous_atmosphere_updraft_convective_mass_flux - (updraft mass flux) * delt - kg m-2 - ud_mf - real - (:,:) - in - F - MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run - - - instantaneous_atmosphere_downdraft_convective_mass_flux - (downdraft mass flux) * delt - kg m-2 - dd_mf - real - (:,:) - in - F - MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run - - - instantaneous_atmosphere_detrainment_convective_mass_flux - (detrainment mass flux) * delt - kg m-2 - dt_mf - real - (:,:) - in - F - MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run - - - gravitational_acceleration - gravitational acceleration - m s-2 - con_g - real - - in - F - MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run - - - ice_water_mixing_ratio_convective_transport_tracer - moist (dry+vapor, no condensates) mixing ratio of ice water in the convectively transported tracer array - kg kg-1 - clw_ice - real - (:,:) - in - F - MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run - - - cloud_condensed_water_mixing_ratio_convective_transport_tracer - moist (dry+vapor, no condensates) mixing ratio of cloud water (condensate) in the convectively transported tracer array - kg kg-1 - clw_liquid - real - (:,:) - in - F - MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run - - - number_of_3d_arrays_associated_with_pdf-based_clouds - number of 3d arrays associated with pdf based clouds/mp - count - npdf3d - integer - - in - F - MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run - - - array_dimension_of_3d_arrays_for_microphysics - number of 3D arrays needed for microphysics - count - num_p3d - integer - - in - F - MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run - - - number_of_convective_3d_cloud_fields - number of convective 3d clouds fields - count - ncnvcld3d - integer - - in - F - MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run - - - lwe_thickness_of_convective_precipitation_amount_on_dynamics_timestep - convective rain at this time step - m - rainc - real - (:) - inout - F - MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run - - - cumulative_cloud_work_function - cumulative cloud work function (valid only with sas) - m2 s-1 - cldwrk - real - (:) - inout - F - MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run - - - cumulative_lwe_thickness_of_convective_precipitation_amount - cumulative convective precipitation - m - cnvprcp - real - (:) - inout - F - MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run - - - cumulative_lwe_thickness_of_convective_precipitation_amount_in_bucket - cumulative convective precipitation in bucket - m - cnvprcpb - real - (:) - inout - F - MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run - - - cumulative_change_in_temperature_due_to_deep_convection - cumulative change in temperature due to deep conv. - K - dt3dt - real - (:,:) - inout - F - MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run - - - cumulative_change_in_water_vapor_specific_humidity_due_to_deep_convection - cumulative change in water vapor specific humidity due to deep conv. - kg kg-1 - dq3dt - real - (:,:) - inout - F - MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run - - - cumulative_change_in_x_wind_due_to_deep_convection - cumulative change in x wind due to deep convection - m s-1 - du3dt - real - (:,:) - inout - F - MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run - - - cumulative_change_in_y_wind_due_to_deep_convection - cumulative change in y wind due to deep convection - m s-1 - dv3dt - real - (:,:) - inout - F - MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run - - - cumulative_atmosphere_updraft_convective_mass_flux - cumulative updraft mass flux - Pa - upd_mf - real - (:,:) - inout - F - MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run - - - cumulative_atmosphere_downdraft_convective_mass_flux - cumulative downdraft mass flux - Pa - dwn_mf - real - (:,:) - inout - F - MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run - - - cumulative_atmosphere_detrainment_convective_mass_flux - cumulative detrainment mass flux - Pa - det_mf - real - (:,:) - inout - F - MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run - - - instantaneous_water_vapor_specific_humidity_tendency_due_to_convection - instantaneous moisture tendency due to convection - kg kg-1 s-1 - dqdti - real - (:,:) - inout - F - MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run - - - instantaneous_deep_convective_cloud_condensate_mixing_ratio_on_dynamics_time_step - instantaneous total convective condensate mixing ratio - kg kg-1 - cnvqci - real - (:,:) - inout - F - MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run - - - instantaneous_atmosphere_updraft_convective_mass_flux_on_dynamics_timestep - (updraft mass flux) * delt - kg m-2 - upd_mfi - real - (:,:) - inout - F - MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run - - - instantaneous_atmosphere_downdraft_convective_mass_flux_on_dynamics_timestep - (downdraft mass flux) * delt - kg m-2 - dwn_mfi - real - (:,:) - inout - F - MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run - - - instantaneous_atmosphere_detrainment_convective_mass_flux_on_dynamics_timestep - (detrainment mass flux) * delt - kg m-2 - det_mfi - real - (:,:) - inout - F - MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run - - - convective_cloud_water_mixing_ratio - moist convective cloud water mixing ratio - kg kg-1 - cnvw - real - (:,:) - inout - F - MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run - - - convective_cloud_cover - convective cloud cover - frac - cnvc - real - (:,:) - inout - F - MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run - - - convective_cloud_water_mixing_ratio_in_phy_f3d - convective cloud water mixing ratio in the phy_f3d array - kg kg-1 - cnvw_phy_f3d - real - (:,:) - inout - F - MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run - - - convective_cloud_cover_in_phy_f3d - convective cloud cover in the phy_f3d array - frac - cnvc_phy_f3d - real - (:,:) - inout - F - MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_GFS_DCNV_generic_post SCHEME_GFS_DCNV_generic_post SUBROUTINE_GFS_DCNV_generic_post_run - - - - diff --git a/physics/GFS_DCNV_generic_pre.xml b/physics/GFS_DCNV_generic_pre.xml deleted file mode 100644 index a8cbc0ee4..000000000 --- a/physics/GFS_DCNV_generic_pre.xml +++ /dev/null @@ -1,172 +0,0 @@ - - - - - horizontal_loop_extent - horizontal loop extent - count - im - integer - - in - F - MODULE_GFS_DCNV_generic_pre SCHEME_GFS_DCNV_generic_pre SUBROUTINE_GFS_DCNV_generic_pre_run - - - vertical_dimension - vertical layer dimension - count - levs - integer - - in - F - MODULE_GFS_DCNV_generic_pre SCHEME_GFS_DCNV_generic_pre SUBROUTINE_GFS_DCNV_generic_pre_run - - - flag_diagnostics_3D - flag for 3d diagnostic fields - flag - ldiag3d - logical - - in - F - MODULE_GFS_DCNV_generic_pre SCHEME_GFS_DCNV_generic_pre SUBROUTINE_GFS_DCNV_generic_pre_run - - - flag_convective_gravity_wave_drag - flag for conv gravity wave drag - flag - cnvgwd - logical - - in - F - MODULE_GFS_DCNV_generic_pre SCHEME_GFS_DCNV_generic_pre SUBROUTINE_GFS_DCNV_generic_pre_run - - - flag_gocart - flag for 3d diagnostic fields for gocart 1 - flag - lgocart - logical - - in - F - MODULE_GFS_DCNV_generic_pre SCHEME_GFS_DCNV_generic_pre SUBROUTINE_GFS_DCNV_generic_pre_run - - - x_wind_updated_by_physics - zonal wind updated by physics - m s-1 - gu0 - real - (:,:) - in - F - MODULE_GFS_DCNV_generic_pre SCHEME_GFS_DCNV_generic_pre SUBROUTINE_GFS_DCNV_generic_pre_run - - - y_wind_updated_by_physics - meridional wind updated by physics - m s-1 - gv0 - real - (:,:) - in - F - MODULE_GFS_DCNV_generic_pre SCHEME_GFS_DCNV_generic_pre SUBROUTINE_GFS_DCNV_generic_pre_run - - - air_temperature_updated_by_physics - temperature updated by physics - K - gt0 - real - (:,:) - in - F - MODULE_GFS_DCNV_generic_pre SCHEME_GFS_DCNV_generic_pre SUBROUTINE_GFS_DCNV_generic_pre_run - - - water_vapor_specific_humidity_updated_by_physics - water vapor specific humidity updated by physics - kg kg-1 - gq0_water_vapor - real - (:,:) - in - F - MODULE_GFS_DCNV_generic_pre SCHEME_GFS_DCNV_generic_pre SUBROUTINE_GFS_DCNV_generic_pre_run - - - x_wind_save - x-wind before entering a physics scheme - m s-1 - save_u - real - (:,:) - inout - F - MODULE_GFS_DCNV_generic_pre SCHEME_GFS_DCNV_generic_pre SUBROUTINE_GFS_DCNV_generic_pre_run - - - y_wind_save - y-wind before entering a physics scheme - m s-1 - save_v - real - (:,:) - inout - F - MODULE_GFS_DCNV_generic_pre SCHEME_GFS_DCNV_generic_pre SUBROUTINE_GFS_DCNV_generic_pre_run - - - air_temperature_save - air temperature before entering a physics scheme - K - save_t - real - (:,:) - inout - F - MODULE_GFS_DCNV_generic_pre SCHEME_GFS_DCNV_generic_pre SUBROUTINE_GFS_DCNV_generic_pre_run - - - water_vapor_specific_humidity_save - water vapor specific humidity before entering a physics scheme - kg kg-1 - save_qv - real - (:,:) - inout - F - MODULE_GFS_DCNV_generic_pre SCHEME_GFS_DCNV_generic_pre SUBROUTINE_GFS_DCNV_generic_pre_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_GFS_DCNV_generic_pre SCHEME_GFS_DCNV_generic_pre SUBROUTINE_GFS_DCNV_generic_pre_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_GFS_DCNV_generic_pre SCHEME_GFS_DCNV_generic_pre SUBROUTINE_GFS_DCNV_generic_pre_run - - - - - diff --git a/physics/GFS_MP_generic_post.xml b/physics/GFS_MP_generic_post.xml deleted file mode 100644 index 3f57fb308..000000000 --- a/physics/GFS_MP_generic_post.xml +++ /dev/null @@ -1,832 +0,0 @@ - - - - - - horizontal_loop_extent - horizontal loop extent - count - im - integer - - in - F - MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run - - - horizontal_dimension - horizontal dimension - count - ix - integer - - in - F - MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run - - - vertical_dimension - vertical layer dimension - count - levs - integer - - in - F - MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run - - - index_of_time_step - current time step index - index - kdt - integer - - in - F - MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run - - - array_dimension_of_random_number - second dimension of random number stream for RAS - count - nrcm - integer - - in - F - MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run - - - number_of_hydrometeors - choice of cloud scheme / number of hydrometeors - count - ncld - integer - - in - F - MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run - - - number_of_tracers_for_cloud_condensate - number of tracers for cloud condensate - count - nncl - integer - - in - F - MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run - - - index_for_liquid_cloud_condensate - tracer index for cloud condensate (or liquid water) - index - ntcw - integer - - in - F - MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run - - - number_of_tracers - number of tracers - count - ntrac - integer - - in - F - MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run - - - flag_for_microphysics_scheme - choice of microphysics scheme - flag - imp_physics - integer - - in - F - MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run - - - flag_for_gfdl_microphysics_scheme - choice of GFDL microphysics scheme - flag - imp_physics_gfdl - integer - - in - F - MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run - - - flag_for_thompson_microphysics_scheme - choice of Thompson microphysics scheme - flag - imp_physics_thompson - integer - - in - F - MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run - - - flag_for_precipitation_type_algorithm - flag controls precip type algorithm - flag - cal_pre - logical - - in - F - MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run - - - flag_diagnostics - logical flag for storing diagnostics - flag - lssav - logical - - in - F - MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run - - - flag_diagnostics_3D - flag for 3d diagnostic fields - flag - ldiag3d - logical - - in - F - MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run - - - flag_for_flux_coupling - flag controlling cplflx collection (default off) - flag - cplflx - logical - - in - F - MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run - - - flag_for_chemistry_coupling - flag controlling cplchm collection (default off) - flag - cplchm - logical - - in - F - MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run - - - gravitational_acceleration - gravitational acceleration - m s-2 - con_g - real - - in - F - MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run - - - time_step_for_dynamics - dynamics timestep - s - dtf - real - - in - F - MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run - - - dynamics_to_physics_timestep_ratio - ratio of dynamics timestep to physics timestep - none - frain - real - - in - F - MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run - - - lwe_thickness_of_convective_precipitation_amount_on_dynamics_timestep - convective rain at this time step - m - rainc - real - (:) - in - F - MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run - - - lwe_thickness_of_explicit_precipitation_amount - explicit rainfall amount on physics timestep - m - rain1 - real - (:) - in - F - MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run - - - random_number_array - random number array (0-1) - none - rann - real - (:,:) - in - F - MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run - - - latitude - latitude - radians - xlat - real - (:) - in - F - MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run - - - longitude - longitude - radians - xlon - real - (:) - in - F - MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run - - - air_temperature_updated_by_physics - temperature updated by physics - K - gt0 - real - (:,:) - in - F - MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run - - - tracer_concentration_updated_by_physics - tracer concentration updated by physics - kg kg-1 - gq0 - real - (:,:,:) - in - F - MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run - - - air_pressure - layer mean pressure - Pa - prsl - real - (:,:) - in - F - MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run - - - air_pressure_at_interface - pressure at layer interface - Pa - prsi - real - (:,:) - in - F - MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run - - - geopotential_at_interface - geopotential at model layer interfaces - m2 s-2 - phii - real - (:,:) - in - F - MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run - - - surface_skin_temperature - surface skin temperature - K - tsfc - real - (:) - in - F - MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run - - - lwe_thickness_of_ice_amount_on_dynamics_timestep - ice fall at this time step - m - ice - real - (:) - inout - F - MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run - - - lwe_thickness_of_snow_amount_on_dynamics_timestep - snow fall at this time step - m - snow - real - (:) - inout - F - MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run - - - lwe_thickness_of_graupel_amount_on_dynamics_timestep - graupel fall at this time step - m - graupel - real - (:) - inout - F - MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run - - - air_temperature_save - air temperature before entering a physics scheme - K - save_t - real - (:,:) - in - F - MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run - - - water_vapor_specific_humidity_save - water vapor specific humidity before entering a physics scheme - kg kg-1 - save_qv - real - (:,:) - in - F - MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run - - - lwe_thickness_of_ice_amount - ice fall on physics timestep - m - ice0 - real - (:) - in - F - MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run - - - lwe_thickness_of_snow_amount - snow fall on physics timestep - m - snow0 - real - (:) - in - F - MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run - - - lwe_thickness_of_graupel_amount - graupel fall on physics timestep - m - graupel0 - real - (:) - in - F - MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run - - - air_pressure_difference_between_midlayers - air pressure difference between midlayers - Pa - del - real - (:,:) - in - F - MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run - - - lwe_thickness_of_precipitation_amount_on_dynamics_timestep - total rain at this time step - m - rain - real - (:) - inout - F - MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run - - - dominant_rain_type - dominant rain type - none - domr_diag - real - (:) - inout - F - MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run - - - dominant_freezing_rain_type - dominant freezing rain type - none - domzr_diag - real - (:) - inout - F - MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run - - - dominant_sleet_type - dominant sleet type - none - domip_diag - real - (:) - inout - F - MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run - - - dominant_snow_type - dominant snow type - none - doms_diag - real - (:) - inout - F - MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run - - - nonnegative_lwe_thickness_of_precipitation_amount_on_dynamics_timestep - total precipitation amount in each time step - m - tprcp - real - (:) - inout - F - MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run - - - flag_for_precipitation_type - snow/rain flag for precipitation - flag - srflag - real - (:) - inout - F - MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run - - - accumulated_lwe_thickness_of_precipitation_amount - accumulated total precipitation - m - totprcp - real - (:) - inout - F - MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run - - - accumulated_lwe_thickness_of_ice_amount - accumulated ice precipitation - kg m-2 - totice - real - (:) - inout - F - MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run - - - accumulated_lwe_thickness_of_snow_amount - accumulated snow precipitation - kg m-2 - totsnw - real - (:) - inout - F - MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run - - - accumulated_lwe_thickness_of_graupel_amount - accumulated graupel precipitation - kg m-2 - totgrp - real - (:) - inout - F - MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run - - - accumulated_lwe_thickness_of_precipitation_amount_in_bucket - accumulated total precipitation in bucket - m - totprcpb - real - (:) - inout - F - MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run - - - accumulated_lwe_thickness_of_ice_amount_in_bucket - accumulated ice precipitation in bucket - kg m-2 - toticeb - real - (:) - inout - F - MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run - - - accumulated_lwe_thickness_of_snow_amount_in_bucket - accumulated snow precipitation in bucket - kg m-2 - totsnwb - real - (:) - inout - F - MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run - - - accumulated_lwe_thickness_of_graupel_amount_in_bucket - accumulated graupel precipitation in bucket - kg m-2 - totgrpb - real - (:) - inout - F - MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run - - - cumulative_change_in_temperature_due_to_microphysics - cumulative change in temperature due to microphysics - K - dt3dt - real - (:,:) - inout - F - MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run - - - cumulative_change_in_water_vapor_specific_humidity_due_to_microphysics - cumulative change in water vapor specific humidity due to microphysics - kg kg-1 - dq3dt - real - (:,:) - inout - F - MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run - - - lwe_thickness_of_precipitation_amount_for_coupling - total rain precipitation - m - rain_cpl - real - (:) - inout - F - MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run - - - lwe_thickness_of_convective_precipitation_amount_for_coupling - total convective precipitation - m - rainc_cpl - real - (:) - inout - F - MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run - - - lwe_thickness_of_snow_amount_for_coupling - total snow precipitation - m - snow_cpl - real - (:) - inout - F - MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run - - - column_precipitable_water - precipitable water - kg m-2 - pwat - real - (:) - inout - F - MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run - - - flag_for_stochastic_surface_physics_perturbations - flag for stochastic surface physics perturbations - flag - do_sppt - logical - - in - F - MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run - - - tendency_of_air_temperature_due_to_radiative_heating_on_physics_time_step - temp. change due to radiative heating per time step - K - dtdtr - real - (:,:) - inout - F - MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run - - - tendency_of_air_temperature_due_to_radiative_heating_assuming_clear_sky - clear sky radiative (shortwave + longwave) heating rate at current time - K s-1 - dtdtc - real - (:,:) - in - F - MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run - - - tendency_of_lwe_thickness_of_precipitation_amount_for_coupling - change in rain_cpl (coupling_type) - m - drain_cpl - real - (:) - inout - F - MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run - - - tendency_of_lwe_thickness_of_snow_amount_for_coupling - change in show_cpl (coupling_type) - m - dsnow_cpl - real - (:) - inout - F - MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run - - - flag_for_land_surface_scheme - flag for land surface model - flag - lsm - integer - - in - F - MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run - - - flag_for_ruc_land_surface_scheme - flag for RUC land surface model - flag - lsm_ruc - integer - - in - F - MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run - - - lwe_thickness_of_explicit_rainfall_amount_from_previous_timestep - explicit rainfall from previous timestep - m - raincprv - real - (:) - inout - F - MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run - - - lwe_thickness_of_convective_precipitation_amount_from_previous_timestep - convective_precipitation_amount from previous timestep - m - rainncprv - real - (:) - inout - F - MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run - - - lwe_thickness_of_ice_amount_from_previous_timestep - ice amount from previous timestep - m - iceprv - real - (:) - inout - F - MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run - - - lwe_thickness_of_snow_amount_from_previous_timestep - snow amount from previous timestep - m - snowprv - real - (:) - inout - F - MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run - - - lwe_thickness_of_graupel_amount_from_previous_timestep - graupel amount from previous timestep - m - graupelprv - real - (:) - inout - F - MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_GFS_MP_generic_post SCHEME_GFS_MP_generic_post SUBROUTINE_GFS_MP_generic_post_run - - - - diff --git a/physics/GFS_MP_generic_pre.xml b/physics/GFS_MP_generic_pre.xml deleted file mode 100644 index 4274552e6..000000000 --- a/physics/GFS_MP_generic_pre.xml +++ /dev/null @@ -1,150 +0,0 @@ - - - - - - - horizontal_loop_extent - horizontal loop extent - count - im - integer - - in - F - MODULE_GFS_MP_generic_pre SCHEME_GFS_MP_generic_pre SUBROUTINE_GFS_MP_generic_pre_run - - - vertical_dimension - vertical layer dimension - count - levs - integer - - in - F - MODULE_GFS_MP_generic_pre SCHEME_GFS_MP_generic_pre SUBROUTINE_GFS_MP_generic_pre_run - - - flag_diagnostics_3D - logical flag for 3D diagnostics - flag - ldiag3d - logical - - in - F - MODULE_GFS_MP_generic_pre SCHEME_GFS_MP_generic_pre SUBROUTINE_GFS_MP_generic_pre_run - - - flag_for_Arakawa_Wu_adjustment - flag for Arakawa Wu scale-aware adjustment - flag - do_aw - logical - - in - F - MODULE_GFS_MP_generic_pre SCHEME_GFS_MP_generic_pre SUBROUTINE_GFS_MP_generic_pre_run - - - index_for_liquid_cloud_condensate - tracer index for cloud condensate (or liquid water) - index - ntcw - integer - - in - F - MODULE_GFS_MP_generic_pre SCHEME_GFS_MP_generic_pre SUBROUTINE_GFS_MP_generic_pre_run - - - number_of_tracers_for_cloud_condensate - number of tracers for cloud condensate - count - nncl - integer - - in - F - MODULE_GFS_MP_generic_pre SCHEME_GFS_MP_generic_pre SUBROUTINE_GFS_MP_generic_pre_run - - - number_of_tracers - number of tracers - count - ntrac - integer - - in - F - MODULE_GFS_MP_generic_pre SCHEME_GFS_MP_generic_pre SUBROUTINE_GFS_MP_generic_pre_run - - - air_temperature_updated_by_physics - temperature updated by physics - K - gt0 - real - (:,:) - in - F - MODULE_GFS_MP_generic_pre SCHEME_GFS_MP_generic_pre SUBROUTINE_GFS_MP_generic_pre_run - - - tracer_concentration_updated_by_physics - tracer concentration updated by physics - kg kg-1 - gq0 - real - (:,:,:) - in - F - MODULE_GFS_MP_generic_pre SCHEME_GFS_MP_generic_pre SUBROUTINE_GFS_MP_generic_pre_run - - - air_temperature_save - air temperature before entering a physics scheme - K - save_t - real - (:,:) - inout - F - MODULE_GFS_MP_generic_pre SCHEME_GFS_MP_generic_pre SUBROUTINE_GFS_MP_generic_pre_run - - - tracer_concentration_save - tracer concentration before entering a physics scheme - kg kg-1 - save_q - real - (:,:,:) - inout - F - MODULE_GFS_MP_generic_pre SCHEME_GFS_MP_generic_pre SUBROUTINE_GFS_MP_generic_pre_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_GFS_MP_generic_pre SCHEME_GFS_MP_generic_pre SUBROUTINE_GFS_MP_generic_pre_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_GFS_MP_generic_pre SCHEME_GFS_MP_generic_pre SUBROUTINE_GFS_MP_generic_pre_run - - - diff --git a/physics/GFS_PBL_generic_post.xml b/physics/GFS_PBL_generic_post.xml deleted file mode 100644 index 41dbad048..000000000 --- a/physics/GFS_PBL_generic_post.xml +++ /dev/null @@ -1,766 +0,0 @@ - - - - - - - horizontal_loop_extent - horizontal loop extent - count - im - integer - - in - F - MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run - - - vertical_dimension - vertical layer dimension - count - levs - integer - - in - F - MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run - - - number_of_vertical_diffusion_tracers - number of tracers to diffuse vertically - count - nvdiff - integer - - in - F - MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run - - - number_of_tracers - number of tracers - count - ntrac - integer - - in - F - MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run - - - index_for_water_vapor - tracer index for water vapor (specific humidity) - index - ntqv - integer - - in - F - MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run - - - index_for_liquid_cloud_condensate - tracer index for cloud condensate (or liquid water) - index - ntcw - integer - - in - F - MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run - - - index_for_ice_cloud_condensate - tracer index for ice water - index - ntiw - integer - - in - F - MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run - - - index_for_rain_water - tracer index for rain water - index - ntrw - integer - - in - F - MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run - - - index_for_snow_water - tracer index for snow water - index - ntsw - integer - - in - F - MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run - - - index_for_liquid_cloud_number_concentration - tracer index for liquid number concentration - index - ntlnc - integer - - in - F - MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run - - - index_for_ice_cloud_number_concentration - tracer index for ice number concentration - index - ntinc - integer - - in - F - MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run - - - index_for_water_friendly_aerosols - tracer index for water friendly aerosol - index - ntwa - integer - - in - F - MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run - - - index_for_ice_friendly_aerosols - tracer index for ice friendly aerosol - index - ntia - integer - - in - F - MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run - - - index_for_graupel - tracer index for graupel - index - ntgl - integer - - in - F - MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run - - - index_for_ozone - tracer index for ozone mixing ratio - index - ntoz - integer - - in - F - MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run - - - index_for_turbulent_kinetic_energy - tracer index for turbulent kinetic energy - index - ntke - integer - - in - F - MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run - - - index_for_turbulent_kinetic_energy_vertical_diffusion_tracer - index for turbulent kinetic energy in the vertically diffused tracer array - index - ntkev - integer - - in - F - MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run - - - flag_for_microphysics_scheme - choice of microphysics scheme - flag - imp_physics - integer - - in - F - MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run - - - flag_for_gfdl_microphysics_scheme - choice of GFDL microphysics scheme - flag - imp_physics_gfdl - integer - - in - F - MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run - - - flag_for_thompson_microphysics_scheme - choice of Thompson microphysics scheme - flag - imp_physics_thompson - integer - - in - F - MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run - - - flag_for_wsm6_microphysics_scheme - choice of WSM6 microphysics scheme - flag - imp_physics_wsm6 - integer - - in - F - MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run - - - flag_for_aerosol_physics - flag for aerosol physics - flag - ltaerosol - logical - - in - F - MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run - - - flag_for_flux_coupling - flag controlling cplflx collection (default off) - flag - cplflx - logical - - in - F - MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run - - - flag_diagnostics - logical flag for storing diagnostics - flag - lssav - logical - - in - F - MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run - - - flag_diagnostics_3D - flag for 3d diagnostic fields - flag - ldiag3d - logical - - in - F - MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run - - - flag_idealized_physics - flag for idealized physics - flag - lsidea - logical - - in - F - MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run - - - flag_for_hedmf - flag for hybrid edmf pbl scheme (moninedmf) - flag - hybedmf - logical - - in - F - MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run - - - flag_for_shoc - flag for SHOC - flag - do_shoc - logical - - in - F - MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run - - - flag_for_scale_aware_TKE_moist_EDMF_PBL - flag for scale-aware TKE moist EDMF PBL scheme - flag - satmedmf - logical - - in - F - MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run - - - flag_for_scale_aware_Shinhong_PBL - flag for scale-aware Shinhong PBL scheme - flag - shinhong - logical - - in - F - MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run - - - flag_for_ysu - flag for YSU PBL scheme - flag - do_ysu - logical - - in - F - MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run - - - tendency_of_vertically_diffused_tracer_concentration - updated tendency of the tracers due to vertical diffusion in PBL scheme - kg kg-1 s-1 - dvdftra - real - (:,:,:) - in - F - MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run - - - instantaneous_surface_x_momentum_flux - surface momentum flux in the x-direction valid for current call - Pa - dusfc1 - real - (:) - in - F - MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run - - - instantaneous_surface_y_momentum_flux - surface momentum flux in the y-direction valid for current call - Pa - dvsfc1 - real - (:) - in - F - MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run - - - instantaneous_surface_upward_sensible_heat_flux - surface upward sensible heat flux valid for current call - W m-2 - dtsfc1 - real - (:) - in - F - MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run - - - instantaneous_surface_upward_latent_heat_flux - surface upward latent heat flux valid for current call - W m-2 - dqsfc1 - real - (:) - in - F - MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run - - - time_step_for_dynamics - dynamics timestep - s - dtf - real - - in - F - MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run - - - tendency_of_x_wind_due_to_model_physics - updated tendency of the x wind - m s-2 - dudt - real - (:,:) - in - F - MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run - - - tendency_of_y_wind_due_to_model_physics - updated tendency of the y wind - m s-2 - dvdt - real - (:,:) - in - F - MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run - - - tendency_of_air_temperature_due_to_model_physics - updated tendency of the temperature - K s-1 - dtdt - real - (:,:) - in - F - MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run - - - tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_timestep - total sky sw heating rate - K s-1 - htrsw - real - (:,:) - in - F - MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run - - - tendency_of_air_temperature_due_to_longwave_heating_on_radiation_timestep - total sky lw heating rate - K s-1 - htrlw - real - (:,:) - in - F - MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run - - - zenith_angle_temporal_adjustment_factor_for_shortwave_fluxes - zenith angle temporal adjustment factor for shortwave - none - xmu - real - (:) - in - F - MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run - - - tendency_of_tracers_due_to_model_physics - updated tendency of the tracers due to model physics - kg kg-1 s-1 - dqdt - real - (:,:,:) - inout - F - MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run - - - cumulative_surface_x_momentum_flux_for_coupling_multiplied_by_timestep - cumulative sfc u momentum flux multiplied by timestep - Pa s - dusfc_cpl - real - (:) - inout - F - MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run - - - cumulative_surface_y_momentum_flux_for_coupling_multiplied_by_timestep - cumulative sfc v momentum flux multiplied by timestep - Pa s - dvsfc_cpl - real - (:) - inout - F - MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run - - - cumulative_surface_upward_sensible_heat_flux_for_coupling_multiplied_by_timestep - cumulative sfc sensible heat flux multiplied by timestep - W m-2 s - dtsfc_cpl - real - (:) - inout - F - MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run - - - cumulative_surface_upward_latent_heat_flux_for_coupling_multiplied_by_timestep - cumulative sfc latent heat flux multiplied by timestep - W m-2 s - dqsfc_cpl - real - (:) - inout - F - MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run - - - instantaneous_surface_x_momentum_flux_for_coupling - instantaneous sfc u momentum flux - Pa - dusfci_cpl - real - (:) - inout - F - MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run - - - instantaneous_surface_y_momentum_flux_for_coupling - instantaneous sfc v momentum flux - Pa - dvsfci_cpl - real - (:) - inout - F - MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run - - - instantaneous_surface_upward_sensible_heat_flux_for_coupling - instantaneous sfc sensible heat flux - W m-2 - dtsfci_cpl - real - (:) - inout - F - MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run - - - instantaneous_surface_upward_latent_heat_flux_for_coupling - instantaneous sfc latent heat flux - W m-2 - dqsfci_cpl - real - (:) - inout - F - MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run - - - cumulative_surface_x_momentum_flux_for_diag_multiplied_by_timestep - cumulative sfc x momentum flux multiplied by timestep - Pa s - dusfc_diag - real - (:) - inout - F - MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run - - - cumulative_surface_y_momentum_flux_for_diag_multiplied_by_timestep - cumulative sfc y momentum flux multiplied by timestep - Pa s - dvsfc_diag - real - (:) - inout - F - MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run - - - cumulative_surface_upward_sensible_heat_flux_for_diag_multiplied_by_timestep - cumulative sfc sensible heat flux multiplied by timestep - W m-2 s - dtsfc_diag - real - (:) - inout - F - MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run - - - cumulative_surface_upward_latent_heat_flux_for_diag_multiplied_by_timestep - cumulative sfc latent heat flux multiplied by timestep - W m-2 s - dqsfc_diag - real - (:) - inout - F - MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run - - - instantaneous_surface_x_momentum_flux_for_diag - instantaneous sfc x momentum flux multiplied by timestep - Pa - dusfci_diag - real - (:) - inout - F - MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run - - - instantaneous_surface_y_momentum_flux_for_diag - instantaneous sfc y momentum flux multiplied by timestep - Pa - dvsfci_diag - real - (:) - inout - F - MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run - - - instantaneous_surface_upward_sensible_heat_flux_for_diag - instantaneous sfc sensible heat flux multiplied by timestep - W m-2 - dtsfci_diag - real - (:) - inout - F - MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run - - - instantaneous_surface_upward_latent_heat_flux_for_diag - instantaneous sfc latent heat flux multiplied by timestep - W m-2 - dqsfci_diag - real - (:) - inout - F - MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run - - - cumulative_change_in_temperature_due_to_PBL - cumulative change in temperature due to PBL - K - dt3dt - real - (:,:) - inout - F - MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run - - - cumulative_change_in_x_wind_due_to_PBL - cumulative change in x wind due to PBL - m s-1 - du3dt_PBL - real - (:,:) - inout - F - MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run - - - cumulative_change_in_x_wind_due_to_orographic_gravity_wave_drag - cumulative change in x wind due to orographic gravity wave drag - m s-1 - du3dt_OGWD - real - (:,:) - inout - F - MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run - - - cumulative_change_in_y_wind_due_to_PBL - cumulative change in y wind due to PBL - m s-1 - dv3dt_PBL - real - (:,:) - inout - F - MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run - - - cumulative_change_in_y_wind_due_to_orographic_gravity_wave_drag - cumulative change in y wind due to orographic gravity wave drag - m s-1 - dv3dt_OGWD - real - (:,:) - inout - F - MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run - - - cumulative_change_in_water_vapor_specific_humidity_due_to_PBL - cumulative change in water vapor specific humidity due to PBL - kg kg-1 - dq3dt - real - (:,:) - inout - F - MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run - - - cumulative_change_in_ozone_mixing_ratio_due_to_PBL - cumulative change in ozone mixing ratio due to PBL - kg kg-1 - dq3dt_ozone - real - (:,:) - inout - F - MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_GFS_PBL_generic_post SCHEME_GFS_PBL_generic_post SUBROUTINE_GFS_PBL_generic_post_run - - - diff --git a/physics/GFS_PBL_generic_pre.xml b/physics/GFS_PBL_generic_pre.xml deleted file mode 100644 index e4213e6ae..000000000 --- a/physics/GFS_PBL_generic_pre.xml +++ /dev/null @@ -1,326 +0,0 @@ - - - - - horizontal_loop_extent - horizontal loop extent - count - im - integer - - in - F - MODULE_GFS_PBL_generic_pre SCHEME_GFS_PBL_generic_pre SUBROUTINE_GFS_PBL_generic_pre_run - - - vertical_dimension - vertical layer dimension - count - levs - integer - - in - F - MODULE_GFS_PBL_generic_pre SCHEME_GFS_PBL_generic_pre SUBROUTINE_GFS_PBL_generic_pre_run - - - number_of_vertical_diffusion_tracers - number of tracers to diffuse vertically - count - nvdiff - integer - - in - F - MODULE_GFS_PBL_generic_pre SCHEME_GFS_PBL_generic_pre SUBROUTINE_GFS_PBL_generic_pre_run - - - number_of_tracers - number of tracers - count - ntrac - integer - - in - F - MODULE_GFS_PBL_generic_pre SCHEME_GFS_PBL_generic_pre SUBROUTINE_GFS_PBL_generic_pre_run - - - index_for_water_vapor - tracer index for water vapor (specific humidity) - index - ntqv - integer - - in - F - MODULE_GFS_PBL_generic_pre SCHEME_GFS_PBL_generic_pre SUBROUTINE_GFS_PBL_generic_pre_run - - - index_for_liquid_cloud_condensate - tracer index for cloud condensate (or liquid water) - index - ntcw - integer - - in - F - MODULE_GFS_PBL_generic_pre SCHEME_GFS_PBL_generic_pre SUBROUTINE_GFS_PBL_generic_pre_run - - - index_for_ice_cloud_condensate - tracer index for ice water - index - ntiw - integer - - in - F - MODULE_GFS_PBL_generic_pre SCHEME_GFS_PBL_generic_pre SUBROUTINE_GFS_PBL_generic_pre_run - - - index_for_rain_water - tracer index for rain water - index - ntrw - integer - - in - F - MODULE_GFS_PBL_generic_pre SCHEME_GFS_PBL_generic_pre SUBROUTINE_GFS_PBL_generic_pre_run - - - index_for_snow_water - tracer index for snow water - index - ntsw - integer - - in - F - MODULE_GFS_PBL_generic_pre SCHEME_GFS_PBL_generic_pre SUBROUTINE_GFS_PBL_generic_pre_run - - - index_for_liquid_cloud_number_concentration - tracer index for liquid number concentration - index - ntlnc - integer - - in - F - MODULE_GFS_PBL_generic_pre SCHEME_GFS_PBL_generic_pre SUBROUTINE_GFS_PBL_generic_pre_run - - - index_for_ice_cloud_number_concentration - tracer index for ice number concentration - index - ntinc - integer - - in - F - MODULE_GFS_PBL_generic_pre SCHEME_GFS_PBL_generic_pre SUBROUTINE_GFS_PBL_generic_pre_run - - - index_for_water_friendly_aerosols - tracer index for water friendly aerosol - index - ntwa - integer - - in - F - MODULE_GFS_PBL_generic_pre SCHEME_GFS_PBL_generic_pre SUBROUTINE_GFS_PBL_generic_pre_run - - - index_for_ice_friendly_aerosols - tracer index for ice friendly aerosol - index - ntia - integer - - in - F - MODULE_GFS_PBL_generic_pre SCHEME_GFS_PBL_generic_pre SUBROUTINE_GFS_PBL_generic_pre_run - - - index_for_graupel - tracer index for graupel - index - ntgl - integer - - in - F - MODULE_GFS_PBL_generic_pre SCHEME_GFS_PBL_generic_pre SUBROUTINE_GFS_PBL_generic_pre_run - - - index_for_ozone - tracer index for ozone mixing ratio - index - ntoz - integer - - in - F - MODULE_GFS_PBL_generic_pre SCHEME_GFS_PBL_generic_pre SUBROUTINE_GFS_PBL_generic_pre_run - - - index_for_turbulent_kinetic_energy - tracer index for turbulent kinetic energy - index - ntke - integer - - in - F - MODULE_GFS_PBL_generic_pre SCHEME_GFS_PBL_generic_pre SUBROUTINE_GFS_PBL_generic_pre_run - - - index_for_turbulent_kinetic_energy_vertical_diffusion_tracer - index for turbulent kinetic energy in the vertically diffused tracer array - index - ntkev - integer - - in - F - MODULE_GFS_PBL_generic_pre SCHEME_GFS_PBL_generic_pre SUBROUTINE_GFS_PBL_generic_pre_run - - - flag_for_microphysics_scheme - choice of microphysics scheme - flag - imp_physics - integer - - in - F - MODULE_GFS_PBL_generic_pre SCHEME_GFS_PBL_generic_pre SUBROUTINE_GFS_PBL_generic_pre_run - - - flag_for_gfdl_microphysics_scheme - choice of GFDL microphysics scheme - flag - imp_physics_gfdl - integer - - in - F - MODULE_GFS_PBL_generic_pre SCHEME_GFS_PBL_generic_pre SUBROUTINE_GFS_PBL_generic_pre_run - - - flag_for_thompson_microphysics_scheme - choice of Thompson microphysics scheme - flag - imp_physics_thompson - integer - - in - F - MODULE_GFS_PBL_generic_pre SCHEME_GFS_PBL_generic_pre SUBROUTINE_GFS_PBL_generic_pre_run - - - flag_for_wsm6_microphysics_scheme - choice of WSM6 microphysics scheme - flag - imp_physics_wsm6 - integer - - in - F - MODULE_GFS_PBL_generic_pre SCHEME_GFS_PBL_generic_pre SUBROUTINE_GFS_PBL_generic_pre_run - - - flag_for_aerosol_physics - flag for aerosol physics - flag - ltaerosol - logical - - in - F - MODULE_GFS_PBL_generic_pre SCHEME_GFS_PBL_generic_pre SUBROUTINE_GFS_PBL_generic_pre_run - - - flag_for_hedmf - flag for hybrid edmf pbl scheme (moninedmf) - flag - hybedmf - logical - - in - F - MODULE_GFS_PBL_generic_pre SCHEME_GFS_PBL_generic_pre SUBROUTINE_GFS_PBL_generic_pre_run - - - flag_for_shoc - flag for SHOC - flag - do_shoc - logical - - in - F - MODULE_GFS_PBL_generic_pre SCHEME_GFS_PBL_generic_pre SUBROUTINE_GFS_PBL_generic_pre_run - - - flag_for_scale_aware_TKE_moist_EDMF_PBL - flag for scale-aware TKE moist EDMF PBL scheme - flag - satmedmf - logical - - in - F - MODULE_GFS_PBL_generic_pre SCHEME_GFS_PBL_generic_pre SUBROUTINE_GFS_PBL_generic_pre_run - - - tracer_concentration - model layer mean tracer concentration - kg kg-1 - qgrs - real - (:,:,:) - in - F - MODULE_GFS_PBL_generic_pre SCHEME_GFS_PBL_generic_pre SUBROUTINE_GFS_PBL_generic_pre_run - - - vertically_diffused_tracer_concentration - tracer concentration diffused by PBL scheme - kg kg-1 - vdftra - real - (:,:,:) - inout - F - MODULE_GFS_PBL_generic_pre SCHEME_GFS_PBL_generic_pre SUBROUTINE_GFS_PBL_generic_pre_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_GFS_PBL_generic_pre SCHEME_GFS_PBL_generic_pre SUBROUTINE_GFS_PBL_generic_pre_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_GFS_PBL_generic_pre SCHEME_GFS_PBL_generic_pre SUBROUTINE_GFS_PBL_generic_pre_run - - - - - diff --git a/physics/GFS_SCNV_generic_post.xml b/physics/GFS_SCNV_generic_post.xml deleted file mode 100644 index 230edf8c3..000000000 --- a/physics/GFS_SCNV_generic_post.xml +++ /dev/null @@ -1,194 +0,0 @@ - - - - - horizontal_loop_extent - horizontal loop extent - count - im - integer - - in - F - MODULE_GFS_SCNV_generic_post SCHEME_GFS_SCNV_generic_post SUBROUTINE_GFS_SCNV_generic_post_run - - - vertical_dimension - vertical layer dimension - count - levs - integer - - in - F - MODULE_GFS_SCNV_generic_post SCHEME_GFS_SCNV_generic_post SUBROUTINE_GFS_SCNV_generic_post_run - - - number_of_tracers_for_convective_transport - number of tracers for convective transport - count - nn - integer - - in - F - MODULE_GFS_SCNV_generic_post SCHEME_GFS_SCNV_generic_post SUBROUTINE_GFS_SCNV_generic_post_run - - - flag_diagnostics - logical flag for storing diagnostics - flag - lssav - logical - - in - F - MODULE_GFS_SCNV_generic_post SCHEME_GFS_SCNV_generic_post SUBROUTINE_GFS_SCNV_generic_post_run - - - flag_diagnostics_3D - flag for 3d diagnostic fields - flag - ldiag3d - logical - - in - F - MODULE_GFS_SCNV_generic_post SCHEME_GFS_SCNV_generic_post SUBROUTINE_GFS_SCNV_generic_post_run - - - flag_gocart - flag for 3d diagnostic fields for gocart 1 - flag - lgocart - logical - - in - F - MODULE_GFS_SCNV_generic_post SCHEME_GFS_SCNV_generic_post SUBROUTINE_GFS_SCNV_generic_post_run - - - dynamics_to_physics_timestep_ratio - ratio of dynamics timestep to physics timestep - none - frain - real - - in - F - MODULE_GFS_SCNV_generic_post SCHEME_GFS_SCNV_generic_post SUBROUTINE_GFS_SCNV_generic_post_run - - - air_temperature_updated_by_physics - temperature updated by physics - K - gt0 - real - (:,:) - in - F - MODULE_GFS_SCNV_generic_post SCHEME_GFS_SCNV_generic_post SUBROUTINE_GFS_SCNV_generic_post_run - - - water_vapor_specific_humidity_updated_by_physics - water vapor specific humidity updated by physics - kg kg-1 - gq0_water_vapor - real - (:,:) - in - F - MODULE_GFS_SCNV_generic_post SCHEME_GFS_SCNV_generic_post SUBROUTINE_GFS_SCNV_generic_post_run - - - air_temperature_save - air temperature before entering a physics scheme - K - save_t - real - (:,:) - in - F - MODULE_GFS_SCNV_generic_post SCHEME_GFS_SCNV_generic_post SUBROUTINE_GFS_SCNV_generic_post_run - - - water_vapor_specific_humidity_save - water vapor specific humidity before entering a physics scheme - kg kg-1 - save_qv - real - (:,:) - in - F - MODULE_GFS_SCNV_generic_post SCHEME_GFS_SCNV_generic_post SUBROUTINE_GFS_SCNV_generic_post_run - - - instantaneous_water_vapor_specific_humidity_tendency_due_to_convection - instantaneous moisture tendency due to convection - kg kg-1 s-1 - dqdti - real - (:,:) - inout - F - MODULE_GFS_SCNV_generic_post SCHEME_GFS_SCNV_generic_post SUBROUTINE_GFS_SCNV_generic_post_run - - - cumulative_change_in_temperature_due_to_shal_convection - cumulative change in temperature due to shal conv. - K - dt3dt - real - (:,:) - inout - F - MODULE_GFS_SCNV_generic_post SCHEME_GFS_SCNV_generic_post SUBROUTINE_GFS_SCNV_generic_post_run - - - cumulative_change_in_water_vapor_specific_humidity_due_to_shal_convection - cumulative change in water vapor specific humidity due to shal conv. - kg kg-1 - dq3dt - real - (:,:) - inout - F - MODULE_GFS_SCNV_generic_post SCHEME_GFS_SCNV_generic_post SUBROUTINE_GFS_SCNV_generic_post_run - - - convective_transportable_tracers - array to contain cloud water and other convective trans. tracers - kg kg-1 - clw - real - (:,:,:) - inout - F - MODULE_GFS_SCNV_generic_post SCHEME_GFS_SCNV_generic_post SUBROUTINE_GFS_SCNV_generic_post_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_GFS_SCNV_generic_post SCHEME_GFS_SCNV_generic_post SUBROUTINE_GFS_SCNV_generic_post_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_GFS_SCNV_generic_post SCHEME_GFS_SCNV_generic_post SUBROUTINE_GFS_SCNV_generic_post_run - - - - - diff --git a/physics/GFS_SCNV_generic_pre.xml b/physics/GFS_SCNV_generic_pre.xml deleted file mode 100644 index 1a69aa5af..000000000 --- a/physics/GFS_SCNV_generic_pre.xml +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - horizontal_loop_extent - horizontal loop extent - count - im - integer - - in - F - MODULE_GFS_SCNV_generic_pre SCHEME_GFS_SCNV_generic_pre SUBROUTINE_GFS_SCNV_generic_pre_run - - - vertical_dimension - vertical layer dimension - count - levs - integer - - in - F - MODULE_GFS_SCNV_generic_pre SCHEME_GFS_SCNV_generic_pre SUBROUTINE_GFS_SCNV_generic_pre_run - - - flag_diagnostics_3D - flag for 3d diagnostic fields - flag - ldiag3d - logical - - in - F - MODULE_GFS_SCNV_generic_pre SCHEME_GFS_SCNV_generic_pre SUBROUTINE_GFS_SCNV_generic_pre_run - - - flag_gocart - flag for 3d diagnostic fields for gocart 1 - flag - lgocart - logical - - in - F - MODULE_GFS_SCNV_generic_pre SCHEME_GFS_SCNV_generic_pre SUBROUTINE_GFS_SCNV_generic_pre_run - - - air_temperature_updated_by_physics - temperature updated by physics - K - gt0 - real - (:,:) - in - F - MODULE_GFS_SCNV_generic_pre SCHEME_GFS_SCNV_generic_pre SUBROUTINE_GFS_SCNV_generic_pre_run - - - water_vapor_specific_humidity_updated_by_physics - water vapor specific humidity updated by physics - kg kg-1 - gq0_water_vapor - real - (:,:) - in - F - MODULE_GFS_SCNV_generic_pre SCHEME_GFS_SCNV_generic_pre SUBROUTINE_GFS_SCNV_generic_pre_run - - - air_temperature_save - air temperature before entering a physics scheme - K - save_t - real - (:,:) - inout - F - MODULE_GFS_SCNV_generic_pre SCHEME_GFS_SCNV_generic_pre SUBROUTINE_GFS_SCNV_generic_pre_run - - - water_vapor_specific_humidity_save - water vapor specific humidity before entering a physics scheme - kg kg-1 - save_qv - real - (:,:) - inout - F - MODULE_GFS_SCNV_generic_pre SCHEME_GFS_SCNV_generic_pre SUBROUTINE_GFS_SCNV_generic_pre_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_GFS_SCNV_generic_pre SCHEME_GFS_SCNV_generic_pre SUBROUTINE_GFS_SCNV_generic_pre_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_GFS_SCNV_generic_pre SCHEME_GFS_SCNV_generic_pre SUBROUTINE_GFS_SCNV_generic_pre_run - - - diff --git a/physics/GFS_phys_time_vary.xml b/physics/GFS_phys_time_vary.xml deleted file mode 100644 index 8f5a765ea..000000000 --- a/physics/GFS_phys_time_vary.xml +++ /dev/null @@ -1,151 +0,0 @@ - - - - - - GFS_grid_type_instance - Fortran DDT containing FV3-GFS grid and interpolation related data - DDT - Grid - GFS_grid_type - - inout - F - MODULE_GFS_phys_time_vary SCHEME_GFS_phys_time_vary SUBROUTINE_GFS_phys_time_vary_init - - - GFS_control_type_instance - Fortran DDT containing FV3-GFS model control parameters - DDT - Model - GFS_control_type - - in - F - MODULE_GFS_phys_time_vary SCHEME_GFS_phys_time_vary SUBROUTINE_GFS_phys_time_vary_init - - - GFS_tbd_type_instance - Fortran DDT containing FV3-GFS miscellaneous data - DDT - Tbd - GFS_tbd_type - - in - F - MODULE_GFS_phys_time_vary SCHEME_GFS_phys_time_vary SUBROUTINE_GFS_phys_time_vary_init - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_GFS_phys_time_vary SCHEME_GFS_phys_time_vary SUBROUTINE_GFS_phys_time_vary_init - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_GFS_phys_time_vary SCHEME_GFS_phys_time_vary SUBROUTINE_GFS_phys_time_vary_init - - - - - GFS_grid_type_instance - Fortran DDT containing FV3-GFS grid and interpolation related data - DDT - Grid - GFS_grid_type - - in - F - MODULE_GFS_phys_time_vary SCHEME_GFS_phys_time_vary SUBROUTINE_GFS_phys_time_vary_run - - - GFS_control_type_instance - Fortran DDT containing FV3-GFS model control parameters - DDT - Model - GFS_control_type - - inout - F - MODULE_GFS_phys_time_vary SCHEME_GFS_phys_time_vary SUBROUTINE_GFS_phys_time_vary_run - - - GFS_tbd_type_instance - Fortran DDT containing FV3-GFS miscellaneous data - DDT - Tbd - GFS_tbd_type - - inout - F - MODULE_GFS_phys_time_vary SCHEME_GFS_phys_time_vary SUBROUTINE_GFS_phys_time_vary_run - - - GFS_sfcprop_type_instance - Fortran DDT containing FV3-GFS surface fields - DDT - Sfcprop - GFS_sfcprop_type - - inout - F - MODULE_GFS_phys_time_vary SCHEME_GFS_phys_time_vary SUBROUTINE_GFS_phys_time_vary_run - - - GFS_cldprop_type_instance - Fortran DDT containing FV3-GFS cloud fields - DDT - Cldprop - GFS_cldprop_type - - inout - F - MODULE_GFS_phys_time_vary SCHEME_GFS_phys_time_vary SUBROUTINE_GFS_phys_time_vary_run - - - GFS_diag_type_instance - Fortran DDT containing FV3-GFS fields targeted for diagnostic output - DDT - Diag - GFS_diag_type - - inout - F - MODULE_GFS_phys_time_vary SCHEME_GFS_phys_time_vary SUBROUTINE_GFS_phys_time_vary_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_GFS_phys_time_vary SCHEME_GFS_phys_time_vary SUBROUTINE_GFS_phys_time_vary_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_GFS_phys_time_vary SCHEME_GFS_phys_time_vary SUBROUTINE_GFS_phys_time_vary_run - - - diff --git a/physics/GFS_rad_time_vary.xml b/physics/GFS_rad_time_vary.xml deleted file mode 100644 index e351dd54c..000000000 --- a/physics/GFS_rad_time_vary.xml +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - GFS_control_type_instance - Fortran DDT containing FV3-GFS model control parameters - DDT - Model - GFS_control_type - - inout - F - MODULE_GFS_rad_time_vary SCHEME_GFS_rad_time_vary SUBROUTINE_GFS_rad_time_vary_run - - - GFS_statein_type_instance - Fortran DDT containing FV3-GFS prognostic state data in from dycore - DDT - Statein - GFS_statein_type - - in - F - MODULE_GFS_rad_time_vary SCHEME_GFS_rad_time_vary SUBROUTINE_GFS_rad_time_vary_run - - - GFS_tbd_type_instance - Fortran DDT containing FV3-GFS data not yet assigned to a defined container - DDT - Tbd - GFS_tbd_type - - inout - F - MODULE_GFS_rad_time_vary SCHEME_GFS_rad_time_vary SUBROUTINE_GFS_rad_time_vary_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_GFS_rad_time_vary SCHEME_GFS_rad_time_vary SUBROUTINE_GFS_rad_time_vary_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_GFS_rad_time_vary SCHEME_GFS_rad_time_vary SUBROUTINE_GFS_rad_time_vary_run - - - - diff --git a/physics/GFS_rrtmg_post.xml b/physics/GFS_rrtmg_post.xml deleted file mode 100644 index 9529d2127..000000000 --- a/physics/GFS_rrtmg_post.xml +++ /dev/null @@ -1,260 +0,0 @@ - - - - - - GFS_control_type_instance - Fortran DDT containing FV3-GFS model control parameters - DDT - Model - GFS_control_type - - in - F - MODULE_GFS_rrtmg_post SCHEME_GFS_rrtmg_post SUBROUTINE_GFS_rrtmg_post_run - - - GFS_grid_type_instance - Fortran DDT containing FV3-GFS grid and interpolation related data - DDT - Grid - GFS_grid_type - - in - F - MODULE_GFS_rrtmg_post SCHEME_GFS_rrtmg_post SUBROUTINE_GFS_rrtmg_post_run - - - GFS_diag_type_instance - Fortran DDT containing FV3-GFS diagnotics data - DDT - Diag - GFS_diag_type - - inout - F - MODULE_GFS_rrtmg_post SCHEME_GFS_rrtmg_post SUBROUTINE_GFS_rrtmg_post_run - - - GFS_radtend_type_instance - Fortran DDT containing FV3-GFS radiation tendencies - DDT - Radtend - GFS_radtend_type - - in - F - MODULE_GFS_rrtmg_post SCHEME_GFS_rrtmg_post SUBROUTINE_GFS_rrtmg_post_run - - - GFS_statein_type_instance - Fortran DDT containing FV3-GFS prognostic state data in from dycore - DDT - Statein - GFS_statein_type - - in - F - MODULE_GFS_rrtmg_post SCHEME_GFS_rrtmg_post SUBROUTINE_GFS_rrtmg_post_run - - - GFS_coupling_type_instance - Fortran DDT containing FV3-GFS fields to/from coupling with other components - DDT - Coupling - GFS_coupling_type - - inout - F - MODULE_GFS_rrtmg_post SCHEME_GFS_rrtmg_post SUBROUTINE_GFS_rrtmg_post_run - - - components_of_surface_downward_shortwave_fluxes - derived type for special components of surface downward shortwave fluxes - W m-2 - scmpsw - cmpfsw_type - (:) - in - F - MODULE_GFS_rrtmg_post SCHEME_GFS_rrtmg_post SUBROUTINE_GFS_rrtmg_post_run - - - horizontal_loop_extent - horizontal loop extent - count - im - integer - - in - F - MODULE_GFS_rrtmg_post SCHEME_GFS_rrtmg_post SUBROUTINE_GFS_rrtmg_post_run - - - vertical_layer_dimension_for_radiation - number of vertical layers for radiation calculation - count - lm - integer - - in - F - MODULE_GFS_rrtmg_post SCHEME_GFS_rrtmg_post SUBROUTINE_GFS_rrtmg_post_run - - - extra_top_layer - extra top layers - none - ltp - integer - - in - F - MODULE_GFS_rrtmg_post SCHEME_GFS_rrtmg_post SUBROUTINE_GFS_rrtmg_post_run - - - vertical_index_difference_between_layer_and_upper_bound - vertical index difference between layer and upper bound - index - kt - integer - - in - F - MODULE_GFS_rrtmg_post SCHEME_GFS_rrtmg_post SUBROUTINE_GFS_rrtmg_post_run - - - vertical_index_difference_between_layer_and_lower_bound - vertical index difference between layer and lower bound - index - kb - integer - - in - F - MODULE_GFS_rrtmg_post SCHEME_GFS_rrtmg_post SUBROUTINE_GFS_rrtmg_post_run - - - vertical_index_difference_between_inout_and_local - vertical index difference between in/out and local - index - kd - integer - - in - F - MODULE_GFS_rrtmg_post SCHEME_GFS_rrtmg_post SUBROUTINE_GFS_rrtmg_post_run - - - time_step_for_radiation - radiation time step - s - raddt - real - - in - F - MODULE_GFS_rrtmg_post SCHEME_GFS_rrtmg_post SUBROUTINE_GFS_rrtmg_post_run - - - atmosphere_optical_thickness_due_to_ambient_aerosol_particles - vertical integrated optical depth for various aerosol species - none - aerodp - real - (:,:) - in - F - MODULE_GFS_rrtmg_post SCHEME_GFS_rrtmg_post SUBROUTINE_GFS_rrtmg_post_run - - - cloud_area_fraction_for_radiation - fraction of clouds for low, middle, high, total and BL - frac - cldsa - real - (:,:) - in - F - MODULE_GFS_rrtmg_post SCHEME_GFS_rrtmg_post SUBROUTINE_GFS_rrtmg_post_run - - - model_layer_number_at_cloud_top - vertical indices for low, middle and high cloud tops - index - mtopa - integer - (:,:) - in - F - MODULE_GFS_rrtmg_post SCHEME_GFS_rrtmg_post SUBROUTINE_GFS_rrtmg_post_run - - - model_layer_number_at_cloud_base - vertical indices for low, middle and high cloud bases - index - mbota - integer - (:,:) - in - F - MODULE_GFS_rrtmg_post SCHEME_GFS_rrtmg_post SUBROUTINE_GFS_rrtmg_post_run - - - total_cloud_fraction - layer total cloud fraction - frac - clouds1 - real - (:,:) - in - F - MODULE_GFS_rrtmg_post SCHEME_GFS_rrtmg_post SUBROUTINE_GFS_rrtmg_post_run - - - cloud_optical_depth_layers_at_10mu_band - approx 10mu band layer cloud optical depth - none - cldtaulw - real - (:,:) - in - F - MODULE_GFS_rrtmg_post SCHEME_GFS_rrtmg_post SUBROUTINE_GFS_rrtmg_post_run - - - cloud_optical_depth_layers_at_0.55mu_band - approx .55mu band layer cloud optical depth - none - cldtausw - real - (:,:) - in - F - MODULE_GFS_rrtmg_post SCHEME_GFS_rrtmg_post SUBROUTINE_GFS_rrtmg_post_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_GFS_rrtmg_post SCHEME_GFS_rrtmg_post SUBROUTINE_GFS_rrtmg_post_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_GFS_rrtmg_post SCHEME_GFS_rrtmg_post SUBROUTINE_GFS_rrtmg_post_run - - - - diff --git a/physics/GFS_rrtmg_pre.xml b/physics/GFS_rrtmg_pre.xml deleted file mode 100644 index 63f7d8d58..000000000 --- a/physics/GFS_rrtmg_pre.xml +++ /dev/null @@ -1,656 +0,0 @@ - - - - - - - GFS_control_type_instance - Fortran DDT containing FV3-GFS model control parameters - DDT - Model - GFS_control_type - - in - F - MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run - - - GFS_grid_type_instance - Fortran DDT containing FV3-GFS grid and interpolation related data - DDT - Grid - GFS_grid_type - - in - F - MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run - - - GFS_sfcprop_type_instance - Fortran DDT containing FV3-GFS surface fields - DDT - Sfcprop - GFS_sfcprop_type - - in - F - MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run - - - GFS_statein_type_instance - Fortran DDT containing FV3-GFS prognostic state data in from dycore - DDT - Statein - GFS_statein_type - - in - F - MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run - - - GFS_tbd_type_instance - Fortran DDT containing FV3-GFS data not yet assigned to a defined container - DDT - Tbd - GFS_tbd_type - - in - F - MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run - - - GFS_cldprop_type_instance - Fortran DDT containing FV3-GFS cloud fields needed by radiation from physics - DDT - Cldprop - GFS_cldprop_type - - in - F - MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run - - - GFS_coupling_type_instance - Fortran DDT containing FV3-GFS fields needed for coupling - DDT - Coupling - GFS_coupling_type - - in - F - MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run - - - GFS_radtend_type_instance - Fortran DDT containing FV3-GFS radiation tendencies - DDT - Radtend - GFS_radtend_type - - inout - F - MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run - - - vertical_layer_dimension_for_radiation - number of vertical layers for radiation calculation - count - lm - integer - - in - F - MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run - - - horizontal_loop_extent - horizontal loop extent - count - im - integer - - in - F - MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run - - - adjusted_vertical_layer_dimension_for_radiation - number of vertical layers for radiation - count - lmk - integer - - in - F - MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run - - - adjusted_vertical_level_dimension_for_radiation - number of vertical levels for radiation - count - lmp - integer - - in - F - MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run - - - vertical_index_difference_between_inout_and_local - vertical index difference between in/out and local - index - kd - integer - - out - F - MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run - - - vertical_index_difference_between_layer_and_upper_bound - vertical index difference between layer and upper bound - index - kt - integer - - out - F - MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run - - - vertical_index_difference_between_layer_and_lower_bound - vertical index difference between layer and lower bound - index - kb - integer - - out - F - MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run - - - time_step_for_radiation - radiation time step - s - raddt - real - - out - F - MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run - - - layer_pressure_thickness_for_radiation - layer pressure thickness on radiation levels - hPa - delp - real - (:,:) - out - F - MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run - - - layer_thickness_for_radiation - layer thickness on radiation levels - km - dz - real - (:,:) - out - F - MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run - - - air_pressure_at_interface_for_radiation_in_hPa - air pressure at vertical interface for radiation calculation - hPa - plvl - real - (:,:) - out - F - MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run - - - air_pressure_at_layer_for_radiation_in_hPa - air pressure at vertical layer for radiation calculation - hPa - plyr - real - (:,:) - out - F - MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run - - - air_temperature_at_interface_for_radiation - air temperature at vertical interface for radiation calculation - K - tlvl - real - (:,:) - out - F - MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run - - - air_temperature_at_layer_for_radiation - air temperature at vertical layer for radiation calculation - K - tlyr - real - (:,:) - out - F - MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run - - - surface_ground_temperature_for_radiation - surface ground temperature for radiation - K - tsfg - real - (:) - out - F - MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run - - - surface_air_temperature_for_radiation - lowest model layer air temperature for radiation - K - tsfa - real - (:) - out - F - MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run - - - water_vapor_specific_humidity_at_layer_for_radiation - water vapor specific humidity at vertical layer for radiation calculation - kg kg-1 - qlyr - real - (:,:) - out - F - MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run - - - ozone_concentration_at_layer_for_radiation - ozone concentration - kg kg-1 - olyr - real - (:,:) - out - F - MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run - - - volume_mixing_ratio_co2 - CO2 volume mixing ratio - kg kg-1 - gasvmr_co2 - real - (:,:) - out - F - MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run - - - volume_mixing_ratio_n2o - N2O volume mixing ratio - kg kg-1 - gasvmr_n2o - real - (:,:) - out - F - MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run - - - volume_mixing_ratio_ch4 - CH4 volume mixing ratio - kg kg-1 - gasvmr_ch4 - real - (:,:) - out - F - MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run - - - volume_mixing_ratio_o2 - O2 volume mixing ratio - kg kg-1 - gasvmr_o2 - real - (:,:) - out - F - MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run - - - volume_mixing_ratio_co - CO volume mixing ratio - kg kg-1 - gasvmr_co - real - (:,:) - out - F - MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run - - - volume_mixing_ratio_cfc11 - CFC11 volume mixing ratio - kg kg-1 - gasvmr_cfc11 - real - (:,:) - out - F - MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run - - - volume_mixing_ratio_cfc12 - CFC12 volume mixing ratio - kg kg-1 - gasvmr_cfc12 - real - (:,:) - out - F - MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run - - - volume_mixing_ratio_cfc22 - CFC22 volume mixing ratio - kg kg-1 - gasvmr_cfc22 - real - (:,:) - out - F - MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run - - - volume_mixing_ratio_ccl4 - CCL4 volume mixing ratio - kg kg-1 - gasvmr_ccl4 - real - (:,:) - out - F - MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run - - - volume_mixing_ratio_cfc113 - CFC113 volume mixing ratio - kg kg-1 - gasvmr_cfc113 - real - (:,:) - out - F - MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run - - - aerosol_optical_depth_for_shortwave_bands_01-16 - aerosol optical depth for shortwave bands 01-16 - none - faersw1 - real - (:,:,:) - out - F - MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run - - - aerosol_single_scattering_albedo_for_shortwave_bands_01-16 - aerosol single scattering albedo for shortwave bands 01-16 - frac - faersw2 - real - (:,:,:) - out - F - MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run - - - aerosol_asymmetry_parameter_for_shortwave_bands_01-16 - aerosol asymmetry parameter for shortwave bands 01-16 - none - faersw3 - real - (:,:,:) - out - F - MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run - - - aerosol_optical_depth_for_longwave_bands_01-16 - aerosol optical depth for longwave bands 01-16 - none - faerlw1 - real - (:,:,:) - out - F - MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run - - - aerosol_single_scattering_albedo_for_longwave_bands_01-16 - aerosol single scattering albedo for longwave bands 01-16 - frac - faerlw2 - real - (:,:,:) - out - F - MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run - - - aerosol_asymmetry_parameter_for_longwave_bands_01-16 - aerosol asymmetry parameter for longwave bands 01-16 - none - faerlw3 - real - (:,:,:) - out - F - MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run - - - atmosphere_optical_thickness_due_to_ambient_aerosol_particles - vertical integrated optical depth for various aerosol species - none - aerodp - real - (:,:) - out - F - MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run - - - total_cloud_fraction - layer total cloud fraction - frac - clouds1 - real - (:,:) - out - F - MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run - - - cloud_liquid_water_path - layer cloud liquid water path - g m-2 - clouds2 - real - (:,:) - out - F - MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run - - - mean_effective_radius_for_liquid_cloud - mean effective radius for liquid cloud - micron - clouds3 - real - (:,:) - out - F - MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run - - - cloud_ice_water_path - layer cloud ice water path - g m-2 - clouds4 - real - (:,:) - out - F - MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run - - - mean_effective_radius_for_ice_cloud - mean effective radius for ice cloud - micron - clouds5 - real - (:,:) - out - F - MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run - - - cloud_rain_water_path - cloud rain water path - g m-2 - clouds6 - real - (:,:) - out - F - MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run - - - mean_effective_radius_for_rain_drop - mean effective radius for rain drop - micron - clouds7 - real - (:,:) - out - F - MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run - - - cloud_snow_water_path - cloud snow water path - g m-2 - clouds8 - real - (:,:) - out - F - MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run - - - mean_effective_radius_for_snow_flake - mean effective radius for snow flake - micron - clouds9 - real - (:,:) - out - F - MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run - - - cloud_area_fraction_for_radiation - fraction of clouds for low, middle,high, total and BL - frac - cldsa - real - (:,:) - out - F - MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run - - - model_layer_number_at_cloud_top - vertical indices for low, middle and high cloud tops - index - mtopa - integer - (:,:) - out - F - MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run - - - model_layer_number_at_cloud_base - vertical indices for low, middle and high cloud bases - index - mbota - integer - (:,:) - out - F - MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run - - - cloud_decorrelation_length - cloud decorrelation length - km - de_lgth - real - (:) - out - F - MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run - - - surface_albedo_perturbation - surface albedo perturbation - frac - alb1d - real - (:) - out - F - MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_GFS_rrtmg_pre SCHEME_GFS_rrtmg_pre SUBROUTINE_GFS_rrtmg_pre_run - - - diff --git a/physics/GFS_rrtmg_setup.xml b/physics/GFS_rrtmg_setup.xml deleted file mode 100644 index 9db0b1aba..000000000 --- a/physics/GFS_rrtmg_setup.xml +++ /dev/null @@ -1,504 +0,0 @@ - - - - - date_and_time_at_model_initialization - initialization date and time - none - idate - integer - (:) - in - F - MODULE_GFS_rrtmg_setup SCHEME_GFS_rrtmg_setup SUBROUTINE_GFS_rrtmg_setup_run - - - forecast_date_and_time - current forecast date and time - none - jdate - integer - (:) - in - F - MODULE_GFS_rrtmg_setup SCHEME_GFS_rrtmg_setup SUBROUTINE_GFS_rrtmg_setup_run - - - frequency_for_shortwave_radiation - frequency for shortwave radiation - s - deltsw - real - - in - F - MODULE_GFS_rrtmg_setup SCHEME_GFS_rrtmg_setup SUBROUTINE_GFS_rrtmg_setup_run - - - time_step_for_dynamics - dynamics timestep - s - deltim - real - - in - F - MODULE_GFS_rrtmg_setup SCHEME_GFS_rrtmg_setup SUBROUTINE_GFS_rrtmg_setup_run - - - flag_to_calc_sw - logical flags for sw radiation calls - flag - lsswr - logical - - in - F - MODULE_GFS_rrtmg_setup SCHEME_GFS_rrtmg_setup SUBROUTINE_GFS_rrtmg_setup_run - - - mpi_rank - current MPI-rank - index - me - integer - - in - F - MODULE_GFS_rrtmg_setup SCHEME_GFS_rrtmg_setup SUBROUTINE_GFS_rrtmg_setup_run - - - equation_of_time - equation of time (radian) - radians - slag - real - - out - F - MODULE_GFS_rrtmg_setup SCHEME_GFS_rrtmg_setup SUBROUTINE_GFS_rrtmg_setup_run - - - sine_of_solar_declination_angle - sin of the solar declination angle - none - sdec - real - - out - F - MODULE_GFS_rrtmg_setup SCHEME_GFS_rrtmg_setup SUBROUTINE_GFS_rrtmg_setup_run - - - cosine_of_solar_declination_angle - cos of the solar declination angle - none - cdec - real - - out - F - MODULE_GFS_rrtmg_setup SCHEME_GFS_rrtmg_setup SUBROUTINE_GFS_rrtmg_setup_run - - - solar_constant - solar constant (sun-earth distant adjusted) - W m-2 - solcon - real - - out - F - MODULE_GFS_rrtmg_setup SCHEME_GFS_rrtmg_setup SUBROUTINE_GFS_rrtmg_setup_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_GFS_rrtmg_setup SCHEME_GFS_rrtmg_setup SUBROUTINE_GFS_rrtmg_setup_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_GFS_rrtmg_setup SCHEME_GFS_rrtmg_setup SUBROUTINE_GFS_rrtmg_setup_run - - - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_GFS_rrtmg_setup SCHEME_GFS_rrtmg_setup SUBROUTINE_GFS_rrtmg_setup_finalize - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_GFS_rrtmg_setup SCHEME_GFS_rrtmg_setup SUBROUTINE_GFS_rrtmg_setup_finalize - - - - - vertical_sigma_coordinate_for_radiation_initialization - vertical sigma coordinate for radiation initialization - none - si - real - (:) - in - F - MODULE_GFS_rrtmg_setup SCHEME_GFS_rrtmg_setup SUBROUTINE_GFS_rrtmg_setup_init - - - number_of_vertical_layers_for_radiation_calculations - number of vertical levels for radiation calculations - count - levr - integer - - in - F - MODULE_GFS_rrtmg_setup SCHEME_GFS_rrtmg_setup SUBROUTINE_GFS_rrtmg_setup_init - - - flag_for_initial_time-date_control - flag for initial conditions and forcing - flag - ictm - integer - - in - F - MODULE_GFS_rrtmg_setup SCHEME_GFS_rrtmg_setup SUBROUTINE_GFS_rrtmg_setup_init - - - flag_for_solar_constant - use prescribed solar constant - flag - isol - integer - - in - F - MODULE_GFS_rrtmg_setup SCHEME_GFS_rrtmg_setup SUBROUTINE_GFS_rrtmg_setup_init - - - flag_for_using_prescribed_global_mean_co2_value - prescribed global mean value (old opernl) - flag - ico2 - integer - - in - F - MODULE_GFS_rrtmg_setup SCHEME_GFS_rrtmg_setup SUBROUTINE_GFS_rrtmg_setup_init - - - flag_for_default_aerosol_effect_in_shortwave_radiation - default aerosol effect in sw only - flag - iaer - integer - - in - F - MODULE_GFS_rrtmg_setup SCHEME_GFS_rrtmg_setup SUBROUTINE_GFS_rrtmg_setup_init - - - flag_for_using_climatology_albedo - flag for using climatology alb, based on sfc type - flag - ialb - integer - - in - F - MODULE_GFS_rrtmg_setup SCHEME_GFS_rrtmg_setup SUBROUTINE_GFS_rrtmg_setup_init - - - flag_for_surface_emissivity_control - surface emissivity control flag, use fixed value of 1 - flag - iems - integer - - in - F - MODULE_GFS_rrtmg_setup SCHEME_GFS_rrtmg_setup SUBROUTINE_GFS_rrtmg_setup_init - - - index_for_liquid_cloud_condensate - tracer index for cloud condensate (or liquid water) - index - ntcw - integer - - in - F - MODULE_GFS_rrtmg_setup SCHEME_GFS_rrtmg_setup SUBROUTINE_GFS_rrtmg_setup_init - - - array_dimension_of_2d_arrays_for_microphysics - number of 2D arrays needed for microphysics - count - num_p2d - integer - - in - F - MODULE_GFS_rrtmg_setup SCHEME_GFS_rrtmg_setup SUBROUTINE_GFS_rrtmg_setup_init - - - array_dimension_of_3d_arrays_for_microphysics - number of 3D arrays needed for microphysics - count - num_p3d - integer - - in - F - MODULE_GFS_rrtmg_setup SCHEME_GFS_rrtmg_setup SUBROUTINE_GFS_rrtmg_setup_init - - - number_of_3d_arrays_associated_with_pdf-based_clouds - number of 3d arrays associated with pdf based clouds/mp - count - npdf3d - integer - - in - F - MODULE_GFS_rrtmg_setup SCHEME_GFS_rrtmg_setup SUBROUTINE_GFS_rrtmg_setup_init - - - index_for_ozone - tracer index for ozone mixing ratio - index - ntoz - integer - - in - F - MODULE_GFS_rrtmg_setup SCHEME_GFS_rrtmg_setup SUBROUTINE_GFS_rrtmg_setup_init - - - flag_for_max-random_overlap_clouds_for_shortwave_radiation - sw: max-random overlap clouds - flag - iovr_sw - integer - - in - F - MODULE_GFS_rrtmg_setup SCHEME_GFS_rrtmg_setup SUBROUTINE_GFS_rrtmg_setup_init - - - flag_for_max-random_overlap_clouds_for_longwave_radiation - lw: max-random overlap clouds - flag - iovr_lw - integer - - in - F - MODULE_GFS_rrtmg_setup SCHEME_GFS_rrtmg_setup SUBROUTINE_GFS_rrtmg_setup_init - - - flag_for_sw_clouds_without_sub-grid_approximation - flag for sw clouds without sub-grid approximation - flag - isubc_sw - integer - - in - F - MODULE_GFS_rrtmg_setup SCHEME_GFS_rrtmg_setup SUBROUTINE_GFS_rrtmg_setup_init - - - flag_for_lw_clouds_without_sub-grid_approximation - flag for lw clouds without sub-grid approximation - flag - isubc_lw - integer - - in - F - MODULE_GFS_rrtmg_setup SCHEME_GFS_rrtmg_setup SUBROUTINE_GFS_rrtmg_setup_init - - - flag_for_optical_property_for_liquid_clouds_for_shortwave_radiation - sw optical property for liquid clouds - flag - icliq_sw - integer - - in - F - MODULE_GFS_rrtmg_setup SCHEME_GFS_rrtmg_setup SUBROUTINE_GFS_rrtmg_setup_init - - - flag_for_CRICK-proof_cloud_water - flag for CRICK-Proof cloud water - flag - crick_proof - logical - - in - F - MODULE_GFS_rrtmg_setup SCHEME_GFS_rrtmg_setup SUBROUTINE_GFS_rrtmg_setup_init - - - flag_for_cloud_condensate_normalized_by_cloud_cover - flag for cloud condensate normalized by cloud cover - flag - ccnorm - logical - - in - F - MODULE_GFS_rrtmg_setup SCHEME_GFS_rrtmg_setup SUBROUTINE_GFS_rrtmg_setup_init - - - flag_for_microphysics_scheme - choice of microphysics scheme - flag - imp_physics - integer - - in - F - MODULE_GFS_rrtmg_setup SCHEME_GFS_rrtmg_setup SUBROUTINE_GFS_rrtmg_setup_init - - - flag_for_precipitation_effect_on_radiation - radiation precip flag for Ferrier/Moorthi - flag - norad_precip - logical - - in - F - MODULE_GFS_rrtmg_setup SCHEME_GFS_rrtmg_setup SUBROUTINE_GFS_rrtmg_setup_init - - - date_and_time_at_model_initialization_reordered - initialization date and time - none - idate - integer - (:) - in - F - MODULE_GFS_rrtmg_setup SCHEME_GFS_rrtmg_setup SUBROUTINE_GFS_rrtmg_setup_init - - - flag_for_vertical_index_direction_control - flag for vertical index direction control - flag - iflip - integer - - in - F - MODULE_GFS_rrtmg_setup SCHEME_GFS_rrtmg_setup SUBROUTINE_GFS_rrtmg_setup_init - - - horizontal_loop_extent - horizontal loop extent - count - im - integer - - in - F - MODULE_GFS_rrtmg_setup SCHEME_GFS_rrtmg_setup SUBROUTINE_GFS_rrtmg_setup_init - - - aerosol_optical_properties_for_longwave_bands_01-16 - optical properties for longwave bands 01-16 - various - faerlw - real - (:,:,:,:) - in - F - MODULE_GFS_rrtmg_setup SCHEME_GFS_rrtmg_setup SUBROUTINE_GFS_rrtmg_setup_init - - - aerosol_optical_properties_for_shortwave_bands_01-16 - aerosol optical properties for shortwave bands 01-16 - various - faersw - real - (:,:,:,:) - in - F - MODULE_GFS_rrtmg_setup SCHEME_GFS_rrtmg_setup SUBROUTINE_GFS_rrtmg_setup_init - - - atmosphere_optical_thickness_due_to_ambient_aerosol_particles - vertical integrated optical depth for various aerosol species - none - aerodp - real - (:,:) - in - F - MODULE_GFS_rrtmg_setup SCHEME_GFS_rrtmg_setup SUBROUTINE_GFS_rrtmg_setup_init - - - mpi_rank - current MPI-rank - index - me - integer - - in - F - MODULE_GFS_rrtmg_setup SCHEME_GFS_rrtmg_setup SUBROUTINE_GFS_rrtmg_setup_init - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_GFS_rrtmg_setup SCHEME_GFS_rrtmg_setup SUBROUTINE_GFS_rrtmg_setup_init - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_GFS_rrtmg_setup SCHEME_GFS_rrtmg_setup SUBROUTINE_GFS_rrtmg_setup_init - - - diff --git a/physics/GFS_rrtmgp_gas_optics.F90 b/physics/GFS_rrtmgp_gas_optics.F90 index d13d77a37..956130db3 100644 --- a/physics/GFS_rrtmgp_gas_optics.F90 +++ b/physics/GFS_rrtmgp_gas_optics.F90 @@ -54,7 +54,7 @@ subroutine GFS_rrtmgp_gas_optics_init(Model, Radtend, errmsg, errflg) gasIndices(Model%ngases,2)=len(trim(Model%active_gases)) ! Now extract the gas names do ij=1,Model%ngases - Radtend%active_gases(ij) = Model%active_gases(gasIndices(ij,1):gasIndices(ij,2)) + Radtend%active_gases(ij,1) = Model%active_gases(gasIndices(ij,1):gasIndices(ij,2)) enddo endif end subroutine GFS_rrtmgp_gas_optics_init diff --git a/physics/GFS_rrtmgp_lw_post.F90 b/physics/GFS_rrtmgp_lw_post.F90 index a9415a42f..2a5743159 100644 --- a/physics/GFS_rrtmgp_lw_post.F90 +++ b/physics/GFS_rrtmgp_lw_post.F90 @@ -2,12 +2,10 @@ !!This file contains module GFS_rrtmgp_lw_post use machine, only: kind_phys - use GFS_typedefs, only: GFS_statein_type, & - GFS_coupling_type, & + use GFS_typedefs, only: GFS_coupling_type, & GFS_control_type, & GFS_grid_type, & - GFS_radtend_type, & - GFS_diag_type + GFS_radtend_type use module_radiation_aerosols, only: NSPC1 use module_radlw_parameters, only: topflw_type, sfcflw_type, proflw_type ! RRTMGP DDT's @@ -31,9 +29,7 @@ end subroutine GFS_rrtmgp_lw_post_init !! |-------------------|------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------|----------|------|----------------------|-----------|--------|----------| !! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | !! | Grid | GFS_grid_type_instance | Fortran DDT containing FV3-GFS grid and interpolation related data | DDT | 0 | GFS_grid_type | | in | F | -!! | Diag | GFS_diag_type_instance | Fortran DDT containing FV3-GFS diagnotics data | DDT | 0 | GFS_diag_type | | inout | F | !! | Radtend | GFS_radtend_type_instance | Fortran DDT containing FV3-GFS radiation tendencies | DDT | 0 | GFS_radtend_type | | inout | F | -!! | Statein | GFS_statein_type_instance | Fortran DDT containing FV3-GFS prognostic state data in from dycore | DDT | 0 | GFS_statein_type | | in | F | !! | Coupling | GFS_coupling_type_instance | Fortran DDT containing FV3-GFS fields to/from coupling with other components | DDT | 0 | GFS_coupling_type | | inout | F | !! | im | horizontal_loop_extent | horizontal loop extent | count | 0 | integer | | in | F | !! | tsfa | surface_air_temperature_for_radiation | lowest model layer air temperature for radiation | K | 1 | real | kind_phys | in | F | @@ -51,7 +47,7 @@ end subroutine GFS_rrtmgp_lw_post_init !! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | !! #endif - subroutine GFS_rrtmgp_lw_post_run (Model, Grid, Diag, Radtend, Statein, & + subroutine GFS_rrtmgp_lw_post_run (Model, Grid, Radtend, & Coupling, im, p_lev, & tsfa, fluxlwUP_allsky, fluxlwDOWN_allsky, fluxlwUP_clrsky, fluxlwDOWN_clrsky, & hlwc, topflx_lw, sfcflx_lw, flxprf_lw, hlw0, errmsg, errflg) @@ -61,14 +57,10 @@ subroutine GFS_rrtmgp_lw_post_run (Model, Grid, Diag, Radtend, Statein, & Model ! Fortran DDT containing FV3-GFS model control parameters type(GFS_grid_type), intent(in) :: & Grid ! Fortran DDT containing FV3-GFS grid and interpolation related data - type(GFS_statein_type), intent(in) :: & - Statein ! Fortran DDT containing FV3-GFS prognostic state data in from dycore - type(GFS_coupling_type), intent(inout) :: & + type(GFS_coupling_type), intent(inout) :: & Coupling ! Fortran DDT containing FV3-GFS fields to/from coupling with other components type(GFS_radtend_type), intent(inout) :: & Radtend ! Fortran DDT containing FV3-GFS radiation tendencies - type(GFS_diag_type), intent(inout) :: & - Diag ! Fortran DDT containing FV3-GFS diagnotics data integer, intent(in) :: & im ! Horizontal loop extent real(kind_phys), dimension(size(Grid%xlon,1)), intent(in) :: & @@ -110,7 +102,7 @@ subroutine GFS_rrtmgp_lw_post_run (Model, Grid, Diag, Radtend, Statein, & ! dnfx0 - clear sky dnward flux (W/m2) ! Local variables - integer :: i, j, k, iBand, iSFC, iTOA + integer :: k, iSFC, iTOA logical :: l_clrskylw_hr, l_fluxeslw2d, top_at_1 ! Initialize CCPP error handling variables diff --git a/physics/GFS_rrtmgp_lw_pre.xml b/physics/GFS_rrtmgp_lw_pre.xml deleted file mode 100644 index 6007cd7d4..000000000 --- a/physics/GFS_rrtmgp_lw_pre.xml +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - - GFS_control_type_instance - Fortran DDT containing FV3-GFS model control parameters - DDT - Model - GFS_control_type - - in - F - MODULE_GFS_rrtmgp_lw_pre SCHEME_GFS_rrtmgp_lw_pre SUBROUTINE_GFS_rrtmgp_lw_pre_run - - - GFS_grid_type_instance - Fortran DDT containing FV3-GFS grid and interpolation related data - DDT - Grid - GFS_grid_type - - in - F - MODULE_GFS_rrtmgp_lw_pre SCHEME_GFS_rrtmgp_lw_pre SUBROUTINE_GFS_rrtmgp_lw_pre_run - - - GFS_sfcprop_type_instance - Fortran DDT containing FV3-GFS surface fields - DDT - Sfcprop - GFS_sfcprop_type - - in - F - MODULE_GFS_rrtmgp_lw_pre SCHEME_GFS_rrtmgp_lw_pre SUBROUTINE_GFS_rrtmgp_lw_pre_run - - - GFS_radtend_type_instance - Fortran DDT containing FV3-GFS radiation tendencies - DDT - Radtend - GFS_radtend_type - - inout - F - MODULE_GFS_rrtmgp_lw_pre SCHEME_GFS_rrtmgp_lw_pre SUBROUTINE_GFS_rrtmgp_lw_pre_run - - - horizontal_loop_extent - horizontal loop extent - count - im - integer - - in - F - MODULE_GFS_rrtmgp_lw_pre SCHEME_GFS_rrtmgp_lw_pre SUBROUTINE_GFS_rrtmgp_lw_pre_run - - - surface_ground_temperature_for_radiation - surface ground temperature for radiation - K - tsfg - real - (:) - in - F - MODULE_GFS_rrtmgp_lw_pre SCHEME_GFS_rrtmgp_lw_pre SUBROUTINE_GFS_rrtmgp_lw_pre_run - - - surface_air_temperature_for_radiation - lowest model layer air temperature for radiation - K - tsfa - real - (:) - in - F - MODULE_GFS_rrtmgp_lw_pre SCHEME_GFS_rrtmgp_lw_pre SUBROUTINE_GFS_rrtmgp_lw_pre_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_GFS_rrtmgp_lw_pre SCHEME_GFS_rrtmgp_lw_pre SUBROUTINE_GFS_rrtmgp_lw_pre_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_GFS_rrtmgp_lw_pre SCHEME_GFS_rrtmgp_lw_pre SUBROUTINE_GFS_rrtmgp_lw_pre_run - - - diff --git a/physics/GFS_rrtmgp_post.F90 b/physics/GFS_rrtmgp_post.F90 index ce18c8880..35c3439ef 100644 --- a/physics/GFS_rrtmgp_post.F90 +++ b/physics/GFS_rrtmgp_post.F90 @@ -97,7 +97,7 @@ subroutine GFS_rrtmgp_post_run (Model, Grid, Diag, Radtend, Statein, & errflg ! Local variables - integer :: i, j, k, k1, itop, ibtc + integer :: i, j, k, itop, ibtc real(kind_phys) :: tem0d, tem1, tem2 ! Initialize CCPP error handling variables diff --git a/physics/GFS_rrtmgp_post.xml b/physics/GFS_rrtmgp_post.xml deleted file mode 100644 index 88bf0af99..000000000 --- a/physics/GFS_rrtmgp_post.xml +++ /dev/null @@ -1,260 +0,0 @@ - - - - - - GFS_control_type_instance - Fortran DDT containing FV3-GFS model control parameters - DDT - Model - GFS_control_type - - in - F - MODULE_GFS_rrtmgp_post SCHEME_GFS_rrtmgp_post SUBROUTINE_GFS_rrtmgp_post_run - - - GFS_grid_type_instance - Fortran DDT containing FV3-GFS grid and interpolation related data - DDT - Grid - GFS_grid_type - - in - F - MODULE_GFS_rrtmgp_post SCHEME_GFS_rrtmgp_post SUBROUTINE_GFS_rrtmgp_post_run - - - GFS_diag_type_instance - Fortran DDT containing FV3-GFS diagnotics data - DDT - Diag - GFS_diag_type - - inout - F - MODULE_GFS_rrtmgp_post SCHEME_GFS_rrtmgp_post SUBROUTINE_GFS_rrtmgp_post_run - - - GFS_radtend_type_instance - Fortran DDT containing FV3-GFS radiation tendencies - DDT - Radtend - GFS_radtend_type - - in - F - MODULE_GFS_rrtmgp_post SCHEME_GFS_rrtmgp_post SUBROUTINE_GFS_rrtmgp_post_run - - - GFS_statein_type_instance - Fortran DDT containing FV3-GFS prognostic state data in from dycore - DDT - Statein - GFS_statein_type - - in - F - MODULE_GFS_rrtmgp_post SCHEME_GFS_rrtmgp_post SUBROUTINE_GFS_rrtmgp_post_run - - - GFS_coupling_type_instance - Fortran DDT containing FV3-GFS fields to/from coupling with other components - DDT - Coupling - GFS_coupling_type - - inout - F - MODULE_GFS_rrtmgp_post SCHEME_GFS_rrtmgp_post SUBROUTINE_GFS_rrtmgp_post_run - - - components_of_surface_downward_shortwave_fluxes - derived type for special components of surface downward shortwave fluxes - W m-2 - scmpsw - cmpfsw_type - (:) - in - F - MODULE_GFS_rrtmgp_post SCHEME_GFS_rrtmgp_post SUBROUTINE_GFS_rrtmgp_post_run - - - horizontal_loop_extent - horizontal loop extent - count - im - integer - - in - F - MODULE_GFS_rrtmgp_post SCHEME_GFS_rrtmgp_post SUBROUTINE_GFS_rrtmgp_post_run - - - vertical_layer_dimension_for_radiation - number of vertical layers for radiation calculation - count - lm - integer - - in - F - MODULE_GFS_rrtmgp_post SCHEME_GFS_rrtmgp_post SUBROUTINE_GFS_rrtmgp_post_run - - - extra_top_layer - extra top layers - none - ltp - integer - - in - F - MODULE_GFS_rrtmgp_post SCHEME_GFS_rrtmgp_post SUBROUTINE_GFS_rrtmgp_post_run - - - vertical_index_difference_between_layer_and_upper_bound - vertical index difference between layer and upper bound - index - kt - integer - - in - F - MODULE_GFS_rrtmgp_post SCHEME_GFS_rrtmgp_post SUBROUTINE_GFS_rrtmgp_post_run - - - vertical_index_difference_between_layer_and_lower_bound - vertical index difference between layer and lower bound - index - kb - integer - - in - F - MODULE_GFS_rrtmgp_post SCHEME_GFS_rrtmgp_post SUBROUTINE_GFS_rrtmgp_post_run - - - vertical_index_difference_between_inout_and_local - vertical index difference between in/out and local - index - kd - integer - - in - F - MODULE_GFS_rrtmgp_post SCHEME_GFS_rrtmgp_post SUBROUTINE_GFS_rrtmgp_post_run - - - time_step_for_radiation - radiation time step - s - raddt - real - - in - F - MODULE_GFS_rrtmgp_post SCHEME_GFS_rrtmgp_post SUBROUTINE_GFS_rrtmgp_post_run - - - atmosphere_optical_thickness_due_to_ambient_aerosol_particles - vertical integrated optical depth for various aerosol species - none - aerodp - real - (:,:) - in - F - MODULE_GFS_rrtmgp_post SCHEME_GFS_rrtmgp_post SUBROUTINE_GFS_rrtmgp_post_run - - - cloud_area_fraction_for_radiation - fraction of clouds for low, middle, high, total and BL - frac - cldsa - real - (:,:) - in - F - MODULE_GFS_rrtmgp_post SCHEME_GFS_rrtmgp_post SUBROUTINE_GFS_rrtmgp_post_run - - - model_layer_number_at_cloud_top - vertical indices for low, middle and high cloud tops - index - mtopa - integer - (:,:) - in - F - MODULE_GFS_rrtmgp_post SCHEME_GFS_rrtmgp_post SUBROUTINE_GFS_rrtmgp_post_run - - - model_layer_number_at_cloud_base - vertical indices for low, middle and high cloud bases - index - mbota - integer - (:,:) - in - F - MODULE_GFS_rrtmgp_post SCHEME_GFS_rrtmgp_post SUBROUTINE_GFS_rrtmgp_post_run - - - total_cloud_fraction - layer total cloud fraction - frac - clouds1 - real - (:,:) - in - F - MODULE_GFS_rrtmgp_post SCHEME_GFS_rrtmgp_post SUBROUTINE_GFS_rrtmgp_post_run - - - cloud_optical_depth_layers_at_10mu_band - approx 10mu band layer cloud optical depth - none - cldtaulw - real - (:,:) - in - F - MODULE_GFS_rrtmgp_post SCHEME_GFS_rrtmgp_post SUBROUTINE_GFS_rrtmgp_post_run - - - cloud_optical_depth_layers_at_0.55mu_band - approx .55mu band layer cloud optical depth - none - cldtausw - real - (:,:) - in - F - MODULE_GFS_rrtmgp_post SCHEME_GFS_rrtmgp_post SUBROUTINE_GFS_rrtmgp_post_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_GFS_rrtmgp_post SCHEME_GFS_rrtmgp_post SUBROUTINE_GFS_rrtmgp_post_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_GFS_rrtmgp_post SCHEME_GFS_rrtmgp_post SUBROUTINE_GFS_rrtmgp_post_run - - - - diff --git a/physics/GFS_rrtmgp_pre.F90 b/physics/GFS_rrtmgp_pre.F90 index 5dcd9a199..37783e70e 100644 --- a/physics/GFS_rrtmgp_pre.F90 +++ b/physics/GFS_rrtmgp_pre.F90 @@ -103,11 +103,6 @@ end subroutine GFS_rrtmgp_pre_init !! | faersw | aerosol_optical_properties_for_shortwave_bands_01-16 | aerosol optical properties for shortwave bands 01-16 | various | 4 | real | kind_phys | out | F | !! | alb1d | surface_albedo_perturbation | surface albedo perturbation | frac | 1 | real | kind_phys | out | F | !! | gas_concentrations | Gas_concentrations_for_RRTMGP_suite | DDT containing gas concentrations for RRTMGP radiation scheme | DDT | 0 | ty_gas_concs | | out | F | -!! | sfc_emiss_byband | surface_longwave_emissivity_in_each_band | surface lw emissivity in fraction in each LW band | frac | 2 | real | kind_phys | out | F | -!! | sfc_alb_nir_dir | surface_shortwave_albedo_near_infrared_direct_in_each_band | surface sw near-infrared direct albedo in each SW band | frac | 2 | real | kind_phys | out | F | -!! | sfc_alb_nir_dif | surface_shortwave_albedo_near_infrared_diffuse_in_each_band | surface sw near-infrared diffuse albedo in each SW band | frac | 2 | real | kind_phys | out | F | -!! | sfc_alb_uvvis_dir | surface_shortwave_albedo_uv_visible_direct_in_each_band | surface sw uv-visible direct albedo in each SW band | frac | 2 | real | kind_phys | out | F | -!! | sfc_alb_uvvis_dif | surface_shortwave_albedo_uv_visible_diffuse_in_each_band | surface sw uv-visible diffuse albedo in each SW band | frac | 2 | real | kind_phys | out | F | !! | nday | daytime_points_dimension | daytime points dimension | count | 0 | integer | | out | F | !! | idxday | daytime_points | daytime points | index | 1 | integer | | out | F | !! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | @@ -119,8 +114,7 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, ncol, lw_gas_props, sw_gas_props, & ! IN raddt, p_lay, t_lay, p_lev, t_lev, tsfg, tsfa, alb1d, cld_frac, cld_lwp, & ! OUT cld_reliq, cld_iwp, cld_reice, cld_swp, cld_resnow, cld_rwp, cld_rerain, faerlw, & ! OUT - faersw, sfc_emiss_byband, nday, idxday, gas_concentrations, sfc_alb_nir_dir, & ! OUT - sfc_alb_nir_dif, sfc_alb_uvvis_dir, sfc_alb_uvvis_dif, errmsg, errflg) ! OUT + faersw, nday, idxday, gas_concentrations, errmsg, errflg) ! OUT ! Inputs type(GFS_control_type), intent(in) :: & @@ -155,11 +149,6 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, real(kind_phys), dimension(ncol), intent(out) :: & tsfg, & ! tsfa ! - real(kind_phys),dimension(sw_gas_props%get_nband(),NCOL),intent(out) :: & - sfc_alb_nir_dir, & ! Shortwave surface albedo (nIR-direct) - sfc_alb_nir_dif, & ! Shortwave surface albedo (nIR-diffuse) - sfc_alb_uvvis_dir, & ! Shortwave surface albedo (uvvis-direct) - sfc_alb_uvvis_dif ! Shortwave surface albedo (uvvis-diffuse) integer, intent(out) :: & nday ! Number of daylit points integer, dimension(ncol), intent(out) :: & @@ -172,8 +161,6 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, errmsg ! Error message integer, intent(out) :: & errflg ! Error flag - real(kind_phys),dimension(sw_gas_props%get_nband(),NCOL),intent(out) :: & - sfc_emiss_byband ! Longwave surface emissivity in each band real(kind_phys), dimension(ncol,Model%levr+LTP),intent(out) :: & cld_frac, & ! Total cloud fraction cld_lwp, & ! Cloud liquid water path @@ -190,13 +177,9 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, faerlw ! Aerosol radiative properties in each LW band. ! Local variables - integer :: me, nfxr, ntrac, ntcw, ntiw, ncld, ntrw, ntsw, ntgl,i, j, k, k1, k2, lsk, & - LP1, lla, llb, lya, lyb, iCol, iBand, iSFC, iTOA, iLay - integer,dimension(NCOL) :: ipseed_lw,ipseed_sw + integer :: i, j, k, iCol, iBand, iSFC, iTOA, iLay integer,dimension(ncol,3) :: mbota,mtopa logical :: top_at_1 - logical,dimension(NCOL,Model%levs) :: & - liqmask,icemask real(kind_phys),dimension(NCOL,Model%levs) :: vmr_o3, vmr_h2o real(kind_phys) :: es, qs real(kind_phys), dimension(ncol) :: de_lgth @@ -204,7 +187,7 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, real(kind_phys), dimension(ncol, NSPC1) :: aerodp real(kind_phys), dimension(ncol, NF_ALBD) :: sfcalb real(kind_phys), dimension(ncol, Model%levs) :: relhum, qs_lay, q_lay, deltaZ, tv_lay,& - deltaP, o3_lay, delta_q, cnv_w, cnv_c, effr_l, effr_i, effr_r, effr_s, cldcov + deltaP, o3_lay real(kind_phys), dimension(ncol, Model%levs, 2:Model%ntrac) :: tracer real(kind_phys), dimension(ncol, Model%levs, NF_VGAS) :: gas_vmr real(kind_phys), dimension(ncol, Model%levs, NF_CLDS) :: clouds @@ -313,6 +296,29 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, Radtend%coszen, Radtend%coszdg) endif + ! ####################################################################################### + ! Call module_radiation_aerosols::setaer(),to setup aerosols property profile for both + ! LW and SW radiation. + ! ####################################################################################### + call setaer(p_lev, p_lay, Statein%prslk(1:NCOL,iSFC:iTOA), tv_lay, relhum, & + Sfcprop%slmsk, tracer, Grid%xlon, Grid%xlat, NCOL, Model%levs, Model%levs+1, & + Model%lsswr, Model%lslwr, faersw2, faerlw, aerodp) + + ! Store aerosol optical properties + ! SW. + ! For RRTMGP SW the bands are now ordered from [IR(band) -> nIR -> UV], in RRTMG the + ! band ordering was [nIR -> UV -> IR(band)] + faersw(1:NCOL,1:Model%levs,1,1) = faersw2(1:NCOL,1:Model%levs,sw_gas_props%get_nband(),1) + faersw(1:NCOL,1:Model%levs,1,2) = faersw2(1:NCOL,1:Model%levs,sw_gas_props%get_nband(),2) + faersw(1:NCOL,1:Model%levs,1,3) = faersw2(1:NCOL,1:Model%levs,sw_gas_props%get_nband(),3) + faersw(1:NCOL,1:Model%levs,2:sw_gas_props%get_nband(),1) = faersw2(1:NCOL,1:Model%levs,1:sw_gas_props%get_nband()-1,1) + faersw(1:NCOL,1:Model%levs,2:sw_gas_props%get_nband(),2) = faersw2(1:NCOL,1:Model%levs,1:sw_gas_props%get_nband()-1,2) + faersw(1:NCOL,1:Model%levs,2:sw_gas_props%get_nband(),3) = faersw2(1:NCOL,1:Model%levs,1:sw_gas_props%get_nband()-1,3) + + ! Setup surface ground temperature and ground/air skin temperature if required. + tsfg(1:NCOL) = Sfcprop%tsfc(1:NCOL) + tsfa(1:NCOL) = Sfcprop%tsfc(1:NCOL) + ! ####################################################################################### ! Cloud microphysics ! ####################################################################################### @@ -344,29 +350,6 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, enddo endif endif - - ! ####################################################################################### - ! Call module_radiation_aerosols::setaer(),to setup aerosols property profile for both - ! LW and SW radiation. - ! ####################################################################################### - call setaer(p_lev, p_lay, Statein%prslk(1:NCOL,iSFC:iTOA), tv_lay, relhum, & - Sfcprop%slmsk, tracer, Grid%xlon, Grid%xlat, NCOL, Model%levs, Model%levs+1, & - Model%lsswr, Model%lslwr, faersw2, faerlw, aerodp) - - ! Store aerosol optical properties - ! SW. - ! For RRTMGP SW the bands are now ordered from [IR(band) -> nIR -> UV], in RRTMG the - ! band ordering was [nIR -> UV -> IR(band)] - faersw(1:NCOL,1:Model%levs,1,1) = faersw2(1:NCOL,1:Model%levs,sw_gas_props%get_nband(),1) - faersw(1:NCOL,1:Model%levs,1,2) = faersw2(1:NCOL,1:Model%levs,sw_gas_props%get_nband(),2) - faersw(1:NCOL,1:Model%levs,1,3) = faersw2(1:NCOL,1:Model%levs,sw_gas_props%get_nband(),3) - faersw(1:NCOL,1:Model%levs,2:sw_gas_props%get_nband(),1) = faersw2(1:NCOL,1:Model%levs,1:sw_gas_props%get_nband()-1,1) - faersw(1:NCOL,1:Model%levs,2:sw_gas_props%get_nband(),2) = faersw2(1:NCOL,1:Model%levs,1:sw_gas_props%get_nband()-1,2) - faersw(1:NCOL,1:Model%levs,2:sw_gas_props%get_nband(),3) = faersw2(1:NCOL,1:Model%levs,1:sw_gas_props%get_nband()-1,3) - - ! Setup surface ground temperature and ground/air skin temperature if required. - tsfg(1:NCOL) = Sfcprop%tsfc(1:NCOL) - tsfa(1:NCOL) = Sfcprop%tsfc(1:NCOL) ! ####################################################################################### ! Call module_radiation_surface::setemis(),to setup surface emissivity for LW radiation. @@ -375,7 +358,7 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, call setemis (Grid%xlon, Grid%xlat, Sfcprop%slmsk, Sfcprop%snowd, Sfcprop%sncovr, & Sfcprop%zorl, tsfg, tsfa, Sfcprop%hprim, NCOL, Radtend%semis) do iBand=1,lw_gas_props%get_nband() - sfc_emiss_byband(iBand,1:NCOL) = Radtend%semis(1:NCOL) + Radtend%sfc_emiss_byband(iBand,1:NCOL) = Radtend%semis(1:NCOL) enddo endif @@ -413,10 +396,10 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, ! Spread across all SW bands do iBand=1,sw_gas_props%get_nband() - sfc_alb_nir_dir(iBand,1:NCOL) = sfcalb(1:NCOL,1) - sfc_alb_nir_dif(iBand,1:NCOL) = sfcalb(1:NCOL,2) - sfc_alb_uvvis_dir(iBand,1:NCOL) = sfcalb(1:NCOL,3) - sfc_alb_uvvis_dif(iBand,1:NCOL) = sfcalb(1:NCOL,4) + Radtend%sfc_alb_nir_dir(iBand,1:NCOL) = sfcalb(1:NCOL,1) + Radtend%sfc_alb_nir_dif(iBand,1:NCOL) = sfcalb(1:NCOL,2) + Radtend%sfc_alb_uvvis_dir(iBand,1:NCOL) = sfcalb(1:NCOL,3) + Radtend%sfc_alb_uvvis_dif(iBand,1:NCOL) = sfcalb(1:NCOL,4) enddo end subroutine GFS_rrtmgp_pre_run @@ -466,10 +449,10 @@ subroutine cloud_microphysics(Model, Tbd, Grid, Sfcprop, ncol, tracer, p_lay, t_ ! Local variables real(kind_phys), dimension(ncol, Model%levs, Model%ncnd) :: cld_condensate integer :: i,k - real(kind_phys), dimension(ncol, Model%levs) :: delta_q, cnv_w, cnv_c, effr_l, effr_i, effr_r, effr_s, cldcov - real(kind_phys) :: es, qs, clwmin, clwm, clwt, onemrh, value, tem1, tem2 + real(kind_phys) :: clwmin, clwm, clwt, onemrh, value, tem1, tem2 real(kind_phys), parameter :: xrc3 = 100. - + real(kind_phys), dimension(ncol, Model%levs) :: delta_q, cnv_w, cnv_c, effr_l, effr_i, effr_r, effr_s, cldcov + ! ####################################################################################### ! Obtain cloud information for radiation calculations ! (clouds,cldsa,mtopa,mbota) @@ -554,7 +537,7 @@ subroutine cloud_microphysics(Model, Tbd, Grid, Sfcprop, ncol, tracer, p_lay, t_ else do k=1,model%levs do i=1,ncol - cldcov(i,k1) = Tbd%phy_f3d(i,k,Model%indcld) + cldcov(i,k) = Tbd%phy_f3d(i,k,Model%indcld) if (tracer(i,k,model%ntcw) .gt. 0 .or. tracer(i,k,model%ntiw) .gt. 0) then cldcov(i,k) = 0.1 else @@ -564,7 +547,7 @@ subroutine cloud_microphysics(Model, Tbd, Grid, Sfcprop, ncol, tracer, p_lay, t_ enddo endif elseif (Model%imp_physics == Model%imp_physics_gfdl) then ! GFDL MP - cldcov(1:NCOL,1:Model%levs) = tracer(1:NCOL,1:Model%levs,Model%ntclamt) + ! cldcov(1:NCOL,1:Model%levs) = tracer(1:NCOL,1:Model%levs,Model%ntclamt) else ! neither of the other two cases cldcov = 0.0 endif @@ -703,7 +686,7 @@ subroutine cloud_microphysics(Model, Tbd, Grid, Sfcprop, ncol, tracer, p_lay, t_ delta_q, & ! IN - Total water distribution width Model%sup, & ! IN - ??? Supersaturation? Model%kdt, & ! IN - ??? - me, & ! IN - ??? NOT USED IN PROGCLD3() + Model%me, & ! IN - ??? NOT USED IN PROGCLD3() clouds, & ! OUT - Cloud properties (NCOL,Model%levs,NF_CLDS) cldsa, & ! OUT - fraction of clouds for low, mid, hi, tot, bl (NCOL,5) mtopa, & ! OUT - vertical indices for low, mid, hi cloud tops (NCOL,3) diff --git a/physics/GFS_rrtmgp_pre.xml b/physics/GFS_rrtmgp_pre.xml deleted file mode 100644 index a20630a25..000000000 --- a/physics/GFS_rrtmgp_pre.xml +++ /dev/null @@ -1,656 +0,0 @@ - - - - - - - GFS_control_type_instance - Fortran DDT containing FV3-GFS model control parameters - DDT - Model - GFS_control_type - - in - F - MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run - - - GFS_grid_type_instance - Fortran DDT containing FV3-GFS grid and interpolation related data - DDT - Grid - GFS_grid_type - - in - F - MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run - - - GFS_sfcprop_type_instance - Fortran DDT containing FV3-GFS surface fields - DDT - Sfcprop - GFS_sfcprop_type - - in - F - MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run - - - GFS_statein_type_instance - Fortran DDT containing FV3-GFS prognostic state data in from dycore - DDT - Statein - GFS_statein_type - - in - F - MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run - - - GFS_tbd_type_instance - Fortran DDT containing FV3-GFS data not yet assigned to a defined container - DDT - Tbd - GFS_tbd_type - - in - F - MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run - - - GFS_cldprop_type_instance - Fortran DDT containing FV3-GFS cloud fields needed by radiation from physics - DDT - Cldprop - GFS_cldprop_type - - in - F - MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run - - - GFS_coupling_type_instance - Fortran DDT containing FV3-GFS fields needed for coupling - DDT - Coupling - GFS_coupling_type - - in - F - MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run - - - GFS_radtend_type_instance - Fortran DDT containing FV3-GFS radiation tendencies - DDT - Radtend - GFS_radtend_type - - inout - F - MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run - - - vertical_layer_dimension_for_radiation - number of vertical layers for radiation calculation - count - lm - integer - - in - F - MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run - - - horizontal_loop_extent - horizontal loop extent - count - im - integer - - in - F - MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run - - - adjusted_vertical_layer_dimension_for_radiation - number of vertical layers for radiation - count - lmk - integer - - in - F - MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run - - - adjusted_vertical_level_dimension_for_radiation - number of vertical levels for radiation - count - lmp - integer - - in - F - MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run - - - vertical_index_difference_between_inout_and_local - vertical index difference between in/out and local - index - kd - integer - - out - F - MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run - - - vertical_index_difference_between_layer_and_upper_bound - vertical index difference between layer and upper bound - index - kt - integer - - out - F - MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run - - - vertical_index_difference_between_layer_and_lower_bound - vertical index difference between layer and lower bound - index - kb - integer - - out - F - MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run - - - time_step_for_radiation - radiation time step - s - raddt - real - - out - F - MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run - - - layer_pressure_thickness_for_radiation - layer pressure thickness on radiation levels - hPa - delp - real - (:,:) - out - F - MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run - - - layer_thickness_for_radiation - layer thickness on radiation levels - km - dz - real - (:,:) - out - F - MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run - - - air_pressure_at_interface_for_radiation_in_hPa - air pressure at vertical interface for radiation calculation - hPa - plvl - real - (:,:) - out - F - MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run - - - air_pressure_at_layer_for_radiation_in_hPa - air pressure at vertical layer for radiation calculation - hPa - plyr - real - (:,:) - out - F - MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run - - - air_temperature_at_interface_for_radiation - air temperature at vertical interface for radiation calculation - K - tlvl - real - (:,:) - out - F - MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run - - - air_temperature_at_layer_for_radiation - air temperature at vertical layer for radiation calculation - K - tlyr - real - (:,:) - out - F - MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run - - - surface_ground_temperature_for_radiation - surface ground temperature for radiation - K - tsfg - real - (:) - out - F - MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run - - - surface_air_temperature_for_radiation - lowest model layer air temperature for radiation - K - tsfa - real - (:) - out - F - MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run - - - water_vapor_specific_humidity_at_layer_for_radiation - water vapor specific humidity at vertical layer for radiation calculation - kg kg-1 - qlyr - real - (:,:) - out - F - MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run - - - ozone_concentration_at_layer_for_radiation - ozone concentration - kg kg-1 - olyr - real - (:,:) - out - F - MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run - - - volume_mixing_ratio_co2 - CO2 volume mixing ratio - kg kg-1 - gasvmr_co2 - real - (:,:) - out - F - MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run - - - volume_mixing_ratio_n2o - N2O volume mixing ratio - kg kg-1 - gasvmr_n2o - real - (:,:) - out - F - MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run - - - volume_mixing_ratio_ch4 - CH4 volume mixing ratio - kg kg-1 - gasvmr_ch4 - real - (:,:) - out - F - MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run - - - volume_mixing_ratio_o2 - O2 volume mixing ratio - kg kg-1 - gasvmr_o2 - real - (:,:) - out - F - MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run - - - volume_mixing_ratio_co - CO volume mixing ratio - kg kg-1 - gasvmr_co - real - (:,:) - out - F - MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run - - - volume_mixing_ratio_cfc11 - CFC11 volume mixing ratio - kg kg-1 - gasvmr_cfc11 - real - (:,:) - out - F - MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run - - - volume_mixing_ratio_cfc12 - CFC12 volume mixing ratio - kg kg-1 - gasvmr_cfc12 - real - (:,:) - out - F - MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run - - - volume_mixing_ratio_cfc22 - CFC22 volume mixing ratio - kg kg-1 - gasvmr_cfc22 - real - (:,:) - out - F - MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run - - - volume_mixing_ratio_ccl4 - CCL4 volume mixing ratio - kg kg-1 - gasvmr_ccl4 - real - (:,:) - out - F - MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run - - - volume_mixing_ratio_cfc113 - CFC113 volume mixing ratio - kg kg-1 - gasvmr_cfc113 - real - (:,:) - out - F - MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run - - - aerosol_optical_depth_for_shortwave_bands_01-16 - aerosol optical depth for shortwave bands 01-16 - none - faersw1 - real - (:,:,:) - out - F - MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run - - - aerosol_single_scattering_albedo_for_shortwave_bands_01-16 - aerosol single scattering albedo for shortwave bands 01-16 - frac - faersw2 - real - (:,:,:) - out - F - MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run - - - aerosol_asymmetry_parameter_for_shortwave_bands_01-16 - aerosol asymmetry parameter for shortwave bands 01-16 - none - faersw3 - real - (:,:,:) - out - F - MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run - - - aerosol_optical_depth_for_longwave_bands_01-16 - aerosol optical depth for longwave bands 01-16 - none - faerlw1 - real - (:,:,:) - out - F - MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run - - - aerosol_single_scattering_albedo_for_longwave_bands_01-16 - aerosol single scattering albedo for longwave bands 01-16 - frac - faerlw2 - real - (:,:,:) - out - F - MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run - - - aerosol_asymmetry_parameter_for_longwave_bands_01-16 - aerosol asymmetry parameter for longwave bands 01-16 - none - faerlw3 - real - (:,:,:) - out - F - MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run - - - atmosphere_optical_thickness_due_to_ambient_aerosol_particles - vertical integrated optical depth for various aerosol species - none - aerodp - real - (:,:) - out - F - MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run - - - total_cloud_fraction - layer total cloud fraction - frac - clouds1 - real - (:,:) - out - F - MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run - - - cloud_liquid_water_path - layer cloud liquid water path - g m-2 - clouds2 - real - (:,:) - out - F - MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run - - - mean_effective_radius_for_liquid_cloud - mean effective radius for liquid cloud - micron - clouds3 - real - (:,:) - out - F - MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run - - - cloud_ice_water_path - layer cloud ice water path - g m-2 - clouds4 - real - (:,:) - out - F - MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run - - - mean_effective_radius_for_ice_cloud - mean effective radius for ice cloud - micron - clouds5 - real - (:,:) - out - F - MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run - - - cloud_rain_water_path - cloud rain water path - g m-2 - clouds6 - real - (:,:) - out - F - MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run - - - mean_effective_radius_for_rain_drop - mean effective radius for rain drop - micron - clouds7 - real - (:,:) - out - F - MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run - - - cloud_snow_water_path - cloud snow water path - g m-2 - clouds8 - real - (:,:) - out - F - MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run - - - mean_effective_radius_for_snow_flake - mean effective radius for snow flake - micron - clouds9 - real - (:,:) - out - F - MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run - - - cloud_area_fraction_for_radiation - fraction of clouds for low, middle,high, total and BL - frac - cldsa - real - (:,:) - out - F - MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run - - - model_layer_number_at_cloud_top - vertical indices for low, middle and high cloud tops - index - mtopa - integer - (:,:) - out - F - MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run - - - model_layer_number_at_cloud_base - vertical indices for low, middle and high cloud bases - index - mbota - integer - (:,:) - out - F - MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run - - - cloud_decorrelation_length - cloud decorrelation length - km - de_lgth - real - (:) - out - F - MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run - - - surface_albedo_perturbation - surface albedo perturbation - frac - alb1d - real - (:) - out - F - MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_GFS_rrtmgp_pre SCHEME_GFS_rrtmgp_pre SUBROUTINE_GFS_rrtmgp_pre_run - - - diff --git a/physics/GFS_rrtmgp_setup.F90 b/physics/GFS_rrtmgp_setup.F90 index 9ae84063b..6b7ada945 100644 --- a/physics/GFS_rrtmgp_setup.F90 +++ b/physics/GFS_rrtmgp_setup.F90 @@ -52,9 +52,7 @@ module GFS_rrtmgp_setup !! | ialb | flag_for_using_climatology_albedo | flag for using climatology alb, based on sfc type | flag | 0 | integer | | in | F | !! | iems | flag_for_surface_emissivity_control | surface emissivity control flag, use fixed value of 1 | flag | 0 | integer | | in | F | !! | ntcw | index_for_liquid_cloud_condensate | tracer index for cloud condensate (or liquid water) | index | 0 | integer | | in | F | -!! | num_p2d | array_dimension_of_2d_arrays_for_microphysics | number of 2D arrays needed for microphysics | count | 0 | integer | | in | F | !! | num_p3d | array_dimension_of_3d_arrays_for_microphysics | number of 3D arrays needed for microphysics | count | 0 | integer | | in | F | -!! | npdf3d | number_of_3d_arrays_associated_with_pdf-based_clouds | number of 3d arrays associated with pdf based clouds/mp | count | 0 | integer | | in | F | !! | ntoz | index_for_ozone | tracer index for ozone mixing ratio | index | 0 | integer | | in | F | !! | iovr_sw | flag_for_max-random_overlap_clouds_for_shortwave_radiation | sw: max-random overlap clouds | flag | 0 | integer | | in | F | !! | iovr_lw | flag_for_max-random_overlap_clouds_for_longwave_radiation | lw: max-random overlap clouds | flag | 0 | integer | | in | F | @@ -76,8 +74,8 @@ module GFS_rrtmgp_setup !! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | !! subroutine GFS_rrtmgp_setup_init ( & - si, levr, ictm, isol, ico2, iaer, ialb, iems, ntcw, num_p2d, & - num_p3d, npdf3d, ntoz, iovr_sw, iovr_lw, isubc_sw, isubc_lw, & + si, levr, ictm, isol, ico2, iaer, ialb, iems, ntcw, & + num_p3d, ntoz, iovr_sw, iovr_lw, isubc_sw, isubc_lw, & icliq_sw, crick_proof, ccnorm, & imp_physics, & norad_precip, idate, iflip, & @@ -205,9 +203,7 @@ subroutine GFS_rrtmgp_setup_init ( & integer, intent(in) :: ialb integer, intent(in) :: iems integer, intent(in) :: ntcw - integer, intent(in) :: num_p2d integer, intent(in) :: num_p3d - integer, intent(in) :: npdf3d integer, intent(in) :: ntoz integer, intent(in) :: iovr_sw integer, intent(in) :: iovr_lw diff --git a/physics/GFS_rrtmgp_setup.xml b/physics/GFS_rrtmgp_setup.xml deleted file mode 100644 index 721534e4d..000000000 --- a/physics/GFS_rrtmgp_setup.xml +++ /dev/null @@ -1,504 +0,0 @@ - - - - - date_and_time_at_model_initialization - initialization date and time - none - idate - integer - (:) - in - F - MODULE_GFS_rrtmgp_setup SCHEME_GFS_rrtmgp_setup SUBROUTINE_GFS_rrtmgp_setup_run - - - forecast_date_and_time - current forecast date and time - none - jdate - integer - (:) - in - F - MODULE_GFS_rrtmgp_setup SCHEME_GFS_rrtmgp_setup SUBROUTINE_GFS_rrtmgp_setup_run - - - frequency_for_shortwave_radiation - frequency for shortwave radiation - s - deltsw - real - - in - F - MODULE_GFS_rrtmgp_setup SCHEME_GFS_rrtmgp_setup SUBROUTINE_GFS_rrtmgp_setup_run - - - time_step_for_dynamics - dynamics timestep - s - deltim - real - - in - F - MODULE_GFS_rrtmgp_setup SCHEME_GFS_rrtmgp_setup SUBROUTINE_GFS_rrtmgp_setup_run - - - flag_to_calc_sw - logical flags for sw radiation calls - flag - lsswr - logical - - in - F - MODULE_GFS_rrtmgp_setup SCHEME_GFS_rrtmgp_setup SUBROUTINE_GFS_rrtmgp_setup_run - - - mpi_rank - current MPI-rank - index - me - integer - - in - F - MODULE_GFS_rrtmgp_setup SCHEME_GFS_rrtmgp_setup SUBROUTINE_GFS_rrtmgp_setup_run - - - equation_of_time - equation of time (radian) - radians - slag - real - - out - F - MODULE_GFS_rrtmgp_setup SCHEME_GFS_rrtmgp_setup SUBROUTINE_GFS_rrtmgp_setup_run - - - sine_of_solar_declination_angle - sin of the solar declination angle - none - sdec - real - - out - F - MODULE_GFS_rrtmgp_setup SCHEME_GFS_rrtmgp_setup SUBROUTINE_GFS_rrtmgp_setup_run - - - cosine_of_solar_declination_angle - cos of the solar declination angle - none - cdec - real - - out - F - MODULE_GFS_rrtmgp_setup SCHEME_GFS_rrtmgp_setup SUBROUTINE_GFS_rrtmgp_setup_run - - - solar_constant - solar constant (sun-earth distant adjusted) - W m-2 - solcon - real - - out - F - MODULE_GFS_rrtmgp_setup SCHEME_GFS_rrtmgp_setup SUBROUTINE_GFS_rrtmgp_setup_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_GFS_rrtmgp_setup SCHEME_GFS_rrtmgp_setup SUBROUTINE_GFS_rrtmgp_setup_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_GFS_rrtmgp_setup SCHEME_GFS_rrtmgp_setup SUBROUTINE_GFS_rrtmgp_setup_run - - - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_GFS_rrtmgp_setup SCHEME_GFS_rrtmgp_setup SUBROUTINE_GFS_rrtmgp_setup_finalize - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_GFS_rrtmgp_setup SCHEME_GFS_rrtmgp_setup SUBROUTINE_GFS_rrtmgp_setup_finalize - - - - - vertical_sigma_coordinate_for_radiation_initialization - vertical sigma coordinate for radiation initialization - none - si - real - (:) - in - F - MODULE_GFS_rrtmgp_setup SCHEME_GFS_rrtmgp_setup SUBROUTINE_GFS_rrtmgp_setup_init - - - number_of_vertical_layers_for_radiation_calculations - number of vertical levels for radiation calculations - count - levr - integer - - in - F - MODULE_GFS_rrtmgp_setup SCHEME_GFS_rrtmgp_setup SUBROUTINE_GFS_rrtmgp_setup_init - - - flag_for_initial_time-date_control - flag for initial conditions and forcing - flag - ictm - integer - - in - F - MODULE_GFS_rrtmgp_setup SCHEME_GFS_rrtmgp_setup SUBROUTINE_GFS_rrtmgp_setup_init - - - flag_for_solar_constant - use prescribed solar constant - flag - isol - integer - - in - F - MODULE_GFS_rrtmgp_setup SCHEME_GFS_rrtmgp_setup SUBROUTINE_GFS_rrtmgp_setup_init - - - flag_for_using_prescribed_global_mean_co2_value - prescribed global mean value (old opernl) - flag - ico2 - integer - - in - F - MODULE_GFS_rrtmgp_setup SCHEME_GFS_rrtmgp_setup SUBROUTINE_GFS_rrtmgp_setup_init - - - flag_for_default_aerosol_effect_in_shortwave_radiation - default aerosol effect in sw only - flag - iaer - integer - - in - F - MODULE_GFS_rrtmgp_setup SCHEME_GFS_rrtmgp_setup SUBROUTINE_GFS_rrtmgp_setup_init - - - flag_for_using_climatology_albedo - flag for using climatology alb, based on sfc type - flag - ialb - integer - - in - F - MODULE_GFS_rrtmgp_setup SCHEME_GFS_rrtmgp_setup SUBROUTINE_GFS_rrtmgp_setup_init - - - flag_for_surface_emissivity_control - surface emissivity control flag, use fixed value of 1 - flag - iems - integer - - in - F - MODULE_GFS_rrtmgp_setup SCHEME_GFS_rrtmgp_setup SUBROUTINE_GFS_rrtmgp_setup_init - - - index_for_liquid_cloud_condensate - tracer index for cloud condensate (or liquid water) - index - ntcw - integer - - in - F - MODULE_GFS_rrtmgp_setup SCHEME_GFS_rrtmgp_setup SUBROUTINE_GFS_rrtmgp_setup_init - - - array_dimension_of_2d_arrays_for_microphysics - number of 2D arrays needed for microphysics - count - num_p2d - integer - - in - F - MODULE_GFS_rrtmgp_setup SCHEME_GFS_rrtmgp_setup SUBROUTINE_GFS_rrtmgp_setup_init - - - array_dimension_of_3d_arrays_for_microphysics - number of 3D arrays needed for microphysics - count - num_p3d - integer - - in - F - MODULE_GFS_rrtmgp_setup SCHEME_GFS_rrtmgp_setup SUBROUTINE_GFS_rrtmgp_setup_init - - - number_of_3d_arrays_associated_with_pdf-based_clouds - number of 3d arrays associated with pdf based clouds/mp - count - npdf3d - integer - - in - F - MODULE_GFS_rrtmgp_setup SCHEME_GFS_rrtmgp_setup SUBROUTINE_GFS_rrtmgp_setup_init - - - index_for_ozone - tracer index for ozone mixing ratio - index - ntoz - integer - - in - F - MODULE_GFS_rrtmgp_setup SCHEME_GFS_rrtmgp_setup SUBROUTINE_GFS_rrtmgp_setup_init - - - flag_for_max-random_overlap_clouds_for_shortwave_radiation - sw: max-random overlap clouds - flag - iovr_sw - integer - - in - F - MODULE_GFS_rrtmgp_setup SCHEME_GFS_rrtmgp_setup SUBROUTINE_GFS_rrtmgp_setup_init - - - flag_for_max-random_overlap_clouds_for_longwave_radiation - lw: max-random overlap clouds - flag - iovr_lw - integer - - in - F - MODULE_GFS_rrtmgp_setup SCHEME_GFS_rrtmgp_setup SUBROUTINE_GFS_rrtmgp_setup_init - - - flag_for_sw_clouds_without_sub-grid_approximation - flag for sw clouds without sub-grid approximation - flag - isubc_sw - integer - - in - F - MODULE_GFS_rrtmgp_setup SCHEME_GFS_rrtmgp_setup SUBROUTINE_GFS_rrtmgp_setup_init - - - flag_for_lw_clouds_without_sub-grid_approximation - flag for lw clouds without sub-grid approximation - flag - isubc_lw - integer - - in - F - MODULE_GFS_rrtmgp_setup SCHEME_GFS_rrtmgp_setup SUBROUTINE_GFS_rrtmgp_setup_init - - - flag_for_optical_property_for_liquid_clouds_for_shortwave_radiation - sw optical property for liquid clouds - flag - icliq_sw - integer - - in - F - MODULE_GFS_rrtmgp_setup SCHEME_GFS_rrtmgp_setup SUBROUTINE_GFS_rrtmgp_setup_init - - - flag_for_CRICK-proof_cloud_water - flag for CRICK-Proof cloud water - flag - crick_proof - logical - - in - F - MODULE_GFS_rrtmgp_setup SCHEME_GFS_rrtmgp_setup SUBROUTINE_GFS_rrtmgp_setup_init - - - flag_for_cloud_condensate_normalized_by_cloud_cover - flag for cloud condensate normalized by cloud cover - flag - ccnorm - logical - - in - F - MODULE_GFS_rrtmgp_setup SCHEME_GFS_rrtmgp_setup SUBROUTINE_GFS_rrtmgp_setup_init - - - flag_for_microphysics_scheme - choice of microphysics scheme - flag - imp_physics - integer - - in - F - MODULE_GFS_rrtmgp_setup SCHEME_GFS_rrtmgp_setup SUBROUTINE_GFS_rrtmgp_setup_init - - - flag_for_precipitation_effect_on_radiation - radiation precip flag for Ferrier/Moorthi - flag - norad_precip - logical - - in - F - MODULE_GFS_rrtmgp_setup SCHEME_GFS_rrtmgp_setup SUBROUTINE_GFS_rrtmgp_setup_init - - - date_and_time_at_model_initialization_reordered - initialization date and time - none - idate - integer - (:) - in - F - MODULE_GFS_rrtmgp_setup SCHEME_GFS_rrtmgp_setup SUBROUTINE_GFS_rrtmgp_setup_init - - - flag_for_vertical_index_direction_control - flag for vertical index direction control - flag - iflip - integer - - in - F - MODULE_GFS_rrtmgp_setup SCHEME_GFS_rrtmgp_setup SUBROUTINE_GFS_rrtmgp_setup_init - - - horizontal_loop_extent - horizontal loop extent - count - im - integer - - in - F - MODULE_GFS_rrtmgp_setup SCHEME_GFS_rrtmgp_setup SUBROUTINE_GFS_rrtmgp_setup_init - - - aerosol_optical_properties_for_longwave_bands_01-16 - optical properties for longwave bands 01-16 - various - faerlw - real - (:,:,:,:) - in - F - MODULE_GFS_rrtmgp_setup SCHEME_GFS_rrtmgp_setup SUBROUTINE_GFS_rrtmgp_setup_init - - - aerosol_optical_properties_for_shortwave_bands_01-16 - aerosol optical properties for shortwave bands 01-16 - various - faersw - real - (:,:,:,:) - in - F - MODULE_GFS_rrtmgp_setup SCHEME_GFS_rrtmgp_setup SUBROUTINE_GFS_rrtmgp_setup_init - - - atmosphere_optical_thickness_due_to_ambient_aerosol_particles - vertical integrated optical depth for various aerosol species - none - aerodp - real - (:,:) - in - F - MODULE_GFS_rrtmgp_setup SCHEME_GFS_rrtmgp_setup SUBROUTINE_GFS_rrtmgp_setup_init - - - mpi_rank - current MPI-rank - index - me - integer - - in - F - MODULE_GFS_rrtmgp_setup SCHEME_GFS_rrtmgp_setup SUBROUTINE_GFS_rrtmgp_setup_init - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_GFS_rrtmgp_setup SCHEME_GFS_rrtmgp_setup SUBROUTINE_GFS_rrtmgp_setup_init - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_GFS_rrtmgp_setup SCHEME_GFS_rrtmgp_setup SUBROUTINE_GFS_rrtmgp_setup_init - - - diff --git a/physics/GFS_rrtmgp_sw_post.F90 b/physics/GFS_rrtmgp_sw_post.F90 index 122ce3f44..754d5e46c 100644 --- a/physics/GFS_rrtmgp_sw_post.F90 +++ b/physics/GFS_rrtmgp_sw_post.F90 @@ -2,8 +2,7 @@ !!This file contains module GFS_rrtmgp_sw_post use machine, only: kind_phys - use GFS_typedefs, only: GFS_statein_type, & - GFS_coupling_type, & + use GFS_typedefs, only: GFS_coupling_type, & GFS_control_type, & GFS_grid_type, & GFS_radtend_type, & @@ -33,11 +32,9 @@ end subroutine GFS_rrtmgp_sw_post_init !! | Grid | GFS_grid_type_instance | Fortran DDT containing FV3-GFS grid and interpolation related data | DDT | 0 | GFS_grid_type | | in | F | !! | Diag | GFS_diag_type_instance | Fortran DDT containing FV3-GFS diagnotics data | DDT | 0 | GFS_diag_type | | inout | F | !! | Radtend | GFS_radtend_type_instance | Fortran DDT containing FV3-GFS radiation tendencies | DDT | 0 | GFS_radtend_type | | inout | F | -!! | Statein | GFS_statein_type_instance | Fortran DDT containing FV3-GFS prognostic state data in from dycore | DDT | 0 | GFS_statein_type | | in | F | !! | Coupling | GFS_coupling_type_instance | Fortran DDT containing FV3-GFS fields to/from coupling with other components | DDT | 0 | GFS_coupling_type | | inout | F | !! | scmpsw | components_of_surface_downward_shortwave_fluxes | derived type for special components of surface downward shortwave fluxes | W m-2 | 1 | cmpfsw_type | | inout | T | !! | im | horizontal_loop_extent | horizontal loop extent | count | 0 | integer | | in | F | -!! | tsfa | surface_air_temperature_for_radiation | lowest model layer air temperature for radiation | K | 1 | real | kind_phys | in | F | !! | p_lev | air_pressure_at_interface_for_RRTMGP_in_hPa | air pressure level | hPa | 2 | real | kind_phys | in | F | !! | nday | daytime_points_dimension | daytime points dimension | count | 0 | integer | | in | F | !! | idxday | daytime_points | daytime points | index | 1 | integer | | in | F | @@ -46,10 +43,6 @@ end subroutine GFS_rrtmgp_sw_post_init !! | fluxswUP_clrsky | sw_flux_profile_upward_clrsky | RRTMGP upward shortwave clr-sky flux profile | W m-2 | 2 | real | kind_phys | in | F | !! | fluxswDOWN_clrsky | sw_flux_profile_downward_clrsky | RRTMGP downward shortwave clr-sky flux profile | W m-2 | 2 | real | kind_phys | in | F | !! | sw_gas_props | coefficients_for_sw_gas_optics | DDT containing spectral information for RRTMGP SW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | -!! | sfc_alb_nir_dir | surface_shortwave_albedo_near_infrared_direct_in_each_band | surface sw near-infrared direct albedo in each SW band | frac | 2 | real | kind_phys | in | F | -!! | sfc_alb_nir_dif | surface_shortwave_albedo_near_infrared_diffuse_in_each_band | surface sw near-infrared diffuse albedo in each SW band | frac | 2 | real | kind_phys | in | F | -!! | sfc_alb_uvvis_dir | surface_shortwave_albedo_uv_visible_direct_in_each_band | surface sw uv-visible direct albedo in each SW band | frac | 2 | real | kind_phys | in | F | -!! | sfc_alb_uvvis_dif | surface_shortwave_albedo_uv_visible_diffuse_in_each_band | surface sw uv-visible diffuse albedo in each SW band | frac | 2 | real | kind_phys | in | F | !! | hswc | tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step | shortwave total sky heating rate | K s-1 | 2 | real | kind_phys | out | F | !! | topflx_sw | sw_fluxes_top_atmosphere | shortwave total sky fluxes at the top of the atm | W m-2 | 1 | topfsw_type | | inout | F | !! | sfcflx_sw | sw_fluxes_sfc | shortwave total sky fluxes at the Earth surface | W m-2 | 1 | sfcfsw_type | | inout | F | @@ -59,9 +52,8 @@ end subroutine GFS_rrtmgp_sw_post_init !! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | !! #endif - subroutine GFS_rrtmgp_sw_post_run (Model, Grid, Diag, Radtend, Statein, Coupling, & - scmpsw, im, p_lev, sw_gas_props, sfc_alb_nir_dir, sfc_alb_nir_dif, sfc_alb_uvvis_dir, & - sfc_alb_uvvis_dif, tsfa, nday, idxday, fluxswUP_allsky, fluxswDOWN_allsky, & + subroutine GFS_rrtmgp_sw_post_run (Model, Grid, Diag, Radtend, Coupling, & + scmpsw, im, p_lev, sw_gas_props, nday, idxday, fluxswUP_allsky, fluxswDOWN_allsky, & fluxswUP_clrsky, fluxswDOWN_clrsky, hswc, topflx_sw, sfcflx_sw, flxprf_sw, hsw0, & errmsg, errflg) @@ -70,9 +62,7 @@ subroutine GFS_rrtmgp_sw_post_run (Model, Grid, Diag, Radtend, Statein, Coupling Model ! Fortran DDT containing FV3-GFS model control parameters type(GFS_grid_type), intent(in) :: & Grid ! Fortran DDT containing FV3-GFS grid and interpolation related data - type(GFS_statein_type), intent(in) :: & - Statein ! Fortran DDT containing FV3-GFS prognostic state data in from dycore - type(GFS_coupling_type), intent(inout) :: & + type(GFS_coupling_type), intent(inout) :: & Coupling ! Fortran DDT containing FV3-GFS fields to/from coupling with other components type(GFS_radtend_type), intent(inout) :: & Radtend ! Fortran DDT containing FV3-GFS radiation tendencies @@ -83,17 +73,10 @@ subroutine GFS_rrtmgp_sw_post_run (Model, Grid, Diag, Radtend, Statein, Coupling nDay ! Number of daylit columns integer, intent(in), dimension(nday) :: & idxday ! Index array for daytime points - real(kind_phys), dimension(size(Grid%xlon,1)), intent(in) :: & - tsfa ! Lowest model layer air temperature for radiation type(ty_gas_optics_rrtmgp),intent(in) :: & sw_gas_props ! DDT containing SW spectral information real(kind_phys), dimension(size(Grid%xlon,1), Model%levs+1), intent(in) :: & p_lev ! Pressure @ model layer-interfaces (hPa) - real(kind_phys),dimension(sw_gas_props%get_nband(),size(Grid%xlon,1)),intent(in) :: & - sfc_alb_nir_dir, & ! Shortwave surface albedo (nIR-direct) - sfc_alb_nir_dif, & ! Shortwave surface albedo (nIR-diffuse) - sfc_alb_uvvis_dir, & ! Shortwave surface albedo (uvvis-direct) - sfc_alb_uvvis_dif ! Shortwave surface albedo (uvvis-diffuse) real(kind_phys), dimension(size(Grid%xlon,1), Model%levs+1), intent(in) :: & fluxswUP_allsky, & ! SW All-sky flux (W/m2) fluxswDOWN_allsky, & ! SW All-sky flux (W/m2) @@ -136,11 +119,14 @@ subroutine GFS_rrtmgp_sw_post_run (Model, Grid, Diag, Radtend, Statein, Coupling ! visbm - downward uv+vis direct beam flux (W/m2) ! visdf - downward uv+vis diffused flux (W/m2) ! Local variables - integer :: i, j, k, k1, itop, ibtc, iBand, iSFC, iTOA - real(kind_phys) :: tem0d, tem1, tem2 + integer :: i, k, iSFC, iTOA real(kind_phys), dimension(nDay, Model%levs) :: thetaTendClrSky, thetaTendAllSky logical :: l_clrskysw_hr, l_fluxessw2d, top_at_1, l_sfcFluxessw1D + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + ! Are any optional outputs requested? l_clrskysw_hr = present(hsw0) l_fluxessw2d = present(flxprf_sw) @@ -234,10 +220,10 @@ subroutine GFS_rrtmgp_sw_post_run (Model, Grid, Diag, Radtend, Statein, Coupling Coupling%visbmdi(i) = scmpsw(i)%visbm Coupling%visdfdi(i) = scmpsw(i)%visdf - Coupling%nirbmui(i) = scmpsw(i)%nirbm * sfc_alb_nir_dir(1,i) - Coupling%nirdfui(i) = scmpsw(i)%nirdf * sfc_alb_nir_dif(1,i) - Coupling%visbmui(i) = scmpsw(i)%visbm * sfc_alb_uvvis_dir(1,i) - Coupling%visdfui(i) = scmpsw(i)%visdf * sfc_alb_uvvis_dif(1,i) + Coupling%nirbmui(i) = scmpsw(i)%nirbm * Radtend%sfc_alb_nir_dir(1,i) + Coupling%nirdfui(i) = scmpsw(i)%nirdf * Radtend%sfc_alb_nir_dif(1,i) + Coupling%visbmui(i) = scmpsw(i)%visbm * Radtend%sfc_alb_uvvis_dir(1,i) + Coupling%visdfui(i) = scmpsw(i)%visdf * Radtend%sfc_alb_uvvis_dif(1,i) enddo else ! if_nday_block Radtend%htrsw(:,:) = 0.0 diff --git a/physics/GFS_suite_interstitial_1.xml b/physics/GFS_suite_interstitial_1.xml deleted file mode 100644 index 75b62c906..000000000 --- a/physics/GFS_suite_interstitial_1.xml +++ /dev/null @@ -1,304 +0,0 @@ - - - - - - - horizontal_loop_extent - horizontal loop extent - count - im - integer - - in - F - MODULE_GFS_suite_interstitial_1 SCHEME_GFS_suite_interstitial_1 SUBROUTINE_GFS_suite_interstitial_1_run - - - vertical_dimension - vertical layer dimension - count - levs - integer - - in - F - MODULE_GFS_suite_interstitial_1 SCHEME_GFS_suite_interstitial_1 SUBROUTINE_GFS_suite_interstitial_1_run - - - number_of_tracers - number of tracers - count - ntrac - integer - - in - F - MODULE_GFS_suite_interstitial_1 SCHEME_GFS_suite_interstitial_1 SUBROUTINE_GFS_suite_interstitial_1_run - - - critical_relative_humidity_at_sfc_pbltop_toa - critical relative humidity at SFC, PBL top and TOA - frac - crtrh - real - (:) - in - F - MODULE_GFS_suite_interstitial_1 SCHEME_GFS_suite_interstitial_1 SUBROUTINE_GFS_suite_interstitial_1_run - - - time_step_for_dynamics - dynamics timestep - s - dtf - real - - in - F - MODULE_GFS_suite_interstitial_1 SCHEME_GFS_suite_interstitial_1 SUBROUTINE_GFS_suite_interstitial_1_run - - - time_step_for_physics - physics timestep - s - dtp - real - - in - F - MODULE_GFS_suite_interstitial_1 SCHEME_GFS_suite_interstitial_1 SUBROUTINE_GFS_suite_interstitial_1_run - - - sea_land_ice_mask_real - landmask: sea/land/ice=0/1/2 - flag - slmsk - real - (:) - in - F - MODULE_GFS_suite_interstitial_1 SCHEME_GFS_suite_interstitial_1 SUBROUTINE_GFS_suite_interstitial_1_run - - - cell_area - area of the grid cell - m2 - area - real - (:) - in - F - MODULE_GFS_suite_interstitial_1 SCHEME_GFS_suite_interstitial_1 SUBROUTINE_GFS_suite_interstitial_1_run - - - minimum_scaling_factor_for_critical_relative_humidity - minimum scaling factor for critical relative humidity - m2 rad-2 - dxmin - real - - in - F - MODULE_GFS_suite_interstitial_1 SCHEME_GFS_suite_interstitial_1 SUBROUTINE_GFS_suite_interstitial_1_run - - - inverse_scaling_factor_for_critical_relative_humidity - inverse scaling factor for critical relative humidity - rad2 m-2 - dxinv - real - - in - F - MODULE_GFS_suite_interstitial_1 SCHEME_GFS_suite_interstitial_1 SUBROUTINE_GFS_suite_interstitial_1_run - - - surface_air_pressure - surface pressure - Pa - pgr - real - (:) - in - F - MODULE_GFS_suite_interstitial_1 SCHEME_GFS_suite_interstitial_1 SUBROUTINE_GFS_suite_interstitial_1_run - - - critical_relative_humidity_at_surface - critical relative humidity at the surface - frac - rhbbot - real - - out - F - MODULE_GFS_suite_interstitial_1 SCHEME_GFS_suite_interstitial_1 SUBROUTINE_GFS_suite_interstitial_1_run - - - critical_relative_humidity_at_PBL_top - critical relative humidity at the PBL top - frac - rhpbl - real - - out - F - MODULE_GFS_suite_interstitial_1 SCHEME_GFS_suite_interstitial_1 SUBROUTINE_GFS_suite_interstitial_1_run - - - critical_relative_humidity_at_top_of_atmosphere - critical relative humidity at the top of atmosphere - frac - rhbtop - real - - out - F - MODULE_GFS_suite_interstitial_1 SCHEME_GFS_suite_interstitial_1 SUBROUTINE_GFS_suite_interstitial_1_run - - - dynamics_to_physics_timestep_ratio - ratio of dynamics timestep to physics timestep - none - frain - real - - out - F - MODULE_GFS_suite_interstitial_1 SCHEME_GFS_suite_interstitial_1 SUBROUTINE_GFS_suite_interstitial_1_run - - - sea_land_ice_mask - landmask: sea/land/ice=0/1/2 - flag - islmsk - integer - (:) - out - F - MODULE_GFS_suite_interstitial_1 SCHEME_GFS_suite_interstitial_1 SUBROUTINE_GFS_suite_interstitial_1_run - - - land_area_fraction - land area fraction - frac - frland - real - (:) - out - F - MODULE_GFS_suite_interstitial_1 SCHEME_GFS_suite_interstitial_1 SUBROUTINE_GFS_suite_interstitial_1_run - - - grid_size_related_coefficient_used_in_scale-sensitive_schemes - grid size related coefficient used in scale-sensitive schemes - none - work1 - real - (:) - out - F - MODULE_GFS_suite_interstitial_1 SCHEME_GFS_suite_interstitial_1 SUBROUTINE_GFS_suite_interstitial_1_run - - - grid_size_related_coefficient_used_in_scale-sensitive_schemes_complement - complement to work1 - none - work2 - real - (:) - out - F - MODULE_GFS_suite_interstitial_1 SCHEME_GFS_suite_interstitial_1 SUBROUTINE_GFS_suite_interstitial_1_run - - - surface_air_pressure_diag - surface air pressure diagnostic - Pa - psurf - real - (:) - out - F - MODULE_GFS_suite_interstitial_1 SCHEME_GFS_suite_interstitial_1 SUBROUTINE_GFS_suite_interstitial_1_run - - - tendency_of_x_wind_due_to_model_physics - updated tendency of the x wind - m s-2 - dudt - real - (:,:) - out - F - MODULE_GFS_suite_interstitial_1 SCHEME_GFS_suite_interstitial_1 SUBROUTINE_GFS_suite_interstitial_1_run - - - tendency_of_y_wind_due_to_model_physics - updated tendency of the y wind - m s-2 - dvdt - real - (:,:) - out - F - MODULE_GFS_suite_interstitial_1 SCHEME_GFS_suite_interstitial_1 SUBROUTINE_GFS_suite_interstitial_1_run - - - tendency_of_air_temperature_due_to_model_physics - updated tendency of the temperature - K s-1 - dtdt - real - (:,:) - out - F - MODULE_GFS_suite_interstitial_1 SCHEME_GFS_suite_interstitial_1 SUBROUTINE_GFS_suite_interstitial_1_run - - - tendency_of_air_temperature_due_to_radiative_heating_assuming_clear_sky - clear sky radiative (shortwave + longwave) heating rate at current time - K s-1 - dtdtc - real - (:,:) - out - F - MODULE_GFS_suite_interstitial_1 SCHEME_GFS_suite_interstitial_1 SUBROUTINE_GFS_suite_interstitial_1_run - - - tendency_of_tracers_due_to_model_physics - updated tendency of the tracers - kg kg-1 s-1 - dqdt - real - (:,:,:) - out - F - MODULE_GFS_suite_interstitial_1 SCHEME_GFS_suite_interstitial_1 SUBROUTINE_GFS_suite_interstitial_1_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_GFS_suite_interstitial_1 SCHEME_GFS_suite_interstitial_1 SUBROUTINE_GFS_suite_interstitial_1_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_GFS_suite_interstitial_1 SCHEME_GFS_suite_interstitial_1 SUBROUTINE_GFS_suite_interstitial_1_run - - - diff --git a/physics/GFS_suite_interstitial_2.xml b/physics/GFS_suite_interstitial_2.xml deleted file mode 100644 index 0ca462da8..000000000 --- a/physics/GFS_suite_interstitial_2.xml +++ /dev/null @@ -1,546 +0,0 @@ - - - - - - - horizontal_loop_extent - horizontal loop extent - count - im - integer - - in - F - MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run - - - vertical_dimension - vertical layer dimension - count - levs - integer - - in - F - MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run - - - flag_diagnostics - logical flag for storing diagnostics - flag - lssav - logical - - in - F - MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run - - - flag_diagnostics_3D - flag for 3d diagnostic fields - flag - ldiag3d - logical - - in - F - MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run - - - flag_idealized_physics - flag for idealized physics - flag - lsidea - logical - - in - F - MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run - - - flag_for_flux_coupling - flag controlling cplflx collection (default off) - flag - cplflx - logical - - in - F - MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run - - - flag_for_cice - flag for cice - flag - flag_cice - logical - (:) - in - F - MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run - - - flag_for_shallow_convection - flag for calling shallow convection - flag - shal_cnv - logical - - in - F - MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run - - - flag_for_old_PBL_scheme - flag for using old PBL schemes - flag - old_monin - logical - - in - F - MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run - - - flag_for_moorthi_stratus - flag for moorthi approach for stratus - flag - mstrat - logical - - in - F - MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run - - - flag_for_shoc - flag for SHOC - flag - do_shoc - logical - - in - F - MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run - - - flag_for_mass_flux_shallow_convection_scheme - flag for mass-flux shallow convection scheme - flag - imfshalcnv - integer - - in - F - MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run - - - time_step_for_dynamics - dynamics timestep - s - dtf - real - - in - F - MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run - - - instantaneous_cosine_of_zenith_angle - cosine of zenith angle at current time - none - xcosz - real - (:) - in - F - MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run - - - surface_downwelling_shortwave_flux - surface downwelling shortwave flux at current time - W m-2 - adjsfcdsw - real - (:) - in - F - MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run - - - surface_downwelling_longwave_flux - surface downwelling longwave flux at current time - W m-2 - adjsfcdlw - real - (:) - in - F - MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run - - - surface_air_pressure - surface pressure - Pa - pgr - real - (:) - in - F - MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run - - - surface_upwelling_longwave_flux_for_cice - surface upwelling longwave flux for cice - W m-2 - ulwsfc_cice - real - (:) - in - F - MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run - - - tendency_of_air_temperature_due_to_longwave_heating_for_idea - idea sky lw heating rates - K s-1 - lwhd - real - (:,:,:) - in - F - MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run - - - tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_timestep - total sky sw heating rate - K s-1 - htrsw - real - (:,:) - in - F - MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run - - - tendency_of_air_temperature_due_to_longwave_heating_on_radiation_timestep - total sky lw heating rate - K s-1 - htrlw - real - (:,:) - in - F - MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run - - - zenith_angle_temporal_adjustment_factor_for_shortwave_fluxes - zenith angle temporal adjustment factor for shortwave fluxes - none - xmu - real - (:) - in - F - MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run - - - critical_cloud_top_entrainment_instability_criteria - critical cloud top entrainment instability criteria - none - ctei_rm - real - (:) - in - F - MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run - - - grid_size_related_coefficient_used_in_scale-sensitive_schemes - grid size related coefficient used in scale-sensitive schemes - none - work1 - real - (:) - in - F - MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run - - - grid_size_related_coefficient_used_in_scale-sensitive_schemes_complement - complement to work1 - none - work2 - real - (:) - in - F - MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run - - - air_pressure_at_interface - air pressure at model layer interfaces - Pa - prsi - real - (:,:) - in - F - MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run - - - air_temperature - model layer mean temperature - K - tgrs - real - (:,:) - in - F - MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run - - - air_pressure - mean layer pressure - Pa - prsl - real - (:,:) - in - F - MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run - - - water_vapor_specific_humidity - water vapor specific humidity - kg kg-1 - qgrs_water_vapor - real - (:,:) - in - F - MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run - - - cloud_condensed_water_mixing_ratio - moist (dry+vapor, no condensates) mixing ratio of cloud water (condensate) - kg kg-1 - qgrs_cloud_water - real - (:,:) - in - F - MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run - - - specific_heat_of_dry_air_at_constant_pressure - specific heat of dry air at constant pressure - J kg-1 K-1 - cp - real - - in - F - MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run - - - latent_heat_of_vaporization_of_water_at_0C - latent heat of evaporation/sublimation - J kg-1 - hvap - real - - in - F - MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run - - - dimensionless_exner_function_at_model_layers - dimensionless Exner function at model layer centers - none - prslk - real - (:,:) - in - F - MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run - - - duration_of_sunshine - sunshine duration time - s - suntim - real - (:) - inout - F - MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run - - - surface_upwelling_longwave_flux - surface upwelling longwave flux at current time - W m-2 - adjsfculw - real - (:) - inout - F - MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run - - - cumulative_surface_downwelling_longwave_flux_multiplied_by_timestep - cumulative surface downwelling LW flux multiplied by timestep - W m-2 s - dlwsfc - real - (:) - inout - F - MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run - - - cumulative_surface_upwelling_longwave_flux_multiplied_by_timestep - cumulative surface upwelling LW flux multiplied by timestep - W m-2 s - ulwsfc - real - (:) - inout - F - MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run - - - cumulative_surface_pressure_multiplied_by_timestep - cumulative surface pressure multiplied by timestep - Pa s - psmean - real - (:) - inout - F - MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run - - - cumulative_change_in_temperature_due_to_longwave_radiation - cumulative change in temperature due to longwave radiation - K - dt3dt_lw - real - (:,:) - inout - F - MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run - - - cumulative_change_in_temperature_due_to_shortwave_radiation_and_orographic_gravity_wave_drag - cumulative change in temperature due to SW rad and oro. GWD - K - dt3dt_sw - real - (:,:) - inout - F - MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run - - - cumulative_change_in_temperature_due_to_PBL - cumulative change in temperature due to PBL - K - dt3dt_pbl - real - (:,:) - inout - F - MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run - - - cumulative_change_in_temperature_due_to_deep_convection - cumulative change in temperature due to deep conv. - K - dt3dt_dcnv - real - (:,:) - inout - F - MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run - - - cumulative_change_in_temperature_due_to_shal_convection - cumulative change in temperature due to shal conv. - K - dt3dt_scnv - real - (:,:) - inout - F - MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run - - - cumulative_change_in_temperature_due_to_microphysics - cumulative change in temperature due to microphysics - K - dt3dt_mp - real - (:,:) - inout - F - MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run - - - grid_sensitive_critical_cloud_top_entrainment_instability_criteria - grid sensitive critical cloud top entrainment instability criteria - none - ctei_rml - real - (:) - inout - F - MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run - - - cloud_top_entrainment_instability_value - cloud top entrainment instability value - none - ctei_r - real - (:) - inout - F - MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run - - - index_of_highest_temperature_inversion - index of highest temperature inversion - index - kinver - integer - (:) - inout - F - MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_GFS_suite_interstitial_2 SCHEME_GFS_suite_interstitial_2 SUBROUTINE_GFS_suite_interstitial_2_run - - - diff --git a/physics/GFS_suite_interstitial_3.xml b/physics/GFS_suite_interstitial_3.xml deleted file mode 100644 index 0d86c6ca9..000000000 --- a/physics/GFS_suite_interstitial_3.xml +++ /dev/null @@ -1,491 +0,0 @@ - - - - - horizontal_loop_extent - horizontal loop extent - count - im - integer - - in - F - MODULE_GFS_suite_interstitial_3 SCHEME_GFS_suite_interstitial_3 SUBROUTINE_GFS_suite_interstitial_3_run - - - vertical_dimension - vertical layer dimension - count - levs - integer - - in - F - MODULE_GFS_suite_interstitial_3 SCHEME_GFS_suite_interstitial_3 SUBROUTINE_GFS_suite_interstitial_3_run - - - number_of_tracers_for_convective_transport - number of tracers for convective transport - count - nn - integer - - in - F - MODULE_GFS_suite_interstitial_3 SCHEME_GFS_suite_interstitial_3 SUBROUTINE_GFS_suite_interstitial_3_run - - - flag_for_Chikira_Sugiyama_deep_convection - flag for Chikira-Sugiyama convection - flag - cscnv - logical - - in - F - MODULE_GFS_suite_interstitial_3 SCHEME_GFS_suite_interstitial_3 SUBROUTINE_GFS_suite_interstitial_3_run - - - flag_for_scale_aware_TKE_moist_EDMF_PBL - flag for scale-aware TKE moist EDMF PBL scheme - flag - satmedmf - logical - - in - F - MODULE_GFS_suite_interstitial_3 SCHEME_GFS_suite_interstitial_3 SUBROUTINE_GFS_suite_interstitial_3_run - - - flag_for_convective_transport_of_tracers - flag for convective transport of tracers - flag - trans_trac - logical - - in - F - MODULE_GFS_suite_interstitial_3 SCHEME_GFS_suite_interstitial_3 SUBROUTINE_GFS_suite_interstitial_3_run - - - flag_for_shoc - flag for SHOC - flag - do_shoc - logical - - in - F - MODULE_GFS_suite_interstitial_3 SCHEME_GFS_suite_interstitial_3 SUBROUTINE_GFS_suite_interstitial_3_run - - - flag_for_aerosol_physics - flag for aerosol physics - flag - ltaerosol - logical - - in - F - MODULE_GFS_suite_interstitial_3 SCHEME_GFS_suite_interstitial_3 SUBROUTINE_GFS_suite_interstitial_3_run - - - number_of_tracers - number of tracers - count - ntrac - integer - - in - F - MODULE_GFS_suite_interstitial_3 SCHEME_GFS_suite_interstitial_3 SUBROUTINE_GFS_suite_interstitial_3_run - - - index_for_liquid_cloud_condensate - tracer index for cloud condensate (or liquid water) - index - ntcw - integer - - in - F - MODULE_GFS_suite_interstitial_3 SCHEME_GFS_suite_interstitial_3 SUBROUTINE_GFS_suite_interstitial_3_run - - - index_for_ice_cloud_condensate - tracer index for ice water - index - ntiw - integer - - in - F - MODULE_GFS_suite_interstitial_3 SCHEME_GFS_suite_interstitial_3 SUBROUTINE_GFS_suite_interstitial_3_run - - - index_for_cloud_amount - tracer index for cloud amount integer - index - ntclamt - integer - - in - F - MODULE_GFS_suite_interstitial_3 SCHEME_GFS_suite_interstitial_3 SUBROUTINE_GFS_suite_interstitial_3_run - - - index_for_rain_water - tracer index for rain water - index - ntrw - integer - - in - F - MODULE_GFS_suite_interstitial_3 SCHEME_GFS_suite_interstitial_3 SUBROUTINE_GFS_suite_interstitial_3_run - - - index_for_snow_water - tracer index for snow water - index - ntsw - integer - - in - F - MODULE_GFS_suite_interstitial_3 SCHEME_GFS_suite_interstitial_3 SUBROUTINE_GFS_suite_interstitial_3_run - - - index_for_rain_number_concentration - tracer index for rain number concentration - index - ntrnc - integer - - in - F - MODULE_GFS_suite_interstitial_3 SCHEME_GFS_suite_interstitial_3 SUBROUTINE_GFS_suite_interstitial_3_run - - - index_for_snow_number_concentration - tracer index for snow number concentration - index - ntsnc - integer - - in - F - MODULE_GFS_suite_interstitial_3 SCHEME_GFS_suite_interstitial_3 SUBROUTINE_GFS_suite_interstitial_3_run - - - index_for_graupel - tracer index for graupel - index - ntgl - integer - - in - F - MODULE_GFS_suite_interstitial_3 SCHEME_GFS_suite_interstitial_3 SUBROUTINE_GFS_suite_interstitial_3_run - - - index_for_graupel_number_concentration - tracer index for graupel number concentration - index - ntgnc - integer - - in - F - MODULE_GFS_suite_interstitial_3 SCHEME_GFS_suite_interstitial_3 SUBROUTINE_GFS_suite_interstitial_3_run - - - latitude - latitude - radians - xlat - real - (:) - in - F - MODULE_GFS_suite_interstitial_3 SCHEME_GFS_suite_interstitial_3 SUBROUTINE_GFS_suite_interstitial_3_run - - - tracer_concentration_updated_by_physics - tracer concentration updated by physics - kg kg-1 - gq0 - real - (:,:,:) - in - F - MODULE_GFS_suite_interstitial_3 SCHEME_GFS_suite_interstitial_3 SUBROUTINE_GFS_suite_interstitial_3_run - - - flag_for_microphysics_scheme - choice of microphysics scheme - flag - imp_physics - integer - - in - F - MODULE_GFS_suite_interstitial_3 SCHEME_GFS_suite_interstitial_3 SUBROUTINE_GFS_suite_interstitial_3_run - - - flag_for_morrison_gettelman_microphysics_scheme - choice of Morrison-Gettelman rmicrophysics scheme - flag - imp_physics_mg - integer - - in - F - MODULE_GFS_suite_interstitial_3 SCHEME_GFS_suite_interstitial_3 SUBROUTINE_GFS_suite_interstitial_3_run - - - flag_for_zhao_carr_microphysics_scheme - choice of Zhao-Carr microphysics scheme - flag - imp_physics_zhao_carr - integer - - in - F - MODULE_GFS_suite_interstitial_3 SCHEME_GFS_suite_interstitial_3 SUBROUTINE_GFS_suite_interstitial_3_run - - - flag_for_zhao_carr_pdf_microphysics_scheme - choice of Zhao-Carr microphysics scheme with PDF clouds - flag - imp_physics_zhao_carr_pdf - integer - - in - F - MODULE_GFS_suite_interstitial_3 SCHEME_GFS_suite_interstitial_3 SUBROUTINE_GFS_suite_interstitial_3_run - - - flag_for_gfdl_microphysics_scheme - choice of GFDL microphysics scheme - flag - imp_physics_gfdl - integer - - in - F - MODULE_GFS_suite_interstitial_3 SCHEME_GFS_suite_interstitial_3 SUBROUTINE_GFS_suite_interstitial_3_run - - - flag_for_thompson_microphysics_scheme - choice of Thompson microphysics scheme - flag - imp_physics_thompson - integer - - in - F - MODULE_GFS_suite_interstitial_3 SCHEME_GFS_suite_interstitial_3 SUBROUTINE_GFS_suite_interstitial_3_run - - - flag_for_wsm6_microphysics_scheme - choice of WSM6 microphysics scheme - flag - imp_physics_wsm6 - integer - - in - F - MODULE_GFS_suite_interstitial_3 SCHEME_GFS_suite_interstitial_3 SUBROUTINE_GFS_suite_interstitial_3_run - - - air_pressure_at_interface - air pressure at model layer interfaces - Pa - prsi - real - (:,:) - in - F - MODULE_GFS_suite_interstitial_3 SCHEME_GFS_suite_interstitial_3 SUBROUTINE_GFS_suite_interstitial_3_run - - - air_pressure - mean layer pressure - Pa - prsl - real - (:,:) - in - F - MODULE_GFS_suite_interstitial_3 SCHEME_GFS_suite_interstitial_3 SUBROUTINE_GFS_suite_interstitial_3_run - - - dimensionless_exner_function_at_model_layers - dimensionless Exner function at model layer centers - none - prslk - real - (:,:) - in - F - MODULE_GFS_suite_interstitial_3 SCHEME_GFS_suite_interstitial_3 SUBROUTINE_GFS_suite_interstitial_3_run - - - critical_relative_humidity_at_surface - critical relative humidity at the surface - frac - rhcbot - real - - in - F - MODULE_GFS_suite_interstitial_3 SCHEME_GFS_suite_interstitial_3 SUBROUTINE_GFS_suite_interstitial_3_run - - - critical_relative_humidity_at_PBL_top - critical relative humidity at the PBL top - frac - rhcpbl - real - - in - F - MODULE_GFS_suite_interstitial_3 SCHEME_GFS_suite_interstitial_3 SUBROUTINE_GFS_suite_interstitial_3_run - - - critical_relative_humidity_at_top_of_atmosphere - critical relative humidity at the top of atmosphere - frac - rhctop - real - - in - F - MODULE_GFS_suite_interstitial_3 SCHEME_GFS_suite_interstitial_3 SUBROUTINE_GFS_suite_interstitial_3_run - - - maximum_critical_relative_humidity - maximum critical relative humidity - frac - rhcmax - real - - in - F - MODULE_GFS_suite_interstitial_3 SCHEME_GFS_suite_interstitial_3 SUBROUTINE_GFS_suite_interstitial_3_run - - - sea_land_ice_mask - sea/land/ice mask (=0/1/2) - flag - islmsk - integer - (:) - in - F - MODULE_GFS_suite_interstitial_3 SCHEME_GFS_suite_interstitial_3 SUBROUTINE_GFS_suite_interstitial_3_run - - - grid_size_related_coefficient_used_in_scale-sensitive_schemes - grid size related coefficient used in scale-sensitive schemes - none - work1 - real - (:) - in - F - MODULE_GFS_suite_interstitial_3 SCHEME_GFS_suite_interstitial_3 SUBROUTINE_GFS_suite_interstitial_3_run - - - grid_size_related_coefficient_used_in_scale-sensitive_schemes_complement - complement to work1 - none - work2 - real - (:) - in - F - MODULE_GFS_suite_interstitial_3 SCHEME_GFS_suite_interstitial_3 SUBROUTINE_GFS_suite_interstitial_3_run - - - vertical_index_at_top_of_atmosphere_boundary_layer - vertical index at top atmospheric boundary layer - index - kpbl - integer - (:) - in - F - MODULE_GFS_suite_interstitial_3 SCHEME_GFS_suite_interstitial_3 SUBROUTINE_GFS_suite_interstitial_3_run - - - convective_transportable_tracers - array to contain cloud water and other convective trans. tracers - kg kg-1 - clw - real - (:,:,:) - inout - F - MODULE_GFS_suite_interstitial_3 SCHEME_GFS_suite_interstitial_3 SUBROUTINE_GFS_suite_interstitial_3_run - - - critical_relative_humidity - critical relative humidity - frac - rhc - real - (:,:) - inout - F - MODULE_GFS_suite_interstitial_3 SCHEME_GFS_suite_interstitial_3 SUBROUTINE_GFS_suite_interstitial_3_run - - - cloud_condensed_water_mixing_ratio_save - moist (dry+vapor, no condensates) mixing ratio of cloud water (condensate) before entering a physics scheme - kg kg-1 - save_qc - real - (:,:) - inout - F - MODULE_GFS_suite_interstitial_3 SCHEME_GFS_suite_interstitial_3 SUBROUTINE_GFS_suite_interstitial_3_run - - - ice_water_mixing_ratio_save - cloud ice water mixing ratio before entering a physics scheme - kg kg-1 - save_qi - real - (:,:) - inout - F - MODULE_GFS_suite_interstitial_3 SCHEME_GFS_suite_interstitial_3 SUBROUTINE_GFS_suite_interstitial_3_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_GFS_suite_interstitial_3 SCHEME_GFS_suite_interstitial_3 SUBROUTINE_GFS_suite_interstitial_3_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_GFS_suite_interstitial_3 SCHEME_GFS_suite_interstitial_3 SUBROUTINE_GFS_suite_interstitial_3_run - - - - - diff --git a/physics/GFS_suite_interstitial_4.xml b/physics/GFS_suite_interstitial_4.xml deleted file mode 100644 index 55f20f091..000000000 --- a/physics/GFS_suite_interstitial_4.xml +++ /dev/null @@ -1,359 +0,0 @@ - - - - - - horizontal_loop_extent - horizontal loop extent - count - im - integer - - in - F - MODULE_GFS_suite_interstitial_4 SCHEME_GFS_suite_interstitial_4 SUBROUTINE_GFS_suite_interstitial_4_run - - - vertical_dimension - vertical layer dimension - count - levs - integer - - in - F - MODULE_GFS_suite_interstitial_4 SCHEME_GFS_suite_interstitial_4 SUBROUTINE_GFS_suite_interstitial_4_run - - - flag_for_aerosol_physics - flag for aerosol physics - flag - ltaerosol - logical - - in - F - MODULE_GFS_suite_interstitial_4 SCHEME_GFS_suite_interstitial_4 SUBROUTINE_GFS_suite_interstitial_4_run - - - flag_gocart - flag for 3d diagnostic fields for gocart 1 - flag - lgocart - logical - - in - F - MODULE_GFS_suite_interstitial_4 SCHEME_GFS_suite_interstitial_4 SUBROUTINE_GFS_suite_interstitial_4_run - - - number_of_total_tracers - total number of tracers - count - tracers_total - integer - - in - F - MODULE_GFS_suite_interstitial_4 SCHEME_GFS_suite_interstitial_4 SUBROUTINE_GFS_suite_interstitial_4_run - - - number_of_tracers - number of tracers - count - ntrac - integer - - in - F - MODULE_GFS_suite_interstitial_4 SCHEME_GFS_suite_interstitial_4 SUBROUTINE_GFS_suite_interstitial_4_run - - - index_for_liquid_cloud_condensate - tracer index for cloud condensate (or liquid water) - index - ntcw - integer - - in - F - MODULE_GFS_suite_interstitial_4 SCHEME_GFS_suite_interstitial_4 SUBROUTINE_GFS_suite_interstitial_4_run - - - index_for_ice_cloud_condensate - tracer index for ice water - index - ntiw - integer - - in - F - MODULE_GFS_suite_interstitial_4 SCHEME_GFS_suite_interstitial_4 SUBROUTINE_GFS_suite_interstitial_4_run - - - index_for_cloud_amount - tracer index for cloud amount integer - index - ntclamt - integer - - in - F - MODULE_GFS_suite_interstitial_4 SCHEME_GFS_suite_interstitial_4 SUBROUTINE_GFS_suite_interstitial_4_run - - - index_for_rain_water - tracer index for rain water - index - ntrw - integer - - in - F - MODULE_GFS_suite_interstitial_4 SCHEME_GFS_suite_interstitial_4 SUBROUTINE_GFS_suite_interstitial_4_run - - - index_for_snow_water - tracer index for snow water - index - ntsw - integer - - in - F - MODULE_GFS_suite_interstitial_4 SCHEME_GFS_suite_interstitial_4 SUBROUTINE_GFS_suite_interstitial_4_run - - - index_for_rain_number_concentration - tracer index for rain number concentration - index - ntrnc - integer - - in - F - MODULE_GFS_suite_interstitial_4 SCHEME_GFS_suite_interstitial_4 SUBROUTINE_GFS_suite_interstitial_4_run - - - index_for_snow_number_concentration - tracer index for snow number concentration - index - ntsnc - integer - - in - F - MODULE_GFS_suite_interstitial_4 SCHEME_GFS_suite_interstitial_4 SUBROUTINE_GFS_suite_interstitial_4_run - - - index_for_graupel - tracer index for graupel - index - ntgl - integer - - in - F - MODULE_GFS_suite_interstitial_4 SCHEME_GFS_suite_interstitial_4 SUBROUTINE_GFS_suite_interstitial_4_run - - - index_for_graupel_number_concentration - tracer index for graupel number concentration - index - ntgnc - integer - - in - F - MODULE_GFS_suite_interstitial_4 SCHEME_GFS_suite_interstitial_4 SUBROUTINE_GFS_suite_interstitial_4_run - - - index_for_liquid_cloud_number_concentration - tracer index for liquid number concentration - index - ntlnc - integer - - in - F - MODULE_GFS_suite_interstitial_4 SCHEME_GFS_suite_interstitial_4 SUBROUTINE_GFS_suite_interstitial_4_run - - - index_for_ice_cloud_number_concentration - tracer index for ice number concentration - index - ntinc - integer - - in - F - MODULE_GFS_suite_interstitial_4 SCHEME_GFS_suite_interstitial_4 SUBROUTINE_GFS_suite_interstitial_4_run - - - number_of_tracers_for_convective_transport - number of tracers for convective transport - count - nn - integer - - in - F - MODULE_GFS_suite_interstitial_4 SCHEME_GFS_suite_interstitial_4 SUBROUTINE_GFS_suite_interstitial_4_run - - - flag_for_microphysics_scheme - choice of microphysics scheme - flag - imp_physics - integer - - in - F - MODULE_GFS_suite_interstitial_4 SCHEME_GFS_suite_interstitial_4 SUBROUTINE_GFS_suite_interstitial_4_run - - - flag_for_gfdl_microphysics_scheme - choice of GFDL microphysics scheme - flag - imp_physics_gfdl - integer - - in - F - MODULE_GFS_suite_interstitial_4 SCHEME_GFS_suite_interstitial_4 SUBROUTINE_GFS_suite_interstitial_4_run - - - flag_for_thompson_microphysics_scheme - choice of Thompson microphysics scheme - flag - imp_physics_thompson - integer - - in - F - MODULE_GFS_suite_interstitial_4 SCHEME_GFS_suite_interstitial_4 SUBROUTINE_GFS_suite_interstitial_4_run - - - flag_for_zhao_carr_microphysics_scheme - choice of Zhao-Carr microphysics scheme - flag - imp_physics_zhao_carr - integer - - in - F - MODULE_GFS_suite_interstitial_4 SCHEME_GFS_suite_interstitial_4 SUBROUTINE_GFS_suite_interstitial_4_run - - - flag_for_zhao_carr_pdf_microphysics_scheme - choice of Zhao-Carr microphysics scheme with PDF clouds - flag - imp_physics_zhao_carr_pdf - integer - - in - F - MODULE_GFS_suite_interstitial_4 SCHEME_GFS_suite_interstitial_4 SUBROUTINE_GFS_suite_interstitial_4_run - - - time_step_for_dynamics - dynamics timestep - s - dtf - real - - in - F - MODULE_GFS_suite_interstitial_4 SCHEME_GFS_suite_interstitial_4 SUBROUTINE_GFS_suite_interstitial_4_run - - - cloud_condensed_water_mixing_ratio_save - moist (dry+vapor, no condensates) mixing ratio of cloud water (condensate) before entering a physics scheme - kg kg-1 - save_qc - real - (:,:) - in - F - MODULE_GFS_suite_interstitial_4 SCHEME_GFS_suite_interstitial_4 SUBROUTINE_GFS_suite_interstitial_4_run - - - ice_water_mixing_ratio_save - cloud ice water mixing ratio before entering a physics scheme - kg kg-1 - save_qi - real - (:,:) - in - F - MODULE_GFS_suite_interstitial_4 SCHEME_GFS_suite_interstitial_4 SUBROUTINE_GFS_suite_interstitial_4_run - - - pi - ratio of a circle's circumference to its diameter - radians - con_pi - real - - in - F - MODULE_GFS_suite_interstitial_4 SCHEME_GFS_suite_interstitial_4 SUBROUTINE_GFS_suite_interstitial_4_run - - - tracer_concentration_updated_by_physics - tracer concentration updated by physics - kg kg-1 - gq0 - real - (:,:,:) - inout - F - MODULE_GFS_suite_interstitial_4 SCHEME_GFS_suite_interstitial_4 SUBROUTINE_GFS_suite_interstitial_4_run - - - convective_transportable_tracers - array to contain cloud water and other convective trans. tracers - kg kg-1 - clw - real - (:,:,:) - inout - F - MODULE_GFS_suite_interstitial_4 SCHEME_GFS_suite_interstitial_4 SUBROUTINE_GFS_suite_interstitial_4_run - - - instantaneous_water_vapor_specific_humidity_tendency_due_to_convection - instantaneous moisture tendency due to convection - kg kg-1 s-1 - dqdti - real - (:,:) - inout - F - MODULE_GFS_suite_interstitial_4 SCHEME_GFS_suite_interstitial_4 SUBROUTINE_GFS_suite_interstitial_4_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_GFS_suite_interstitial_4 SCHEME_GFS_suite_interstitial_4 SUBROUTINE_GFS_suite_interstitial_4_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_GFS_suite_interstitial_4 SCHEME_GFS_suite_interstitial_4 SUBROUTINE_GFS_suite_interstitial_4_run - - - - diff --git a/physics/GFS_suite_interstitial_phys_reset.xml b/physics/GFS_suite_interstitial_phys_reset.xml deleted file mode 100644 index d4b859976..000000000 --- a/physics/GFS_suite_interstitial_phys_reset.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - GFS_interstitial_type_instance - derived type GFS_interstitial_type in FV3 - DDT - Interstitial - GFS_interstitial_type - - inout - F - MODULE_GFS_suite_interstitial_phys_reset SCHEME_GFS_suite_interstitial_phys_reset SUBROUTINE_GFS_suite_interstitial_phys_reset_run - - - GFS_control_type_instance - Fortran DDT containing FV3-GFS model control parameters - DDT - Model - GFS_control_type - - in - F - MODULE_GFS_suite_interstitial_phys_reset SCHEME_GFS_suite_interstitial_phys_reset SUBROUTINE_GFS_suite_interstitial_phys_reset_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_GFS_suite_interstitial_phys_reset SCHEME_GFS_suite_interstitial_phys_reset SUBROUTINE_GFS_suite_interstitial_phys_reset_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_GFS_suite_interstitial_phys_reset SCHEME_GFS_suite_interstitial_phys_reset SUBROUTINE_GFS_suite_interstitial_phys_reset_run - - - - diff --git a/physics/GFS_suite_interstitial_rad_reset.xml b/physics/GFS_suite_interstitial_rad_reset.xml deleted file mode 100644 index d4c661151..000000000 --- a/physics/GFS_suite_interstitial_rad_reset.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - GFS_interstitial_type_instance - derived type GFS_interstitial_type in FV3 - DDT - Interstitial - GFS_interstitial_type - - inout - F - MODULE_GFS_suite_interstitial_rad_reset SCHEME_GFS_suite_interstitial_rad_reset SUBROUTINE_GFS_suite_interstitial_rad_reset_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_GFS_suite_interstitial_rad_reset SCHEME_GFS_suite_interstitial_rad_reset SUBROUTINE_GFS_suite_interstitial_rad_reset_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_GFS_suite_interstitial_rad_reset SCHEME_GFS_suite_interstitial_rad_reset SUBROUTINE_GFS_suite_interstitial_rad_reset_run - - - - diff --git a/physics/GFS_suite_stateout_reset.xml b/physics/GFS_suite_stateout_reset.xml deleted file mode 100644 index 000c35641..000000000 --- a/physics/GFS_suite_stateout_reset.xml +++ /dev/null @@ -1,150 +0,0 @@ - - - - - - - horizontal_loop_extent - horizontal loop extent - count - im - integer - - in - F - MODULE_GFS_suite_stateout_reset SCHEME_GFS_suite_stateout_reset SUBROUTINE_GFS_suite_stateout_reset_run - - - vertical_dimension - vertical layer dimension - count - levs - integer - - in - F - MODULE_GFS_suite_stateout_reset SCHEME_GFS_suite_stateout_reset SUBROUTINE_GFS_suite_stateout_reset_run - - - number_of_tracers - number of tracers - count - ntrac - integer - - in - F - MODULE_GFS_suite_stateout_reset SCHEME_GFS_suite_stateout_reset SUBROUTINE_GFS_suite_stateout_reset_run - - - air_temperature - model layer mean temperature - K - tgrs - real - (:,:) - in - F - MODULE_GFS_suite_stateout_reset SCHEME_GFS_suite_stateout_reset SUBROUTINE_GFS_suite_stateout_reset_run - - - x_wind - zonal wind - m s-1 - ugrs - real - (:,:) - in - F - MODULE_GFS_suite_stateout_reset SCHEME_GFS_suite_stateout_reset SUBROUTINE_GFS_suite_stateout_reset_run - - - y_wind - meridional wind - m s-1 - vgrs - real - (:,:) - in - F - MODULE_GFS_suite_stateout_reset SCHEME_GFS_suite_stateout_reset SUBROUTINE_GFS_suite_stateout_reset_run - - - tracer_concentration - model layer mean tracer concentration - kg kg-1 - qgrs - real - (:,:,:) - in - F - MODULE_GFS_suite_stateout_reset SCHEME_GFS_suite_stateout_reset SUBROUTINE_GFS_suite_stateout_reset_run - - - air_temperature_updated_by_physics - temperature updated by physics - K - gt0 - real - (:,:) - out - F - MODULE_GFS_suite_stateout_reset SCHEME_GFS_suite_stateout_reset SUBROUTINE_GFS_suite_stateout_reset_run - - - x_wind_updated_by_physics - zonal wind updated by physics - m s-1 - gu0 - real - (:,:) - out - F - MODULE_GFS_suite_stateout_reset SCHEME_GFS_suite_stateout_reset SUBROUTINE_GFS_suite_stateout_reset_run - - - y_wind_updated_by_physics - meridional wind updated by physics - m s-1 - gv0 - real - (:,:) - out - F - MODULE_GFS_suite_stateout_reset SCHEME_GFS_suite_stateout_reset SUBROUTINE_GFS_suite_stateout_reset_run - - - tracer_concentration_updated_by_physics - tracer concentration updated by physics - kg kg-1 - gq0 - real - (:,:,:) - out - F - MODULE_GFS_suite_stateout_reset SCHEME_GFS_suite_stateout_reset SUBROUTINE_GFS_suite_stateout_reset_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_GFS_suite_stateout_reset SCHEME_GFS_suite_stateout_reset SUBROUTINE_GFS_suite_stateout_reset_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_GFS_suite_stateout_reset SCHEME_GFS_suite_stateout_reset SUBROUTINE_GFS_suite_stateout_reset_run - - - diff --git a/physics/GFS_suite_stateout_update.xml b/physics/GFS_suite_stateout_update.xml deleted file mode 100644 index 2c049e822..000000000 --- a/physics/GFS_suite_stateout_update.xml +++ /dev/null @@ -1,205 +0,0 @@ - - - - - - horizontal_loop_extent - horizontal loop extent - count - im - integer - - in - F - MODULE_GFS_suite_stateout_update SCHEME_GFS_suite_stateout_update SUBROUTINE_GFS_suite_stateout_update_run - - - vertical_dimension - vertical layer dimension - count - levs - integer - - in - F - MODULE_GFS_suite_stateout_update SCHEME_GFS_suite_stateout_update SUBROUTINE_GFS_suite_stateout_update_run - - - number_of_tracers - number of tracers - count - ntrac - integer - - in - F - MODULE_GFS_suite_stateout_update SCHEME_GFS_suite_stateout_update SUBROUTINE_GFS_suite_stateout_update_run - - - time_step_for_physics - physics timestep - s - dtp - real - - in - F - MODULE_GFS_suite_stateout_update SCHEME_GFS_suite_stateout_update SUBROUTINE_GFS_suite_stateout_update_run - - - air_temperature - model layer mean temperature - K - tgrs - real - (:,:) - in - F - MODULE_GFS_suite_stateout_update SCHEME_GFS_suite_stateout_update SUBROUTINE_GFS_suite_stateout_update_run - - - x_wind - zonal wind - m s-1 - ugrs - real - (:,:) - in - F - MODULE_GFS_suite_stateout_update SCHEME_GFS_suite_stateout_update SUBROUTINE_GFS_suite_stateout_update_run - - - y_wind - meridional wind - m s-1 - vgrs - real - (:,:) - in - F - MODULE_GFS_suite_stateout_update SCHEME_GFS_suite_stateout_update SUBROUTINE_GFS_suite_stateout_update_run - - - tracer_concentration - model layer mean tracer concentration - kg kg-1 - qgrs - real - (:,:,:) - in - F - MODULE_GFS_suite_stateout_update SCHEME_GFS_suite_stateout_update SUBROUTINE_GFS_suite_stateout_update_run - - - tendency_of_x_wind_due_to_model_physics - updated tendency of the x wind - m s-2 - dudt - real - (:,:) - in - F - MODULE_GFS_suite_stateout_update SCHEME_GFS_suite_stateout_update SUBROUTINE_GFS_suite_stateout_update_run - - - tendency_of_y_wind_due_to_model_physics - updated tendency of the y wind - m s-2 - dvdt - real - (:,:) - in - F - MODULE_GFS_suite_stateout_update SCHEME_GFS_suite_stateout_update SUBROUTINE_GFS_suite_stateout_update_run - - - tendency_of_air_temperature_due_to_model_physics - updated tendency of the temperature - K s-1 - dtdt - real - (:,:) - in - F - MODULE_GFS_suite_stateout_update SCHEME_GFS_suite_stateout_update SUBROUTINE_GFS_suite_stateout_update_run - - - tendency_of_tracers_due_to_model_physics - updated tendency of the tracers - kg kg-1 s-1 - dqdt - real - (:,:,:) - in - F - MODULE_GFS_suite_stateout_update SCHEME_GFS_suite_stateout_update SUBROUTINE_GFS_suite_stateout_update_run - - - air_temperature_updated_by_physics - temperature updated by physics - K - gt0 - real - (:,:) - out - F - MODULE_GFS_suite_stateout_update SCHEME_GFS_suite_stateout_update SUBROUTINE_GFS_suite_stateout_update_run - - - x_wind_updated_by_physics - zonal wind updated by physics - m s-1 - gu0 - real - (:,:) - out - F - MODULE_GFS_suite_stateout_update SCHEME_GFS_suite_stateout_update SUBROUTINE_GFS_suite_stateout_update_run - - - y_wind_updated_by_physics - meridional wind updated by physics - m s-1 - gv0 - real - (:,:) - out - F - MODULE_GFS_suite_stateout_update SCHEME_GFS_suite_stateout_update SUBROUTINE_GFS_suite_stateout_update_run - - - tracer_concentration_updated_by_physics - tracer concentration updated by physics - kg kg-1 - gq0 - real - (:,:,:) - out - F - MODULE_GFS_suite_stateout_update SCHEME_GFS_suite_stateout_update SUBROUTINE_GFS_suite_stateout_update_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_GFS_suite_stateout_update SCHEME_GFS_suite_stateout_update SUBROUTINE_GFS_suite_stateout_update_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_GFS_suite_stateout_update SCHEME_GFS_suite_stateout_update SUBROUTINE_GFS_suite_stateout_update_run - - - - diff --git a/physics/GFS_surface_generic_post.xml b/physics/GFS_surface_generic_post.xml deleted file mode 100644 index e71131bcb..000000000 --- a/physics/GFS_surface_generic_post.xml +++ /dev/null @@ -1,942 +0,0 @@ - - - - - horizontal_loop_extent - horizontal loop extent - count - im - integer - - in - F - MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run - - - flag_for_flux_coupling - flag controlling cplflx collection (default off) - flag - cplflx - logical - - in - F - MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run - - - flag_diagnostics - logical flag for storing diagnostics - flag - lssav - logical - - in - F - MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run - - - sea_land_ice_mask - landmask: sea/land/ice=0/1/2 - flag - islmsk - integer - (:) - in - F - MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run - - - time_step_for_dynamics - dynamics timestep - s - dtf - real - - in - F - MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run - - - surface_upward_potential_latent_heat_flux - surface upward potential latent heat flux - W m-2 - ep1d - real - (:) - in - F - MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run - - - upward_heat_flux_in_soil - upward soil heat flux - W m-2 - gflx - real - (:) - in - F - MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run - - - air_temperature_at_lowest_model_layer - mean temperature at lowest model layer - K - tgrs_1 - real - (:) - in - F - MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run - - - water_vapor_specific_humidity_at_lowest_model_layer - specific humidity at lowest model layer - kg kg-1 - qgrs_1 - real - (:) - in - F - MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run - - - x_wind_at_lowest_model_layer - zonal wind at lowest model layer - m s-1 - ugrs_1 - real - (:) - in - F - MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run - - - y_wind_at_lowest_model_layer - meridional wind at lowest model layer - m s-1 - vgrs_1 - real - (:) - in - F - MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run - - - surface_downwelling_longwave_flux - surface downwelling longwave flux at current time - W m-2 - adjsfcdlw - real - (:) - in - F - MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run - - - surface_downwelling_shortwave_flux - surface downwelling shortwave flux at current time - W m-2 - adjsfcdsw - real - (:) - in - F - MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run - - - surface_downwelling_direct_near_infrared_shortwave_flux - surface downwelling beam near-infrared shortwave flux at current time - W m-2 - adjnirbmd - real - (:) - in - F - MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run - - - surface_downwelling_diffuse_near_infrared_shortwave_flux - surface downwelling diffuse near-infrared shortwave flux at current time - W m-2 - adjnirdfd - real - (:) - in - F - MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run - - - surface_downwelling_direct_ultraviolet_and_visible_shortwave_flux - surface downwelling beam ultraviolet plus visible shortwave flux at current time - W m-2 - adjvisbmd - real - (:) - in - F - MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run - - - surface_downwelling_diffuse_ultraviolet_and_visible_shortwave_flux - surface downwelling diffuse ultraviolet plus visible shortwave flux at current time - W m-2 - adjvisdfd - real - (:) - in - F - MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run - - - surface_upwelling_longwave_flux - surface upwelling longwave flux at current time - W m-2 - adjsfculw - real - (:) - in - F - MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run - - - surface_upwelling_direct_near_infrared_shortwave_flux - surface upwelling beam near-infrared shortwave flux at current time - W m-2 - adjnirbmu - real - (:) - in - F - MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run - - - surface_upwelling_diffuse_near_infrared_shortwave_flux - surface upwelling diffuse near-infrared shortwave flux at current time - W m-2 - adjnirdfu - real - (:) - in - F - MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run - - - surface_upwelling_direct_ultraviolet_and_visible_shortwave_flux - surface upwelling beam ultraviolet plus visible shortwave flux at current time - W m-2 - adjvisbmu - real - (:) - in - F - MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run - - - surface_upwelling_diffuse_ultraviolet_and_visible_shortwave_flux - surface upwelling diffuse ultraviolet plus visible shortwave flux at current time - W m-2 - adjvisdfu - real - (:) - in - F - MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run - - - temperature_at_2m - 2 meter temperature - K - t2m - real - (:) - in - F - MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run - - - specific_humidity_at_2m - 2 meter specific humidity - kg kg-1 - q2m - real - (:) - in - F - MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run - - - x_wind_at_10m - 10 meter u wind speed - m s-1 - u10m - real - (:) - in - F - MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run - - - y_wind_at_10m - 10 meter v wind speed - m s-1 - v10m - real - (:) - in - F - MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run - - - surface_skin_temperature - surface skin temperature - K - tsfc - real - (:) - in - F - MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run - - - surface_air_pressure - surface pressure - Pa - pgr - real - (:) - in - F - MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run - - - instantaneous_cosine_of_zenith_angle - cosine of zenith angle at current time - none - xcosz - real - (:) - in - F - MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run - - - soil_upward_latent_heat_flux - soil upward latent heat flux - W m-2 - evbs - real - (:) - in - F - MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run - - - canopy_upward_latent_heat_flux - canopy upward latent heat flux - W m-2 - evcw - real - (:) - in - F - MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run - - - transpiration_flux - total plant transpiration rate - kg m-2 s-1 - trans - real - (:) - in - F - MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run - - - snow_deposition_sublimation_upward_latent_heat_flux - latent heat flux from snow depo/subl - W m-2 - sbsno - real - (:) - in - F - MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run - - - surface_snow_area_fraction - surface snow area fraction - frac - snowc - real - (:) - in - F - MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run - - - snow_freezing_rain_upward_latent_heat_flux - latent heat flux due to snow and frz rain - W m-2 - snohf - real - (:) - in - F - MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run - - - instantaneous_surface_potential_evaporation - instantaneous sfc potential evaporation - W m-2 - epi - real - (:) - inout - F - MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run - - - instantaneous_surface_ground_heat_flux - instantaneous sfc ground heat flux - W m-2 - gfluxi - real - (:) - inout - F - MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run - - - air_temperature_at_lowest_model_layer_for_diag - layer 1 temperature for diag - K - t1 - real - (:) - inout - F - MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run - - - water_vapor_specific_humidity_at_lowest_model_layer_for_diag - layer 1 specific humidity for diag - kg kg-1 - q1 - real - (:) - inout - F - MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run - - - x_wind_at_lowest_model_layer_for_diag - layer 1 x wind for diag - m s-1 - u1 - real - (:) - inout - F - MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run - - - y_wind_at_lowest_model_layer_for_diag - layer 1 y wind for diag - m s-1 - v1 - real - (:) - inout - F - MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run - - - instantaneous_surface_downwelling_longwave_flux_for_coupling - instantaneous sfc downward lw flux - W m-2 - dlwsfci_cpl - real - (:) - inout - F - MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run - - - instantaneous_surface_downwelling_shortwave_flux_for_coupling - instantaneous sfc downward sw flux - W m-2 - dswsfci_cpl - real - (:) - inout - F - MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run - - - cumulative_surface_downwelling_longwave_flux_for_coupling_multiplied_by_timestep - cumulative sfc downward lw flux mulitplied by timestep - W m-2 s - dlwsfc_cpl - real - (:) - inout - F - MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run - - - cumulative_surface_downwelling_shortwave_flux_for_coupling_multiplied_by_timestep - cumulative sfc downward sw flux multiplied by timestep - W m-2 s - dswsfc_cpl - real - (:) - inout - F - MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run - - - instantaneous_surface_downwelling_direct_near_infrared_shortwave_flux_for_coupling - instantaneous sfc nir beam downward sw flux - W m-2 - dnirbmi_cpl - real - (:) - inout - F - MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run - - - instantaneous_surface_downwelling_diffuse_near_infrared_shortwave_flux_for_coupling - instantaneous sfc nir diff downward sw flux - W m-2 - dnirdfi_cpl - real - (:) - inout - F - MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run - - - instantaneous_surface_downwelling_direct_ultraviolet_and_visible_shortwave_flux_for_coupling - instantaneous sfc uv+vis beam downward sw flux - W m-2 - dvisbmi_cpl - real - (:) - inout - F - MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run - - - instantaneous_surface_downwelling_diffuse_ultraviolet_and_visible_shortwave_flux_for_coupling - instantaneous sfc uv+vis diff downward sw flux - W m-2 - dvisdfi_cpl - real - (:) - inout - F - MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run - - - cumulative_surface_downwelling_direct_near_infrared_shortwave_flux_for_coupling_multiplied_by_timestep - cumulative sfc nir beam downward sw flux multiplied by timestep - W m-2 s - dnirbm_cpl - real - (:) - inout - F - MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run - - - cumulative_surface_downwelling_diffuse_near_infrared_shortwave_flux_for_coupling_multiplied_by_timestep - cumulative sfc nir diff downward sw flux multiplied by timestep - W m-2 s - dnirdf_cpl - real - (:) - inout - F - MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run - - - cumulative_surface_downwelling_direct_ultraviolet_and_visible_shortwave_flux_for_coupling_multiplied_by_timestep - cumulative sfc uv+vis beam dnwd sw flux multiplied by timestep - W m-2 s - dvisbm_cpl - real - (:) - inout - F - MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run - - - cumulative_surface_downwelling_diffuse_ultraviolet_and_visible_shortwave_flux_for_coupling_multiplied_by_timestep - cumulative sfc uv+vis diff dnwd sw flux multiplied by timestep - W m-2 s - dvisdf_cpl - real - (:) - inout - F - MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run - - - instantaneous_surface_net_downward_longwave_flux_for_coupling - instantaneous net sfc downward lw flux - W m-2 - nlwsfci_cpl - real - (:) - inout - F - MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run - - - cumulative_surface_net_downward_longwave_flux_for_coupling_multiplied_by_timestep - cumulative net downward lw flux multiplied by timestep - W m-2 s - nlwsfc_cpl - real - (:) - inout - F - MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run - - - instantaneous_temperature_at_2m_for_coupling - instantaneous T2m - K - t2mi_cpl - real - (:) - inout - F - MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run - - - instantaneous_specific_humidity_at_2m_for_coupling - instantaneous Q2m - kg kg-1 - q2mi_cpl - real - (:) - inout - F - MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run - - - instantaneous_x_wind_at_10m_for_coupling - instantaneous U10m - m s-1 - u10mi_cpl - real - (:) - inout - F - MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run - - - instantaneous_y_wind_at_10m_for_coupling - instantaneous V10m - m s-1 - v10mi_cpl - real - (:) - inout - F - MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run - - - instantaneous_surface_skin_temperature_for_coupling - instantaneous sfc temperature - K - tsfci_cpl - real - (:) - inout - F - MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run - - - instantaneous_surface_air_pressure_for_coupling - instantaneous sfc pressure - Pa - psurfi_cpl - real - (:) - inout - F - MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run - - - instantaneous_surface_net_downward_direct_near_infrared_shortwave_flux_for_coupling - instantaneous net nir beam sfc downward sw flux - W m-2 - nnirbmi_cpl - real - (:) - inout - F - MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run - - - instantaneous_surface_net_downward_diffuse_near_infrared_shortwave_flux_for_coupling - instantaneous net nir diff sfc downward sw flux - W m-2 - nnirdfi_cpl - real - (:) - inout - F - MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run - - - instantaneous_surface_net_downward_direct_ultraviolet_and_visible_shortwave_flux_for_coupling - instantaneous net uv+vis beam downward sw flux - W m-2 - nvisbmi_cpl - real - (:) - inout - F - MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run - - - instantaneous_surface_net_downward_diffuse_ultraviolet_and_visible_shortwave_flux_for_coupling - instantaneous net uv+vis diff downward sw flux - W m-2 - nvisdfi_cpl - real - (:) - inout - F - MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run - - - instantaneous_surface_net_downward_shortwave_flux_for_coupling - instantaneous net sfc downward sw flux - W m-2 - nswsfci_cpl - real - (:) - inout - F - MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run - - - cumulative_surface_net_downward_shortwave_flux_for_coupling_multiplied_by_timestep - cumulative net downward sw flux multiplied by timestep - W m-2 s - nswsfc_cpl - real - (:) - inout - F - MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run - - - cumulative_surface_net_downward_direct_near_infrared_shortwave_flux_for_coupling_multiplied_by_timestep - cumulative net nir beam downward sw flux multiplied by timestep - W m-2 s - nnirbm_cpl - real - (:) - inout - F - MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run - - - cumulative_surface_net_downward_diffuse_near_infrared_shortwave_flux_for_coupling_multiplied_by_timestep - cumulative net nir diff downward sw flux multiplied by timestep - W m-2 s - nnirdf_cpl - real - (:) - inout - F - MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run - - - cumulative_surface_net_downward_direct_ultraviolet_and_visible_shortwave_flux_for_coupling_multiplied_by_timestep - cumulative net uv+vis beam downward sw rad flux multiplied by timestep - W m-2 s - nvisbm_cpl - real - (:) - inout - F - MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run - - - cumulative_surface_net_downward_diffuse_ultraviolet_and_visible_shortwave_flux_for_coupling_multiplied_by_timestep - cumulative net uv+vis diff downward sw rad flux multiplied by timestep - W m-2 s - nvisdf_cpl - real - (:) - inout - F - MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run - - - cumulative_surface_ground_heat_flux_multiplied_by_timestep - cumulative groud conductive heat flux multiplied by timestep - W m-2 s - gflux - real - (:) - inout - F - MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run - - - cumulative_soil_upward_latent_heat_flux_multiplied_by_timestep - cumulative soil upward latent heat flux multiplied by timestep - W m-2 s - evbsa - real - (:) - inout - F - MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run - - - cumulative_canopy_upward_latent_heat_flu_multiplied_by_timestep - cumulative canopy upward latent heat flux multiplied by timestep - W m-2 s - evcwa - real - (:) - inout - F - MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run - - - cumulative_transpiration_flux_multiplied_by_timestep - cumulative total plant transpiration rate multiplied by timestep - kg m-2 - transa - real - (:) - inout - F - MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run - - - cumulative_snow_deposition_sublimation_upward_latent_heat_flux_multiplied_by_timestep - cumulative latent heat flux from snow depo/subl multiplied by timestep - W m-2 s - sbsnoa - real - (:) - inout - F - MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run - - - cumulative_surface_snow_area_fraction_multiplied_by_timestep - cumulative surface snow area fraction multiplied by timestep - s - snowca - real - (:) - inout - F - MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run - - - cumulative_snow_freezing_rain_upward_latent_heat_flux_multiplied_by_timestep - cumulative latent heat flux due to snow and frz rain multiplied by timestep - W m-2 s - snohfa - real - (:) - inout - F - MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run - - - cumulative_surface_upward_potential_latent_heat_flux_multiplied_by_timestep - cumulative surface upward potential latent heat flux multiplied by timestep - W m-2 s - ep - real - (:) - inout - F - MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run - - - total_runoff - total water runoff - kg m-2 - runoff - real - (:) - inout - F - MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run - - - surface_runoff - surface water runoff (from lsm) - kg m-2 - srunoff - real - (:) - inout - F - MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run - - - surface_runoff_flux - surface runoff flux - g m-2 s-1 - runof - real - (:) - in - F - MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run - - - subsurface_runoff_flux - subsurface runoff flux - g m-2 s-1 - drain - real - (:) - in - F - MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_GFS_surface_generic_post SCHEME_GFS_surface_generic_post SUBROUTINE_GFS_surface_generic_post_run - - - - - diff --git a/physics/GFS_surface_generic_pre.xml b/physics/GFS_surface_generic_pre.xml deleted file mode 100644 index fa8a5f525..000000000 --- a/physics/GFS_surface_generic_pre.xml +++ /dev/null @@ -1,502 +0,0 @@ - - - - - - horizontal_loop_extent - horizontal loop extent - count - im - integer - - in - F - MODULE_GFS_surface_generic_pre SCHEME_GFS_surface_generic_pre SUBROUTINE_GFS_surface_generic_pre_run - - - vertical_dimension - number of vertical levels - count - levs - integer - - in - F - MODULE_GFS_surface_generic_pre SCHEME_GFS_surface_generic_pre SUBROUTINE_GFS_surface_generic_pre_run - - - vegetation_area_fraction - areal fractional cover of green vegetation - frac - vfrac - real - (:) - in - F - MODULE_GFS_surface_generic_pre SCHEME_GFS_surface_generic_pre SUBROUTINE_GFS_surface_generic_pre_run - - - sea_land_ice_mask - landmask: sea/land/ice=0/1/2 - flag - islmsk - integer - (:) - in - F - MODULE_GFS_surface_generic_pre SCHEME_GFS_surface_generic_pre SUBROUTINE_GFS_surface_generic_pre_run - - - soil_type_dataset_choice - soil type dataset choice - index - isot - integer - - in - F - MODULE_GFS_surface_generic_pre SCHEME_GFS_surface_generic_pre SUBROUTINE_GFS_surface_generic_pre_run - - - vegetation_type_dataset_choice - land use dataset choice - index - ivegsrc - integer - - in - F - MODULE_GFS_surface_generic_pre SCHEME_GFS_surface_generic_pre SUBROUTINE_GFS_surface_generic_pre_run - - - soil_type_classification_real - soil type for lsm - index - stype - real - (:) - in - F - MODULE_GFS_surface_generic_pre SCHEME_GFS_surface_generic_pre SUBROUTINE_GFS_surface_generic_pre_run - - - vegetation_type_classification_real - vegetation type for lsm - index - vtype - real - (:) - in - F - MODULE_GFS_surface_generic_pre SCHEME_GFS_surface_generic_pre SUBROUTINE_GFS_surface_generic_pre_run - - - surface_slope_classification_real - sfc slope type for lsm - index - slope - real - (:) - in - F - MODULE_GFS_surface_generic_pre SCHEME_GFS_surface_generic_pre SUBROUTINE_GFS_surface_generic_pre_run - - - dimensionless_exner_function_at_lowest_model_interface - dimensionless Exner function at lowest model interface - none - prsik_1 - real - (:) - in - F - MODULE_GFS_surface_generic_pre SCHEME_GFS_surface_generic_pre SUBROUTINE_GFS_surface_generic_pre_run - - - dimensionless_exner_function_at_lowest_model_layer - dimensionless Exner function at lowest model layer - none - prslk_1 - real - (:) - in - F - MODULE_GFS_surface_generic_pre SCHEME_GFS_surface_generic_pre SUBROUTINE_GFS_surface_generic_pre_run - - - surface_longwave_emissivity - surface lw emissivity in fraction - frac - semis - real - (:) - in - F - MODULE_GFS_surface_generic_pre SCHEME_GFS_surface_generic_pre SUBROUTINE_GFS_surface_generic_pre_run - - - surface_downwelling_longwave_flux - surface downwelling longwave flux at current time - W m-2 - adjsfcdlw - real - (:) - in - F - MODULE_GFS_surface_generic_pre SCHEME_GFS_surface_generic_pre SUBROUTINE_GFS_surface_generic_pre_run - - - surface_skin_temperature - surface skin temperature - K - tsfc - real - (:) - in - F - MODULE_GFS_surface_generic_pre SCHEME_GFS_surface_generic_pre SUBROUTINE_GFS_surface_generic_pre_run - - - geopotential - geopotential at model layer centers - m2 s-2 - phil - real - (:,:) - in - F - MODULE_GFS_surface_generic_pre SCHEME_GFS_surface_generic_pre SUBROUTINE_GFS_surface_generic_pre_run - - - gravitational_acceleration - gravitational acceleration - m s-2 - con_g - real - - in - F - MODULE_GFS_surface_generic_pre SCHEME_GFS_surface_generic_pre SUBROUTINE_GFS_surface_generic_pre_run - - - bounded_vegetation_area_fraction - areal fractional cover of green vegetation bounded on the bottom - frac - sigmaf - real - (:) - inout - F - MODULE_GFS_surface_generic_pre SCHEME_GFS_surface_generic_pre SUBROUTINE_GFS_surface_generic_pre_run - - - soil_type_classification - soil type at each grid cell - index - soiltyp - integer - (:) - inout - F - MODULE_GFS_surface_generic_pre SCHEME_GFS_surface_generic_pre SUBROUTINE_GFS_surface_generic_pre_run - - - vegetation_type_classification - vegetation type at each grid cell - index - vegtype - integer - (:) - inout - F - MODULE_GFS_surface_generic_pre SCHEME_GFS_surface_generic_pre SUBROUTINE_GFS_surface_generic_pre_run - - - surface_slope_classification - surface slope type at each grid cell - index - slopetyp - integer - (:) - inout - F - MODULE_GFS_surface_generic_pre SCHEME_GFS_surface_generic_pre SUBROUTINE_GFS_surface_generic_pre_run - - - ratio_of_exner_function_between_midlayer_and_interface_at_lowest_model_layer - Exner function ratio bt midlayer and interface at 1st layer - ratio - work3 - real - (:) - inout - F - MODULE_GFS_surface_generic_pre SCHEME_GFS_surface_generic_pre SUBROUTINE_GFS_surface_generic_pre_run - - - surface_downwelling_longwave_flux_absorbed_by_ground - total sky surface downward longwave flux absorbed by the ground - W m-2 - gabsbdlw - real - (:) - inout - F - MODULE_GFS_surface_generic_pre SCHEME_GFS_surface_generic_pre SUBROUTINE_GFS_surface_generic_pre_run - - - surface_skin_temperature_after_iteration - surface skin temperature after iteration - K - tsurf - real - (:) - inout - F - MODULE_GFS_surface_generic_pre SCHEME_GFS_surface_generic_pre SUBROUTINE_GFS_surface_generic_pre_run - - - height_above_ground_at_lowest_model_layer - layer 1 height above ground (not MSL) - m - zlvl - real - (:) - inout - F - MODULE_GFS_surface_generic_pre SCHEME_GFS_surface_generic_pre SUBROUTINE_GFS_surface_generic_pre_run - - - flag_for_stochastic_surface_physics_perturbations - flag for stochastic surface physics perturbations - flag - do_sppt - logical - - in - F - MODULE_GFS_surface_generic_pre SCHEME_GFS_surface_generic_pre SUBROUTINE_GFS_surface_generic_pre_run - - - tendency_of_air_temperature_due_to_radiative_heating_on_physics_time_step - temp. change due to radiative heating per time step - K - dtdtr - real - (:,:) - out - F - MODULE_GFS_surface_generic_pre SCHEME_GFS_surface_generic_pre SUBROUTINE_GFS_surface_generic_pre_run - - - tendency_of_lwe_thickness_of_precipitation_amount_for_coupling - change in rain_cpl (coupling_type) - m - drain_cpl - real - (:) - out - F - MODULE_GFS_surface_generic_pre SCHEME_GFS_surface_generic_pre SUBROUTINE_GFS_surface_generic_pre_run - - - tendency_of_lwe_thickness_of_snow_amount_for_coupling - change in show_cpl (coupling_type) - m - dsnow_cpl - real - (:) - out - F - MODULE_GFS_surface_generic_pre SCHEME_GFS_surface_generic_pre SUBROUTINE_GFS_surface_generic_pre_run - - - lwe_thickness_of_precipitation_amount_for_coupling - total rain precipitation - m - rain_cpl - real - (:) - in - F - MODULE_GFS_surface_generic_pre SCHEME_GFS_surface_generic_pre SUBROUTINE_GFS_surface_generic_pre_run - - - lwe_thickness_of_snow_amount_for_coupling - total snow precipitation - m - snow_cpl - real - (:) - in - F - MODULE_GFS_surface_generic_pre SCHEME_GFS_surface_generic_pre SUBROUTINE_GFS_surface_generic_pre_run - - - flag_for_stochastic_surface_perturbations - flag for stochastic surface perturbations option - flag - do_sfcperts - logical - - in - F - MODULE_GFS_surface_generic_pre SCHEME_GFS_surface_generic_pre SUBROUTINE_GFS_surface_generic_pre_run - - - number_of_surface_perturbations - number of surface perturbations - count - nsfcpert - integer - - in - F - MODULE_GFS_surface_generic_pre SCHEME_GFS_surface_generic_pre SUBROUTINE_GFS_surface_generic_pre_run - - - weights_for_stochastic_surface_physics_perturbation - weights for stochastic surface physics perturbation - none - sfc_wts - real - (:,:) - in - F - MODULE_GFS_surface_generic_pre SCHEME_GFS_surface_generic_pre SUBROUTINE_GFS_surface_generic_pre_run - - - magnitude_of_perturbation_of_momentum_roughness_length - magnitude of perturbation of momentum roughness length - frac - pertz0 - real - (:) - in - F - MODULE_GFS_surface_generic_pre SCHEME_GFS_surface_generic_pre SUBROUTINE_GFS_surface_generic_pre_run - - - magnitude_of_perturbation_of_heat_to_momentum_roughness_length_ratio - magnitude of perturbation of heat to momentum roughness length r. - frac - pertzt - real - (:) - in - F - MODULE_GFS_surface_generic_pre SCHEME_GFS_surface_generic_pre SUBROUTINE_GFS_surface_generic_pre_run - - - magnitude_of_perturbation_of_soil_type_b_parameter - magnitude of perturbation of soil type b parameter - frac - pertshc - real - (:) - in - F - MODULE_GFS_surface_generic_pre SCHEME_GFS_surface_generic_pre SUBROUTINE_GFS_surface_generic_pre_run - - - magnitude_of_perturbation_of_leaf_area_index - magnitude of perturbation of leaf area index - frac - pertlai - real - (:) - in - F - MODULE_GFS_surface_generic_pre SCHEME_GFS_surface_generic_pre SUBROUTINE_GFS_surface_generic_pre_run - - - magnitude_of_perturbation_of_vegetation_fraction - magnitude of perturbation of vegetation fraction - frac - pertvegf - real - (:) - in - F - MODULE_GFS_surface_generic_pre SCHEME_GFS_surface_generic_pre SUBROUTINE_GFS_surface_generic_pre_run - - - perturbation_of_momentum_roughness_length - perturbation of momentum roughness length - frac - z01d - real - (:) - out - F - MODULE_GFS_surface_generic_pre SCHEME_GFS_surface_generic_pre SUBROUTINE_GFS_surface_generic_pre_run - - - perturbation_of_heat_to_momentum_roughness_length_ratio - perturbation of heat to momentum roughness length ratio - frac - zt1d - real - (:) - out - F - MODULE_GFS_surface_generic_pre SCHEME_GFS_surface_generic_pre SUBROUTINE_GFS_surface_generic_pre_run - - - perturbation_of_soil_type_b_parameter - perturbation of soil type "b" parameter - frac - bexp1d - real - (:) - out - F - MODULE_GFS_surface_generic_pre SCHEME_GFS_surface_generic_pre SUBROUTINE_GFS_surface_generic_pre_run - - - perturbation_of_leaf_area_index - perturbation of leaf area index - frac - xlai1d - real - (:) - out - F - MODULE_GFS_surface_generic_pre SCHEME_GFS_surface_generic_pre SUBROUTINE_GFS_surface_generic_pre_run - - - perturbation_of_vegetation_fraction - perturbation of vegetation fraction - frac - vegf1d - real - (:) - out - F - MODULE_GFS_surface_generic_pre SCHEME_GFS_surface_generic_pre SUBROUTINE_GFS_surface_generic_pre_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_GFS_surface_generic_pre SCHEME_GFS_surface_generic_pre SUBROUTINE_GFS_surface_generic_pre_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_GFS_surface_generic_pre SCHEME_GFS_surface_generic_pre SUBROUTINE_GFS_surface_generic_pre_run - - - - diff --git a/physics/GFS_surface_loop_control_part1.xml b/physics/GFS_surface_loop_control_part1.xml deleted file mode 100644 index 8e07f979d..000000000 --- a/physics/GFS_surface_loop_control_part1.xml +++ /dev/null @@ -1,73 +0,0 @@ - - - - - horizontal_loop_extent - horizontal loop extent - count - im - integer - - in - F - MODULE_GFS_surface_loop_control_part1 SCHEME_GFS_surface_loop_control_part1 SUBROUTINE_GFS_surface_loop_control_part1_run - - - ccpp_loop_counter - loop counter for subcycling loops in CCPP - index - iter - integer - - in - F - MODULE_GFS_surface_loop_control_part1 SCHEME_GFS_surface_loop_control_part1 SUBROUTINE_GFS_surface_loop_control_part1_run - - - wind_speed_at_lowest_model_layer - wind speed at lowest model level - m s-1 - wind - real - (:) - in - F - MODULE_GFS_surface_loop_control_part1 SCHEME_GFS_surface_loop_control_part1 SUBROUTINE_GFS_surface_loop_control_part1_run - - - flag_for_guess_run - flag for guess run - flag - flag_guess - logical - (:) - inout - F - MODULE_GFS_surface_loop_control_part1 SCHEME_GFS_surface_loop_control_part1 SUBROUTINE_GFS_surface_loop_control_part1_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_GFS_surface_loop_control_part1 SCHEME_GFS_surface_loop_control_part1 SUBROUTINE_GFS_surface_loop_control_part1_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_GFS_surface_loop_control_part1 SCHEME_GFS_surface_loop_control_part1 SUBROUTINE_GFS_surface_loop_control_part1_run - - - - - diff --git a/physics/GFS_surface_loop_control_part2.xml b/physics/GFS_surface_loop_control_part2.xml deleted file mode 100644 index 8c2287f13..000000000 --- a/physics/GFS_surface_loop_control_part2.xml +++ /dev/null @@ -1,106 +0,0 @@ - - - - - horizontal_loop_extent - horizontal loop extent - count - im - integer - - in - F - MODULE_GFS_surface_loop_control_part2 SCHEME_GFS_surface_loop_control_part2 SUBROUTINE_GFS_surface_loop_control_part2_run - - - ccpp_loop_counter - loop counter for subcycling loops in CCPP - index - iter - integer - - in - F - MODULE_GFS_surface_loop_control_part2 SCHEME_GFS_surface_loop_control_part2 SUBROUTINE_GFS_surface_loop_control_part2_run - - - wind_speed_at_lowest_model_layer - wind speed at lowest model level - m s-1 - wind - real - (:) - in - F - MODULE_GFS_surface_loop_control_part2 SCHEME_GFS_surface_loop_control_part2 SUBROUTINE_GFS_surface_loop_control_part2_run - - - flag_for_guess_run - flag for guess run - flag - flag_guess - logical - (:) - inout - F - MODULE_GFS_surface_loop_control_part2 SCHEME_GFS_surface_loop_control_part2 SUBROUTINE_GFS_surface_loop_control_part2_run - - - flag_for_iteration - flag for iteration - flag - flag_iter - logical - (:) - inout - F - MODULE_GFS_surface_loop_control_part2 SCHEME_GFS_surface_loop_control_part2 SUBROUTINE_GFS_surface_loop_control_part2_run - - - sea_land_ice_mask - landmask: sea/land/ice=0/1/2 - flag - islmsk - integer - (:) - in - F - MODULE_GFS_surface_loop_control_part2 SCHEME_GFS_surface_loop_control_part2 SUBROUTINE_GFS_surface_loop_control_part2_run - - - flag_for_nsstm_run - NSSTM flag: off/uncoupled/coupled=0/1/2 - flag - nstf_name1 - integer - - in - F - MODULE_GFS_surface_loop_control_part2 SCHEME_GFS_surface_loop_control_part2 SUBROUTINE_GFS_surface_loop_control_part2_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_GFS_surface_loop_control_part2 SCHEME_GFS_surface_loop_control_part2 SUBROUTINE_GFS_surface_loop_control_part2_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_GFS_surface_loop_control_part2 SCHEME_GFS_surface_loop_control_part2 SUBROUTINE_GFS_surface_loop_control_part2_run - - - - - diff --git a/physics/GFS_time_vary_pre.xml b/physics/GFS_time_vary_pre.xml deleted file mode 100644 index db6dba340..000000000 --- a/physics/GFS_time_vary_pre.xml +++ /dev/null @@ -1,86 +0,0 @@ - - - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_GFS_time_vary_pre SCHEME_GFS_time_vary_pre SUBROUTINE_GFS_time_vary_pre_finalize - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_GFS_time_vary_pre SCHEME_GFS_time_vary_pre SUBROUTINE_GFS_time_vary_pre_finalize - - - - - GFS_control_type_instance - Fortran DDT containing FV3-GFS model control parameters - DDT - Model - GFS_control_type - - inout - F - MODULE_GFS_time_vary_pre SCHEME_GFS_time_vary_pre SUBROUTINE_GFS_time_vary_pre_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_GFS_time_vary_pre SCHEME_GFS_time_vary_pre SUBROUTINE_GFS_time_vary_pre_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_GFS_time_vary_pre SCHEME_GFS_time_vary_pre SUBROUTINE_GFS_time_vary_pre_run - - - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_GFS_time_vary_pre SCHEME_GFS_time_vary_pre SUBROUTINE_GFS_time_vary_pre_init - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_GFS_time_vary_pre SCHEME_GFS_time_vary_pre SUBROUTINE_GFS_time_vary_pre_init - - - diff --git a/physics/cnvc90.xml b/physics/cnvc90.xml deleted file mode 100644 index 9d51a629d..000000000 --- a/physics/cnvc90.xml +++ /dev/null @@ -1,183 +0,0 @@ - - - - - - - convective_cloud_switch - switch for saving convective clouds - none - clstp - real - - in - F - MODULE_cnvc90 SCHEME_cnvc90 SUBROUTINE_cnvc90_run - - - horizontal_loop_extent - horizontal loop extent - count - im - integer - - in - F - MODULE_cnvc90 SCHEME_cnvc90 SUBROUTINE_cnvc90_run - - - horizontal_dimension - horizontal dimension - count - ix - integer - - in - F - MODULE_cnvc90 SCHEME_cnvc90 SUBROUTINE_cnvc90_run - - - lwe_thickness_of_convective_precipitation_amount_on_dynamics_timestep - convective rainfall amount on dynamics timestep - m - rn - real - (:) - in - F - MODULE_cnvc90 SCHEME_cnvc90 SUBROUTINE_cnvc90_run - - - vertical_index_at_cloud_base - vertical index at cloud base - index - kbot - integer - (:) - in - F - MODULE_cnvc90 SCHEME_cnvc90 SUBROUTINE_cnvc90_run - - - vertical_index_at_cloud_top - vertical index at cloud top - index - ktop - integer - (:) - in - F - MODULE_cnvc90 SCHEME_cnvc90 SUBROUTINE_cnvc90_run - - - vertical_dimension - number of vertical layers - count - km - integer - - in - F - MODULE_cnvc90 SCHEME_cnvc90 SUBROUTINE_cnvc90_run - - - air_pressure_at_interface - interface pressure - Pa - prsi - real - (:,:) - in - F - MODULE_cnvc90 SCHEME_cnvc90 SUBROUTINE_cnvc90_run - - - accumulated_lwe_thickness_of_convective_precipitation_amount_cnvc90 - accumulated convective rainfall amount for cnvc90 only - m - acv - real - (:) - inout - F - MODULE_cnvc90 SCHEME_cnvc90 SUBROUTINE_cnvc90_run - - - smallest_cloud_base_vertical_index_encountered_thus_far - smallest cloud base vertical index encountered thus far - index - acvb - real - (:) - inout - F - MODULE_cnvc90 SCHEME_cnvc90 SUBROUTINE_cnvc90_run - - - largest_cloud_top_vertical_index_encountered_thus_far - largest cloud top vertical index encountered thus far - index - acvt - real - (:) - inout - F - MODULE_cnvc90 SCHEME_cnvc90 SUBROUTINE_cnvc90_run - - - fraction_of_convective_cloud - fraction of convective cloud - frac - cv - real - (:) - inout - F - MODULE_cnvc90 SCHEME_cnvc90 SUBROUTINE_cnvc90_run - - - pressure_at_bottom_of_convective_cloud - pressure at bottom of convective cloud - Pa - cvb - real - (:) - inout - F - MODULE_cnvc90 SCHEME_cnvc90 SUBROUTINE_cnvc90_run - - - pressure_at_top_of_convective_cloud - pressure at top of convective cloud - Pa - cvt - real - (:) - inout - F - MODULE_cnvc90 SCHEME_cnvc90 SUBROUTINE_cnvc90_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_cnvc90 SCHEME_cnvc90 SUBROUTINE_cnvc90_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_cnvc90 SCHEME_cnvc90 SUBROUTINE_cnvc90_run - - - diff --git a/physics/cs_conv.xml b/physics/cs_conv.xml deleted file mode 100644 index ac9dbb5f4..000000000 --- a/physics/cs_conv.xml +++ /dev/null @@ -1,590 +0,0 @@ - - - - - - - horizontal_dimension - horizontal dimension - count - im - integer - - in - F - MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run - - - horizontal_loop_extent - horizontal loop extent - count - ijsdim - integer - - in - F - MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run - - - vertical_dimension - number of veritcal levels - count - kmax - integer - - in - F - MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run - - - number_of_tracers_plus_one - number of tracers plus one - count - ntracp1 - integer - - in - F - MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run - - - number_of_tracers_for_convective_transport - number of tracers for convective transport (used to dimension clw) - count - nn - integer - - in - F - MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run - - - number_of_tracers_for_CS - number of convectively transported tracers in Chikira-Sugiyama deep conv. scheme - count - ntr - integer - - in - F - MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run - - - number_of_cloud_types_CS - number of cloud types in Chikira-Sugiyama scheme - count - nctp - integer - - in - F - MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run - - - flag_convective_tracer_transport - flag to enable tracer transport by updrafts/downdrafts[(:,1)] or subsidence [(:,2)] - flag - otspt - logical - (:,:) - in - F - MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run - - - latitude_index_in_debug_printouts - latitude index in debug printouts - index - lat - integer - - in - F - MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run - - - index_of_time_step - current forecast iteration - index - kdt - integer - - in - F - MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run - - - air_temperature_updated_by_physics - mid-layer temperature - K - t - real - (:,:) - inout - F - MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run - - - water_vapor_specific_humidity_updated_by_physics - mid-layer specific humidity of water vapor - kg kg-1 - q - real - (:,:) - inout - F - MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run - - - lwe_thickness_of_deep_convective_precipitation_amount - deep convective rainfall amount on physics timestep - m - rain1 - real - (:) - out - F - MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run - - - convective_transportable_tracers - array to contain cloud water and other convective trans. tracers - kg kg-1 - clw - real - (:,:,:) - inout - F - MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run - - - geopotential - mid-layer geopotential - m2 s-2 - zm - real - (:,:) - in - F - MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run - - - geopotential_at_interface - interface geopotential - m2 s-2 - zi - real - (:,:) - in - F - MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run - - - air_pressure - mid-layer pressure - Pa - pap - real - (:,:) - in - F - MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run - - - air_pressure_at_interface - interface pressure - Pa - paph - real - (:,:) - in - F - MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run - - - time_step_for_physics - physics time step - s - delta - real - - in - F - MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run - - - time_step_for_dynamics - dynamics time step - s - delti - real - - in - F - MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run - - - instantaneous_atmosphere_updraft_convective_mass_flux - (updraft mass flux) * delt - kg m-2 - ud_mf - real - (:,:) - inout - F - MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run - - - instantaneous_atmosphere_downdraft_convective_mass_flux - (downdraft mass flux) * delt - kg m-2 - dd_mf - real - (:,:) - inout - F - MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run - - - instantaneous_atmosphere_detrainment_convective_mass_flux - (detrainment mass flux) * delt - kg m-2 - dt_mf - real - (:,:) - inout - F - MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run - - - x_wind_updated_by_physics - mid-layer zonal wind - m s-1 - u - real - (:,:) - inout - F - MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run - - - y_wind_updated_by_physics - mid-layer meridional wind - m s-1 - v - real - (:,:) - inout - F - MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run - - - fraction_of_tracer_scavenged - fraction of the tracer (aerosols) that is scavenged by convection - km-1 - fscav - real - (:) - in - F - MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run - - - fraction_of_cloud_top_water_scavenged - fraction of the tracer (cloud top water) that is scavenged by convection - km-1 - fswtr - real - (:) - in - F - MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run - - - cloud_base_mass_flux - cloud base mass flux - kg m-2 s-1 - cbmfx - real - (:,:) - inout - F - MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run - - - mpi_rank - current MPI rank - index - mype - integer - - in - F - MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run - - - maximum_updraft_velocity_at_cloud_base - maximum updraft velocity at cloud base - m s-1 - wcbmaxm - real - (:) - in - F - MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run - - - detrainment_and_precipitation_tunable_parameter_3_CS - partition water between detrainment and precipitation (decrease for more precipitation) - m - precz0in - real - - in - F - MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run - - - detrainment_and_precipitation_tunable_parameter_4_CS - partition water between detrainment and precipitation (decrease for more precipitation) - m - preczhin - real - - in - F - MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run - - - entrainment_efficiency_tunable_parameter_9_CS - entrainment efficiency - none - clmdin - real - - in - F - MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run - - - convective_updraft_area_fraction_at_model_interfaces - convective updraft area fraction at model interfaces - frac - sigma - real - (:,:) - out - F - MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run - - - flag_for_Arakawa_Wu_adjustment - flag for Arakawa Wu scale-aware adjustment - flag - do_aw - logical - - in - F - MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run - - - flag_arakawa_wu_downdraft - flag to enable treating convective tendencies following Arakwaw-Wu for downdrafts (2013) - flag - do_awdd - logical - - in - F - MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run - - - flag_flux_form_CS - flag to enable using the flux form of the equations in CS scheme - flag - flx_form - logical - - in - F - MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run - - - flag_print - control flag for diagnostic print out - flag - lprnt - logical - - in - F - MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run - - - horizontal_index_of_printed_column - horizontal index of printed column - index - ipr - integer - - in - F - MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run - - - flag_deep_convection - flag indicating whether convection occurs in column - flag - kcnv - integer - (:) - inout - F - MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run - - - mass_fraction_of_convective_cloud_liquid_water - mass fraction of convective cloud liquid water - kg kg-1 - qlcn - real - (:,:) - out - F - MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run - - - mass_fraction_of_convective_cloud_ice - mass fraction of convective cloud ice water - kg kg-1 - qicn - real - (:,:) - out - F - MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run - - - vertical_velocity_for_updraft - vertical velocity for updraft - m s-1 - w_upi - real - (:,:) - out - F - MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run - - - convective_cloud_fraction_for_microphysics - convective cloud fraction for microphysics - frac - cf_upi - real - (:,:) - out - F - MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run - - - detrained_mass_flux - detrained mass flux - kg m-2 s-1 - cnv_mfd - real - (:,:) - out - F - MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run - - - tendency_of_cloud_water_due_to_convective_microphysics - tendency of cloud water due to convective microphysics - kg m-2 s-1 - cnv_dqldt - real - (:,:) - out - F - MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run - - - convective_cloud_volume_fraction - convective cloud volume fraction - frac - clcn - real - (:,:) - out - F - MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run - - - ice_fraction_in_convective_tower - ice fraction in convective tower - frac - cnv_fice - real - (:,:) - out - F - MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run - - - number_concentration_of_cloud_liquid_water_particles_for_detrainment - droplet number concentration in convective detrainment - m-3 - cnv_ndrop - real - (:,:) - out - F - MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run - - - number_concentration_of_ice_crystals_for_detrainment - crystal number concentration in convective detrainment - m-3 - cnv_nice - real - (:,:) - out - F - MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run - - - flag_for_microphysics_scheme - flag for microphysics scheme - flag - mp_phys - integer - - in - F - MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_cs_conv SCHEME_cs_conv SUBROUTINE_cs_conv_run - - - diff --git a/physics/cs_conv_aw_adj.xml b/physics/cs_conv_aw_adj.xml deleted file mode 100644 index ec232caa8..000000000 --- a/physics/cs_conv_aw_adj.xml +++ /dev/null @@ -1,249 +0,0 @@ - - - - - horizontal_dimension - horizontal dimension - count - im - integer - - in - F - MODULE_cs_conv_aw_adj SCHEME_cs_conv_aw_adj SUBROUTINE_cs_conv_aw_adj_run - - - vertical_dimension - number of veritcal levels - count - levs - integer - - in - F - MODULE_cs_conv_aw_adj SCHEME_cs_conv_aw_adj SUBROUTINE_cs_conv_aw_adj_run - - - flag_for_Chikira_Sugiyama_deep_convection - flag for Chikira-Sugiyama convection - flag - do_cscnv - logical - - in - F - MODULE_cs_conv_aw_adj SCHEME_cs_conv_aw_adj SUBROUTINE_cs_conv_aw_adj_run - - - flag_for_Arakawa_Wu_adjustment - flag for Arakawa Wu scale-aware adjustment - flag - do_aw - logical - - in - F - MODULE_cs_conv_aw_adj SCHEME_cs_conv_aw_adj SUBROUTINE_cs_conv_aw_adj_run - - - flag_for_shoc - flag for SHOC - flag - do_shoc - logical - - in - F - MODULE_cs_conv_aw_adj SCHEME_cs_conv_aw_adj SUBROUTINE_cs_conv_aw_adj_run - - - number_of_tracers - number of tracers - count - ntrac - integer - - in - F - MODULE_cs_conv_aw_adj SCHEME_cs_conv_aw_adj SUBROUTINE_cs_conv_aw_adj_run - - - number_of_hydrometeors - number of hydrometeors - count - ncld - integer - - in - F - MODULE_cs_conv_aw_adj SCHEME_cs_conv_aw_adj SUBROUTINE_cs_conv_aw_adj_run - - - index_for_liquid_cloud_condensate - tracer index for cloud condensate (or liquid water) - index - ntcw - integer - - in - F - MODULE_cs_conv_aw_adj SCHEME_cs_conv_aw_adj SUBROUTINE_cs_conv_aw_adj_run - - - index_for_cloud_amount - tracer index for cloud amount integer - index - ntclamt - integer - - in - F - MODULE_cs_conv_aw_adj SCHEME_cs_conv_aw_adj SUBROUTINE_cs_conv_aw_adj_run - - - number_of_tracers_for_cloud_condensate - number of tracers for cloud condensate - count - nncl - integer - - in - F - MODULE_cs_conv_aw_adj SCHEME_cs_conv_aw_adj SUBROUTINE_cs_conv_aw_adj_run - - - gravitational_acceleration - gravitational acceleration - m s-2 - con_g - real - - in - F - MODULE_cs_conv_aw_adj SCHEME_cs_conv_aw_adj SUBROUTINE_cs_conv_aw_adj_run - - - convective_updraft_area_fraction - convective updraft area fraction - frac - sigmafrac - real - (:,:) - in - F - MODULE_cs_conv_aw_adj SCHEME_cs_conv_aw_adj SUBROUTINE_cs_conv_aw_adj_run - - - air_temperature_updated_by_physics - temperature updated by physics - K - gt0 - real - (:,:) - inout - F - MODULE_cs_conv_aw_adj SCHEME_cs_conv_aw_adj SUBROUTINE_cs_conv_aw_adj_run - - - tracer_concentration_updated_by_physics - tracer concentration updated by physics - kg kg-1 - gq0 - real - (:,:,:) - inout - F - MODULE_cs_conv_aw_adj SCHEME_cs_conv_aw_adj SUBROUTINE_cs_conv_aw_adj_run - - - air_temperature_save - air temperature before entering a physics scheme - K - save_t - real - (:,:) - in - F - MODULE_cs_conv_aw_adj SCHEME_cs_conv_aw_adj SUBROUTINE_cs_conv_aw_adj_run - - - tracer_concentration_save - tracer concentration before entering a physics scheme - kg kg-1 - save_q - real - (:,:,:) - in - F - MODULE_cs_conv_aw_adj SCHEME_cs_conv_aw_adj SUBROUTINE_cs_conv_aw_adj_run - - - air_pressure_at_interface - air pressure at model layer interfaces - Pa - prsi - real - (:,:) - in - F - MODULE_cs_conv_aw_adj SCHEME_cs_conv_aw_adj SUBROUTINE_cs_conv_aw_adj_run - - - cloud_fraction_for_MG - cloud fraction used by Morrison-Gettelman MP - frac - cldfrac - real - (:,:) - inout - F - MODULE_cs_conv_aw_adj SCHEME_cs_conv_aw_adj SUBROUTINE_cs_conv_aw_adj_run - - - subgrid_scale_cloud_fraction_from_shoc - subgrid-scale cloud fraction from the SHOC scheme - frac - subcldfrac - real - (:,:) - inout - F - MODULE_cs_conv_aw_adj SCHEME_cs_conv_aw_adj SUBROUTINE_cs_conv_aw_adj_run - - - lwe_thickness_of_explicit_precipitation_amount - explicit precipitation (rain, ice, snow, graupel, ...) on physics timestep - m - prcp - real - (:) - inout - F - MODULE_cs_conv_aw_adj SCHEME_cs_conv_aw_adj SUBROUTINE_cs_conv_aw_adj_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_cs_conv_aw_adj SCHEME_cs_conv_aw_adj SUBROUTINE_cs_conv_aw_adj_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_cs_conv_aw_adj SCHEME_cs_conv_aw_adj SUBROUTINE_cs_conv_aw_adj_run - - - - - diff --git a/physics/cs_conv_post.xml b/physics/cs_conv_post.xml deleted file mode 100644 index c91f5427c..000000000 --- a/physics/cs_conv_post.xml +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - - horizontal_dimension - horizontal dimension - count - im - integer - - in - F - MODULE_cs_conv_post SCHEME_cs_conv_post SUBROUTINE_cs_conv_post_run - - - vertical_dimension - number of veritcal levels - count - kmax - integer - - in - F - MODULE_cs_conv_post SCHEME_cs_conv_post SUBROUTINE_cs_conv_post_run - - - flag_for_Arakawa_Wu_adjustment - flag for Arakawa Wu scale-aware adjustment - flag - do_aw - logical - - in - F - MODULE_cs_conv_post SCHEME_cs_conv_post SUBROUTINE_cs_conv_post_run - - - convective_updraft_area_fraction_at_model_interfaces - convective updraft area fraction at model interfaces - frac - sigmatot - real - (:,:) - in - F - MODULE_cs_conv_post SCHEME_cs_conv_post SUBROUTINE_cs_conv_post_run - - - convective_updraft_area_fraction - convective updraft area fraction - frac - sigmafrac - real - (:,:) - out - F - MODULE_cs_conv_post SCHEME_cs_conv_post SUBROUTINE_cs_conv_post_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_cs_conv_post SCHEME_cs_conv_post SUBROUTINE_cs_conv_post_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_cs_conv_post SCHEME_cs_conv_post SUBROUTINE_cs_conv_post_run - - - diff --git a/physics/cs_conv_pre.xml b/physics/cs_conv_pre.xml deleted file mode 100644 index 779bbeb5c..000000000 --- a/physics/cs_conv_pre.xml +++ /dev/null @@ -1,216 +0,0 @@ - - - - - horizontal_dimension - horizontal dimension - count - im - integer - - in - F - MODULE_cs_conv_pre SCHEME_cs_conv_pre SUBROUTINE_cs_conv_pre_run - - - vertical_dimension - number of veritcal levels - count - levs - integer - - in - F - MODULE_cs_conv_pre SCHEME_cs_conv_pre SUBROUTINE_cs_conv_pre_run - - - number_of_tracers - number of tracers - count - ntrac - integer - - in - F - MODULE_cs_conv_pre SCHEME_cs_conv_pre SUBROUTINE_cs_conv_pre_run - - - number_of_hydrometeors - number of hydrometeors - count - ncld - integer - - in - F - MODULE_cs_conv_pre SCHEME_cs_conv_pre SUBROUTINE_cs_conv_pre_run - - - water_vapor_specific_humidity_updated_by_physics - water vapor specific humidity updated by physics - kg kg-1 - q - real - (:,:) - in - F - MODULE_cs_conv_pre SCHEME_cs_conv_pre SUBROUTINE_cs_conv_pre_run - - - ice_water_mixing_ratio_convective_transport_tracer - moist (dry+vapor, no condensates) mixing ratio of ice water in the convectively transported tracer array - kg kg-1 - clw1 - real - (:,:) - in - F - MODULE_cs_conv_pre SCHEME_cs_conv_pre SUBROUTINE_cs_conv_pre_run - - - cloud_condensed_water_mixing_ratio_convective_transport_tracer - moist (dry+vapor, no condensates) mixing ratio of cloud water (condensate) in the convectively transported tracer array - kg kg-1 - clw2 - real - (:,:) - in - F - MODULE_cs_conv_pre SCHEME_cs_conv_pre SUBROUTINE_cs_conv_pre_run - - - grid_size_related_coefficient_used_in_scale-sensitive_schemes - grid size related coefficient used in scale-sensitive schemes - none - work1 - real - (:) - in - F - MODULE_cs_conv_pre SCHEME_cs_conv_pre SUBROUTINE_cs_conv_pre_run - - - grid_size_related_coefficient_used_in_scale-sensitive_schemes_complement - complement to work1 - none - work2 - real - (:) - in - F - MODULE_cs_conv_pre SCHEME_cs_conv_pre SUBROUTINE_cs_conv_pre_run - - - updraft_velocity_tunable_parameter_1_CS - tunable parameter 1 for Chikira-Sugiyama convection - m s-1 - cs_parm1 - real - - in - F - MODULE_cs_conv_pre SCHEME_cs_conv_pre SUBROUTINE_cs_conv_pre_run - - - updraft_velocity_tunable_parameter_2_CS - tunable parameter 2 for Chikira-Sugiyama convection - m s-1 - cs_parm2 - real - - in - F - MODULE_cs_conv_pre SCHEME_cs_conv_pre SUBROUTINE_cs_conv_pre_run - - - maximum_updraft_velocity_at_cloud_base - maximum updraft velocity at cloud base - m s-1 - wcbmax - real - (:) - out - F - MODULE_cs_conv_pre SCHEME_cs_conv_pre SUBROUTINE_cs_conv_pre_run - - - fraction_of_cloud_top_water_scavenged - fraction of the tracer (cloud top water) that is scavenged by convection - km-1 - fswtr - real - (:) - out - F - MODULE_cs_conv_pre SCHEME_cs_conv_pre SUBROUTINE_cs_conv_pre_run - - - fraction_of_tracer_scavenged - fraction of the tracer (aerosols) that is scavenged by convection - km-1 - fscav - real - (:) - out - F - MODULE_cs_conv_pre SCHEME_cs_conv_pre SUBROUTINE_cs_conv_pre_run - - - water_vapor_specific_humidity_save - water vapor specific humidity before entering a physics scheme - kg kg-1 - save_q1 - real - (:,:) - out - F - MODULE_cs_conv_pre SCHEME_cs_conv_pre SUBROUTINE_cs_conv_pre_run - - - cloud_condensed_water_mixing_ratio_save - moist (dry+vapor, no condensates) mixing ratio of cloud water (condensate) before entering a physics scheme - kg kg-1 - save_q2 - real - (:,:) - out - F - MODULE_cs_conv_pre SCHEME_cs_conv_pre SUBROUTINE_cs_conv_pre_run - - - ice_water_mixing_ratio_save - cloud ice water mixing ratio before entering a physics scheme - kg kg-1 - save_q3 - real - (:,:) - out - F - MODULE_cs_conv_pre SCHEME_cs_conv_pre SUBROUTINE_cs_conv_pre_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_cs_conv_pre SCHEME_cs_conv_pre SUBROUTINE_cs_conv_pre_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_cs_conv_pre SCHEME_cs_conv_pre SUBROUTINE_cs_conv_pre_run - - - - - diff --git a/physics/cu_gf_driver.xml b/physics/cu_gf_driver.xml deleted file mode 100644 index f515db4e0..000000000 --- a/physics/cu_gf_driver.xml +++ /dev/null @@ -1,470 +0,0 @@ - - - - - number_of_total_tracers - number of total tracers - count - tottracer - integer - - in - F - MODULE_cu_gf_driver SCHEME_cu_gf_driver SUBROUTINE_cu_gf_driver_run - - - number_of_vertical_diffusion_tracers - number of tracers to diffuse vertically - count - ntrac - integer - - in - F - MODULE_cu_gf_driver SCHEME_cu_gf_driver SUBROUTINE_cu_gf_driver_run - - - cell_area - grid cell area - m2 - garea - real - (:) - in - F - MODULE_cu_gf_driver SCHEME_cu_gf_driver SUBROUTINE_cu_gf_driver_run - - - horizontal_loop_extent - horizontal loop extent - count - im - integer - - in - F - MODULE_cu_gf_driver SCHEME_cu_gf_driver SUBROUTINE_cu_gf_driver_run - - - horizontal_dimension - horizontal dimension - count - ix - integer - - in - F - MODULE_cu_gf_driver SCHEME_cu_gf_driver SUBROUTINE_cu_gf_driver_run - - - vertical_dimension - vertical layer dimension - count - km - integer - - in - F - MODULE_cu_gf_driver SCHEME_cu_gf_driver SUBROUTINE_cu_gf_driver_run - - - time_step_for_physics - physics time step - s - dt - real - - in - F - MODULE_cu_gf_driver SCHEME_cu_gf_driver SUBROUTINE_cu_gf_driver_run - - - conv_activity_counter - convective activity memory - none - cactiv - integer - (:) - inout - F - MODULE_cu_gf_driver SCHEME_cu_gf_driver SUBROUTINE_cu_gf_driver_run - - - temperature_tendency_due_to_dynamics - temperature tendency due to dynamics only - K s-1 - forcet - real - (:,:) - in - F - MODULE_cu_gf_driver SCHEME_cu_gf_driver SUBROUTINE_cu_gf_driver_run - - - moisture_tendency_due_to_dynamics - moisture tendency due to dynamics only - kg kg-1 s-1 - forceqv_spechum - real - (:,:) - in - F - MODULE_cu_gf_driver SCHEME_cu_gf_driver SUBROUTINE_cu_gf_driver_run - - - geopotential - layer geopotential - m2 s-2 - phil - real - (:,:) - in - F - MODULE_cu_gf_driver SCHEME_cu_gf_driver SUBROUTINE_cu_gf_driver_run - - - lwe_thickness_of_deep_convective_precipitation_amount - deep convective rainfall amount on physics timestep - m - raincv - real - (:) - out - F - MODULE_cu_gf_driver SCHEME_cu_gf_driver SUBROUTINE_cu_gf_driver_run - - - water_vapor_specific_humidity_updated_by_physics - water vapor specific humidity updated by physics - kg kg-1 - qv_spechum - real - (:,:) - inout - F - MODULE_cu_gf_driver SCHEME_cu_gf_driver SUBROUTINE_cu_gf_driver_run - - - air_temperature_updated_by_physics - updated temperature - K - t - real - (:,:) - inout - F - MODULE_cu_gf_driver SCHEME_cu_gf_driver SUBROUTINE_cu_gf_driver_run - - - cloud_work_function - cloud work function - m2 s-2 - cld1d - real - (:) - out - F - MODULE_cu_gf_driver SCHEME_cu_gf_driver SUBROUTINE_cu_gf_driver_run - - - x_wind_updated_by_physics - updated x-direction wind - m s-1 - us - real - (:,:) - inout - F - MODULE_cu_gf_driver SCHEME_cu_gf_driver SUBROUTINE_cu_gf_driver_run - - - y_wind_updated_by_physics - updated y-direction wind - m s-1 - vs - real - (:,:) - inout - F - MODULE_cu_gf_driver SCHEME_cu_gf_driver SUBROUTINE_cu_gf_driver_run - - - air_temperature - mid-layer temperature - K - t2di - real - (:,:) - in - F - MODULE_cu_gf_driver SCHEME_cu_gf_driver SUBROUTINE_cu_gf_driver_run - - - omega - layer mean vertical velocity - Pa s-1 - w - real - (:,:) - in - F - MODULE_cu_gf_driver SCHEME_cu_gf_driver SUBROUTINE_cu_gf_driver_run - - - water_vapor_specific_humidity - water vapor specific humidity - kg kg-1 - qv2di_spechum - real - (:,:) - in - F - MODULE_cu_gf_driver SCHEME_cu_gf_driver SUBROUTINE_cu_gf_driver_run - - - air_pressure - mean layer pressure - Pa - p2di - real - (:,:) - in - F - MODULE_cu_gf_driver SCHEME_cu_gf_driver SUBROUTINE_cu_gf_driver_run - - - surface_air_pressure - surface pressure - Pa - psuri - real - (:) - in - F - MODULE_cu_gf_driver SCHEME_cu_gf_driver SUBROUTINE_cu_gf_driver_run - - - vertical_index_at_cloud_base - index for cloud base - index - hbot - integer - (:) - out - F - MODULE_cu_gf_driver SCHEME_cu_gf_driver SUBROUTINE_cu_gf_driver_run - - - vertical_index_at_cloud_top - index for cloud top - index - htop - integer - (:) - out - F - MODULE_cu_gf_driver SCHEME_cu_gf_driver SUBROUTINE_cu_gf_driver_run - - - flag_deep_convection - deep convection: 0=no, 1=yes - flag - kcnv - integer - (:) - out - F - MODULE_cu_gf_driver SCHEME_cu_gf_driver SUBROUTINE_cu_gf_driver_run - - - sea_land_ice_mask - landmask: sea/land/ice=0/1/2 - flag - xland - integer - (:) - in - F - MODULE_cu_gf_driver SCHEME_cu_gf_driver SUBROUTINE_cu_gf_driver_run - - - kinematic_surface_upward_sensible_heat_flux - kinematic surface upward sensible heat flux - K m s-1 - hfx2 - real - (:) - in - F - MODULE_cu_gf_driver SCHEME_cu_gf_driver SUBROUTINE_cu_gf_driver_run - - - kinematic_surface_upward_latent_heat_flux - kinematic surface upward latent heat flux - kg kg-1 m s-1 - qfx2 - real - (:) - in - F - MODULE_cu_gf_driver SCHEME_cu_gf_driver SUBROUTINE_cu_gf_driver_run - - - convective_transportable_tracers - cloud water and other convective trans. tracers - kg kg-1 - clw - real - (:,:,:) - inout - F - MODULE_cu_gf_driver SCHEME_cu_gf_driver SUBROUTINE_cu_gf_driver_run - - - atmosphere_boundary_layer_thickness - PBL thickness - m - pbl - real - (:) - in - F - MODULE_cu_gf_driver SCHEME_cu_gf_driver SUBROUTINE_cu_gf_driver_run - - - instantaneous_atmosphere_updraft_convective_mass_flux - (updraft mass flux) * delt - kg m-2 - ud_mf - real - (:,:) - out - F - MODULE_cu_gf_driver SCHEME_cu_gf_driver SUBROUTINE_cu_gf_driver_run - - - instantaneous_atmosphere_downdraft_convective_mass_flux - (downdraft mass flux) * delt - kg m-2 - dd_mf - real - (:,:) - out - F - MODULE_cu_gf_driver SCHEME_cu_gf_driver SUBROUTINE_cu_gf_driver_run - - - instantaneous_atmosphere_detrainment_convective_mass_flux - (detrainment mass flux) * delt - kg m-2 - dt_mf - real - (:,:) - out - F - MODULE_cu_gf_driver SCHEME_cu_gf_driver SUBROUTINE_cu_gf_driver_run - - - convective_cloud_water_mixing_ratio - moist convective cloud water mixing ratio - kg kg-1 - cnvw_moist - real - (:,:) - out - F - MODULE_cu_gf_driver SCHEME_cu_gf_driver SUBROUTINE_cu_gf_driver_run - - - convective_cloud_cover - convective cloud cover - frac - cnvc - real - (:,:) - out - F - MODULE_cu_gf_driver SCHEME_cu_gf_driver SUBROUTINE_cu_gf_driver_run - - - flag_for_mass_flux_shallow_convection_scheme - flag for mass-flux shallow convection scheme - flag - imfshalcnv - integer - - in - F - MODULE_cu_gf_driver SCHEME_cu_gf_driver SUBROUTINE_cu_gf_driver_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_cu_gf_driver SCHEME_cu_gf_driver SUBROUTINE_cu_gf_driver_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_cu_gf_driver SCHEME_cu_gf_driver SUBROUTINE_cu_gf_driver_run - - - - - mpi_rank - current MPI-rank - index - mpirank - integer - - in - F - MODULE_cu_gf_driver SCHEME_cu_gf_driver SUBROUTINE_cu_gf_driver_init - - - mpi_root - master MPI-rank - index - mpiroot - integer - - in - F - MODULE_cu_gf_driver SCHEME_cu_gf_driver SUBROUTINE_cu_gf_driver_init - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_cu_gf_driver SCHEME_cu_gf_driver SUBROUTINE_cu_gf_driver_init - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_cu_gf_driver SCHEME_cu_gf_driver SUBROUTINE_cu_gf_driver_init - - - - diff --git a/physics/cu_gf_driver_post.xml b/physics/cu_gf_driver_post.xml deleted file mode 100644 index e1504f676..000000000 --- a/physics/cu_gf_driver_post.xml +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - horizontal_loop_extent - horizontal loop extent - count - im - integer - - in - F - MODULE_cu_gf_driver_post SCHEME_cu_gf_driver_post SUBROUTINE_cu_gf_driver_post_run - - - air_temperature_updated_by_physics - temperature updated by physics - K - t - real - (:,:) - in - F - MODULE_cu_gf_driver_post SCHEME_cu_gf_driver_post SUBROUTINE_cu_gf_driver_post_run - - - water_vapor_specific_humidity_updated_by_physics - water vapor specific humidity updated by physics - kg kg-1 - q - real - (:,:) - in - F - MODULE_cu_gf_driver_post SCHEME_cu_gf_driver_post SUBROUTINE_cu_gf_driver_post_run - - - temperature_from_previous_timestep - temperature from previous time step - K - prevst - real - (:,:) - out - F - MODULE_cu_gf_driver_post SCHEME_cu_gf_driver_post SUBROUTINE_cu_gf_driver_post_run - - - moisture_from_previous_timestep - moisture from previous time step - kg kg-1 - prevsq - real - (:,:) - out - F - MODULE_cu_gf_driver_post SCHEME_cu_gf_driver_post SUBROUTINE_cu_gf_driver_post_run - - - conv_activity_counter - convective activity memory - none - cactiv - integer - (:) - in - F - MODULE_cu_gf_driver_post SCHEME_cu_gf_driver_post SUBROUTINE_cu_gf_driver_post_run - - - gf_memory_counter - Memory counter for GF - none - conv_act - real - (:) - out - F - MODULE_cu_gf_driver_post SCHEME_cu_gf_driver_post SUBROUTINE_cu_gf_driver_post_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_cu_gf_driver_post SCHEME_cu_gf_driver_post SUBROUTINE_cu_gf_driver_post_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_cu_gf_driver_post SCHEME_cu_gf_driver_post SUBROUTINE_cu_gf_driver_post_run - - - - diff --git a/physics/cu_gf_driver_pre.xml b/physics/cu_gf_driver_pre.xml deleted file mode 100644 index 2fcbca746..000000000 --- a/physics/cu_gf_driver_pre.xml +++ /dev/null @@ -1,172 +0,0 @@ - - - - - - - flag_for_first_time_step - flag signaling first time step for time integration loop - flag - flag_init - logical - - in - F - MODULE_cu_gf_driver_pre SCHEME_cu_gf_driver_pre SUBROUTINE_cu_gf_driver_pre_run - - - flag_for_restart - flag for restart (warmstart) or coldstart - flag - flag_restart - logical - - in - F - MODULE_cu_gf_driver_pre SCHEME_cu_gf_driver_pre SUBROUTINE_cu_gf_driver_pre_run - - - index_of_time_step - current forecast iteration - index - kdt - integer - - in - F - MODULE_cu_gf_driver_pre SCHEME_cu_gf_driver_pre SUBROUTINE_cu_gf_driver_pre_run - - - forecast_time - curent forecast time - h - fhour - real - - in - F - MODULE_cu_gf_driver_pre SCHEME_cu_gf_driver_pre SUBROUTINE_cu_gf_driver_pre_run - - - time_step_for_physics - physics timestep - s - dtp - real - - in - F - MODULE_cu_gf_driver_pre SCHEME_cu_gf_driver_pre SUBROUTINE_cu_gf_driver_pre_run - - - air_temperature - model layer mean temperature - K - t - real - (:,:) - in - F - MODULE_cu_gf_driver_pre SCHEME_cu_gf_driver_pre SUBROUTINE_cu_gf_driver_pre_run - - - water_vapor_specific_humidity - water vapor specific humidity - kg kg-1 - q - real - (:,:) - in - F - MODULE_cu_gf_driver_pre SCHEME_cu_gf_driver_pre SUBROUTINE_cu_gf_driver_pre_run - - - temperature_from_previous_timestep - temperature from previous time step - K - prevst - real - (:,:) - in - F - MODULE_cu_gf_driver_pre SCHEME_cu_gf_driver_pre SUBROUTINE_cu_gf_driver_pre_run - - - moisture_from_previous_timestep - moisture from previous time step - kg kg-1 - prevsq - real - (:,:) - in - F - MODULE_cu_gf_driver_pre SCHEME_cu_gf_driver_pre SUBROUTINE_cu_gf_driver_pre_run - - - temperature_tendency_due_to_dynamics - temperature tendency due to dynamics only - K s-1 - forcet - real - (:,:) - out - F - MODULE_cu_gf_driver_pre SCHEME_cu_gf_driver_pre SUBROUTINE_cu_gf_driver_pre_run - - - moisture_tendency_due_to_dynamics - moisture tendency due to dynamics only - kg kg-1 s-1 - forceq - real - (:,:) - out - F - MODULE_cu_gf_driver_pre SCHEME_cu_gf_driver_pre SUBROUTINE_cu_gf_driver_pre_run - - - conv_activity_counter - convective activity memory - none - cactiv - integer - (:) - out - F - MODULE_cu_gf_driver_pre SCHEME_cu_gf_driver_pre SUBROUTINE_cu_gf_driver_pre_run - - - gf_memory_counter - Memory counter for GF - none - conv_act - real - (:) - in - F - MODULE_cu_gf_driver_pre SCHEME_cu_gf_driver_pre SUBROUTINE_cu_gf_driver_pre_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_cu_gf_driver_pre SCHEME_cu_gf_driver_pre SUBROUTINE_cu_gf_driver_pre_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_cu_gf_driver_pre SCHEME_cu_gf_driver_pre SUBROUTINE_cu_gf_driver_pre_run - - - diff --git a/physics/dcyc2t3.xml b/physics/dcyc2t3.xml deleted file mode 100644 index 934c4dbd4..000000000 --- a/physics/dcyc2t3.xml +++ /dev/null @@ -1,546 +0,0 @@ - - - - - - - forecast_hour - forecast time in 24-hour form - h - solhr - real - - in - F - MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run - - - equation_of_time - equation of time - radians - slag - real - - in - F - MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run - - - sine_of_solar_declination_angle - sine of solar declination angle - none - sdec - real - - in - F - MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run - - - cosine_of_solar_declination_angle - cosine of solar declination angle - none - cdec - real - - in - F - MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run - - - sine_of_latitude - sine of latitude - none - sinlat - real - (:) - in - F - MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run - - - cosine_of_latitude - cosine of latitude - none - coslat - real - (:) - in - F - MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run - - - longitude - longitude of grid box - radians - xlon - real - (:) - in - F - MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run - - - cosine_of_zenith_angle - average of cosine of zenith angle over daytime shortwave call time interval - none - coszen - real - (:) - in - F - MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run - - - surface_skin_temperature - surface skin temperature - K - tsea - real - (:) - in - F - MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run - - - air_temperature_at_lowest_model_layer - air temperature at lowest model layer - K - tf - real - (:) - in - F - MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run - - - surface_midlayer_air_temperature_in_longwave_radiation - surface (first layer) air temperature saved in longwave radiation call - K - tsflw - real - (:) - in - F - MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run - - - surface_longwave_emissivity - surface emissivity - frac - sfcemis - real - (:) - in - F - MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run - - - surface_downwelling_shortwave_flux_on_radiation_time_step - total sky surface downwelling shortwave flux on radiation time step - W m-2 - sfcdsw - real - (:) - in - F - MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run - - - surface_net_downwelling_shortwave_flux_on_radiation_time_step - total sky surface net downwelling shortwave flux on radiation time step - W m-2 - sfcnsw - real - (:) - in - F - MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run - - - surface_downwelling_longwave_flux_on_radiation_time_step - total sky surface downwelling longwave flux on radiation time step - W m-2 - sfcdlw - real - (:) - in - F - MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run - - - tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step - total sky shortwave heating rate on radiation time step - K s-1 - swh - real - (:,:) - in - F - MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run - - - tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_time_step - clear sky shortwave heating rate on radiation time step - K s-1 - swhc - real - (:,:) - in - F - MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run - - - tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_step - total sky longwave heating rate on radiation time step - K s-1 - hlw - real - (:,:) - in - F - MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run - - - tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_time_step - clear sky longwave heating rate on radiation time step - K s-1 - hlwc - real - (:,:) - in - F - MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run - - - surface_upwelling_direct_near_infrared_shortwave_flux_on_radiation_time_step - total sky surface upwelling beam near-infrared shortwave flux on radiation time step - W m-2 - sfcnirbmu - real - (:) - in - F - MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run - - - surface_upwelling_diffuse_near_infrared_shortwave_flux_on_radiation_time_step - total sky surface upwelling diffuse near-infrared shortwave flux on radiation time step - W m-2 - sfcnirdfu - real - (:) - in - F - MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run - - - surface_upwelling_direct_ultraviolet_and_visible_shortwave_flux_on_radiation_time_step - total sky surface upwelling beam ultraviolet plus visible shortwave flux on radiation time step - W m-2 - sfcvisbmu - real - (:) - in - F - MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run - - - surface_upwelling_diffuse_ultraviolet_and_visible_shortwave_flux_on_radiation_time_step - total sky surface upwelling diffuse ultraviolet plus visible shortwave flux on radiation time step - W m-2 - sfcvisdfu - real - (:) - in - F - MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run - - - surface_downwelling_direct_near_infrared_shortwave_flux_on_radiation_time_step - total sky surface downwelling beam near-infrared shortwave flux on radiation time step - W m-2 - sfcnirbmd - real - (:) - in - F - MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run - - - surface_downwelling_diffuse_near_infrared_shortwave_flux_on_radiation_time_step - total sky surface downwelling diffuse near-infrared shortwave flux on radiation time step - W m-2 - sfcnirdfd - real - (:) - in - F - MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run - - - surface_downwelling_direct_ultraviolet_and_visible_shortwave_flux_on_radiation_time_step - total sky surface downwelling beam ultraviolet plus visible shortwave flux on radiation time step - W m-2 - sfcvisbmd - real - (:) - in - F - MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run - - - surface_downwelling_diffuse_ultraviolet_and_visible_shortwave_flux_on_radiation_time_step - total sky surface downwelling diffuse ultraviolet plus visible shortwave flux on radiation time step - W m-2 - sfcvisdfd - real - (:) - in - F - MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run - - - horizontal_dimension - horizontal dimension - count - ix - integer - - in - F - MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run - - - horizontal_loop_extent - horizontal loop extent - count - im - integer - - in - F - MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run - - - vertical_dimension - number of vertical layers - count - levs - integer - - in - F - MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run - - - time_step_for_dynamics - dynamics timestep - s - deltim - real - - in - F - MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run - - - tendency_of_air_temperature_due_to_model_physics - total radiative heating rate at current time - K s-1 - dtdt - real - (:,:) - inout - F - MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run - - - tendency_of_air_temperature_due_to_radiative_heating_assuming_clear_sky - clear sky radiative (shortwave + longwave) heating rate at current time - K s-1 - dtdtc - real - (:,:) - inout - F - MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run - - - surface_downwelling_shortwave_flux - surface downwelling shortwave flux at current time - W m-2 - adjsfcdsw - real - (:) - out - F - MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run - - - surface_net_downwelling_shortwave_flux - surface net downwelling shortwave flux at current time - W m-2 - adjsfcnsw - real - (:) - out - F - MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run - - - surface_downwelling_longwave_flux - surface downwelling longwave flux at current time - W m-2 - adjsfcdlw - real - (:) - out - F - MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run - - - surface_upwelling_longwave_flux - surface upwelling longwave flux at current time - W m-2 - adjsfculw - real - (:) - out - F - MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run - - - zenith_angle_temporal_adjustment_factor_for_shortwave_fluxes - zenith angle temporal adjustment factor for shortwave fluxes - none - xmu - real - (:) - out - F - MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run - - - instantaneous_cosine_of_zenith_angle - cosine of zenith angle at current time - none - xcosz - real - (:) - out - F - MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run - - - surface_upwelling_direct_near_infrared_shortwave_flux - surface upwelling beam near-infrared shortwave flux at current time - W m-2 - adjnirbmu - real - (:) - out - F - MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run - - - surface_upwelling_diffuse_near_infrared_shortwave_flux - surface upwelling diffuse near-infrared shortwave flux at current time - W m-2 - adjnirdfu - real - (:) - out - F - MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run - - - surface_upwelling_direct_ultraviolet_and_visible_shortwave_flux - surface upwelling beam ultraviolet plus visible shortwave flux at current time - W m-2 - adjvisbmu - real - (:) - out - F - MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run - - - surface_upwelling_diffuse_ultraviolet_and_visible_shortwave_flux - surface upwelling diffuse ultraviolet plus visible shortwave flux at current time - W m-2 - adjvisdfu - real - (:) - out - F - MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run - - - surface_downwelling_direct_near_infrared_shortwave_flux - surface downwelling beam near-infrared shortwave flux at current time - W m-2 - adjnirbmd - real - (:) - out - F - MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run - - - surface_downwelling_diffuse_near_infrared_shortwave_flux - surface downwelling diffuse near-infrared shortwave flux at current time - W m-2 - adjnirdfd - real - (:) - out - F - MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run - - - surface_downwelling_direct_ultraviolet_and_visible_shortwave_flux - surface downwelling beam ultraviolet plus visible shortwave flux at current time - W m-2 - adjvisbmd - real - (:) - out - F - MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run - - - surface_downwelling_diffuse_ultraviolet_and_visible_shortwave_flux - surface downwelling diffuse ultraviolet plus visible shortwave flux at current time - W m-2 - adjvisdfd - real - (:) - out - F - MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_dcyc2t3 SCHEME_dcyc2t3 SUBROUTINE_dcyc2t3_run - - - diff --git a/physics/dcyc2t3_post.xml b/physics/dcyc2t3_post.xml deleted file mode 100644 index 1c49d2b18..000000000 --- a/physics/dcyc2t3_post.xml +++ /dev/null @@ -1,73 +0,0 @@ - - - - - horizontal_loop_extent - horizontal loop extent - count - im - integer - - in - F - MODULE_dcyc2t3_post SCHEME_dcyc2t3_post SUBROUTINE_dcyc2t3_post_run - - - surface_downwelling_shortwave_flux - surface downwelling shortwave flux at current time - W m-2 - adjsfcdsw - real - (:) - in - F - MODULE_dcyc2t3_post SCHEME_dcyc2t3_post SUBROUTINE_dcyc2t3_post_run - - - surface_net_downwelling_shortwave_flux - surface net downwelling shortwave flux at current time - W m-2 - adjsfcnsw - real - (:) - in - F - MODULE_dcyc2t3_post SCHEME_dcyc2t3_post SUBROUTINE_dcyc2t3_post_run - - - surface_upwelling_shortwave_flux - surface upwelling shortwave flux at current time - W m-2 - adjsfcusw - real - (:) - out - F - MODULE_dcyc2t3_post SCHEME_dcyc2t3_post SUBROUTINE_dcyc2t3_post_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_dcyc2t3_post SCHEME_dcyc2t3_post SUBROUTINE_dcyc2t3_post_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_dcyc2t3_post SCHEME_dcyc2t3_post SUBROUTINE_dcyc2t3_post_run - - - - - diff --git a/physics/get_phi_fv3.xml b/physics/get_phi_fv3.xml deleted file mode 100644 index 12bd103e5..000000000 --- a/physics/get_phi_fv3.xml +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - - horizontal_dimension - horizontal dimension - count - ix - integer - - in - F - MODULE_get_phi_fv3 SCHEME_get_phi_fv3 SUBROUTINE_get_phi_fv3_run - - - vertical_dimension - number of vertical layers - count - levs - integer - - in - F - MODULE_get_phi_fv3 SCHEME_get_phi_fv3 SUBROUTINE_get_phi_fv3_run - - - air_temperature_updated_by_physics - updated air temperature - K - gt0 - real - (:,:) - in - F - MODULE_get_phi_fv3 SCHEME_get_phi_fv3 SUBROUTINE_get_phi_fv3_run - - - water_vapor_specific_humidity_updated_by_physics - mid-layer specific humidity of water vapor - kg kg-1 - gq01 - real - (:,:) - in - F - MODULE_get_phi_fv3 SCHEME_get_phi_fv3 SUBROUTINE_get_phi_fv3_run - - - geopotential_difference_between_midlayers_divided_by_midlayer_virtual_temperature - difference between mid-layer geopotentials divided by mid-layer virtual temperature - m2 s-2 K-1 - del_gz - real - (:,:) - inout - F - MODULE_get_phi_fv3 SCHEME_get_phi_fv3 SUBROUTINE_get_phi_fv3_run - - - geopotential_at_interface - interface geopotential - m2 s-2 - phii - real - (:,:) - out - F - MODULE_get_phi_fv3 SCHEME_get_phi_fv3 SUBROUTINE_get_phi_fv3_run - - - geopotential - mid-layer geopotential - m2 s-2 - phil - real - (:,:) - out - F - MODULE_get_phi_fv3 SCHEME_get_phi_fv3 SUBROUTINE_get_phi_fv3_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_get_phi_fv3 SCHEME_get_phi_fv3 SUBROUTINE_get_phi_fv3_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_get_phi_fv3 SCHEME_get_phi_fv3 SUBROUTINE_get_phi_fv3_run - - - diff --git a/physics/get_prs_fv3.xml b/physics/get_prs_fv3.xml deleted file mode 100644 index adf943a06..000000000 --- a/physics/get_prs_fv3.xml +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - horizontal_dimension - horizontal dimension - count - ix - integer - - in - F - MODULE_get_prs_fv3 SCHEME_get_prs_fv3 SUBROUTINE_get_prs_fv3_run - - - vertical_dimension - number of vertical layers - count - levs - integer - - in - F - MODULE_get_prs_fv3 SCHEME_get_prs_fv3 SUBROUTINE_get_prs_fv3_run - - - geopotential_at_interface - interface geopotential - m2 s-2 - phii - real - (:,:) - in - F - MODULE_get_prs_fv3 SCHEME_get_prs_fv3 SUBROUTINE_get_prs_fv3_run - - - air_pressure_at_interface - interface pressure - Pa - prsi - real - (:,:) - in - F - MODULE_get_prs_fv3 SCHEME_get_prs_fv3 SUBROUTINE_get_prs_fv3_run - - - air_temperature - mid-layer temperature - K - tgrs - real - (:,:) - in - F - MODULE_get_prs_fv3 SCHEME_get_prs_fv3 SUBROUTINE_get_prs_fv3_run - - - water_vapor_specific_humidity - mid-layer specific humidity of water vapor - kg kg-1 - qgrs1 - real - (:,:) - in - F - MODULE_get_prs_fv3 SCHEME_get_prs_fv3 SUBROUTINE_get_prs_fv3_run - - - air_pressure_difference_between_midlayers - difference between mid-layer pressures - Pa - del - real - (:,:) - out - F - MODULE_get_prs_fv3 SCHEME_get_prs_fv3 SUBROUTINE_get_prs_fv3_run - - - geopotential_difference_between_midlayers_divided_by_midlayer_virtual_temperature - difference between mid-layer geopotentials divided by mid-layer virtual temperature - m2 s-2 K-1 - del_gz - real - (:,:) - out - F - MODULE_get_prs_fv3 SCHEME_get_prs_fv3 SUBROUTINE_get_prs_fv3_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_get_prs_fv3 SCHEME_get_prs_fv3 SUBROUTINE_get_prs_fv3_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_get_prs_fv3 SCHEME_get_prs_fv3 SUBROUTINE_get_prs_fv3_run - - - diff --git a/physics/gfdl_cloud_microphys.xml b/physics/gfdl_cloud_microphys.xml deleted file mode 100644 index 9aa7100a5..000000000 --- a/physics/gfdl_cloud_microphys.xml +++ /dev/null @@ -1,504 +0,0 @@ - - - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_gfdl_cloud_microphys SCHEME_gfdl_cloud_microphys SUBROUTINE_gfdl_cloud_microphys_finalize - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_gfdl_cloud_microphys SCHEME_gfdl_cloud_microphys SUBROUTINE_gfdl_cloud_microphys_finalize - - - - - vertical_dimension - number of vertical levels - count - levs - integer - - in - F - MODULE_gfdl_cloud_microphys SCHEME_gfdl_cloud_microphys SUBROUTINE_gfdl_cloud_microphys_run - - - horizontal_loop_extent - horizontal loop extent - count - im - integer - - in - F - MODULE_gfdl_cloud_microphys SCHEME_gfdl_cloud_microphys SUBROUTINE_gfdl_cloud_microphys_run - - - gravitational_acceleration - gravitational acceleration - m s-2 - con_g - real - - in - F - MODULE_gfdl_cloud_microphys SCHEME_gfdl_cloud_microphys SUBROUTINE_gfdl_cloud_microphys_run - - - ratio_of_vapor_to_dry_air_gas_constants_minus_one - rv/rd - 1 (rv = ideal gas constant for water vapor) - none - con_fvirt - real - - in - F - MODULE_gfdl_cloud_microphys SCHEME_gfdl_cloud_microphys SUBROUTINE_gfdl_cloud_microphys_run - - - gas_constant_dry_air - ideal gas constant for dry air - J kg-1 K-1 - con_rd - real - - in - F - MODULE_gfdl_cloud_microphys SCHEME_gfdl_cloud_microphys SUBROUTINE_gfdl_cloud_microphys_run - - - land_area_fraction - land area fraction - frac - frland - real - (:) - in - F - MODULE_gfdl_cloud_microphys SCHEME_gfdl_cloud_microphys SUBROUTINE_gfdl_cloud_microphys_run - - - cell_area - area of grid cell - m2 - garea - real - (:) - in - F - MODULE_gfdl_cloud_microphys SCHEME_gfdl_cloud_microphys SUBROUTINE_gfdl_cloud_microphys_run - - - water_vapor_specific_humidity_updated_by_physics - water vapor specific humidity updated by physics - kg kg-1 - gq0 - real - (:,:) - inout - F - MODULE_gfdl_cloud_microphys SCHEME_gfdl_cloud_microphys SUBROUTINE_gfdl_cloud_microphys_run - - - cloud_condensed_water_mixing_ratio_updated_by_physics - cloud condensed water mixing ratio updated by physics - kg kg-1 - gq0_ntcw - real - (:,:) - inout - F - MODULE_gfdl_cloud_microphys SCHEME_gfdl_cloud_microphys SUBROUTINE_gfdl_cloud_microphys_run - - - rain_water_mixing_ratio_updated_by_physics - moist mixing ratio of rain updated by physics - kg kg-1 - gq0_ntrw - real - (:,:) - inout - F - MODULE_gfdl_cloud_microphys SCHEME_gfdl_cloud_microphys SUBROUTINE_gfdl_cloud_microphys_run - - - ice_water_mixing_ratio_updated_by_physics - moist mixing ratio of cloud ice updated by physics - kg kg-1 - gq0_ntiw - real - (:,:) - inout - F - MODULE_gfdl_cloud_microphys SCHEME_gfdl_cloud_microphys SUBROUTINE_gfdl_cloud_microphys_run - - - snow_water_mixing_ratio_updated_by_physics - moist mixing ratio of snow updated by physics - kg kg-1 - gq0_ntsw - real - (:,:) - inout - F - MODULE_gfdl_cloud_microphys SCHEME_gfdl_cloud_microphys SUBROUTINE_gfdl_cloud_microphys_run - - - graupel_mixing_ratio_updated_by_physics - moist mixing ratio of graupel updated by physics - kg kg-1 - gq0_ntgl - real - (:,:) - inout - F - MODULE_gfdl_cloud_microphys SCHEME_gfdl_cloud_microphys SUBROUTINE_gfdl_cloud_microphys_run - - - cloud_fraction_updated_by_physics - cloud fraction updated by physics - frac - gq0_ntclamt - real - (:,:) - inout - F - MODULE_gfdl_cloud_microphys SCHEME_gfdl_cloud_microphys SUBROUTINE_gfdl_cloud_microphys_run - - - air_temperature_updated_by_physics - air temperature updated by physics - K - gt0 - real - (:,:) - inout - F - MODULE_gfdl_cloud_microphys SCHEME_gfdl_cloud_microphys SUBROUTINE_gfdl_cloud_microphys_run - - - x_wind_updated_by_physics - zonal wind updated by physics - m s-1 - gu0 - real - (:,:) - inout - F - MODULE_gfdl_cloud_microphys SCHEME_gfdl_cloud_microphys SUBROUTINE_gfdl_cloud_microphys_run - - - y_wind_updated_by_physics - meridional wind updated by physics - m s-1 - gv0 - real - (:,:) - inout - F - MODULE_gfdl_cloud_microphys SCHEME_gfdl_cloud_microphys SUBROUTINE_gfdl_cloud_microphys_run - - - omega - layer mean vertical velocity - Pa s-1 - vvl - real - (:,:) - in - F - MODULE_gfdl_cloud_microphys SCHEME_gfdl_cloud_microphys SUBROUTINE_gfdl_cloud_microphys_run - - - air_pressure - mean layer pressure - Pa - prsl - real - (:,:) - in - F - MODULE_gfdl_cloud_microphys SCHEME_gfdl_cloud_microphys SUBROUTINE_gfdl_cloud_microphys_run - - - geopotential_at_interface - geopotential at model layer interfaces - m2 s-2 - phii - real - (:,:) - in - F - MODULE_gfdl_cloud_microphys SCHEME_gfdl_cloud_microphys SUBROUTINE_gfdl_cloud_microphys_run - - - air_pressure_difference_between_midlayers - air pressure difference between mid-layers - Pa - del - real - (:,:) - in - F - MODULE_gfdl_cloud_microphys SCHEME_gfdl_cloud_microphys SUBROUTINE_gfdl_cloud_microphys_run - - - lwe_thickness_of_explicit_rain_amount - explicit rain on physics timestep - m - rain0 - real - (:) - out - F - MODULE_gfdl_cloud_microphys SCHEME_gfdl_cloud_microphys SUBROUTINE_gfdl_cloud_microphys_run - - - lwe_thickness_of_ice_amount - ice fall on physics timestep - m - ice0 - real - (:) - out - F - MODULE_gfdl_cloud_microphys SCHEME_gfdl_cloud_microphys SUBROUTINE_gfdl_cloud_microphys_run - - - lwe_thickness_of_snow_amount - snow fall on physics timestep - m - snow0 - real - (:) - out - F - MODULE_gfdl_cloud_microphys SCHEME_gfdl_cloud_microphys SUBROUTINE_gfdl_cloud_microphys_run - - - lwe_thickness_of_graupel_amount - graupel fall on physics timestep - m - graupel0 - real - (:) - out - F - MODULE_gfdl_cloud_microphys SCHEME_gfdl_cloud_microphys SUBROUTINE_gfdl_cloud_microphys_run - - - lwe_thickness_of_explicit_precipitation_amount - explicit precipitation (rain, ice, snow, graupel) on physics timestep - m - prcp0 - real - (:) - out - F - MODULE_gfdl_cloud_microphys SCHEME_gfdl_cloud_microphys SUBROUTINE_gfdl_cloud_microphys_run - - - ratio_of_snowfall_to_rainfall - snow ratio: ratio of snow to total precipitation - frac - sr - real - (:) - out - F - MODULE_gfdl_cloud_microphys SCHEME_gfdl_cloud_microphys SUBROUTINE_gfdl_cloud_microphys_run - - - time_step_for_physics - physics timestep - s - dtp - real - - in - F - MODULE_gfdl_cloud_microphys SCHEME_gfdl_cloud_microphys SUBROUTINE_gfdl_cloud_microphys_run - - - flag_for_hydrostatic_solver - flag indicating hydrostatic solver - flag - hydrostatic - logical - - in - F - MODULE_gfdl_cloud_microphys SCHEME_gfdl_cloud_microphys SUBROUTINE_gfdl_cloud_microphys_run - - - flag_for_hydrostatic_heating_from_physics - flag indicating hydrostatic heating from physics - flag - phys_hydrostatic - logical - - in - F - MODULE_gfdl_cloud_microphys SCHEME_gfdl_cloud_microphys SUBROUTINE_gfdl_cloud_microphys_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_gfdl_cloud_microphys SCHEME_gfdl_cloud_microphys SUBROUTINE_gfdl_cloud_microphys_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_gfdl_cloud_microphys SCHEME_gfdl_cloud_microphys SUBROUTINE_gfdl_cloud_microphys_run - - - - - mpi_rank - MPI rank of current process - index - me - integer - - in - F - MODULE_gfdl_cloud_microphys SCHEME_gfdl_cloud_microphys SUBROUTINE_gfdl_cloud_microphys_init - - - mpi_root - MPI rank of master process - index - master - integer - - in - F - MODULE_gfdl_cloud_microphys SCHEME_gfdl_cloud_microphys SUBROUTINE_gfdl_cloud_microphys_init - - - iounit_namelist - fortran unit number for opening nameliust file - none - nlunit - integer - - in - F - MODULE_gfdl_cloud_microphys SCHEME_gfdl_cloud_microphys SUBROUTINE_gfdl_cloud_microphys_init - - - namelist_filename_for_internal_file_reads - character string to store full namelist contents - none - input_nml_file - character - (:) - in - F - MODULE_gfdl_cloud_microphys SCHEME_gfdl_cloud_microphys SUBROUTINE_gfdl_cloud_microphys_init - - - iounit_log - fortran unit number for writing logfile - none - logunit - integer - - in - F - MODULE_gfdl_cloud_microphys SCHEME_gfdl_cloud_microphys SUBROUTINE_gfdl_cloud_microphys_init - - - namelist_filename - namelist filename - none - fn_nml - character - - in - F - MODULE_gfdl_cloud_microphys SCHEME_gfdl_cloud_microphys SUBROUTINE_gfdl_cloud_microphys_init - - - flag_for_microphysics_scheme - choice of microphysics scheme - flag - imp_physics - integer - - in - F - MODULE_gfdl_cloud_microphys SCHEME_gfdl_cloud_microphys SUBROUTINE_gfdl_cloud_microphys_init - - - flag_for_gfdl_microphysics_scheme - choice of GFDL microphysics scheme - flag - imp_physics_gfdl - integer - - in - F - MODULE_gfdl_cloud_microphys SCHEME_gfdl_cloud_microphys SUBROUTINE_gfdl_cloud_microphys_init - - - flag_for_shoc - flag to indicate use of SHOC - flag - do_shoc - logical - - in - F - MODULE_gfdl_cloud_microphys SCHEME_gfdl_cloud_microphys SUBROUTINE_gfdl_cloud_microphys_init - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_gfdl_cloud_microphys SCHEME_gfdl_cloud_microphys SUBROUTINE_gfdl_cloud_microphys_init - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_gfdl_cloud_microphys SCHEME_gfdl_cloud_microphys SUBROUTINE_gfdl_cloud_microphys_init - - - diff --git a/physics/gmtb_scm_sfc_flux_spec.xml b/physics/gmtb_scm_sfc_flux_spec.xml deleted file mode 100644 index fa23ff323..000000000 --- a/physics/gmtb_scm_sfc_flux_spec.xml +++ /dev/null @@ -1,381 +0,0 @@ - - - - - - x_wind_at_lowest_model_layer - x component of 1st model layer wind - m s-1 - u1 - real - (:) - in - F - MODULE_gmtb_scm_sfc_flux_spec SCHEME_gmtb_scm_sfc_flux_spec SUBROUTINE_gmtb_scm_sfc_flux_spec_run - - - y_wind_at_lowest_model_layer - y component of 1st model layer wind - m s-1 - v1 - real - (:) - in - F - MODULE_gmtb_scm_sfc_flux_spec SCHEME_gmtb_scm_sfc_flux_spec SUBROUTINE_gmtb_scm_sfc_flux_spec_run - - - height_above_ground_at_lowest_model_layer - height above ground at 1st model layer - m - z1 - real - (:) - in - F - MODULE_gmtb_scm_sfc_flux_spec SCHEME_gmtb_scm_sfc_flux_spec SUBROUTINE_gmtb_scm_sfc_flux_spec_run - - - air_temperature_at_lowest_model_layer - 1st model layer air temperature - K - t1 - real - (:) - in - F - MODULE_gmtb_scm_sfc_flux_spec SCHEME_gmtb_scm_sfc_flux_spec SUBROUTINE_gmtb_scm_sfc_flux_spec_run - - - water_vapor_specific_humidity_at_lowest_model_layer - 1st model layer specific humidity - kg kg-1 - q1 - real - (:) - in - F - MODULE_gmtb_scm_sfc_flux_spec SCHEME_gmtb_scm_sfc_flux_spec SUBROUTINE_gmtb_scm_sfc_flux_spec_run - - - air_pressure_at_lowest_model_layer - Model layer 1 mean pressure - Pa - p1 - real - (:) - in - F - MODULE_gmtb_scm_sfc_flux_spec SCHEME_gmtb_scm_sfc_flux_spec SUBROUTINE_gmtb_scm_sfc_flux_spec_run - - - surface_roughness_length - surface roughness length - cm - roughness_length - real - (:) - in - F - MODULE_gmtb_scm_sfc_flux_spec SCHEME_gmtb_scm_sfc_flux_spec SUBROUTINE_gmtb_scm_sfc_flux_spec_run - - - specified_kinematic_surface_upward_sensible_heat_flux - specified kinematic surface upward sensible heat flux - K m s-1 - spec_sh_flux - real - (:) - in - F - MODULE_gmtb_scm_sfc_flux_spec SCHEME_gmtb_scm_sfc_flux_spec SUBROUTINE_gmtb_scm_sfc_flux_spec_run - - - specified_kinematic_surface_upward_latent_heat_flux - specified kinematic surface upward latent heat flux - kg kg-1 m s-1 - spec_lh_flux - real - (:) - in - F - MODULE_gmtb_scm_sfc_flux_spec SCHEME_gmtb_scm_sfc_flux_spec SUBROUTINE_gmtb_scm_sfc_flux_spec_run - - - ratio_of_exner_function_between_midlayer_and_interface_at_lowest_model_layer - Exner function ratio bt midlayer and interface at 1st layer - ratio - exner_inverse - real - (:) - in - F - MODULE_gmtb_scm_sfc_flux_spec SCHEME_gmtb_scm_sfc_flux_spec SUBROUTINE_gmtb_scm_sfc_flux_spec_run - - - surface_skin_temperature - surface skin temperature - K - T_surf - real - (:) - in - F - MODULE_gmtb_scm_sfc_flux_spec SCHEME_gmtb_scm_sfc_flux_spec SUBROUTINE_gmtb_scm_sfc_flux_spec_run - - - specific_heat_of_dry_air_at_constant_pressure - specific heat of dry air at constant pressure - J kg-1 K-1 - cp - real - - in - F - MODULE_gmtb_scm_sfc_flux_spec SCHEME_gmtb_scm_sfc_flux_spec SUBROUTINE_gmtb_scm_sfc_flux_spec_run - - - gravitational_acceleration - gravitational acceleration - m s-2 - grav - real - - in - F - MODULE_gmtb_scm_sfc_flux_spec SCHEME_gmtb_scm_sfc_flux_spec SUBROUTINE_gmtb_scm_sfc_flux_spec_run - - - latent_heat_of_vaporization_of_water_at_0C - latent heat of vaporization of water at 0C - J kg-1 - hvap - real - - in - F - MODULE_gmtb_scm_sfc_flux_spec SCHEME_gmtb_scm_sfc_flux_spec SUBROUTINE_gmtb_scm_sfc_flux_spec_run - - - gas_constant_dry_air - ideal gas constant for dry air - J kg-1 K-1 - rd - real - - in - F - MODULE_gmtb_scm_sfc_flux_spec SCHEME_gmtb_scm_sfc_flux_spec SUBROUTINE_gmtb_scm_sfc_flux_spec_run - - - ratio_of_vapor_to_dry_air_gas_constants_minus_one - rv/rd - 1 (rv = ideal gas constant for water vapor) - none - fvirt - real - - in - F - MODULE_gmtb_scm_sfc_flux_spec SCHEME_gmtb_scm_sfc_flux_spec SUBROUTINE_gmtb_scm_sfc_flux_spec_run - - - vonKarman_constant - vonKarman constant - none - vonKarman - real - - in - F - MODULE_gmtb_scm_sfc_flux_spec SCHEME_gmtb_scm_sfc_flux_spec SUBROUTINE_gmtb_scm_sfc_flux_spec_run - - - kinematic_surface_upward_sensible_heat_flux - surface upward sensible heat flux - K m s-1 - sh_flux - real - (:) - out - F - MODULE_gmtb_scm_sfc_flux_spec SCHEME_gmtb_scm_sfc_flux_spec SUBROUTINE_gmtb_scm_sfc_flux_spec_run - - - kinematic_surface_upward_latent_heat_flux - surface upward evaporation flux - kg kg-1 m s-1 - lh_flux - real - (:) - out - F - MODULE_gmtb_scm_sfc_flux_spec SCHEME_gmtb_scm_sfc_flux_spec SUBROUTINE_gmtb_scm_sfc_flux_spec_run - - - surface_friction_velocity - boundary layer parameter - m s-1 - u_star - real - (:) - out - F - MODULE_gmtb_scm_sfc_flux_spec SCHEME_gmtb_scm_sfc_flux_spec SUBROUTINE_gmtb_scm_sfc_flux_spec_run - - - surface_wind_stress - surface wind stress - m2 s-2 - sfc_stress - real - (:) - out - F - MODULE_gmtb_scm_sfc_flux_spec SCHEME_gmtb_scm_sfc_flux_spec SUBROUTINE_gmtb_scm_sfc_flux_spec_run - - - surface_drag_coefficient_for_momentum_in_air - surface exchange coeff for momentum - none - cm - real - (:) - out - F - MODULE_gmtb_scm_sfc_flux_spec SCHEME_gmtb_scm_sfc_flux_spec SUBROUTINE_gmtb_scm_sfc_flux_spec_run - - - surface_drag_coefficient_for_heat_and_moisture_in_air - surface exchange coeff heat moisture - none - ch - real - (:) - out - F - MODULE_gmtb_scm_sfc_flux_spec SCHEME_gmtb_scm_sfc_flux_spec SUBROUTINE_gmtb_scm_sfc_flux_spec_run - - - Monin-Obukhov_similarity_function_for_momentum - Monin-Obukhov similarity function for momentum - none - fm - real - (:) - out - F - MODULE_gmtb_scm_sfc_flux_spec SCHEME_gmtb_scm_sfc_flux_spec SUBROUTINE_gmtb_scm_sfc_flux_spec_run - - - Monin-Obukhov_similarity_function_for_heat - Monin-Obukhov similarity function for heat - none - fh - real - (:) - out - F - MODULE_gmtb_scm_sfc_flux_spec SCHEME_gmtb_scm_sfc_flux_spec SUBROUTINE_gmtb_scm_sfc_flux_spec_run - - - bulk_richardson_number_at_lowest_model_level - bulk Richardson number at the surface - none - rb - real - (:) - out - F - MODULE_gmtb_scm_sfc_flux_spec SCHEME_gmtb_scm_sfc_flux_spec SUBROUTINE_gmtb_scm_sfc_flux_spec_run - - - x_wind_at_10m - 10 meter u wind speed - m s-1 - u10m - real - (:) - out - F - MODULE_gmtb_scm_sfc_flux_spec SCHEME_gmtb_scm_sfc_flux_spec SUBROUTINE_gmtb_scm_sfc_flux_spec_run - - - y_wind_at_10m - 10 meter v wind speed - m s-1 - v10m - real - (:) - out - F - MODULE_gmtb_scm_sfc_flux_spec SCHEME_gmtb_scm_sfc_flux_spec SUBROUTINE_gmtb_scm_sfc_flux_spec_run - - - wind_speed_at_lowest_model_layer - wind speed at lowest model level - m s-1 - wind1 - real - (:) - out - F - MODULE_gmtb_scm_sfc_flux_spec SCHEME_gmtb_scm_sfc_flux_spec SUBROUTINE_gmtb_scm_sfc_flux_spec_run - - - surface_specific_humidity - surface air saturation specific humidity - kg kg-1 - qss - real - (:) - out - F - MODULE_gmtb_scm_sfc_flux_spec SCHEME_gmtb_scm_sfc_flux_spec SUBROUTINE_gmtb_scm_sfc_flux_spec_run - - - temperature_at_2m - 2 meter temperature - K - t2m - real - (:) - out - F - MODULE_gmtb_scm_sfc_flux_spec SCHEME_gmtb_scm_sfc_flux_spec SUBROUTINE_gmtb_scm_sfc_flux_spec_run - - - specific_humidity_at_2m - 2 meter specific humidity - kg kg-1 - q2m - real - (:) - out - F - MODULE_gmtb_scm_sfc_flux_spec SCHEME_gmtb_scm_sfc_flux_spec SUBROUTINE_gmtb_scm_sfc_flux_spec_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_gmtb_scm_sfc_flux_spec SCHEME_gmtb_scm_sfc_flux_spec SUBROUTINE_gmtb_scm_sfc_flux_spec_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_gmtb_scm_sfc_flux_spec SCHEME_gmtb_scm_sfc_flux_spec SUBROUTINE_gmtb_scm_sfc_flux_spec_run - - - - diff --git a/physics/gwdc.xml b/physics/gwdc.xml deleted file mode 100644 index 28023d915..000000000 --- a/physics/gwdc.xml +++ /dev/null @@ -1,359 +0,0 @@ - - - - - horizontal_loop_extent - horizontal loop extent - count - im - integer - - in - F - MODULE_gwdc SCHEME_gwdc SUBROUTINE_gwdc_run - - - horizontal_dimension - horizontal dimension - count - ix - integer - - in - F - MODULE_gwdc SCHEME_gwdc SUBROUTINE_gwdc_run - - - vertical_dimension - number of vertical layers - count - km - integer - - in - F - MODULE_gwdc SCHEME_gwdc SUBROUTINE_gwdc_run - - - latitude_index_in_debug_printouts - latitude index in debug printouts - index - lat - integer - - in - F - MODULE_gwdc SCHEME_gwdc SUBROUTINE_gwdc_run - - - x_wind - zonal wind - m s-1 - u1 - real - (:,:) - in - F - MODULE_gwdc SCHEME_gwdc SUBROUTINE_gwdc_run - - - y_wind - meridional wind - m s-1 - v1 - real - (:,:) - in - F - MODULE_gwdc SCHEME_gwdc SUBROUTINE_gwdc_run - - - air_temperature - mid-layer temperature - K - t1 - real - (:,:) - in - F - MODULE_gwdc SCHEME_gwdc SUBROUTINE_gwdc_run - - - water_vapor_specific_humidity - mid-layer specific humidity of water vapor - kg kg-1 - q1 - real - (:,:) - in - F - MODULE_gwdc SCHEME_gwdc SUBROUTINE_gwdc_run - - - time_step_for_physics - physics time step - s - deltim - real - - in - F - MODULE_gwdc SCHEME_gwdc SUBROUTINE_gwdc_run - - - air_pressure - mid-layer pressure - Pa - pmid1 - real - (:,:) - in - F - MODULE_gwdc SCHEME_gwdc SUBROUTINE_gwdc_run - - - air_pressure_at_interface - interface pressure - Pa - pint1 - real - (:,:) - in - F - MODULE_gwdc SCHEME_gwdc SUBROUTINE_gwdc_run - - - air_pressure_difference_between_midlayers - difference between mid-layer pressures - Pa - dpmid1 - real - (:,:) - in - F - MODULE_gwdc SCHEME_gwdc SUBROUTINE_gwdc_run - - - maximum_column_heating_rate - maximum heating rate in column - K s-1 - qmax - real - (:) - in - F - MODULE_gwdc SCHEME_gwdc SUBROUTINE_gwdc_run - - - vertical_index_at_cloud_top - vertical index at cloud top - index - ktop - integer - (:) - in - F - MODULE_gwdc SCHEME_gwdc SUBROUTINE_gwdc_run - - - vertical_index_at_cloud_base - vertical index at cloud base - index - kbot - integer - (:) - in - F - MODULE_gwdc SCHEME_gwdc SUBROUTINE_gwdc_run - - - flag_deep_convection - flag indicating whether convection occurs in column (0 or 1) - flag - kcnv - integer - (:) - in - F - MODULE_gwdc SCHEME_gwdc SUBROUTINE_gwdc_run - - - cloud_area_fraction - fraction of grid box area in which updrafts occur - frac - cldf - real - (:) - in - F - MODULE_gwdc SCHEME_gwdc SUBROUTINE_gwdc_run - - - gravitational_acceleration - gravitational acceleration - m s-2 - grav - real - - in - F - MODULE_gwdc SCHEME_gwdc SUBROUTINE_gwdc_run - - - specific_heat_of_dry_air_at_constant_pressure - specific heat of dry air at constant pressure - J kg-1 K-1 - cp - real - - in - F - MODULE_gwdc SCHEME_gwdc SUBROUTINE_gwdc_run - - - gas_constant_dry_air - ideal gas constant for dry air - J kg-1 K-1 - rd - real - - in - F - MODULE_gwdc SCHEME_gwdc SUBROUTINE_gwdc_run - - - ratio_of_vapor_to_dry_air_gas_constants_minus_one - rv/rd - 1 (rv = ideal gas constant for water vapor) - none - fv - real - - in - F - MODULE_gwdc SCHEME_gwdc SUBROUTINE_gwdc_run - - - pi - ratio of a circle's circumference to its diameter - radians - pi - real - - in - F - MODULE_gwdc SCHEME_gwdc SUBROUTINE_gwdc_run - - - characteristic_grid_length_scale - representative horizontal length scale of grid box - m - dlength - real - (:) - in - F - MODULE_gwdc SCHEME_gwdc SUBROUTINE_gwdc_run - - - flag_print - flag for debugging printouts - flag - lprnt - logical - - in - F - MODULE_gwdc SCHEME_gwdc SUBROUTINE_gwdc_run - - - horizontal_index_of_printed_column - horizontal index of column used in debugging printouts - index - ipr - integer - - in - F - MODULE_gwdc SCHEME_gwdc SUBROUTINE_gwdc_run - - - forecast_time - forecast hour - h - fhour - real - - in - F - MODULE_gwdc SCHEME_gwdc SUBROUTINE_gwdc_run - - - tendency_of_x_wind_due_to_convective_gravity_wave_drag - zonal wind tendency due to convective gravity wave drag - m s-2 - utgwc - real - (:,:) - out - F - MODULE_gwdc SCHEME_gwdc SUBROUTINE_gwdc_run - - - tendency_of_y_wind_due_to_convective_gravity_wave_drag - meridional wind tendency due to convective gravity wave drag - m s-2 - vtgwc - real - (:,:) - out - F - MODULE_gwdc SCHEME_gwdc SUBROUTINE_gwdc_run - - - instantaneous_x_stress_due_to_gravity_wave_drag - zonal stress at cloud top due to convective gravity wave drag - Pa - tauctx - real - (:) - out - F - MODULE_gwdc SCHEME_gwdc SUBROUTINE_gwdc_run - - - instantaneous_y_stress_due_to_gravity_wave_drag - meridional stress at cloud top due to convective gravity wave drag - Pa - taucty - real - (:) - out - F - MODULE_gwdc SCHEME_gwdc SUBROUTINE_gwdc_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_gwdc SCHEME_gwdc SUBROUTINE_gwdc_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_gwdc SCHEME_gwdc SUBROUTINE_gwdc_run - - - - - diff --git a/physics/gwdc_post.xml b/physics/gwdc_post.xml deleted file mode 100644 index 9ac2fd3c2..000000000 --- a/physics/gwdc_post.xml +++ /dev/null @@ -1,227 +0,0 @@ - - - - - - - horizontal_loop_extent - horizontal loop extent - count - im - integer - - in - F - MODULE_gwdc_post SCHEME_gwdc_post SUBROUTINE_gwdc_post_run - - - vertical_dimension - number of vertical layers - count - levs - integer - - in - F - MODULE_gwdc_post SCHEME_gwdc_post SUBROUTINE_gwdc_post_run - - - flag_diagnostics - flag for calculating diagnostic fields - flag - lssav - logical - - in - F - MODULE_gwdc_post SCHEME_gwdc_post SUBROUTINE_gwdc_post_run - - - flag_diagnostics_3D - flag for calculating 3-D diagnostic fields - flag - ldiag3d - logical - - in - F - MODULE_gwdc_post SCHEME_gwdc_post SUBROUTINE_gwdc_post_run - - - time_step_for_dynamics - dynamics time step - s - dtf - real - - in - F - MODULE_gwdc_post SCHEME_gwdc_post SUBROUTINE_gwdc_post_run - - - time_step_for_physics - physics time step - s - dtp - real - - in - F - MODULE_gwdc_post SCHEME_gwdc_post SUBROUTINE_gwdc_post_run - - - specific_heat_of_dry_air_at_constant_pressure - specific heat of dry air at constant pressure - J kg-1 K-1 - con_cp - real - - in - F - MODULE_gwdc_post SCHEME_gwdc_post SUBROUTINE_gwdc_post_run - - - instantaneous_x_stress_due_to_gravity_wave_drag - zonal stress at cloud top due to convective gravity wave drag - Pa - tauctx - real - (:) - in - F - MODULE_gwdc_post SCHEME_gwdc_post SUBROUTINE_gwdc_post_run - - - instantaneous_y_stress_due_to_gravity_wave_drag - meridional stress at cloud top due to convective gravity wave drag - Pa - taucty - real - (:) - in - F - MODULE_gwdc_post SCHEME_gwdc_post SUBROUTINE_gwdc_post_run - - - tendency_of_x_wind_due_to_convective_gravity_wave_drag - zonal wind tendency due to convective gravity wave drag - m s-2 - gwdcu - real - (:,:) - in - F - MODULE_gwdc_post SCHEME_gwdc_post SUBROUTINE_gwdc_post_run - - - tendency_of_y_wind_due_to_convective_gravity_wave_drag - meridional wind tendency due to convective gravity wave drag - m s-2 - gwdcv - real - (:,:) - in - F - MODULE_gwdc_post SCHEME_gwdc_post SUBROUTINE_gwdc_post_run - - - time_integral_of_x_stress_due_to_gravity_wave_drag - integral over time of zonal stress due to gravity wave drag - Pa s - dugwd - real - (:) - inout - F - MODULE_gwdc_post SCHEME_gwdc_post SUBROUTINE_gwdc_post_run - - - time_integral_of_y_stress_due_to_gravity_wave_drag - integral over time of meridional stress due to gravity wave drag - Pa s - dvgwd - real - (:) - inout - F - MODULE_gwdc_post SCHEME_gwdc_post SUBROUTINE_gwdc_post_run - - - cumulative_change_in_x_wind_due_to_convective_gravity_wave_drag - cumulative change in zonal wind due to convective gravity wave drag - m s-1 - du3dt - real - (:,:) - inout - F - MODULE_gwdc_post SCHEME_gwdc_post SUBROUTINE_gwdc_post_run - - - cumulative_change_in_y_wind_due_to_convective_gravity_wave_drag - cumulative change in meridional wind due to convective gravity wave drag - m s-1 - dv3dt - real - (:,:) - inout - F - MODULE_gwdc_post SCHEME_gwdc_post SUBROUTINE_gwdc_post_run - - - x_wind_updated_by_physics - updated zonal wind - m s-1 - gu0 - real - (:,:) - inout - F - MODULE_gwdc_post SCHEME_gwdc_post SUBROUTINE_gwdc_post_run - - - y_wind_updated_by_physics - updated meridional wind - m s-1 - gv0 - real - (:,:) - inout - F - MODULE_gwdc_post SCHEME_gwdc_post SUBROUTINE_gwdc_post_run - - - air_temperature_updated_by_physics - updated air temperature - K - gt0 - real - (:,:) - inout - F - MODULE_gwdc_post SCHEME_gwdc_post SUBROUTINE_gwdc_post_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_gwdc_post SCHEME_gwdc_post SUBROUTINE_gwdc_post_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_gwdc_post SCHEME_gwdc_post SUBROUTINE_gwdc_post_run - - - diff --git a/physics/gwdc_pre.xml b/physics/gwdc_pre.xml deleted file mode 100644 index 89d7fb9bf..000000000 --- a/physics/gwdc_pre.xml +++ /dev/null @@ -1,194 +0,0 @@ - - - - - - - horizontal_loop_extent - horizontal loop extent - count - im - integer - - in - F - MODULE_gwdc_pre SCHEME_gwdc_pre SUBROUTINE_gwdc_pre_run - - - multiplication_factors_for_convective_gravity_wave_drag - multiplication factors for convective gravity wave drag - none - cgwf - real - (:) - in - F - MODULE_gwdc_pre SCHEME_gwdc_pre SUBROUTINE_gwdc_pre_run - - - cell_size - grid size in zonal direction - m - dx - real - (:) - in - F - MODULE_gwdc_pre SCHEME_gwdc_pre SUBROUTINE_gwdc_pre_run - - - grid_size_related_coefficient_used_in_scale-sensitive_schemes - grid size related coefficient used in scale-sensitive schemes - none - work1 - real - (:) - in - F - MODULE_gwdc_pre SCHEME_gwdc_pre SUBROUTINE_gwdc_pre_run - - - grid_size_related_coefficient_used_in_scale-sensitive_schemes_complement - complement to work1 - none - work2 - real - (:) - in - F - MODULE_gwdc_pre SCHEME_gwdc_pre SUBROUTINE_gwdc_pre_run - - - characteristic_grid_length_scale - representative horizontal length scale of grid box - m - dlength - real - (:) - out - F - MODULE_gwdc_pre SCHEME_gwdc_pre SUBROUTINE_gwdc_pre_run - - - cloud_area_fraction - fraction of grid box area in which updrafts occur - frac - cldf - real - (:) - out - F - MODULE_gwdc_pre SCHEME_gwdc_pre SUBROUTINE_gwdc_pre_run - - - vertical_dimension - number of vertical layers - count - levs - integer - - in - F - MODULE_gwdc_pre SCHEME_gwdc_pre SUBROUTINE_gwdc_pre_run - - - vertical_index_at_cloud_base - vertical index at cloud base - index - kbot - integer - (:) - in - F - MODULE_gwdc_pre SCHEME_gwdc_pre SUBROUTINE_gwdc_pre_run - - - vertical_index_at_cloud_top - vertical index at cloud top - index - ktop - integer - (:) - in - F - MODULE_gwdc_pre SCHEME_gwdc_pre SUBROUTINE_gwdc_pre_run - - - time_step_for_physics - physics time step - s - dtp - real - - in - F - MODULE_gwdc_pre SCHEME_gwdc_pre SUBROUTINE_gwdc_pre_run - - - air_temperature_updated_by_physics - updated air temperature - K - gt0 - real - (:,:) - in - F - MODULE_gwdc_pre SCHEME_gwdc_pre SUBROUTINE_gwdc_pre_run - - - air_temperature_save - air temperature before entering convection scheme - K - gt0_init - real - (:,:) - in - F - MODULE_gwdc_pre SCHEME_gwdc_pre SUBROUTINE_gwdc_pre_run - - - air_pressure_difference_between_midlayers - difference between mid-layer pressures - Pa - del - real - (:,:) - in - F - MODULE_gwdc_pre SCHEME_gwdc_pre SUBROUTINE_gwdc_pre_run - - - maximum_column_heating_rate - maximum heating rate in column - K s-1 - cumabs - real - (:) - out - F - MODULE_gwdc_pre SCHEME_gwdc_pre SUBROUTINE_gwdc_pre_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_gwdc_pre SCHEME_gwdc_pre SUBROUTINE_gwdc_pre_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_gwdc_pre SCHEME_gwdc_pre SUBROUTINE_gwdc_pre_run - - - diff --git a/physics/gwdps.xml b/physics/gwdps.xml deleted file mode 100644 index e6098a444..000000000 --- a/physics/gwdps.xml +++ /dev/null @@ -1,469 +0,0 @@ - - - - - - horizontal_loop_extent - horizontal loop extent - count - im - integer - - in - F - MODULE_gwdps SCHEME_gwdps SUBROUTINE_gwdps_run - - - horizontal_dimension - horizontal dimension - count - ix - integer - - in - F - MODULE_gwdps SCHEME_gwdps SUBROUTINE_gwdps_run - - - vertical_dimension - number of vertical layers - count - km - integer - - in - F - MODULE_gwdps SCHEME_gwdps SUBROUTINE_gwdps_run - - - tendency_of_y_wind_due_to_model_physics - meridional wind tendency due to model physics - m s-2 - A - real - (:,:) - inout - F - MODULE_gwdps SCHEME_gwdps SUBROUTINE_gwdps_run - - - tendency_of_x_wind_due_to_model_physics - zonal wind tendency due to model physics - m s-2 - B - real - (:,:) - inout - F - MODULE_gwdps SCHEME_gwdps SUBROUTINE_gwdps_run - - - tendency_of_air_temperature_due_to_model_physics - air temperature tendency due to model physics - K s-1 - C - real - (:,:) - inout - F - MODULE_gwdps SCHEME_gwdps SUBROUTINE_gwdps_run - - - x_wind - zonal wind - m s-1 - u1 - real - (:,:) - in - F - MODULE_gwdps SCHEME_gwdps SUBROUTINE_gwdps_run - - - y_wind - meridional wind - m s-1 - v1 - real - (:,:) - in - F - MODULE_gwdps SCHEME_gwdps SUBROUTINE_gwdps_run - - - air_temperature - mid-layer temperature - K - t1 - real - (:,:) - in - F - MODULE_gwdps SCHEME_gwdps SUBROUTINE_gwdps_run - - - water_vapor_specific_humidity - mid-layer specific humidity of water vapor - kg kg-1 - q1 - real - (:,:) - in - F - MODULE_gwdps SCHEME_gwdps SUBROUTINE_gwdps_run - - - vertical_index_at_top_of_atmosphere_boundary_layer - vertical index at top atmospheric boundary layer - index - kpbl - integer - (:) - in - F - MODULE_gwdps SCHEME_gwdps SUBROUTINE_gwdps_run - - - air_pressure_at_interface - interface pressure - Pa - prsi - real - (:,:) - in - F - MODULE_gwdps SCHEME_gwdps SUBROUTINE_gwdps_run - - - air_pressure_difference_between_midlayers - difference between mid-layer pressures - Pa - del - real - (:,:) - in - F - MODULE_gwdps SCHEME_gwdps SUBROUTINE_gwdps_run - - - air_pressure - mid-layer pressure - Pa - prsl - real - (:,:) - in - F - MODULE_gwdps SCHEME_gwdps SUBROUTINE_gwdps_run - - - dimensionless_exner_function_at_model_layers - mid-layer Exner function - none - prslk - real - (:,:) - in - F - MODULE_gwdps SCHEME_gwdps SUBROUTINE_gwdps_run - - - geopotential_at_interface - interface geopotential - m2 s-2 - phii - real - (:,:) - in - F - MODULE_gwdps SCHEME_gwdps SUBROUTINE_gwdps_run - - - geopotential - mid-layer geopotential - m2 s-2 - phil - real - (:,:) - in - F - MODULE_gwdps SCHEME_gwdps SUBROUTINE_gwdps_run - - - time_step_for_physics - physics time step - s - deltim - real - - in - F - MODULE_gwdps SCHEME_gwdps SUBROUTINE_gwdps_run - - - index_of_time_step - current time step index - index - kdt - integer - - in - F - MODULE_gwdps SCHEME_gwdps SUBROUTINE_gwdps_run - - - standard_deviation_of_subgrid_orography - standard deviation of subgrid orography - m - hprime - real - (:) - in - F - MODULE_gwdps SCHEME_gwdps SUBROUTINE_gwdps_run - - - convexity_of_subgrid_orography - convexity of subgrid orography - none - oc - real - (:) - in - F - MODULE_gwdps SCHEME_gwdps SUBROUTINE_gwdps_run - - - asymmetry_of_subgrid_orography - asymmetry of subgrid orography - none - oa4 - real - (:,:) - in - F - MODULE_gwdps SCHEME_gwdps SUBROUTINE_gwdps_run - - - fraction_of_grid_box_with_subgrid_orography_higher_than_critical_height - horizontal fraction of grid box covered by subgrid orography higher than critical height - frac - clx4 - real - (:,:) - in - F - MODULE_gwdps SCHEME_gwdps SUBROUTINE_gwdps_run - - - angle_from_east_of_maximum_subgrid_orographic_variations - angle with respect to east of maximum subgrid orographic variations - degrees - theta - real - (:) - in - F - MODULE_gwdps SCHEME_gwdps SUBROUTINE_gwdps_run - - - slope_of_subgrid_orography - slope of subgrid orography - none - sigma - real - (:) - in - F - MODULE_gwdps SCHEME_gwdps SUBROUTINE_gwdps_run - - - anisotropy_of_subgrid_orography - anisotropy of subgrid orography - none - gamma - real - (:) - in - F - MODULE_gwdps SCHEME_gwdps SUBROUTINE_gwdps_run - - - maximum_subgrid_orography - maximum of subgrid orography - m - elvmax - real - (:) - inout - F - MODULE_gwdps SCHEME_gwdps SUBROUTINE_gwdps_run - - - instantaneous_x_stress_due_to_gravity_wave_drag - zonal surface stress due to orographic gravity wave drag - Pa - dusfc - real - (:) - out - F - MODULE_gwdps SCHEME_gwdps SUBROUTINE_gwdps_run - - - instantaneous_y_stress_due_to_gravity_wave_drag - meridional surface stress due to orographic gravity wave drag - Pa - dvsfc - real - (:) - out - F - MODULE_gwdps SCHEME_gwdps SUBROUTINE_gwdps_run - - - gravitational_acceleration - gravitational acceleration - m s-2 - g - real - - in - F - MODULE_gwdps SCHEME_gwdps SUBROUTINE_gwdps_run - - - specific_heat_of_dry_air_at_constant_pressure - specific heat of dry air at constant pressure - J kg-1 K-1 - cp - real - - in - F - MODULE_gwdps SCHEME_gwdps SUBROUTINE_gwdps_run - - - gas_constant_dry_air - ideal gas constant for dry air - J kg-1 K-1 - rd - real - - in - F - MODULE_gwdps SCHEME_gwdps SUBROUTINE_gwdps_run - - - gas_constant_water_vapor - ideal gas constant for water vapor - J kg-1 K-1 - rv - real - - in - F - MODULE_gwdps SCHEME_gwdps SUBROUTINE_gwdps_run - - - number_of_equatorial_longitude_points - number of longitude points along the equator - count - imx - integer - - in - F - MODULE_gwdps SCHEME_gwdps SUBROUTINE_gwdps_run - - - number_of_statistical_measures_of_subgrid_orography - number of statistical measures of subgrid orography - count - nmtvr - integer - - in - F - MODULE_gwdps SCHEME_gwdps SUBROUTINE_gwdps_run - - - multiplication_factors_for_mountain_blocking_and_orographic_gravity_wave_drag - multiplic. factors for (1) mountain blocking drag coeff. and (2) ref. level orographic gravity wave drag - none - cdmbgwd - real - (:) - in - F - MODULE_gwdps SCHEME_gwdps SUBROUTINE_gwdps_run - - - mpi_rank - rank of the current MPI task - index - me - integer - - in - F - MODULE_gwdps SCHEME_gwdps SUBROUTINE_gwdps_run - - - flag_print - flag for debugging printouts - flag - lprnt - logical - - in - F - MODULE_gwdps SCHEME_gwdps SUBROUTINE_gwdps_run - - - horizontal_index_of_printed_column - horizontal index of column used in debugging printouts - index - ipr - integer - - in - F - MODULE_gwdps SCHEME_gwdps SUBROUTINE_gwdps_run - - - level_of_dividing_streamline - level of the dividing streamline - none - rdxzb - real - (:) - out - F - MODULE_gwdps SCHEME_gwdps SUBROUTINE_gwdps_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_gwdps SCHEME_gwdps SUBROUTINE_gwdps_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_gwdps SCHEME_gwdps SUBROUTINE_gwdps_run - - - - diff --git a/physics/gwdps_post.xml b/physics/gwdps_post.xml deleted file mode 100644 index 2fd8a6306..000000000 --- a/physics/gwdps_post.xml +++ /dev/null @@ -1,172 +0,0 @@ - - - - - - - flag_diagnostics - flag for calculating diagnostic fields - flag - lssav - logical - - in - F - MODULE_gwdps_post SCHEME_gwdps_post SUBROUTINE_gwdps_post_run - - - flag_diagnostics_3D - flag for calculating 3-D diagnostic fields - flag - ldiag3d - logical - - in - F - MODULE_gwdps_post SCHEME_gwdps_post SUBROUTINE_gwdps_post_run - - - time_step_for_dynamics - dynamics time step - s - dtf - real - - in - F - MODULE_gwdps_post SCHEME_gwdps_post SUBROUTINE_gwdps_post_run - - - instantaneous_x_stress_due_to_gravity_wave_drag - zonal surface stress due to orographic gravity wave drag - Pa - dusfcg - real - (:) - in - F - MODULE_gwdps_post SCHEME_gwdps_post SUBROUTINE_gwdps_post_run - - - instantaneous_y_stress_due_to_gravity_wave_drag - meridional surface stress due to orographic gravity wave drag - Pa - dvsfcg - real - (:) - in - F - MODULE_gwdps_post SCHEME_gwdps_post SUBROUTINE_gwdps_post_run - - - tendency_of_x_wind_due_to_model_physics - zonal wind tendency due to model physics - m s-2 - dudt - real - (:,:) - in - F - MODULE_gwdps_post SCHEME_gwdps_post SUBROUTINE_gwdps_post_run - - - tendency_of_y_wind_due_to_model_physics - meridional wind tendency due to model physics - m s-2 - dvdt - real - (:,:) - in - F - MODULE_gwdps_post SCHEME_gwdps_post SUBROUTINE_gwdps_post_run - - - tendency_of_air_temperature_due_to_model_physics - air temperature tendency due to model physics - K s-1 - dtdt - real - (:,:) - in - F - MODULE_gwdps_post SCHEME_gwdps_post SUBROUTINE_gwdps_post_run - - - time_integral_of_x_stress_due_to_gravity_wave_drag - integral over time of zonal stress due to gravity wave drag - Pa s - dugwd - real - (:) - inout - F - MODULE_gwdps_post SCHEME_gwdps_post SUBROUTINE_gwdps_post_run - - - time_integral_of_y_stress_due_to_gravity_wave_drag - integral over time of meridional stress due to gravity wave drag - Pa s - dvgwd - real - (:) - inout - F - MODULE_gwdps_post SCHEME_gwdps_post SUBROUTINE_gwdps_post_run - - - cumulative_change_in_x_wind_due_to_orographic_gravity_wave_drag - cumulative change in zonal wind due to orographic gravity wave drag - m s-1 - du3dt - real - (:,:) - inout - F - MODULE_gwdps_post SCHEME_gwdps_post SUBROUTINE_gwdps_post_run - - - cumulative_change_in_y_wind_due_to_orographic_gravity_wave_drag - cumulative change in meridional wind due to orographic gravity wave drag - m s-1 - dv3dt - real - (:,:) - inout - F - MODULE_gwdps_post SCHEME_gwdps_post SUBROUTINE_gwdps_post_run - - - cumulative_change_in_temperature_due_to_shortwave_radiation_and_orographic_gravity_wave_drag - cumulative change in temperature due to SW rad and oro. GWD - K - dt3dt - real - (:,:) - inout - F - MODULE_gwdps_post SCHEME_gwdps_post SUBROUTINE_gwdps_post_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_gwdps_post SCHEME_gwdps_post SUBROUTINE_gwdps_post_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_gwdps_post SCHEME_gwdps_post SUBROUTINE_gwdps_post_run - - - diff --git a/physics/gwdps_pre.xml b/physics/gwdps_pre.xml deleted file mode 100644 index 52acc6362..000000000 --- a/physics/gwdps_pre.xml +++ /dev/null @@ -1,150 +0,0 @@ - - - - - horizontal_loop_extent - horizontal dimension - count - im - integer - - in - F - MODULE_gwdps_pre SCHEME_gwdps_pre SUBROUTINE_gwdps_pre_run - - - number_of_statistical_measures_of_subgrid_orography - number of statistical measures of subgrid orography - count - nmtvr - integer - - in - F - MODULE_gwdps_pre SCHEME_gwdps_pre SUBROUTINE_gwdps_pre_run - - - statistical_measures_of_subgrid_orography - array of statistical measures of subgrid orography - various - mntvar - real - (:,:) - in - F - MODULE_gwdps_pre SCHEME_gwdps_pre SUBROUTINE_gwdps_pre_run - - - standard_deviation_of_subgrid_orography - standard deviation of subgrid orography - m - hprime - real - (:) - out - F - MODULE_gwdps_pre SCHEME_gwdps_pre SUBROUTINE_gwdps_pre_run - - - convexity_of_subgrid_orography - convexity of subgrid orography - none - oc - real - (:) - out - F - MODULE_gwdps_pre SCHEME_gwdps_pre SUBROUTINE_gwdps_pre_run - - - asymmetry_of_subgrid_orography - asymmetry of subgrid orography - none - oa4 - real - (:,:) - out - F - MODULE_gwdps_pre SCHEME_gwdps_pre SUBROUTINE_gwdps_pre_run - - - fraction_of_grid_box_with_subgrid_orography_higher_than_critical_height - horizontal fraction of grid box covered by subgrid orography higher than critical height - frac - clx - real - (:,:) - out - F - MODULE_gwdps_pre SCHEME_gwdps_pre SUBROUTINE_gwdps_pre_run - - - angle_from_east_of_maximum_subgrid_orographic_variations - angle with_respect to east of maximum subgrid orographic variations - degrees - theta - real - (:) - out - F - MODULE_gwdps_pre SCHEME_gwdps_pre SUBROUTINE_gwdps_pre_run - - - slope_of_subgrid_orography - slope of subgrid orography - none - sigma - real - (:) - out - F - MODULE_gwdps_pre SCHEME_gwdps_pre SUBROUTINE_gwdps_pre_run - - - anisotropy_of_subgrid_orography - anisotropy of subgrid orography - none - gamma - real - (:) - out - F - MODULE_gwdps_pre SCHEME_gwdps_pre SUBROUTINE_gwdps_pre_run - - - maximum_subgrid_orography - maximum of subgrid orography - m - elvmax - real - (:) - out - F - MODULE_gwdps_pre SCHEME_gwdps_pre SUBROUTINE_gwdps_pre_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_gwdps_pre SCHEME_gwdps_pre SUBROUTINE_gwdps_pre_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_gwdps_pre SCHEME_gwdps_pre SUBROUTINE_gwdps_pre_run - - - - - diff --git a/physics/h2ophys.xml b/physics/h2ophys.xml deleted file mode 100644 index 4af3f8c5e..000000000 --- a/physics/h2ophys.xml +++ /dev/null @@ -1,161 +0,0 @@ - - - - - - horizontal_dimension - horizontal dimension - count - ix - integer - - in - F - MODULE_h2ophys SCHEME_h2ophys SUBROUTINE_h2ophys_run - - - horizontal_loop_extent - horizontal loop extent - count - im - integer - - in - F - MODULE_h2ophys SCHEME_h2ophys SUBROUTINE_h2ophys_run - - - vertical_dimension - number of vertical layers - count - levs - integer - - in - F - MODULE_h2ophys SCHEME_h2ophys SUBROUTINE_h2ophys_run - - - vertical_dimension_of_h2o_forcing_data - number of vertical layers in h2o forcing data - count - kh2o - integer - - in - F - MODULE_h2ophys SCHEME_h2ophys SUBROUTINE_h2ophys_run - - - time_step_for_physics - physics time step - s - dt - real - - in - F - MODULE_h2ophys SCHEME_h2ophys SUBROUTINE_h2ophys_run - - - water_vapor_specific_humidity_updated_by_physics - water vapor specific humidity updated by physics - kg kg-1 - h2o - real - (:,:) - inout - F - MODULE_h2ophys SCHEME_h2ophys SUBROUTINE_h2ophys_run - - - natural_log_of_h2o_forcing_data_pressure_levels - natural log of h2o forcing data pressure levels - log(Pa) - ph2o - real - (:) - in - F - MODULE_h2ophys SCHEME_h2ophys SUBROUTINE_h2ophys_run - - - air_pressure - mid-layer pressure - Pa - prsl - real - (:,:) - in - F - MODULE_h2ophys SCHEME_h2ophys SUBROUTINE_h2ophys_run - - - h2o_forcing - water forcing data - various - h2opltc - real - (:,:,:) - in - F - MODULE_h2ophys SCHEME_h2ophys SUBROUTINE_h2ophys_run - - - number_of_coefficients_in_h2o_forcing_data - number of coefficients in h2o forcing data - index - h2o_coeff - integer - - in - F - MODULE_h2ophys SCHEME_h2ophys SUBROUTINE_h2ophys_run - - - flag_diagnostics_3D - flag for calculating 3-D diagnostic fields - flag - ldiag3d - logical - - in - F - MODULE_h2ophys SCHEME_h2ophys SUBROUTINE_h2ophys_run - - - mpi_rank - rank of the current MPI task - index - me - integer - - in - F - MODULE_h2ophys SCHEME_h2ophys SUBROUTINE_h2ophys_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_h2ophys SCHEME_h2ophys SUBROUTINE_h2ophys_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_h2ophys SCHEME_h2ophys SUBROUTINE_h2ophys_run - - - - diff --git a/physics/hedmf.xml b/physics/hedmf.xml deleted file mode 100644 index ac2452c1f..000000000 --- a/physics/hedmf.xml +++ /dev/null @@ -1,612 +0,0 @@ - - - - - horizontal_dimension - horizontal dimension - count - ix - integer - - in - F - MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run - - - horizontal_loop_extent - horizontal loop extent - count - im - integer - - in - F - MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run - - - vertical_dimension - vertical layer dimension - count - km - integer - - in - F - MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run - - - number_of_vertical_diffusion_tracers - number of tracers to diffuse vertically - count - ntrac - integer - - in - F - MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run - - - index_for_liquid_cloud_condensate - cloud condensate index in tracer array - index - ntcw - integer - - in - F - MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run - - - tendency_of_y_wind_due_to_model_physics - updated tendency of the y wind - m s-2 - dv - real - (:,:) - inout - F - MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run - - - tendency_of_x_wind_due_to_model_physics - updated tendency of the x wind - m s-2 - du - real - (:,:) - inout - F - MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run - - - tendency_of_air_temperature_due_to_model_physics - updated tendency of the temperature - K s-1 - tau - real - (:,:) - inout - F - MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run - - - tendency_of_vertically_diffused_tracer_concentration - updated tendency of the tracers due to vertical diffusion in PBL scheme - kg kg-1 s-1 - rtg - real - (:,:,:) - inout - F - MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run - - - x_wind - x component of layer wind - m s-1 - u1 - real - (:,:) - in - F - MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run - - - y_wind - y component of layer wind - m s-1 - v1 - real - (:,:) - in - F - MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run - - - air_temperature - layer mean air temperature - K - t1 - real - (:,:) - in - F - MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run - - - vertically_diffused_tracer_concentration - tracer concentration diffused by PBL scheme - kg kg-1 - q1 - real - (:,:,:) - in - F - MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run - - - tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step - total sky shortwave heating rate - K s-1 - swh - real - (:,:) - in - F - MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run - - - tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_step - total sky longwave heating rate - K s-1 - hlw - real - (:,:) - in - F - MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run - - - zenith_angle_temporal_adjustment_factor_for_shortwave_fluxes - zenith angle temporal adjustment factor for shortwave - none - xmu - real - (:) - in - F - MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run - - - dimensionless_exner_function_at_lowest_model_interface - dimensionless Exner function at the surface interface - none - psk - real - (:) - in - F - MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run - - - bulk_richardson_number_at_lowest_model_level - bulk Richardson number at the surface - none - rbsoil - real - (:) - in - F - MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run - - - surface_roughness_length - surface roughness length in cm - cm - zorl - real - (:) - in - F - MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run - - - x_wind_at_10m - x component of wind at 10 m - m s-1 - u10m - real - (:) - in - F - MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run - - - y_wind_at_10m - y component of wind at 10 m - m s-1 - v10m - real - (:) - in - F - MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run - - - Monin-Obukhov_similarity_function_for_momentum - Monin-Obukhov similarity function for momentum - none - fm - real - (:) - in - F - MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run - - - Monin-Obukhov_similarity_function_for_heat - Monin-Obukhov similarity function for heat - none - fh - real - (:) - in - F - MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run - - - surface_skin_temperature - surface skin temperature - K - tsea - real - (:) - in - F - MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run - - - kinematic_surface_upward_sensible_heat_flux - kinematic surface upward sensible heat flux - K m s-1 - heat - real - (:) - in - F - MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run - - - kinematic_surface_upward_latent_heat_flux - kinematic surface upward latent heat flux - kg kg-1 m s-1 - evap - real - (:) - in - F - MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run - - - surface_wind_stress - surface wind stress - m2 s-2 - stress - real - (:) - in - F - MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run - - - wind_speed_at_lowest_model_layer - wind speed at lowest model level - m s-1 - spd1 - real - (:) - in - F - MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run - - - vertical_index_at_top_of_atmosphere_boundary_layer - PBL top model level index - index - kpbl - integer - (:) - out - F - MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run - - - air_pressure_at_interface - air pressure at model layer interfaces - Pa - prsi - real - (:,:) - in - F - MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run - - - air_pressure_difference_between_midlayers - pres(k) - pres(k+1) - Pa - del - real - (:,:) - in - F - MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run - - - air_pressure - mean layer pressure - Pa - prsl - real - (:,:) - in - F - MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run - - - dimensionless_exner_function_at_model_layers - Exner function at layers - none - prslk - real - (:,:) - in - F - MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run - - - geopotential_at_interface - geopotential at model layer interfaces - m2 s-2 - phii - real - (:,:) - in - F - MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run - - - geopotential - geopotential at model layer centers - m2 s-2 - phil - real - (:,:) - in - F - MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run - - - time_step_for_physics - time step for physics - s - delt - real - - in - F - MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run - - - flag_TKE_dissipation_heating - flag for using TKE dissipation heating - flag - dspheat - logical - - in - F - MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run - - - instantaneous_surface_x_momentum_flux - x momentum flux - Pa - dusfc - real - (:) - out - F - MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run - - - instantaneous_surface_y_momentum_flux - y momentum flux - Pa - dvsfc - real - (:) - out - F - MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run - - - instantaneous_surface_upward_sensible_heat_flux - surface upward sensible heat flux - W m-2 - dtsfc - real - (:) - out - F - MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run - - - instantaneous_surface_upward_latent_heat_flux - surface upward latent heat flux - W m-2 - dqsfc - real - (:) - out - F - MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run - - - atmosphere_boundary_layer_thickness - PBL thickness - m - hpbl - real - (:) - out - F - MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run - - - countergradient_mixing_term_for_temperature - countergradient mixing term for temperature - K - hgamt - real - (:) - inout - F - MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run - - - countergradient_mixing_term_for_water_vapor - countergradient mixing term for water vapor - kg kg-1 - hgamq - real - (:) - inout - F - MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run - - - atmosphere_heat_diffusivity - diffusivity for heat - m2 s-1 - dkt - real - (:,:) - out - F - MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run - - - index_of_highest_temperature_inversion - index of highest temperature inversion - index - kinver - integer - (:) - in - F - MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run - - - atmosphere_momentum_diffusivity_background - background value of momentum diffusivity - m2 s-1 - xkzm_m - real - - in - F - MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run - - - atmosphere_heat_diffusivity_background - background value of heat diffusivity - m2 s-1 - xkzm_h - real - - in - F - MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run - - - diffusivity_background_sigma_level - sigma level threshold for background diffusivity - none - xkzm_s - real - - in - F - MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run - - - flag_print - flag for printing diagnostics to output - flag - lprnt - logical - - in - F - MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run - - - horizontal_index_of_printed_column - horizontal index of printed column - index - ipr - integer - - in - F - MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run - - - atmosphere_heat_diffusivity_background_maximum - maximum background value of heat diffusivity - m2 s-1 - xkzminv - real - - in - F - MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run - - - atmosphere_diffusivity_coefficient_factor - multiplicative constant for atmospheric diffusivities - none - moninq_fac - real - - in - F - MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_hedmf SCHEME_hedmf SUBROUTINE_hedmf_run - - - - - diff --git a/physics/lsm_noah.xml b/physics/lsm_noah.xml deleted file mode 100644 index 70879f1ce..000000000 --- a/physics/lsm_noah.xml +++ /dev/null @@ -1,856 +0,0 @@ - - - - - horizontal_loop_extent - horizontal loop extent - count - im - integer - - in - F - MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run - - - soil_vertical_dimension - soil vertical layer dimension - count - km - integer - - in - F - MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run - - - surface_air_pressure - surface pressure - Pa - ps - real - (:) - in - F - MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run - - - x_wind_at_lowest_model_layer - x component of 1st model layer wind - m s-1 - u1 - real - (:) - in - F - MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run - - - y_wind_at_lowest_model_layer - y component of 1st model layer wind - m s-1 - v1 - real - (:) - in - F - MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run - - - air_temperature_at_lowest_model_layer - 1st model layer air temperature - K - t1 - real - (:) - in - F - MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run - - - water_vapor_specific_humidity_at_lowest_model_layer - 1st model layer specific humidity - kg kg-1 - q1 - real - (:) - in - F - MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run - - - soil_type_classification - soil type at each grid cell - index - soiltyp - integer - (:) - in - F - MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run - - - vegetation_type_classification - vegetation type at each grid cell - index - vegtype - integer - (:) - in - F - MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run - - - bounded_vegetation_area_fraction - areal fractional cover of green vegetation bounded on the bottom - frac - sigmaf - real - (:) - in - F - MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run - - - surface_longwave_emissivity - surface longwave emissivity - frac - sfcemis - real - (:) - in - F - MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run - - - surface_downwelling_longwave_flux_absorbed_by_ground - total sky surface downward longwave flux absorbed by the ground - W m-2 - dlwflx - real - (:) - in - F - MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run - - - surface_downwelling_shortwave_flux - total sky surface downward shortwave flux - W m-2 - dswsfc - real - (:) - in - F - MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run - - - surface_net_downwelling_shortwave_flux - total sky surface net shortwave flux - W m-2 - snet - real - (:) - in - F - MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run - - - time_step_for_dynamics - dynamics time step - s - delt - real - - in - F - MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run - - - deep_soil_temperature - bottom soil temperature - K - tg3 - real - (:) - in - F - MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run - - - surface_drag_coefficient_for_momentum_in_air - surface exchange coeff for momentum - none - cm - real - (:) - in - F - MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run - - - surface_drag_coefficient_for_heat_and_moisture_in_air - surface exchange coeff heat moisture - none - ch - real - (:) - in - F - MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run - - - air_pressure_at_lowest_model_layer - Model layer 1 mean pressure - Pa - prsl1 - real - (:) - in - F - MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run - - - ratio_of_exner_function_between_midlayer_and_interface_at_lowest_model_layer - Exner function ratio bt midlayer and interface at 1st layer - ratio - prslki - real - (:) - in - F - MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run - - - height_above_ground_at_lowest_model_layer - height above ground at 1st model layer - m - zf - real - (:) - in - F - MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run - - - sea_land_ice_mask - landmask: sea/land/ice=0/1/2 - flag - islimsk - integer - (:) - in - F - MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run - - - surface_wind_enhancement_due_to_convection - surface wind enhancement due to convection - m s-1 - ddvel - real - (:) - in - F - MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run - - - surface_slope_classification - surface slope type at each grid cell - index - slopetyp - integer - (:) - in - F - MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run - - - minimum_vegetation_area_fraction - min fractional coverage of green veg - frac - shdmin - real - (:) - in - F - MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run - - - maximum_vegetation_area_fraction - max fractnl cover of green veg (not used) - frac - shdmax - real - (:) - in - F - MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run - - - upper_bound_on_max_albedo_over_deep_snow - upper bound on max albedo over deep snow - frac - snoalb - real - (:) - in - F - MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run - - - surface_diffused_shortwave_albedo - mean surface diffused shortwave albedo - frac - sfalb - real - (:) - in - F - MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run - - - flag_for_iteration - flag for iteration - flag - flag_iter - logical - (:) - in - F - MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run - - - flag_for_guess_run - flag for guess run - flag - flag_guess - logical - (:) - in - F - MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run - - - soil_type_dataset_choice - soil type dataset choice - index - isot - integer - - in - F - MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run - - - vegetation_type_dataset_choice - land use dataset choice - index - ivegsrc - integer - - in - F - MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run - - - perturbation_of_soil_type_b_parameter - perturbation of soil type "b" parameter - frac - bexppert - real - (:) - in - F - MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run - - - perturbation_of_leaf_area_index - perturbation of leaf area index - frac - xlaipert - real - (:) - in - F - MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run - - - perturbation_of_vegetation_fraction - perturbation of vegetation fraction - frac - vegfpert - real - (:) - in - F - MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run - - - magnitude_of_perturbation_of_vegetation_fraction - magnitude of perturbation of vegetation fraction - frac - pertvegf - real - (:) - in - F - MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run - - - water_equivalent_accumulated_snow_depth - water equivalent accumulated snow depth - mm - weasd - real - (:) - inout - F - MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run - - - surface_snow_thickness_water_equivalent - water equivalent snow depth over land - mm - snwdph - real - (:) - inout - F - MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run - - - surface_skin_temperature - surface skin temperature - K - tskin - real - (:) - inout - F - MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run - - - nonnegative_lwe_thickness_of_precipitation_amount_on_dynamics_timestep - nonnegative precipitation amount in one dynamics time step - m - tprcp - real - (:) - inout - F - MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run - - - flag_for_precipitation_type - flag for snow or rain precipitation - flag - srflag - real - (:) - inout - F - MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run - - - volume_fraction_of_soil_moisture - volumetric fraction of soil moisture - frac - smc - real - (:,:) - inout - F - MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run - - - soil_temperature - soil temperature - K - stc - real - (:,:) - inout - F - MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run - - - volume_fraction_of_unfrozen_soil_moisture - volume fraction of unfrozen soil moisture - frac - slc - real - (:,:) - inout - F - MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run - - - canopy_water_amount - canopy moisture content - kg m-2 - canopy - real - (:) - inout - F - MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run - - - transpiration_flux - total plant transpiration rate - kg m-2 s-1 - trans - real - (:) - inout - F - MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run - - - surface_skin_temperature_after_iteration - surface skin temperature after iteration - K - tsurf - real - (:) - inout - F - MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run - - - surface_roughness_length - surface roughness length - cm - zorl - real - (:) - inout - F - MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run - - - surface_snow_area_fraction_for_diagnostics - surface snow area fraction - frac - sncovr1 - real - (:) - inout - F - MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run - - - surface_specific_humidity - surface specific humidity - kg kg-1 - qsurf - real - (:) - inout - F - MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run - - - upward_heat_flux_in_soil - upward soil heat flux - W m-2 - gflux - real - (:) - inout - F - MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run - - - subsurface_runoff_flux - subsurface runoff flux - g m-2 s-1 - drain - real - (:) - inout - F - MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run - - - kinematic_surface_upward_latent_heat_flux - surface upward evaporation flux - kg kg-1 m s-1 - evap - real - (:) - inout - F - MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run - - - kinematic_surface_upward_sensible_heat_flux - surface upward sensible heat flux - K m s-1 - hflx - real - (:) - inout - F - MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run - - - surface_upward_potential_latent_heat_flux - surface upward potential latent heat flux - W m-2 - ep - real - (:) - inout - F - MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run - - - surface_runoff_flux - surface runoff flux - g m-2 s-1 - runoff - real - (:) - inout - F - MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run - - - surface_drag_wind_speed_for_momentum_in_air - surf mom exch coef time mean surf wind - m s-1 - cmm - real - (:) - inout - F - MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run - - - surface_drag_mass_flux_for_heat_and_moisture_in_air - surf h m exch coef time surf wind density - kg m-2 s-1 - chh - real - (:) - inout - F - MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run - - - soil_upward_latent_heat_flux - soil upward latent heat flux - W m-2 - evbs - real - (:) - inout - F - MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run - - - canopy_upward_latent_heat_flux - canopy upward latent heat flux - W m-2 - evcw - real - (:) - inout - F - MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run - - - snow_deposition_sublimation_upward_latent_heat_flux - latent heat flux from snow depo/subl - W m-2 - sbsno - real - (:) - inout - F - MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run - - - surface_snow_area_fraction - surface snow area fraction - frac - snowc - real - (:) - inout - F - MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run - - - soil_moisture_content - soil moisture content - kg m-2 - stm - real - (:) - inout - F - MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run - - - snow_freezing_rain_upward_latent_heat_flux - latent heat flux due to snow and frz rain - W m-2 - snohf - real - (:) - inout - F - MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run - - - volume_fraction_of_condensed_water_in_soil_at_wilting_point - soil water fraction at wilting point - frac - smcwlt2 - real - (:) - inout - F - MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run - - - threshold_volume_fraction_of_condensed_water_in_soil - soil moisture threshold - frac - smcref2 - real - (:) - inout - F - MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run - - - normalized_soil_wetness - normalized soil wetness - frac - wet1 - real - (:) - inout - F - MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_run - - - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_finalize - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_finalize - - - - - mpi_rank - current MPI-rank - index - me - integer - - in - F - MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_init - - - soil_type_dataset_choice - soil type dataset choice - index - isot - integer - - in - F - MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_init - - - vegetation_type_dataset_choice - land use dataset choice - index - ivegsrc - integer - - in - F - MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_init - - - iounit_namelist - fortran unit number for file opens - none - nlunit - integer - - in - F - MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_init - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_init - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_lsm_noah SCHEME_lsm_noah SUBROUTINE_lsm_noah_init - - - diff --git a/physics/lsm_ruc.xml b/physics/lsm_ruc.xml deleted file mode 100644 index d5631ba21..000000000 --- a/physics/lsm_ruc.xml +++ /dev/null @@ -1,1230 +0,0 @@ - - - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_finalize - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_finalize - - - - - time_step_for_dynamics - physics time step - s - delt - real - - in - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - mpi_rank - current MPI-rank - index - me - integer - - in - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - index_of_time_step - current number of time steps - index - kdt - integer - - in - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - ccpp_loop_counter - loop counter for subcycling loops in CCPP - index - iter - integer - - in - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - horizontal_loop_extent - horizontal loop extent - count - im - integer - - in - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - vertical_dimension - number of vertical levels - count - nlev - integer - - in - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - flag_for_ruc_land_surface_scheme - flag for RUC land surface model - flag - lsm_ruc - integer - - in - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - flag_for_land_surface_scheme - flag for land surface model - flag - lsm - integer - - in - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - do_mynnsfclay - flag to activate MYNN surface layer - flag - do_mynnsfclay - logical - - in - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - soil_vertical_dimension_for_land_surface_model - number of soil layers internal to land surface model - count - lsoil_ruc - integer - - in - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - soil_vertical_dimension - soil vertical layer dimension - count - lsoil - integer - - in - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - depth_of_soil_levels_for_land_surface_model - depth of soil levels for land surface model - m - zs - real - (:) - inout - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - sea_land_ice_mask - landmask: sea/land/ice=0/1/2 - flag - islmsk - integer - (:) - in - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - specific_heat_of_dry_air_at_constant_pressure - specific heat !of dry air at constant pressure - J kg-1 K-1 - con_cp - real - - in - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - gravitational_acceleration - gravitational acceleration - m s-2 - con_g - real - - in - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - pi - ratio of a circle's circumference to its diameter - radians - con_pi - real - - in - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - gas_constant_dry_air - ideal gas constant for dry air - J kg-1 K-1 - con_rd - real - - in - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - gas_constant_water_vapor - ideal gas constant for water vapor - J kg-1 K-1 - con_rv - real - - in - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - latent_heat_of_vaporization_of_water_at_0C - latent heat of vaporization/sublimation (hvap) - J kg-1 - con_hvap - real - - in - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - ratio_of_vapor_to_dry_air_gas_constants_minus_one - rv/rd - 1 (rv = ideal gas constant for water vapor) - none - con_fvirt - real - - in - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - lwe_thickness_of_explicit_rainfall_amount_from_previous_timestep - explicit rainfall from previous timestep - m - rainnc - real - (:) - in - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - lwe_thickness_of_convective_precipitation_amount_from_previous_timestep - convective_precipitation_amount from previous timestep - m - rainc - real - (:) - in - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - lwe_thickness_of_ice_amount_from_previous_timestep - ice amount from previous timestep - m - ice - real - (:) - in - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - lwe_thickness_of_snow_amount_from_previous_timestep - snow amount from previous timestep - m - snow - real - (:) - in - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - lwe_thickness_of_graupel_amount_from_previous_timestep - graupel amount from previous timestep - m - graupel - real - (:) - in - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - flag_for_precipitation_type - snow/rain flag for precipitation - flag - srflag - real - (:) - in - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - surface_snow_area_fraction_for_diagnostics - surface snow area fraction - frac - sncovr1 - real - (:) - inout - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - surface_snow_area_fraction - surface snow area fraction - frac - snowc - real - (:) - inout - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - water_equivalent_accumulated_snow_depth - water equiv of acc snow depth over land and sea ice - mm - weasd - real - (:) - inout - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - surface_snow_thickness_water_equivalent - water equivalent snow depth over land - mm - snwdph - real - (:) - inout - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - ratio_of_snowfall_to_rainfall - snow ratio: ratio of snow to total precipitation - frac - sr - real - (:) - in - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - density_of_frozen_precipitation - density of frozen precipitation - kg m-3 - rhosnf - real - (:) - out - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - height_above_ground_at_lowest_model_layer - layer 1 height above ground (not MSL) - m - zf - real - (:) - in - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - x_wind_at_lowest_model_layer - zonal wind at lowest model layer - m s-1 - u1 - real - (:) - in - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - y_wind_at_lowest_model_layer - meridional wind at lowest model layer - m s-1 - v1 - real - (:) - in - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - air_pressure_at_lowest_model_layer - mean pressure at lowest model layer - Pa - prsl1 - real - (:) - in - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - surface_wind_enhancement_due_to_convection - surface wind enhancement due to convection - m s-1 - ddvel - real - (:) - in - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - air_temperature_at_lowest_model_layer - mean temperature at lowest model layer - K - t1 - real - (:) - in - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - water_vapor_specific_humidity_at_lowest_model_layer - water vapor specific humidity at lowest model layer - kg kg-1 - q1 - real - (:) - in - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - cloud_condensed_water_mixing_ratio_at_lowest_model_layer - moist (dry+vapor, no condensates) mixing ratio of cloud water at lowest model layer - kg kg-1 - qc - real - (:) - in - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - surface_downwelling_longwave_flux - surface downwelling longwave flux at current time - W m-2 - dlwflx - real - (:) - in - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - surface_downwelling_shortwave_flux - surface downwelling shortwave flux at current time - W m-2 - dswsfc - real - (:) - in - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - surface_net_downwelling_shortwave_flux - surface net downwelling shortwave flux at current time - W m-2 - snet - real - (:) - in - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - surface_longwave_emissivity - surface lw emissivity in fraction - frac - sfcemis - real - (:) - inout - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - wind_speed_at_lowest_model_layer - wind speed at lowest model level - m s-1 - wspd - real - (:) - inout - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - surface_drag_coefficient_for_momentum_in_air - surface exchange coeff for momentum - none - cm - real - (:) - in - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - surface_drag_coefficient_for_heat_and_moisture_in_air - surface exchange coeff heat moisture - none - ch - real - (:) - in - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - surface_drag_mass_flux_for_heat_and_moisture_in_air - surf h m exch coef time surf wind density - kg m-2 s-1 - chh - real - (:) - inout - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - surface_drag_wind_speed_for_momentum_in_air - surf mom exch coef time mean surf wind - m s-1 - cmm - real - (:) - inout - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - normalized_soil_wetness - normalized soil wetness - frac - wet1 - real - (:) - inout - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - canopy_water_amount - canopy water amount - kg m-2 - canopy - real - (:) - inout - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - vegetation_area_fraction - areal fractional cover of green vegetation - frac - sigmaf - real - (:) - in - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - surface_diffused_shortwave_albedo - mean surface diffused sw albedo - frac - sfalb - real - (:) - inout - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - mean_vis_albedo_with_weak_cosz_dependency - mean vis albedo with weak cosz dependency - frac - alvwf - real - (:) - in - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - mean_nir_albedo_with_weak_cosz_dependency - mean nir albedo with weak cosz dependency - frac - alnwf - real - (:) - in - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - upper_bound_on_max_albedo_over_deep_snow - maximum snow albedo - frac - snoalb - real - (:) - in - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - surface_roughness_length - surface roughness length - cm - zorl - real - (:) - inout - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - surface_specific_humidity - surface air saturation specific humidity - kg kg-1 - qsurf - real - (:) - inout - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - cloud_condensed_water_mixing_ratio_at_surface - moist cloud water mixing ratio at surface - kg kg-1 - sfcqc - real - (:) - inout - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - water_vapor_mixing_ratio_at_surface - water vapor mixing ratio at surface - kg kg-1 - sfcqv - real - (:) - inout - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - surface_condensation_mass - surface condensation mass - kg m-2 - sfcdew - real - (:) - inout - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - deep_soil_temperature - deep soil temperature - K - tg3 - real - (:) - in - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - volume_fraction_of_soil_moisture - total soil moisture - frac - smc - real - (:,:) - inout - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - volume_fraction_of_unfrozen_soil_moisture - liquid soil moisture - frac - slc - real - (:,:) - inout - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - soil_temperature - soil temperature - K - stc - real - (:,:) - inout - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - volume_fraction_of_condensed_water_in_soil_at_wilting_point - soil water fraction at wilting point - frac - smcwlt2 - real - (:) - inout - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - threshold_volume_fraction_of_condensed_water_in_soil - soil moisture threshold - frac - smcref2 - real - (:) - inout - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - vegetation_type_classification - vegetation type at each grid cell - index - vegtype - integer - (:) - in - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - soil_type_classification - soil type at each grid cell - index - soiltyp - integer - (:) - in - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - soil_type_dataset_choice - soil type dataset choice - index - isot - integer - - in - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - vegetation_type_dataset_choice - land use dataset choice - index - ivegsrc - integer - - in - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - sea_ice_concentration - ice fraction over open water - frac - fice - real - (:) - in - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - flag_for_frozen_soil_physics - flag for frozen soil physics (RUC) - flag - keepfr - real - (:,:) - inout - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - volume_fraction_of_soil_moisture_for_land_surface_model - volumetric fraction of soil moisture for lsm - frac - smois - real - (:,:) - inout - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - volume_fraction_of_unfrozen_soil_moisture_for_land_surface_model - volume fraction of unfrozen soil moisture for lsm - frac - sh2o - real - (:,:) - inout - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - volume_fraction_of_frozen_soil_moisture_for_land_surface_model - volume fraction of frozen soil moisture for lsm - frac - smfrkeep - real - (:,:) - inout - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - soil_temperature_for_land_surface_model - soil temperature for land surface model - K - tslb - real - (:,:) - inout - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - soil_moisture_content - soil moisture content - kg m-2 - stm - real - (:) - inout - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - surface_skin_temperature - surface skin temperature - K - tskin - real - (:) - inout - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - surface_skin_temperature_after_iteration - surface skin temperature after iteration - K - tsurf - real - (:) - inout - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - sea_ice_temperature - sea ice surface skin temperature - K - tice - real - (:) - inout - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - snow_temperature_bottom_first_layer - snow temperature at the bottom of first snow layer - K - tsnow - real - (:) - inout - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - total_accumulated_snowfall - run-total snow accumulation on the ground - kg m-2 - snowfallac - real - (:) - inout - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - accumulated_water_equivalent_of_frozen_precip - snow water equivalent of run-total frozen precip - kg m-2 - acsnow - real - (:) - inout - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - kinematic_surface_upward_latent_heat_flux - kinematic surface upward evaporation flux - kg kg-1 m s-1 - evap - real - (:) - out - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - kinematic_surface_upward_sensible_heat_flux - kinematic surface upward sensible heat flux - K m s-1 - hflx - real - (:) - out - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - soil_upward_latent_heat_flux - soil upward latent heat flux - W m-2 - evbs - real - (:) - out - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - canopy_upward_latent_heat_flux - canopy upward latent heat flux - W m-2 - evcw - real - (:) - out - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - snow_deposition_sublimation_upward_latent_heat_flux - latent heat flux from snow depo/subl - W m-2 - sbsno - real - (:) - out - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - transpiration_flux - total plant transpiration rate - kg m-2 s-1 - trans - real - (:) - out - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - surface_runoff_flux - surface runoff flux - g m-2 s-1 - runof - real - (:) - out - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - subsurface_runoff_flux - subsurface runoff flux - g m-2 s-1 - drain - real - (:) - out - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - total_runoff - total water runoff - kg m-2 - runoff - real - (:) - inout - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - surface_runoff - surface water runoff (from lsm) - kg m-2 - srunoff - real - (:) - inout - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - upward_heat_flux_in_soil - soil heat flux - W m-2 - gflux - real - (:) - out - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - minimum_vegetation_area_fraction - min fractional coverage of green vegetation - frac - shdmin - real - (:) - in - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - maximum_vegetation_area_fraction - max fractional coverage of green vegetation - frac - shdmax - real - (:) - in - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - flag_for_iteration - flag for iteration - flag - flag_iter - logical - (:) - in - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - flag_for_guess_run - flag for guess run - flag - flag_guess - logical - (:) - in - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - flag_for_first_time_step - flag signaling first time step for time integration loop - flag - flag_init - logical - - in - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - flag_for_restart - flag for restart (warmstart) or coldstart - flag - flag_restart - logical - - in - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_run - - - - - mpi_rank - current MPI-rank - index - me - integer - - in - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_init - - - soil_type_dataset_choice - soil type dataset choice - index - isot - integer - - in - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_init - - - vegetation_type_dataset_choice - land use dataset choice - index - ivegsrc - integer - - in - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_init - - - iounit_namelist - fortran unit number for file opens - none - nlunit - integer - - in - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_init - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_init - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_lsm_ruc SCHEME_lsm_ruc SUBROUTINE_lsm_ruc_init - - - diff --git a/physics/m_micro.xml b/physics/m_micro.xml deleted file mode 100644 index b86b66b84..000000000 --- a/physics/m_micro.xml +++ /dev/null @@ -1,1152 +0,0 @@ - - - - - horizontal_loop_extent - horizontal loop extent - count - im - integer - - in - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run - - - horizontal_dimension - horizontal dimension - count - ix - integer - - in - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run - - - vertical_dimension - vertical layer dimension - count - lm - integer - - in - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run - - - flag_flip - vertical flip logical - flag - flipv - logical - - in - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run - - - time_step_for_physics - physics time step - s - dt_i - real - - in - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run - - - air_pressure - layer mean pressure - Pa - prsl_i - real - (:,:) - in - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run - - - air_pressure_at_interface - air pressure at model layer interfaces - Pa - prsi_i - real - (:,:) - in - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run - - - geopotential - geopotential at model layer centers - m2 s-2 - phil - real - (:,:) - in - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run - - - geopotential_at_interface - geopotential at model layer interfaces - m2 s-2 - phii - real - (:,:) - in - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run - - - omega - layer mean vertical velocity - Pa s-1 - omega_i - real - (:,:) - in - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run - - - cloud_condensed_water_mixing_ratio_convective_transport_tracer - moist (dry+vapor, no condensates) mixing ratio of cloud water (condensate) in the convectively transported tracer array - kg kg-1 - qlls_i - real - (:,:) - in - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run - - - mass_fraction_of_convective_cloud_liquid_water - mass fraction of convective cloud liquid water - kg kg-1 - qlcn_i - real - (:,:) - in - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run - - - ice_water_mixing_ratio_convective_transport_tracer - moist (dry+vapor, no condensates) mixing ratio of ice water in the convectively transported tracer array - kg kg-1 - qils_i - real - (:,:) - in - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run - - - mass_fraction_of_convective_cloud_ice - mass fraction of convective cloud ice water - kg kg-1 - qicn_i - real - (:,:) - in - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run - - - tendency_of_air_temperature_due_to_longwave_heating_on_radiation_timestep - total sky lw heating rate - K s-1 - lwheat_i - real - (:,:) - in - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run - - - tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_timestep - total sky sw heating rate - K s-1 - swheat_i - real - (:,:) - in - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run - - - vertical_velocity_for_updraft - vertical velocity for updraft - m s-1 - w_upi - real - (:,:) - in - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run - - - convective_cloud_fraction_for_microphysics - convective cloud fraction for microphysics - frac - cf_upi - real - (:,:) - in - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run - - - land_area_fraction - land area fraction - frac - frland - real - (:) - in - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run - - - atmosphere_boundary_layer_thickness - pbl height - m - zpbl - real - (:) - in - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run - - - detrained_mass_flux - detrained mass flux - kg m-2 s-1 - cnv_mfd_i - real - (:,:) - in - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run - - - tendency_of_cloud_water_due_to_convective_microphysics - tendency of cloud water due to convective microphysics - kg m-2 s-1 - cnv_dqldt_i - real - (:,:) - in - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run - - - convective_cloud_volume_fraction - convective cloud volume fraction - frac - clcn_i - real - (:,:) - in - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run - - - x_wind_updated_by_physics - zonal wind updated by physics - m s-1 - u_i - real - (:,:) - in - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run - - - y_wind_updated_by_physics - meridional wind updated by physics - m s-1 - v_i - real - (:,:) - in - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run - - - cumulative_surface_x_momentum_flux_for_diag_multiplied_by_timestep - cumulative sfc x momentum flux multiplied by timestep - Pa s - taugwx - real - (:) - in - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run - - - cumulative_surface_y_momentum_flux_for_diag_multiplied_by_timestep - cumulative sfc y momentum flux multiplied by timestep - Pa s - taugwy - real - (:) - in - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run - - - instantaneous_surface_x_momentum_flux - x momentum flux - Pa - tauorox - real - (:) - in - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run - - - instantaneous_surface_y_momentum_flux - y momentum flux - Pa - tauoroy - real - (:) - in - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run - - - ice_fraction_in_convective_tower - ice fraction in convective tower - frac - cnv_fice_i - real - (:,:) - in - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run - - - number_concentration_of_cloud_liquid_water_particles_for_detrainment - droplet number concentration in convective detrainment - m-3 - cnv_ndrop_i - real - (:,:) - in - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run - - - number_concentration_of_ice_crystals_for_detrainment - crystal number concentration in convective detrainment - m-3 - cnv_nice_i - real - (:,:) - in - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run - - - water_vapor_specific_humidity_updated_by_physics - water vapor specific humidity updated by physics - kg kg-1 - q_io - real - (:,:) - inout - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run - - - cloud_condensed_water_mixing_ratio_updated_by_physics - moist (dry+vapor, no condensates) mixing ratio of cloud condensed water updated by physics - kg kg-1 - lwm_o - real - (:,:) - out - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run - - - ice_water_mixing_ratio_updated_by_physics - moist (dry+vapor, no condensates) mixing ratio of ice water updated by physics - kg kg-1 - qi_o - real - (:,:) - out - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run - - - air_temperature_updated_by_physics - temperature updated by physics - K - t_io - real - (:,:) - inout - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run - - - lwe_thickness_of_explicit_precipitation_amount - explicit precipitation (rain, ice, snow, graupel, ...) on physics timestep - m - rn_o - real - (:) - out - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run - - - ratio_of_snowfall_to_rainfall - snow ratio: ratio of snow to total precipitation - frac - sr_o - real - (:) - out - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run - - - cloud_droplet_number_concentration_updated_by_physics - number concentration of cloud droplets updated by physics - kg-1 - ncpl_io - real - (:,:) - inout - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run - - - ice_number_concentration_updated_by_physics - number concentration of ice updated by physics - kg-1 - ncpi_io - real - (:,:) - inout - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run - - - number_of_frozen_precipitation_species - number of frozen precipitation species - count - fprcp - integer - - in - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run - - - local_rain_water_mixing_ratio - moist (dry+vapor, no condensates) mixing ratio of rain water local to physics - kg kg-1 - rnw_io - real - (:,:) - inout - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run - - - local_snow_water_mixing_ratio - moist (dry+vapor, no condensates) mixing ratio of snow water local to physics - kg kg-1 - snw_io - real - (:,:) - inout - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run - - - local_graupel_mixing_ratio - moist (dry+vapor, no condensates) mixing ratio of graupel local to physics - kg kg-1 - qgl_io - real - (:,:) - inout - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run - - - local_rain_number_concentration - number concentration of rain local to physics - kg-1 - ncpr_io - real - (:,:) - inout - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run - - - local_snow_number_concentration - number concentration of snow local to physics - kg-1 - ncps_io - real - (:,:) - inout - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run - - - local_graupel_number_concentration - number concentration of graupel local to physics - kg-1 - ncgl_io - real - (:,:) - inout - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run - - - cloud_fraction_for_MG - cloud fraction used by Morrison-Gettelman MP - frac - clls_io - real - (:,:) - inout - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run - - - vertical_index_at_cloud_base - vertical index at cloud base - index - kcbl - integer - (:) - inout - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run - - - effective_radius_of_stratiform_cloud_liquid_water_particle_in_um - effective radius of cloud liquid water particle in micrometer - um - cldreffl - real - (:,:) - out - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run - - - effective_radius_of_stratiform_cloud_ice_particle_in_um - effective radius of cloud ice water particle in micrometers - um - cldreffi - real - (:,:) - out - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run - - - effective_radius_of_stratiform_cloud_rain_particle_in_um - effective radius of cloud rain particle in micrometers - um - cldreffr - real - (:,:) - out - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run - - - effective_radius_of_stratiform_cloud_snow_particle_in_um - effective radius of cloud snow particle in micrometers - um - cldreffs - real - (:,:) - out - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run - - - effective_radius_of_stratiform_cloud_graupel_particle_in_um - effective radius of cloud graupel particle in micrometers - um - cldreffg - real - (:,:) - out - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run - - - aerosol_number_concentration_from_gocart_aerosol_climatology - GOCART aerosol climatology number concentration - kg-1? - aerfld_i - real - (:,:,:) - in - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run - - - flag_for_aerosol_input_MG - flag for using aerosols in Morrison-Gettelman microphysics - flag - aero_in - logical - - in - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run - - - in_number_concentration - IN number concentration - kg-1? - naai_i - real - (:,:) - in - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run - - - ccn_number_concentration - CCN number concentration - kg-1? - npccn_i - real - (:,:) - in - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run - - - flag_for_in_ccn_forcing_for_morrison_gettelman_microphysics - flag for IN and CCN forcing for morrison gettelman microphysics - flag - iccn - logical - - in - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run - - - flag_skip_macro - flag to skip cloud macrophysics in Morrison scheme - flag - skip_macro - logical - - in - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run - - - flag_print - control flag for diagnostic print out - flag - lprnt - logical - - in - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run - - - mg_tuning_factor_for_alphas - tuning factor for alphas (alpha = 1 - critical relative humidity) - none - alf_fac - real - - in - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run - - - mg_minimum_cloud_condensed_water_and_ice_mixing_ratio - minimum cloud condensed water and ice mixing ratio in MG macro clouds - kg kg-1 - qc_min - real - (:) - in - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run - - - flag_for_pdf_for_morrison_gettelman_microphysics_scheme - pdf flag for MG macrophysics - flag - pdfflag - integer - - in - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run - - - horizontal_index_of_printed_column - horizontal index of printed column - index - ipr - integer - - in - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run - - - index_of_time_step - current forecast iteration - index - kdt - integer - - in - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run - - - latitude - latitude - radians - xlat - real - (:) - in - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run - - - longitude - longitude - radians - xlon - real - (:) - in - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run - - - critical_relative_humidity - critical relative humidity - frac - rhc_i - real - (:,:) - in - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_run - - - - - flag_for_microphysics_scheme - choice of microphysics scheme - flag - imp_physics - integer - - in - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_init - - - flag_for_morrison_gettelman_microphysics_scheme - choice of Morrison-Gettelman rmicrophysics scheme - flag - imp_physics_mg - integer - - in - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_init - - - number_of_frozen_precipitation_species - number of frozen precipitation species - count - fprcp - integer - - in - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_init - - - gravitational_acceleration - gravitational acceleration - m s-2 - gravit - real - - in - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_init - - - gas_constant_dry_air - ideal gas constant for dry air - J kg-1 K-1 - rair - real - - in - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_init - - - gas_constant_water_vapor - ideal gas constant for water vapor - J kg-1 K-1 - rh2o - real - - in - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_init - - - specific_heat_of_dry_air_at_constant_pressure - specific heat of dry air at constant pressure - J kg-1 K-1 - cpair - real - - in - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_init - - - triple_point_temperature_of_water - triple point temperature of water - K - tmelt - real - - in - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_init - - - latent_heat_of_vaporization_of_water_at_0C - latent heat of evaporation/sublimation - J kg-1 - latvap - real - - in - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_init - - - latent_heat_of_fusion_of_water_at_0C - latent heat of fusion - J kg-1 - latice - real - - in - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_init - - - mg_autoconversion_size_threshold_ice_snow - autoconversion size threshold for cloud ice to snow for MG microphysics - um - mg_dcs - real - - in - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_init - - - mg_cloud_water_variance - cloud water relative variance for MG microphysics - - mg_qcvar - real - - in - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_init - - - mg_time_scale_for_autoconversion_of_ice - autoconversion time scale for ice for MG microphysics - s - mg_ts_auto_ice - real - (:) - in - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_init - - - mg_minimum_rh_for_ice - relative humidity threshold parameter for nucleating ice for MG microphysics - none - mg_rhmini - real - - in - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_init - - - mg_flag_for_uniform_subcolumns - flag for uniform subcolumns for MG microphysics - flag - microp_uniform - logical - - in - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_init - - - mg_flag_for_cloud_ice_processes - flag for cloud ice processes for MG microphysics - flag - do_cldice - logical - - in - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_init - - - mg_flag_for_heterogeneous_freezing - flag for heterogeneous freezing for MG microphysics - flag - hetfrz_classnuc - logical - - in - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_init - - - mg_type_of_precip_fraction_method - type of precip fraction method for MG microphysics (in_cloud or max_overlap) - none - mg_precip_frac_method - character - - in - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_init - - - mg_bergeron_efficiency_factor - bergeron efficiency factor for MG microphysics - frac - mg_berg_eff_factor - real - - in - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_init - - - mg_allow_supersat_after_sed - allow supersaturation after sedimentation for MG microphysics - flag - sed_supersat - logical - - in - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_init - - - mg_flag_for_sb2001_autoconversion - flag for SB 2001 autoconversion or accretion for MG microphysics - flag - do_sb_physics - logical - - in - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_init - - - mg_flag_for_hail - flag for hail for MG microphysics (graupel possible if false) - flag - mg_do_hail - logical - - in - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_init - - - mg_flag_for_graupel - flag for graupel for MG microphysics (hail possible if false) - flag - mg_do_graupel - logical - - in - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_init - - - mg_flag_drop_concentration_constant - flag for constant droplet concentration for MG microphysics - flag - mg_nccons - logical - - in - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_init - - - mg_flag_ice_concentration_constant - flag for constant ice concentration for MG microphysics - flag - mg_nicons - logical - - in - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_init - - - mg_flag_graupel_concentration_constant - flag for constant graupel concentration for MG microphysics - flag - mg_ngcons - logical - - in - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_init - - - mg_drop_concentration_constant - droplet concentration constant for MG microphysics - m-3 - mg_ncnst - real - - in - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_init - - - mg_ice_concentration_constant - ice concentration constant for MG microphysics - m-3 - mg_ninst - real - - in - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_init - - - mg_graupel_concentration_constant - graupel concentration constant for MG microphysics - m-3 - mg_ngnst - real - - in - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_init - - - mg_flag_for_gmao_ice_formulation - flag for gmao ice formulation - flag - mg_do_ice_gmao - logical - - in - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_init - - - mg_flag_for_liu_liquid_treatment - flag for liu liquid treatment - flag - mg_do_liq_liu - logical - - in - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_init - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_init - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_m_micro SCHEME_m_micro SUBROUTINE_m_micro_init - - - - diff --git a/physics/m_micro_post.xml b/physics/m_micro_post.xml deleted file mode 100644 index 4b0089790..000000000 --- a/physics/m_micro_post.xml +++ /dev/null @@ -1,205 +0,0 @@ - - - - - - horizontal_loop_extent - horizontal loop extent - count - im - integer - - in - F - MODULE_m_micro_post SCHEME_m_micro_post SUBROUTINE_m_micro_post_run - - - vertical_dimension - number of vertical layers - count - levs - integer - - in - F - MODULE_m_micro_post SCHEME_m_micro_post SUBROUTINE_m_micro_post_run - - - number_of_frozen_precipitation_species - number of frozen precipitation species - count - fprcp - integer - - in - F - MODULE_m_micro_post SCHEME_m_micro_post SUBROUTINE_m_micro_post_run - - - flag_mg3_as_mg2 - flag for controlling prep for Morrison-Gettelman microphysics - flag - mg3_as_mg2 - logical - - in - F - MODULE_m_micro_post SCHEME_m_micro_post SUBROUTINE_m_micro_post_run - - - local_rain_number_concentration - number concentration of rain local to physics - kg-1 - ncpr - real - (:,:) - in - F - MODULE_m_micro_post SCHEME_m_micro_post SUBROUTINE_m_micro_post_run - - - local_snow_number_concentration - number concentration of snow local to physics - kg-1 - ncps - real - (:,:) - in - F - MODULE_m_micro_post SCHEME_m_micro_post SUBROUTINE_m_micro_post_run - - - local_graupel_number_concentration - number concentration of graupel local to physics - kg-1 - ncgl - real - (:,:) - in - F - MODULE_m_micro_post SCHEME_m_micro_post SUBROUTINE_m_micro_post_run - - - local_rain_water_mixing_ratio - moist (dry+vapor, no condensates) mixing ratio of rain water local to physics - kg kg-1 - qrn - real - (:,:) - inout - F - MODULE_m_micro_post SCHEME_m_micro_post SUBROUTINE_m_micro_post_run - - - local_snow_water_mixing_ratio - moist (dry+vapor, no condensates) mixing ratio of snow water local to physics - kg kg-1 - qsnw - real - (:,:) - inout - F - MODULE_m_micro_post SCHEME_m_micro_post SUBROUTINE_m_micro_post_run - - - local_graupel_mixing_ratio - moist (dry+vapor, no condensates) mixing ratio of graupel local to physics - kg kg-1 - qgl - real - (:,:) - inout - F - MODULE_m_micro_post SCHEME_m_micro_post SUBROUTINE_m_micro_post_run - - - rain_water_mixing_ratio_updated_by_physics - moist (dry+vapor, no condensates) mixing ratio of rain water updated by physics - kg kg-1 - gq0_rain - real - (:,:) - out - F - MODULE_m_micro_post SCHEME_m_micro_post SUBROUTINE_m_micro_post_run - - - snow_water_mixing_ratio_updated_by_physics - moist (dry+vapor, no condensates) mixing ratio of snow water updated by physics - kg kg-1 - gq0_snow - real - (:,:) - out - F - MODULE_m_micro_post SCHEME_m_micro_post SUBROUTINE_m_micro_post_run - - - graupel_mixing_ratio_updated_by_physics - moist (dry+vapor, no condensates) mixing ratio of graupel updated by physics - kg kg-1 - gq0_graupel - real - (:,:) - out - F - MODULE_m_micro_post SCHEME_m_micro_post SUBROUTINE_m_micro_post_run - - - rain_number_concentration_updated_by_physics - number concentration of rain updated by physics - kg-1 - gq0_rain_nc - real - (:,:) - out - F - MODULE_m_micro_post SCHEME_m_micro_post SUBROUTINE_m_micro_post_run - - - snow_number_concentration_updated_by_physics - number concentration of snow updated by physics - kg-1 - gq0_snow_nc - real - (:,:) - out - F - MODULE_m_micro_post SCHEME_m_micro_post SUBROUTINE_m_micro_post_run - - - graupel_number_concentration_updated_by_physics - number concentration of graupel updated by physics - kg-1 - gq0_graupel_nc - real - (:,:) - out - F - MODULE_m_micro_post SCHEME_m_micro_post SUBROUTINE_m_micro_post_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_m_micro_post SCHEME_m_micro_post SUBROUTINE_m_micro_post_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_m_micro_post SCHEME_m_micro_post SUBROUTINE_m_micro_post_run - - - - diff --git a/physics/m_micro_pre.xml b/physics/m_micro_pre.xml deleted file mode 100644 index a9baa1979..000000000 --- a/physics/m_micro_pre.xml +++ /dev/null @@ -1,381 +0,0 @@ - - - - - - - horizontal_loop_extent - horizontal loop extent - count - im - integer - - in - F - MODULE_m_micro_pre SCHEME_m_micro_pre SUBROUTINE_m_micro_pre_run - - - vertical_dimension - number of vertical layers - count - levs - integer - - in - F - MODULE_m_micro_pre SCHEME_m_micro_pre SUBROUTINE_m_micro_pre_run - - - flag_for_shoc - flag for SHOC - flag - do_shoc - logical - - in - F - MODULE_m_micro_pre SCHEME_m_micro_pre SUBROUTINE_m_micro_pre_run - - - number_of_frozen_precipitation_species - number of frozen precipitation species - count - fprcp - integer - - in - F - MODULE_m_micro_pre SCHEME_m_micro_pre SUBROUTINE_m_micro_pre_run - - - flag_mg3_as_mg2 - flag for controlling prep for Morrison-Gettelman microphysics - flag - mg3_as_mg2 - logical - - in - F - MODULE_m_micro_pre SCHEME_m_micro_pre SUBROUTINE_m_micro_pre_run - - - ice_water_mixing_ratio_updated_by_physics - moist (dry+vapor, no condensates) mixing ratio of ice water updated by physics - kg kg-1 - gq0_ice - real - (:,:) - in - F - MODULE_m_micro_pre SCHEME_m_micro_pre SUBROUTINE_m_micro_pre_run - - - cloud_condensed_water_mixing_ratio_updated_by_physics - moist (dry+vapor, no condensates) mixing ratio of cloud condensed water updated by physics - kg kg-1 - gq0_water - real - (:,:) - in - F - MODULE_m_micro_pre SCHEME_m_micro_pre SUBROUTINE_m_micro_pre_run - - - rain_water_mixing_ratio_updated_by_physics - moist (dry+vapor, no condensates) mixing ratio of rain water updated by physics - kg kg-1 - gq0_rain - real - (:,:) - in - F - MODULE_m_micro_pre SCHEME_m_micro_pre SUBROUTINE_m_micro_pre_run - - - snow_water_mixing_ratio_updated_by_physics - moist (dry+vapor, no condensates) mixing ratio of snow water updated by physics - kg kg-1 - gq0_snow - real - (:,:) - in - F - MODULE_m_micro_pre SCHEME_m_micro_pre SUBROUTINE_m_micro_pre_run - - - graupel_mixing_ratio_updated_by_physics - moist (dry+vapor, no condensates) mixing ratio of graupel updated by physics - kg kg-1 - gq0_graupel - real - (:,:) - in - F - MODULE_m_micro_pre SCHEME_m_micro_pre SUBROUTINE_m_micro_pre_run - - - rain_number_concentration_updated_by_physics - number concentration of rain updated by physics - kg-1 - gq0_rain_nc - real - (:,:) - in - F - MODULE_m_micro_pre SCHEME_m_micro_pre SUBROUTINE_m_micro_pre_run - - - snow_number_concentration_updated_by_physics - number concentration of snow updated by physics - kg-1 - gq0_snow_nc - real - (:,:) - in - F - MODULE_m_micro_pre SCHEME_m_micro_pre SUBROUTINE_m_micro_pre_run - - - graupel_number_concentration_updated_by_physics - number concentration of graupel updated by physics - kg-1 - gq0_graupel_nc - real - (:,:) - in - F - MODULE_m_micro_pre SCHEME_m_micro_pre SUBROUTINE_m_micro_pre_run - - - subgrid_scale_cloud_fraction_from_shoc - subgrid-scale cloud fraction from the SHOC scheme - frac - cld_shoc - real - (:,:) - in - F - MODULE_m_micro_pre SCHEME_m_micro_pre SUBROUTINE_m_micro_pre_run - - - convective_cloud_cover - convective cloud cover - frac - cnvc - real - (:,:) - in - F - MODULE_m_micro_pre SCHEME_m_micro_pre SUBROUTINE_m_micro_pre_run - - - convective_cloud_water_mixing_ratio - moist convective cloud water mixing ratio - kg kg-1 - cnvw - real - (:,:) - in - F - MODULE_m_micro_pre SCHEME_m_micro_pre SUBROUTINE_m_micro_pre_run - - - cloud_phase_transition_threshold_temperature - threshold temperature below which cloud starts to freeze - K - tcr - real - - in - F - MODULE_m_micro_pre SCHEME_m_micro_pre SUBROUTINE_m_micro_pre_run - - - cloud_phase_transition_denominator - denominator in cloud phase transition = 1/(tcr-tf) - K-1 - tcrf - real - - in - F - MODULE_m_micro_pre SCHEME_m_micro_pre SUBROUTINE_m_micro_pre_run - - - air_temperature_updated_by_physics - temperature updated by physics - K - gt0 - real - (:,:) - in - F - MODULE_m_micro_pre SCHEME_m_micro_pre SUBROUTINE_m_micro_pre_run - - - local_rain_water_mixing_ratio - moist (dry+vapor, no condensates) mixing ratio of rain water local to physics - kg kg-1 - qrn - real - (:,:) - inout - F - MODULE_m_micro_pre SCHEME_m_micro_pre SUBROUTINE_m_micro_pre_run - - - local_snow_water_mixing_ratio - moist (dry+vapor, no condensates) mixing ratio of snow water local to physics - kg kg-1 - qsnw - real - (:,:) - inout - F - MODULE_m_micro_pre SCHEME_m_micro_pre SUBROUTINE_m_micro_pre_run - - - local_graupel_mixing_ratio - moist (dry+vapor, no condensates) mixing ratio of graupel local to physics - kg kg-1 - qgl - real - (:,:) - inout - F - MODULE_m_micro_pre SCHEME_m_micro_pre SUBROUTINE_m_micro_pre_run - - - local_rain_number_concentration - number concentration of rain local to physics - kg-1 - ncpr - real - (:,:) - inout - F - MODULE_m_micro_pre SCHEME_m_micro_pre SUBROUTINE_m_micro_pre_run - - - local_snow_number_concentration - number concentration of snow local to physics - kg-1 - ncps - real - (:,:) - inout - F - MODULE_m_micro_pre SCHEME_m_micro_pre SUBROUTINE_m_micro_pre_run - - - local_graupel_number_concentration - number concentration of graupel local to physics - kg-1 - ncgl - real - (:,:) - inout - F - MODULE_m_micro_pre SCHEME_m_micro_pre SUBROUTINE_m_micro_pre_run - - - cloud_fraction_for_MG - cloud fraction used by Morrison-Gettelman MP - frac - cld_frc_MG - real - (:,:) - inout - F - MODULE_m_micro_pre SCHEME_m_micro_pre SUBROUTINE_m_micro_pre_run - - - mass_fraction_of_convective_cloud_liquid_water - mass fraction of convective cloud liquid water - kg kg-1 - qlcn - real - (:,:) - inout - F - MODULE_m_micro_pre SCHEME_m_micro_pre SUBROUTINE_m_micro_pre_run - - - mass_fraction_of_convective_cloud_ice - mass fraction of convective cloud ice water - kg kg-1 - qicn - real - (:,:) - inout - F - MODULE_m_micro_pre SCHEME_m_micro_pre SUBROUTINE_m_micro_pre_run - - - convective_cloud_fraction_for_microphysics - convective cloud fraction for microphysics - frac - cf_upi - real - (:,:) - inout - F - MODULE_m_micro_pre SCHEME_m_micro_pre SUBROUTINE_m_micro_pre_run - - - cloud_condensed_water_mixing_ratio_convective_transport_tracer - moist (dry+vapor, no condensates) mixing ratio of cloud water (condensate) in the convectively transported tracer array - kg kg-1 - clw_water - real - (:,:) - out - F - MODULE_m_micro_pre SCHEME_m_micro_pre SUBROUTINE_m_micro_pre_run - - - ice_water_mixing_ratio_convective_transport_tracer - moist (dry+vapor, no condensates) mixing ratio of ice water in the convectively transported tracer array - kg kg-1 - clw_ice - real - (:,:) - out - F - MODULE_m_micro_pre SCHEME_m_micro_pre SUBROUTINE_m_micro_pre_run - - - convective_cloud_volume_fraction - convective cloud volume fraction - frac - clcn - real - (:,:) - in - F - MODULE_m_micro_pre SCHEME_m_micro_pre SUBROUTINE_m_micro_pre_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_m_micro_pre SCHEME_m_micro_pre SUBROUTINE_m_micro_pre_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_m_micro_pre SCHEME_m_micro_pre SUBROUTINE_m_micro_pre_run - - - diff --git a/physics/machine.xml b/physics/machine.xml deleted file mode 100644 index cd06d9827..000000000 --- a/physics/machine.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - kind_dyn - definition of kind_dyn - none - kind_dyn - integer - - none - F - MODULE_machine - - - kind_grid - definition of kind_grid - none - kind_grid - integer - - none - F - MODULE_machine - - - kind_phys - definition of kind_phys - none - kind_phys - integer - - none - F - MODULE_machine - - diff --git a/physics/moninshoc.xml b/physics/moninshoc.xml deleted file mode 100644 index 608f48dbe..000000000 --- a/physics/moninshoc.xml +++ /dev/null @@ -1,634 +0,0 @@ - - - - - horizontal_dimension - horizontal dimension - count - ix - integer - - in - F - MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run - - - horizontal_loop_extent - horizontal loop extent - count - im - integer - - in - F - MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run - - - vertical_dimension - vertical layer dimension - count - km - integer - - in - F - MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run - - - number_of_vertical_diffusion_tracers - number of tracers to diffuse vertically - count - ntrac - integer - - in - F - MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run - - - index_for_liquid_cloud_condensate - cloud condensate index in tracer array - index - ntcw - integer - - in - F - MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run - - - number_of_tracers_for_cloud_condensate - number of tracers for cloud condensate - count - ncnd - integer - - in - F - MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run - - - tendency_of_y_wind_due_to_model_physics - updated tendency of the y wind - m s-2 - dv - real - (:,:) - inout - F - MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run - - - tendency_of_x_wind_due_to_model_physics - updated tendency of the x wind - m s-2 - du - real - (:,:) - inout - F - MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run - - - tendency_of_air_temperature_due_to_model_physics - updated tendency of the temperature - K s-1 - tau - real - (:,:) - inout - F - MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run - - - tendency_of_vertically_diffused_tracer_concentration - updated tendency of the tracers due to vertical diffusion in PBL scheme - kg kg-1 s-1 - rtg - real - (:,:,:) - inout - F - MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run - - - x_wind - x component of layer wind - m s-1 - u1 - real - (:,:) - in - F - MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run - - - y_wind - y component of layer wind - m s-1 - v1 - real - (:,:) - in - F - MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run - - - air_temperature - layer mean air temperature - K - t1 - real - (:,:) - in - F - MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run - - - vertically_diffused_tracer_concentration - tracer concentration diffused by PBL scheme - kg kg-1 - q1 - real - (:,:,:) - in - F - MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run - - - atmosphere_heat_diffusivity_from_shoc - diffusivity for heat from the SHOC scheme - m2 s-1 - tkh - real - (:,:) - in - F - MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run - - - prandtl_number - turbulent Prandtl number - none - prnum - real - (:,:) - inout - F - MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run - - - index_for_turbulent_kinetic_energy - tracer index for turbulent kinetic energy - index - ntke - integer - - in - F - MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run - - - dimensionless_exner_function_at_lowest_model_interface - dimensionless Exner function at the surface interface - none - psk - real - (:) - in - F - MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run - - - bulk_richardson_number_at_lowest_model_level - bulk Richardson number at the surface - none - rbsoil - real - (:) - in - F - MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run - - - surface_roughness_length - surface roughness length in cm - cm - zorl - real - (:) - in - F - MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run - - - x_wind_at_10m - x component of wind at 10 m - m s-1 - u10m - real - (:) - in - F - MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run - - - y_wind_at_10m - y component of wind at 10 m - m s-1 - v10m - real - (:) - in - F - MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run - - - Monin-Obukhov_similarity_function_for_momentum - Monin-Obukhov similarity function for momentum - none - fm - real - (:) - in - F - MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run - - - Monin-Obukhov_similarity_function_for_heat - Monin-Obukhov similarity function for heat - none - fh - real - (:) - in - F - MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run - - - surface_skin_temperature - surface skin temperature - K - tsea - real - (:) - in - F - MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run - - - kinematic_surface_upward_sensible_heat_flux - kinematic surface upward sensible heat flux - K m s-1 - heat - real - (:) - in - F - MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run - - - kinematic_surface_upward_latent_heat_flux - kinematic surface upward latent heat flux - kg kg-1 m s-1 - evap - real - (:) - in - F - MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run - - - surface_wind_stress - surface wind stress - m2 s-2 - stress - real - (:) - in - F - MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run - - - wind_speed_at_lowest_model_layer - wind speed at lowest model level - m s-1 - spd1 - real - (:) - in - F - MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run - - - vertical_index_at_top_of_atmosphere_boundary_layer - PBL top model level index - index - kpbl - integer - (:) - out - F - MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run - - - air_pressure_at_interface - air pressure at model layer interfaces - Pa - prsi - real - (:,:) - in - F - MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run - - - air_pressure_difference_between_midlayers - pres(k) - pres(k+1) - Pa - del - real - (:,:) - in - F - MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run - - - air_pressure - mean layer pressure - Pa - prsl - real - (:,:) - in - F - MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run - - - dimensionless_exner_function_at_model_layers - Exner function at layers - none - prslk - real - (:,:) - in - F - MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run - - - geopotential_at_interface - geopotential at model layer interfaces - m2 s-2 - phii - real - (:,:) - in - F - MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run - - - geopotential - geopotential at model layer centers - m2 s-2 - phil - real - (:,:) - in - F - MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run - - - time_step_for_physics - time step for physics - s - delt - real - - in - F - MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run - - - instantaneous_surface_x_momentum_flux - x momentum flux - Pa - dusfc - real - (:) - out - F - MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run - - - instantaneous_surface_y_momentum_flux - y momentum flux - Pa - dvsfc - real - (:) - out - F - MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run - - - instantaneous_surface_upward_sensible_heat_flux - surface upward sensible heat flux - W m-2 - dtsfc - real - (:) - out - F - MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run - - - instantaneous_surface_upward_latent_heat_flux - surface upward latent heat flux - W m-2 - dqsfc - real - (:) - out - F - MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run - - - atmosphere_heat_diffusivity - diffusivity for heat - m2 s-1 - dkt - real - (:,:) - out - F - MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run - - - atmosphere_boundary_layer_thickness - PBL thickness - m - hpbl - real - (:) - out - F - MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run - - - index_of_highest_temperature_inversion - index of highest temperature inversion - index - kinver - integer - (:) - in - F - MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run - - - atmosphere_momentum_diffusivity_background - background value of momentum diffusivity - m2 s-1 - xkzm_m - real - - in - F - MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run - - - atmosphere_heat_diffusivity_background - background value of heat diffusivity - m2 s-1 - xkzm_h - real - - in - F - MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run - - - diffusivity_background_sigma_level - sigma level threshold for background diffusivity - none - xkzm_s - real - - in - F - MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run - - - flag_print - flag for printing diagnostics to output - flag - lprnt - logical - - in - F - MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run - - - horizontal_index_of_printed_column - horizontal index of printed column - index - ipr - integer - - in - F - MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run - - - mpi_rank - current MPI-rank - index - me - integer - - in - F - MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run - - - gravitational_acceleration - gravitational acceleration - m s-2 - grav - real - - in - F - MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run - - - gas_constant_dry_air - ideal gas constant for dry air - J kg-1 K-1 - rd - real - - in - F - MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run - - - specific_heat_of_dry_air_at_constant_pressure - specific heat of dry air at constant pressure - J kg-1 K-1 - cp - real - - in - F - MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run - - - latent_heat_of_vaporization_of_water_at_0C - latent heat of evaporation/sublimation - J kg-1 - hvap - real - - in - F - MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run - - - ratio_of_vapor_to_dry_air_gas_constants_minus_one - (rv/rd) - 1 (rv = ideal gas constant for water vapor) - none - fv - real - - in - F - MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_moninshoc SCHEME_moninshoc SUBROUTINE_moninshoc_run - - - - - diff --git a/physics/mp_thompson_hrrr.xml b/physics/mp_thompson_hrrr.xml deleted file mode 100644 index 4d03acc23..000000000 --- a/physics/mp_thompson_hrrr.xml +++ /dev/null @@ -1,625 +0,0 @@ - - - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_finalize - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_finalize - - - - - horizontal_loop_extent - horizontal loop extent - count - ncol - integer - - in - F - MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_init - - - vertical_dimension - number of vertical levels - count - nlev - integer - - in - F - MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_init - - - flag_for_aerosol_physics - flag for aerosol-aware physics - flag - is_aerosol_aware - logical - - in - F - MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_init - - - tendency_of_water_friendly_aerosols_at_surface - instantaneous fake water-friendly surface aerosol source - kg-1 s-1 - nwfa2d - real - (:) - inout - T - MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_init - - - tendency_of_ice_friendly_aerosols_at_surface - instantaneous fake ice-friendly surface aerosol source - kg-1 s-1 - nifa2d - real - (:) - inout - T - MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_init - - - water_friendly_aerosol_number_concentration - number concentration of water-friendly aerosols - kg-1 - nwfa - real - (:,:) - inout - T - MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_init - - - ice_friendly_aerosol_number_concentration - number concentration of ice-friendly aerosols - kg-1 - nifa - real - (:,:) - inout - T - MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_init - - - mpi_comm - MPI communicator - index - mpicomm - integer - - in - F - MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_init - - - mpi_rank - current MPI-rank - index - mpirank - integer - - in - F - MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_init - - - mpi_root - master MPI-rank - index - mpiroot - integer - - in - F - MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_init - - - omp_threads - number of OpenMP threads available to scheme - count - threads - integer - - in - F - MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_init - - - flag_for_microphysics_scheme - choice of microphysics scheme - flag - imp_physics - integer - - in - F - MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_init - - - flag_for_thompson_microphysics_scheme - choice of Thompson microphysics scheme - flag - imp_physics_thompson - integer - - in - F - MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_init - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_init - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_init - - - - - horizontal_loop_extent - horizontal loop extent - count - ncol - integer - - in - F - MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_run - - - vertical_dimension - number of vertical levels - count - nlev - integer - - in - F - MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_run - - - gravitational_acceleration - gravitational acceleration - m s-2 - con_g - real - - in - F - MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_run - - - gas_constant_dry_air - ideal gas constant for dry air - J kg-1 K-1 - con_rd - real - - in - F - MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_run - - - water_vapor_specific_humidity_updated_by_physics - water vapor specific humidity - kg kg-1 - spechum - real - (:,:) - inout - F - MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_run - - - cloud_condensed_water_mixing_ratio_updated_by_physics - cloud water mixing ratio wrt dry+vapor (no condensates) - kg kg-1 - qc - real - (:,:) - inout - F - MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_run - - - rain_water_mixing_ratio_updated_by_physics - rain water mixing ratio wrt dry+vapor (no condensates) - kg kg-1 - qr - real - (:,:) - inout - F - MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_run - - - ice_water_mixing_ratio_updated_by_physics - ice water mixing ratio wrt dry+vapor (no condensates) - kg kg-1 - qi - real - (:,:) - inout - F - MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_run - - - snow_water_mixing_ratio_updated_by_physics - snow water mixing ratio wrt dry+vapor (no condensates) - kg kg-1 - qs - real - (:,:) - inout - F - MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_run - - - graupel_mixing_ratio_updated_by_physics - graupel mixing ratio wrt dry+vapor (no condensates) - kg kg-1 - qg - real - (:,:) - inout - F - MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_run - - - ice_number_concentration_updated_by_physics - ice number concentration - kg-1 - ni - real - (:,:) - inout - F - MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_run - - - rain_number_concentration_updated_by_physics - rain number concentration - kg-1 - nr - real - (:,:) - inout - F - MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_run - - - flag_for_aerosol_physics - flag for aerosol-aware physics - flag - is_aerosol_aware - logical - - in - F - MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_run - - - cloud_droplet_number_concentration_updated_by_physics - cloud droplet number concentration - kg-1 - nc - real - (:,:) - inout - T - MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_run - - - water_friendly_aerosol_number_concentration_updated_by_physics - number concentration of water-friendly aerosols - kg-1 - nwfa - real - (:,:) - inout - T - MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_run - - - ice_friendly_aerosol_number_concentration_updated_by_physics - number concentration of ice-friendly aerosols - kg-1 - nifa - real - (:,:) - inout - T - MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_run - - - tendency_of_water_friendly_aerosols_at_surface - instantaneous fake water-friendly surface aerosol source - kg-1 s-1 - nwfa2d - real - (:) - in - T - MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_run - - - tendency_of_ice_friendly_aerosols_at_surface - instantaneous fake ice-friendly surface aerosol source - kg-1 s-1 - nifa2d - real - (:) - in - T - MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_run - - - air_temperature_updated_by_physics - model layer mean temperature - K - tgrs - real - (:,:) - inout - F - MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_run - - - air_pressure - mean layer pressure - Pa - prsl - real - (:,:) - in - F - MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_run - - - geopotential_at_interface - geopotential at model layer interfaces - m2 s-2 - phii - real - (:,:) - in - F - MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_run - - - omega - layer mean vertical velocity - Pa s-1 - omega - real - (:,:) - in - F - MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_run - - - time_step_for_physics - physics timestep - s - dtp - real - - in - F - MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_run - - - lwe_thickness_of_explicit_precipitation_amount - explicit precipitation (rain, ice, snow, graupel) on physics timestep - m - prcp - real - (:) - inout - F - MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_run - - - lwe_thickness_of_explicit_rain_amount - explicit rain fall on physics timestep - m - rain - real - (:) - inout - F - MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_run - - - lwe_thickness_of_graupel_amount - graupel fall on physics timestep - m - graupel - real - (:) - inout - F - MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_run - - - lwe_thickness_of_ice_amount - ice fall on physics timestep - m - ice - real - (:) - inout - F - MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_run - - - lwe_thickness_of_snow_amount - snow fall on physics timestep - m - snow - real - (:) - inout - F - MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_run - - - ratio_of_snowfall_to_rainfall - ratio of snowfall to large-scale rainfall - frac - sr - real - (:) - out - F - MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_run - - - radar_reflectivity_10cm - instantaneous refl_10cm - dBZ - refl_10cm - real - (:,:) - out - F - MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_run - - - flag_for_radar_reflectivity - flag for radar reflectivity - flag - do_radar_ref - logical - - in - F - MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_run - - - effective_radius_of_stratiform_cloud_liquid_water_particle_in_um - eff. radius of cloud liquid water particle in micrometer - um - re_cloud - real - (:,:) - none - F - MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_run - - - effective_radius_of_stratiform_cloud_ice_particle_in_um - eff. radius of cloud ice water particle in micrometer - um - re_ice - real - (:,:) - none - F - MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_run - - - effective_radius_of_stratiform_cloud_snow_particle_in_um - effective radius of cloud snow particle in micrometers - um - re_snow - real - (:,:) - none - F - MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_run - - - mpi_comm - MPI communicator - index - mpicomm - integer - - in - F - MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_run - - - mpi_rank - current MPI-rank - index - mpirank - integer - - in - F - MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_run - - - mpi_root - master MPI-rank - index - mpiroot - integer - - in - F - MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_mp_thompson_hrrr SCHEME_mp_thompson_hrrr SUBROUTINE_mp_thompson_hrrr_run - - - diff --git a/physics/mp_thompson_hrrr_post.xml b/physics/mp_thompson_hrrr_post.xml deleted file mode 100644 index 956dd892d..000000000 --- a/physics/mp_thompson_hrrr_post.xml +++ /dev/null @@ -1,207 +0,0 @@ - - - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_mp_thompson_hrrr_post SCHEME_mp_thompson_hrrr_post SUBROUTINE_mp_thompson_hrrr_post_finalize - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_mp_thompson_hrrr_post SCHEME_mp_thompson_hrrr_post SUBROUTINE_mp_thompson_hrrr_post_finalize - - - - - horizontal_loop_extent - horizontal loop extent - count - ncol - integer - - in - F - MODULE_mp_thompson_hrrr_post SCHEME_mp_thompson_hrrr_post SUBROUTINE_mp_thompson_hrrr_post_run - - - vertical_dimension - number of vertical levels - count - nlev - integer - - in - F - MODULE_mp_thompson_hrrr_post SCHEME_mp_thompson_hrrr_post SUBROUTINE_mp_thompson_hrrr_post_run - - - air_temperature_save - air temperature before entering a physics scheme - K - tgrs_save - real - (:,:) - in - F - MODULE_mp_thompson_hrrr_post SCHEME_mp_thompson_hrrr_post SUBROUTINE_mp_thompson_hrrr_post_run - - - air_temperature_updated_by_physics - model layer mean temperature - K - tgrs - real - (:,:) - inout - F - MODULE_mp_thompson_hrrr_post SCHEME_mp_thompson_hrrr_post SUBROUTINE_mp_thompson_hrrr_post_run - - - dimensionless_exner_function_at_model_layers - dimensionless Exner function at model layer centers - none - prslk - real - (:,:) - in - F - MODULE_mp_thompson_hrrr_post SCHEME_mp_thompson_hrrr_post SUBROUTINE_mp_thompson_hrrr_post_run - - - time_step_for_physics - physics timestep - s - dtp - real - - in - F - MODULE_mp_thompson_hrrr_post SCHEME_mp_thompson_hrrr_post SUBROUTINE_mp_thompson_hrrr_post_run - - - mpi_comm - MPI communicator - index - mpicomm - integer - - in - F - MODULE_mp_thompson_hrrr_post SCHEME_mp_thompson_hrrr_post SUBROUTINE_mp_thompson_hrrr_post_run - - - mpi_rank - current MPI-rank - index - mpirank - integer - - in - F - MODULE_mp_thompson_hrrr_post SCHEME_mp_thompson_hrrr_post SUBROUTINE_mp_thompson_hrrr_post_run - - - mpi_root - master MPI-rank - index - mpiroot - integer - - in - F - MODULE_mp_thompson_hrrr_post SCHEME_mp_thompson_hrrr_post SUBROUTINE_mp_thompson_hrrr_post_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_mp_thompson_hrrr_post SCHEME_mp_thompson_hrrr_post SUBROUTINE_mp_thompson_hrrr_post_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_mp_thompson_hrrr_post SCHEME_mp_thompson_hrrr_post SUBROUTINE_mp_thompson_hrrr_post_run - - - - - horizontal_loop_extent - horizontal loop extent - count - ncol - integer - - in - F - MODULE_mp_thompson_hrrr_post SCHEME_mp_thompson_hrrr_post SUBROUTINE_mp_thompson_hrrr_post_init - - - cell_area - area of the grid cell - m2 - area - real - (:) - in - F - MODULE_mp_thompson_hrrr_post SCHEME_mp_thompson_hrrr_post SUBROUTINE_mp_thompson_hrrr_post_init - - - limit_for_temperature_tendency_for_microphysics - temperature tendency limiter per physics time step - K s-1 - ttendlim - real - - in - F - MODULE_mp_thompson_hrrr_post SCHEME_mp_thompson_hrrr_post SUBROUTINE_mp_thompson_hrrr_post_init - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_mp_thompson_hrrr_post SCHEME_mp_thompson_hrrr_post SUBROUTINE_mp_thompson_hrrr_post_init - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_mp_thompson_hrrr_post SCHEME_mp_thompson_hrrr_post SUBROUTINE_mp_thompson_hrrr_post_init - - - diff --git a/physics/mp_thompson_hrrr_pre.xml b/physics/mp_thompson_hrrr_pre.xml deleted file mode 100644 index 3939c1338..000000000 --- a/physics/mp_thompson_hrrr_pre.xml +++ /dev/null @@ -1,337 +0,0 @@ - - - - - - horizontal_loop_extent - horizontal loop extent - count - ncol - integer - - in - F - MODULE_mp_thompson_hrrr_pre SCHEME_mp_thompson_hrrr_pre SUBROUTINE_mp_thompson_hrrr_pre_run - - - vertical_dimension - number of vertical levels - count - nlev - integer - - in - F - MODULE_mp_thompson_hrrr_pre SCHEME_mp_thompson_hrrr_pre SUBROUTINE_mp_thompson_hrrr_pre_run - - - index_of_time_step - current forecast iteration - index - kdt - integer - - in - F - MODULE_mp_thompson_hrrr_pre SCHEME_mp_thompson_hrrr_pre SUBROUTINE_mp_thompson_hrrr_pre_run - - - gravitational_acceleration - gravitational acceleration - m s-2 - con_g - real - - in - F - MODULE_mp_thompson_hrrr_pre SCHEME_mp_thompson_hrrr_pre SUBROUTINE_mp_thompson_hrrr_pre_run - - - gas_constant_dry_air - ideal gas constant for dry air - J kg-1 K-1 - con_rd - real - - in - F - MODULE_mp_thompson_hrrr_pre SCHEME_mp_thompson_hrrr_pre SUBROUTINE_mp_thompson_hrrr_pre_run - - - water_vapor_specific_humidity_updated_by_physics - water vapor specific humidity - kg kg-1 - spechum - real - (:,:) - inout - F - MODULE_mp_thompson_hrrr_pre SCHEME_mp_thompson_hrrr_pre SUBROUTINE_mp_thompson_hrrr_pre_run - - - cloud_condensed_water_mixing_ratio_updated_by_physics - cloud water mixing ratio wrt dry+vapor (no condensates) - kg kg-1 - qc - real - (:,:) - inout - F - MODULE_mp_thompson_hrrr_pre SCHEME_mp_thompson_hrrr_pre SUBROUTINE_mp_thompson_hrrr_pre_run - - - rain_water_mixing_ratio_updated_by_physics - rain water mixing ratio wrt dry+vapor (no condensates) - kg kg-1 - qr - real - (:,:) - inout - F - MODULE_mp_thompson_hrrr_pre SCHEME_mp_thompson_hrrr_pre SUBROUTINE_mp_thompson_hrrr_pre_run - - - ice_water_mixing_ratio_updated_by_physics - ice water mixing ratio wrt dry+vapor (no condensates) - kg kg-1 - qi - real - (:,:) - inout - F - MODULE_mp_thompson_hrrr_pre SCHEME_mp_thompson_hrrr_pre SUBROUTINE_mp_thompson_hrrr_pre_run - - - snow_water_mixing_ratio_updated_by_physics - snow water mixing ratio wrt dry+vapor (no condensates) - kg kg-1 - qs - real - (:,:) - inout - F - MODULE_mp_thompson_hrrr_pre SCHEME_mp_thompson_hrrr_pre SUBROUTINE_mp_thompson_hrrr_pre_run - - - graupel_mixing_ratio_updated_by_physics - graupel mixing ratio wrt dry+vapor (no condensates) - kg kg-1 - qg - real - (:,:) - inout - F - MODULE_mp_thompson_hrrr_pre SCHEME_mp_thompson_hrrr_pre SUBROUTINE_mp_thompson_hrrr_pre_run - - - ice_number_concentration_updated_by_physics - ice number concentration - kg-1 - ni - real - (:,:) - inout - F - MODULE_mp_thompson_hrrr_pre SCHEME_mp_thompson_hrrr_pre SUBROUTINE_mp_thompson_hrrr_pre_run - - - rain_number_concentration_updated_by_physics - rain number concentration - kg-1 - nr - real - (:,:) - inout - F - MODULE_mp_thompson_hrrr_pre SCHEME_mp_thompson_hrrr_pre SUBROUTINE_mp_thompson_hrrr_pre_run - - - flag_for_aerosol_physics - flag for aerosol-aware physics - flag - is_aerosol_aware - logical - - in - F - MODULE_mp_thompson_hrrr_pre SCHEME_mp_thompson_hrrr_pre SUBROUTINE_mp_thompson_hrrr_pre_run - - - cloud_droplet_number_concentration_updated_by_physics - cloud droplet number concentration - kg-1 - nc - real - (:,:) - inout - T - MODULE_mp_thompson_hrrr_pre SCHEME_mp_thompson_hrrr_pre SUBROUTINE_mp_thompson_hrrr_pre_run - - - water_friendly_aerosol_number_concentration_updated_by_physics - number concentration of water-friendly aerosols - kg-1 - nwfa - real - (:,:) - inout - T - MODULE_mp_thompson_hrrr_pre SCHEME_mp_thompson_hrrr_pre SUBROUTINE_mp_thompson_hrrr_pre_run - - - ice_friendly_aerosol_number_concentration_updated_by_physics - number concentration of ice-friendly aerosols - kg-1 - nifa - real - (:,:) - inout - T - MODULE_mp_thompson_hrrr_pre SCHEME_mp_thompson_hrrr_pre SUBROUTINE_mp_thompson_hrrr_pre_run - - - tendency_of_water_friendly_aerosols_at_surface - instantaneous fake water-friendly surface aerosol source - kg-1 s-1 - nwfa2d - real - (:) - inout - T - MODULE_mp_thompson_hrrr_pre SCHEME_mp_thompson_hrrr_pre SUBROUTINE_mp_thompson_hrrr_pre_run - - - tendency_of_ice_friendly_aerosols_at_surface - instantaneous fake ice-friendly surface aerosol source - kg-1 s-1 - nifa2d - real - (:) - inout - T - MODULE_mp_thompson_hrrr_pre SCHEME_mp_thompson_hrrr_pre SUBROUTINE_mp_thompson_hrrr_pre_run - - - air_temperature_updated_by_physics - model layer mean temperature - K - tgrs - real - (:,:) - in - F - MODULE_mp_thompson_hrrr_pre SCHEME_mp_thompson_hrrr_pre SUBROUTINE_mp_thompson_hrrr_pre_run - - - air_temperature_save - air temperature before entering a physics scheme - K - tgrs_save - real - (:,:) - out - F - MODULE_mp_thompson_hrrr_pre SCHEME_mp_thompson_hrrr_pre SUBROUTINE_mp_thompson_hrrr_pre_run - - - air_pressure - mean layer pressure - Pa - prsl - real - (:,:) - in - F - MODULE_mp_thompson_hrrr_pre SCHEME_mp_thompson_hrrr_pre SUBROUTINE_mp_thompson_hrrr_pre_run - - - geopotential - geopotential at model layer centers - m2 s-2 - phil - real - (:,:) - in - F - MODULE_mp_thompson_hrrr_pre SCHEME_mp_thompson_hrrr_pre SUBROUTINE_mp_thompson_hrrr_pre_run - - - cell_area - area of the grid cell - m2 - area - real - (:) - in - F - MODULE_mp_thompson_hrrr_pre SCHEME_mp_thompson_hrrr_pre SUBROUTINE_mp_thompson_hrrr_pre_run - - - mpi_comm - MPI communicator - index - mpicomm - integer - - in - F - MODULE_mp_thompson_hrrr_pre SCHEME_mp_thompson_hrrr_pre SUBROUTINE_mp_thompson_hrrr_pre_run - - - mpi_rank - current MPI-rank - index - mpirank - integer - - in - F - MODULE_mp_thompson_hrrr_pre SCHEME_mp_thompson_hrrr_pre SUBROUTINE_mp_thompson_hrrr_pre_run - - - mpi_root - master MPI-rank - index - mpiroot - integer - - in - F - MODULE_mp_thompson_hrrr_pre SCHEME_mp_thompson_hrrr_pre SUBROUTINE_mp_thompson_hrrr_pre_run - - - ccpp_block_number - for explicit data blocking: block number of this block - index - blkno - integer - - in - F - MODULE_mp_thompson_hrrr_pre SCHEME_mp_thompson_hrrr_pre SUBROUTINE_mp_thompson_hrrr_pre_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_mp_thompson_hrrr_pre SCHEME_mp_thompson_hrrr_pre SUBROUTINE_mp_thompson_hrrr_pre_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_mp_thompson_hrrr_pre SCHEME_mp_thompson_hrrr_pre SUBROUTINE_mp_thompson_hrrr_pre_run - - - - diff --git a/physics/mynnedmf_wrapper.xml b/physics/mynnedmf_wrapper.xml deleted file mode 100644 index 3735485bd..000000000 --- a/physics/mynnedmf_wrapper.xml +++ /dev/null @@ -1,1052 +0,0 @@ - - - - - - - horizontal_dimension - horizontal dimension - count - ix - integer - - in - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - horizontal_loop_extent - horizontal loop extent - count - im - integer - - in - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - vertical_dimension - vertical layer dimension - count - levs - integer - - in - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - flag_for_first_time_step - flag signaling first time step for time integration loop - flag - flag_init - logical - - in - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - flag_for_restart - flag for restart (warmstart) or coldstart - flag - flag_restart - logical - - in - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - time_step_for_physics - time step for physics - s - delt - real - - in - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - cell_size - size of the grid cell - m - dx - real - (:) - in - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - surface_roughness_length - surface roughness length in cm - cm - zorl - real - (:) - in - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - geopotential_at_interface - geopotential at model layer interfaces - m2 s-2 - phii - real - (:,:) - in - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - x_wind - x component of layer wind - m s-1 - U - real - (:,:) - in - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - y_wind - y component of layer wind - m s-1 - V - real - (:,:) - in - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - omega - layer mean vertical velocity - Pa s-1 - omega - real - (:,:) - in - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - air_temperature - layer mean air temperature - K - T3D - real - (:,:) - in - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - water_vapor_specific_humidity - water vapor specific humidity - kg kg-1 - qgrs_water_vapor - real - (:,:) - in - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - cloud_condensed_water_mixing_ratio - moist (dry+vapor, no condensates) mixing ratio of cloud water (condensate) - kg kg-1 - qgrs_liquid_cloud - real - (:,:) - in - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - ice_water_mixing_ratio - moist (dry+vapor, no condensates) mixing ratio of ice water - kg kg-1 - qgrs_ice_cloud - real - (:,:) - in - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - cloud_droplet_number_concentration - number concentration of cloud droplets (liquid) - kg-1 - qgrs_cloud_droplet_num_conc - real - (:,:) - in - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - ice_number_concentration - number concentration of ice - kg-1 - qgrs_cloud_ice_num_conc - real - (:,:) - in - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - ozone_mixing_ratio - ozone mixing ratio - kg kg-1 - qgrs_ozone - real - (:,:) - in - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - water_friendly_aerosol_number_concentration - number concentration of water-friendly aerosols - kg-1 - qgrs_water_aer_num_conc - real - (:,:) - in - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - ice_friendly_aerosol_number_concentration - number concentration of ice-friendly aerosols - kg-1 - qgrs_ice_aer_num_conc - real - (:,:) - in - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - air_pressure - mean layer pressure - Pa - prsl - real - (:,:) - in - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - dimensionless_exner_function_at_model_layers - Exner function at layers - none - exner - real - (:,:) - in - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - sea_land_ice_mask_real - landmask: sea/land/ice=0/1/2 - flag - slmsk - real - (:) - in - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - surface_skin_temperature - surface temperature - K - tsurf - real - (:) - in - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - surface_specific_humidity - surface air saturation specific humidity - kg kg-1 - qsfc - real - (:) - in - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - surface_air_pressure - surface pressure - Pa - ps - real - (:) - in - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - surface_friction_velocity - boundary layer parameter - m s-1 - ust - real - (:) - in - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - surface_drag_wind_speed_for_momentum_in_air - momentum exchange coefficient - m s-1 - ch - real - (:) - out - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - kinematic_surface_upward_sensible_heat_flux - kinematic surface upward sensible heat flux - K m s-1 - hflx - real - (:) - in - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - kinematic_surface_upward_latent_heat_flux - kinematic surface upward latent heat flux - kg kg-1 m s-1 - qflx - real - (:) - in - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - wind_speed_at_lowest_model_layer - wind speed at lowest model level - m s-1 - wspd - real - (:) - in - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - bulk_richardson_number_at_lowest_model_level - bulk Richardson number at the surface - none - rb - real - (:) - in - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - instantaneous_surface_upward_sensible_heat_flux - surface upward sensible heat flux valid for current call - W m-2 - dtsfc1 - real - (:) - out - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - instantaneous_surface_upward_latent_heat_flux - surface upward latent heat flux valid for current call - W m-2 - dqsfc1 - real - (:) - out - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - instantaneous_surface_upward_sensible_heat_flux_for_diag - instantaneous sfc sensible heat flux multiplied by timestep - W m-2 - dtsfci_diag - real - (:) - out - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - instantaneous_surface_upward_latent_heat_flux_for_diag - instantaneous sfc latent heat flux multiplied by timestep - W m-2 - dqsfci_diag - real - (:) - out - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - cumulative_surface_upward_sensible_heat_flux_for_diag_multiplied_by_timestep - cumulative sfc sensible heat flux multiplied by timestep - W m-2 s - dtsfc_diag - real - (:) - out - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - cumulative_surface_upward_latent_heat_flux_for_diag_multiplied_by_timestep - cumulative sfc latent heat flux multiplied by timestep - W m-2 s - dqsfc_diag - real - (:) - out - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - reciprocal_of_obukhov_length - one over obukhov length - m-1 - recmol - real - (:) - in - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - tke_at_mass_points - 2 x tke at mass points - m2 s-2 - qke - real - (:,:) - inout - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - turbulent_kinetic_energy - turbulent kinetic energy - J - qke_adv - real - (:,:) - inout - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - t_prime_squared - temperature fluctuation squared - K2 - tsq - real - (:,:) - out - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - q_prime_squared - water vapor fluctuation squared - kg2 kg-2 - qsq - real - (:,:) - out - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - t_prime_q_prime - covariance of temperature and moisture - K kg kg-1 - cov - real - (:,:) - out - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - mixing_length - mixing length in meters - m - el_pbl - real - (:,:) - inout - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - stability_function_for_heat - stability function for heat - none - Sh3D - real - (:,:) - inout - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - atmosphere_heat_diffusivity_for_mynnpbl - diffusivity for heat for MYNN PBL (defined for all mass levels) - m2 s-1 - exch_h - real - (:,:) - out - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - atmosphere_momentum_diffusivity_for_mynnpbl - diffusivity for momentum for MYNN PBL (defined for all mass levels) - m2 s-1 - exch_m - real - (:,:) - out - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - atmosphere_boundary_layer_thickness - PBL thickness - m - PBLH - real - (:) - inout - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - vertical_index_at_top_of_atmosphere_boundary_layer - PBL top model level index - index - kpbl - integer - (:) - inout - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - subgrid_cloud_mixing_ratio_pbl - subgrid cloud cloud mixing ratio from PBL scheme - kg kg-1 - QC_BL - real - (:,:) - inout - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - subgrid_cloud_fraction_pbl - subgrid cloud fraction from PBL scheme - frac - CLDFRA_BL - real - (:,:) - inout - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - emdf_updraft_area - updraft area from mass flux scheme - frac - edmf_a - real - (:,:) - inout - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - emdf_updraft_vertical_velocity - updraft vertical velocity from mass flux scheme - m s-1 - edmf_w - real - (:,:) - inout - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - emdf_updraft_total_water - updraft total water from mass flux scheme - kg kg-1 - edmf_qt - real - (:,:) - inout - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - emdf_updraft_theta_l - updraft theta-l from mass flux scheme - K - edmf_thl - real - (:,:) - inout - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - emdf_updraft_entrainment_rate - updraft entrainment rate from mass flux scheme - s-1 - edmf_ent - real - (:,:) - inout - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - emdf_updraft_cloud_water - updraft cloud water from mass flux scheme - kg kg-1 - edmf_qc - real - (:,:) - inout - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - number_of_plumes - number of plumes per grid column - count - nupdraft - integer - (:) - inout - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - maximum_mass_flux - maximum mass flux within a column - m s-1 - maxMF - real - (:) - out - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - k_level_of_highest_reaching_plume - k-level of highest reaching plume - count - ktop_shallow - integer - (:) - inout - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_step - total sky longwave heating rate - K s-1 - RTHRATEN - real - (:,:) - in - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - tendency_of_x_wind_due_to_model_physics - updated tendency of the x wind - m s-2 - dudt - real - (:,:) - inout - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - tendency_of_y_wind_due_to_model_physics - updated tendency of the y wind - m s-2 - dvdt - real - (:,:) - inout - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - tendency_of_air_temperature_due_to_model_physics - updated tendency of the temperature - K s-1 - dtdt - real - (:,:) - inout - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - tendency_of_water_vapor_specific_humidity_due_to_model_physics - water vapor specific humidity tendency due to model physics - kg kg-1 s-1 - dqdt_water_vapor - real - (:,:) - inout - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - tendency_of_liquid_cloud_water_mixing_ratio_due_to_model_physics - cloud condensed water mixing ratio tendency due to model physics - kg kg-1 s-1 - dqdt_liquid_cloud - real - (:,:) - inout - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - tendency_of_ice_cloud_water_mixing_ratio_due_to_model_physics - cloud condensed water mixing ratio tendency due to model physics - kg kg-1 s-1 - dqdt_ice_cloud - real - (:,:) - inout - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - tendency_of_ozone_mixing_ratio_due_to_model_physics - ozone mixing ratio tendency due to model physics - kg kg-1 s-1 - dqdt_ozone - real - (:,:) - inout - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - tendency_of_cloud_droplet_number_concentration_due_to_model_physics - number conc. of cloud droplets (liquid) tendency due to model physics - kg-1 s-1 - dqdt_cloud_droplet_num_conc - real - (:,:) - inout - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - tendency_of_ice_number_concentration_due_to_model_physics - number conc. of ice tendency due to model physics - kg-1 s-1 - dqdt_ice_num_conc - real - (:,:) - inout - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - tendency_of_water_friendly_aerosol_number_concentration_due_to_model_physics - number conc. of water-friendly aerosols tendency due to model physics - kg-1 s-1 - dqdt_water_aer_num_conc - real - (:,:) - inout - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - tendency_of_ice_friendly_aerosol_number_concentration_due_to_model_physics - number conc. of ice-friendly aerosols tendency due to model physics - kg-1 s-1 - dqdt_ice_aer_num_conc - real - (:,:) - inout - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - grav_settling - flag to activate gravitational setting of fog - flag - grav_settling - integer - - in - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - tke_budget - flag for activating TKE budget - flag - bl_mynn_tkebudget - integer - - in - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - tke_advect - flag for activating TKE advect - flag - bl_mynn_tkeadvect - logical - - in - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - cloudpdf - flag to determine which cloud PDF to use - flag - bl_mynn_cloudpdf - integer - - in - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - mixing_length_flag - flag to determine which mixing length form to use - flag - bl_mynn_mixlength - integer - - in - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - edmf_flag - flag to activate the mass-flux scheme - flag - bl_mynn_edmf - integer - - in - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - edmf_momentum_transport_flag - flag to activate the transport of momentum - flag - bl_mynn_edmf_mom - integer - - in - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - edmf_tke_transport_flag - flag to activate the transport of TKE - flag - bl_mynn_edmf_tke - integer - - in - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - edmf_partition_flag - flag to partitioning of the MF and ED areas - flag - bl_mynn_edmf_part - integer - - in - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - cloud_specie_mix_flag - flag to activate mixing of cloud species - flag - bl_mynn_cloudmix - integer - - in - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - mix_total_water_flag - flag to mix total water or individual species - flag - bl_mynn_mixqt - integer - - in - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - couple_sgs_clouds_to_radiation_flag - flag for coupling sgs clouds to radiation - flag - icloud_bl - integer - - in - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - do_mynnsfclay - flag to activate MYNN surface layer - flag - do_mynnsfclay - logical - - in - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - flag_for_microphysics_scheme - choice of microphysics scheme - flag - imp_physics - integer - - in - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - flag_for_gfdl_microphysics_scheme - choice of GFDL microphysics scheme - flag - imp_physics_gfdl - integer - - in - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - flag_for_thompson_microphysics_scheme - choice of Thompson microphysics scheme - flag - imp_physics_thompson - integer - - in - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - flag_for_wsm6_microphysics_scheme - choice of WSM6 microphysics scheme - flag - imp_physics_wsm6 - integer - - in - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - flag_for_aerosol_physics - flag for aerosol physics - flag - ltaerosol - logical - - in - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - flag_print - control flag for diagnostic print out - flag - lprnt - logical - - in - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_mynnedmf_wrapper SCHEME_mynnedmf_wrapper SUBROUTINE_mynnedmf_wrapper_run - - - diff --git a/physics/mynnrad_post.xml b/physics/mynnrad_post.xml deleted file mode 100644 index eb979fa04..000000000 --- a/physics/mynnrad_post.xml +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - horizontal_dimension - horizontal dimension - count - ix - integer - - in - F - MODULE_mynnrad_post SCHEME_mynnrad_post SUBROUTINE_mynnrad_post_run - - - horizontal_loop_extent - horizontal loop extent - count - im - integer - - in - F - MODULE_mynnrad_post SCHEME_mynnrad_post SUBROUTINE_mynnrad_post_run - - - vertical_dimension - vertical layer dimension - count - levs - integer - - in - F - MODULE_mynnrad_post SCHEME_mynnrad_post SUBROUTINE_mynnrad_post_run - - - cloud_condensed_water_mixing_ratio - moist (dry+vapor, no condensates) mixing ratio of cloud water (condensate) - kg kg-1 - qc - real - (:,:) - out - F - MODULE_mynnrad_post SCHEME_mynnrad_post SUBROUTINE_mynnrad_post_run - - - ice_water_mixing_ratio - moist (dry+vapor, no condensates) mixing ratio of ice water - kg kg-1 - qi - real - (:,:) - out - F - MODULE_mynnrad_post SCHEME_mynnrad_post SUBROUTINE_mynnrad_post_run - - - cloud_condensed_water_mixing_ratio_save - moist (dry+vapor, no condensates) mixing ratio of cloud water (condensate) before entering a physics scheme - kg kg-1 - qc_save - real - (:,:) - in - F - MODULE_mynnrad_post SCHEME_mynnrad_post SUBROUTINE_mynnrad_post_run - - - ice_water_mixing_ratio_save - moist (dry+vapor, no condensates) mixing ratio of ice water before entering a physics scheme - kg kg-1 - qi_save - real - (:,:) - in - F - MODULE_mynnrad_post SCHEME_mynnrad_post SUBROUTINE_mynnrad_post_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_mynnrad_post SCHEME_mynnrad_post SUBROUTINE_mynnrad_post_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_mynnrad_post SCHEME_mynnrad_post SUBROUTINE_mynnrad_post_run - - - - diff --git a/physics/mynnrad_pre.xml b/physics/mynnrad_pre.xml deleted file mode 100644 index 772eda1e6..000000000 --- a/physics/mynnrad_pre.xml +++ /dev/null @@ -1,216 +0,0 @@ - - - - - - horizontal_dimension - horizontal dimension - count - ix - integer - - in - F - MODULE_mynnrad_pre SCHEME_mynnrad_pre SUBROUTINE_mynnrad_pre_run - - - horizontal_loop_extent - horizontal loop extent - count - im - integer - - in - F - MODULE_mynnrad_pre SCHEME_mynnrad_pre SUBROUTINE_mynnrad_pre_run - - - vertical_dimension - vertical layer dimension - count - levs - integer - - in - F - MODULE_mynnrad_pre SCHEME_mynnrad_pre SUBROUTINE_mynnrad_pre_run - - - cloud_condensed_water_mixing_ratio - moist (dry+vapor, no condensates) mixing ratio of cloud water (condensate) - kg kg-1 - qc - real - (:,:) - inout - F - MODULE_mynnrad_pre SCHEME_mynnrad_pre SUBROUTINE_mynnrad_pre_run - - - ice_water_mixing_ratio - moist (dry+vapor, no condensates) mixing ratio of ice water - kg kg-1 - qi - real - (:,:) - inout - F - MODULE_mynnrad_pre SCHEME_mynnrad_pre SUBROUTINE_mynnrad_pre_run - - - air_temperature - layer mean air temperature - K - T3D - real - (:,:) - in - F - MODULE_mynnrad_pre SCHEME_mynnrad_pre SUBROUTINE_mynnrad_pre_run - - - cloud_condensed_water_mixing_ratio_save - moist (dry+vapor, no condensates) mixing ratio of cloud water (condensate) before entering a physics scheme - kg kg-1 - qc_save - real - (:,:) - out - F - MODULE_mynnrad_pre SCHEME_mynnrad_pre SUBROUTINE_mynnrad_pre_run - - - ice_water_mixing_ratio_save - moist (dry+vapor, no condensates) mixing ratio of ice water before entering a physics scheme - kg kg-1 - qi_save - real - (:,:) - out - F - MODULE_mynnrad_pre SCHEME_mynnrad_pre SUBROUTINE_mynnrad_pre_run - - - subgrid_cloud_mixing_ratio_pbl - subgrid cloud cloud mixing ratio from PBL scheme - kg kg-1 - QC_BL - real - (:,:) - in - F - MODULE_mynnrad_pre SCHEME_mynnrad_pre SUBROUTINE_mynnrad_pre_run - - - subgrid_cloud_fraction_pbl - subgrid cloud fraction from PBL scheme - frac - CLDFRA_BL - real - (:,:) - in - F - MODULE_mynnrad_pre SCHEME_mynnrad_pre SUBROUTINE_mynnrad_pre_run - - - layer_pressure_thickness_for_radiation - layer pressure thickness on radiation levels - hPa - delp - real - (:,:) - out - F - MODULE_mynnrad_pre SCHEME_mynnrad_pre SUBROUTINE_mynnrad_pre_run - - - total_cloud_fraction - layer total cloud fraction - frac - clouds1 - real - (:,:) - inout - F - MODULE_mynnrad_pre SCHEME_mynnrad_pre SUBROUTINE_mynnrad_pre_run - - - cloud_liquid_water_path - layer cloud liquid water path - g m-2 - clouds2 - real - (:,:) - inout - F - MODULE_mynnrad_pre SCHEME_mynnrad_pre SUBROUTINE_mynnrad_pre_run - - - mean_effective_radius_for_liquid_cloud - mean effective radius for liquid cloud - micron - clouds3 - real - (:,:) - inout - F - MODULE_mynnrad_pre SCHEME_mynnrad_pre SUBROUTINE_mynnrad_pre_run - - - cloud_ice_water_path - layer cloud ice water path - g m-2 - clouds4 - real - (:,:) - inout - F - MODULE_mynnrad_pre SCHEME_mynnrad_pre SUBROUTINE_mynnrad_pre_run - - - mean_effective_radius_for_ice_cloud - mean effective radius for ice cloud - micron - clouds5 - real - (:,:) - inout - F - MODULE_mynnrad_pre SCHEME_mynnrad_pre SUBROUTINE_mynnrad_pre_run - - - sea_land_ice_mask_real - landmask: sea/land/ice=0/1/2 - flag - slmsk - real - (:) - in - F - MODULE_mynnrad_pre SCHEME_mynnrad_pre SUBROUTINE_mynnrad_pre_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_mynnrad_pre SCHEME_mynnrad_pre SUBROUTINE_mynnrad_pre_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_mynnrad_pre SCHEME_mynnrad_pre SUBROUTINE_mynnrad_pre_run - - - - diff --git a/physics/mynnsfc_wrapper.xml b/physics/mynnsfc_wrapper.xml deleted file mode 100644 index 787799ec9..000000000 --- a/physics/mynnsfc_wrapper.xml +++ /dev/null @@ -1,700 +0,0 @@ - - - - - - horizontal_dimension - horizontal dimension - count - ix - integer - - in - F - MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run - - - horizontal_loop_extent - horizontal loop extent - count - im - integer - - in - F - MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run - - - vertical_dimension - vertical layer dimension - count - levs - integer - - in - F - MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run - - - ccpp_loop_counter - loop counter for subcycling loops in CCPP - index - iter - integer - - in - F - MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run - - - flag_for_first_time_step - flag signaling first time step for time integration loop - flag - flag_init - logical - - in - F - MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run - - - flag_for_restart - flag for restart (warmstart) or coldstart - flag - flag_restart - logical - - in - F - MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run - - - time_step_for_physics - time step for physics - s - delt - real - - in - F - MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run - - - cell_size - size of the grid cell - m - dx - real - (:) - in - F - MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run - - - x_wind - x component of layer wind - m s-1 - u - real - (:,:) - in - F - MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run - - - y_wind - y component of layer wind - m s-1 - v - real - (:,:) - in - F - MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run - - - air_temperature - layer mean air temperature - K - t3d - real - (:,:) - in - F - MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run - - - water_vapor_specific_humidity - water vapor specific humidity - kg kg-1 - qvsh - real - (:,:) - in - F - MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run - - - cloud_condensed_water_mixing_ratio - moist (dry+vapor, no condensates) mixing ratio of cloud water (condensate) - kg kg-1 - qc - real - (:,:) - in - F - MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run - - - air_pressure - mean layer pressure - Pa - prsl - real - (:,:) - in - F - MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run - - - geopotential_at_interface - geopotential at model layer interfaces - m2 s-2 - phii - real - (:,:) - in - F - MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run - - - dimensionless_exner_function_at_model_layers - Exner function at layers - none - exner - real - (:,:) - in - F - MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run - - - t_prime_squared - temperature fluctuation squared - K2 - tsq - real - (:,:) - in - F - MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run - - - q_prime_squared - water vapor fluctuation squared - kg2 kg-2 - qsq - real - (:,:) - in - F - MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run - - - t_prime_q_prime - covariance of temperature and moisture - K kg kg-1 - cov - real - (:,:) - in - F - MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run - - - mixing_length - mixing length in meters - m - el_pbl - real - (:,:) - in - F - MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run - - - stability_function_for_heat - stability function for heat - none - Sh3D - real - (:,:) - in - F - MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run - - - subgrid_cloud_mixing_ratio_pbl - subgrid cloud cloud mixing ratio from PBL scheme - kg kg-1 - QC_BL - real - (:,:) - in - F - MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run - - - subgrid_cloud_fraction_pbl - subgrid cloud fraction from PBL scheme - frac - CLDFRA_BL - real - (:,:) - in - F - MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run - - - surface_air_pressure - surface pressure - Pa - ps - real - (:) - in - F - MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run - - - atmosphere_boundary_layer_thickness - PBL thickness - m - PBLH - real - (:) - in - F - MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run - - - sea_land_ice_mask_real - landmask: sea/land/ice=0/1/2 - flag - slmsk - real - (:) - in - F - MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run - - - surface_skin_temperature - surface temperature - K - tsk - real - (:) - in - F - MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run - - - surface_specific_humidity - surface air saturation specific humidity - kg kg-1 - qsfc - real - (:) - in - F - MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run - - - surface_snow_thickness_water_equivalent - water equivalent snow depth over land - mm - snowd - real - (:) - in - F - MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run - - - surface_roughness_length - surface roughness length in cm - cm - zorl - real - (:) - inout - F - MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run - - - surface_friction_velocity - boundary layer parameter - m s-1 - ust - real - (:) - inout - F - MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run - - - surface_friction_velocity_drag - friction velocity isolated for momentum only - m s-1 - ustm - real - (:) - inout - F - MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run - - - surface_stability_parameter - monin obukhov surface stability parameter - none - zol - real - (:) - inout - F - MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run - - - theta_star - temperature flux divided by ustar (temperature scale) - K - mol - real - (:) - inout - F - MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run - - - reciprocal_of_obukhov_length - one over obukhov length - m-1 - rmol - real - (:) - inout - F - MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run - - - Monin-Obukhov_similarity_function_for_momentum - Monin-Obukhov similarity parameter for momentum - none - fm - real - (:) - inout - F - MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run - - - Monin-Obukhov_similarity_function_for_heat - Monin-Obukhov similarity parameter for heat - none - fh - real - (:) - inout - F - MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run - - - Monin-Obukhov_similarity_function_for_momentum_at_10m - Monin-Obukhov similarity parameter for momentum - none - fm10 - real - (:) - inout - F - MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run - - - Monin-Obukhov_similarity_function_for_heat_at_2m - Monin-Obukhov similarity parameter for heat - none - fh2 - real - (:) - inout - F - MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run - - - wind_speed_at_lowest_model_layer - wind speed at lowest model level - m s-1 - wspd - real - (:) - inout - F - MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run - - - bulk_richardson_number_at_lowest_model_level - bulk Richardson number at the surface - none - br - real - (:) - inout - F - MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run - - - surface_drag_wind_speed_for_momentum_in_air - momentum exchange coefficient - m s-1 - ch - real - (:) - inout - F - MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run - - - kinematic_surface_upward_sensible_heat_flux - kinematic surface upward sensible heat flux - K m s-1 - hflx - real - (:) - inout - F - MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run - - - kinematic_surface_upward_latent_heat_flux - kinematic surface upward latent heat flux - kg kg-1 m s-1 - QFX - real - (:) - inout - F - MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run - - - surface_latent_heat - latent heating at the surface (pos = up) - W m-2 - lh - real - (:) - inout - F - MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run - - - surface_exchange_coefficient_for_heat - surface exchange coefficient for heat - W m-2 K-1 - flhc - real - (:) - inout - F - MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run - - - surface_exchange_coefficient_for_moisture - surface exchange coefficient for moisture - kg m-2 s-1 - flqc - real - (:) - inout - F - MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run - - - x_wind_at_10m - 10 meter u wind speed - m s-1 - u10 - real - (:) - inout - F - MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run - - - y_wind_at_10m - 10 meter v wind speed - m s-1 - v10 - real - (:) - inout - F - MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run - - - potential_temperature_at_2m - 2 meter potential temperature - K - th2 - real - (:) - inout - F - MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run - - - temperature_at_2m - 2 meter temperature - K - t2 - real - (:) - inout - F - MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run - - - specific_humidity_at_2m - 2 meter specific humidity - kg kg-1 - q2 - real - (:) - inout - F - MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run - - - surface_wind_enhancement_due_to_convection - surface wind enhancement due to convection - m s-1 - wstar - real - (:) - inout - F - MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run - - - surface_exchange_coefficient_for_heat_at_2m - exchange coefficient for heat at 2 meters - m s-1 - chs2 - real - (:) - inout - F - MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run - - - surface_exchange_coefficient_for_moisture_at_2m - exchange coefficient for moisture at 2 meters - m s-1 - cqs2 - real - (:) - inout - F - MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run - - - surface_drag_coefficient_for_momentum_in_air - surface exchange coeff for momentum - none - cda - real - (:) - inout - F - MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run - - - surface_drag_coefficient_for_heat_and_moisture_in_air - surface exchange coeff heat moisture - none - cka - real - (:) - inout - F - MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run - - - surface_wind_stress - surface wind stress - m2 s-2 - stress - real - (:) - inout - F - MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run - - - cloudpdf - flag to determine which cloud PDF to use - flag - bl_mynn_cloudpdf - integer - - in - F - MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run - - - couple_sgs_clouds_to_radiation_flag - flag for coupling sgs clouds to radiation - flag - icloud_bl - integer - - in - F - MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run - - - flag_print - control flag for diagnostic print out - flag - lprnt - logical - - none - F - MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_mynnsfc_wrapper SCHEME_mynnsfc_wrapper SUBROUTINE_mynnsfc_wrapper_run - - - - diff --git a/physics/ozphys.xml b/physics/ozphys.xml deleted file mode 100644 index 60abfcd51..000000000 --- a/physics/ozphys.xml +++ /dev/null @@ -1,238 +0,0 @@ - - - - - horizontal_dimension - horizontal dimension - count - ix - integer - - in - F - MODULE_ozphys SCHEME_ozphys SUBROUTINE_ozphys_run - - - horizontal_loop_extent - horizontal loop extent - count - im - integer - - in - F - MODULE_ozphys SCHEME_ozphys SUBROUTINE_ozphys_run - - - vertical_dimension - number of vertical layers - count - levs - integer - - in - F - MODULE_ozphys SCHEME_ozphys SUBROUTINE_ozphys_run - - - vertical_dimension_of_ozone_forcing_data - number of vertical layers in ozone forcing data - count - ko3 - integer - - in - F - MODULE_ozphys SCHEME_ozphys SUBROUTINE_ozphys_run - - - time_step_for_physics - physics time step - s - dt - real - - in - F - MODULE_ozphys SCHEME_ozphys SUBROUTINE_ozphys_run - - - ozone_concentration_updated_by_physics - ozone concentration updated by physics - kg kg-1 - oz - real - (:,:) - inout - F - MODULE_ozphys SCHEME_ozphys SUBROUTINE_ozphys_run - - - air_temperature_updated_by_physics - updated air temperature - K - tin - real - (:,:) - in - F - MODULE_ozphys SCHEME_ozphys SUBROUTINE_ozphys_run - - - natural_log_of_ozone_forcing_data_pressure_levels - natural log of ozone forcing data pressure levels - log(Pa) - po3 - real - (:) - in - F - MODULE_ozphys SCHEME_ozphys SUBROUTINE_ozphys_run - - - air_pressure - mid-layer pressure - Pa - prsl - real - (:,:) - in - F - MODULE_ozphys SCHEME_ozphys SUBROUTINE_ozphys_run - - - ozone_forcing - ozone forcing coefficients - various - prdout - real - (:,:,:) - in - F - MODULE_ozphys SCHEME_ozphys SUBROUTINE_ozphys_run - - - number_of_coefficients_in_ozone_forcing_data - number of coefficients in ozone forcing data - index - oz_coeff - integer - - in - F - MODULE_ozphys SCHEME_ozphys SUBROUTINE_ozphys_run - - - air_pressure_difference_between_midlayers - difference between mid-layer pressures - Pa - delp - real - (:,:) - in - F - MODULE_ozphys SCHEME_ozphys SUBROUTINE_ozphys_run - - - flag_diagnostics_3D - flag for calculating 3-D diagnostic fields - flag - ldiag3d - logical - - in - F - MODULE_ozphys SCHEME_ozphys SUBROUTINE_ozphys_run - - - cumulative_change_in_ozone_concentration_due_to_production_and_loss_rate - cumulative change in ozone concentration due to production and loss rate - kg kg-1 - ozp1 - real - (:,:) - inout - F - MODULE_ozphys SCHEME_ozphys SUBROUTINE_ozphys_run - - - cumulative_change_in_ozone_concentration_due_to_ozone_mixing_ratio - cumulative change in ozone concentration due to ozone mixing ratio - kg kg-1 - ozp2 - real - (:,:) - inout - F - MODULE_ozphys SCHEME_ozphys SUBROUTINE_ozphys_run - - - cumulative_change_in_ozone_concentration_due_to_temperature - cumulative change in ozone concentration due to temperature - kg kg-1 - ozp3 - real - (:,:) - inout - F - MODULE_ozphys SCHEME_ozphys SUBROUTINE_ozphys_run - - - cumulative_change_in_ozone_concentration_due_to_overhead_ozone_column - cumulative change in ozone concentration due to overhead ozone column - kg kg-1 - ozp4 - real - (:,:) - inout - F - MODULE_ozphys SCHEME_ozphys SUBROUTINE_ozphys_run - - - gravitational_acceleration - gravitational acceleration - m s-2 - con_g - real - - in - F - MODULE_ozphys SCHEME_ozphys SUBROUTINE_ozphys_run - - - mpi_rank - rank of the current MPI task - index - me - integer - - in - F - MODULE_ozphys SCHEME_ozphys SUBROUTINE_ozphys_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_ozphys SCHEME_ozphys SUBROUTINE_ozphys_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_ozphys SCHEME_ozphys SUBROUTINE_ozphys_run - - - - - diff --git a/physics/ozphys_2015.xml b/physics/ozphys_2015.xml deleted file mode 100644 index 5c244b381..000000000 --- a/physics/ozphys_2015.xml +++ /dev/null @@ -1,238 +0,0 @@ - - - - - horizontal_dimension - horizontal dimension - count - ix - integer - - in - F - MODULE_ozphys_2015 SCHEME_ozphys_2015 SUBROUTINE_ozphys_2015_run - - - horizontal_loop_extent - horizontal loop extent - count - im - integer - - in - F - MODULE_ozphys_2015 SCHEME_ozphys_2015 SUBROUTINE_ozphys_2015_run - - - vertical_dimension - number of vertical layers - count - levs - integer - - in - F - MODULE_ozphys_2015 SCHEME_ozphys_2015 SUBROUTINE_ozphys_2015_run - - - vertical_dimension_of_ozone_forcing_data - number of vertical layers in ozone forcing data - count - ko3 - integer - - in - F - MODULE_ozphys_2015 SCHEME_ozphys_2015 SUBROUTINE_ozphys_2015_run - - - time_step_for_physics - physics time step - s - dt - real - - in - F - MODULE_ozphys_2015 SCHEME_ozphys_2015 SUBROUTINE_ozphys_2015_run - - - ozone_concentration_updated_by_physics - ozone concentration updated by physics - kg kg-1 - oz - real - (:,:) - inout - F - MODULE_ozphys_2015 SCHEME_ozphys_2015 SUBROUTINE_ozphys_2015_run - - - air_temperature_updated_by_physics - updated air temperature - K - tin - real - (:,:) - in - F - MODULE_ozphys_2015 SCHEME_ozphys_2015 SUBROUTINE_ozphys_2015_run - - - natural_log_of_ozone_forcing_data_pressure_levels - natural log of ozone forcing data pressure levels - log(Pa) - po3 - real - (:) - in - F - MODULE_ozphys_2015 SCHEME_ozphys_2015 SUBROUTINE_ozphys_2015_run - - - air_pressure - mid-layer pressure - Pa - prsl - real - (:,:) - in - F - MODULE_ozphys_2015 SCHEME_ozphys_2015 SUBROUTINE_ozphys_2015_run - - - ozone_forcing - ozone forcing data - various - prdout - real - (:,:,:) - in - F - MODULE_ozphys_2015 SCHEME_ozphys_2015 SUBROUTINE_ozphys_2015_run - - - number_of_coefficients_in_ozone_forcing_data - number of coefficients in ozone forcing data - index - pl_coeff - integer - - in - F - MODULE_ozphys_2015 SCHEME_ozphys_2015 SUBROUTINE_ozphys_2015_run - - - air_pressure_difference_between_midlayers - difference between mid-layer pressures - Pa - delp - real - (:,:) - in - F - MODULE_ozphys_2015 SCHEME_ozphys_2015 SUBROUTINE_ozphys_2015_run - - - flag_diagnostics_3D - flag for calculating 3-D diagnostic fields - flag - ldiag3d - logical - - in - F - MODULE_ozphys_2015 SCHEME_ozphys_2015 SUBROUTINE_ozphys_2015_run - - - cumulative_change_in_ozone_concentration_due_to_production_and_loss_rate - cumulative change in ozone concentration due to production and loss rate - kg kg-1 - ozp1 - real - (:,:) - inout - F - MODULE_ozphys_2015 SCHEME_ozphys_2015 SUBROUTINE_ozphys_2015_run - - - cumulative_change_in_ozone_concentration_due_to_ozone_mixing_ratio - cumulative change in ozone concentration due to ozone mixing ratio - kg kg-1 - ozp2 - real - (:,:) - inout - F - MODULE_ozphys_2015 SCHEME_ozphys_2015 SUBROUTINE_ozphys_2015_run - - - cumulative_change_in_ozone_concentration_due_to_temperature - cumulative change in ozone concentration due to temperature - kg kg-1 - ozp3 - real - (:,:) - inout - F - MODULE_ozphys_2015 SCHEME_ozphys_2015 SUBROUTINE_ozphys_2015_run - - - cumulative_change_in_ozone_concentration_due_to_overhead_ozone_column - cumulative change in ozone concentration due to overhead ozone column - kg kg-1 - ozp4 - real - (:,:) - inout - F - MODULE_ozphys_2015 SCHEME_ozphys_2015 SUBROUTINE_ozphys_2015_run - - - gravitational_acceleration - gravitational acceleration - m s-2 - con_g - real - - in - F - MODULE_ozphys_2015 SCHEME_ozphys_2015 SUBROUTINE_ozphys_2015_run - - - mpi_rank - rank of the current MPI task - index - me - integer - - in - F - MODULE_ozphys_2015 SCHEME_ozphys_2015 SUBROUTINE_ozphys_2015_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_ozphys_2015 SCHEME_ozphys_2015 SUBROUTINE_ozphys_2015_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_ozphys_2015 SCHEME_ozphys_2015 SUBROUTINE_ozphys_2015_run - - - - - diff --git a/physics/rayleigh_damp.xml b/physics/rayleigh_damp.xml deleted file mode 100644 index f3c519cb6..000000000 --- a/physics/rayleigh_damp.xml +++ /dev/null @@ -1,205 +0,0 @@ - - - - - - - flag_idealized_physics - flag for idealized physics - flag - lsidea - logical - - in - F - MODULE_rayleigh_damp SCHEME_rayleigh_damp SUBROUTINE_rayleigh_damp_run - - - horizontal_loop_extent - horizontal loop extent - count - im - integer - - in - F - MODULE_rayleigh_damp SCHEME_rayleigh_damp SUBROUTINE_rayleigh_damp_run - - - horizontal_dimension - horizontal dimension - count - ix - integer - - in - F - MODULE_rayleigh_damp SCHEME_rayleigh_damp SUBROUTINE_rayleigh_damp_run - - - vertical_dimension - number of vertical layers - count - km - integer - - in - F - MODULE_rayleigh_damp SCHEME_rayleigh_damp SUBROUTINE_rayleigh_damp_run - - - tendency_of_y_wind_due_to_model_physics - meridional wind tendency due to model physics - m s-2 - A - real - (:,:) - inout - F - MODULE_rayleigh_damp SCHEME_rayleigh_damp SUBROUTINE_rayleigh_damp_run - - - tendency_of_x_wind_due_to_model_physics - zonal wind tendency due to model physics - m s-2 - B - real - (:,:) - inout - F - MODULE_rayleigh_damp SCHEME_rayleigh_damp SUBROUTINE_rayleigh_damp_run - - - tendency_of_air_temperature_due_to_model_physics - air temperature tendency due to model physics - K s-1 - C - real - (:,:) - inout - F - MODULE_rayleigh_damp SCHEME_rayleigh_damp SUBROUTINE_rayleigh_damp_run - - - x_wind - zonal wind - m s-1 - u1 - real - (:,:) - in - F - MODULE_rayleigh_damp SCHEME_rayleigh_damp SUBROUTINE_rayleigh_damp_run - - - y_wind - meridional wind - m s-1 - v1 - real - (:,:) - in - F - MODULE_rayleigh_damp SCHEME_rayleigh_damp SUBROUTINE_rayleigh_damp_run - - - time_step_for_physics - physics time step - s - dt - real - - in - F - MODULE_rayleigh_damp SCHEME_rayleigh_damp SUBROUTINE_rayleigh_damp_run - - - specific_heat_of_dry_air_at_constant_pressure - specific heat of dry air at constant pressure - J kg-1 K-1 - cp - real - - in - F - MODULE_rayleigh_damp SCHEME_rayleigh_damp SUBROUTINE_rayleigh_damp_run - - - number_of_vertical_layers_for_radiation_calculations - number of vertical layers for radiation calculations - count - levr - integer - - in - F - MODULE_rayleigh_damp SCHEME_rayleigh_damp SUBROUTINE_rayleigh_damp_run - - - surface_air_pressure - surface pressure - Pa - pgr - real - (:) - in - F - MODULE_rayleigh_damp SCHEME_rayleigh_damp SUBROUTINE_rayleigh_damp_run - - - air_pressure - mid-layer pressure - Pa - prsl - real - (:,:) - in - F - MODULE_rayleigh_damp SCHEME_rayleigh_damp SUBROUTINE_rayleigh_damp_run - - - pressure_cutoff_for_rayleigh_damping - pressure level above which to apply Rayleigh damping - Pa - prslrd0 - real - - in - F - MODULE_rayleigh_damp SCHEME_rayleigh_damp SUBROUTINE_rayleigh_damp_run - - - time_scale_for_rayleigh_damping - time scale for Rayleigh damping - d - ral_ts - real - - in - F - MODULE_rayleigh_damp SCHEME_rayleigh_damp SUBROUTINE_rayleigh_damp_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_rayleigh_damp SCHEME_rayleigh_damp SUBROUTINE_rayleigh_damp_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_rayleigh_damp SCHEME_rayleigh_damp SUBROUTINE_rayleigh_damp_run - - - diff --git a/physics/rrtmg_lw.xml b/physics/rrtmg_lw.xml deleted file mode 100644 index ff1545fbb..000000000 --- a/physics/rrtmg_lw.xml +++ /dev/null @@ -1,524 +0,0 @@ - - - - - - - air_pressure_at_layer_for_radiation_in_hPa - air pressure layer - hPa - plyr - real - (:,:) - in - F - MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run - - - air_pressure_at_interface_for_radiation_in_hPa - air pressure level - hPa - plvl - real - (:,:) - in - F - MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run - - - air_temperature_at_layer_for_radiation - air temperature layer - K - tlyr - real - (:,:) - in - F - MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run - - - air_temperature_at_interface_for_radiation - air temperature level - K - tlvl - real - (:,:) - in - F - MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run - - - water_vapor_specific_humidity_at_layer_for_radiation - specific humidity layer - kg kg-1 - qlyr - real - (:,:) - in - F - MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run - - - ozone_concentration_at_layer_for_radiation - ozone concentration layer - kg kg-1 - olyr - real - (:,:) - in - F - MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run - - - volume_mixing_ratio_co2 - volume mixing ratio co2 - kg kg-1 - gasvmr_co2 - real - (:,:) - in - F - MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run - - - volume_mixing_ratio_n2o - volume mixing ratio no2 - kg kg-1 - gasvmr_n2o - real - (:,:) - in - F - MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run - - - volume_mixing_ratio_ch4 - volume mixing ratio ch4 - kg kg-1 - gasvmr_ch4 - real - (:,:) - in - F - MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run - - - volume_mixing_ratio_o2 - volume mixing ratio o2 - kg kg-1 - gasvmr_o2 - real - (:,:) - in - F - MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run - - - volume_mixing_ratio_co - volume mixing ratio co - kg kg-1 - gasvmr_co - real - (:,:) - in - F - MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run - - - volume_mixing_ratio_cfc11 - volume mixing ratio cfc11 - kg kg-1 - gasvmr_cfc11 - real - (:,:) - in - F - MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run - - - volume_mixing_ratio_cfc12 - volume mixing ratio cfc12 - kg kg-1 - gasvmr_cfc12 - real - (:,:) - in - F - MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run - - - volume_mixing_ratio_cfc22 - volume mixing ratio cfc22 - kg kg-1 - gasvmr_cfc22 - real - (:,:) - in - F - MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run - - - volume_mixing_ratio_ccl4 - volume mixing ratio ccl4 - kg kg-1 - gasvmr_ccl4 - real - (:,:) - in - F - MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run - - - seed_random_numbers_lw - seed for random number generation for longwave radiation - none - icseed - integer - (:) - in - F - MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run - - - aerosol_optical_depth_for_longwave_bands_01-16 - aerosol optical depth for longwave bands 01-16 - none - aeraod - real - (:,:,:) - in - F - MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run - - - aerosol_single_scattering_albedo_for_longwave_bands_01-16 - aerosol single scattering albedo for longwave bands 01-16 - frac - aerssa - real - (:,:,:) - in - F - MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run - - - surface_longwave_emissivity - surface emissivity - frac - sfemis - real - (:) - in - F - MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run - - - surface_ground_temperature_for_radiation - surface ground temperature for radiation - K - sfgtmp - real - (:) - in - F - MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run - - - layer_thickness_for_radiation - layer thickness - km - dzlyr - real - (:,:) - in - F - MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run - - - layer_pressure_thickness_for_radiation - layer pressure thickness - hPa - delpin - real - (:,:) - in - F - MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run - - - cloud_decorrelation_length - cloud decorrelation length - km - de_lgth - real - (:) - in - F - MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run - - - horizontal_loop_extent - horizontal dimension - count - npts - integer - - in - F - MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run - - - adjusted_vertical_layer_dimension_for_radiation - number of vertical layers for radiation - count - nlay - integer - - in - F - MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run - - - adjusted_vertical_level_dimension_for_radiation - number of vertical levels for radiation - count - nlp1 - integer - - in - F - MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run - - - flag_print - flag to print - flag - lprnt - logical - - in - F - MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run - - - total_cloud_fraction - total cloud fraction - frac - cld_cf - real - (:,:) - in - F - MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run - - - flag_to_calc_lw - flag to calculate LW irradiances - flag - lslwr - logical - - in - F - MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run - - - tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_step - longwave total sky heating rate - K s-1 - hlwc - real - (:,:) - inout - F - MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run - - - lw_fluxes_top_atmosphere - longwave total sky fluxes at the top of the atm - W m-2 - topflx - topflw_type - (:) - inout - F - MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run - - - lw_fluxes_sfc - longwave total sky fluxes at the Earth surface - W m-2 - sfcflx - sfcflw_type - (:) - inout - F - MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run - - - cloud_optical_depth_layers_at_10mu_band - approx 10mu band layer cloud optical depth - none - cldtau - real - (:,:) - inout - F - MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run - - - tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_time_step - longwave clear sky heating rate - K s-1 - hlw0 - real - (:,:) - inout - T - MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run - - - lw_heating_rate_spectral - longwave total sky heating rate (spectral) - K s-1 - hlwb - real - (:,:,:) - inout - T - MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run - - - lw_fluxes - lw fluxes total sky / csk and up / down at levels - W m-2 - flxprf - proflw_type - (:,:) - inout - T - MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run - - - cloud_liquid_water_path - cloud liquid water path - g m-2 - cld_lwp - real - (:,:) - in - T - MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run - - - mean_effective_radius_for_liquid_cloud - mean effective radius for liquid cloud - micron - cld_ref_liq - real - (:,:) - in - T - MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run - - - cloud_ice_water_path - cloud ice water path - g m-2 - cld_iwp - real - (:,:) - in - T - MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run - - - mean_effective_radius_for_ice_cloud - mean effective radius for ice cloud - micron - cld_ref_ice - real - (:,:) - in - T - MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run - - - cloud_rain_water_path - cloud ice water path - g m-2 - cld_rwp - real - (:,:) - in - T - MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run - - - mean_effective_radius_for_rain_drop - mean effective radius for rain drop - micron - cld_ref_rain - real - (:,:) - in - T - MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run - - - cloud_snow_water_path - cloud snow water path - g m-2 - cld_swp - real - (:,:) - in - T - MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run - - - mean_effective_radius_for_snow_flake - mean effective radius for snow flake - micron - cld_ref_snow - real - (:,:) - in - T - MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run - - - cloud_optical_depth - cloud optical depth - none - cld_od - real - (:,:) - in - T - MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_rrtmg_lw SCHEME_rrtmg_lw SUBROUTINE_rrtmg_lw_run - - - diff --git a/physics/rrtmg_lw_post.xml b/physics/rrtmg_lw_post.xml deleted file mode 100644 index c8d7c4f07..000000000 --- a/physics/rrtmg_lw_post.xml +++ /dev/null @@ -1,150 +0,0 @@ - - - - - - GFS_control_type_instance - Fortran DDT containing FV3-GFS model control parameters - DDT - Model - GFS_control_type - - in - F - MODULE_rrtmg_lw_post SCHEME_rrtmg_lw_post SUBROUTINE_rrtmg_lw_post_run - - - GFS_grid_type_instance - Fortran DDT containing FV3-GFS grid and interpolation related data - DDT - Grid - GFS_grid_type - - in - F - MODULE_rrtmg_lw_post SCHEME_rrtmg_lw_post SUBROUTINE_rrtmg_lw_post_run - - - GFS_radtend_type_instance - Fortran DDT containing FV3-GFS fields targetted for diagnostic output - DDT - Radtend - GFS_radtend_type - - inout - F - MODULE_rrtmg_lw_post SCHEME_rrtmg_lw_post SUBROUTINE_rrtmg_lw_post_run - - - GFS_coupling_type_instance - Fortran DDT containing FV3-GFS fields to/from coupling with other components - DDT - Coupling - GFS_coupling_type - - inout - F - MODULE_rrtmg_lw_post SCHEME_rrtmg_lw_post SUBROUTINE_rrtmg_lw_post_run - - - horizontal_loop_extent - horizontal loop extent - count - im - integer - - in - F - MODULE_rrtmg_lw_post SCHEME_rrtmg_lw_post SUBROUTINE_rrtmg_lw_post_run - - - extra_top_layer - extra top layers - none - ltp - integer - - in - F - MODULE_rrtmg_lw_post SCHEME_rrtmg_lw_post SUBROUTINE_rrtmg_lw_post_run - - - vertical_layer_dimension_for_radiation - number of vertical layers for radiation calculation - count - lm - integer - - in - F - MODULE_rrtmg_lw_post SCHEME_rrtmg_lw_post SUBROUTINE_rrtmg_lw_post_run - - - vertical_index_difference_between_inout_and_local - vertical index difference between in/out and local - index - kd - integer - - in - F - MODULE_rrtmg_lw_post SCHEME_rrtmg_lw_post SUBROUTINE_rrtmg_lw_post_run - - - surface_air_temperature_for_radiation - lowest model layer air temperature for radiation - K - tsfa - real - (:) - in - F - MODULE_rrtmg_lw_post SCHEME_rrtmg_lw_post SUBROUTINE_rrtmg_lw_post_run - - - tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_step - total sky heating rate due to longwave radiation - K s-1 - htlwc - real - (:,:) - in - F - MODULE_rrtmg_lw_post SCHEME_rrtmg_lw_post SUBROUTINE_rrtmg_lw_post_run - - - tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_time_step - clear sky heating rate due to longwave radiation - K s-1 - htlw0 - real - (:,:) - in - F - MODULE_rrtmg_lw_post SCHEME_rrtmg_lw_post SUBROUTINE_rrtmg_lw_post_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_rrtmg_lw_post SCHEME_rrtmg_lw_post SUBROUTINE_rrtmg_lw_post_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_rrtmg_lw_post SCHEME_rrtmg_lw_post SUBROUTINE_rrtmg_lw_post_run - - - - diff --git a/physics/rrtmg_lw_pre.xml b/physics/rrtmg_lw_pre.xml deleted file mode 100644 index f6b6512ad..000000000 --- a/physics/rrtmg_lw_pre.xml +++ /dev/null @@ -1,106 +0,0 @@ - - - - - GFS_control_type_instance - Fortran DDT containing FV3-GFS model control parameters - DDT - Model - GFS_control_type - - in - F - MODULE_rrtmg_lw_pre SCHEME_rrtmg_lw_pre SUBROUTINE_rrtmg_lw_pre_run - - - GFS_grid_type_instance - Fortran DDT containing FV3-GFS grid and interpolation related data - DDT - Grid - GFS_grid_type - - in - F - MODULE_rrtmg_lw_pre SCHEME_rrtmg_lw_pre SUBROUTINE_rrtmg_lw_pre_run - - - GFS_sfcprop_type_instance - Fortran DDT containing FV3-GFS surface fields - DDT - Sfcprop - GFS_sfcprop_type - - in - F - MODULE_rrtmg_lw_pre SCHEME_rrtmg_lw_pre SUBROUTINE_rrtmg_lw_pre_run - - - GFS_radtend_type_instance - Fortran DDT containing FV3-GFS radiation tendencies - DDT - Radtend - GFS_radtend_type - - inout - F - MODULE_rrtmg_lw_pre SCHEME_rrtmg_lw_pre SUBROUTINE_rrtmg_lw_pre_run - - - horizontal_loop_extent - horizontal loop extent - count - im - integer - - in - F - MODULE_rrtmg_lw_pre SCHEME_rrtmg_lw_pre SUBROUTINE_rrtmg_lw_pre_run - - - surface_ground_temperature_for_radiation - surface ground temperature for radiation - K - tsfg - real - (:) - in - F - MODULE_rrtmg_lw_pre SCHEME_rrtmg_lw_pre SUBROUTINE_rrtmg_lw_pre_run - - - surface_air_temperature_for_radiation - lowest model layer air temperature for radiation - K - tsfa - real - (:) - in - F - MODULE_rrtmg_lw_pre SCHEME_rrtmg_lw_pre SUBROUTINE_rrtmg_lw_pre_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_rrtmg_lw_pre SCHEME_rrtmg_lw_pre SUBROUTINE_rrtmg_lw_pre_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_rrtmg_lw_pre SCHEME_rrtmg_lw_pre SUBROUTINE_rrtmg_lw_pre_run - - - - - diff --git a/physics/rrtmg_sw.xml b/physics/rrtmg_sw.xml deleted file mode 100644 index 3cb297ce5..000000000 --- a/physics/rrtmg_sw.xml +++ /dev/null @@ -1,634 +0,0 @@ - - - - - - air_pressure_at_layer_for_radiation_in_hPa - air pressure layer - hPa - plyr - real - (:,:) - in - F - MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run - - - air_pressure_at_interface_for_radiation_in_hPa - air pressure level - hPa - plvl - real - (:,:) - in - F - MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run - - - air_temperature_at_layer_for_radiation - air temperature layer - K - tlyr - real - (:,:) - in - F - MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run - - - air_temperature_at_interface_for_radiation - air temperature level - K - tlvl - real - (:,:) - in - F - MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run - - - water_vapor_specific_humidity_at_layer_for_radiation - specific humidity layer - kg kg-1 - qlyr - real - (:,:) - in - F - MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run - - - ozone_concentration_at_layer_for_radiation - ozone concentration layer - kg kg-1 - olyr - real - (:,:) - in - F - MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run - - - volume_mixing_ratio_co2 - volume mixing ratio co2 - kg kg-1 - gasvmr_co2 - real - (:,:) - in - F - MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run - - - volume_mixing_ratio_n2o - volume mixing ratio no2 - kg kg-1 - gasvmr_n2o - real - (:,:) - in - F - MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run - - - volume_mixing_ratio_ch4 - volume mixing ratio ch4 - kg kg-1 - gasvmr_ch4 - real - (:,:) - in - F - MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run - - - volume_mixing_ratio_o2 - volume mixing ratio o2 - kg kg-1 - gasvmr_o2 - real - (:,:) - in - F - MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run - - - volume_mixing_ratio_co - volume mixing ratio co - kg kg-1 - gasvmr_co - real - (:,:) - in - F - MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run - - - volume_mixing_ratio_cfc11 - volume mixing ratio cfc11 - kg kg-1 - gasvmr_cfc11 - real - (:,:) - in - F - MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run - - - volume_mixing_ratio_cfc12 - volume mixing ratio cfc12 - kg kg-1 - gasvmr_cfc12 - real - (:,:) - in - F - MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run - - - volume_mixing_ratio_cfc22 - volume mixing ratio cfc22 - kg kg-1 - gasvmr_cfc22 - real - (:,:) - in - F - MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run - - - volume_mixing_ratio_ccl4 - volume mixing ratio ccl4 - kg kg-1 - gasvmr_ccl4 - real - (:,:) - in - F - MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run - - - seed_random_numbers_sw - seed for random number generation for shortwave radiation - none - icseed - integer - (:) - in - F - MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run - - - aerosol_optical_depth_for_shortwave_bands_01-16 - aerosol optical depth for shortwave bands 01-16 - none - aeraod - real - (:,:,:) - in - F - MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run - - - aerosol_single_scattering_albedo_for_shortwave_bands_01-16 - aerosol single scattering albedo for shortwave bands 01-16 - frac - aerssa - real - (:,:,:) - in - F - MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run - - - aerosol_asymmetry_parameter_for_shortwave_bands_01-16 - aerosol asymmetry paramter for shortwave bands 01-16 - none - aerasy - real - (:,:,:) - in - F - MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run - - - surface_albedo_due_to_near_IR_direct - surface albedo due to near IR direct beam - frac - sfcalb_nir_dir - real - (:) - in - F - MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run - - - surface_albedo_due_to_near_IR_diffused - surface albedo due to near IR diffused beam - frac - sfcalb_nir_dif - real - (:) - in - F - MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run - - - surface_albedo_due_to_UV_and_VIS_direct - surface albedo due to UV+VIS direct beam - frac - sfcalb_uvis_dir - real - (:) - in - F - MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run - - - surface_albedo_due_to_UV_and_VIS_diffused - surface albedo due to UV+VIS diffused beam - frac - sfcalb_uvis_dif - real - (:) - in - F - MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run - - - layer_thickness_for_radiation - layer thickness - km - dzlyr - real - (:,:) - in - F - MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run - - - layer_pressure_thickness_for_radiation - layer pressure thickness - hPa - delpin - real - (:,:) - in - F - MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run - - - cloud_decorrelation_length - cloud decorrelation length - km - de_lgth - real - (:) - in - F - MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run - - - cosine_of_zenith_angle - cosine of the solar zenit angle - none - cosz - real - (:) - in - F - MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run - - - solar_constant - solar constant - W m-2 - solcon - real - - in - F - MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run - - - daytime_points_dimension - daytime points dimension - count - nday - integer - - in - F - MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run - - - daytime_points - daytime points - index - idxday - integer - (:) - in - F - MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run - - - horizontal_loop_extent - horizontal dimension - count - npts - integer - - in - F - MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run - - - adjusted_vertical_layer_dimension_for_radiation - number of vertical layers for radiation - count - nlay - integer - - in - F - MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run - - - adjusted_vertical_level_dimension_for_radiation - number of vertical levels for radiation - count - nlp1 - integer - - in - F - MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run - - - flag_print - flag to print - flag - lprnt - logical - - in - F - MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run - - - total_cloud_fraction - total cloud fraction - frac - cld_cf - real - (:,:) - in - F - MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run - - - flag_to_calc_sw - flag to calculate SW irradiances - flag - lsswr - logical - - in - F - MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run - - - tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step - shortwave total sky heating rate - K s-1 - hswc - real - (:,:) - inout - F - MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run - - - sw_fluxes_top_atmosphere - shortwave total sky fluxes at the top of the atm - W m-2 - topflx - topfsw_type - (:) - inout - F - MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run - - - sw_fluxes_sfc - shortwave total sky fluxes at the Earth surface - W m-2 - sfcflx - sfcfsw_type - (:) - inout - F - MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run - - - cloud_optical_depth_layers_at_0.55mu_band - approx .55mu band layer cloud optical depth - none - cldtau - real - (:,:) - inout - F - MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run - - - tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_time_step - shortwave clear sky heating rate - K s-1 - hsw0 - real - (:,:) - inout - T - MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run - - - sw_heating_rate_spectral - shortwave total sky heating rate (spectral) - K s-1 - hswb - real - (:,:,:) - inout - T - MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run - - - sw_fluxes - sw fluxes total sky / csk and up / down at levels - W m-2 - flxprf - profsw_type - (:,:) - inout - T - MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run - - - components_of_surface_downward_shortwave_fluxes - derived type for special components of surface downward shortwave fluxes - W m-2 - fdncmp - cmpfsw_type - (:) - inout - T - MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run - - - cloud_liquid_water_path - cloud liquid water path - g m-2 - cld_lwp - real - (:,:) - in - T - MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run - - - mean_effective_radius_for_liquid_cloud - mean effective radius for liquid cloud - micron - cld_ref_liq - real - (:,:) - in - T - MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run - - - cloud_ice_water_path - cloud ice water path - g m-2 - cld_iwp - real - (:,:) - in - T - MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run - - - mean_effective_radius_for_ice_cloud - mean effective radius for ice cloud - micron - cld_ref_ice - real - (:,:) - in - T - MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run - - - cloud_rain_water_path - cloud rain water path - g m-2 - cld_rwp - real - (:,:) - in - T - MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run - - - mean_effective_radius_for_rain_drop - mean effective radius for rain drop - micron - cld_ref_rain - real - (:,:) - in - T - MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run - - - cloud_snow_water_path - cloud snow water path - g m-2 - cld_swp - real - (:,:) - in - T - MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run - - - mean_effective_radius_for_snow_flake - mean effective radius for snow flake - micron - cld_ref_snow - real - (:,:) - in - T - MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run - - - cloud_optical_depth - cloud optical depth - none - cld_od - real - (:,:) - in - T - MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run - - - cloud_single_scattering_albedo - cloud single scattering albedo - frac - cld_ssa - real - (:,:) - in - T - MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run - - - cloud_asymmetry_parameter - cloud asymmetry parameter - none - cld_asy - real - (:,:) - in - T - MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_rrtmg_sw SCHEME_rrtmg_sw SUBROUTINE_rrtmg_sw_run - - - - diff --git a/physics/rrtmg_sw_post.xml b/physics/rrtmg_sw_post.xml deleted file mode 100644 index 4e3473ffe..000000000 --- a/physics/rrtmg_sw_post.xml +++ /dev/null @@ -1,216 +0,0 @@ - - - - - - - GFS_control_type_instance - Fortran DDT containing FV3-GFS model control parameters - DDT - Model - GFS_control_type - - in - F - MODULE_rrtmg_sw_post SCHEME_rrtmg_sw_post SUBROUTINE_rrtmg_sw_post_run - - - GFS_grid_type_instance - Fortran DDT containing FV3-GFS grid and interpolation related data - DDT - Grid - GFS_grid_type - - in - F - MODULE_rrtmg_sw_post SCHEME_rrtmg_sw_post SUBROUTINE_rrtmg_sw_post_run - - - GFS_diag_type_instance - Fortran DDT containing FV3-GFS diagnotics data - DDT - Diag - GFS_diag_type - - inout - F - MODULE_rrtmg_sw_post SCHEME_rrtmg_sw_post SUBROUTINE_rrtmg_sw_post_run - - - GFS_radtend_type_instance - Fortran DDT containing FV3-GFS fields targetted for diagnostic output - DDT - Radtend - GFS_radtend_type - - inout - F - MODULE_rrtmg_sw_post SCHEME_rrtmg_sw_post SUBROUTINE_rrtmg_sw_post_run - - - GFS_coupling_type_instance - Fortran DDT containing FV3-GFS fields to/from coupling with other components - DDT - Coupling - GFS_coupling_type - - inout - F - MODULE_rrtmg_sw_post SCHEME_rrtmg_sw_post SUBROUTINE_rrtmg_sw_post_run - - - horizontal_loop_extent - horizontal loop extent - count - im - integer - - in - F - MODULE_rrtmg_sw_post SCHEME_rrtmg_sw_post SUBROUTINE_rrtmg_sw_post_run - - - extra_top_layer - extra top layers - none - ltp - integer - - in - F - MODULE_rrtmg_sw_post SCHEME_rrtmg_sw_post SUBROUTINE_rrtmg_sw_post_run - - - daytime_points_dimension - daytime points dimension - count - nday - integer - - in - F - MODULE_rrtmg_sw_post SCHEME_rrtmg_sw_post SUBROUTINE_rrtmg_sw_post_run - - - vertical_layer_dimension_for_radiation - number of vertical layers for radiation calculation - count - lm - integer - - in - F - MODULE_rrtmg_sw_post SCHEME_rrtmg_sw_post SUBROUTINE_rrtmg_sw_post_run - - - vertical_index_difference_between_inout_and_local - vertical index difference between in/out and local - index - kd - integer - - in - F - MODULE_rrtmg_sw_post SCHEME_rrtmg_sw_post SUBROUTINE_rrtmg_sw_post_run - - - tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step - total sky heating rate due to shortwave radiation - K s-1 - htswc - real - (:,:) - in - F - MODULE_rrtmg_sw_post SCHEME_rrtmg_sw_post SUBROUTINE_rrtmg_sw_post_run - - - tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_time_step - clear sky heating rates due to shortwave radiation - K s-1 - htsw0 - real - (:,:) - in - F - MODULE_rrtmg_sw_post SCHEME_rrtmg_sw_post SUBROUTINE_rrtmg_sw_post_run - - - surface_albedo_due_to_near_IR_direct - surface albedo due to near IR direct beam - frac - sfcalb1 - real - (:) - in - F - MODULE_rrtmg_sw_post SCHEME_rrtmg_sw_post SUBROUTINE_rrtmg_sw_post_run - - - surface_albedo_due_to_near_IR_diffused - surface albedo due to near IR diffused beam - frac - sfcalb2 - real - (:) - in - F - MODULE_rrtmg_sw_post SCHEME_rrtmg_sw_post SUBROUTINE_rrtmg_sw_post_run - - - surface_albedo_due_to_UV_and_VIS_direct - surface albedo due to UV+VIS direct beam - frac - sfcalb3 - real - (:) - in - F - MODULE_rrtmg_sw_post SCHEME_rrtmg_sw_post SUBROUTINE_rrtmg_sw_post_run - - - surface_albedo_due_to_UV_and_VIS_diffused - surface albedo due to UV+VIS diffused beam - frac - sfcalb4 - real - (:) - in - F - MODULE_rrtmg_sw_post SCHEME_rrtmg_sw_post SUBROUTINE_rrtmg_sw_post_run - - - components_of_surface_downward_shortwave_fluxes - derived type for special components of surface downward shortwave fluxes - W m-2 - scmpsw - cmpfsw_type - (:) - inout - F - MODULE_rrtmg_sw_post SCHEME_rrtmg_sw_post SUBROUTINE_rrtmg_sw_post_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_rrtmg_sw_post SCHEME_rrtmg_sw_post SUBROUTINE_rrtmg_sw_post_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_rrtmg_sw_post SCHEME_rrtmg_sw_post SUBROUTINE_rrtmg_sw_post_run - - - diff --git a/physics/rrtmg_sw_pre.xml b/physics/rrtmg_sw_pre.xml deleted file mode 100644 index 9523a4248..000000000 --- a/physics/rrtmg_sw_pre.xml +++ /dev/null @@ -1,183 +0,0 @@ - - - - - - - GFS_control_type_instance - Fortran DDT containing FV3-GFS model control parameters - DDT - Model - GFS_control_type - - in - F - MODULE_rrtmg_sw_pre SCHEME_rrtmg_sw_pre SUBROUTINE_rrtmg_sw_pre_run - - - GFS_grid_type_instance - Fortran DDT containing FV3-GFS grid and interpolation related data - DDT - Grid - GFS_grid_type - - in - F - MODULE_rrtmg_sw_pre SCHEME_rrtmg_sw_pre SUBROUTINE_rrtmg_sw_pre_run - - - GFS_sfcprop_type_instance - Fortran DDT containing FV3-GFS surface fields - DDT - Sfcprop - GFS_sfcprop_type - - in - F - MODULE_rrtmg_sw_pre SCHEME_rrtmg_sw_pre SUBROUTINE_rrtmg_sw_pre_run - - - GFS_radtend_type_instance - Fortran DDT containing FV3-GFS radiation tendencies - DDT - Radtend - GFS_radtend_type - - inout - F - MODULE_rrtmg_sw_pre SCHEME_rrtmg_sw_pre SUBROUTINE_rrtmg_sw_pre_run - - - horizontal_loop_extent - horizontal loop extent - count - im - integer - - in - F - MODULE_rrtmg_sw_pre SCHEME_rrtmg_sw_pre SUBROUTINE_rrtmg_sw_pre_run - - - daytime_points_dimension - daytime points dimension - count - nday - integer - - out - F - MODULE_rrtmg_sw_pre SCHEME_rrtmg_sw_pre SUBROUTINE_rrtmg_sw_pre_run - - - daytime_points - daytime points - index - idxday - integer - (:) - out - F - MODULE_rrtmg_sw_pre SCHEME_rrtmg_sw_pre SUBROUTINE_rrtmg_sw_pre_run - - - surface_ground_temperature_for_radiation - surface ground temperature for radiation - K - tsfg - real - (:) - in - F - MODULE_rrtmg_sw_pre SCHEME_rrtmg_sw_pre SUBROUTINE_rrtmg_sw_pre_run - - - surface_air_temperature_for_radiation - lowest model layer air temperature for radiation - K - tsfa - real - (:) - in - F - MODULE_rrtmg_sw_pre SCHEME_rrtmg_sw_pre SUBROUTINE_rrtmg_sw_pre_run - - - surface_albedo_due_to_near_IR_direct - surface albedo due to near IR direct beam - frac - sfcalb1 - real - (:) - out - F - MODULE_rrtmg_sw_pre SCHEME_rrtmg_sw_pre SUBROUTINE_rrtmg_sw_pre_run - - - surface_albedo_due_to_near_IR_diffused - surface albedo due to near IR diffused beam - frac - sfcalb2 - real - (:) - out - F - MODULE_rrtmg_sw_pre SCHEME_rrtmg_sw_pre SUBROUTINE_rrtmg_sw_pre_run - - - surface_albedo_due_to_UV_and_VIS_direct - surface albedo due to UV+VIS direct beam - frac - sfcalb3 - real - (:) - out - F - MODULE_rrtmg_sw_pre SCHEME_rrtmg_sw_pre SUBROUTINE_rrtmg_sw_pre_run - - - surface_albedo_due_to_UV_and_VIS_diffused - surface albedo due to UV+VIS diffused beam - frac - sfcalb4 - real - (:) - out - F - MODULE_rrtmg_sw_pre SCHEME_rrtmg_sw_pre SUBROUTINE_rrtmg_sw_pre_run - - - surface_albedo_perturbation - surface albedo perturbation - frac - alb1d - real - (:) - in - F - MODULE_rrtmg_sw_pre SCHEME_rrtmg_sw_pre SUBROUTINE_rrtmg_sw_pre_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_rrtmg_sw_pre SCHEME_rrtmg_sw_pre SUBROUTINE_rrtmg_sw_pre_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_rrtmg_sw_pre SCHEME_rrtmg_sw_pre SUBROUTINE_rrtmg_sw_pre_run - - - diff --git a/physics/rrtmgp_lw.F90 b/physics/rrtmgp_lw.F90 index e9471d178..9c27d6fa9 100644 --- a/physics/rrtmgp_lw.F90 +++ b/physics/rrtmgp_lw.F90 @@ -10,8 +10,7 @@ module rrtmgp_lw use mo_rrtmgp_clr_all_sky, only: rte_lw use mo_gas_concentrations, only: ty_gas_concs use mo_fluxes_byband, only: ty_fluxes_byband - use rrtmgp_lw_cloud_optics, only: rrtmgp_lw_cloud_optics_init - use rrtmgp_lw_gas_optics, only: rrtmgp_lw_gas_optics_init, check_error_msg + use rrtmgp_aux, only: check_error_msg public rrtmgp_lw_init, rrtmgp_lw_run, rrtmgp_lw_finalize contains @@ -29,12 +28,12 @@ end subroutine rrtmgp_lw_init !! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | !! |-------------------------|-----------------------------------------------------------------------------------------------|--------------------------------------------------------------------|-------|------|-----------------------|-----------|--------|----------| !! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | +!! | Radtend | GFS_radtend_type_instance | Fortran DDT containing FV3-GFS radiation tendencies | DDT | 0 | GFS_radtend_type | | in | F | !! | ncol | horizontal_loop_extent | horizontal dimension | count | 0 | integer | | in | F | !! | p_lay | air_pressure_at_layer_for_RRTMGP_in_hPa | air pressure layer | hPa | 2 | real | kind_phys | in | F | !! | p_lev | air_pressure_at_interface_for_RRTMGP_in_hPa | air pressure level | hPa | 2 | real | kind_phys | in | F | !! | t_lay | air_temperature_at_layer_for_RRTMGP | air temperature layer | K | 2 | real | kind_phys | in | F | !! | skt | surface_ground_temperature_for_radiation | surface ground temperature for radiation | K | 1 | real | kind_phys | in | F | -!! | sfc_emiss | surface_longwave_emissivity_in_each_band | surface lw emissivity in fraction in each LW band | frac | 2 | real | kind_phys | in | F | !! | lw_gas_props | coefficients_for_lw_gas_optics | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | !! | optical_propsLW_clds | longwave_optical_properties_for_cloudy_atmosphere | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_1scl | | in | F | !! | optical_propsLW_aerosol | longwave_optical_properties_for_aerosols | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_1scl | | in | F | @@ -49,12 +48,15 @@ end subroutine rrtmgp_lw_init !! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | !! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | !! - subroutine rrtmgp_lw_run(Model, ncol, lw_gas_props, p_lay, t_lay, p_lev, skt, & - sfc_emiss, gas_concentrations, optical_propsLW_clds, optical_propsLW_aerosol,& + subroutine rrtmgp_lw_run(Model, Radtend, ncol, lw_gas_props, p_lay, t_lay, p_lev, skt, & + gas_concentrations, optical_propsLW_clds, optical_propsLW_aerosol,& lslwr, fluxUP_allsky, fluxDOWN_allsky, fluxUP_clrsky, fluxDOWN_clrsky, hlw0, hlwb, errmsg, errflg) ! Inputs - type(GFS_control_type), intent(in) :: Model + type(GFS_control_type), intent(in) :: & + Model + type(GFS_radtend_type), intent(in) :: & + Radtend ! Fortran DDT containing FV3-GFS radiation tendencies integer, intent(in) :: & ncol ! Number of horizontal gridpoints real(kind_phys), dimension(ncol,model%levs), intent(in) :: & @@ -66,8 +68,6 @@ subroutine rrtmgp_lw_run(Model, ncol, lw_gas_props, p_lay, t_lay, p_lev, skt, & skt ! Surface(skin) temperature (K) type(ty_gas_optics_rrtmgp),intent(in) :: & lw_gas_props ! DDT containing LW spectral information - real(kind_phys), dimension(lw_gas_props%get_nband(),ncol) :: & - sfc_emiss ! Surface emissivity (1) type(ty_optical_props_1scl),intent(in) :: & optical_propsLW_clds, & ! RRTMGP DDT: longwave cloud radiative properties optical_propsLW_aerosol ! RRTMGP DDT: longwave aerosol radiative properties @@ -129,7 +129,7 @@ subroutine rrtmgp_lw_run(Model, ncol, lw_gas_props, p_lay, t_lay, p_lev, skt, & t_lay, & ! IN - temperature at layer interfaes (K) p_lev, & ! IN - pressure at layer centers (Pa) skt, & ! IN - skin temperature (K) - sfc_emiss, & ! IN - surface emissivity in each LW band + Radtend%sfc_emiss_byband, & ! IN - surface emissivity in each LW band optical_propsLW_clds, & ! IN - DDT containing cloud optical information flux_allsky, & ! OUT - Fluxes, all-sky, 3D (nCol,model%levs,nBand) flux_clrsky, & ! OUT - Fluxes, clear-sky, 3D (nCol,model%levs,nBand) diff --git a/physics/rrtmgp_lw_cloud_optics.F90 b/physics/rrtmgp_lw_cloud_optics.F90 index 884101046..850d1307b 100644 --- a/physics/rrtmgp_lw_cloud_optics.F90 +++ b/physics/rrtmgp_lw_cloud_optics.F90 @@ -96,9 +96,7 @@ subroutine rrtmgp_lw_cloud_optics_init(Model, mpicomm, mpirank, mpiroot, lw_clou npairsLWcldy ! ! Local variables - integer :: dimID,varID,status,igpt,iGas,ij,ierr,ncid_lw_clds - integer,dimension(:),allocatable :: temp1,temp2,temp3,temp4,temp_log_array1,& - temp_log_array2, temp_log_array3, temp_log_array4 + integer :: dimID,varID,status,ierr,ncid_lw_clds character(len=264) :: lw_cloud_props_file integer,parameter :: max_strlen=256 @@ -106,8 +104,11 @@ subroutine rrtmgp_lw_cloud_optics_init(Model, mpicomm, mpirank, mpiroot, lw_clou errmsg = '' errflg = 0 + if (Model%rrtmgp_cld_optics .eq. 0) return + ! Filenames are set in the gfs_physics_nml (scm/src/GFS_typedefs.F90) lw_cloud_props_file = trim(Model%rrtmgp_root)//trim(Model%lw_file_clouds) + ! Read dimensions for k-distribution fields (only on master processor(0)) if (mpirank .eq. mpiroot) then if(nf90_open(trim(lw_cloud_props_file), NF90_WRITE, ncid_lw_clds) == NF90_NOERR) then @@ -295,13 +296,14 @@ subroutine rrtmgp_lw_cloud_optics_init(Model, mpicomm, mpirank, mpiroot, lw_clou #endif ! Load tables data for RRTMGP cloud-optics - call check_error_msg('lw_cloud_optics_init',lw_cloud_props%set_ice_roughness(Model%rrtmgp_nrghice)) if (Model%rrtmgp_cld_optics .eq. 1) then + call check_error_msg('lw_cloud_optics_init',lw_cloud_props%set_ice_roughness(Model%rrtmgp_nrghice)) call check_error_msg('lw_cloud_optics_init',lw_cloud_props%load(band_lims_cldy, & radliq_lwr, radliq_upr, radliq_fac, radice_lwr, radice_upr, radice_fac, & lut_extliq, lut_ssaliq, lut_asyliq, lut_extice, lut_ssaice, lut_asyice)) endif if (Model%rrtmgp_cld_optics .eq. 2) then + call check_error_msg('lw_cloud_optics_init',lw_cloud_props%set_ice_roughness(Model%rrtmgp_nrghice)) call check_error_msg('lw_cloud_optics_init',lw_cloud_props%load(band_lims_cldy, & pade_extliq, pade_ssaliq, pade_asyliq, pade_extice, pade_ssaice, & pade_asyice, pade_sizereg_extliq, pade_sizereg_ssaliq, pade_sizereg_asyliq,& @@ -315,9 +317,6 @@ end subroutine rrtmgp_lw_cloud_optics_init !! |-----------------------|-----------------------------------------------------|------------------------------------------------------------------------------|---------|------|-----------------------|-----------|--------|----------| !! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | !! | ncol | horizontal_loop_extent | horizontal dimension | count | 0 | integer | | in | F | -!! | p_lay | air_pressure_at_layer_for_RRTMGP_in_hPa | air pressure layer | hPa | 2 | real | kind_phys | in | F | -!! | t_lay | air_temperature_at_layer_for_RRTMGP | air temperature layer | K | 2 | real | kind_phys | in | F | -!! | p_lev | air_pressure_at_interface_for_RRTMGP_in_hPa | air pressure level | hPa | 2 | real | kind_phys | in | F | !! | cld_frac | total_cloud_fraction | layer total cloud fraction | frac | 2 | real | kind_phys | in | F | !! | cld_lwp | cloud_liquid_water_path | layer cloud liquid water path | g m-2 | 2 | real | kind_phys | in | F | !! | cld_reliq | mean_effective_radius_for_liquid_cloud | mean effective radius for liquid cloud | micron | 2 | real | kind_phys | in | F | @@ -341,7 +340,7 @@ end subroutine rrtmgp_lw_cloud_optics_init ! ######################################################################################### ! SUBROUTINE rrtmgp_lw_cloud_optics_run() ! ######################################################################################### - subroutine rrtmgp_lw_cloud_optics_run(Model, ncol, icseed_lw, p_lay, t_lay, p_lev, cld_frac, & + subroutine rrtmgp_lw_cloud_optics_run(Model, ncol, icseed_lw,cld_frac, & cld_lwp, cld_reliq, cld_iwp, cld_reice, cld_swp, cld_resnow, cld_rwp, cld_rerain, & aerosols, lw_cloud_props, lw_gas_props, ipsdlw0, & optical_props_clouds, optical_props_aerosol, cldtaulw, errmsg, errflg) @@ -357,11 +356,6 @@ subroutine rrtmgp_lw_cloud_optics_run(Model, ncol, icseed_lw, p_lay, t_lay, p_le ! variable isubclw=2, it provides permutation seed ! for each column profile that are used for generating ! random numbers. when isubclw /=2, it will not be used. - real(kind_phys), dimension(ncol,model%levs), intent(in) :: & - p_lay, & ! Pressure @ model layer-centers (hPa) - t_lay ! Temperature (K) - real(kind_phys), dimension(ncol,model%levs+1), intent(in) :: & - p_lev ! Pressure @ model layer-interfaces (hPa) real(kind_phys), dimension(ncol,model%levs),intent(in) :: & cld_frac, & ! Total cloud fraction by layer cld_lwp, & ! Cloud liquid water path @@ -376,7 +370,7 @@ subroutine rrtmgp_lw_cloud_optics_run(Model, ncol, icseed_lw, p_lay, t_lay, p_le lw_cloud_props ! type(ty_gas_optics_rrtmgp),intent(in) :: & lw_gas_props - real(kind_phys), intent(in),dimension(ncol, model%levs, lw_cloud_props%get_nband(),3) :: & + real(kind_phys), intent(in),dimension(ncol, model%levs, lw_gas_props%get_nband(),3) :: & aerosols ! real(kind_phys), dimension(ncol,Model%levs), intent(out) :: & cldtaulw ! approx 10.mu band layer cloud optical depth @@ -399,7 +393,7 @@ subroutine rrtmgp_lw_cloud_optics_run(Model, ncol, icseed_lw, p_lay, t_lay, p_le real(kind_phys), dimension(lw_gas_props%get_ngpt(),model%levs,ncol) :: rng3D real(kind_phys), dimension(lw_gas_props%get_ngpt()*model%levs) :: rng1D logical, dimension(ncol,model%levs,lw_gas_props%get_ngpt()) :: cldfracMCICA - real(kind_phys), dimension(ncol,model%levs,lw_cloud_props%get_nband()) :: & + real(kind_phys), dimension(ncol,model%levs,lw_gas_props%get_nband()) :: & tau_cld ! Initialize CCPP error handling variables @@ -432,10 +426,10 @@ subroutine rrtmgp_lw_cloud_optics_run(Model, ncol, icseed_lw, p_lay, t_lay, p_le ! ####################################################################################### ! Cloud optics [nCol,model%levs,nBands] call check_error_msg('rrtmgp_lw_cloud_optics_run',optical_props_cloudsByBand%alloc_1scl(& - ncol, model%levs, lw_cloud_props%get_band_lims_wavenumber())) + ncol, model%levs, lw_gas_props%get_band_lims_wavenumber())) ! Aerosol optics [nCol,model%levs,nBands] call check_error_msg('rrtmgp_lw_cloud_optics_run',optical_props_aerosol%alloc_1scl( & - ncol, model%levs, lw_cloud_props%get_band_lims_wavenumber())) + ncol, model%levs, lw_gas_props%get_band_lims_wavenumber())) ! Cloud optics [nCol,model%levs,nGpts] call check_error_msg('rrtmgp_lw_cloud_optics_run',optical_props_clouds%alloc_1scl( & ncol, model%levs, lw_gas_props)) @@ -466,7 +460,7 @@ subroutine rrtmgp_lw_cloud_optics_run(Model, ncol, icseed_lw, p_lay, t_lay, p_le else ! ii) RRTMG cloud-optics. if (any(cld_frac .gt. 0)) then - call rrtmg_lw_cloud_optics(ncol, model%levs, lw_cloud_props%get_nband(), cld_lwp, & + call rrtmg_lw_cloud_optics(ncol, model%levs, lw_gas_props%get_nband(), cld_lwp, & cld_reliq, cld_iwp, cld_reice, cld_rwp, cld_rerain, cld_swp, cld_resnow, & cld_frac, tau_cld) optical_props_cloudsByBand%tau = tau_cld diff --git a/physics/rrtmgp_lw_gas_optics.F90 b/physics/rrtmgp_lw_gas_optics.F90 index 2e28b59be..cc0e848c8 100644 --- a/physics/rrtmgp_lw_gas_optics.F90 +++ b/physics/rrtmgp_lw_gas_optics.F90 @@ -119,9 +119,8 @@ subroutine rrtmgp_lw_gas_optics_init(Model, Radtend, mpicomm, mpirank, mpiroot, ncontributors_upper ! ! Local variables - integer :: ncid_lw,dimID,varID,status,igpt,iGas,ij,ierr - integer,dimension(:),allocatable :: temp1,temp2,temp3,temp4,temp_log_array1,& - temp_log_array2, temp_log_array3, temp_log_array4 + integer :: ncid_lw,dimID,varID,status,iGas + integer,dimension(:),allocatable :: temp1,temp2,temp3,temp4 character(len=264) :: lw_gas_props_file integer,parameter :: max_strlen=256 @@ -398,7 +397,7 @@ subroutine rrtmgp_lw_gas_optics_init(Model, Radtend, mpicomm, mpirank, mpiroot, ! Initialize gas concentrations and gas optics class with data do iGas=1,Model%nGases - call check_error_msg('lw_gas_optics_init',gas_concentrations%set_vmr(Radtend%active_gases(iGas), 0._kind_phys)) + call check_error_msg('lw_gas_optics_init',gas_concentrations%set_vmr(Radtend%active_gases(iGas,1), 0._kind_phys)) enddo call check_error_msg('lw_gas_optics_init',lw_gas_props%load(gas_concentrations, gas_names, & key_species, band2gpt, band_lims, press_ref, press_ref_trop, temp_ref, temp_ref_p, & diff --git a/physics/rrtmgp_lw_post.xml b/physics/rrtmgp_lw_post.xml deleted file mode 100644 index 84d3b4108..000000000 --- a/physics/rrtmgp_lw_post.xml +++ /dev/null @@ -1,162 +0,0 @@ - - - - - - horizontal_loop_extent - horizontal dimension - count - ncol - integer - - in - F - MODULE_rrtmgp_lw_post SCHEME_rrtmgp_lw_post SUBROUTINE_rrtmgp_lw_post_run - - - adjusted_vertical_layer_dimension_for_radiation - number of vertical layers for radiation - count - nlay - integer - - in - F - MODULE_rrtmgp_lw_post SCHEME_rrtmgp_lw_post SUBROUTINE_rrtmgp_lw_post_run - - - air_pressure_at_interface_for_radiation_in_hPa - air pressure level - hPa - p_lev - real - (:,:) - in - F - MODULE_rrtmgp_lw_post SCHEME_rrtmgp_lw_post SUBROUTINE_rrtmgp_lw_post_run - - - lw_flux_profiles_byband_allsky - Fortran DDT containing RRTMGP 3D fluxes - DDT - fluxLW_allsky - ty_fluxes_byband - - in - F - MODULE_rrtmgp_lw_post SCHEME_rrtmgp_lw_post SUBROUTINE_rrtmgp_lw_post_run - - - lw_flux_profiles_byband_clrsky - Fortran DDT containing RRTMGP 3D fluxes - DDT - fluxLW_clrsky - ty_fluxes_byband - - in - F - MODULE_rrtmgp_lw_post SCHEME_rrtmgp_lw_post SUBROUTINE_rrtmgp_lw_post_run - - - K_distribution_file_for_RRTMGP_LW_POST_scheme - DDT containing spectral information for RRTMGP LW radiation scheme - DDT - kdist_lw - ty_gas_optics_rrtmgp_type - - in - F - MODULE_rrtmgp_lw_post SCHEME_rrtmgp_lw_post SUBROUTINE_rrtmgp_lw_post_run - - - K_distribution_file_for_RRTMGP_LW_POST_scheme - DDT containing spectral information for RRTMGP LW radiation scheme - DDT - kdist_lw - ty_gas_optics_rrtmgp_type - - in - F - MODULE_rrtmgp_lw_post SCHEME_rrtmgp_lw_post SUBROUTINE_rrtmgp_lw_post_run - - - - tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_step - longwave total sky heating rate - K s-1 - hlwc - real - (:,:) - out - F - MODULE_rrtmgp_lw_post SCHEME_rrtmgp_lw_post SUBROUTINE_rrtmgp_lw_post_run - - - lw_fluxes_top_atmosphere - longwave total sky fluxes at the top of the atm - W m-2 - topflx - topflw_type - (:) - inout - F - MODULE_rrtmgp_lw_post SCHEME_rrtmgp_lw_post SUBROUTINE_rrtmgp_lw_post_run - - - lw_fluxes_sfc - longwave total sky fluxes at the Earth surface - W m-2 - sfcflx - sfcflw_type - (:) - inout - F - MODULE_rrtmgp_lw_post SCHEME_rrtmgp_lw_post SUBROUTINE_rrtmgp_lw_post_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_rrtmgp_lw_post SCHEME_rrtmgp_lw_post SUBROUTINE_rrtmgp_lw_post_run - - - - tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_time_step - longwave clear sky heating rate - K s-1 - hlw0 - real - (:,:) - inout - T - MODULE_rrtmgp_lw_post SCHEME_rrtmgp_lw_post SUBROUTINE_rrtmgp_lw_post_run - - - lw_fluxes - lw fluxes total sky / csk and up / down at levels - W m-2 - flxprf - proflw_type - (:,:) - in - F - MODULE_rrtmgp_lw_post SCHEME_rrtmgp_lw_post SUBROUTINE_rrtmgp_lw_post_run - - - lw_heating_rate_spectral - longwave total sky heating rate (spectral) - K s-1 - hlwb - real - (:,:,:) - inout - T - MODULE_rrtmgp_lw_post SCHEME_rrtmgp_lw_post SUBROUTINE_rrtmgp_lw_post_run - - - diff --git a/physics/rrtmgp_lw_pre.xml b/physics/rrtmgp_lw_pre.xml deleted file mode 100644 index 4750cd469..000000000 --- a/physics/rrtmgp_lw_pre.xml +++ /dev/null @@ -1,128 +0,0 @@ - - - - - GFS_control_type_instance - Fortran DDT containing FV3-GFS model control parameters - DDT - Model - GFS_control_type - - in - F - MODULE_rrtmgp_lw_pre SCHEME_rrtmgp_lw_pre SUBROUTINE_rrtmgp_lw_pre_run - - - GFS_grid_type_instance - Fortran DDT containing FV3-GFS grid and interpolation related data - DDT - Grid - GFS_grid_type - - in - F - MODULE_rrtmgp_lw_pre SCHEME_rrtmgp_lw_pre SUBROUTINE_rrtmgp_lw_pre_run - - - GFS_sfcprop_type_instance - Fortran DDT containing FV3-GFS surface fields - DDT - Sfcprop - GFS_sfcprop_type - - in - F - MODULE_rrtmgp_lw_pre SCHEME_rrtmgp_lw_pre SUBROUTINE_rrtmgp_lw_pre_run - - - GFS_radtend_type_instance - Fortran DDT containing FV3-GFS radiation tendencies - DDT - Radtend - GFS_radtend_type - - inout - F - MODULE_rrtmgp_lw_pre SCHEME_rrtmgp_lw_pre SUBROUTINE_rrtmgp_lw_pre_run - - - horizontal_loop_extent - horizontal loop extent - count - im - integer - - in - F - MODULE_rrtmgp_lw_pre SCHEME_rrtmgp_lw_pre SUBROUTINE_rrtmgp_lw_pre_run - - - surface_ground_temperature_for_radiation - surface ground temperature for radiation - K - tsfg - real - (:) - in - F - MODULE_rrtmgp_lw_pre SCHEME_rrtmgp_lw_pre SUBROUTINE_rrtmgp_lw_pre_run - - - surface_air_temperature_for_radiation - lowest model layer air temperature for radiation - K - tsfa - real - (:) - in - F - MODULE_rrtmgp_lw_pre SCHEME_rrtmgp_lw_pre SUBROUTINE_rrtmgp_lw_pre_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_rrtmgp_lw_pre SCHEME_rrtmgp_lw_pre SUBROUTINE_rrtmgp_lw_pre_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_rrtmgp_lw_pre SCHEME_rrtmgp_lw_pre SUBROUTINE_rrtmgp_lw_pre_run - - - K_distribution_file_for_RRTMGP_LW_scheme - DDT containing spectral information for RRTMGP LW radiation scheme - DDT - physics%kdist_lw - ty_gas_optics_rrtmgp_type - - in - F - MODULE_rrtmgp_lw_pre SCHEME_rrtmgp_lw_pre SUBROUTINE_rrtmgp_lw_pre_run - - - surface_longwave_emissivity_in_each_band - surface lw emissivity in fraction in each LW band - DDT - physics%sfc_emiss_byband - real - (:,:) - out - F - MODULE_rrtmgp_lw_pre SCHEME_rrtmgp_lw_pre SUBROUTINE_rrtmgp_lw_pre_run - - - - - diff --git a/physics/rrtmgp_sw.F90 b/physics/rrtmgp_sw.F90 index 1f24190b7..7e62dc708 100644 --- a/physics/rrtmgp_sw.F90 +++ b/physics/rrtmgp_sw.F90 @@ -11,8 +11,6 @@ module rrtmgp_sw use mo_gas_concentrations, only: ty_gas_concs use mo_fluxes_byband, only: ty_fluxes_byband use module_radsw_parameters, only: cmpfsw_type - use rrtmgp_sw_cloud_optics, only: rrtmgp_sw_cloud_optics_init - use rrtmgp_sw_gas_optics, only: rrtmgp_sw_gas_optics_init use rrtmgp_aux, only: check_error_msg public rrtmgp_sw_init, rrtmgp_sw_run, rrtmgp_sw_finalize @@ -42,9 +40,6 @@ end subroutine rrtmgp_sw_init !! | optical_props_aerosol | shortwave_optical_properties_for_aerosols | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_2str | | in | F | !! | gas_concentrations | Gas_concentrations_for_RRTMGP_suite | DDT containing gas concentrations for RRTMGP radiation scheme | DDT | 0 | ty_gas_concs | | in | F | !! | lsswr | flag_to_calc_sw | flag to calculate SW irradiances | flag | 0 | logical | | in | F | -!! | sfcalb_nir_dir | surface_shortwave_albedo_near_infrared_direct_in_each_band | surface sw near-infrared direct albedo in each SW band | frac | 2 | real | kind_phys | in | F | -!! | sfcalb_nir_dif | surface_shortwave_albedo_near_infrared_diffuse_in_each_band | surface sw near-infrared diffuse albedo in each SW band | frac | 2 | real | kind_phys | in | F | -!! | cossza | cosine_of_zenith_angle | cosine of the solar zenit angle | none | 1 | real | kind_phys | in | F | !! | nday | daytime_points_dimension | daytime points dimension | count | 0 | integer | | in | F | !! | idxday | daytime_points | daytime points | index | 1 | integer | | in | F | !! | hsw0 | tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_time_step | shortwave clear sky heating rate | K s-1 | 2 | real | kind_phys | inout | T | @@ -59,7 +54,7 @@ end subroutine rrtmgp_sw_init !! subroutine rrtmgp_sw_run(Model, Radtend, ncol, sw_gas_props, p_lay, t_lay, p_lev, gas_concentrations, & optical_props_clds, optical_props_aerosol, & - lsswr, sfcalb_nir_dir, sfcalb_nir_dif, cossza, nday, idxday, hsw0, hswb, scmpsw, & + lsswr, nday, idxday, hsw0, hswb, scmpsw, & fluxUP_allsky, fluxDOWN_allsky, fluxUP_clrsky, fluxDOWN_clrsky, errmsg, errflg) ! Inputs @@ -77,11 +72,6 @@ subroutine rrtmgp_sw_run(Model, Radtend, ncol, sw_gas_props, p_lay, t_lay, p_lev p_lev ! Pressure @ model layer-interfaces (hPa) type(ty_gas_optics_rrtmgp),intent(in) :: & sw_gas_props ! DDT containing SW spectral information - real(kind_phys), dimension(sw_gas_props%get_nband(),ncol), intent(in) :: & - sfcalb_nir_dir, & ! Surface albedo direct (near-IR) (1) - sfcalb_nir_dif ! Surface albedo diffuse (near-IR) (1) - real(kind_phys), dimension(ncol), intent(in) :: & - cossza ! Cosine of solar zenith angle (1) type(ty_optical_props_2str),intent(in) :: & optical_props_clds, & ! RRTMGP DDT: longwave cloud radiative properties optical_props_aerosol ! RRTMGP DDT: longwave aerosol radiative properties @@ -166,8 +156,8 @@ subroutine rrtmgp_sw_run(Model, Radtend, ncol, sw_gas_props, p_lay, t_lay, p_lev ! Similarly, subset the gas concentrations. do iGas=1,Model%nGases - call check_error_msg('rrtmgp_sw_run',gas_concentrations%get_vmr(trim(Radtend%active_gases(iGas)),vmrTemp)) - call check_error_msg('rrtmgp_sw_run',gas_concentrations_daylit%set_vmr(trim(Radtend%active_gases(iGas)),vmrTemp(idxday,:))) + call check_error_msg('rrtmgp_sw_run',gas_concentrations%get_vmr(trim(Radtend%active_gases(iGas,1)),vmrTemp)) + call check_error_msg('rrtmgp_sw_run',gas_concentrations_daylit%set_vmr(trim(Radtend%active_gases(iGas,1)),vmrTemp(idxday,:))) enddo ! Initialize RRTMGP DDT containing 2D(3D) fluxes @@ -188,9 +178,9 @@ subroutine rrtmgp_sw_run(Model, Radtend, ncol, sw_gas_props, p_lay, t_lay, p_lev p_lay(idxday,1:Model%levs), & ! IN - pressure at layer interfaces (Pa) t_lay(idxday,1:Model%levs), & ! IN - temperature at layer interfaes (K) p_lev(idxday,1:Model%levs+1), & ! IN - pressure at layer centers (Pa) - cossza(idxday), & ! IN - Cosine of solar zenith angle - sfcalb_nir_dir(:,idxday), & ! IN - Shortwave surface albedo (direct) - sfcalb_nir_dif(:,idxday), & ! IN - Shortwave surface albedo (diffuse) + Radtend%coszen(idxday), & ! IN - Cosine of solar zenith angle + Radtend%sfc_alb_nir_dir(:,idxday), & ! IN - Shortwave surface albedo (direct) + Radtend%sfc_alb_nir_dif(:,idxday), & ! IN - Shortwave surface albedo (diffuse) optical_props_clds_daylit, & ! IN - DDT containing cloud optical information flux_allsky, & ! OUT - Fluxes, all-sky, 3D (nCol,Model%levs,nBand) flux_clrsky, & ! OUT - Fluxes, clear-sky, 3D (nCol,Model%levs,nBand) diff --git a/physics/rrtmgp_sw_cloud_optics.F90 b/physics/rrtmgp_sw_cloud_optics.F90 index 58d62d50d..61c0340d5 100644 --- a/physics/rrtmgp_sw_cloud_optics.F90 +++ b/physics/rrtmgp_sw_cloud_optics.F90 @@ -97,13 +97,15 @@ subroutine rrtmgp_sw_cloud_optics_init(Model,mpicomm, mpirank, mpiroot, sw_cloud npairsSWcldy_sw ! ! Local variables - integer :: status,ncid_sw_clds,dimid,varID,iGas + integer :: status,ncid_sw_clds,dimid,varID character(len=264) :: sw_cloud_props_file ! Initialize errmsg = '' errflg = 0 + if (Model%rrtmgp_cld_optics .eq. 0) return + ! Filenames are set in the gfs_physics_nml (scm/src/GFS_typedefs.F90) sw_cloud_props_file = trim(Model%rrtmgp_root)//trim(Model%sw_file_clouds) @@ -294,14 +296,15 @@ subroutine rrtmgp_sw_cloud_optics_init(Model,mpicomm, mpirank, mpiroot, sw_cloud #endif ! Load tables data for RRTMGP cloud-optics - call check_error_msg('sw_cloud_optics_init',sw_cloud_props%set_ice_roughness(Model%rrtmgp_nrghice)) if (Model%rrtmgp_cld_optics .eq. 1) then + call check_error_msg('sw_cloud_optics_init',sw_cloud_props%set_ice_roughness(Model%rrtmgp_nrghice)) call check_error_msg('sw_cloud_optics_init',sw_cloud_props%load(band_lims_cldy_sw, & radliq_lwr_sw, radliq_upr_sw, radliq_fac_sw, radice_lwr_sw, radice_upr_sw, & radice_fac_sw, lut_extliq_sw, lut_ssaliq_sw, lut_asyliq_sw, lut_extice_sw, & lut_ssaice_sw, lut_asyice_sw)) endif if (Model%rrtmgp_cld_optics .eq. 2) then + call check_error_msg('sw_cloud_optics_init',sw_cloud_props%set_ice_roughness(Model%rrtmgp_nrghice)) call check_error_msg('sw_cloud_optics_init', sw_cloud_props%load(band_lims_cldy_sw, & pade_extliq_sw, pade_ssaliq_sw, pade_asyliq_sw, pade_extice_sw, pade_ssaice_sw, & pade_asyice_sw, pade_sizereg_extliq_sw, pade_sizereg_ssaliq_sw, & @@ -315,9 +318,6 @@ end subroutine rrtmgp_sw_cloud_optics_init !! |-----------------------|------------------------------------------------------|------------------------------------------------------------------------------|---------|------|-----------------------|-----------|--------|----------| !! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | !! | ncol | horizontal_loop_extent | horizontal dimension | count | 0 | integer | | in | F | -!! | p_lay | air_pressure_at_layer_for_RRTMGP_in_hPa | air pressure layer | hPa | 2 | real | kind_phys | in | F | -!! | t_lay | air_temperature_at_layer_for_RRTMGP | air temperature layer | K | 2 | real | kind_phys | in | F | -!! | p_lev | air_pressure_at_interface_for_RRTMGP_in_hPa | air pressure level | hPa | 2 | real | kind_phys | in | F | !! | cld_frac | total_cloud_fraction | layer total cloud fraction | frac | 2 | real | kind_phys | in | F | !! | cld_lwp | cloud_liquid_water_path | layer cloud liquid water path | g m-2 | 2 | real | kind_phys | in | F | !! | cld_reliq | mean_effective_radius_for_liquid_cloud | mean effective radius for liquid cloud | micron | 2 | real | kind_phys | in | F | @@ -343,7 +343,7 @@ end subroutine rrtmgp_sw_cloud_optics_init ! ######################################################################################### ! SUBROTUINE rrtmgp_sw_cloud_optics_run() ! ######################################################################################### - subroutine rrtmgp_sw_cloud_optics_run(Model, ncol, icseed_sw, p_lay, t_lay, p_lev, cld_frac, & ! IN + subroutine rrtmgp_sw_cloud_optics_run(Model, ncol, icseed_sw, cld_frac, & ! IN cld_lwp, cld_reliq, cld_iwp, cld_reice, cld_swp, cld_resnow, cld_rwp, cld_rerain, & ! IN aerosols, sw_cloud_props, sw_gas_props, ipsdsw0, nday, idxday, & ! IN optical_props_clouds, optical_props_aerosol, cldtausw, errmsg, errflg) ! OUT @@ -362,11 +362,6 @@ subroutine rrtmgp_sw_cloud_optics_run(Model, ncol, icseed_sw, p_lay, t_lay, p_le ! variable isubcsw=2, it provides permutation seed ! for each column profile that are used for generating ! random numbers. when isubcsw /=2, it will not be used. - real(kind_phys), dimension(ncol,model%levs), intent(in) :: & - p_lay, & ! Pressure @ model layer-centers (hPa) - t_lay ! Temperature (K) - real(kind_phys), dimension(ncol,model%levs+1), intent(in) :: & - p_lev ! Pressure @ model layer-interfaces (hPa) real(kind_phys), dimension(ncol,model%levs),intent(in) :: & cld_frac, & ! Total cloud fraction by layer cld_lwp, & ! Cloud liquid water path @@ -381,7 +376,7 @@ subroutine rrtmgp_sw_cloud_optics_run(Model, ncol, icseed_sw, p_lay, t_lay, p_le sw_cloud_props ! type(ty_gas_optics_rrtmgp),intent(in) :: & sw_gas_props - real(kind_phys), intent(in),dimension(ncol, model%levs, sw_cloud_props%get_nband(),3) :: & + real(kind_phys), intent(in),dimension(ncol, model%levs, sw_gas_props%get_nband(),3) :: & aerosols ! ! Outputs @@ -402,7 +397,7 @@ subroutine rrtmgp_sw_cloud_optics_run(Model, ncol, icseed_sw, p_lay, t_lay, p_le real(kind_phys), dimension(sw_gas_props%get_ngpt(),model%levs,ncol) :: rng3D real(kind_phys), dimension(sw_gas_props%get_ngpt()*model%levs) :: rng1D logical, dimension(ncol,model%levs,sw_gas_props%get_ngpt()) :: cldfracMCICA - real(kind_phys), dimension(nday,model%levs,sw_cloud_props%get_nband()) :: & + real(kind_phys), dimension(nday,model%levs,sw_gas_props%get_nband()) :: & tau_cld, ssa_cld, asy_cld ! Initialize CCPP error handling variables @@ -435,10 +430,10 @@ subroutine rrtmgp_sw_cloud_optics_run(Model, ncol, icseed_sw, p_lay, t_lay, p_le ! ####################################################################################### ! Cloud optics [ncol,model%levs,nBands] call check_error_msg('rrtmgp_sw_cloud_optics_run',optical_props_cloudsByBand%alloc_2str(& - ncol, model%levs, sw_cloud_props%get_band_lims_wavenumber())) + ncol, model%levs, sw_gas_props%get_band_lims_wavenumber())) ! Aerosol optics [ncol,model%levs,nBands] call check_error_msg('rrtmgp_sw_cloud_optics_run',optical_props_aerosol%alloc_2str( & - ncol, model%levs, sw_cloud_props%get_band_lims_wavenumber())) + ncol, model%levs, sw_gas_props%get_band_lims_wavenumber())) ! Cloud optics [ncol,model%levs,nGpt] call check_error_msg('rrtmgp_sw_cloud_optics_run',optical_props_clouds%alloc_2str( & ncol, model%levs, sw_gas_props)) @@ -474,7 +469,7 @@ subroutine rrtmgp_sw_cloud_optics_run(Model, ncol, icseed_sw, p_lay, t_lay, p_le optical_props_cloudsByBand%tau(:,:,:) = 0._kind_phys optical_props_cloudsByBand%ssa(:,:,:) = 0._kind_phys optical_props_cloudsByBand%g(:,:,:) = 0._kind_phys - call rrtmg_sw_cloud_optics(nday, model%levs, sw_cloud_props%get_nband(), cld_lwp(idxday,:), & + call rrtmg_sw_cloud_optics(nday, model%levs, sw_gas_props%get_nband(), cld_lwp(idxday,:), & cld_reliq(idxday,:), cld_iwp(idxday,:), cld_reice(idxday,:), cld_rwp(idxday,:), & cld_rerain(idxday,:), cld_swp(idxday,:), cld_resnow(idxday,:), cld_frac(idxday,:),& tau_cld, ssa_cld, asy_cld) diff --git a/physics/rrtmgp_sw_gas_optics.F90 b/physics/rrtmgp_sw_gas_optics.F90 index 6c33684c6..f0dc2e2d9 100644 --- a/physics/rrtmgp_sw_gas_optics.F90 +++ b/physics/rrtmgp_sw_gas_optics.F90 @@ -114,9 +114,8 @@ subroutine rrtmgp_sw_gas_optics_init(Model, Radtend, mpicomm, mpirank, mpiroot, ncontributors_upper_sw ! ! Local variables - integer :: status,ncid_sw,ncid_sw_clds,dimid,varID,ij,iGas - integer,dimension(:),allocatable :: temp1,temp2,temp3,temp4,temp_log_array1,& - temp_log_array2, temp_log_array3, temp_log_array4 + integer :: status,ncid_sw,dimid,varID,iGas + integer,dimension(:),allocatable :: temp1,temp2,temp3,temp4 character(len=264) :: sw_gas_props_file ! Initialize @@ -394,7 +393,7 @@ subroutine rrtmgp_sw_gas_optics_init(Model, Radtend, mpicomm, mpirank, mpiroot, ! Initialize gas concentrations and gas optics class with data do iGas=1,Model%nGases - call check_error_msg('sw_gas_optics_init',gas_concentrations%set_vmr(Radtend%active_gases(iGas), 0._kind_phys)) + call check_error_msg('sw_gas_optics_init',gas_concentrations%set_vmr(Radtend%active_gases(iGas,1), 0._kind_phys)) enddo call check_error_msg('sw_gas_optics_init',sw_gas_props%load(gas_concentrations, gas_names_sw, & key_species_sw, band2gpt_sw, band_lims_sw, press_ref_sw, press_ref_trop_sw, temp_ref_sw, & diff --git a/physics/samfdeepcnv.xml b/physics/samfdeepcnv.xml deleted file mode 100644 index 5a59a552f..000000000 --- a/physics/samfdeepcnv.xml +++ /dev/null @@ -1,700 +0,0 @@ - - - - - horizontal_loop_extent - horizontal loop extent - count - im - integer - - in - F - MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run - - - horizontal_dimension - horizontal dimension - count - ix - integer - - in - F - MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run - - - vertical_dimension - vertical layer dimension - count - km - integer - - in - F - MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run - - - specific_heat_of_liquid_water_at_constant_pressure - specific heat of liquid water at constant pressure - J kg-1 K-1 - cliq - real - - in - F - MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run - - - specific_heat_of_dry_air_at_constant_pressure - specific heat of dry air at constant pressure - J kg-1 K-1 - cp - real - - in - F - MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run - - - specific_heat_of_water_vapor_at_constant_pressure - specific heat of water vapor at constant pressure - J kg-1 K-1 - cvap - real - - in - F - MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run - - - ratio_of_dry_air_to_water_vapor_gas_constants - rd/rv - none - eps - real - - in - F - MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run - - - ratio_of_dry_air_to_water_vapor_gas_constants_minus_one - (rd/rv) - 1 - none - epsm1 - real - - in - F - MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run - - - ratio_of_vapor_to_dry_air_gas_constants_minus_one - (rv/rd) - 1 (rv = ideal gas constant for water vapor) - none - fv - real - - in - F - MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run - - - gravitational_acceleration - gravitational acceleration - m s-2 - grav - real - - in - F - MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run - - - latent_heat_of_vaporization_of_water_at_0C - latent heat of evaporation/sublimation - J kg-1 - hvap - real - - in - F - MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run - - - gas_constant_dry_air - ideal gas constant for dry air - J kg-1 K-1 - rd - real - - in - F - MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run - - - gas_constant_water_vapor - ideal gas constant for water vapor - J kg-1 K-1 - rv - real - - in - F - MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run - - - temperature_at_zero_celsius - temperature at 0 degrees Celsius - K - t0c - real - - in - F - MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run - - - time_step_for_physics - physics time step - s - delt - real - - in - F - MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run - - - index_for_turbulent_kinetic_energy_convective_transport_tracer - index for turbulent kinetic energy in the convectively transported tracer array - index - ntk - integer - - in - F - MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run - - - number_of_tracers_for_samf - number of tracers for scale-aware mass flux schemes - count - ntr - integer - - in - F - MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run - - - air_pressure_difference_between_midlayers - pres(k) - pres(k+1) - Pa - delp - real - (:,:) - in - F - MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run - - - air_pressure - mean layer pressure - Pa - prslp - real - (:,:) - in - F - MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run - - - surface_air_pressure - surface pressure - Pa - psp - real - (:) - in - F - MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run - - - geopotential - layer geopotential - m2 s-2 - phil - real - (:,:) - in - F - MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run - - - convective_transportable_tracers - array to contain cloud water and other convective trans. tracers - kg kg-1 - qtr - real - (:,:,:) - inout - F - MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run - - - water_vapor_specific_humidity_updated_by_physics - updated vapor specific humidity - kg kg-1 - q1 - real - (:,:) - inout - F - MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run - - - air_temperature_updated_by_physics - updated temperature - K - t1 - real - (:,:) - inout - F - MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run - - - x_wind_updated_by_physics - updated x-direction wind - m s-1 - u1 - real - (:,:) - inout - F - MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run - - - y_wind_updated_by_physics - updated y-direction wind - m s-1 - v1 - real - (:,:) - inout - F - MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run - - - cloud_work_function - cloud work function - m2 s-2 - cldwrk - real - (:) - out - F - MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run - - - lwe_thickness_of_deep_convective_precipitation_amount - deep convective rainfall amount on physics timestep - m - rn - real - (:) - out - F - MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run - - - vertical_index_at_cloud_base - index for cloud base - index - kbot - integer - (:) - out - F - MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run - - - vertical_index_at_cloud_top - index for cloud top - index - ktop - integer - (:) - out - F - MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run - - - flag_deep_convection - deep convection: 0=no, 1=yes - flag - kcnv - integer - (:) - inout - F - MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run - - - sea_land_ice_mask - landmask: sea/land/ice=0/1/2 - flag - islimsk - integer - (:) - in - F - MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run - - - cell_area - grid cell area - m2 - garea - real - (:) - in - F - MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run - - - omega - layer mean vertical velocity - Pa s-1 - dot - real - (:,:) - in - F - MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run - - - number_of_hydrometeors - number of hydrometeors - count - ncloud - integer - - in - F - MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run - - - instantaneous_atmosphere_updraft_convective_mass_flux - (updraft mass flux) * delt - kg m-2 - ud_mf - real - (:,:) - out - F - MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run - - - instantaneous_atmosphere_downdraft_convective_mass_flux - (downdraft mass flux) * delt - kg m-2 - dd_mf - real - (:,:) - out - F - MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run - - - instantaneous_atmosphere_detrainment_convective_mass_flux - (detrainment mass flux) * delt - kg m-2 - dt_mf - real - (:,:) - out - F - MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run - - - convective_cloud_water_mixing_ratio - moist convective cloud water mixing ratio - kg kg-1 - cnvw - real - (:,:) - inout - F - MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run - - - convective_cloud_cover - convective cloud cover - frac - cnvc - real - (:,:) - inout - F - MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run - - - mass_fraction_of_convective_cloud_liquid_water - mass fraction of convective cloud liquid water - kg kg-1 - qlcn - real - (:,:) - inout - F - MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run - - - mass_fraction_of_convective_cloud_ice - mass fraction of convective cloud ice water - kg kg-1 - qicn - real - (:,:) - inout - F - MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run - - - vertical_velocity_for_updraft - vertical velocity for updraft - m s-1 - w_upi - real - (:,:) - inout - F - MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run - - - convective_cloud_fraction_for_microphysics - convective cloud fraction for microphysics - frac - cf_upi - real - (:,:) - inout - F - MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run - - - detrained_mass_flux - detrained mass flux - kg m-2 s-1 - cnv_mfd - real - (:,:) - inout - F - MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run - - - tendency_of_cloud_water_due_to_convective_microphysics - tendency of cloud water due to convective microphysics - kg m-2 s-1 - cnv_dqldt - real - (:,:) - inout - F - MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run - - - convective_cloud_volume_fraction - convective cloud volume fraction - frac - clcn - real - (:,:) - inout - F - MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run - - - ice_fraction_in_convective_tower - ice fraction in convective tower - frac - cnv_fice - real - (:,:) - inout - F - MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run - - - number_concentration_of_cloud_liquid_water_particles_for_detrainment - droplet number concentration in convective detrainment - m-3 - cnv_ndrop - real - (:,:) - inout - F - MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run - - - number_concentration_of_ice_crystals_for_detrainment - crystal number concentration in convective detrainment - m-3 - cnv_nice - real - (:,:) - inout - F - MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run - - - flag_for_microphysics_scheme - choice of microphysics scheme - flag - mp_phys - integer - - in - F - MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run - - - flag_for_morrison_gettelman_microphysics_scheme - choice of Morrison-Gettelman rmicrophysics scheme - flag - mp_phys_mg - integer - - in - F - MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run - - - entrainment_rate_coefficient_deep_convection - entrainment rate coefficient for deep conv. - none - clam - real - - in - F - MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run - - - rain_conversion_parameter_deep_convection - convective rain conversion parameter for deep conv. - m-1 - c0s - real - - in - F - MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run - - - detrainment_conversion_parameter_deep_convection - convective detrainment conversion parameter for deep conv. - m-1 - c1 - real - - in - F - MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run - - - downdraft_fraction_reaching_surface_over_land_deep_convection - downdraft fraction reaching surface over land for deep conv. - frac - betal - real - - in - F - MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run - - - downdraft_fraction_reaching_surface_over_ocean_deep_convection - downdraft fraction reaching surface over ocean for deep conv. - frac - betas - real - - in - F - MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run - - - rain_evaporation_coefficient_deep_convection - convective rain evaporation coefficient for deep conv. - frac - evfact - real - - in - F - MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run - - - rain_evaporation_coefficient_over_land_deep_convection - convective rain evaporation coefficient over land for deep conv. - frac - evfactl - real - - in - F - MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run - - - momentum_transport_reduction_factor_pgf_deep_convection - reduction factor in momentum transport due to deep conv. induced pressure gradient force - frac - pgcon - real - - in - F - MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run - - - aerosol_aware_parameter_deep_convection - aerosol-aware parameter inversely proportional to CCN number concentraion from Lim (2011) for deep conv. - none - asolfac - real - - in - F - MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_samfdeepcnv SCHEME_samfdeepcnv SUBROUTINE_samfdeepcnv_run - - - - - diff --git a/physics/samfshalcnv.xml b/physics/samfshalcnv.xml deleted file mode 100644 index c9e4b67a2..000000000 --- a/physics/samfshalcnv.xml +++ /dev/null @@ -1,513 +0,0 @@ - - - - - horizontal_loop_extent - horizontal loop extent - count - im - integer - - in - F - MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run - - - horizontal_dimension - horizontal dimension - count - ix - integer - - in - F - MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run - - - vertical_dimension - vertical layer dimension - count - km - integer - - in - F - MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run - - - specific_heat_of_liquid_water_at_constant_pressure - specific heat of liquid water at constant pressure - J kg-1 K-1 - cliq - real - - in - F - MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run - - - specific_heat_of_dry_air_at_constant_pressure - specific heat of dry air at constant pressure - J kg-1 K-1 - cp - real - - in - F - MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run - - - specific_heat_of_water_vapor_at_constant_pressure - specific heat of water vapor at constant pressure - J kg-1 K-1 - cvap - real - - in - F - MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run - - - ratio_of_dry_air_to_water_vapor_gas_constants - rd/rv - none - eps - real - - in - F - MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run - - - ratio_of_dry_air_to_water_vapor_gas_constants_minus_one - (rd/rv) - 1 - none - epsm1 - real - - in - F - MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run - - - ratio_of_vapor_to_dry_air_gas_constants_minus_one - (rv/rd) - 1 (rv = ideal gas constant for water vapor) - none - fv - real - - in - F - MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run - - - gravitational_acceleration - gravitational acceleration - m s-2 - grav - real - - in - F - MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run - - - latent_heat_of_vaporization_of_water_at_0C - latent heat of evaporation/sublimation - J kg-1 - hvap - real - - in - F - MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run - - - gas_constant_dry_air - ideal gas constant for dry air - J kg-1 K-1 - rd - real - - in - F - MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run - - - gas_constant_water_vapor - ideal gas constant for water vapor - J kg-1 K-1 - rv - real - - in - F - MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run - - - temperature_at_zero_celsius - temperature at 0 degrees Celsius - K - t0c - real - - in - F - MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run - - - time_step_for_physics - physics time step - s - delt - real - - in - F - MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run - - - index_for_turbulent_kinetic_energy_convective_transport_tracer - index for turbulent kinetic energy in the convectively transported tracer array - index - ntk - integer - - in - F - MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run - - - number_of_tracers_for_samf - number of tracers for scale-aware mass flux schemes - count - ntr - integer - - in - F - MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run - - - air_pressure_difference_between_midlayers - pres(k) - pres(k+1) - Pa - delp - real - (:,:) - in - F - MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run - - - air_pressure - mean layer pressure - Pa - prslp - real - (:,:) - in - F - MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run - - - surface_air_pressure - surface pressure - Pa - psp - real - (:) - in - F - MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run - - - geopotential - layer geopotential - m2 s-2 - phil - real - (:,:) - in - F - MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run - - - convective_transportable_tracers - array to contain cloud water and other convective trans. tracers - kg kg-1 - qtr - real - (:,:,:) - inout - F - MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run - - - water_vapor_specific_humidity_updated_by_physics - updated vapor specific humidity - kg kg-1 - q1 - real - (:,:) - inout - F - MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run - - - air_temperature_updated_by_physics - updated temperature - K - t1 - real - (:,:) - inout - F - MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run - - - x_wind_updated_by_physics - updated x-direction wind - m s-1 - u1 - real - (:,:) - inout - F - MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run - - - y_wind_updated_by_physics - updated y-direction wind - m s-1 - v1 - real - (:,:) - inout - F - MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run - - - lwe_thickness_of_shallow_convective_precipitation_amount - shallow convective rainfall amount on physics timestep - m - rn - real - (:) - out - F - MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run - - - vertical_index_at_cloud_base - index at cloud base - index - kbot - integer - (:) - out - F - MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run - - - vertical_index_at_cloud_top - index at cloud top - index - ktop - integer - (:) - out - F - MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run - - - flag_deep_convection - deep convection: 0=no, 1=yes - flag - kcnv - integer - (:) - inout - F - MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run - - - sea_land_ice_mask - landmask: sea/land/ice=0/1/2 - flag - islimsk - integer - (:) - in - F - MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run - - - cell_area - grid cell area - m2 - garea - real - (:) - in - F - MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run - - - omega - layer mean vertical velocity - Pa s-1 - dot - real - (:,:) - in - F - MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run - - - number_of_hydrometeors - number of hydrometeors - count - ncloud - integer - - in - F - MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run - - - atmosphere_boundary_layer_thickness - PBL top height - m - hpbl - real - (:) - in - F - MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run - - - instantaneous_atmosphere_updraft_convective_mass_flux - (updraft mass flux) * delt - kg m-2 - ud_mf - real - (:,:) - out - F - MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run - - - instantaneous_atmosphere_detrainment_convective_mass_flux - (detrainment mass flux) * delt - kg m-2 - dt_mf - real - (:,:) - out - F - MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run - - - convective_cloud_water_mixing_ratio - moist convective cloud water mixing ratio - kg kg-1 - cnvw - real - (:,:) - out - F - MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run - - - convective_cloud_cover - convective cloud cover - frac - cnvc - real - (:,:) - out - F - MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run - - - entrainment_rate_coefficient_shallow_convection - entrainment rate coefficient for shal conv. - none - clam - real - - in - F - MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run - - - rain_conversion_parameter_shallow_convection - convective rain conversion parameter for shal conv. - m-1 - c0s - real - - in - F - MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run - - - detrainment_conversion_parameter_shallow_convection - convective detrainment conversion parameter for shal conv. - m-1 - c1 - real - - in - F - MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run - - - momentum_transport_reduction_factor_pgf_shallow_convection - reduction factor in momentum transport due to shal conv. induced pressure gradient force - frac - pgcon - real - - in - F - MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run - - - aerosol_aware_parameter_shallow_convection - aerosol-aware parameter inversely proportional to CCN number concentraion from Lim (2011) for shal conv. - none - asolfac - real - - in - F - MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_samfshalcnv SCHEME_samfshalcnv SUBROUTINE_samfshalcnv_run - - - - - diff --git a/physics/samfshalcnv_post.xml b/physics/samfshalcnv_post.xml deleted file mode 100644 index 0d196bc95..000000000 --- a/physics/samfshalcnv_post.xml +++ /dev/null @@ -1,205 +0,0 @@ - - - - - horizontal_loop_extent - horizontal loop extent - count - im - integer - - in - F - MODULE_samfshalcnv_post SCHEME_samfshalcnv_post SUBROUTINE_samfshalcnv_post_run - - - vertical_dimension - vertical layer dimension - count - levs - integer - - in - F - MODULE_samfshalcnv_post SCHEME_samfshalcnv_post SUBROUTINE_samfshalcnv_post_run - - - flag_diagnostics - logical flag for storing diagnostics - flag - lssav - logical - - in - F - MODULE_samfshalcnv_post SCHEME_samfshalcnv_post SUBROUTINE_samfshalcnv_post_run - - - flag_shallow_convective_cloud - flag for shallow convective cloud - - shcnvcw - logical - - in - F - MODULE_samfshalcnv_post SCHEME_samfshalcnv_post SUBROUTINE_samfshalcnv_post_run - - - dynamics_to_physics_timestep_ratio - ratio of dynamics timestep to physics timestep - none - frain - real - - in - F - MODULE_samfshalcnv_post SCHEME_samfshalcnv_post SUBROUTINE_samfshalcnv_post_run - - - lwe_thickness_of_shallow_convective_precipitation_amount - shallow convective rainfall amount on physics timestep - m - rain1 - real - (:) - in - F - MODULE_samfshalcnv_post SCHEME_samfshalcnv_post SUBROUTINE_samfshalcnv_post_run - - - number_of_3d_arrays_associated_with_pdf-based_clouds - number of 3d arrays associated with pdf based clouds/mp - count - npdf3d - integer - - in - F - MODULE_samfshalcnv_post SCHEME_samfshalcnv_post SUBROUTINE_samfshalcnv_post_run - - - array_dimension_of_3d_arrays_for_microphysics - number of 3D arrays needed for microphysics - count - num_p3d - integer - - in - F - MODULE_samfshalcnv_post SCHEME_samfshalcnv_post SUBROUTINE_samfshalcnv_post_run - - - number_of_convective_3d_cloud_fields - number of convective 3d clouds fields - count - ncnvcld3d - integer - - in - F - MODULE_samfshalcnv_post SCHEME_samfshalcnv_post SUBROUTINE_samfshalcnv_post_run - - - convective_cloud_cover - convective cloud cover - frac - cnvc - real - (:,:) - in - F - MODULE_samfshalcnv_post SCHEME_samfshalcnv_post SUBROUTINE_samfshalcnv_post_run - - - convective_cloud_water_mixing_ratio - moist convective cloud water mixing ratio - kg kg-1 - cnvw - real - (:,:) - in - F - MODULE_samfshalcnv_post SCHEME_samfshalcnv_post SUBROUTINE_samfshalcnv_post_run - - - lwe_thickness_of_convective_precipitation_amount_on_dynamics_timestep - convective rain at this time step - m - rainc - real - (:) - inout - F - MODULE_samfshalcnv_post SCHEME_samfshalcnv_post SUBROUTINE_samfshalcnv_post_run - - - cumulative_lwe_thickness_of_convective_precipitation_amount - cumulative convective precipitation - m - cnvprcp - real - (:) - inout - F - MODULE_samfshalcnv_post SCHEME_samfshalcnv_post SUBROUTINE_samfshalcnv_post_run - - - cumulative_lwe_thickness_of_convective_precipitation_amount_in_bucket - cumulative convective precipitation in bucket - m - cnvprcpb - real - (:) - inout - F - MODULE_samfshalcnv_post SCHEME_samfshalcnv_post SUBROUTINE_samfshalcnv_post_run - - - convective_cloud_water_mixing_ratio_in_phy_f3d - convective cloud water mixing ratio in the phy_f3d array - kg kg-1 - cnvw_phy_f3d - real - (:,:) - inout - F - MODULE_samfshalcnv_post SCHEME_samfshalcnv_post SUBROUTINE_samfshalcnv_post_run - - - convective_cloud_cover_in_phy_f3d - convective cloud cover in the phy_f3d array - frac - cnvc_phy_f3d - real - (:,:) - inout - F - MODULE_samfshalcnv_post SCHEME_samfshalcnv_post SUBROUTINE_samfshalcnv_post_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_samfshalcnv_post SCHEME_samfshalcnv_post SUBROUTINE_samfshalcnv_post_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_samfshalcnv_post SCHEME_samfshalcnv_post SUBROUTINE_samfshalcnv_post_run - - - - - diff --git a/physics/satmedmfvdif.xml b/physics/satmedmfvdif.xml deleted file mode 100644 index 3b5ec573d..000000000 --- a/physics/satmedmfvdif.xml +++ /dev/null @@ -1,667 +0,0 @@ - - - - - - - horizontal_dimension - horizontal dimension - count - ix - integer - - in - F - MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run - - - horizontal_loop_extent - horizontal loop extent - count - im - integer - - in - F - MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run - - - vertical_dimension - vertical layer dimension - count - km - integer - - in - F - MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run - - - number_of_vertical_diffusion_tracers - number of tracers to diffuse vertically - count - ntrac - integer - - in - F - MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run - - - index_for_liquid_cloud_condensate - tracer index for cloud condensate (or liquid water) - index - ntcw - integer - - in - F - MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run - - - index_for_ice_cloud_condensate_vertical_diffusion_tracer - tracer index for ice water in the vertically diffused tracer array - index - ntiw - integer - - in - F - MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run - - - index_for_turbulent_kinetic_energy_vertical_diffusion_tracer - index for turbulent kinetic energy in the vertically diffused tracer array - index - ntke - integer - - in - F - MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run - - - gravitational_acceleration - gravitational acceleration - m s-2 - grav - real - - in - F - MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run - - - gas_constant_dry_air - ideal gas constant for dry air - J kg-1 K-1 - rd - real - - in - F - MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run - - - specific_heat_of_dry_air_at_constant_pressure - specific heat of dry air at constant pressure - J kg-1 K-1 - cp - real - - in - F - MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run - - - gas_constant_water_vapor - ideal gas constant for water vapor - J kg-1 K-1 - rv - real - - in - F - MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run - - - latent_heat_of_vaporization_of_water_at_0C - latent heat of evaporation/sublimation - J kg-1 - hvap - real - - in - F - MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run - - - latent_heat_of_fusion_of_water_at_0C - latent heat of fusion - J kg-1 - hfus - real - - in - F - MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run - - - ratio_of_vapor_to_dry_air_gas_constants_minus_one - (rv/rd) - 1 (rv = ideal gas constant for water vapor) - none - fv - real - - in - F - MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run - - - ratio_of_dry_air_to_water_vapor_gas_constants - rd/rv - none - eps - real - - in - F - MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run - - - ratio_of_dry_air_to_water_vapor_gas_constants_minus_one - (rd/rv) - 1 - none - epsm1 - real - - in - F - MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run - - - tendency_of_y_wind_due_to_model_physics - updated tendency of the y wind - m s-2 - dv - real - (:,:) - inout - F - MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run - - - tendency_of_x_wind_due_to_model_physics - updated tendency of the x wind - m s-2 - du - real - (:,:) - inout - F - MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run - - - tendency_of_air_temperature_due_to_model_physics - updated tendency of the temperature - K s-1 - tdt - real - (:,:) - inout - F - MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run - - - tendency_of_vertically_diffused_tracer_concentration - updated tendency of the tracers due to vertical diffusion in PBL scheme - kg kg-1 s-1 - rtg - real - (:,:,:) - inout - F - MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run - - - x_wind - x component of layer wind - m s-1 - u1 - real - (:,:) - in - F - MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run - - - y_wind - y component of layer wind - m s-1 - v1 - real - (:,:) - in - F - MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run - - - air_temperature - layer mean air temperature - K - t1 - real - (:,:) - in - F - MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run - - - vertically_diffused_tracer_concentration - tracer concentration diffused by PBL scheme - kg kg-1 - q1 - real - (:,:,:) - in - F - MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run - - - tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step - total sky shortwave heating rate - K s-1 - swh - real - (:,:) - in - F - MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run - - - tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_step - total sky longwave heating rate - K s-1 - hlw - real - (:,:) - in - F - MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run - - - zenith_angle_temporal_adjustment_factor_for_shortwave_fluxes - zenith angle temporal adjustment factor for shortwave - none - xmu - real - (:) - in - F - MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run - - - cell_area - area of the grid cell - m2 - garea - real - (:) - in - F - MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run - - - dimensionless_exner_function_at_lowest_model_interface - dimensionless Exner function at the surface interface - none - psk - real - (:) - in - F - MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run - - - bulk_richardson_number_at_lowest_model_level - bulk Richardson number at the surface - none - rbsoil - real - (:) - in - F - MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run - - - surface_roughness_length - surface roughness length in cm - cm - zorl - real - (:) - in - F - MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run - - - x_wind_at_10m - x component of wind at 10 m - m s-1 - u10m - real - (:) - in - F - MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run - - - y_wind_at_10m - y component of wind at 10 m - m s-1 - v10m - real - (:) - in - F - MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run - - - Monin-Obukhov_similarity_function_for_momentum - Monin-Obukhov similarity function for momentum - none - fm - real - (:) - in - F - MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run - - - Monin-Obukhov_similarity_function_for_heat - Monin-Obukhov similarity function for heat - none - fh - real - (:) - in - F - MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run - - - surface_skin_temperature - surface skin temperature - K - tsea - real - (:) - in - F - MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run - - - kinematic_surface_upward_sensible_heat_flux - kinematic surface upward sensible heat flux - K m s-1 - heat - real - (:) - in - F - MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run - - - kinematic_surface_upward_latent_heat_flux - kinematic surface upward latent heat flux - kg kg-1 m s-1 - evap - real - (:) - in - F - MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run - - - surface_wind_stress - surface wind stress - m2 s-2 - stress - real - (:) - in - F - MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run - - - wind_speed_at_lowest_model_layer - wind speed at lowest model level - m s-1 - spd1 - real - (:) - in - F - MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run - - - vertical_index_at_top_of_atmosphere_boundary_layer - PBL top model level index - index - kpbl - integer - (:) - out - F - MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run - - - air_pressure_at_interface - air pressure at model layer interfaces - Pa - prsi - real - (:,:) - in - F - MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run - - - air_pressure_difference_between_midlayers - pres(k) - pres(k+1) - Pa - del - real - (:,:) - in - F - MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run - - - air_pressure - mean layer pressure - Pa - prsl - real - (:,:) - in - F - MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run - - - dimensionless_exner_function_at_model_layers - Exner function at layers - none - prslk - real - (:,:) - in - F - MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run - - - geopotential_at_interface - geopotential at model layer interfaces - m2 s-2 - phii - real - (:,:) - in - F - MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run - - - geopotential - geopotential at model layer centers - m2 s-2 - phil - real - (:,:) - in - F - MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run - - - time_step_for_physics - time step for physics - s - delt - real - - in - F - MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run - - - flag_TKE_dissipation_heating - flag for using TKE dissipation heating - flag - dspheat - logical - - in - F - MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run - - - instantaneous_surface_x_momentum_flux - x momentum flux - Pa - dusfc - real - (:) - out - F - MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run - - - instantaneous_surface_y_momentum_flux - y momentum flux - Pa - dvsfc - real - (:) - out - F - MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run - - - instantaneous_surface_upward_sensible_heat_flux - surface upward sensible heat flux - W m-2 - dtsfc - real - (:) - out - F - MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run - - - instantaneous_surface_upward_latent_heat_flux - surface upward latent heat flux - W m-2 - dqsfc - real - (:) - out - F - MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run - - - atmosphere_boundary_layer_thickness - PBL thickness - m - hpbl - real - (:) - out - F - MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run - - - index_of_highest_temperature_inversion - index of highest temperature inversion - index - kinver - integer - (:) - in - F - MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run - - - atmosphere_momentum_diffusivity_background - background value of momentum diffusivity - m2 s-1 - xkzm_m - real - - in - F - MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run - - - atmosphere_heat_diffusivity_background - background value of heat diffusivity - m2 s-1 - xkzm_h - real - - in - F - MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run - - - diffusivity_background_sigma_level - sigma level threshold for background diffusivity - none - xkzm_s - real - - in - F - MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_satmedmfvdif SCHEME_satmedmfvdif SUBROUTINE_satmedmfvdif_run - - - diff --git a/physics/sfc_diag.xml b/physics/sfc_diag.xml deleted file mode 100644 index b5dfc9b6c..000000000 --- a/physics/sfc_diag.xml +++ /dev/null @@ -1,282 +0,0 @@ - - - - - - - horizontal_loop_extent - horizontal loop extent - count - im - integer - - in - F - MODULE_sfc_diag SCHEME_sfc_diag SUBROUTINE_sfc_diag_run - - - gravitational_acceleration - gravitational acceleration - m s-2 - grav - real - - in - F - MODULE_sfc_diag SCHEME_sfc_diag SUBROUTINE_sfc_diag_run - - - specific_heat_of_dry_air_at_constant_pressure - specific heat of dry air at constant pressure - J kg-1 K-1 - cp - real - - in - F - MODULE_sfc_diag SCHEME_sfc_diag SUBROUTINE_sfc_diag_run - - - ratio_of_dry_air_to_water_vapor_gas_constants - rd/rv - none - eps - real - - in - F - MODULE_sfc_diag SCHEME_sfc_diag SUBROUTINE_sfc_diag_run - - - ratio_of_dry_air_to_water_vapor_gas_constants_minus_one - (rd/rv) - 1 - none - epsm1 - real - - in - F - MODULE_sfc_diag SCHEME_sfc_diag SUBROUTINE_sfc_diag_run - - - surface_air_pressure - surface pressure - Pa - ps - real - (:) - in - F - MODULE_sfc_diag SCHEME_sfc_diag SUBROUTINE_sfc_diag_run - - - x_wind_at_lowest_model_layer_updated_by_physics - x component of 1st model layer wind - m s-1 - u1 - real - (:) - in - F - MODULE_sfc_diag SCHEME_sfc_diag SUBROUTINE_sfc_diag_run - - - y_wind_at_lowest_model_layer_updated_by_physics - y component of 1st model layer wind - m s-1 - v1 - real - (:) - in - F - MODULE_sfc_diag SCHEME_sfc_diag SUBROUTINE_sfc_diag_run - - - air_temperature_at_lowest_model_layer_updated_by_physics - 1st model layer air temperature - K - t1 - real - (:) - in - F - MODULE_sfc_diag SCHEME_sfc_diag SUBROUTINE_sfc_diag_run - - - water_vapor_specific_humidity_at_lowest_model_layer_updated_by_physics - 1st model layer specific humidity - kg kg-1 - q1 - real - (:) - in - F - MODULE_sfc_diag SCHEME_sfc_diag SUBROUTINE_sfc_diag_run - - - surface_skin_temperature - surface skin temperature - K - tskin - real - (:) - in - F - MODULE_sfc_diag SCHEME_sfc_diag SUBROUTINE_sfc_diag_run - - - surface_specific_humidity - surface specific humidity - kg kg-1 - qsurf - real - (:) - in - F - MODULE_sfc_diag SCHEME_sfc_diag SUBROUTINE_sfc_diag_run - - - ratio_of_wind_at_lowest_model_layer_and_wind_at_10m - ratio of fm10 and fm - ratio - f10m - real - (:) - out - F - MODULE_sfc_diag SCHEME_sfc_diag SUBROUTINE_sfc_diag_run - - - x_wind_at_10m - x component of wind at 10 m - m s-1 - u10m - real - (:) - out - F - MODULE_sfc_diag SCHEME_sfc_diag SUBROUTINE_sfc_diag_run - - - y_wind_at_10m - y component of wind at 10 m - m s-1 - v10m - real - (:) - out - F - MODULE_sfc_diag SCHEME_sfc_diag SUBROUTINE_sfc_diag_run - - - temperature_at_2m - temperature at 2 m - K - t2m - real - (:) - out - F - MODULE_sfc_diag SCHEME_sfc_diag SUBROUTINE_sfc_diag_run - - - specific_humidity_at_2m - specific humidity at 2 m - kg kg-1 - q2m - real - (:) - out - F - MODULE_sfc_diag SCHEME_sfc_diag SUBROUTINE_sfc_diag_run - - - ratio_of_exner_function_between_midlayer_and_interface_at_lowest_model_layer - Exner function ratio bt midlayer and interface at 1st layer - ratio - prslki - real - (:) - in - F - MODULE_sfc_diag SCHEME_sfc_diag SUBROUTINE_sfc_diag_run - - - kinematic_surface_upward_latent_heat_flux - surface upward evaporation flux - kg kg-1 m s-1 - evap - real - (:) - in - F - MODULE_sfc_diag SCHEME_sfc_diag SUBROUTINE_sfc_diag_run - - - Monin-Obukhov_similarity_function_for_momentum - Monin-Obukhov similarity parameter for momentum - none - fm - real - (:) - in - F - MODULE_sfc_diag SCHEME_sfc_diag SUBROUTINE_sfc_diag_run - - - Monin-Obukhov_similarity_function_for_heat - Monin-Obukhov similarity parameter for heat - none - fh - real - (:) - in - F - MODULE_sfc_diag SCHEME_sfc_diag SUBROUTINE_sfc_diag_run - - - Monin-Obukhov_similarity_function_for_momentum_at_10m - Monin-Obukhov similarity parameter for momentum - none - fm10 - real - (:) - in - F - MODULE_sfc_diag SCHEME_sfc_diag SUBROUTINE_sfc_diag_run - - - Monin-Obukhov_similarity_function_for_heat_at_2m - Monin-Obukhov similarity parameter for heat - none - fh2 - real - (:) - in - F - MODULE_sfc_diag SCHEME_sfc_diag SUBROUTINE_sfc_diag_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_sfc_diag SCHEME_sfc_diag SUBROUTINE_sfc_diag_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_sfc_diag SCHEME_sfc_diag SUBROUTINE_sfc_diag_run - - - diff --git a/physics/sfc_diag_post.xml b/physics/sfc_diag_post.xml deleted file mode 100644 index 0029ffa0f..000000000 --- a/physics/sfc_diag_post.xml +++ /dev/null @@ -1,227 +0,0 @@ - - - - - - horizontal_loop_extent - horizontal loop extent - count - im - integer - - in - F - MODULE_sfc_diag_post SCHEME_sfc_diag_post SUBROUTINE_sfc_diag_post_run - - - flag_diagnostics - logical flag for storing diagnostics - flag - lssav - logical - - in - F - MODULE_sfc_diag_post SCHEME_sfc_diag_post SUBROUTINE_sfc_diag_post_run - - - time_step_for_dynamics - dynamics timestep - s - dtf - real - - in - F - MODULE_sfc_diag_post SCHEME_sfc_diag_post SUBROUTINE_sfc_diag_post_run - - - ratio_of_dry_air_to_water_vapor_gas_constants - rd/rv - none - con_eps - real - - in - F - MODULE_sfc_diag_post SCHEME_sfc_diag_post SUBROUTINE_sfc_diag_post_run - - - ratio_of_dry_air_to_water_vapor_gas_constants_minus_one - (rd/rv) - 1 - none - con_epsm1 - real - - in - F - MODULE_sfc_diag_post SCHEME_sfc_diag_post SUBROUTINE_sfc_diag_post_run - - - surface_air_pressure - surface pressure - Pa - pgr - real - (:) - in - F - MODULE_sfc_diag_post SCHEME_sfc_diag_post SUBROUTINE_sfc_diag_post_run - - - temperature_at_2m - 2 meter temperature - K - t2m - real - (:) - in - F - MODULE_sfc_diag_post SCHEME_sfc_diag_post SUBROUTINE_sfc_diag_post_run - - - specific_humidity_at_2m - 2 meter specific humidity - kg kg-1 - q2m - real - (:) - in - F - MODULE_sfc_diag_post SCHEME_sfc_diag_post SUBROUTINE_sfc_diag_post_run - - - x_wind_at_10m - 10 meter u wind speed - m s-1 - u10m - real - (:) - in - F - MODULE_sfc_diag_post SCHEME_sfc_diag_post SUBROUTINE_sfc_diag_post_run - - - y_wind_at_10m - 10 meter v wind speed - m s-1 - v10m - real - (:) - in - F - MODULE_sfc_diag_post SCHEME_sfc_diag_post SUBROUTINE_sfc_diag_post_run - - - minimum_temperature_at_2m - min temperature at 2m height - K - tmpmin - real - (:) - inout - F - MODULE_sfc_diag_post SCHEME_sfc_diag_post SUBROUTINE_sfc_diag_post_run - - - maximum_temperature_at_2m - max temperature at 2m height - K - tmpmax - real - (:) - inout - F - MODULE_sfc_diag_post SCHEME_sfc_diag_post SUBROUTINE_sfc_diag_post_run - - - minimum_specific_humidity_at_2m - minimum specific humidity at 2m height - kg kg-1 - spfhmin - real - (:) - inout - F - MODULE_sfc_diag_post SCHEME_sfc_diag_post SUBROUTINE_sfc_diag_post_run - - - maximum_specific_humidity_at_2m - maximum specific humidity at 2m height - kg kg-1 - spfhmax - real - (:) - inout - F - MODULE_sfc_diag_post SCHEME_sfc_diag_post SUBROUTINE_sfc_diag_post_run - - - maximum_wind_at_10m - maximum wind speed at 10 m - m s-1 - wind10mmax - real - (:) - inout - F - MODULE_sfc_diag_post SCHEME_sfc_diag_post SUBROUTINE_sfc_diag_post_run - - - maximum_x_wind_at_10m - maximum x wind at 10 m - m s-1 - u10mmax - real - (:) - inout - F - MODULE_sfc_diag_post SCHEME_sfc_diag_post SUBROUTINE_sfc_diag_post_run - - - maximum_y_wind_at_10m - maximum y wind at 10 m - m s-1 - v10mmax - real - (:) - inout - F - MODULE_sfc_diag_post SCHEME_sfc_diag_post SUBROUTINE_sfc_diag_post_run - - - dewpoint_temperature_at_2m - 2 meter dewpoint temperature - K - dpt2m - real - (:) - inout - F - MODULE_sfc_diag_post SCHEME_sfc_diag_post SUBROUTINE_sfc_diag_post_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_sfc_diag_post SCHEME_sfc_diag_post SUBROUTINE_sfc_diag_post_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_sfc_diag_post SCHEME_sfc_diag_post SUBROUTINE_sfc_diag_post_run - - - - diff --git a/physics/sfc_ex_coef.xml b/physics/sfc_ex_coef.xml deleted file mode 100644 index a5ef62457..000000000 --- a/physics/sfc_ex_coef.xml +++ /dev/null @@ -1,392 +0,0 @@ - - - - - - horizontal_loop_extent - horizontal loop extent - count - im - integer - - in - F - MODULE_sfc_ex_coef SCHEME_sfc_ex_coef SUBROUTINE_sfc_ex_coef_run - - - surface_air_pressure - surface pressure - Pa - ps - real - (:) - in - F - MODULE_sfc_ex_coef SCHEME_sfc_ex_coef SUBROUTINE_sfc_ex_coef_run - - - x_wind_at_lowest_model_layer - x component of 1st model layer wind - m s-1 - u1 - real - (:) - in - F - MODULE_sfc_ex_coef SCHEME_sfc_ex_coef SUBROUTINE_sfc_ex_coef_run - - - y_wind_at_lowest_model_layer - y component of 1st model layer wind - m s-1 - v1 - real - (:) - in - F - MODULE_sfc_ex_coef SCHEME_sfc_ex_coef SUBROUTINE_sfc_ex_coef_run - - - air_temperature_at_lowest_model_layer - 1st model layer air temperature - K - t1 - real - (:) - in - F - MODULE_sfc_ex_coef SCHEME_sfc_ex_coef SUBROUTINE_sfc_ex_coef_run - - - water_vapor_specific_humidity_at_lowest_model_layer - 1st model layer specific humidity - kg kg-1 - q1 - real - (:) - in - F - MODULE_sfc_ex_coef SCHEME_sfc_ex_coef SUBROUTINE_sfc_ex_coef_run - - - height_above_ground_at_lowest_model_layer - height above ground at 1st model layer - m - z1 - real - (:) - in - F - MODULE_sfc_ex_coef SCHEME_sfc_ex_coef SUBROUTINE_sfc_ex_coef_run - - - surface_snow_thickness_water_equivalent - water equivalent surface snow thickness - mm - snwdph - real - (:) - in - F - MODULE_sfc_ex_coef SCHEME_sfc_ex_coef SUBROUTINE_sfc_ex_coef_run - - - surface_skin_temperature - surface skin temperature - K - tskin - real - (:) - in - F - MODULE_sfc_ex_coef SCHEME_sfc_ex_coef SUBROUTINE_sfc_ex_coef_run - - - surface_roughness_length - surface roughness length - cm - z0rl - real - (:) - inout - F - MODULE_sfc_ex_coef SCHEME_sfc_ex_coef SUBROUTINE_sfc_ex_coef_run - - - surface_drag_coefficient_for_momentum_in_air - surface exchange coeff for momentum - none - cm - real - (:) - inout - F - MODULE_sfc_ex_coef SCHEME_sfc_ex_coef SUBROUTINE_sfc_ex_coef_run - - - surface_drag_coefficient_for_heat_and_moisture_in_air - surface exchange coeff heat moisture - none - ch - real - (:) - inout - F - MODULE_sfc_ex_coef SCHEME_sfc_ex_coef SUBROUTINE_sfc_ex_coef_run - - - bulk_richardson_number_at_lowest_model_level - bulk Richardson number at the surface - none - rb - real - (:) - inout - F - MODULE_sfc_ex_coef SCHEME_sfc_ex_coef SUBROUTINE_sfc_ex_coef_run - - - air_pressure_at_lowest_model_layer - Model layer 1 mean pressure - Pa - prsl1 - real - (:) - in - F - MODULE_sfc_ex_coef SCHEME_sfc_ex_coef SUBROUTINE_sfc_ex_coef_run - - - ratio_of_exner_function_between_midlayer_and_interface_at_lowest_model_layer - Exner function ratio bt midlayer and interface at 1st layer - ratio - prslki - real - (:) - in - F - MODULE_sfc_ex_coef SCHEME_sfc_ex_coef SUBROUTINE_sfc_ex_coef_run - - - sea_land_ice_mask - landmask: sea/land/ice=0/1/2 - flag - islimsk - integer - (:) - in - F - MODULE_sfc_ex_coef SCHEME_sfc_ex_coef SUBROUTINE_sfc_ex_coef_run - - - surface_wind_stress - surface wind stress - m2 s-2 - stress - real - (:) - inout - F - MODULE_sfc_ex_coef SCHEME_sfc_ex_coef SUBROUTINE_sfc_ex_coef_run - - - Monin-Obukhov_similarity_function_for_momentum - Monin-Obukhov similarity parameter for momentum - none - fm - real - (:) - inout - F - MODULE_sfc_ex_coef SCHEME_sfc_ex_coef SUBROUTINE_sfc_ex_coef_run - - - Monin-Obukhov_similarity_function_for_heat - Monin-Obukhov similarity parameter for heat - none - fh - real - (:) - inout - F - MODULE_sfc_ex_coef SCHEME_sfc_ex_coef SUBROUTINE_sfc_ex_coef_run - - - surface_friction_velocity - surface friction velocity - m s-1 - ustar - real - (:) - inout - F - MODULE_sfc_ex_coef SCHEME_sfc_ex_coef SUBROUTINE_sfc_ex_coef_run - - - wind_speed_at_lowest_model_layer - wind speed at lowest model level - m s-1 - wind - real - (:) - inout - F - MODULE_sfc_ex_coef SCHEME_sfc_ex_coef SUBROUTINE_sfc_ex_coef_run - - - surface_wind_enhancement_due_to_convection - surface wind enhancement due to convection - m s-1 - ddvel - real - (:) - in - F - MODULE_sfc_ex_coef SCHEME_sfc_ex_coef SUBROUTINE_sfc_ex_coef_run - - - Monin-Obukhov_similarity_function_for_momentum_at_10m - Monin-Obukhov similarity parameter for momentum - none - fm10 - real - (:) - inout - F - MODULE_sfc_ex_coef SCHEME_sfc_ex_coef SUBROUTINE_sfc_ex_coef_run - - - Monin-Obukhov_similarity_function_for_heat_at_2m - Monin-Obukhov similarity parameter for heat - none - fh2 - real - (:) - inout - F - MODULE_sfc_ex_coef SCHEME_sfc_ex_coef SUBROUTINE_sfc_ex_coef_run - - - bounded_vegetation_area_fraction - areal fractional cover of green vegetation bounded on the bottom - frac - sigmaf - real - (:) - in - F - MODULE_sfc_ex_coef SCHEME_sfc_ex_coef SUBROUTINE_sfc_ex_coef_run - - - vegetation_type_classification - vegetation type at each grid cell - index - vegtype - integer - (:) - in - F - MODULE_sfc_ex_coef SCHEME_sfc_ex_coef SUBROUTINE_sfc_ex_coef_run - - - maximum_vegetation_area_fraction - max fractnl cover of green veg - frac - shdmax - real - (:) - in - F - MODULE_sfc_ex_coef SCHEME_sfc_ex_coef SUBROUTINE_sfc_ex_coef_run - - - vegetation_type_dataset_choice - land use dataset choice - index - ivegsrc - integer - - in - F - MODULE_sfc_ex_coef SCHEME_sfc_ex_coef SUBROUTINE_sfc_ex_coef_run - - - perturbation_of_momentum_roughness_length - perturbation of momentum roughness length - frac - z0pert - real - (:) - in - F - MODULE_sfc_ex_coef SCHEME_sfc_ex_coef SUBROUTINE_sfc_ex_coef_run - - - perturbation_of_heat_to_momentum_roughness_length_ratio - perturbation of heat to momentum roughness length ratio - frac - ztpert - real - (:) - in - F - MODULE_sfc_ex_coef SCHEME_sfc_ex_coef SUBROUTINE_sfc_ex_coef_run - - - surface_skin_temperature_after_iteration - surface skin temperature after iteration - K - tsurf - real - (:) - in - F - MODULE_sfc_ex_coef SCHEME_sfc_ex_coef SUBROUTINE_sfc_ex_coef_run - - - flag_for_iteration - flag for iteration - flag - flag_iter - logical - (:) - in - F - MODULE_sfc_ex_coef SCHEME_sfc_ex_coef SUBROUTINE_sfc_ex_coef_run - - - flag_for_reduced_drag_coefficient_over_sea - flag for reduced drag coefficient over sea - flag - redrag - logical - - in - F - MODULE_sfc_ex_coef SCHEME_sfc_ex_coef SUBROUTINE_sfc_ex_coef_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_sfc_ex_coef SCHEME_sfc_ex_coef SUBROUTINE_sfc_ex_coef_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_sfc_ex_coef SCHEME_sfc_ex_coef SUBROUTINE_sfc_ex_coef_run - - - - diff --git a/physics/sfc_nst.xml b/physics/sfc_nst.xml deleted file mode 100644 index 35051132f..000000000 --- a/physics/sfc_nst.xml +++ /dev/null @@ -1,656 +0,0 @@ - - - - - - horizontal_loop_extent - horizontal loop extent - count - im - integer - - in - F - MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run - - - surface_air_pressure - surface pressure - Pa - ps - real - (:) - in - F - MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run - - - x_wind_at_lowest_model_layer - x component of surface layer wind - m s-1 - u1 - real - (:) - in - F - MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run - - - y_wind_at_lowest_model_layer - y component of surface layer wind - m s-1 - v1 - real - (:) - in - F - MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run - - - air_temperature_at_lowest_model_layer - surface layer mean temperature - K - t1 - real - (:) - in - F - MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run - - - water_vapor_specific_humidity_at_lowest_model_layer - surface layer mean specific humidity - kg kg-1 - q1 - real - (:) - in - F - MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run - - - sea_surface_reference_temperature - reference/foundation temperature - K - tref - real - (:) - in - F - MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run - - - surface_drag_coefficient_for_momentum_in_air - surface exchange coeff for momentum - none - cm - real - (:) - in - F - MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run - - - surface_drag_coefficient_for_heat_and_moisture_in_air - surface exchange coeff heat moisture - none - ch - real - (:) - in - F - MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run - - - air_pressure_at_lowest_model_layer - surface layer mean pressure - Pa - prsl1 - real - (:) - in - F - MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run - - - ratio_of_exner_function_between_midlayer_and_interface_at_lowest_model_layer - Exner function ratio bt midlayer and interface at 1st layer - ratio - prslki - real - (:) - in - F - MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run - - - sea_land_ice_mask - landmask: sea/land/ice=0/1/2 - flag - islimsk - integer - (:) - in - F - MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run - - - longitude - longitude - radians - xlon - real - (:) - in - F - MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run - - - sine_of_latitude - sine of latitude - none - sinlat - real - (:) - in - F - MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run - - - surface_wind_stress - wind stress - m2 s-2 - stress - real - (:) - in - F - MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run - - - surface_longwave_emissivity - surface longwave emissivity - frac - sfcemis - real - (:) - in - F - MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run - - - surface_downwelling_longwave_flux_absorbed_by_ground - total sky sfc downward lw flux absorbed by the ocean - W m-2 - dlwflx - real - (:) - in - F - MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run - - - surface_net_downwelling_shortwave_flux - total sky sfc net sw flx into ocean - W m-2 - sfcnsw - real - (:) - in - F - MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run - - - nonnegative_lwe_thickness_of_precipitation_amount_on_dynamics_timestep - nonnegative precipitation amount on dyn time step - m - rain - real - (:) - in - F - MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run - - - time_step_for_dynamics - timestep interval - s - timestep - real - - in - F - MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run - - - index_of_time_step - current time step index - index - kdt - integer - - in - F - MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run - - - forecast_hour - fcst hour at the end of prev time step - h - solhr - real - - in - F - MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run - - - instantaneous_cosine_of_zenith_angle - cosine of solar zenith angle - none - xcosz - real - (:) - in - F - MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run - - - surface_wind_enhancement_due_to_convection - wind enhancement due to convection - m s-1 - ddvel - real - (:) - in - F - MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run - - - flag_for_iteration - flag for iteration - flag - flag_iter - logical - (:) - in - F - MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run - - - flag_for_guess_run - flag for guess run - flag - flag_guess - logical - (:) - in - F - MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run - - - flag_for_nsstm_run - NSSTM flag: off/uncoupled/coupled=0/1/2 - flag - nstf_name1 - integer - - in - F - MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run - - - vertical_temperature_average_range_lower_bound - zsea1 - mm - nstf_name4 - integer - - in - F - MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run - - - vertical_temperature_average_range_upper_bound - zsea2 - mm - nstf_name5 - integer - - in - F - MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run - - - flag_print - flag for printing diagnostics to output - flag - lprnt - logical - - in - F - MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run - - - horizontal_index_of_printed_column - horizontal index of printed column - index - ipr - integer - - in - F - MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run - - - surface_skin_temperature_for_nsst - ocean surface skin temperature - K - tskin - real - (:) - inout - F - MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run - - - surface_skin_temperature_after_iteration - ocean surface skin temperature for guess run - K - tsurf - real - (:) - inout - F - MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run - - - diurnal_thermocline_layer_heat_content - heat content in diurnal thermocline layer - K m - xt - real - (:) - inout - F - MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run - - - sea_water_salinity - salinity content in diurnal thermocline layer - ppt m - xs - real - (:) - inout - F - MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run - - - diurnal_thermocline_layer_x_current - u-current content in diurnal thermocline layer - m2 s-1 - xu - real - (:) - inout - F - MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run - - - diurnal_thermocline_layer_y_current - v-current content in diurnal thermocline layer - m2 s-1 - xv - real - (:) - inout - F - MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run - - - diurnal_thermocline_layer_thickness - diurnal thermocline layer thickness - m - xz - real - (:) - inout - F - MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run - - - ocean_mixed_layer_thickness - mixed layer thickness - m - zm - real - (:) - inout - F - MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run - - - sensitivity_of_dtl_heat_content_to_surface_temperature - d(xt)/d(ts) - m - xtts - real - (:) - inout - F - MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run - - - sensitivity_of_dtl_thickness_to_surface_temperature - d(xz)/d(ts) - m K-1 - xzts - real - (:) - inout - F - MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run - - - sub-layer_cooling_amount - sub-layer cooling amount - K - dt_cool - real - (:) - inout - F - MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run - - - sub-layer_cooling_thickness - sub-layer cooling thickness - m - z_c - real - (:) - inout - F - MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run - - - coefficient_c_0 - coefficient1 to calculate d(tz)/d(ts) - none - c_0 - real - (:) - inout - F - MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run - - - coefficient_c_d - coefficient2 to calculate d(tz)/d(ts) - none - c_d - real - (:) - inout - F - MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run - - - coefficient_w_0 - coefficient3 to calculate d(tz)/d(ts) - none - w_0 - real - (:) - inout - F - MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run - - - coefficient_w_d - coefficient4 to calculate d(tz)/d(ts) - none - w_d - real - (:) - inout - F - MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run - - - free_convection_layer_thickness - thickness of free convection layer - m - d_conv - real - (:) - inout - F - MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run - - - index_of_dtlm_start - index to start dtlm run or not - index - ifd - real - (:) - inout - F - MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run - - - sensible_heat_flux_due_to_rainfall - sensible heat flux due to rainfall - W - qrain - real - (:) - inout - F - MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run - - - surface_specific_humidity - surface air saturation specific humidity - kg kg-1 - qsurf - real - (:) - inout - F - MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run - - - upward_heat_flux_in_soil - soil heat flux - W m-2 - gflux - real - (:) - inout - F - MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run - - - surface_drag_wind_speed_for_momentum_in_air - surf mom exch coef time mean surf wind - m s-1 - cmm - real - (:) - inout - F - MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run - - - surface_drag_mass_flux_for_heat_and_moisture_in_air - surf h m exch coef time surf wind density - kg m-2 s-1 - chh - real - (:) - inout - F - MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run - - - kinematic_surface_upward_latent_heat_flux - kinematic from latent heat flux - kg kg-1 m s-1 - evap - real - (:) - inout - F - MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run - - - kinematic_surface_upward_sensible_heat_flux - kinematic sensible heat flux - K m s-1 - hflx - real - (:) - inout - F - MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run - - - surface_upward_potential_latent_heat_flux - potential evaporation - W m-2 - ep - real - (:) - inout - F - MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_sfc_nst SCHEME_sfc_nst SUBROUTINE_sfc_nst_run - - - - diff --git a/physics/sfc_nst_post.xml b/physics/sfc_nst_post.xml deleted file mode 100644 index f7dd20f46..000000000 --- a/physics/sfc_nst_post.xml +++ /dev/null @@ -1,216 +0,0 @@ - - - - - horizontal_loop_extent - horizontal loop extent - count - im - integer - - in - F - MODULE_sfc_nst_post SCHEME_sfc_nst_post SUBROUTINE_sfc_nst_post_run - - - sea_land_ice_mask - landmask: sea/land/ice=0/1/2 - flag - islimsk - integer - (:) - in - F - MODULE_sfc_nst_post SCHEME_sfc_nst_post SUBROUTINE_sfc_nst_post_run - - - orography - orography - m - oro - real - (:) - in - F - MODULE_sfc_nst_post SCHEME_sfc_nst_post SUBROUTINE_sfc_nst_post_run - - - orography_unfiltered - unfiltered orography - m - oro_uf - real - (:) - in - F - MODULE_sfc_nst_post SCHEME_sfc_nst_post SUBROUTINE_sfc_nst_post_run - - - flag_for_nsstm_run - NSSTM flag: off/uncoupled/coupled=0/1/2 - flag - nstf_name1 - integer - - in - F - MODULE_sfc_nst_post SCHEME_sfc_nst_post SUBROUTINE_sfc_nst_post_run - - - vertical_temperature_average_range_lower_bound - zsea1 - mm - nstf_name4 - integer - - in - F - MODULE_sfc_nst_post SCHEME_sfc_nst_post SUBROUTINE_sfc_nst_post_run - - - vertical_temperature_average_range_upper_bound - zsea2 - mm - nstf_name5 - integer - - in - F - MODULE_sfc_nst_post SCHEME_sfc_nst_post SUBROUTINE_sfc_nst_post_run - - - diurnal_thermocline_layer_heat_content - heat content in diurnal thermocline layer - K m - xt - real - (:) - in - F - MODULE_sfc_nst_post SCHEME_sfc_nst_post SUBROUTINE_sfc_nst_post_run - - - diurnal_thermocline_layer_thickness - diurnal thermocline layer thickness - m - xz - real - (:) - in - F - MODULE_sfc_nst_post SCHEME_sfc_nst_post SUBROUTINE_sfc_nst_post_run - - - sub-layer_cooling_amount - sub-layer cooling amount - K - dt_cool - real - (:) - in - F - MODULE_sfc_nst_post SCHEME_sfc_nst_post SUBROUTINE_sfc_nst_post_run - - - sub-layer_cooling_thickness - sub-layer cooling thickness - m - z_c - real - (:) - in - F - MODULE_sfc_nst_post SCHEME_sfc_nst_post SUBROUTINE_sfc_nst_post_run - - - sea_land_ice_mask_real - landmask: sea/land/ice=0/1/2 - flag - rslimsk - real - (:) - in - F - MODULE_sfc_nst_post SCHEME_sfc_nst_post SUBROUTINE_sfc_nst_post_run - - - sea_surface_reference_temperature - reference/foundation temperature - K - tref - real - (:) - in - F - MODULE_sfc_nst_post SCHEME_sfc_nst_post SUBROUTINE_sfc_nst_post_run - - - longitude - longitude - radians - xlon - real - (:) - in - F - MODULE_sfc_nst_post SCHEME_sfc_nst_post SUBROUTINE_sfc_nst_post_run - - - surface_skin_temperature_after_iteration - ocean surface skin temperature for guess run - K - tsurf - real - (:) - inout - F - MODULE_sfc_nst_post SCHEME_sfc_nst_post SUBROUTINE_sfc_nst_post_run - - - mean_change_over_depth_in_sea_water_temperature - mean of dT(z) (zsea1 to zsea2) - K - dtzm - real - (:) - out - F - MODULE_sfc_nst_post SCHEME_sfc_nst_post SUBROUTINE_sfc_nst_post_run - - - surface_skin_temperature - surface skin temperature - K - tsfc - real - (:) - inout - F - MODULE_sfc_nst_post SCHEME_sfc_nst_post SUBROUTINE_sfc_nst_post_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_sfc_nst_post SCHEME_sfc_nst_post SUBROUTINE_sfc_nst_post_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_sfc_nst_post SCHEME_sfc_nst_post SUBROUTINE_sfc_nst_post_run - - - - - diff --git a/physics/sfc_nst_pre.xml b/physics/sfc_nst_pre.xml deleted file mode 100644 index cd7931866..000000000 --- a/physics/sfc_nst_pre.xml +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - - horizontal_loop_extent - horizontal loop extent - count - im - integer - - in - F - MODULE_sfc_nst_pre SCHEME_sfc_nst_pre SUBROUTINE_sfc_nst_pre_run - - - sea_land_ice_mask - landmask: sea/land/ice=0/1/2 - flag - islimsk - integer - (:) - in - F - MODULE_sfc_nst_pre SCHEME_sfc_nst_pre SUBROUTINE_sfc_nst_pre_run - - - orography - orography - m - oro - real - (:) - in - F - MODULE_sfc_nst_pre SCHEME_sfc_nst_pre SUBROUTINE_sfc_nst_pre_run - - - orography_unfiltered - unfiltered orographyo - m - oro_uf - real - (:) - in - F - MODULE_sfc_nst_pre SCHEME_sfc_nst_pre SUBROUTINE_sfc_nst_pre_run - - - surface_skin_temperature - surface skin temperature - K - tsfc - real - (:) - in - F - MODULE_sfc_nst_pre SCHEME_sfc_nst_pre SUBROUTINE_sfc_nst_pre_run - - - surface_skin_temperature_after_iteration - ocean surface skin temperature for guess run - K - tsurf - real - (:) - inout - F - MODULE_sfc_nst_pre SCHEME_sfc_nst_pre SUBROUTINE_sfc_nst_pre_run - - - surface_skin_temperature_for_nsst - ocean surface skin temperature - K - tskin - real - (:) - out - F - MODULE_sfc_nst_pre SCHEME_sfc_nst_pre SUBROUTINE_sfc_nst_pre_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_sfc_nst_pre SCHEME_sfc_nst_pre SUBROUTINE_sfc_nst_pre_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_sfc_nst_pre SCHEME_sfc_nst_pre SUBROUTINE_sfc_nst_pre_run - - - diff --git a/physics/sfc_ocean.xml b/physics/sfc_ocean.xml deleted file mode 100644 index d36950994..000000000 --- a/physics/sfc_ocean.xml +++ /dev/null @@ -1,260 +0,0 @@ - - - - - - - horizontal_loop_extent - horizontal loop extent - count - im - integer - - in - F - MODULE_sfc_ocean SCHEME_sfc_ocean SUBROUTINE_sfc_ocean_run - - - surface_air_pressure - surface pressure - Pa - ps - real - (:) - in - F - MODULE_sfc_ocean SCHEME_sfc_ocean SUBROUTINE_sfc_ocean_run - - - x_wind_at_lowest_model_layer - x component of surface layer wind - m s-1 - u1 - real - (:) - in - F - MODULE_sfc_ocean SCHEME_sfc_ocean SUBROUTINE_sfc_ocean_run - - - y_wind_at_lowest_model_layer - y component of surface layer wind - m s-1 - v1 - real - (:) - in - F - MODULE_sfc_ocean SCHEME_sfc_ocean SUBROUTINE_sfc_ocean_run - - - air_temperature_at_lowest_model_layer - surface layer mean temperature - K - t1 - real - (:) - in - F - MODULE_sfc_ocean SCHEME_sfc_ocean SUBROUTINE_sfc_ocean_run - - - water_vapor_specific_humidity_at_lowest_model_layer - surface layer mean specific humidity - kg kg-1 - q1 - real - (:) - in - F - MODULE_sfc_ocean SCHEME_sfc_ocean SUBROUTINE_sfc_ocean_run - - - surface_skin_temperature - surface skin temperature - K - tskin - real - (:) - in - F - MODULE_sfc_ocean SCHEME_sfc_ocean SUBROUTINE_sfc_ocean_run - - - surface_drag_coefficient_for_momentum_in_air - surface exchange coeff for momentum - none - cm - real - (:) - in - F - MODULE_sfc_ocean SCHEME_sfc_ocean SUBROUTINE_sfc_ocean_run - - - surface_drag_coefficient_for_heat_and_moisture_in_air - surface exchange coeff heat moisture - none - ch - real - (:) - in - F - MODULE_sfc_ocean SCHEME_sfc_ocean SUBROUTINE_sfc_ocean_run - - - air_pressure_at_lowest_model_layer - surface layer mean pressure - Pa - prsl1 - real - (:) - in - F - MODULE_sfc_ocean SCHEME_sfc_ocean SUBROUTINE_sfc_ocean_run - - - ratio_of_exner_function_between_midlayer_and_interface_at_lowest_model_layer - Exner function ratio bt midlayer and interface at 1st layer - ratio - prslki - real - (:) - in - F - MODULE_sfc_ocean SCHEME_sfc_ocean SUBROUTINE_sfc_ocean_run - - - sea_land_ice_mask - landmask: sea/land/ice=0/1/2 - flag - islimsk - integer - (:) - in - F - MODULE_sfc_ocean SCHEME_sfc_ocean SUBROUTINE_sfc_ocean_run - - - surface_wind_enhancement_due_to_convection - wind enhancement due to convection - m s-1 - ddvel - real - (:) - in - F - MODULE_sfc_ocean SCHEME_sfc_ocean SUBROUTINE_sfc_ocean_run - - - flag_for_iteration - flag for iteration - flag - flag_iter - logical - (:) - in - F - MODULE_sfc_ocean SCHEME_sfc_ocean SUBROUTINE_sfc_ocean_run - - - surface_specific_humidity - surface air saturation specific humidity - kg kg-1 - qsurf - real - (:) - inout - F - MODULE_sfc_ocean SCHEME_sfc_ocean SUBROUTINE_sfc_ocean_run - - - surface_drag_wind_speed_for_momentum_in_air - surf mom exch coef time mean surf wind - m s-1 - cmm - real - (:) - inout - F - MODULE_sfc_ocean SCHEME_sfc_ocean SUBROUTINE_sfc_ocean_run - - - surface_drag_mass_flux_for_heat_and_moisture_in_air - surf h m exch coef time surf wind density - kg m-2 s-1 - chh - real - (:) - inout - F - MODULE_sfc_ocean SCHEME_sfc_ocean SUBROUTINE_sfc_ocean_run - - - upward_heat_flux_in_soil - soil heat flux - W m-2 - gflux - real - (:) - inout - F - MODULE_sfc_ocean SCHEME_sfc_ocean SUBROUTINE_sfc_ocean_run - - - kinematic_surface_upward_latent_heat_flux - kinematic from latent heat flux - kg kg-1 m s-1 - evap - real - (:) - inout - F - MODULE_sfc_ocean SCHEME_sfc_ocean SUBROUTINE_sfc_ocean_run - - - kinematic_surface_upward_sensible_heat_flux - kinematic sensible heat flux - K m s-1 - hflx - real - (:) - inout - F - MODULE_sfc_ocean SCHEME_sfc_ocean SUBROUTINE_sfc_ocean_run - - - surface_upward_potential_latent_heat_flux - potential evaporation - W m-2 - ep - real - (:) - inout - F - MODULE_sfc_ocean SCHEME_sfc_ocean SUBROUTINE_sfc_ocean_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_sfc_ocean SCHEME_sfc_ocean SUBROUTINE_sfc_ocean_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_sfc_ocean SCHEME_sfc_ocean SUBROUTINE_sfc_ocean_run - - - diff --git a/physics/sfc_sice.xml b/physics/sfc_sice.xml deleted file mode 100644 index d6d51a995..000000000 --- a/physics/sfc_sice.xml +++ /dev/null @@ -1,469 +0,0 @@ - - - - - horizontal_loop_extent - horizontal loop extent - count - im - integer - - in - F - MODULE_sfc_sice SCHEME_sfc_sice SUBROUTINE_sfc_sice_run - - - soil_vertical_dimension - vertical loop extent for soil levels, start at 1 - count - km - integer - - in - F - MODULE_sfc_sice SCHEME_sfc_sice SUBROUTINE_sfc_sice_run - - - surface_air_pressure - surface pressure - Pa - ps - real - (:) - in - F - MODULE_sfc_sice SCHEME_sfc_sice SUBROUTINE_sfc_sice_run - - - x_wind_at_lowest_model_layer - u component of surface layer wind - m s-1 - u1 - real - (:) - in - F - MODULE_sfc_sice SCHEME_sfc_sice SUBROUTINE_sfc_sice_run - - - y_wind_at_lowest_model_layer - v component of surface layer wind - m s-1 - v1 - real - (:) - in - F - MODULE_sfc_sice SCHEME_sfc_sice SUBROUTINE_sfc_sice_run - - - air_temperature_at_lowest_model_layer - surface layer mean temperature - K - t1 - real - (:) - in - F - MODULE_sfc_sice SCHEME_sfc_sice SUBROUTINE_sfc_sice_run - - - water_vapor_specific_humidity_at_lowest_model_layer - surface layer mean specific humidity - kg kg-1 - q1 - real - (:) - in - F - MODULE_sfc_sice SCHEME_sfc_sice SUBROUTINE_sfc_sice_run - - - time_step_for_dynamics - time step - s - delt - real - - in - F - MODULE_sfc_sice SCHEME_sfc_sice SUBROUTINE_sfc_sice_run - - - surface_longwave_emissivity - sfc lw emissivity - frac - sfcemis - real - (:) - in - F - MODULE_sfc_sice SCHEME_sfc_sice SUBROUTINE_sfc_sice_run - - - surface_downwelling_longwave_flux_absorbed_by_ground - total sky surface downward longwave flux absorbed by the ground - W m-2 - dlwflx - real - (:) - in - F - MODULE_sfc_sice SCHEME_sfc_sice SUBROUTINE_sfc_sice_run - - - surface_net_downwelling_shortwave_flux - total sky sfc netsw flx into ground - W m-2 - sfcnsw - real - (:) - in - F - MODULE_sfc_sice SCHEME_sfc_sice SUBROUTINE_sfc_sice_run - - - surface_downwelling_shortwave_flux - total sky sfc downward sw flux - W m-2 - sfcdsw - real - (:) - in - F - MODULE_sfc_sice SCHEME_sfc_sice SUBROUTINE_sfc_sice_run - - - flag_for_precipitation_type - snow/rain flag for precipitation - flag - srflag - real - (:) - in - F - MODULE_sfc_sice SCHEME_sfc_sice SUBROUTINE_sfc_sice_run - - - surface_drag_coefficient_for_momentum_in_air - surface exchange coeff for momentum - none - cm - real - (:) - in - F - MODULE_sfc_sice SCHEME_sfc_sice SUBROUTINE_sfc_sice_run - - - surface_drag_coefficient_for_heat_and_moisture_in_air - surface exchange coeff heat moisture - none - ch - real - (:) - in - F - MODULE_sfc_sice SCHEME_sfc_sice SUBROUTINE_sfc_sice_run - - - air_pressure_at_lowest_model_layer - surface layer mean pressure - Pa - prsl1 - real - (:) - in - F - MODULE_sfc_sice SCHEME_sfc_sice SUBROUTINE_sfc_sice_run - - - ratio_of_exner_function_between_midlayer_and_interface_at_lowest_model_layer - Exner function ratio bt midlayer and interface at 1st layer - ratio - prslki - real - (:) - in - F - MODULE_sfc_sice SCHEME_sfc_sice SUBROUTINE_sfc_sice_run - - - sea_land_ice_mask - sea/land/ice mask (=0/1/2) - flag - islimsk - integer - (:) - in - F - MODULE_sfc_sice SCHEME_sfc_sice SUBROUTINE_sfc_sice_run - - - surface_wind_enhancement_due_to_convection - wind enhancement due to convection - m s-1 - ddvel - real - (:) - in - F - MODULE_sfc_sice SCHEME_sfc_sice SUBROUTINE_sfc_sice_run - - - flag_for_iteration - flag for iteration - flag - flag_iter - logical - (:) - in - F - MODULE_sfc_sice SCHEME_sfc_sice SUBROUTINE_sfc_sice_run - - - flag_for_mom4_coupling - flag for Mom4 coupling - flag - mom4ice - logical - - in - F - MODULE_sfc_sice SCHEME_sfc_sice SUBROUTINE_sfc_sice_run - - - flag_for_land_surface_scheme - flag for land sfc scheme =0: osu; =1: noah - flag - lsm - integer - - in - F - MODULE_sfc_sice SCHEME_sfc_sice SUBROUTINE_sfc_sice_run - - - flag_print - switch for printing sample column to stdout - flag - lprnt - logical - - in - F - MODULE_sfc_sice SCHEME_sfc_sice SUBROUTINE_sfc_sice_run - - - horizontal_index_of_printed_column - horizontal index of printed column - index - ipr - integer - - in - F - MODULE_sfc_sice SCHEME_sfc_sice SUBROUTINE_sfc_sice_run - - - sea_ice_thickness - sea-ice thickness - m - hice - real - (:) - inout - F - MODULE_sfc_sice SCHEME_sfc_sice SUBROUTINE_sfc_sice_run - - - sea_ice_concentration - sea-ice concentration [0,1] - frac - fice - real - (:) - inout - F - MODULE_sfc_sice SCHEME_sfc_sice SUBROUTINE_sfc_sice_run - - - sea_ice_temperature - sea-ice surface temperature - K - tice - real - (:) - inout - F - MODULE_sfc_sice SCHEME_sfc_sice SUBROUTINE_sfc_sice_run - - - water_equivalent_accumulated_snow_depth - water equivalent accumulated snow depth - mm - weasd - real - (:) - inout - F - MODULE_sfc_sice SCHEME_sfc_sice SUBROUTINE_sfc_sice_run - - - surface_skin_temperature - surface skin temperature - K - tskin - real - (:) - inout - F - MODULE_sfc_sice SCHEME_sfc_sice SUBROUTINE_sfc_sice_run - - - nonnegative_lwe_thickness_of_precipitation_amount_on_dynamics_timestep - nonnegative precipitation amount in one dynamics time step - m - tprcp - real - (:) - inout - F - MODULE_sfc_sice SCHEME_sfc_sice SUBROUTINE_sfc_sice_run - - - soil_temperature - soil temp - K - stc - real - (:,:) - inout - F - MODULE_sfc_sice SCHEME_sfc_sice SUBROUTINE_sfc_sice_run - - - surface_upward_potential_latent_heat_flux - potential evaporation - W m-2 - ep - real - (:) - inout - F - MODULE_sfc_sice SCHEME_sfc_sice SUBROUTINE_sfc_sice_run - - - surface_snow_thickness_water_equivalent - water equivalent snow depth - mm - snwdph - real - (:) - inout - F - MODULE_sfc_sice SCHEME_sfc_sice SUBROUTINE_sfc_sice_run - - - surface_specific_humidity - sfc air saturation specific humidity - kg kg-1 - qsurf - real - (:) - inout - F - MODULE_sfc_sice SCHEME_sfc_sice SUBROUTINE_sfc_sice_run - - - surface_snow_melt - snow melt during timestep - m - snowmt - real - (:) - inout - F - MODULE_sfc_sice SCHEME_sfc_sice SUBROUTINE_sfc_sice_run - - - upward_heat_flux_in_soil - soil heat flux - W m-2 - gflux - real - (:) - inout - F - MODULE_sfc_sice SCHEME_sfc_sice SUBROUTINE_sfc_sice_run - - - surface_drag_wind_speed_for_momentum_in_air - surf mom exch coef time mean surf wind - m s-1 - cmm - real - (:) - inout - F - MODULE_sfc_sice SCHEME_sfc_sice SUBROUTINE_sfc_sice_run - - - surface_drag_mass_flux_for_heat_and_moisture_in_air - surf h m exch coef time surf wind density - kg m-2 s-1 - chh - real - (:) - inout - F - MODULE_sfc_sice SCHEME_sfc_sice SUBROUTINE_sfc_sice_run - - - kinematic_surface_upward_latent_heat_flux - evaporative latent heat flux - kg kg-1 m s-1 - evap - real - (:) - inout - F - MODULE_sfc_sice SCHEME_sfc_sice SUBROUTINE_sfc_sice_run - - - kinematic_surface_upward_sensible_heat_flux - kinematic sensible heat flux - K m s-1 - hflx - real - (:) - inout - F - MODULE_sfc_sice SCHEME_sfc_sice SUBROUTINE_sfc_sice_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_sfc_sice SCHEME_sfc_sice SUBROUTINE_sfc_sice_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_sfc_sice SCHEME_sfc_sice SUBROUTINE_sfc_sice_run - - - - - diff --git a/physics/sfc_sice_post.xml b/physics/sfc_sice_post.xml deleted file mode 100644 index 859b3c121..000000000 --- a/physics/sfc_sice_post.xml +++ /dev/null @@ -1,95 +0,0 @@ - - - - - horizontal_loop_extent - horizontal loop extent - count - im - integer - - in - F - MODULE_sfc_sice_post SCHEME_sfc_sice_post SUBROUTINE_sfc_sice_post_run - - - sea_land_ice_mask - sea/land/ice mask (=0/1/2) - flag - islmsk - integer - (:) - in - F - MODULE_sfc_sice_post SCHEME_sfc_sice_post SUBROUTINE_sfc_sice_post_run - - - surface_skin_temperature - surface skin temperature - K - tsfc - real - (:) - in - F - MODULE_sfc_sice_post SCHEME_sfc_sice_post SUBROUTINE_sfc_sice_post_run - - - sea_ice_concentration - sea-ice concentration [0,1] - frac - fice - real - (:) - inout - F - MODULE_sfc_sice_post SCHEME_sfc_sice_post SUBROUTINE_sfc_sice_post_run - - - sea_ice_thickness - sea-ice thickness - m - hice - real - (:) - inout - F - MODULE_sfc_sice_post SCHEME_sfc_sice_post SUBROUTINE_sfc_sice_post_run - - - sea_ice_temperature - sea-ice surface temperature - K - tisfc - real - (:) - inout - F - MODULE_sfc_sice_post SCHEME_sfc_sice_post SUBROUTINE_sfc_sice_post_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_sfc_sice_post SCHEME_sfc_sice_post SUBROUTINE_sfc_sice_post_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_sfc_sice_post SCHEME_sfc_sice_post SUBROUTINE_sfc_sice_post_run - - - - - diff --git a/physics/shoc.xml b/physics/shoc.xml deleted file mode 100644 index 34d015867..000000000 --- a/physics/shoc.xml +++ /dev/null @@ -1,645 +0,0 @@ - - - - - - - horizontal_dimension - horizontal dimension - count - ix - integer - - in - F - MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run - - - horizontal_loop_extent - horizontal loop extent - count - nx - integer - - in - F - MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run - - - vertical_dimension - vertical layer dimension - count - nzm - integer - - in - F - MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run - - - flag_for_shoc - flag for SHOC - flag - do_shoc - logical - - in - F - MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run - - - flag_for_shoc_after_convection - flag to execute SHOC after convection - flag - shocaftcnv - logical - - in - F - MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run - - - flag_mg3_as_mg2 - flag for controlling prep for Morrison-Gettelman microphysics - flag - mg3_as_mg2 - logical - - in - F - MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run - - - flag_for_microphysics_scheme - choice of microphysics scheme - flag - imp_physics - integer - - in - F - MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run - - - flag_for_gfdl_microphysics_scheme - choice of GFDL microphysics scheme - flag - imp_physics_gfdl - integer - - in - F - MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run - - - flag_for_zhao_carr_microphysics_scheme - choice of Zhao-Carr microphysics scheme - flag - imp_physics_zhao_carr - integer - - in - F - MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run - - - flag_for_zhao_carr_pdf_microphysics_scheme - choice of Zhao-Carr microphysics scheme with PDF clouds - flag - imp_physics_zhao_carr_pdf - integer - - in - F - MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run - - - flag_for_morrison_gettelman_microphysics_scheme - choice of Morrison-Gettelman rmicrophysics scheme - flag - imp_physics_mg - integer - - in - F - MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run - - - number_of_frozen_precipitation_species - number of frozen precipitation species - count - fprcp - integer - - in - F - MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run - - - cloud_phase_transition_threshold_temperature - threshold temperature below which cloud starts to freeze - K - tcr - real - - in - F - MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run - - - cloud_phase_transition_denominator - denominator in cloud phase transition = 1/(tcr-tf) - K-1 - tcrf - real - - in - F - MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run - - - specific_heat_of_dry_air_at_constant_pressure - specific heat of dry air at constant pressure - J kg-1 K-1 - con_cp - real - - in - F - MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run - - - gravitational_acceleration - gravitational acceleration - m s-2 - con_g - real - - in - F - MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run - - - latent_heat_of_vaporization_of_water_at_0C - latent heat of evaporation/sublimation - J kg-1 - con_hvap - real - - in - F - MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run - - - latent_heat_of_fusion_of_water_at_0C - latent heat of fusion - J kg-1 - con_hfus - real - - in - F - MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run - - - gas_constant_water_vapor - ideal gas constant for water vapor - J kg-1 K-1 - con_rv - real - - in - F - MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run - - - gas_constant_dry_air - ideal gas constant for dry air - J kg-1 K-1 - con_rd - real - - in - F - MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run - - - pi - ratio of a circle's circumference to its diameter - radians - con_pi - real - - in - F - MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run - - - ratio_of_vapor_to_dry_air_gas_constants_minus_one - (rv/rd) - 1 (rv = ideal gas constant for water vapor) - none - con_fvirt - real - - in - F - MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run - - - ice_water_mixing_ratio_updated_by_physics - moist (dry+vapor, no condensates) mixing ratio of ice water updated by physics - kg kg-1 - gq0_cloud_ice - real - (:,:) - in - F - MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run - - - rain_water_mixing_ratio_updated_by_physics - moist (dry+vapor, no condensates) mixing ratio of rain water updated by physics - kg kg-1 - gq0_rain - real - (:,:) - in - F - MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run - - - snow_water_mixing_ratio_updated_by_physics - moist (dry+vapor, no condensates) mixing ratio of snow water updated by physics - kg kg-1 - gq0_snow - real - (:,:) - in - F - MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run - - - graupel_mixing_ratio_updated_by_physics - moist (dry+vapor, no condensates) mixing ratio of graupel updated by physics - kg kg-1 - gq0_graupel - real - (:,:) - in - F - MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run - - - time_step_for_physics - time step for physics - s - dtp - real - - in - F - MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run - - - mpi_rank - current MPI-rank - index - me - integer - - in - F - MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run - - - air_pressure - mean layer pressure - Pa - prsl - real - (:,:) - in - F - MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run - - - geopotential_at_interface - geopotential at model layer interfaces - m2 s-2 - phii - real - (:,:) - in - F - MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run - - - geopotential - geopotential at model layer centers - m2 s-2 - phil - real - (:,:) - in - F - MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run - - - x_wind_updated_by_physics - zonal wind updated by physics - m s-1 - u - real - (:,:) - in - F - MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run - - - y_wind_updated_by_physics - meridional wind updated by physics - m s-1 - v - real - (:,:) - in - F - MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run - - - omega - layer mean vertical velocity - Pa s-1 - omega - real - (:,:) - in - F - MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run - - - critical_relative_humidity - critical relative humidity - frac - rhc - real - (:,:) - in - F - MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run - - - ice_supersaturation_threshold - ice supersaturation parameter for PDF clouds - none - supice - real - - in - F - MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run - - - shoc_tke_dissipatation_pressure_threshold - pressure below which extra TKE diss. is applied in SHOC - Pa - pcrit - real - - in - F - MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run - - - shoc_tke_dissipation_tunable_parameter - mult. tuning parameter for TKE diss. in SHOC - none - cefac - real - - in - F - MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run - - - shoc_tke_dissipation_tunable_parameter_near_surface - mult. tuning parameter for TKE diss. at surface in SHOC - none - cesfac - real - - in - F - MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run - - - shoc_implicit_TKE_integration_uncentering_term - uncentering term for TKE integration in SHOC - none - tkef1 - real - - in - F - MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run - - - shoc_flag_for_optional_surface_TKE_dissipation - flag for alt. TKE diss. near surface in SHOC (>0 = ON) - none - dis_opt - real - - in - F - MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run - - - kinematic_surface_upward_sensible_heat_flux - kinematic surface upward sensible heat flux - K m s-1 - hflx - real - (:) - in - F - MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run - - - kinematic_surface_upward_latent_heat_flux - kinematic surface upward latent heat flux - kg kg-1 m s-1 - evap - real - (:) - in - F - MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run - - - prandtl_number - turbulent Prandtl number - none - prnum - real - (:,:) - in - F - MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run - - - flag_skip_macro - flag to skip cloud macrophysics in Morrison scheme - flag - skip_macro - logical - - inout - F - MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run - - - ice_water_mixing_ratio_convective_transport_tracer - moist (dry+vapor, no condensates) mixing ratio of ice water in the convectively transported tracer array - kg kg-1 - clw_ice - real - (:,:) - inout - F - MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run - - - cloud_condensed_water_mixing_ratio_convective_transport_tracer - moist (dry+vapor, no condensates) mixing ratio of cloud water (condensate) in the convectively transported tracer array - kg kg-1 - clw_liquid - real - (:,:) - inout - F - MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run - - - cloud_condensed_water_mixing_ratio_updated_by_physics - moist (dry+vapor, no condensates) mixing ratio of cloud condensed water updated by physics - kg kg-1 - gq0_cloud_liquid - real - (:,:) - inout - F - MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run - - - cloud_droplet_number_concentration_updated_by_physics - number concentration of cloud droplets updated by physics - kg-1 - ncpl - real - (:,:) - inout - F - MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run - - - ice_number_concentration_updated_by_physics - number concentration of ice updated by physics - kg-1 - ncpi - real - (:,:) - inout - F - MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run - - - air_temperature_updated_by_physics - temperature updated by physics - K - gt0 - real - (:,:) - inout - F - MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run - - - water_vapor_specific_humidity_updated_by_physics - water vapor specific humidity updated by physics - kg kg-1 - gq0_water_vapor - real - (:,:) - inout - F - MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run - - - subgrid_scale_cloud_fraction_from_shoc - subgrid-scale cloud fraction from the SHOC scheme - frac - cld_sgs - real - (:,:) - inout - F - MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run - - - turbulent_kinetic_energy_convective_transport_tracer - turbulent kinetic energy in the convectively transported tracer array - m2 s-2 - tke - real - (:,:) - inout - F - MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run - - - atmosphere_heat_diffusivity_from_shoc - diffusivity for heat from the SHOC scheme - m2 s-1 - tkh - real - (:,:) - inout - F - MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run - - - kinematic_buoyancy_flux_from_shoc - upward kinematic buoyancy flux from the SHOC scheme - K m s-1 - wthv_sec - real - (:,:) - inout - F - MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_shoc SCHEME_shoc SUBROUTINE_shoc_run - - - diff --git a/physics/zhaocarr_gscond.xml b/physics/zhaocarr_gscond.xml deleted file mode 100644 index 22b925fc7..000000000 --- a/physics/zhaocarr_gscond.xml +++ /dev/null @@ -1,260 +0,0 @@ - - - - - - horizontal_loop_extent - horizontal loop extent - count - im - integer - - in - F - MODULE_zhaocarr_gscond SCHEME_zhaocarr_gscond SUBROUTINE_zhaocarr_gscond_run - - - horizontal_dimension - horizontal dimension - count - ix - integer - - in - F - MODULE_zhaocarr_gscond SCHEME_zhaocarr_gscond SUBROUTINE_zhaocarr_gscond_run - - - vertical_dimension - vertical layer dimension - count - km - integer - - in - F - MODULE_zhaocarr_gscond SCHEME_zhaocarr_gscond SUBROUTINE_zhaocarr_gscond_run - - - time_step_for_physics - physics time step - s - dt - real - - in - F - MODULE_zhaocarr_gscond SCHEME_zhaocarr_gscond SUBROUTINE_zhaocarr_gscond_run - - - time_step_for_dynamics - dynamics time step - s - dtf - real - - in - F - MODULE_zhaocarr_gscond SCHEME_zhaocarr_gscond SUBROUTINE_zhaocarr_gscond_run - - - air_pressure - layer mean air pressure - Pa - prsl - real - (:,:) - in - F - MODULE_zhaocarr_gscond SCHEME_zhaocarr_gscond SUBROUTINE_zhaocarr_gscond_run - - - surface_air_pressure - surface pressure - Pa - ps - real - (:) - in - F - MODULE_zhaocarr_gscond SCHEME_zhaocarr_gscond SUBROUTINE_zhaocarr_gscond_run - - - water_vapor_specific_humidity_updated_by_physics - water vapor specific humidity - kg kg-1 - q - real - (:,:) - inout - F - MODULE_zhaocarr_gscond SCHEME_zhaocarr_gscond SUBROUTINE_zhaocarr_gscond_run - - - ice_water_mixing_ratio_convective_transport_tracer - moist (dry+vapor, no condensates) mixing ratio of ice water in the convectively transported tracer array - kg kg-1 - clw1 - real - (:,:) - in - F - MODULE_zhaocarr_gscond SCHEME_zhaocarr_gscond SUBROUTINE_zhaocarr_gscond_run - - - cloud_condensed_water_mixing_ratio_convective_transport_tracer - moist (dry+vapor, no condensates) mixing ratio of cloud water (condensate) in the convectively transported tracer array - kg kg-1 - clw2 - real - (:,:) - in - F - MODULE_zhaocarr_gscond SCHEME_zhaocarr_gscond SUBROUTINE_zhaocarr_gscond_run - - - cloud_condensed_water_mixing_ratio_updated_by_physics - moist cloud condensed water mixing ratio - kg kg-1 - cwm - real - (:,:) - out - F - MODULE_zhaocarr_gscond SCHEME_zhaocarr_gscond SUBROUTINE_zhaocarr_gscond_run - - - air_temperature_updated_by_physics - layer mean air temperature - K - t - real - (:,:) - inout - F - MODULE_zhaocarr_gscond SCHEME_zhaocarr_gscond SUBROUTINE_zhaocarr_gscond_run - - - air_temperature_two_time_steps_back - air temperature two time steps back - K - tp - real - (:,:) - inout - F - MODULE_zhaocarr_gscond SCHEME_zhaocarr_gscond SUBROUTINE_zhaocarr_gscond_run - - - water_vapor_specific_humidity_two_time_steps_back - water vapor specific humidity two time steps back - kg kg-1 - qp - real - (:,:) - inout - F - MODULE_zhaocarr_gscond SCHEME_zhaocarr_gscond SUBROUTINE_zhaocarr_gscond_run - - - surface_air_pressure_two_time_steps_back - surface air pressure two time steps back - Pa - psp - real - (:) - inout - F - MODULE_zhaocarr_gscond SCHEME_zhaocarr_gscond SUBROUTINE_zhaocarr_gscond_run - - - air_temperature_at_previous_time_step - air temperature at previous time step - K - tp1 - real - (:,:) - inout - F - MODULE_zhaocarr_gscond SCHEME_zhaocarr_gscond SUBROUTINE_zhaocarr_gscond_run - - - water_vapor_specific_humidity_at_previous_time_step - water vapor specific humidity at previous time step - kg kg-1 - qp1 - real - (:,:) - inout - F - MODULE_zhaocarr_gscond SCHEME_zhaocarr_gscond SUBROUTINE_zhaocarr_gscond_run - - - surface_air_pressure_at_previous_time_step - surface air surface pressure at previous time step - Pa - psp1 - real - (:) - inout - F - MODULE_zhaocarr_gscond SCHEME_zhaocarr_gscond SUBROUTINE_zhaocarr_gscond_run - - - critical_relative_humidity - critical relative humidity - frac - u - real - (:,:) - in - F - MODULE_zhaocarr_gscond SCHEME_zhaocarr_gscond SUBROUTINE_zhaocarr_gscond_run - - - flag_print - flag for printing diagnostics to output - flag - lprnt - logical - - in - F - MODULE_zhaocarr_gscond SCHEME_zhaocarr_gscond SUBROUTINE_zhaocarr_gscond_run - - - horizontal_index_of_printed_column - horizontal index of printed column - index - ipr - integer - - in - F - MODULE_zhaocarr_gscond SCHEME_zhaocarr_gscond SUBROUTINE_zhaocarr_gscond_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_zhaocarr_gscond SCHEME_zhaocarr_gscond SUBROUTINE_zhaocarr_gscond_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_zhaocarr_gscond SCHEME_zhaocarr_gscond SUBROUTINE_zhaocarr_gscond_run - - - - diff --git a/physics/zhaocarr_precpd.xml b/physics/zhaocarr_precpd.xml deleted file mode 100644 index 925b7da4f..000000000 --- a/physics/zhaocarr_precpd.xml +++ /dev/null @@ -1,249 +0,0 @@ - - - - - - - horizontal_loop_extent - horizontal loop extent - count - im - integer - - in - F - MODULE_zhaocarr_precpd SCHEME_zhaocarr_precpd SUBROUTINE_zhaocarr_precpd_run - - - horizontal_dimension - horizontal dimension - count - ix - integer - - in - F - MODULE_zhaocarr_precpd SCHEME_zhaocarr_precpd SUBROUTINE_zhaocarr_precpd_run - - - vertical_dimension - vertical layer dimension - count - km - integer - - in - F - MODULE_zhaocarr_precpd SCHEME_zhaocarr_precpd SUBROUTINE_zhaocarr_precpd_run - - - time_step_for_physics - physics time step - s - dt - real - - in - F - MODULE_zhaocarr_precpd SCHEME_zhaocarr_precpd SUBROUTINE_zhaocarr_precpd_run - - - air_pressure_difference_between_midlayers - pressure level thickness - Pa - del - real - (:,:) - in - F - MODULE_zhaocarr_precpd SCHEME_zhaocarr_precpd SUBROUTINE_zhaocarr_precpd_run - - - air_pressure - layer mean pressure - Pa - prsl - real - (:,:) - in - F - MODULE_zhaocarr_precpd SCHEME_zhaocarr_precpd SUBROUTINE_zhaocarr_precpd_run - - - water_vapor_specific_humidity_updated_by_physics - water vapor specific humidity - kg kg-1 - q - real - (:,:) - inout - F - MODULE_zhaocarr_precpd SCHEME_zhaocarr_precpd SUBROUTINE_zhaocarr_precpd_run - - - cloud_condensed_water_mixing_ratio_updated_by_physics - moist cloud condensed water mixing ratio - kg kg-1 - cwm - real - (:,:) - inout - F - MODULE_zhaocarr_precpd SCHEME_zhaocarr_precpd SUBROUTINE_zhaocarr_precpd_run - - - air_temperature_updated_by_physics - layer mean air temperature - K - t - real - (:,:) - inout - F - MODULE_zhaocarr_precpd SCHEME_zhaocarr_precpd SUBROUTINE_zhaocarr_precpd_run - - - lwe_thickness_of_explicit_precipitation_amount - explicit precipitation amount on physics timestep - m - rn - real - (:) - out - F - MODULE_zhaocarr_precpd SCHEME_zhaocarr_precpd SUBROUTINE_zhaocarr_precpd_run - - - ratio_of_snowfall_to_rainfall - ratio of snowfall to large-scale rainfall - frac - sr - real - (:) - out - F - MODULE_zhaocarr_precpd SCHEME_zhaocarr_precpd SUBROUTINE_zhaocarr_precpd_run - - - tendency_of_rain_water_mixing_ratio_due_to_microphysics - tendency of rain water mixing ratio due to microphysics - kg kg-1 s-1 - rainp - real - (:,:) - out - F - MODULE_zhaocarr_precpd SCHEME_zhaocarr_precpd SUBROUTINE_zhaocarr_precpd_run - - - critical_relative_humidity - critical relative humidity - frac - u00k - real - (:,:) - in - F - MODULE_zhaocarr_precpd SCHEME_zhaocarr_precpd SUBROUTINE_zhaocarr_precpd_run - - - coefficient_from_cloud_ice_to_snow - conversion coefficient from cloud ice to snow - none - psautco - real - (:) - in - F - MODULE_zhaocarr_precpd SCHEME_zhaocarr_precpd SUBROUTINE_zhaocarr_precpd_run - - - coefficient_from_cloud_water_to_rain - conversion coefficient from cloud water to rain - none - prautco - real - (:) - in - F - MODULE_zhaocarr_precpd SCHEME_zhaocarr_precpd SUBROUTINE_zhaocarr_precpd_run - - - coefficient_for_evaporation_of_rainfall - coefficient for evaporation of rainfall - none - evpco - real - - in - F - MODULE_zhaocarr_precpd SCHEME_zhaocarr_precpd SUBROUTINE_zhaocarr_precpd_run - - - cloud_condensed_water_conversion_threshold - conversion coefficient from cloud liquid and ice to precipitation - none - wminco - real - (:) - in - F - MODULE_zhaocarr_precpd SCHEME_zhaocarr_precpd SUBROUTINE_zhaocarr_precpd_run - - - grid_size_related_coefficient_used_in_scale-sensitive_schemes - grid size related coefficient used in scale-sensitive schemes - none - wk1 - real - (:) - in - F - MODULE_zhaocarr_precpd SCHEME_zhaocarr_precpd SUBROUTINE_zhaocarr_precpd_run - - - flag_print - flag for printing diagnostics to output - flag - lprnt - logical - - in - F - MODULE_zhaocarr_precpd SCHEME_zhaocarr_precpd SUBROUTINE_zhaocarr_precpd_run - - - horizontal_index_of_printed_column - horizontal index of printed column - index - jpr - integer - - in - F - MODULE_zhaocarr_precpd SCHEME_zhaocarr_precpd SUBROUTINE_zhaocarr_precpd_run - - - ccpp_error_message - error message for error handling in CCPP - none - errmsg - character - - out - F - MODULE_zhaocarr_precpd SCHEME_zhaocarr_precpd SUBROUTINE_zhaocarr_precpd_run - - - ccpp_error_flag - error flag for error handling in CCPP - flag - errflg - integer - - out - F - MODULE_zhaocarr_precpd SCHEME_zhaocarr_precpd SUBROUTINE_zhaocarr_precpd_run - - - From 52cb3a0c664485a650a14bce9bb70b390cbb9c14 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Fri, 7 Jun 2019 11:33:25 -0600 Subject: [PATCH 036/167] Fixed potential issue in Thompson MP scheme. Cleaned up a tad. --- physics/GFS_rrtmgp_post.F90 | 70 +++++++++---------- physics/GFS_rrtmgp_pre.F90 | 129 ++++++++++++++++++------------------ physics/radiation_clouds.f | 6 +- 3 files changed, 104 insertions(+), 101 deletions(-) diff --git a/physics/GFS_rrtmgp_post.F90 b/physics/GFS_rrtmgp_post.F90 index 35c3439ef..65ec81d32 100644 --- a/physics/GFS_rrtmgp_post.F90 +++ b/physics/GFS_rrtmgp_post.F90 @@ -27,30 +27,30 @@ subroutine GFS_rrtmgp_post_init () end subroutine GFS_rrtmgp_post_init !> \section arg_table_GFS_rrtmgp_post_run Argument Table -!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | -!! |-------------------|------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------|----------|------|----------------------|-----------|--------|----------| -!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | -!! | Grid | GFS_grid_type_instance | Fortran DDT containing FV3-GFS grid and interpolation related data | DDT | 0 | GFS_grid_type | | in | F | -!! | Diag | GFS_diag_type_instance | Fortran DDT containing FV3-GFS diagnotics data | DDT | 0 | GFS_diag_type | | inout | F | -!! | Radtend | GFS_radtend_type_instance | Fortran DDT containing FV3-GFS radiation tendencies | DDT | 0 | GFS_radtend_type | | inout | F | -!! | Statein | GFS_statein_type_instance | Fortran DDT containing FV3-GFS prognostic state data in from dycore | DDT | 0 | GFS_statein_type | | in | F | -!! | Coupling | GFS_coupling_type_instance | Fortran DDT containing FV3-GFS fields to/from coupling with other components | DDT | 0 | GFS_coupling_type | | inout | F | -!! | scmpsw | components_of_surface_downward_shortwave_fluxes | derived type for special components of surface downward shortwave fluxes | W m-2 | 1 | cmpfsw_type | | inout | T | -!! | im | horizontal_loop_extent | horizontal loop extent | count | 0 | integer | | in | F | -!! | raddt | time_step_for_radiation | radiation time step | s | 0 | real | kind_phys | in | F | -!! | aerodp | atmosphere_optical_thickness_due_to_ambient_aerosol_particles | vertical integrated optical depth for various aerosol species | none | 2 | real | kind_phys | in | F | -!! | cldsa | cloud_area_fraction_for_radiation | fraction of clouds for low, middle, high, total and BL | frac | 2 | real | kind_phys | in | F | -!! | mtopa | model_layer_number_at_cloud_top | vertical indices for low, middle and high cloud tops | index | 2 | integer | | in | F | -!! | mbota | model_layer_number_at_cloud_base | vertical indices for low, middle and high cloud bases | index | 2 | integer | | in | F | -!! | cloud_fraction | total_cloud_fraction | layer total cloud fraction | frac | 2 | real | kind_phys | in | F | -!! | cldtaulw | cloud_optical_depth_layers_at_10mu_band | approx 10mu band layer cloud optical depth | none | 2 | real | kind_phys | in | F | -!! | cldtausw | cloud_optical_depth_layers_at_0.55mu_band | approx .55mu band layer cloud optical depth | none | 2 | real | kind_phys | in | F | -!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | -!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | +!! |----------------|---------------------------------------------------------------|------------------------------------------------------------------------------|----------|------|-------------------|-----------|--------|----------| +!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | +!! | Grid | GFS_grid_type_instance | Fortran DDT containing FV3-GFS grid and interpolation related data | DDT | 0 | GFS_grid_type | | in | F | +!! | Diag | GFS_diag_type_instance | Fortran DDT containing FV3-GFS diagnotics data | DDT | 0 | GFS_diag_type | | inout | F | +!! | Radtend | GFS_radtend_type_instance | Fortran DDT containing FV3-GFS radiation tendencies | DDT | 0 | GFS_radtend_type | | inout | F | +!! | Statein | GFS_statein_type_instance | Fortran DDT containing FV3-GFS prognostic state data in from dycore | DDT | 0 | GFS_statein_type | | in | F | +!! | Coupling | GFS_coupling_type_instance | Fortran DDT containing FV3-GFS fields to/from coupling with other components | DDT | 0 | GFS_coupling_type | | inout | F | +!! | scmpsw | components_of_surface_downward_shortwave_fluxes | derived type for special components of surface downward shortwave fluxes | W m-2 | 1 | cmpfsw_type | | inout | T | +!! | ncol | horizontal_loop_extent | horizontal loop extent | count | 0 | integer | | in | F | +!! | raddt | time_step_for_radiation | radiation time step | s | 0 | real | kind_phys | in | F | +!! | aerodp | atmosphere_optical_thickness_due_to_ambient_aerosol_particles | vertical integrated optical depth for various aerosol species | none | 2 | real | kind_phys | in | F | +!! | cldsa | cloud_area_fraction_for_radiation | fraction of clouds for low, middle, high, total and BL | frac | 2 | real | kind_phys | in | F | +!! | mtopa | model_layer_number_at_cloud_top | vertical indices for low, middle and high cloud tops | index | 2 | integer | | in | F | +!! | mbota | model_layer_number_at_cloud_base | vertical indices for low, middle and high cloud bases | index | 2 | integer | | in | F | +!! | cloud_fraction | total_cloud_fraction | layer total cloud fraction | frac | 2 | real | kind_phys | in | F | +!! | cldtaulw | cloud_optical_depth_layers_at_10mu_band | approx 10mu band layer cloud optical depth | none | 2 | real | kind_phys | in | F | +!! | cldtausw | cloud_optical_depth_layers_at_0.55mu_band | approx .55mu band layer cloud optical depth | none | 2 | real | kind_phys | in | F | +!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | +!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | !! - subroutine GFS_rrtmgp_post_run (Model, Grid, Diag, Radtend, Statein, & - Coupling, scmpsw, im, raddt, aerodp, & - cldsa, mtopa, mbota, cloud_fraction, cldtaulw, cldtausw, errmsg, errflg) + subroutine GFS_rrtmgp_post_run (Model, Grid, Diag, Radtend, Statein, Coupling, scmpsw, & + ncol, raddt, aerodp, cldsa, mtopa, mbota, cloud_fraction, cldtaulw, cldtausw, & + errmsg, errflg) ! Inputs type(GFS_control_type), intent(in) :: & @@ -66,22 +66,22 @@ subroutine GFS_rrtmgp_post_run (Model, Grid, Diag, Radtend, Statein, & type(GFS_diag_type), intent(inout) :: & Diag ! Fortran DDT containing FV3-GFS diagnotics data integer, intent(in) :: & - im ! Horizontal loop extent + ncol ! Horizontal loop extent real(kind_phys), intent(in) :: & raddt ! Radiation time step - real(kind_phys), dimension(size(Grid%xlon,1),NSPC1), intent(in) :: & + real(kind_phys), dimension(ncol,NSPC1), intent(in) :: & aerodp ! Vertical integrated optical depth for various aerosol species - real(kind_phys), dimension(size(Grid%xlon,1),5), intent(in) :: & + real(kind_phys), dimension(ncol,5), intent(in) :: & cldsa ! Fraction of clouds for low, middle, high, total and BL - integer, dimension(size(Grid%xlon,1),3), intent(in) ::& + integer, dimension(ncol,3), intent(in) ::& mbota, & ! vertical indices for low, middle and high cloud tops mtopa ! vertical indices for low, middle and high cloud bases - real(kind_phys), dimension(size(Grid%xlon,1),Model%levs), intent(in) :: & + real(kind_phys), dimension(ncol,Model%levs), intent(in) :: & cloud_fraction, & ! Total cloud fraction in each layer cldtausw, & ! approx .55mu band layer cloud optical depth cldtaulw ! approx 10.mu band layer cloud optical depth ! Inputs (optional) - type(cmpfsw_type), dimension(size(Grid%xlon,1)), intent(inout), optional :: & + type(cmpfsw_type), dimension(ncol), intent(inout), optional :: & scmpsw ! 2D surface fluxes, components: ! uvbfc - total sky downward uv-b flux at (W/m2) ! uvbf0 - clear sky downward uv-b flux at (W/m2) @@ -119,7 +119,7 @@ subroutine GFS_rrtmgp_post_run (Model, Grid, Diag, Radtend, Statein, & if (Model%lssav) then if (Model%lsswr) then - do i=1,im + do i=1,ncol Diag%fluxr(i,34) = Diag%fluxr(i,34) + Model%fhswr*aerodp(i,1) ! total aod at 550nm Diag%fluxr(i,35) = Diag%fluxr(i,35) + Model%fhswr*aerodp(i,2) ! DU aod at 550nm Diag%fluxr(i,36) = Diag%fluxr(i,36) + Model%fhswr*aerodp(i,3) ! BC aod at 550nm @@ -131,7 +131,7 @@ subroutine GFS_rrtmgp_post_run (Model, Grid, Diag, Radtend, Statein, & ! Save LW TOA and SFC fluxes if (Model%lslwr) then - do i=1,im + do i=1,ncol ! LW all-sky fluxes Diag%fluxr(i,1 ) = Diag%fluxr(i,1 ) + Model%fhlwr * Diag%topflw(i)%upfxc ! total sky top lw up Diag%fluxr(i,19) = Diag%fluxr(i,19) + Model%fhlwr * Radtend%sfcflw(i)%dnfxc ! total sky sfc lw dn @@ -146,7 +146,7 @@ subroutine GFS_rrtmgp_post_run (Model, Grid, Diag, Radtend, Statein, & ! Save sw toa and sfc fluxes with proper diurnal sw wgt. coszen=mean cosz over daylight ! part of sw calling interval, while coszdg= mean cosz over entire interval if (Model%lsswr) then - do i = 1, IM + do i = 1, NCOL if (Radtend%coszen(i) > 0.) then ! SW all-sky fluxes tem0d = Model%fhswr * Radtend%coszdg(i) / Radtend%coszen(i) @@ -174,7 +174,7 @@ subroutine GFS_rrtmgp_post_run (Model, Grid, Diag, Radtend, Statein, & ! --- save total and boundary layer clouds if (Model%lsswr .or. Model%lslwr) then - do i=1,im + do i=1,ncol Diag%fluxr(i,17) = Diag%fluxr(i,17) + raddt * cldsa(i,4) Diag%fluxr(i,18) = Diag%fluxr(i,18) + raddt * cldsa(i,5) enddo @@ -184,7 +184,7 @@ subroutine GFS_rrtmgp_post_run (Model, Grid, Diag, Radtend, Statein, & ! --- save interface pressure (pa) of top/bot do j = 1, 3 - do i = 1, IM + do i = 1, NCOL tem0d = raddt * cldsa(i,j) itop = mtopa(i,j) ibtc = mbota(i,j) @@ -209,7 +209,7 @@ subroutine GFS_rrtmgp_post_run (Model, Grid, Diag, Radtend, Statein, & ! if (.not. Model%uni_cld) then if (Model%lgocart .or. Model%ldiag3d) then do k = 1, Model%levs - Coupling%cldcovi(1:im,k) = cloud_fraction(1:im,k) + Coupling%cldcovi(1:ncol,k) = cloud_fraction(1:ncol,k) enddo endif endif ! end_if_lssav diff --git a/physics/GFS_rrtmgp_pre.F90 b/physics/GFS_rrtmgp_pre.F90 index 37783e70e..69b1eb5ce 100644 --- a/physics/GFS_rrtmgp_pre.F90 +++ b/physics/GFS_rrtmgp_pre.F90 @@ -71,50 +71,54 @@ subroutine GFS_rrtmgp_pre_init () end subroutine GFS_rrtmgp_pre_init !> \section arg_table_GFS_rrtmgp_pre_run Argument Table -!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | -!! |--------------------|-------------------------------------------------------------|-------------------------------------------------------------------------------|----------|------|-----------------------|-----------|--------|----------| -!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | -!! | Grid | GFS_grid_type_instance | Fortran DDT containing FV3-GFS grid and interpolation related data | DDT | 0 | GFS_grid_type | | in | F | -!! | Sfcprop | GFS_sfcprop_type_instance | Fortran DDT containing FV3-GFS surface fields | DDT | 0 | GFS_sfcprop_type | | in | F | -!! | Statein | GFS_statein_type_instance | Fortran DDT containing FV3-GFS prognostic state data in from dycore | DDT | 0 | GFS_statein_type | | in | F | -!! | Tbd | GFS_tbd_type_instance | Fortran DDT containing FV3-GFS data not yet assigned to a defined container | DDT | 0 | GFS_tbd_type | | in | F | -!! | Coupling | GFS_coupling_type_instance | Fortran DDT containing FV3-GFS fields needed for coupling | DDT | 0 | GFS_coupling_type | | in | F | -!! | Radtend | GFS_radtend_type_instance | Fortran DDT containing FV3-GFS radiation tendencies | DDT | 0 | GFS_radtend_type | | inout | F | -!! | ncol | horizontal_loop_extent | horizontal loop extent | count | 0 | integer | | in | F | -!! | lw_gas_props | coefficients_for_lw_gas_optics | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | -!! | sw_gas_props | coefficients_for_sw_gas_optics | DDT containing spectral information for RRTMGP SW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | -!! | raddt | time_step_for_radiation | radiation time step | s | 0 | real | kind_phys | out | F | -!! | p_lay | air_pressure_at_layer_for_RRTMGP_in_hPa | air pressure at vertical layer for radiation calculation | hPa | 2 | real | kind_phys | out | F | -!! | p_lev | air_pressure_at_interface_for_RRTMGP_in_hPa | air pressure at vertical interface for radiation calculation | hPa | 2 | real | kind_phys | out | F | -!! | t_lay | air_temperature_at_layer_for_RRTMGP | air temperature at vertical layer for radiation calculation | K | 2 | real | kind_phys | out | F | -!! | t_lev | air_temperature_at_interface_for_RRTMGP | air temperature at vertical interface for radiation calculation | K | 2 | real | kind_phys | out | F | -!! | tsfg | surface_ground_temperature_for_radiation | surface ground temperature for radiation | K | 1 | real | kind_phys | out | F | -!! | tsfa | surface_air_temperature_for_radiation | lowest model layer air temperature for radiation | K | 1 | real | kind_phys | out | F | -!! | cld_frac | total_cloud_fraction | layer total cloud fraction | frac | 2 | real | kind_phys | out | F | -!! | cld_lwp | cloud_liquid_water_path | layer cloud liquid water path | g m-2 | 2 | real | kind_phys | out | F | -!! | cld_reliq | mean_effective_radius_for_liquid_cloud | mean effective radius for liquid cloud | micron | 2 | real | kind_phys | out | F | -!! | cld_iwp | cloud_ice_water_path | layer cloud ice water path | g m-2 | 2 | real | kind_phys | out | F | -!! | cld_reice | mean_effective_radius_for_ice_cloud | mean effective radius for ice cloud | micron | 2 | real | kind_phys | out | F | -!! | cld_swp | cloud_snow_water_path | layer cloud snow water path | g m-2 | 2 | real | kind_phys | out | F | -!! | cld_resnow | mean_effective_radius_for_snow_flake | mean effective radius for snow cloud | micron | 2 | real | kind_phys | out | F | -!! | cld_rwp | cloud_rain_water_path | layer cloud rain water path | g m-2 | 2 | real | kind_phys | out | F | -!! | cld_rerain | mean_effective_radius_for_rain_drop | mean effective radius for rain cloud | micron | 2 | real | kind_phys | out | F | -!! | faerlw | aerosol_optical_properties_for_longwave_bands_01-16 | aerosol optical properties for longwave bands 01-16 | various | 4 | real | kind_phys | out | F | -!! | faersw | aerosol_optical_properties_for_shortwave_bands_01-16 | aerosol optical properties for shortwave bands 01-16 | various | 4 | real | kind_phys | out | F | -!! | alb1d | surface_albedo_perturbation | surface albedo perturbation | frac | 1 | real | kind_phys | out | F | -!! | gas_concentrations | Gas_concentrations_for_RRTMGP_suite | DDT containing gas concentrations for RRTMGP radiation scheme | DDT | 0 | ty_gas_concs | | out | F | -!! | nday | daytime_points_dimension | daytime points dimension | count | 0 | integer | | out | F | -!! | idxday | daytime_points | daytime points | index | 1 | integer | | out | F | -!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | -!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | +!! |--------------------|---------------------------------------------------------------|-------------------------------------------------------------------------------|----------|------|-----------------------|-----------|--------|----------| +!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | +!! | Grid | GFS_grid_type_instance | Fortran DDT containing FV3-GFS grid and interpolation related data | DDT | 0 | GFS_grid_type | | in | F | +!! | Sfcprop | GFS_sfcprop_type_instance | Fortran DDT containing FV3-GFS surface fields | DDT | 0 | GFS_sfcprop_type | | in | F | +!! | Statein | GFS_statein_type_instance | Fortran DDT containing FV3-GFS prognostic state data in from dycore | DDT | 0 | GFS_statein_type | | in | F | +!! | Tbd | GFS_tbd_type_instance | Fortran DDT containing FV3-GFS data not yet assigned to a defined container | DDT | 0 | GFS_tbd_type | | in | F | +!! | Coupling | GFS_coupling_type_instance | Fortran DDT containing FV3-GFS fields needed for coupling | DDT | 0 | GFS_coupling_type | | in | F | +!! | Radtend | GFS_radtend_type_instance | Fortran DDT containing FV3-GFS radiation tendencies | DDT | 0 | GFS_radtend_type | | inout | F | +!! | ncol | horizontal_loop_extent | horizontal loop extent | count | 0 | integer | | in | F | +!! | lw_gas_props | coefficients_for_lw_gas_optics | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | +!! | sw_gas_props | coefficients_for_sw_gas_optics | DDT containing spectral information for RRTMGP SW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | +!! | raddt | time_step_for_radiation | radiation time step | s | 0 | real | kind_phys | out | F | +!! | p_lay | air_pressure_at_layer_for_RRTMGP_in_hPa | air pressure at vertical layer for radiation calculation | hPa | 2 | real | kind_phys | out | F | +!! | p_lev | air_pressure_at_interface_for_RRTMGP_in_hPa | air pressure at vertical interface for radiation calculation | hPa | 2 | real | kind_phys | out | F | +!! | t_lay | air_temperature_at_layer_for_RRTMGP | air temperature at vertical layer for radiation calculation | K | 2 | real | kind_phys | out | F | +!! | t_lev | air_temperature_at_interface_for_RRTMGP | air temperature at vertical interface for radiation calculation | K | 2 | real | kind_phys | out | F | +!! | tsfg | surface_ground_temperature_for_radiation | surface ground temperature for radiation | K | 1 | real | kind_phys | out | F | +!! | tsfa | surface_air_temperature_for_radiation | lowest model layer air temperature for radiation | K | 1 | real | kind_phys | out | F | +!! | cld_frac | total_cloud_fraction | layer total cloud fraction | frac | 2 | real | kind_phys | out | F | +!! | cld_lwp | cloud_liquid_water_path | layer cloud liquid water path | g m-2 | 2 | real | kind_phys | out | F | +!! | cld_reliq | mean_effective_radius_for_liquid_cloud | mean effective radius for liquid cloud | micron | 2 | real | kind_phys | out | F | +!! | cld_iwp | cloud_ice_water_path | layer cloud ice water path | g m-2 | 2 | real | kind_phys | out | F | +!! | cld_reice | mean_effective_radius_for_ice_cloud | mean effective radius for ice cloud | micron | 2 | real | kind_phys | out | F | +!! | cld_swp | cloud_snow_water_path | layer cloud snow water path | g m-2 | 2 | real | kind_phys | out | F | +!! | cld_resnow | mean_effective_radius_for_snow_flake | mean effective radius for snow cloud | micron | 2 | real | kind_phys | out | F | +!! | cld_rwp | cloud_rain_water_path | layer cloud rain water path | g m-2 | 2 | real | kind_phys | out | F | +!! | cld_rerain | mean_effective_radius_for_rain_drop | mean effective radius for rain cloud | micron | 2 | real | kind_phys | out | F | +!! | faerlw | aerosol_optical_properties_for_longwave_bands_01-16 | aerosol optical properties for longwave bands 01-16 | various | 4 | real | kind_phys | out | F | +!! | faersw | aerosol_optical_properties_for_shortwave_bands_01-16 | aerosol optical properties for shortwave bands 01-16 | various | 4 | real | kind_phys | out | F | +!! | mtopa | model_layer_number_at_cloud_top | vertical indices for low, middle and high cloud tops | index | 2 | integer | | out | F | +!! | mbota | model_layer_number_at_cloud_base | vertical indices for low, middle and high cloud bases | index | 2 | integer | | out | F | +!! | cldsa | cloud_area_fraction_for_radiation | fraction of clouds for low, middle, high, total and BL | frac | 2 | real | kind_phys | out | F | +!! | aerodp | atmosphere_optical_thickness_due_to_ambient_aerosol_particles | vertical integrated optical depth for various aerosol species | none | 2 | real | kind_phys | out | F | +!! | alb1d | surface_albedo_perturbation | surface albedo perturbation | frac | 1 | real | kind_phys | out | F | +!! | gas_concentrations | Gas_concentrations_for_RRTMGP_suite | DDT containing gas concentrations for RRTMGP radiation scheme | DDT | 0 | ty_gas_concs | | out | F | +!! | nday | daytime_points_dimension | daytime points dimension | count | 0 | integer | | out | F | +!! | idxday | daytime_points | daytime points | index | 1 | integer | | out | F | +!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | +!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | !! ! Attention - the output arguments lm, im, lmk, lmp must not be set ! in the CCPP version - they are defined in the interstitial_create routine subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, Tbd, & ! IN - ncol, lw_gas_props, sw_gas_props, & ! IN + ncol, lw_gas_props, sw_gas_props, & ! IN raddt, p_lay, t_lay, p_lev, t_lev, tsfg, tsfa, alb1d, cld_frac, cld_lwp, & ! OUT cld_reliq, cld_iwp, cld_reice, cld_swp, cld_resnow, cld_rwp, cld_rerain, faerlw, & ! OUT - faersw, nday, idxday, gas_concentrations, errmsg, errflg) ! OUT + faersw, cldsa, mtopa, mbota, aerodp, nday, idxday, gas_concentrations, errmsg, errflg) ! Inputs type(GFS_control_type), intent(in) :: & @@ -132,23 +136,23 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, type(GFS_tbd_type), intent(in) :: & Tbd ! Fortran DDT containing FV3-GFS data not yet assigned to a defined container integer, intent(in) :: & - ncol ! Number of horizontal grid points + ncol ! Number of horizontal grid points type(ty_gas_optics_rrtmgp),intent(in) :: & - lw_gas_props, & ! RRTMGP DDT containing spectral information for LW calculation - sw_gas_props ! RRTMGP DDT containing spectral information for SW calculation + lw_gas_props, & ! RRTMGP DDT containing spectral information for LW calculation + sw_gas_props ! RRTMGP DDT containing spectral information for SW calculation ! Outputs real(kind_phys), dimension(ncol,Model%levs), intent(out) :: & - p_lay, & ! - t_lay ! + p_lay, & ! Pressure at model-layer + t_lay ! Temperature at model layer real(kind_phys), dimension(ncol,Model%levs+1), intent(out) :: & - p_lev, & ! - t_lev ! + p_lev, & ! Pressure at model-interface + t_lev ! Temperature at model-interface real(kind_phys), intent(out) :: & - raddt ! + raddt ! Radiation time-step real(kind_phys), dimension(ncol), intent(out) :: & - tsfg, & ! - tsfa ! + tsfg, & ! Ground temperature + tsfa ! Skin temperature integer, intent(out) :: & nday ! Number of daylit points integer, dimension(ncol), intent(out) :: & @@ -167,24 +171,28 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, cld_reliq, & ! Cloud liquid effective radius cld_iwp, & ! Cloud ice water path cld_reice, & ! Cloud ice effecive radius - cld_swp, & ! Cloud snow water path - cld_resnow, & ! Cloud snow effective radius - cld_rwp, & ! Cloud rain water path - cld_rerain ! Cloud rain effective radius + cld_swp, & ! Cloud snow water path + cld_resnow, & ! Cloud snow effective radius + cld_rwp, & ! Cloud rain water path + cld_rerain ! Cloud rain effective radius real(kind_phys), dimension(ncol,Model%levs,sw_gas_props%get_nband(),NF_AESW), intent(out) ::& faersw ! Aerosol radiative properties in each SW band. real(kind_phys), dimension(ncol,Model%levs,lw_gas_props%get_nband(),NF_AELW), intent(out) ::& faerlw ! Aerosol radiative properties in each LW band. - + integer,dimension(ncol,3),intent(out) :: & + mbota, & ! Vertical indices for cloud tops + mtopa ! Vertical indices for cloud bases + real(kind_phys), dimension(ncol,5), intent(out) :: & + cldsa ! Fraction of clouds for low, middle, high, total and BL + real(kind_phys), dimension(ncol,NSPC1), intent(out) :: & + aerodp ! Vertical integrated optical depth for various aerosol species + ! Local variables integer :: i, j, k, iCol, iBand, iSFC, iTOA, iLay - integer,dimension(ncol,3) :: mbota,mtopa logical :: top_at_1 real(kind_phys),dimension(NCOL,Model%levs) :: vmr_o3, vmr_h2o real(kind_phys) :: es, qs real(kind_phys), dimension(ncol) :: de_lgth - real(kind_phys), dimension(ncol, 5) :: cldsa - real(kind_phys), dimension(ncol, NSPC1) :: aerodp real(kind_phys), dimension(ncol, NF_ALBD) :: sfcalb real(kind_phys), dimension(ncol, Model%levs) :: relhum, qs_lay, q_lay, deltaZ, tv_lay,& deltaP, o3_lay @@ -547,7 +555,7 @@ subroutine cloud_microphysics(Model, Tbd, Grid, Sfcprop, ncol, tracer, p_lay, t_ enddo endif elseif (Model%imp_physics == Model%imp_physics_gfdl) then ! GFDL MP - ! cldcov(1:NCOL,1:Model%levs) = tracer(1:NCOL,1:Model%levs,Model%ntclamt) + cldcov(1:NCOL,1:Model%levs) = tracer(1:NCOL,1:Model%levs,Model%ntclamt) else ! neither of the other two cases cldcov = 0.0 endif @@ -750,12 +758,7 @@ subroutine cloud_microphysics(Model, Tbd, Grid, Sfcprop, ncol, tracer, p_lay, t_ endif ! *) Thompson / WSM6 cloud micrphysics scheme elseif(Model%imp_physics == 8 .or. Model%imp_physics == 6) then - if (Model%kdt == 1) then - Tbd%phy_f3d(:,:,1) = 10. - Tbd%phy_f3d(:,:,2) = 50. - Tbd%phy_f3d(:,:,3) = 250. - endif - + call progcld5 ( & ! IN p_lay/100., & ! IN - Pressure at model layer centers (mb) p_lev/100., & ! IN - Pressure at model interfaces (mb) diff --git a/physics/radiation_clouds.f b/physics/radiation_clouds.f index 447299706..09b677b29 100644 --- a/physics/radiation_clouds.f +++ b/physics/radiation_clouds.f @@ -2525,10 +2525,10 @@ subroutine progcld5 & cip (i,k) = 0.0 crp (i,k) = 0.0 csp (i,k) = 0.0 - rew (i,k) = re_cloud(i,k) - rei (i,k) = re_ice(i,k) + rew (i,k) = reliq_def ! default liq radius to 10 micron + rei (i,k) = reice_def ! default ice radius to 50 micron rer (i,k) = rrain_def ! default rain radius to 1000 micron - res (i,k) = re_snow(i,K) + res (i,k) = rsnow_def ! tem2d (i,k) = min( 1.0, max( 0.0, (con_ttp-tlyr(i,k))*0.05 ) ) clwf(i,k) = 0.0 enddo From b882dffc9c043973d3809653163b7c8628f3ff8c Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Mon, 10 Jun 2019 17:17:06 -0600 Subject: [PATCH 037/167] Added gas_optics_sw_run() and gas_optics_lw_run() routines. --- physics/GFS_rrtmgp_pre.F90 | 2 +- physics/rrtmgp_lw.F90 | 141 +++++++++-------- physics/rrtmgp_lw_clrallsky_driver.F90 | 151 +++++++++++++++++++ physics/rrtmgp_lw_gas_optics.F90 | 81 +++++++++- physics/rrtmgp_sw.F90 | 100 +++++++----- physics/rrtmgp_sw_clrallsky_driver.F90 | 201 +++++++++++++++++++++++++ physics/rrtmgp_sw_gas_optics.F90 | 76 +++++++++- physics/rte-rrtmgp | 2 +- 8 files changed, 655 insertions(+), 99 deletions(-) create mode 100644 physics/rrtmgp_lw_clrallsky_driver.F90 create mode 100644 physics/rrtmgp_sw_clrallsky_driver.F90 diff --git a/physics/GFS_rrtmgp_pre.F90 b/physics/GFS_rrtmgp_pre.F90 index 69b1eb5ce..1b37044b5 100644 --- a/physics/GFS_rrtmgp_pre.F90 +++ b/physics/GFS_rrtmgp_pre.F90 @@ -283,7 +283,7 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, vmr_h2o = merge((q_lay/(1-q_lay))*amdw, 0., q_lay .ne. 1.) vmr_o3 = merge(o3_lay*amdo3, 0., o3_lay .gt. 0.) ! - call gas_concentrations%reset() + !call gas_concentrations%reset() call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations%set_vmr('o2', gas_vmr(:,:,4))) call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations%set_vmr('co2', gas_vmr(:,:,1))) call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations%set_vmr('ch4', gas_vmr(:,:,3))) diff --git a/physics/rrtmgp_lw.F90 b/physics/rrtmgp_lw.F90 index 9c27d6fa9..5abd2f702 100644 --- a/physics/rrtmgp_lw.F90 +++ b/physics/rrtmgp_lw.F90 @@ -2,14 +2,14 @@ ! ########################################################################################### module rrtmgp_lw use machine, only: kind_phys - use GFS_typedefs, only: GFS_control_type, GFS_radtend_type + use GFS_typedefs, only: GFS_control_type, GFS_radtend_type, GFS_statein_type use mo_rte_kind, only: wl use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp use mo_cloud_optics, only: ty_cloud_optics use mo_optical_props, only: ty_optical_props_1scl - use mo_rrtmgp_clr_all_sky, only: rte_lw - use mo_gas_concentrations, only: ty_gas_concs + use mo_rte_lw, only: rte_lw use mo_fluxes_byband, only: ty_fluxes_byband + use mo_source_functions, only: ty_source_func_lw use rrtmgp_aux, only: check_error_msg public rrtmgp_lw_init, rrtmgp_lw_run, rrtmgp_lw_finalize @@ -25,38 +25,42 @@ end subroutine rrtmgp_lw_init ! SUBROUTINE rrtmgp_lw_run ! ######################################################################################### !! \section arg_table_rrtmgp_lw_run Argument Table -!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | -!! |-------------------------|-----------------------------------------------------------------------------------------------|--------------------------------------------------------------------|-------|------|-----------------------|-----------|--------|----------| -!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | -!! | Radtend | GFS_radtend_type_instance | Fortran DDT containing FV3-GFS radiation tendencies | DDT | 0 | GFS_radtend_type | | in | F | -!! | ncol | horizontal_loop_extent | horizontal dimension | count | 0 | integer | | in | F | -!! | p_lay | air_pressure_at_layer_for_RRTMGP_in_hPa | air pressure layer | hPa | 2 | real | kind_phys | in | F | -!! | p_lev | air_pressure_at_interface_for_RRTMGP_in_hPa | air pressure level | hPa | 2 | real | kind_phys | in | F | -!! | t_lay | air_temperature_at_layer_for_RRTMGP | air temperature layer | K | 2 | real | kind_phys | in | F | -!! | skt | surface_ground_temperature_for_radiation | surface ground temperature for radiation | K | 1 | real | kind_phys | in | F | -!! | lw_gas_props | coefficients_for_lw_gas_optics | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | -!! | optical_propsLW_clds | longwave_optical_properties_for_cloudy_atmosphere | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_1scl | | in | F | -!! | optical_propsLW_aerosol | longwave_optical_properties_for_aerosols | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_1scl | | in | F | -!! | gas_concentrations | Gas_concentrations_for_RRTMGP_suite | DDT containing gas concentrations for RRTMGP radiation scheme | DDT | 0 | ty_gas_concs | | in | F | -!! | lslwr | flag_to_calc_lw | flag to calculate LW irradiances | flag | 0 | logical | | in | F | -!! | hlw0 | tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_time_step | longwave clear sky heating rate | K s-1 | 2 | real | kind_phys | in | T | -!! | hlwb | lw_heating_rate_spectral | longwave total sky heating rate (spectral) | K s-1 | 3 | real | kind_phys | in | T | -!! | fluxUP_allsky | lw_flux_profile_upward_allsky | RRTMGP upward longwave all-sky flux profile | W m-2 | 2 | real | kind_phys | out | F | -!! | fluxDOWN_allsky | lw_flux_profile_downward_allsky | RRTMGP downward longwave all-sky flux profile | W m-2 | 2 | real | kind_phys | out | F | -!! | fluxUP_clrsky | lw_flux_profile_upward_clrsky | RRTMGP upward longwave clr-sky flux profile | W m-2 | 2 | real | kind_phys | out | F | -!! | fluxDOWN_clrsky | lw_flux_profile_downward_clrsky | RRTMGP downward longwave clr-sky flux profile | W m-2 | 2 | real | kind_phys | out | F | -!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | -!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | +!! |-----------------------|-----------------------------------------------------------------------------------------------|---------------------------------------------------------------------|-------|------|-----------------------|-----------|--------|----------| +!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | +!! | Radtend | GFS_radtend_type_instance | Fortran DDT containing FV3-GFS radiation tendencies | DDT | 0 | GFS_radtend_type | | in | F | +!! | Statein | GFS_statein_type_instance | Fortran DDT containing FV3-GFS prognostic state data in from dycore | DDT | 0 | GFS_statein_type | | in | F | +!! | ncol | horizontal_loop_extent | horizontal dimension | count | 0 | integer | | in | F | +!! | p_lay | air_pressure_at_layer_for_RRTMGP_in_hPa | air pressure layer | hPa | 2 | real | kind_phys | in | F | +!! | p_lev | air_pressure_at_interface_for_RRTMGP_in_hPa | air pressure level | hPa | 2 | real | kind_phys | in | F | +!! | t_lay | air_temperature_at_layer_for_RRTMGP | air temperature layer | K | 2 | real | kind_phys | in | F | +!! | skt | surface_ground_temperature_for_radiation | surface ground temperature for radiation | K | 1 | real | kind_phys | in | F | +!! | lw_gas_props | coefficients_for_lw_gas_optics | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | +!! | optical_props_clrsky | longwave_optical_properties_for_clear_sky | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_1scl | | inout | F | +!! | optical_props_cloud | longwave_optical_properties_for_cloudy_atmosphere | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_1scl | | in | F | +!! | optical_props_aerosol | longwave_optical_properties_for_aerosols | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_1scl | | in | F | +!! | sources | longwave_source_function | Fortran DDT containing RRTMGP source functions | DDT | 0 | ty_source_func_lw | | in | F | +!! | lslwr | flag_to_calc_lw | flag to calculate LW irradiances | flag | 0 | logical | | in | F | +!! | hlw0 | tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_time_step | longwave clear sky heating rate | K s-1 | 2 | real | kind_phys | in | T | +!! | hlwb | lw_heating_rate_spectral | longwave total sky heating rate (spectral) | K s-1 | 3 | real | kind_phys | in | T | +!! | fluxUP_allsky | lw_flux_profile_upward_allsky | RRTMGP upward longwave all-sky flux profile | W m-2 | 2 | real | kind_phys | out | F | +!! | fluxDOWN_allsky | lw_flux_profile_downward_allsky | RRTMGP downward longwave all-sky flux profile | W m-2 | 2 | real | kind_phys | out | F | +!! | fluxUP_clrsky | lw_flux_profile_upward_clrsky | RRTMGP upward longwave clr-sky flux profile | W m-2 | 2 | real | kind_phys | out | F | +!! | fluxDOWN_clrsky | lw_flux_profile_downward_clrsky | RRTMGP downward longwave clr-sky flux profile | W m-2 | 2 | real | kind_phys | out | F | +!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | +!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | !! - subroutine rrtmgp_lw_run(Model, Radtend, ncol, lw_gas_props, p_lay, t_lay, p_lev, skt, & - gas_concentrations, optical_propsLW_clds, optical_propsLW_aerosol,& - lslwr, fluxUP_allsky, fluxDOWN_allsky, fluxUP_clrsky, fluxDOWN_clrsky, hlw0, hlwb, errmsg, errflg) + subroutine rrtmgp_lw_run(Model, Statein, Radtend, ncol, lw_gas_props, p_lay, t_lay, p_lev, & + skt, sources, optical_props_clrsky, optical_props_cloud, optical_props_aerosol, lslwr,& + fluxUP_allsky, fluxDOWN_allsky, fluxUP_clrsky, fluxDOWN_clrsky, hlw0, hlwb, errmsg, errflg) ! Inputs - type(GFS_control_type), intent(in) :: & - Model + type(GFS_control_type), intent(in) :: & + Model ! Fortran DDT containing FV3-GFS model control parameters type(GFS_radtend_type), intent(in) :: & Radtend ! Fortran DDT containing FV3-GFS radiation tendencies + type(GFS_statein_type), intent(in) :: & + Statein ! Fortran DDT containing FV3-GFS prognostic state data in from dycore integer, intent(in) :: & ncol ! Number of horizontal gridpoints real(kind_phys), dimension(ncol,model%levs), intent(in) :: & @@ -67,45 +71,52 @@ subroutine rrtmgp_lw_run(Model, Radtend, ncol, lw_gas_props, p_lay, t_lay, p_lev real(kind_phys), dimension(ncol), intent(in) :: & skt ! Surface(skin) temperature (K) type(ty_gas_optics_rrtmgp),intent(in) :: & - lw_gas_props ! DDT containing LW spectral information + lw_gas_props ! DDT containing LW spectral information + type(ty_optical_props_1scl),intent(inout) :: & + optical_props_clrsky ! RRTMGP DDT: longwave clear-sky radiative properties type(ty_optical_props_1scl),intent(in) :: & - optical_propsLW_clds, & ! RRTMGP DDT: longwave cloud radiative properties - optical_propsLW_aerosol ! RRTMGP DDT: longwave aerosol radiative properties - type(ty_gas_concs),intent(in) :: & - gas_concentrations ! RRTMGP DDT: trace gas concentrations (vmr) + optical_props_cloud, & ! RRTMGP DDT: longwave cloud radiative properties + optical_props_aerosol ! RRTMGP DDT: longwave aerosol radiative properties + type(ty_source_func_lw),intent(in) :: & + sources logical, intent(in) :: & lslwr ! Flag to calculate LW irradiances ! Outputs - character(len=*), intent(out) :: errmsg - integer, intent(out) :: errflg + character(len=*), intent(out) :: & + errmsg ! CCPP error message + integer, intent(out) :: & + errflg ! CCPP error flag real(kind_phys), dimension(ncol,model%levs), intent(out) :: & - fluxUP_allsky, & ! All-sky flux (W/m2) - fluxDOWN_allsky, & ! All-sky flux (W/m2) - fluxUP_clrsky, & ! Clear-sky flux (W/m2) - fluxDOWN_clrsky ! All-sky flux (W/m2) + fluxUP_allsky, & ! All-sky flux (W/m2) + fluxDOWN_allsky, & ! All-sky flux (W/m2) + fluxUP_clrsky, & ! Clear-sky flux (W/m2) + fluxDOWN_clrsky ! All-sky flux (W/m2) ! Outputs (optional) real(kind_phys), dimension(ncol,model%levs,lw_gas_props%get_nband()), optional, intent(inout) :: & - hlwb ! All-sky heating rate, by band (K/sec) + hlwb ! All-sky heating rate, by band (K/sec) real(kind_phys), dimension(ncol,model%levs), optional, intent(inout) :: & - hlw0 ! Clear-sky heating rate (K/sec) + hlw0 ! Clear-sky heating rate (K/sec) ! Local variables type(ty_fluxes_byband) :: & - flux_allsky, & ! All-sky flux (W/m2) - flux_clrsky ! Clear-sky flux (W/m2) + flux_allsky, flux_clrsky real(kind_phys), dimension(ncol,model%levs+1),target :: & fluxLW_up_allsky, fluxLW_up_clrsky, fluxLW_dn_allsky, fluxLW_dn_clrsky real(kind_phys), dimension(ncol,model%levs+1,lw_gas_props%get_nband()),target :: & fluxLWBB_up_allsky, fluxLWBB_dn_allsky - logical :: l_ClrSky_HR, l_AllSky_HR_byband + logical :: & + l_ClrSky_HR, l_AllSky_HR_byband, top_at_1 ! Initialize CCPP error handling variables errmsg = '' errflg = 0 if (.not. lslwr) return - + + ! Vertical ordering? + top_at_1 = (Statein%prsi(1,1) .lt. Statein%prsi(1, Model%levs)) + ! Are any optional outputs requested? Need to know now to compute correct fluxes. l_ClrSky_HR = present(hlw0) l_AllSky_HR_byband = present(hlwb) @@ -121,23 +132,33 @@ subroutine rrtmgp_lw_run(Model, Radtend, ncol, lw_gas_props, p_lay, t_lay, p_lev flux_allsky%bnd_flux_dn => fluxLWBB_dn_allsky endif - ! Call RRTMGP LW scheme + ! Compute clear-sky fluxes (if requested) + ! Clear-sky fluxes are gas+aerosol + call check_error_msg('rrtmgp_lw_run',optical_props_aerosol%increment(optical_props_clrsky)) + if (l_ClrSky_HR) then + call check_error_msg('rrtmgp_lw_run',rte_lw( & + optical_props_clrsky, & ! IN - optical-properties + top_at_1, & ! IN - veritcal ordering flag + sources, & ! IN - source function + Radtend%sfc_emiss_byband, & ! IN - surface emissivity in each LW band + flux_clrsky)) + ! Store fluxes + fluxUP_clrsky = flux_clrsky%flux_up + fluxDOWN_clrsky = flux_clrsky%flux_dn + endif + + ! All-sky fluxes + ! Clear-sky fluxes are (gas+aerosol)+clouds + call check_error_msg('rrtmgp_lw_run',optical_props_cloud%increment(optical_props_clrsky)) call check_error_msg('rrtmgp_lw_run',rte_lw( & - lw_gas_props, & ! IN - spectral information - gas_concentrations, & ! IN - gas concentrations (vmr) - p_lay, & ! IN - pressure at layer interfaces (Pa) - t_lay, & ! IN - temperature at layer interfaes (K) - p_lev, & ! IN - pressure at layer centers (Pa) - skt, & ! IN - skin temperature (K) + optical_props_clrsky, & ! IN - optical-properties + top_at_1, & ! IN - veritcal ordering flag + sources, & ! IN - source function Radtend%sfc_emiss_byband, & ! IN - surface emissivity in each LW band - optical_propsLW_clds, & ! IN - DDT containing cloud optical information - flux_allsky, & ! OUT - Fluxes, all-sky, 3D (nCol,model%levs,nBand) - flux_clrsky, & ! OUT - Fluxes, clear-sky, 3D (nCol,model%levs,nBand) - aer_props = optical_propsLW_aerosol)) ! IN(optional) - DDT containing aerosol optical information + flux_allsky)) + ! Store fluxes fluxUP_allsky = flux_allsky%flux_up fluxDOWN_allsky = flux_allsky%flux_dn - fluxUP_clrsky = flux_clrsky%flux_up - fluxDOWN_clrsky = flux_clrsky%flux_dn end subroutine rrtmgp_lw_run diff --git a/physics/rrtmgp_lw_clrallsky_driver.F90 b/physics/rrtmgp_lw_clrallsky_driver.F90 new file mode 100644 index 000000000..e1d360dce --- /dev/null +++ b/physics/rrtmgp_lw_clrallsky_driver.F90 @@ -0,0 +1,151 @@ +! ########################################################################################### +! ########################################################################################### +module rrtmgp_lw_clrallsky_driver + use machine, only: kind_phys + use GFS_typedefs, only: GFS_control_type, GFS_radtend_type + use mo_rte_kind, only: wl + use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp + use mo_cloud_optics, only: ty_cloud_optics + use mo_optical_props, only: ty_optical_props_1scl + use mo_rrtmgp_clr_all_sky, only: rte_lw + use mo_gas_concentrations, only: ty_gas_concs + use mo_fluxes_byband, only: ty_fluxes_byband + use rrtmgp_aux, only: check_error_msg + + public rrtmgp_lw_clrallsky_driver_init, rrtmgp_lw_clrallsky_driver_run, rrtmgp_lw_clrallsky_driver_finalize +contains + + ! ######################################################################################### + ! SUBROUTINE rrtmgp_lw_clrallsky_driver_init + ! ######################################################################################### + subroutine rrtmgp_lw_clrallsky_driver_init() + end subroutine rrtmgp_lw_clrallsky_driver_init + + ! ######################################################################################### + ! SUBROUTINE rrtmgp_lw_clrallsky_driver_run + ! ######################################################################################### +!! \section arg_table_rrtmgp_lw_clrallsky_driver_run Argument Table +!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | +!! |-------------------------|-----------------------------------------------------------------------------------------------|--------------------------------------------------------------------|-------|------|-----------------------|-----------|--------|----------| +!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | +!! | Radtend | GFS_radtend_type_instance | Fortran DDT containing FV3-GFS radiation tendencies | DDT | 0 | GFS_radtend_type | | in | F | +!! | ncol | horizontal_loop_extent | horizontal dimension | count | 0 | integer | | in | F | +!! | p_lay | air_pressure_at_layer_for_RRTMGP_in_hPa | air pressure layer | hPa | 2 | real | kind_phys | in | F | +!! | p_lev | air_pressure_at_interface_for_RRTMGP_in_hPa | air pressure level | hPa | 2 | real | kind_phys | in | F | +!! | t_lay | air_temperature_at_layer_for_RRTMGP | air temperature layer | K | 2 | real | kind_phys | in | F | +!! | skt | surface_ground_temperature_for_radiation | surface ground temperature for radiation | K | 1 | real | kind_phys | in | F | +!! | lw_gas_props | coefficients_for_lw_gas_optics | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | +!! | optical_propsLW_clds | longwave_optical_properties_for_cloudy_atmosphere | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_1scl | | in | F | +!! | optical_propsLW_aerosol | longwave_optical_properties_for_aerosols | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_1scl | | in | F | +!! | gas_concentrations | Gas_concentrations_for_RRTMGP_suite | DDT containing gas concentrations for RRTMGP radiation scheme | DDT | 0 | ty_gas_concs | | in | F | +!! | lslwr | flag_to_calc_lw | flag to calculate LW irradiances | flag | 0 | logical | | in | F | +!! | hlw0 | tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_time_step | longwave clear sky heating rate | K s-1 | 2 | real | kind_phys | in | T | +!! | hlwb | lw_heating_rate_spectral | longwave total sky heating rate (spectral) | K s-1 | 3 | real | kind_phys | in | T | +!! | fluxUP_allsky | lw_flux_profile_upward_allsky | RRTMGP upward longwave all-sky flux profile | W m-2 | 2 | real | kind_phys | out | F | +!! | fluxDOWN_allsky | lw_flux_profile_downward_allsky | RRTMGP downward longwave all-sky flux profile | W m-2 | 2 | real | kind_phys | out | F | +!! | fluxUP_clrsky | lw_flux_profile_upward_clrsky | RRTMGP upward longwave clr-sky flux profile | W m-2 | 2 | real | kind_phys | out | F | +!! | fluxDOWN_clrsky | lw_flux_profile_downward_clrsky | RRTMGP downward longwave clr-sky flux profile | W m-2 | 2 | real | kind_phys | out | F | +!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | +!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! + subroutine rrtmgp_lw_clrallsky_driver_run(Model, Radtend, ncol, lw_gas_props, p_lay, t_lay, p_lev, skt, & + gas_concentrations, optical_propsLW_clds, optical_propsLW_aerosol,& + lslwr, fluxUP_allsky, fluxDOWN_allsky, fluxUP_clrsky, fluxDOWN_clrsky, hlw0, hlwb, errmsg, errflg) + + ! Inputs + type(GFS_control_type), intent(in) :: & + Model + type(GFS_radtend_type), intent(in) :: & + Radtend ! Fortran DDT containing FV3-GFS radiation tendencies + integer, intent(in) :: & + ncol ! Number of horizontal gridpoints + real(kind_phys), dimension(ncol,model%levs), intent(in) :: & + p_lay, & ! Pressure @ model layer-centers (hPa) + t_lay ! Temperature (K) + real(kind_phys), dimension(ncol,model%levs+1), intent(in) :: & + p_lev ! Pressure @ model layer-interfaces (hPa) + real(kind_phys), dimension(ncol), intent(in) :: & + skt ! Surface(skin) temperature (K) + type(ty_gas_optics_rrtmgp),intent(in) :: & + lw_gas_props ! DDT containing LW spectral information + type(ty_optical_props_1scl),intent(in) :: & + optical_propsLW_clds, & ! RRTMGP DDT: longwave cloud radiative properties + optical_propsLW_aerosol ! RRTMGP DDT: longwave aerosol radiative properties + type(ty_gas_concs),intent(in) :: & + gas_concentrations ! RRTMGP DDT: trace gas concentrations (vmr) + logical, intent(in) :: & + lslwr ! Flag to calculate LW irradiances + + ! Outputs + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + real(kind_phys), dimension(ncol,model%levs), intent(out) :: & + fluxUP_allsky, & ! All-sky flux (W/m2) + fluxDOWN_allsky, & ! All-sky flux (W/m2) + fluxUP_clrsky, & ! Clear-sky flux (W/m2) + fluxDOWN_clrsky ! All-sky flux (W/m2) + + ! Outputs (optional) + real(kind_phys), dimension(ncol,model%levs,lw_gas_props%get_nband()), optional, intent(inout) :: & + hlwb ! All-sky heating rate, by band (K/sec) + real(kind_phys), dimension(ncol,model%levs), optional, intent(inout) :: & + hlw0 ! Clear-sky heating rate (K/sec) + + ! Local variables + type(ty_fluxes_byband) :: & + flux_allsky, & ! All-sky flux (W/m2) + flux_clrsky ! Clear-sky flux (W/m2) + real(kind_phys), dimension(ncol,model%levs+1),target :: & + fluxLW_up_allsky, fluxLW_up_clrsky, fluxLW_dn_allsky, fluxLW_dn_clrsky + real(kind_phys), dimension(ncol,model%levs+1,lw_gas_props%get_nband()),target :: & + fluxLWBB_up_allsky, fluxLWBB_dn_allsky + logical :: l_ClrSky_HR, l_AllSky_HR_byband + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + if (.not. lslwr) return + + ! Are any optional outputs requested? Need to know now to compute correct fluxes. + l_ClrSky_HR = present(hlw0) + l_AllSky_HR_byband = present(hlwb) + + ! Initialize RRTMGP DDT containing 2D(3D) fluxes + flux_allsky%flux_up => fluxLW_up_allsky + flux_allsky%flux_dn => fluxLW_dn_allsky + flux_clrsky%flux_up => fluxLW_up_clrsky + flux_clrsky%flux_dn => fluxLW_dn_clrsky + ! Only calculate fluxes by-band, only when heating-rate profiles by band are requested. + if (l_AllSky_HR_byband) then + flux_allsky%bnd_flux_up => fluxLWBB_up_allsky + flux_allsky%bnd_flux_dn => fluxLWBB_dn_allsky + endif + + ! Call RRTMGP LW scheme + call check_error_msg('rrtmgp_lw_clrallsky_driver_run',rte_lw( & + lw_gas_props, & ! IN - spectral information + gas_concentrations, & ! IN - gas concentrations (vmr) + p_lay, & ! IN - pressure at layer interfaces (Pa) + t_lay, & ! IN - temperature at layer interfaes (K) + p_lev, & ! IN - pressure at layer centers (Pa) + skt, & ! IN - skin temperature (K) + Radtend%sfc_emiss_byband, & ! IN - surface emissivity in each LW band + optical_propsLW_clds, & ! IN - DDT containing cloud optical information + flux_allsky, & ! OUT - Fluxes, all-sky, 3D (nCol,model%levs,nBand) + flux_clrsky, & ! OUT - Fluxes, clear-sky, 3D (nCol,model%levs,nBand) + aer_props = optical_propsLW_aerosol)) ! IN(optional) - DDT containing aerosol optical information + fluxUP_allsky = flux_allsky%flux_up + fluxDOWN_allsky = flux_allsky%flux_dn + fluxUP_clrsky = flux_clrsky%flux_up + fluxDOWN_clrsky = flux_clrsky%flux_dn + + end subroutine rrtmgp_lw_clrallsky_driver_run + + ! ######################################################################################### + ! SUBROUTINE rrtmgp_lw_clrallsky_driver_finalize + ! ######################################################################################### + subroutine rrtmgp_lw_clrallsky_driver_finalize() + end subroutine rrtmgp_lw_clrallsky_driver_finalize + + +end module rrtmgp_lw_clrallsky_driver diff --git a/physics/rrtmgp_lw_gas_optics.F90 b/physics/rrtmgp_lw_gas_optics.F90 index cc0e848c8..29e5d203b 100644 --- a/physics/rrtmgp_lw_gas_optics.F90 +++ b/physics/rrtmgp_lw_gas_optics.F90 @@ -4,6 +4,8 @@ module rrtmgp_lw_gas_optics use mo_rte_kind, only: wl use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp use mo_gas_concentrations, only: ty_gas_concs + use mo_source_functions, only: ty_source_func_lw + use mo_optical_props, only: ty_optical_props_1scl use rrtmgp_aux, only: check_error_msg use netcdf @@ -419,7 +421,84 @@ end subroutine rrtmgp_lw_gas_optics_init ! If calling rte/mo_rte_sw.F90:rte_sw() directly, place calls to compute source ! function and gas_optics() here. ! ######################################################################################### - subroutine rrtmgp_lw_gas_optics_run() +!! \section arg_table_rrtmgp_lw_gas_optics_run Argument Table +!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | +!! |----------------------|----------------------------------------------|--------------------------------------------------------------------|-------|------|-----------------------|-----------|--------|----------| +!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | +!! | Radtend | GFS_radtend_type_instance | Fortran DDT containing FV3-GFS radiation tendencies | DDT | 0 | GFS_radtend_type | | in | F | +!! | lw_gas_props | coefficients_for_lw_gas_optics | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | +!! | ncol | horizontal_loop_extent | horizontal dimension | count | 0 | integer | | in | F | +!! | p_lay | air_pressure_at_layer_for_RRTMGP_in_hPa | air pressure layer | hPa | 2 | real | kind_phys | in | F | +!! | p_lev | air_pressure_at_interface_for_RRTMGP_in_hPa | air pressure level | hPa | 2 | real | kind_phys | in | F | +!! | t_lay | air_temperature_at_layer_for_RRTMGP | air temperature layer | K | 2 | real | kind_phys | in | F | +!! | t_lev | air_temperature_at_interface_for_RRTMGP | air temperature level | K | 2 | real | kind_phys | in | F | +!! | skt | surface_ground_temperature_for_radiation | surface ground temperature for radiation | K | 1 | real | kind_phys | in | F | +!! | gas_concentrations | Gas_concentrations_for_RRTMGP_suite | DDT containing gas concentrations for RRTMGP radiation scheme | DDT | 0 | ty_gas_concs | | in | F | +!! | lslwr | flag_to_calc_lw | flag to calculate LW irradiances | flag | 0 | logical | | in | F | +!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | +!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! | optical_props_clrsky | longwave_optical_properties_for_clear_sky | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_1scl | | out | F | +!! | sources_LW | longwave_source_function | Fortran DDT containing RRTMGP source functions | DDT | 0 | ty_source_func_lw | | out | F | +!! + subroutine rrtmgp_lw_gas_optics_run(Model, Radtend, lw_gas_props, ncol, p_lay, p_lev, t_lay, t_lev, skt, & + gas_concentrations, lslwr, optical_props_clrsky, sources_LW, errmsg, errflg) + + ! Inputs + type(GFS_control_type), intent(in) :: & + Model ! DDT containing model control parameters + type(GFS_radtend_type), intent(in) :: & + Radtend + + type(ty_gas_optics_rrtmgp),intent(in) :: & + lw_gas_props ! DDT containing spectral information for RRTMGP LW radiation scheme + integer,intent(in) :: & + ncol ! Number of horizontal points + real(kind_phys), dimension(ncol,model%levs), intent(in) :: & + p_lay, & ! Pressure @ model layer-centers (hPa) + t_lay ! Temperature (K) + real(kind_phys), dimension(ncol,model%levs+1), intent(in) :: & + p_lev, & ! Pressure @ model layer-interfaces (hPa) + t_lev ! Temperature @ model levels + real(kind_phys), dimension(ncol), intent(in) :: & + skt ! Surface(skin) temperature (K) + type(ty_gas_concs),intent(in) :: & + gas_concentrations ! RRTMGP DDT: trace gas concentrations (vmr) + logical, intent(in) :: & + lslwr ! Flag to calculate LW irradiances + + ! Output + character(len=*), intent(out) :: & + errmsg ! Error message + integer, intent(out) :: & + errflg ! Error code + type(ty_optical_props_1scl),intent(out) :: & + optical_props_clrsky ! + type(ty_source_func_lw),intent(out) :: & + sources_LW + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + + if (.not. Model%lslwr) return + + ! Allocate space + call check_error_msg('rrtmgp_lw_gas_optics_run',optical_props_clrsky%alloc_1scl(ncol, model%levs, lw_gas_props)) + call check_error_msg('rrtmgp_lw_gas_optics_run',sources_LW%init(lw_gas_props)) + call check_error_msg('rrtmgp_lw_gas_optics_run',sources_LW%alloc(ncol, Model%levs)) + + ! Gas-optics (djs asks pincus: I think it makes sense to have a generic gas_optics interface in + ! ty_gas_optics_rrtmgp, just as in ty_gas_optics. + call check_error_msg('rrtmgp_lw_gas_optics_run',lw_gas_props%gas_optics_int(& + p_lay, & ! + p_lev, & ! + t_lay, & ! + skt, & ! + gas_concentrations, & ! + optical_props_clrsky, & ! + sources_LW, & ! + tlev=t_lev)) ! + end subroutine rrtmgp_lw_gas_optics_run ! ######################################################################################### diff --git a/physics/rrtmgp_sw.F90 b/physics/rrtmgp_sw.F90 index 7e62dc708..c653fcb3e 100644 --- a/physics/rrtmgp_sw.F90 +++ b/physics/rrtmgp_sw.F90 @@ -2,12 +2,12 @@ ! ########################################################################################### module rrtmgp_sw use machine, only: kind_phys - use GFS_typedefs, only: GFS_control_type, GFS_radtend_type + use GFS_typedefs, only: GFS_control_type, GFS_radtend_type, GFS_statein_type use mo_rte_kind, only: wl use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp use mo_cloud_optics, only: ty_cloud_optics use mo_optical_props, only: ty_optical_props_2str - use mo_rrtmgp_clr_all_sky, only: rte_sw + use mo_rte_sw, only: rte_sw use mo_gas_concentrations, only: ty_gas_concs use mo_fluxes_byband, only: ty_fluxes_byband use module_radsw_parameters, only: cmpfsw_type @@ -31,17 +31,20 @@ end subroutine rrtmgp_sw_init !! |-------------------------|------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------|-------|------|-----------------------|-----------|--------|----------| !! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | !! | Radtend | GFS_radtend_type_instance | Fortran DDT containing FV3-GFS radiation tendencies | DDT | 0 | GFS_radtend_type | | in | F | +!! | Statein | GFS_statein_type_instance | Fortran DDT containing FV3-GFS prognostic state data in from dycore | DDT | 0 | GFS_statein_type | | in | F | !! | ncol | horizontal_loop_extent | horizontal dimension | count | 0 | integer | | in | F | !! | p_lay | air_pressure_at_layer_for_RRTMGP_in_hPa | air pressure layer | hPa | 2 | real | kind_phys | in | F | !! | p_lev | air_pressure_at_interface_for_RRTMGP_in_hPa | air pressure level | hPa | 2 | real | kind_phys | in | F | !! | t_lay | air_temperature_at_layer_for_RRTMGP | air temperature layer | K | 2 | real | kind_phys | in | F | !! | sw_gas_props | coefficients_for_sw_gas_optics | DDT containing spectral information for RRTMGP SW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | -!! | optical_props_clds | shortwave_optical_properties_for_cloudy_atmosphere | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_2str | | in | F | +!! | optical_props_clrsky | shortwave_optical_properties_for_clear_sky | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_2str | | in | F | +!! | optical_props_cloud | shortwave_optical_properties_for_cloudy_atmosphere | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_2str | | in | F | !! | optical_props_aerosol | shortwave_optical_properties_for_aerosols | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_2str | | in | F | !! | gas_concentrations | Gas_concentrations_for_RRTMGP_suite | DDT containing gas concentrations for RRTMGP radiation scheme | DDT | 0 | ty_gas_concs | | in | F | !! | lsswr | flag_to_calc_sw | flag to calculate SW irradiances | flag | 0 | logical | | in | F | !! | nday | daytime_points_dimension | daytime points dimension | count | 0 | integer | | in | F | !! | idxday | daytime_points | daytime points | index | 1 | integer | | in | F | +!! | toa_src | Incoming_solar_irradiance_by_spectral_point | top of atmosphere incident solar flux in each spectral point | | 2 | real | kind_phys | in | F | !! | hsw0 | tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_time_step | shortwave clear sky heating rate | K s-1 | 2 | real | kind_phys | inout | T | !! | hswb | sw_heating_rate_spectral | shortwave total sky heating rate (spectral) | K s-1 | 3 | real | kind_phys | inout | T | !! | scmpsw | components_of_surface_downward_shortwave_fluxes | derived type for special components of surface downward shortwave fluxes | W m-2 | 1 | cmpfsw_type | | inout | T | @@ -52,14 +55,18 @@ end subroutine rrtmgp_sw_init !! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | !! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | !! - subroutine rrtmgp_sw_run(Model, Radtend, ncol, sw_gas_props, p_lay, t_lay, p_lev, gas_concentrations, & - optical_props_clds, optical_props_aerosol, & - lsswr, nday, idxday, hsw0, hswb, scmpsw, & + subroutine rrtmgp_sw_run(Model, Radtend, Statein, ncol, sw_gas_props, p_lay, t_lay, p_lev, gas_concentrations, & + optical_props_clrsky, optical_props_cloud, optical_props_aerosol, & + lsswr, nday, idxday, toa_src, hsw0, hswb, scmpsw, & fluxUP_allsky, fluxDOWN_allsky, fluxUP_clrsky, fluxDOWN_clrsky, errmsg, errflg) ! Inputs - type(GFS_control_type), intent(in) :: Model - type(GFS_radtend_type), intent(in) :: Radtend + type(GFS_control_type), intent(in) :: & + Model + type(GFS_radtend_type), intent(in) :: & + Radtend + type(GFS_statein_type), intent(in) :: & + Statein ! Fortran DDT containing FV3-GFS prognostic state data in from dycore integer, intent(in) :: & ncol, & ! Number of horizontal gridpoints nday ! Number of daytime points @@ -73,13 +80,16 @@ subroutine rrtmgp_sw_run(Model, Radtend, ncol, sw_gas_props, p_lay, t_lay, p_lev type(ty_gas_optics_rrtmgp),intent(in) :: & sw_gas_props ! DDT containing SW spectral information type(ty_optical_props_2str),intent(in) :: & - optical_props_clds, & ! RRTMGP DDT: longwave cloud radiative properties + optical_props_clrsky, & ! RRTMGP DDT: longwave clear-sky radiative properties + optical_props_cloud, & ! RRTMGP DDT: longwave cloud radiative properties optical_props_aerosol ! RRTMGP DDT: longwave aerosol radiative properties type(ty_gas_concs),intent(in) :: & gas_concentrations ! RRTMGP DDT: trace gas concentrations (vmr) logical, intent(in) :: & lsswr ! Flag to calculate SW irradiances + real(kind_phys),dimension(ncol,sw_gas_props%get_ngpt()),intent(in) :: & + toa_src ! Outputs character(len=*), intent(out) :: errmsg @@ -114,11 +124,12 @@ subroutine rrtmgp_sw_run(Model, Radtend, ncol, sw_gas_props, p_lay, t_lay, p_lev real(kind_phys), dimension(nday,Model%levs+1,sw_gas_props%get_nband()),target :: & fluxSWBB_up_allsky, fluxSWBB_dn_allsky real(kind_phys), dimension(ncol,Model%levs) :: vmrTemp - logical :: l_ClrSky_HR=.false., l_AllSky_HR_byband=.false., l_scmpsw=.false. + logical :: l_ClrSky_HR=.false., l_AllSky_HR_byband=.false., l_scmpsw=.false., top_at_1 integer :: iGas type(ty_optical_props_2str) :: & - optical_props_clds_daylit, & ! RRTMGP DDT: longwave cloud radiative properties - optical_props_aerosol_daylit ! RRTMGP DDT: longwave aerosol radiative properties + optical_props_cloud_daylit, & ! RRTMGP DDT: longwave cloud radiative properties + optical_props_clrsky_daylit, & ! RRTMGP DDT: longwave clear-sky radiative properties + optical_props_aerosol_daylit ! RRTMGP DDT: longwave aerosol radiative properties type(ty_gas_concs) :: & gas_concentrations_daylit ! RRTMGP DDT: trace gas concentrations (vmr) @@ -128,6 +139,9 @@ subroutine rrtmgp_sw_run(Model, Radtend, ncol, sw_gas_props, p_lay, t_lay, p_lev if (.not. lsswr) return + ! Vertical ordering? + top_at_1 = (Statein%prsi(1,1) .lt. Statein%prsi(1, Model%levs)) + ! Are any optional outputs requested? Need to know now to compute correct fluxes. l_ClrSky_HR = present(hsw0) l_AllSky_HR_byband = present(hswb) @@ -143,16 +157,21 @@ subroutine rrtmgp_sw_run(Model, Radtend, ncol, sw_gas_props, p_lay, t_lay, p_lev if (nDay .gt. 0) then ! Subset the cloud and aerosol radiative properties over daylit points. - ! Cloud optics [nDay,Model%levs,nBands] - call check_error_msg('rrtmgp_sw_run',optical_props_clds_daylit%alloc_2str(nday, Model%levs, sw_gas_props)) - optical_props_clds_daylit%tau = optical_props_clds%tau(idxday,:,:) - optical_props_clds_daylit%ssa = optical_props_clds%ssa(idxday,:,:) - optical_props_clds_daylit%g = optical_props_clds%g(idxday,:,:) + ! Cloud optics [nDay,Model%levs,nGpts] + call check_error_msg('rrtmgp_sw_run',optical_props_cloud_daylit%alloc_2str(nday, Model%levs, sw_gas_props)) + optical_props_cloud_daylit%tau = optical_props_cloud%tau(idxday,:,:) + optical_props_cloud_daylit%ssa = optical_props_cloud%ssa(idxday,:,:) + optical_props_cloud_daylit%g = optical_props_cloud%g(idxday,:,:) ! Aerosol optics [nDay,Model%levs,nBands] call check_error_msg('rrtmgp_sw_run',optical_props_aerosol_daylit%alloc_2str(nday, Model%levs, sw_gas_props%get_band_lims_wavenumber())) optical_props_aerosol_daylit%tau = optical_props_aerosol%tau(idxday,:,:) optical_props_aerosol_daylit%ssa = optical_props_aerosol%ssa(idxday,:,:) optical_props_aerosol_daylit%g = optical_props_aerosol%g(idxday,:,:) + ! Clear-sky optics [nDay,Model%levs,nGpts] + call check_error_msg('rrtmgp_sw_run',optical_props_clrsky_daylit%alloc_2str(nday, Model%levs, sw_gas_props)) + optical_props_clrsky_daylit%tau = optical_props_clrsky%tau(idxday,:,:) + optical_props_clrsky_daylit%ssa = optical_props_clrsky%ssa(idxday,:,:) + optical_props_clrsky_daylit%g = optical_props_clrsky%g(idxday,:,:) ! Similarly, subset the gas concentrations. do iGas=1,Model%nGases @@ -170,25 +189,38 @@ subroutine rrtmgp_sw_run(Model, Radtend, ncol, sw_gas_props, p_lay, t_lay, p_lev flux_allsky%bnd_flux_up => fluxSWBB_up_allsky flux_allsky%bnd_flux_dn => fluxSWBB_dn_allsky endif - - ! Call RRTMGP SW scheme + + ! Compute clear-sky fluxes (if requested) + ! Clear-sky fluxes are gas+aerosol + call check_error_msg('rrtmgp_sw_run',optical_props_aerosol_daylit%increment(optical_props_clrsky_daylit)) + if (l_ClrSky_HR) then + call check_error_msg('rrtmgp_sw_run',rte_sw( & + optical_props_clrsky_daylit, & ! IN - optical-properties + top_at_1, & ! IN - veritcal ordering flag + Radtend%coszen(idxday), & ! IN - Cosine of solar zenith angle + toa_src(idxday,:), & ! IN - incident solar flux at TOA + Radtend%sfc_alb_nir_dir(:,idxday), & ! IN - Shortwave surface albedo (direct) + Radtend%sfc_alb_nir_dif(:,idxday), & ! IN - Shortwave surface albedo (diffuse) + flux_clrsky)) ! OUT - Fluxes, clear-sky, 3D (nCol,Model%levs,nBand) + ! Store fluxes + fluxUP_clrsky(idxday,:) = flux_clrsky%flux_up + fluxDOWN_clrsky(idxday,:) = flux_clrsky%flux_dn + endif + + ! Compute all-sky fluxes + call check_error_msg('rrtmgp_sw_run',optical_props_cloud_daylit%increment(optical_props_clrsky_daylit)) call check_error_msg('rrtmgp_sw_run',rte_sw( & - sw_gas_props, & ! IN - spectral information - gas_concentrations_daylit, & ! IN - gas concentrations (vmr) - p_lay(idxday,1:Model%levs), & ! IN - pressure at layer interfaces (Pa) - t_lay(idxday,1:Model%levs), & ! IN - temperature at layer interfaes (K) - p_lev(idxday,1:Model%levs+1), & ! IN - pressure at layer centers (Pa) - Radtend%coszen(idxday), & ! IN - Cosine of solar zenith angle - Radtend%sfc_alb_nir_dir(:,idxday), & ! IN - Shortwave surface albedo (direct) - Radtend%sfc_alb_nir_dif(:,idxday), & ! IN - Shortwave surface albedo (diffuse) - optical_props_clds_daylit, & ! IN - DDT containing cloud optical information - flux_allsky, & ! OUT - Fluxes, all-sky, 3D (nCol,Model%levs,nBand) - flux_clrsky, & ! OUT - Fluxes, clear-sky, 3D (nCol,Model%levs,nBand) - aer_props = optical_props_aerosol_daylit)) ! IN(optional) - DDT containing aerosol optical information + optical_props_clrsky_daylit, & ! IN - optical-properties + top_at_1, & ! IN - veritcal ordering flag + Radtend%coszen(idxday), & ! IN - Cosine of solar zenith angle + toa_src(idxday,:), & ! IN - incident solar flux at TOA + Radtend%sfc_alb_nir_dir(:,idxday), & ! IN - Shortwave surface albedo (direct) + Radtend%sfc_alb_nir_dif(:,idxday), & ! IN - Shortwave surface albedo (diffuse) + flux_allsky)) ! OUT - Fluxes, clear-sky, 3D (nCol,Model%levs,nBand) + ! Store fluxes fluxUP_allsky(idxday,:) = flux_allsky%flux_up - fluxDOWN_allsky(idxday,:) = flux_allsky%flux_dn - fluxUP_clrsky(idxday,:) = flux_clrsky%flux_up - fluxDOWN_clrsky(idxday,:) = flux_clrsky%flux_dn + fluxDOWN_allsky(idxday,:) = flux_allsky%flux_dn + endif end subroutine rrtmgp_sw_run diff --git a/physics/rrtmgp_sw_clrallsky_driver.F90 b/physics/rrtmgp_sw_clrallsky_driver.F90 new file mode 100644 index 000000000..baa6c1fad --- /dev/null +++ b/physics/rrtmgp_sw_clrallsky_driver.F90 @@ -0,0 +1,201 @@ +! ########################################################################################### +! ########################################################################################### +module rrtmgp_sw_clrallsky_driver + use machine, only: kind_phys + use GFS_typedefs, only: GFS_control_type, GFS_radtend_type + use mo_rte_kind, only: wl + use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp + use mo_cloud_optics, only: ty_cloud_optics + use mo_optical_props, only: ty_optical_props_2str + use mo_rrtmgp_clr_all_sky, only: rte_sw + use mo_gas_concentrations, only: ty_gas_concs + use mo_fluxes_byband, only: ty_fluxes_byband + use module_radsw_parameters, only: cmpfsw_type + use rrtmgp_aux, only: check_error_msg + + public rrtmgp_sw_clrallsky_driver_init, rrtmgp_sw_clrallsky_driver_run, rrtmgp_sw_clrallsky_driver_finalize + +contains + + ! ######################################################################################### + ! SUBROUTINE rrtmgp_sw_clrallsky_driver_init + ! ######################################################################################### + subroutine rrtmgp_sw_clrallsky_driver_init() + end subroutine rrtmgp_sw_clrallsky_driver_init + + ! ######################################################################################### + ! SUBROUTINE rrtmgp_sw_clrallsky_driver_run + ! ######################################################################################### +!! \section arg_table_rrtmgp_sw_clrallsky_driver_run Argument Table +!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | +!! |-------------------------|------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------|-------|------|-----------------------|-----------|--------|----------| +!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | +!! | Radtend | GFS_radtend_type_instance | Fortran DDT containing FV3-GFS radiation tendencies | DDT | 0 | GFS_radtend_type | | in | F | +!! | ncol | horizontal_loop_extent | horizontal dimension | count | 0 | integer | | in | F | +!! | p_lay | air_pressure_at_layer_for_RRTMGP_in_hPa | air pressure layer | hPa | 2 | real | kind_phys | in | F | +!! | p_lev | air_pressure_at_interface_for_RRTMGP_in_hPa | air pressure level | hPa | 2 | real | kind_phys | in | F | +!! | t_lay | air_temperature_at_layer_for_RRTMGP | air temperature layer | K | 2 | real | kind_phys | in | F | +!! | sw_gas_props | coefficients_for_sw_gas_optics | DDT containing spectral information for RRTMGP SW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | +!! | optical_props_clds | shortwave_optical_properties_for_cloudy_atmosphere | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_2str | | in | F | +!! | optical_props_aerosol | shortwave_optical_properties_for_aerosols | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_2str | | in | F | +!! | gas_concentrations | Gas_concentrations_for_RRTMGP_suite | DDT containing gas concentrations for RRTMGP radiation scheme | DDT | 0 | ty_gas_concs | | in | F | +!! | lsswr | flag_to_calc_sw | flag to calculate SW irradiances | flag | 0 | logical | | in | F | +!! | nday | daytime_points_dimension | daytime points dimension | count | 0 | integer | | in | F | +!! | idxday | daytime_points | daytime points | index | 1 | integer | | in | F | +!! | hsw0 | tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_time_step | shortwave clear sky heating rate | K s-1 | 2 | real | kind_phys | inout | T | +!! | hswb | sw_heating_rate_spectral | shortwave total sky heating rate (spectral) | K s-1 | 3 | real | kind_phys | inout | T | +!! | scmpsw | components_of_surface_downward_shortwave_fluxes | derived type for special components of surface downward shortwave fluxes | W m-2 | 1 | cmpfsw_type | | inout | T | +!! | fluxUP_allsky | sw_flux_profile_upward_allsky | RRTMGP upward shortwave all-sky flux profile | W m-2 | 2 | real | kind_phys | out | F | +!! | fluxDOWN_allsky | sw_flux_profile_downward_allsky | RRTMGP downward shortwave all-sky flux profile | W m-2 | 2 | real | kind_phys | out | F | +!! | fluxUP_clrsky | sw_flux_profile_upward_clrsky | RRTMGP upward shortwave clr-sky flux profile | W m-2 | 2 | real | kind_phys | out | F | +!! | fluxDOWN_clrsky | sw_flux_profile_downward_clrsky | RRTMGP downward shortwave clr-sky flux profile | W m-2 | 2 | real | kind_phys | out | F | +!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | +!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! + subroutine rrtmgp_sw_clrallsky_driver_run(Model, Radtend, ncol, sw_gas_props, p_lay, t_lay, p_lev, gas_concentrations, & + optical_props_clds, optical_props_aerosol, & + lsswr, nday, idxday, hsw0, hswb, scmpsw, & + fluxUP_allsky, fluxDOWN_allsky, fluxUP_clrsky, fluxDOWN_clrsky, errmsg, errflg) + + ! Inputs + type(GFS_control_type), intent(in) :: Model + type(GFS_radtend_type), intent(in) :: Radtend + integer, intent(in) :: & + ncol, & ! Number of horizontal gridpoints + nday ! Number of daytime points + integer, intent(in), dimension(nday) :: & + idxday ! Index array for daytime points + real(kind_phys), dimension(ncol,Model%levs), intent(in) :: & + p_lay, & ! Pressure @ model layer-centers (hPa) + t_lay ! Temperature (K) + real(kind_phys), dimension(ncol,Model%levs+1), intent(in) :: & + p_lev ! Pressure @ model layer-interfaces (hPa) + type(ty_gas_optics_rrtmgp),intent(in) :: & + sw_gas_props ! DDT containing SW spectral information + type(ty_optical_props_2str),intent(in) :: & + optical_props_clds, & ! RRTMGP DDT: longwave cloud radiative properties + optical_props_aerosol ! RRTMGP DDT: longwave aerosol radiative properties + + type(ty_gas_concs),intent(in) :: & + gas_concentrations ! RRTMGP DDT: trace gas concentrations (vmr) + logical, intent(in) :: & + lsswr ! Flag to calculate SW irradiances + + ! Outputs + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + real(kind_phys), dimension(ncol,Model%levs), intent(out) :: & + fluxUP_allsky, & ! All-sky flux (W/m2) + fluxDOWN_allsky, & ! All-sky flux (W/m2) + fluxUP_clrsky, & ! Clear-sky flux (W/m2) + fluxDOWN_clrsky ! All-sky flux (W/m2) + + ! Inputs (optional) (NOTE. We only need the optional arguments to know what fluxes to output, HR's are computed later) + real(kind_phys), dimension(ncol,Model%levs), optional, intent(inout) :: & + hsw0 ! Clear-sky heating rate (K/sec) + real(kind_phys), dimension(ncol,Model%levs,sw_gas_props%get_nband()), intent(inout), optional :: & + hswb ! All-sky heating rate, by band (K/sec) + ! Outputs (optional) + type(cmpfsw_type), dimension(ncol), intent(inout),optional :: & + scmpsw ! 2D surface fluxes, components: + ! uvbfc - total sky downward uv-b flux at (W/m2) + ! uvbf0 - clear sky downward uv-b flux at (W/m2) + ! nirbm - downward nir direct beam flux (W/m2) + ! nirdf - downward nir diffused flux (W/m2) + ! visbm - downward uv+vis direct beam flux (W/m2) + ! visdf - downward uv+vis diffused flux (W/m2) + + ! Local variables + type(ty_fluxes_byband) :: & + flux_allsky, & ! All-sky flux (W/m2) + flux_clrsky ! Clear-sky flux (W/m2) + real(kind_phys), dimension(nday,Model%levs+1),target :: & + fluxSW_up_allsky, fluxSW_up_clrsky, fluxSW_dn_allsky, fluxSW_dn_clrsky + real(kind_phys), dimension(nday,Model%levs+1,sw_gas_props%get_nband()),target :: & + fluxSWBB_up_allsky, fluxSWBB_dn_allsky + real(kind_phys), dimension(ncol,Model%levs) :: vmrTemp + logical :: l_ClrSky_HR=.false., l_AllSky_HR_byband=.false., l_scmpsw=.false. + integer :: iGas + type(ty_optical_props_2str) :: & + optical_props_clds_daylit, & ! RRTMGP DDT: longwave cloud radiative properties + optical_props_aerosol_daylit ! RRTMGP DDT: longwave aerosol radiative properties + type(ty_gas_concs) :: & + gas_concentrations_daylit ! RRTMGP DDT: trace gas concentrations (vmr) + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + + if (.not. lsswr) return + + ! Are any optional outputs requested? Need to know now to compute correct fluxes. + l_ClrSky_HR = present(hsw0) + l_AllSky_HR_byband = present(hswb) + l_scmpsw = present(scmpsw) + if ( l_scmpsw ) then + scmpsw = cmpfsw_type (0., 0., 0., 0., 0., 0.) + endif + fluxUP_allsky(:,:) = 0._kind_phys + fluxDOWN_allsky(:,:) = 0._kind_phys + fluxUP_clrsky(:,:) = 0._kind_phys + fluxDOWN_clrsky(:,:) = 0._kind_phys + + if (nDay .gt. 0) then + + ! Subset the cloud and aerosol radiative properties over daylit points. + ! Cloud optics [nDay,Model%levs,nBands] + call check_error_msg('rrtmgp_sw_clrallsky_driver_run',optical_props_clds_daylit%alloc_2str(nday, Model%levs, sw_gas_props)) + optical_props_clds_daylit%tau = optical_props_clds%tau(idxday,:,:) + optical_props_clds_daylit%ssa = optical_props_clds%ssa(idxday,:,:) + optical_props_clds_daylit%g = optical_props_clds%g(idxday,:,:) + ! Aerosol optics [nDay,Model%levs,nBands] + call check_error_msg('rrtmgp_sw_clrallsky_driver_run',optical_props_aerosol_daylit%alloc_2str(nday, Model%levs, sw_gas_props%get_band_lims_wavenumber())) + optical_props_aerosol_daylit%tau = optical_props_aerosol%tau(idxday,:,:) + optical_props_aerosol_daylit%ssa = optical_props_aerosol%ssa(idxday,:,:) + optical_props_aerosol_daylit%g = optical_props_aerosol%g(idxday,:,:) + + ! Similarly, subset the gas concentrations. + do iGas=1,Model%nGases + call check_error_msg('rrtmgp_sw_clrallsky_driver_run',gas_concentrations%get_vmr(trim(Radtend%active_gases(iGas,1)),vmrTemp)) + call check_error_msg('rrtmgp_sw_clrallsky_driver_run',gas_concentrations_daylit%set_vmr(trim(Radtend%active_gases(iGas,1)),vmrTemp(idxday,:))) + enddo + + ! Initialize RRTMGP DDT containing 2D(3D) fluxes + flux_allsky%flux_up => fluxSW_up_allsky + flux_allsky%flux_dn => fluxSW_dn_allsky + flux_clrsky%flux_up => fluxSW_up_clrsky + flux_clrsky%flux_dn => fluxSW_dn_clrsky + ! Only calculate fluxes by-band, only when heating-rate profiles by band are requested. + if (l_AllSky_HR_byband) then + flux_allsky%bnd_flux_up => fluxSWBB_up_allsky + flux_allsky%bnd_flux_dn => fluxSWBB_dn_allsky + endif + + ! Call RRTMGP SW scheme + call check_error_msg('rrtmgp_sw_clrallsky_driver_run',rte_sw( & + sw_gas_props, & ! IN - spectral information + gas_concentrations_daylit, & ! IN - gas concentrations (vmr) + p_lay(idxday,1:Model%levs), & ! IN - pressure at layer interfaces (Pa) + t_lay(idxday,1:Model%levs), & ! IN - temperature at layer interfaes (K) + p_lev(idxday,1:Model%levs+1), & ! IN - pressure at layer centers (Pa) + Radtend%coszen(idxday), & ! IN - Cosine of solar zenith angle + Radtend%sfc_alb_nir_dir(:,idxday), & ! IN - Shortwave surface albedo (direct) + Radtend%sfc_alb_nir_dif(:,idxday), & ! IN - Shortwave surface albedo (diffuse) + optical_props_clds_daylit, & ! IN - DDT containing cloud optical information + flux_allsky, & ! OUT - Fluxes, all-sky, 3D (nCol,Model%levs,nBand) + flux_clrsky, & ! OUT - Fluxes, clear-sky, 3D (nCol,Model%levs,nBand) + aer_props = optical_props_aerosol_daylit)) ! IN(optional) - DDT containing aerosol optical information + fluxUP_allsky(idxday,:) = flux_allsky%flux_up + fluxDOWN_allsky(idxday,:) = flux_allsky%flux_dn + fluxUP_clrsky(idxday,:) = flux_clrsky%flux_up + fluxDOWN_clrsky(idxday,:) = flux_clrsky%flux_dn + endif + end subroutine rrtmgp_sw_clrallsky_driver_run + + ! ######################################################################################### + ! SUBROUTINE rrtmgp_sw_clrallsky_driver_finalize + ! ######################################################################################### + subroutine rrtmgp_sw_clrallsky_driver_finalize() + end subroutine rrtmgp_sw_clrallsky_driver_finalize + +end module rrtmgp_sw_clrallsky_driver diff --git a/physics/rrtmgp_sw_gas_optics.F90 b/physics/rrtmgp_sw_gas_optics.F90 index f0dc2e2d9..20ef531b2 100644 --- a/physics/rrtmgp_sw_gas_optics.F90 +++ b/physics/rrtmgp_sw_gas_optics.F90 @@ -5,6 +5,7 @@ module rrtmgp_sw_gas_optics use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp use mo_gas_concentrations, only: ty_gas_concs use rrtmgp_aux, only: check_error_msg + use mo_optical_props, only: ty_optical_props_2str use netcdf contains @@ -417,8 +418,79 @@ end subroutine rrtmgp_sw_gas_optics_init ! If calling rte/mo_rte_sw.F90:rte_sw() directly, place calls to compute source ! function and gas_optics() here. ! ######################################################################################### - subroutine rrtmgp_sw_gas_optics_run() - end subroutine rrtmgp_sw_gas_optics_run +!! \section arg_table_rrtmgp_sw_gas_optics_run Argument Table +!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | +!! |----------------------|----------------------------------------------|--------------------------------------------------------------------|-------|------|-----------------------|-----------|--------|----------| +!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | +!! | Radtend | GFS_radtend_type_instance | Fortran DDT containing FV3-GFS radiation tendencies | DDT | 0 | GFS_radtend_type | | in | F | +!! | sw_gas_props | coefficients_for_sw_gas_optics | DDT containing spectral information for RRTMGP SW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | +!! | ncol | horizontal_loop_extent | horizontal dimension | count | 0 | integer | | in | F | +!! | p_lay | air_pressure_at_layer_for_RRTMGP_in_hPa | air pressure layer | hPa | 2 | real | kind_phys | in | F | +!! | p_lev | air_pressure_at_interface_for_RRTMGP_in_hPa | air pressure level | hPa | 2 | real | kind_phys | in | F | +!! | t_lay | air_temperature_at_layer_for_RRTMGP | air temperature layer | K | 2 | real | kind_phys | in | F | +!! | t_lev | air_temperature_at_interface_for_RRTMGP | air temperature level | K | 2 | real | kind_phys | in | F | +!! | gas_concentrations | Gas_concentrations_for_RRTMGP_suite | DDT containing gas concentrations for RRTMGP radiation scheme | DDT | 0 | ty_gas_concs | | in | F | +!! | lsswr | flag_to_calc_sw | flag to calculate SW irradiances | flag | 0 | logical | | in | F | +!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | +!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! | optical_props_clrsky | shortwave_optical_properties_for_clear_sky | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_2str | | out | F | +!! | toa_src | Incoming_solar_irradiance_by_spectral_point | top of atmosphere incident solar flux in each spectral point | | 2 | real | kind_phys | out | F | +!! + subroutine rrtmgp_sw_gas_optics_run(Model, Radtend, sw_gas_props, ncol, p_lay, p_lev, t_lay, t_lev, & + gas_concentrations, lsswr, optical_props_clrsky, toa_src, errmsg, errflg) + + ! Inputs + type(GFS_control_type), intent(in) :: & + Model ! DDT containing model control parameters + type(GFS_radtend_type), intent(in) :: & + Radtend + + type(ty_gas_optics_rrtmgp),intent(in) :: & + sw_gas_props ! DDT containing spectral information for RRTMGP SW radiation scheme + integer,intent(in) :: & + ncol ! Number of horizontal points + real(kind_phys), dimension(ncol,model%levs), intent(in) :: & + p_lay, & ! Pressure @ model layer-centers (hPa) + t_lay ! Temperature (K) + real(kind_phys), dimension(ncol,model%levs+1), intent(in) :: & + p_lev, & ! Pressure @ model layer-interfaces (hPa) + t_lev ! Temperature @ model levels + type(ty_gas_concs),intent(in) :: & + gas_concentrations ! RRTMGP DDT: trace gas concentrations (vmr) + logical, intent(in) :: & + lsswr ! Flag to calculate SW irradiances + + ! Output + character(len=*), intent(out) :: & + errmsg ! Error message + integer, intent(out) :: & + errflg ! Error code + type(ty_optical_props_2str),intent(out) :: & + optical_props_clrsky ! + real(kind_phys),dimension(ncol,sw_gas_props%get_ngpt()),intent(out) :: & + toa_src + + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + + if (.not. Model%lsswr) return + + ! Allocate space + call check_error_msg('rrtmgp_sw_gas_optics_run',optical_props_clrsky%alloc_2str(ncol, model%levs, sw_gas_props)) + + ! Gas-optics (djs asks pincus: I think it makes sense to have a generic gas_optics interface in + ! ty_gas_optics_rrtmgp, just as in ty_gas_optics. + call check_error_msg('rrtmgp_sw_gas_optics_run',sw_gas_props%gas_optics_ext(& + p_lay, & ! + p_lev, & ! + t_lay, & ! + gas_concentrations, & ! + optical_props_clrsky, & ! + toa_src)) ! + + end subroutine rrtmgp_sw_gas_optics_run ! ######################################################################################### ! SUBROUTINE rrtmgp_sw_gas_optics_finalize diff --git a/physics/rte-rrtmgp b/physics/rte-rrtmgp index 8c3dac82c..913ee2881 160000 --- a/physics/rte-rrtmgp +++ b/physics/rte-rrtmgp @@ -1 +1 @@ -Subproject commit 8c3dac82c8de6c1575d3d89abd9314cef6edb95e +Subproject commit 913ee2881f9e589776437e61031143874e6fa916 From 044c88090bc90abada0eb6934260f5c005a8b0b7 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Tue, 11 Jun 2019 09:28:20 -0600 Subject: [PATCH 038/167] Renamed two modules. --- physics/{rrtmgp_lw.F90 => rrtmgp_lw_rte.F90} | 34 +++++++-------- physics/{rrtmgp_sw.F90 => rrtmgp_sw_rte.F90} | 44 ++++++++++---------- 2 files changed, 39 insertions(+), 39 deletions(-) rename physics/{rrtmgp_lw.F90 => rrtmgp_lw_rte.F90} (93%) rename physics/{rrtmgp_sw.F90 => rrtmgp_sw_rte.F90} (91%) diff --git a/physics/rrtmgp_lw.F90 b/physics/rrtmgp_lw_rte.F90 similarity index 93% rename from physics/rrtmgp_lw.F90 rename to physics/rrtmgp_lw_rte.F90 index 5abd2f702..c3f6ce12a 100644 --- a/physics/rrtmgp_lw.F90 +++ b/physics/rrtmgp_lw_rte.F90 @@ -1,6 +1,6 @@ ! ########################################################################################### ! ########################################################################################### -module rrtmgp_lw +module rrtmgp_lw_rte use machine, only: kind_phys use GFS_typedefs, only: GFS_control_type, GFS_radtend_type, GFS_statein_type use mo_rte_kind, only: wl @@ -12,19 +12,19 @@ module rrtmgp_lw use mo_source_functions, only: ty_source_func_lw use rrtmgp_aux, only: check_error_msg - public rrtmgp_lw_init, rrtmgp_lw_run, rrtmgp_lw_finalize + public rrtmgp_lw_rte_init, rrtmgp_lw_rte_run, rrtmgp_lw_rte_finalize contains ! ######################################################################################### - ! SUBROUTINE rrtmgp_lw_init + ! SUBROUTINE rrtmgp_lw_rte_init ! ######################################################################################### - subroutine rrtmgp_lw_init() - end subroutine rrtmgp_lw_init + subroutine rrtmgp_lw_rte_init() + end subroutine rrtmgp_lw_rte_init ! ######################################################################################### - ! SUBROUTINE rrtmgp_lw_run + ! SUBROUTINE rrtmgp_lw_rte_run ! ######################################################################################### -!! \section arg_table_rrtmgp_lw_run Argument Table +!! \section arg_table_rrtmgp_lw_rte_run Argument Table !! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | !! |-----------------------|-----------------------------------------------------------------------------------------------|---------------------------------------------------------------------|-------|------|-----------------------|-----------|--------|----------| !! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | @@ -50,7 +50,7 @@ end subroutine rrtmgp_lw_init !! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | !! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | !! - subroutine rrtmgp_lw_run(Model, Statein, Radtend, ncol, lw_gas_props, p_lay, t_lay, p_lev, & + subroutine rrtmgp_lw_rte_run(Model, Statein, Radtend, ncol, lw_gas_props, p_lay, t_lay, p_lev, & skt, sources, optical_props_clrsky, optical_props_cloud, optical_props_aerosol, lslwr,& fluxUP_allsky, fluxDOWN_allsky, fluxUP_clrsky, fluxDOWN_clrsky, hlw0, hlwb, errmsg, errflg) @@ -134,9 +134,9 @@ subroutine rrtmgp_lw_run(Model, Statein, Radtend, ncol, lw_gas_props, p_lay, t_l ! Compute clear-sky fluxes (if requested) ! Clear-sky fluxes are gas+aerosol - call check_error_msg('rrtmgp_lw_run',optical_props_aerosol%increment(optical_props_clrsky)) + call check_error_msg('rrtmgp_lw_rte_run',optical_props_aerosol%increment(optical_props_clrsky)) if (l_ClrSky_HR) then - call check_error_msg('rrtmgp_lw_run',rte_lw( & + call check_error_msg('rrtmgp_lw_rte_run',rte_lw( & optical_props_clrsky, & ! IN - optical-properties top_at_1, & ! IN - veritcal ordering flag sources, & ! IN - source function @@ -149,8 +149,8 @@ subroutine rrtmgp_lw_run(Model, Statein, Radtend, ncol, lw_gas_props, p_lay, t_l ! All-sky fluxes ! Clear-sky fluxes are (gas+aerosol)+clouds - call check_error_msg('rrtmgp_lw_run',optical_props_cloud%increment(optical_props_clrsky)) - call check_error_msg('rrtmgp_lw_run',rte_lw( & + call check_error_msg('rrtmgp_lw_rte_run',optical_props_cloud%increment(optical_props_clrsky)) + call check_error_msg('rrtmgp_lw_rte_run',rte_lw( & optical_props_clrsky, & ! IN - optical-properties top_at_1, & ! IN - veritcal ordering flag sources, & ! IN - source function @@ -160,13 +160,13 @@ subroutine rrtmgp_lw_run(Model, Statein, Radtend, ncol, lw_gas_props, p_lay, t_l fluxUP_allsky = flux_allsky%flux_up fluxDOWN_allsky = flux_allsky%flux_dn - end subroutine rrtmgp_lw_run + end subroutine rrtmgp_lw_rte_run ! ######################################################################################### - ! SUBROUTINE rrtmgp_lw_finalize + ! SUBROUTINE rrtmgp_lw_rte_finalize ! ######################################################################################### - subroutine rrtmgp_lw_finalize() - end subroutine rrtmgp_lw_finalize + subroutine rrtmgp_lw_rte_finalize() + end subroutine rrtmgp_lw_rte_finalize -end module rrtmgp_lw +end module rrtmgp_lw_rte diff --git a/physics/rrtmgp_sw.F90 b/physics/rrtmgp_sw_rte.F90 similarity index 91% rename from physics/rrtmgp_sw.F90 rename to physics/rrtmgp_sw_rte.F90 index c653fcb3e..000469093 100644 --- a/physics/rrtmgp_sw.F90 +++ b/physics/rrtmgp_sw_rte.F90 @@ -1,6 +1,6 @@ ! ########################################################################################### ! ########################################################################################### -module rrtmgp_sw +module rrtmgp_sw_rte use machine, only: kind_phys use GFS_typedefs, only: GFS_control_type, GFS_radtend_type, GFS_statein_type use mo_rte_kind, only: wl @@ -13,20 +13,20 @@ module rrtmgp_sw use module_radsw_parameters, only: cmpfsw_type use rrtmgp_aux, only: check_error_msg - public rrtmgp_sw_init, rrtmgp_sw_run, rrtmgp_sw_finalize + public rrtmgp_sw_rte_init, rrtmgp_sw_rte_run, rrtmgp_sw_rte_finalize contains ! ######################################################################################### - ! SUBROUTINE rrtmgp_sw_init + ! SUBROUTINE rrtmgp_sw_rte_init ! ######################################################################################### - subroutine rrtmgp_sw_init() - end subroutine rrtmgp_sw_init + subroutine rrtmgp_sw_rte_init() + end subroutine rrtmgp_sw_rte_init ! ######################################################################################### - ! SUBROUTINE rrtmgp_sw_run + ! SUBROUTINE rrtmgp_sw_rte_run ! ######################################################################################### -!! \section arg_table_rrtmgp_sw_run Argument Table +!! \section arg_table_rrtmgp_sw_rte_run Argument Table !! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | !! |-------------------------|------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------|-------|------|-----------------------|-----------|--------|----------| !! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | @@ -55,7 +55,7 @@ end subroutine rrtmgp_sw_init !! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | !! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | !! - subroutine rrtmgp_sw_run(Model, Radtend, Statein, ncol, sw_gas_props, p_lay, t_lay, p_lev, gas_concentrations, & + subroutine rrtmgp_sw_rte_run(Model, Radtend, Statein, ncol, sw_gas_props, p_lay, t_lay, p_lev, gas_concentrations, & optical_props_clrsky, optical_props_cloud, optical_props_aerosol, & lsswr, nday, idxday, toa_src, hsw0, hswb, scmpsw, & fluxUP_allsky, fluxDOWN_allsky, fluxUP_clrsky, fluxDOWN_clrsky, errmsg, errflg) @@ -158,25 +158,25 @@ subroutine rrtmgp_sw_run(Model, Radtend, Statein, ncol, sw_gas_props, p_lay, t_l ! Subset the cloud and aerosol radiative properties over daylit points. ! Cloud optics [nDay,Model%levs,nGpts] - call check_error_msg('rrtmgp_sw_run',optical_props_cloud_daylit%alloc_2str(nday, Model%levs, sw_gas_props)) + call check_error_msg('rrtmgp_sw_rte_run',optical_props_cloud_daylit%alloc_2str(nday, Model%levs, sw_gas_props)) optical_props_cloud_daylit%tau = optical_props_cloud%tau(idxday,:,:) optical_props_cloud_daylit%ssa = optical_props_cloud%ssa(idxday,:,:) optical_props_cloud_daylit%g = optical_props_cloud%g(idxday,:,:) ! Aerosol optics [nDay,Model%levs,nBands] - call check_error_msg('rrtmgp_sw_run',optical_props_aerosol_daylit%alloc_2str(nday, Model%levs, sw_gas_props%get_band_lims_wavenumber())) + call check_error_msg('rrtmgp_sw_rte_run',optical_props_aerosol_daylit%alloc_2str(nday, Model%levs, sw_gas_props%get_band_lims_wavenumber())) optical_props_aerosol_daylit%tau = optical_props_aerosol%tau(idxday,:,:) optical_props_aerosol_daylit%ssa = optical_props_aerosol%ssa(idxday,:,:) optical_props_aerosol_daylit%g = optical_props_aerosol%g(idxday,:,:) ! Clear-sky optics [nDay,Model%levs,nGpts] - call check_error_msg('rrtmgp_sw_run',optical_props_clrsky_daylit%alloc_2str(nday, Model%levs, sw_gas_props)) + call check_error_msg('rrtmgp_sw_rte_run',optical_props_clrsky_daylit%alloc_2str(nday, Model%levs, sw_gas_props)) optical_props_clrsky_daylit%tau = optical_props_clrsky%tau(idxday,:,:) optical_props_clrsky_daylit%ssa = optical_props_clrsky%ssa(idxday,:,:) optical_props_clrsky_daylit%g = optical_props_clrsky%g(idxday,:,:) ! Similarly, subset the gas concentrations. do iGas=1,Model%nGases - call check_error_msg('rrtmgp_sw_run',gas_concentrations%get_vmr(trim(Radtend%active_gases(iGas,1)),vmrTemp)) - call check_error_msg('rrtmgp_sw_run',gas_concentrations_daylit%set_vmr(trim(Radtend%active_gases(iGas,1)),vmrTemp(idxday,:))) + call check_error_msg('rrtmgp_sw_rte_run',gas_concentrations%get_vmr(trim(Radtend%active_gases(iGas,1)),vmrTemp)) + call check_error_msg('rrtmgp_sw_rte_run',gas_concentrations_daylit%set_vmr(trim(Radtend%active_gases(iGas,1)),vmrTemp(idxday,:))) enddo ! Initialize RRTMGP DDT containing 2D(3D) fluxes @@ -192,9 +192,9 @@ subroutine rrtmgp_sw_run(Model, Radtend, Statein, ncol, sw_gas_props, p_lay, t_l ! Compute clear-sky fluxes (if requested) ! Clear-sky fluxes are gas+aerosol - call check_error_msg('rrtmgp_sw_run',optical_props_aerosol_daylit%increment(optical_props_clrsky_daylit)) + call check_error_msg('rrtmgp_sw_rte_run',optical_props_aerosol_daylit%increment(optical_props_clrsky_daylit)) if (l_ClrSky_HR) then - call check_error_msg('rrtmgp_sw_run',rte_sw( & + call check_error_msg('rrtmgp_sw_rte_run',rte_sw( & optical_props_clrsky_daylit, & ! IN - optical-properties top_at_1, & ! IN - veritcal ordering flag Radtend%coszen(idxday), & ! IN - Cosine of solar zenith angle @@ -208,8 +208,8 @@ subroutine rrtmgp_sw_run(Model, Radtend, Statein, ncol, sw_gas_props, p_lay, t_l endif ! Compute all-sky fluxes - call check_error_msg('rrtmgp_sw_run',optical_props_cloud_daylit%increment(optical_props_clrsky_daylit)) - call check_error_msg('rrtmgp_sw_run',rte_sw( & + call check_error_msg('rrtmgp_sw_rte_run',optical_props_cloud_daylit%increment(optical_props_clrsky_daylit)) + call check_error_msg('rrtmgp_sw_rte_run',rte_sw( & optical_props_clrsky_daylit, & ! IN - optical-properties top_at_1, & ! IN - veritcal ordering flag Radtend%coszen(idxday), & ! IN - Cosine of solar zenith angle @@ -222,12 +222,12 @@ subroutine rrtmgp_sw_run(Model, Radtend, Statein, ncol, sw_gas_props, p_lay, t_l fluxDOWN_allsky(idxday,:) = flux_allsky%flux_dn endif - end subroutine rrtmgp_sw_run + end subroutine rrtmgp_sw_rte_run ! ######################################################################################### - ! SUBROUTINE rrtmgp_sw_finalize + ! SUBROUTINE rrtmgp_sw_rte_finalize ! ######################################################################################### - subroutine rrtmgp_sw_finalize() - end subroutine rrtmgp_sw_finalize + subroutine rrtmgp_sw_rte_finalize() + end subroutine rrtmgp_sw_rte_finalize -end module rrtmgp_sw +end module rrtmgp_sw_rte From c9a357a9d3b3bcc732b4211d3caa88d9bbf5757a Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Wed, 12 Jun 2019 09:39:56 -0600 Subject: [PATCH 039/167] Added calls to compute_bc() in LW and SW gas_optics. Small bug found in mo_compute_bc. Work in progress. --- physics/GFS_rrtmgp_pre.F90 | 45 ++++++++++++++-------- physics/GFS_rrtmgp_setup.F90 | 12 +++--- physics/rrtmgp_lw_gas_optics.F90 | 66 +++++++++++++++++++------------- physics/rrtmgp_sw_gas_optics.F90 | 46 +++++++++++++--------- physics/rrtmgp_sw_rte.F90 | 2 +- 5 files changed, 102 insertions(+), 69 deletions(-) diff --git a/physics/GFS_rrtmgp_pre.F90 b/physics/GFS_rrtmgp_pre.F90 index 1b37044b5..95d404283 100644 --- a/physics/GFS_rrtmgp_pre.F90 +++ b/physics/GFS_rrtmgp_pre.F90 @@ -18,13 +18,9 @@ module GFS_rrtmgp_pre eps => con_eps, & ! Rd/Rv epsm1 => con_epsm1, & ! Rd/Rv-1 fvirt => con_fvirt, & ! Rv/Rd-1 - rog => con_rog, & ! Rd/g - rocp => con_rocp ! Rd/cp + rog => con_rog ! Rd/g use radcons, only: & - itsfc, & ! Flag for LW sfc. temp. - ltp, & ! 1-add extra-top layer; 0-no extra layer - lextop, & ! ltp > 0 - qmin,qme5, qme6, epsq ! Minimum vlaues for varius calculations + qmin, epsq ! Minimum vlaues for varius calculations use funcphys, only: & fpvs ! Function ot compute sat. vapor pressure over liq. use module_radiation_astronomy,only: & @@ -165,7 +161,7 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, errmsg ! Error message integer, intent(out) :: & errflg ! Error flag - real(kind_phys), dimension(ncol,Model%levr+LTP),intent(out) :: & + real(kind_phys), dimension(ncol,Model%levr),intent(out) :: & cld_frac, & ! Total cloud fraction cld_lwp, & ! Cloud liquid water path cld_reliq, & ! Cloud liquid effective radius @@ -222,24 +218,39 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, ! ####################################################################################### ! Compute some fields needed by RRTMGP ! ####################################################################################### - ! Copy state fields over for use in RRTMGP - p_lev(1:NCOL,iSFC:iTOA) = Statein%prsi(1:NCOL,1:Model%levs) - p_lev(1:NCOL,iTOA+1) = spread(lw_gas_props%get_press_min(),dim=1, ncopies=NCOL) - p_lay(1:NCOL,iSFC:iTOA) = Statein%prsl(1:NCOL,1:Model%levs) - t_lay(1:NCOL,iSFC:iTOA) = Statein%tgrs(1:NCOL,1:Model%levs) - - ! Compute layer pressure thicknes - deltaP = p_lev(:,iSFC:iTOA)-p_lev(:,iSFC+1:iTOA+1) - ! Compute temperature at layer-interfaces + ! Pressure at layer-interface + p_lev(1:NCOL,iSFC:iTOA+1) = Statein%prsi(1:NCOL,1:Model%levs+1) + ! + ! Pressure at layer-center + p_lay(1:NCOL,iSFC:iTOA) = Statein%prsl(1:NCOL,1:Model%levs) + ! + ! Temperature at layer-center + t_lay(1:NCOL,iSFC:iTOA) = Statein%tgrs(1:NCOL,1:Model%levs) + ! + ! Temperature at layer-interfaces t_lev(1:NCOL,iSFC) = Sfcprop%tsfc(1:NCOL) do iCol=1,NCOL do iLay=iSFC+1,iTOA t_lev(iCol,iLay) = (t_lay(iCol,iLay)+t_lay(iCol,iLay-1))/2._kind_phys enddo - t_lev(iCol,iTOA+1) = lw_gas_props%get_temp_min() + t_lev(iCol,iTOA+1) = t_lev(iCol,iTOA) + (p_lev(iCol,iTOA+1)-p_lev(iCOL,iTOA))*& + (t_lev(iCol,iTOA)-t_lay(iCOL,iTOA))/(p_lev(iCol,iTOA)-p_lay(iCOL,iTOA)) enddo + ! Guard against case when model uppermost model layer higher than rrtmgp allows. + where(p_lev(1:nCol,iTOA+1) .lt. lw_gas_props%get_press_min()) + ! Set to RRTMGP min(pressure/temperature) + p_lev(1:nCol,iTOA+1) = spread(lw_gas_props%get_press_min(),dim=1,ncopies=ncol) + t_lev(1:nCol,iTOA+1) = spread(lw_gas_props%get_temp_min(),dim=1,ncopies=ncol) + ! Recompute layer pressure/temperature. + p_lay(1:NCOL,iTOA) = 0.5_kind_phys*(p_lev(1:NCOL,iTOA) + p_lev(1:NCOL,iTOA+1)) + t_lay(1:NCOL,iTOA) = 0.5_kind_phys*(t_lev(1:NCOL,iTOA) + t_lev(1:NCOL,iTOA+1)) + end where + + ! Compute layer pressure thicknes + deltaP = p_lev(:,iSFC:iTOA)-p_lev(:,iSFC+1:iTOA+1) + ! Compute a bunch of thermodynamic fields needed by the macrophysics schemes. Relative humidity, ! saturation mixing-ratio, vapor mixing-ratio, virtual temperature, layer thickness,... do iCol=1,NCOL diff --git a/physics/GFS_rrtmgp_setup.F90 b/physics/GFS_rrtmgp_setup.F90 index 6b7ada945..8307d1aa8 100644 --- a/physics/GFS_rrtmgp_setup.F90 +++ b/physics/GFS_rrtmgp_setup.F90 @@ -10,7 +10,6 @@ module GFS_rrtmgp_setup & iswcliq, & & kind_phys - use radcons, only: ltp, lextop implicit none @@ -227,9 +226,9 @@ subroutine GFS_rrtmgp_setup_init ( & integer, intent(out) :: errflg ! For consistency checks - real(kind_phys), dimension(im,levr+ltp,NBDLW,NF_AELW) :: faerlw_check - real(kind_phys), dimension(im,levr+ltp,NBDSW,NF_AESW) :: faersw_check - real(kind_phys), dimension(im,NSPC1) :: aerodp_check + real(kind_phys), dimension(im,levr,NBDLW,NF_AELW) :: faerlw_check + real(kind_phys), dimension(im,levr,NBDSW,NF_AESW) :: faersw_check + real(kind_phys), dimension(im,NSPC1) :: aerodp_check ! End for consistency checks ! Initialize the CCPP error handling variables @@ -244,7 +243,7 @@ subroutine GFS_rrtmgp_setup_init ( & if (size(faerlw(1,:,:,:)).ne.size(faerlw_check(1,:,:,:))) then write(errmsg,"(3a,4i4,a,4i4)") & "Runtime error: dimension mismatch for faerlw,", & - " check definitions of levr, ltp, nbdlw, nf_aelw:", & + " check definitions of Model%levs, nbdlw, nf_aelw:", & " expected shape ", shape(faerlw_check(:,:,:,:)), & " but got ", shape(faerlw(:,:,:,:)) errflg = 1 @@ -253,7 +252,7 @@ subroutine GFS_rrtmgp_setup_init ( & if (size(faersw(1,:,:,:)).ne.size(faersw_check(1,:,:,:))) then write(errmsg,"(3a,4i4,a,4i4)") & "Runtime error: dimension mismatch for faersw,", & - " check definitions of levr, ltp, nbdsw, nf_aesw:", & + " check definitions of Model%levs, nbdsw, nf_aesw:", & " expected shape ", shape(faersw_check(:,:,:,:)), & " but got ", shape(faersw(:,:,:,:)) errflg = 1 @@ -592,7 +591,6 @@ subroutine radinit( si, NLAY, imp_physics, me ) ! write(0,*)' IVFLIP=',ivflip,' IOVRSW=',iovrsw,' IOVRLW=',iovrlw,& ! & ' ISUBCSW=',isubcsw,' ISUBCLW=',isubclw print *,' LCRICK=',lcrick,' LCNORM=',lcnorm,' LNOPREC=',lnoprec - print *,' LTP =',ltp,', add extra top layer =',lextop if ( ictmflg==0 .or. ictmflg==-2 ) then print *,' Data usage is limited by initial condition!' diff --git a/physics/rrtmgp_lw_gas_optics.F90 b/physics/rrtmgp_lw_gas_optics.F90 index 29e5d203b..da88f4f53 100644 --- a/physics/rrtmgp_lw_gas_optics.F90 +++ b/physics/rrtmgp_lw_gas_optics.F90 @@ -6,6 +6,7 @@ module rrtmgp_lw_gas_optics use mo_gas_concentrations, only: ty_gas_concs use mo_source_functions, only: ty_source_func_lw use mo_optical_props, only: ty_optical_props_1scl + use mo_compute_bc, only: compute_bc use rrtmgp_aux, only: check_error_msg use netcdf @@ -422,26 +423,27 @@ end subroutine rrtmgp_lw_gas_optics_init ! function and gas_optics() here. ! ######################################################################################### !! \section arg_table_rrtmgp_lw_gas_optics_run Argument Table -!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | -!! |----------------------|----------------------------------------------|--------------------------------------------------------------------|-------|------|-----------------------|-----------|--------|----------| -!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | -!! | Radtend | GFS_radtend_type_instance | Fortran DDT containing FV3-GFS radiation tendencies | DDT | 0 | GFS_radtend_type | | in | F | -!! | lw_gas_props | coefficients_for_lw_gas_optics | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | -!! | ncol | horizontal_loop_extent | horizontal dimension | count | 0 | integer | | in | F | -!! | p_lay | air_pressure_at_layer_for_RRTMGP_in_hPa | air pressure layer | hPa | 2 | real | kind_phys | in | F | -!! | p_lev | air_pressure_at_interface_for_RRTMGP_in_hPa | air pressure level | hPa | 2 | real | kind_phys | in | F | -!! | t_lay | air_temperature_at_layer_for_RRTMGP | air temperature layer | K | 2 | real | kind_phys | in | F | -!! | t_lev | air_temperature_at_interface_for_RRTMGP | air temperature level | K | 2 | real | kind_phys | in | F | -!! | skt | surface_ground_temperature_for_radiation | surface ground temperature for radiation | K | 1 | real | kind_phys | in | F | -!! | gas_concentrations | Gas_concentrations_for_RRTMGP_suite | DDT containing gas concentrations for RRTMGP radiation scheme | DDT | 0 | ty_gas_concs | | in | F | -!! | lslwr | flag_to_calc_lw | flag to calculate LW irradiances | flag | 0 | logical | | in | F | -!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | -!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | -!! | optical_props_clrsky | longwave_optical_properties_for_clear_sky | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_1scl | | out | F | -!! | sources_LW | longwave_source_function | Fortran DDT containing RRTMGP source functions | DDT | 0 | ty_source_func_lw | | out | F | +!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | +!! |----------------------|------------------------------------------------------------------------|--------------------------------------------------------------------|-------|------|-----------------------|-----------|--------|----------| +!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | +!! | Radtend | GFS_radtend_type_instance | Fortran DDT containing FV3-GFS radiation tendencies | DDT | 0 | GFS_radtend_type | | in | F | +!! | lw_gas_props | coefficients_for_lw_gas_optics | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | +!! | ncol | horizontal_loop_extent | horizontal dimension | count | 0 | integer | | in | F | +!! | p_lay | air_pressure_at_layer_for_RRTMGP_in_hPa | air pressure layer | hPa | 2 | real | kind_phys | in | F | +!! | p_lev | air_pressure_at_interface_for_RRTMGP_in_hPa | air pressure level | hPa | 2 | real | kind_phys | in | F | +!! | t_lay | air_temperature_at_layer_for_RRTMGP | air temperature layer | K | 2 | real | kind_phys | in | F | +!! | t_lev | air_temperature_at_interface_for_RRTMGP | air temperature level | K | 2 | real | kind_phys | in | F | +!! | skt | surface_ground_temperature_for_radiation | surface ground temperature for radiation | K | 1 | real | kind_phys | in | F | +!! | gas_concentrations | Gas_concentrations_for_RRTMGP_suite | DDT containing gas concentrations for RRTMGP radiation scheme | DDT | 0 | ty_gas_concs | | in | F | +!! | lslwr | flag_to_calc_lw | flag to calculate LW irradiances | flag | 0 | logical | | in | F | +!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | +!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! | optical_props_clrsky | longwave_optical_properties_for_clear_sky | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_1scl | | out | F | +!! | sources_LW | longwave_source_function | Fortran DDT containing RRTMGP source functions | DDT | 0 | ty_source_func_lw | | out | F | +!! | toa_src | incident_terrestrial_irradiance_at_top_of_atmosphere_by_spectral_point | top of atmosphere incident terrestrial flux in each spectral point | | 2 | real | kind_phys | out | F | !! subroutine rrtmgp_lw_gas_optics_run(Model, Radtend, lw_gas_props, ncol, p_lay, p_lev, t_lay, t_lev, skt, & - gas_concentrations, lslwr, optical_props_clrsky, sources_LW, errmsg, errflg) + gas_concentrations, lslwr, optical_props_clrsky, sources_LW, toa_src, errmsg, errflg) ! Inputs type(GFS_control_type), intent(in) :: & @@ -475,6 +477,8 @@ subroutine rrtmgp_lw_gas_optics_run(Model, Radtend, lw_gas_props, ncol, p_lay, p optical_props_clrsky ! type(ty_source_func_lw),intent(out) :: & sources_LW + real(kind_phys),dimension(ncol,lw_gas_props%get_ngpt()),intent(out) :: & + toa_src ! Initialize CCPP error handling variables errmsg = '' @@ -487,18 +491,28 @@ subroutine rrtmgp_lw_gas_optics_run(Model, Radtend, lw_gas_props, ncol, p_lay, p call check_error_msg('rrtmgp_lw_gas_optics_run',sources_LW%init(lw_gas_props)) call check_error_msg('rrtmgp_lw_gas_optics_run',sources_LW%alloc(ncol, Model%levs)) + ! Compute boundary-condition (Only do for low-ceiling models) + !call check_error_msg('rrtmgp_lw_gas_optics_run',compute_bc(& + ! lw_gas_props, & ! IN - + ! p_lay, & ! IN - + ! p_lev, & ! IN - + ! t_lay, & ! IN - + ! gas_concentrations, & ! IN - + ! toa_src)) ! OUT - + ! Gas-optics (djs asks pincus: I think it makes sense to have a generic gas_optics interface in ! ty_gas_optics_rrtmgp, just as in ty_gas_optics. call check_error_msg('rrtmgp_lw_gas_optics_run',lw_gas_props%gas_optics_int(& - p_lay, & ! - p_lev, & ! - t_lay, & ! - skt, & ! - gas_concentrations, & ! - optical_props_clrsky, & ! - sources_LW, & ! - tlev=t_lev)) ! + p_lay, & ! IN - + p_lev, & ! IN - + t_lay, & ! IN - + skt, & ! IN - + gas_concentrations, & ! IN - + optical_props_clrsky, & ! OUT - + sources_LW, & ! OUT - + tlev=t_lev)) ! IN - + print*,'END LW_GAS_OPTICS:' end subroutine rrtmgp_lw_gas_optics_run ! ######################################################################################### diff --git a/physics/rrtmgp_sw_gas_optics.F90 b/physics/rrtmgp_sw_gas_optics.F90 index 20ef531b2..b25ce53fb 100644 --- a/physics/rrtmgp_sw_gas_optics.F90 +++ b/physics/rrtmgp_sw_gas_optics.F90 @@ -6,6 +6,7 @@ module rrtmgp_sw_gas_optics use mo_gas_concentrations, only: ty_gas_concs use rrtmgp_aux, only: check_error_msg use mo_optical_props, only: ty_optical_props_2str + use mo_compute_bc, only: compute_bc use netcdf contains @@ -419,22 +420,22 @@ end subroutine rrtmgp_sw_gas_optics_init ! function and gas_optics() here. ! ######################################################################################### !! \section arg_table_rrtmgp_sw_gas_optics_run Argument Table -!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | -!! |----------------------|----------------------------------------------|--------------------------------------------------------------------|-------|------|-----------------------|-----------|--------|----------| -!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | -!! | Radtend | GFS_radtend_type_instance | Fortran DDT containing FV3-GFS radiation tendencies | DDT | 0 | GFS_radtend_type | | in | F | -!! | sw_gas_props | coefficients_for_sw_gas_optics | DDT containing spectral information for RRTMGP SW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | -!! | ncol | horizontal_loop_extent | horizontal dimension | count | 0 | integer | | in | F | -!! | p_lay | air_pressure_at_layer_for_RRTMGP_in_hPa | air pressure layer | hPa | 2 | real | kind_phys | in | F | -!! | p_lev | air_pressure_at_interface_for_RRTMGP_in_hPa | air pressure level | hPa | 2 | real | kind_phys | in | F | -!! | t_lay | air_temperature_at_layer_for_RRTMGP | air temperature layer | K | 2 | real | kind_phys | in | F | -!! | t_lev | air_temperature_at_interface_for_RRTMGP | air temperature level | K | 2 | real | kind_phys | in | F | -!! | gas_concentrations | Gas_concentrations_for_RRTMGP_suite | DDT containing gas concentrations for RRTMGP radiation scheme | DDT | 0 | ty_gas_concs | | in | F | -!! | lsswr | flag_to_calc_sw | flag to calculate SW irradiances | flag | 0 | logical | | in | F | -!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | -!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | -!! | optical_props_clrsky | shortwave_optical_properties_for_clear_sky | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_2str | | out | F | -!! | toa_src | Incoming_solar_irradiance_by_spectral_point | top of atmosphere incident solar flux in each spectral point | | 2 | real | kind_phys | out | F | +!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | +!! |----------------------|------------------------------------------------------------------|--------------------------------------------------------------------|-------|------|-----------------------|-----------|--------|----------| +!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | +!! | Radtend | GFS_radtend_type_instance | Fortran DDT containing FV3-GFS radiation tendencies | DDT | 0 | GFS_radtend_type | | in | F | +!! | sw_gas_props | coefficients_for_sw_gas_optics | DDT containing spectral information for RRTMGP SW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | +!! | ncol | horizontal_loop_extent | horizontal dimension | count | 0 | integer | | in | F | +!! | p_lay | air_pressure_at_layer_for_RRTMGP_in_hPa | air pressure layer | hPa | 2 | real | kind_phys | in | F | +!! | p_lev | air_pressure_at_interface_for_RRTMGP_in_hPa | air pressure level | hPa | 2 | real | kind_phys | in | F | +!! | t_lay | air_temperature_at_layer_for_RRTMGP | air temperature layer | K | 2 | real | kind_phys | in | F | +!! | t_lev | air_temperature_at_interface_for_RRTMGP | air temperature level | K | 2 | real | kind_phys | in | F | +!! | gas_concentrations | Gas_concentrations_for_RRTMGP_suite | DDT containing gas concentrations for RRTMGP radiation scheme | DDT | 0 | ty_gas_concs | | in | F | +!! | lsswr | flag_to_calc_sw | flag to calculate SW irradiances | flag | 0 | logical | | in | F | +!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | +!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! | optical_props_clrsky | shortwave_optical_properties_for_clear_sky | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_2str | | out | F | +!! | toa_src | incident_solar_irradiance_at_top_of_atmosphere_by_spectral_point | top of atmosphere incident solar flux in each spectral point | | 2 | real | kind_phys | out | F | !! subroutine rrtmgp_sw_gas_optics_run(Model, Radtend, sw_gas_props, ncol, p_lay, p_lev, t_lay, t_lev, & gas_concentrations, lsswr, optical_props_clrsky, toa_src, errmsg, errflg) @@ -470,7 +471,6 @@ subroutine rrtmgp_sw_gas_optics_run(Model, Radtend, sw_gas_props, ncol, p_lay, p real(kind_phys),dimension(ncol,sw_gas_props%get_ngpt()),intent(out) :: & toa_src - ! Initialize CCPP error handling variables errmsg = '' errflg = 0 @@ -488,7 +488,17 @@ subroutine rrtmgp_sw_gas_optics_run(Model, Radtend, sw_gas_props, ncol, p_lay, p t_lay, & ! gas_concentrations, & ! optical_props_clrsky, & ! - toa_src)) ! + toa_src)) ! + + ! Compute boundary-condition (only for low ceiling models, set in GFS_typedefs.F90) + !call check_error_msg('rrtmgp_sw_gas_optics_run',compute_bc(& + ! sw_gas_props, & ! IN - + ! p_lay, & ! IN - + ! p_lev, & ! IN - + ! t_lay, & ! IN - + ! gas_concentrations, & ! IN - + ! toa_src, & ! OUT - + ! mu0 = Radtend%coszen)) end subroutine rrtmgp_sw_gas_optics_run diff --git a/physics/rrtmgp_sw_rte.F90 b/physics/rrtmgp_sw_rte.F90 index 000469093..35977d5e0 100644 --- a/physics/rrtmgp_sw_rte.F90 +++ b/physics/rrtmgp_sw_rte.F90 @@ -44,7 +44,7 @@ end subroutine rrtmgp_sw_rte_init !! | lsswr | flag_to_calc_sw | flag to calculate SW irradiances | flag | 0 | logical | | in | F | !! | nday | daytime_points_dimension | daytime points dimension | count | 0 | integer | | in | F | !! | idxday | daytime_points | daytime points | index | 1 | integer | | in | F | -!! | toa_src | Incoming_solar_irradiance_by_spectral_point | top of atmosphere incident solar flux in each spectral point | | 2 | real | kind_phys | in | F | +!! | toa_src | incident_solar_irradiance_at_top_of_atmosphere_by_spectral_point | top of atmosphere incident solar flux in each spectral point | | 2 | real | kind_phys | in | F | !! | hsw0 | tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_time_step | shortwave clear sky heating rate | K s-1 | 2 | real | kind_phys | inout | T | !! | hswb | sw_heating_rate_spectral | shortwave total sky heating rate (spectral) | K s-1 | 3 | real | kind_phys | inout | T | !! | scmpsw | components_of_surface_downward_shortwave_fluxes | derived type for special components of surface downward shortwave fluxes | W m-2 | 1 | cmpfsw_type | | inout | T | From 9e5405c33e51962594cfd39762fa23eb9e548d5f Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Thu, 13 Jun 2019 16:29:43 -0600 Subject: [PATCH 040/167] Fixed indexing error for output fluxes. --- physics/GFS_rrtmgp_sw_post.F90 | 1 + physics/rrtmgp_lw_gas_optics.F90 | 1 - physics/rrtmgp_lw_rte.F90 | 2 +- physics/rrtmgp_sw_rte.F90 | 2 +- 4 files changed, 3 insertions(+), 3 deletions(-) diff --git a/physics/GFS_rrtmgp_sw_post.F90 b/physics/GFS_rrtmgp_sw_post.F90 index 754d5e46c..565925864 100644 --- a/physics/GFS_rrtmgp_sw_post.F90 +++ b/physics/GFS_rrtmgp_sw_post.F90 @@ -182,6 +182,7 @@ subroutine GFS_rrtmgp_sw_post_run (Model, Grid, Diag, Radtend, Coupling, & ! Mandatory outputs topflx_sw%upfxc = fluxswUP_allsky(:,iTOA) topflx_sw%upfx0 = fluxswUP_clrsky(:,iTOA) + topflx_sw%dnfxc = fluxswDOWN_allsky(:,iTOA) sfcflx_sw%upfxc = fluxswUP_allsky(:,iSFC) sfcflx_sw%upfx0 = fluxswUP_clrsky(:,iSFC) sfcflx_sw%dnfxc = fluxswDOWN_allsky(:,iSFC) diff --git a/physics/rrtmgp_lw_gas_optics.F90 b/physics/rrtmgp_lw_gas_optics.F90 index da88f4f53..5b92f8894 100644 --- a/physics/rrtmgp_lw_gas_optics.F90 +++ b/physics/rrtmgp_lw_gas_optics.F90 @@ -512,7 +512,6 @@ subroutine rrtmgp_lw_gas_optics_run(Model, Radtend, lw_gas_props, ncol, p_lay, p sources_LW, & ! OUT - tlev=t_lev)) ! IN - - print*,'END LW_GAS_OPTICS:' end subroutine rrtmgp_lw_gas_optics_run ! ######################################################################################### diff --git a/physics/rrtmgp_lw_rte.F90 b/physics/rrtmgp_lw_rte.F90 index c3f6ce12a..870a1a8f6 100644 --- a/physics/rrtmgp_lw_rte.F90 +++ b/physics/rrtmgp_lw_rte.F90 @@ -87,7 +87,7 @@ subroutine rrtmgp_lw_rte_run(Model, Statein, Radtend, ncol, lw_gas_props, p_lay, errmsg ! CCPP error message integer, intent(out) :: & errflg ! CCPP error flag - real(kind_phys), dimension(ncol,model%levs), intent(out) :: & + real(kind_phys), dimension(ncol,model%levs+1), intent(out) :: & fluxUP_allsky, & ! All-sky flux (W/m2) fluxDOWN_allsky, & ! All-sky flux (W/m2) fluxUP_clrsky, & ! Clear-sky flux (W/m2) diff --git a/physics/rrtmgp_sw_rte.F90 b/physics/rrtmgp_sw_rte.F90 index 35977d5e0..486bbb8cb 100644 --- a/physics/rrtmgp_sw_rte.F90 +++ b/physics/rrtmgp_sw_rte.F90 @@ -94,7 +94,7 @@ subroutine rrtmgp_sw_rte_run(Model, Radtend, Statein, ncol, sw_gas_props, p_lay, ! Outputs character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg - real(kind_phys), dimension(ncol,Model%levs), intent(out) :: & + real(kind_phys), dimension(ncol,Model%levs+1), intent(out) :: & fluxUP_allsky, & ! All-sky flux (W/m2) fluxDOWN_allsky, & ! All-sky flux (W/m2) fluxUP_clrsky, & ! Clear-sky flux (W/m2) From c445658417197b59c08e4d287a1aa88f4c041800 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Thu, 20 Jun 2019 09:23:00 -0600 Subject: [PATCH 041/167] Fixed a few bugs, some housekeeping. --- physics/GFS_rrtmg_pre.F90 | 43 ---------------------- physics/GFS_rrtmgp_lw_post.F90 | 4 +- physics/GFS_rrtmgp_pre.F90 | 61 +++++-------------------------- physics/GFS_rrtmgp_sw_post.F90 | 38 +++++++++---------- physics/radlw_main.f | 22 +---------- physics/rrtmg_sw_cloud_optics.F90 | 18 ++++----- physics/rrtmgp_sw_rte.F90 | 22 +++++++---- 7 files changed, 56 insertions(+), 152 deletions(-) diff --git a/physics/GFS_rrtmg_pre.F90 b/physics/GFS_rrtmg_pre.F90 index 8b930d370..c92512698 100644 --- a/physics/GFS_rrtmg_pre.F90 +++ b/physics/GFS_rrtmg_pre.F90 @@ -734,49 +734,6 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input cldcov = 0.0 endif - - ! DJS2019: START Hack - ! Compute layer cloud fraction. - clwmin = 0.0 - cldcov(:,:) = 0.0 - if (.not. Model%lmfshal) then - do k = 1, LMK - do i = 1, IM - clwt = 1.0e-6 * (plyr(i,k)*0.001) - if (ccnd(i,k,1) > 0.) then - onemrh= max( 1.e-10, 1.0-rhly(i,k) ) - clwm = clwmin / max( 0.01, plyr(i,k)*0.001 ) - tem1 = min(max(sqrt(sqrt(onemrh*qstl(i,k))),0.0001),1.0) - tem1 = 2000.0 / tem1 - value = max( min( tem1*(ccnd(i,k,1)-clwm), 50.0 ), 0.0 ) - tem2 = sqrt( sqrt(rhly(i,k)) ) - cldcov(i,k) = max( tem2*(1.0-exp(-value)), 0.0 ) - endif - enddo - enddo - else - do k = 1, LMK - do i = 1, IM - clwt = 1.0e-6 * (plyr(i,k)*0.001) - if (ccnd(i,k,1) > 0.) then - onemrh= max( 1.e-10, 1.0-rhly(i,k) ) - clwm = clwmin / max( 0.01, plyr(i,k)*0.001 ) - tem1 = min(max((onemrh*qstl(i,k))**0.49,0.0001),1.0) !jhan - if (Model%lmfdeep2) then - tem1 = xrc3 / tem1 - else - tem1 = 100.0 / tem1 - endif - value = max( min( tem1*(ccnd(i,k,1)-clwm), 50.0 ), 0.0 ) - tem2 = sqrt( sqrt(rhly(i,k)) ) - cldcov(i,k) = max( tem2*(1.0-exp(-value)), 0.0 ) - endif - enddo - enddo - endif - ! DJS2019: END - - if (Model%imp_physics == 99 .or. Model%imp_physics == 10) then ! zhao/moorthi's prognostic cloud scheme ! or unified cloud and/or with MG microphysics diff --git a/physics/GFS_rrtmgp_lw_post.F90 b/physics/GFS_rrtmgp_lw_post.F90 index 2a5743159..b742f8543 100644 --- a/physics/GFS_rrtmgp_lw_post.F90 +++ b/physics/GFS_rrtmgp_lw_post.F90 @@ -120,11 +120,11 @@ subroutine GFS_rrtmgp_lw_post_run (Model, Grid, Radtend, & ! ####################################################################################### top_at_1 = (p_lev(1,1) .lt. p_lev(1, Model%levs)) if (top_at_1) then - iSFC = Model%levs + iSFC = Model%levs+1 iTOA = 1 else iSFC = 1 - iTOA = Model%levs + iTOA = Model%levs+1 endif ! ####################################################################################### diff --git a/physics/GFS_rrtmgp_pre.F90 b/physics/GFS_rrtmgp_pre.F90 index 95d404283..c6acacaaa 100644 --- a/physics/GFS_rrtmgp_pre.F90 +++ b/physics/GFS_rrtmgp_pre.F90 @@ -99,6 +99,7 @@ end subroutine GFS_rrtmgp_pre_init !! | faersw | aerosol_optical_properties_for_shortwave_bands_01-16 | aerosol optical properties for shortwave bands 01-16 | various | 4 | real | kind_phys | out | F | !! | mtopa | model_layer_number_at_cloud_top | vertical indices for low, middle and high cloud tops | index | 2 | integer | | out | F | !! | mbota | model_layer_number_at_cloud_base | vertical indices for low, middle and high cloud bases | index | 2 | integer | | out | F | +!! | de_lgth | cloud_decorrelation_length | cloud decorrelation length | km | 1 | real | kind_phys | out | F | !! | cldsa | cloud_area_fraction_for_radiation | fraction of clouds for low, middle, high, total and BL | frac | 2 | real | kind_phys | out | F | !! | aerodp | atmosphere_optical_thickness_due_to_ambient_aerosol_particles | vertical integrated optical depth for various aerosol species | none | 2 | real | kind_phys | out | F | !! | alb1d | surface_albedo_perturbation | surface albedo perturbation | frac | 1 | real | kind_phys | out | F | @@ -114,7 +115,7 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, ncol, lw_gas_props, sw_gas_props, & ! IN raddt, p_lay, t_lay, p_lev, t_lev, tsfg, tsfa, alb1d, cld_frac, cld_lwp, & ! OUT cld_reliq, cld_iwp, cld_reice, cld_swp, cld_resnow, cld_rwp, cld_rerain, faerlw, & ! OUT - faersw, cldsa, mtopa, mbota, aerodp, nday, idxday, gas_concentrations, errmsg, errflg) + faersw, cldsa, mtopa, mbota, de_lgth, aerodp, nday, idxday, gas_concentrations, errmsg, errflg) ! Inputs type(GFS_control_type), intent(in) :: & @@ -161,7 +162,7 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, errmsg ! Error message integer, intent(out) :: & errflg ! Error flag - real(kind_phys), dimension(ncol,Model%levr),intent(out) :: & + real(kind_phys), dimension(ncol,Model%levs),intent(out) :: & cld_frac, & ! Total cloud fraction cld_lwp, & ! Cloud liquid water path cld_reliq, & ! Cloud liquid effective radius @@ -180,15 +181,16 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, mtopa ! Vertical indices for cloud bases real(kind_phys), dimension(ncol,5), intent(out) :: & cldsa ! Fraction of clouds for low, middle, high, total and BL + real(kind_phys), dimension(ncol), intent(out) :: & + de_lgth ! real(kind_phys), dimension(ncol,NSPC1), intent(out) :: & aerodp ! Vertical integrated optical depth for various aerosol species ! Local variables - integer :: i, j, k, iCol, iBand, iSFC, iTOA, iLay + integer :: i, j, iCol, iBand, iSFC, iTOA, iLay logical :: top_at_1 real(kind_phys),dimension(NCOL,Model%levs) :: vmr_o3, vmr_h2o real(kind_phys) :: es, qs - real(kind_phys), dimension(ncol) :: de_lgth real(kind_phys), dimension(ncol, NF_ALBD) :: sfcalb real(kind_phys), dimension(ncol, Model%levs) :: relhum, qs_lay, q_lay, deltaZ, tv_lay,& deltaP, o3_lay @@ -239,10 +241,10 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, enddo ! Guard against case when model uppermost model layer higher than rrtmgp allows. - where(p_lev(1:nCol,iTOA+1) .lt. lw_gas_props%get_press_min()) + where(p_lev(1:nCol,iTOA+1) .lt. sw_gas_props%get_press_min()) ! Set to RRTMGP min(pressure/temperature) - p_lev(1:nCol,iTOA+1) = spread(lw_gas_props%get_press_min(),dim=1,ncopies=ncol) - t_lev(1:nCol,iTOA+1) = spread(lw_gas_props%get_temp_min(),dim=1,ncopies=ncol) + p_lev(1:nCol,iTOA+1) = spread(sw_gas_props%get_press_min(),dim=1,ncopies=ncol) + t_lev(1:nCol,iTOA+1) = spread(sw_gas_props%get_temp_min(),dim=1,ncopies=ncol) ! Recompute layer pressure/temperature. p_lay(1:NCOL,iTOA) = 0.5_kind_phys*(p_lev(1:NCOL,iTOA) + p_lev(1:NCOL,iTOA+1)) t_lay(1:NCOL,iTOA) = 0.5_kind_phys*(t_lev(1:NCOL,iTOA) + t_lev(1:NCOL,iTOA+1)) @@ -468,7 +470,6 @@ subroutine cloud_microphysics(Model, Tbd, Grid, Sfcprop, ncol, tracer, p_lay, t_ ! Local variables real(kind_phys), dimension(ncol, Model%levs, Model%ncnd) :: cld_condensate integer :: i,k - real(kind_phys) :: clwmin, clwm, clwt, onemrh, value, tem1, tem2 real(kind_phys), parameter :: xrc3 = 100. real(kind_phys), dimension(ncol, Model%levs) :: delta_q, cnv_w, cnv_c, effr_l, effr_i, effr_r, effr_s, cldcov @@ -571,50 +572,6 @@ subroutine cloud_microphysics(Model, Tbd, Grid, Sfcprop, ncol, tracer, p_lay, t_ cldcov = 0.0 endif - ! ####################################################################################### - ! This is a hack to get the first-column in a file to contain a cloud. - ! ####################################################################################### - ! DJS2019: START - ! Compute layer cloud fraction. - clwmin = 0.0 - cldcov(:,:) = 0.0 - if (.not. Model%lmfshal) then - do k = 1, Model%levs - do i = 1, NCOL - clwt = 1.0e-6 * (p_lay(i,k)*0.1) - if (cld_condensate(i,k,1) > 0.) then - onemrh= max( 1.e-10, 1.0-relhum(i,k) ) - clwm = clwmin / max( 0.01, p_lay(i,k)*0.1 ) - tem1 = min(max(sqrt(sqrt(onemrh*qs_lay(i,k))),0.0001),1.0) - tem1 = 2000.0 / tem1 - value = max( min( tem1*(cld_condensate(i,k,1)-clwm), 50.0 ), 0.0 ) - tem2 = sqrt( sqrt(relhum(i,k)) ) - cldcov(i,k) = max( tem2*(1.0-exp(-value)), 0.0 ) - endif - enddo - enddo - else - do k = 1, Model%levs - do i = 1, NCOL - clwt = 1.0e-6 * (p_lay(i,k)*0.1) - if (cld_condensate(i,k,1) .gt. 0) then - onemrh= max( 1.e-10, 1.0-relhum(i,k) ) - clwm = clwmin / max( 0.01, p_lay(i,k)*0.1 ) - tem1 = min(max((onemrh*qs_lay(i,k))**0.49,0.0001),1.0) !jhan - if (Model%lmfdeep2) then - tem1 = xrc3 / tem1 - else - tem1 = 100.0 / tem1 - endif - value = max( min( tem1*(cld_condensate(i,k,1)-clwm), 50.0 ), 0.0 ) - tem2 = sqrt( sqrt(relhum(i,k)) ) - cldcov(i,k) = max( tem2*(1.0-exp(-value)), 0.0 ) - endif - enddo - enddo - endif - ! DJS2019: END - ! ####################################################################################### ! MICROPHYSICS ! ####################################################################################### diff --git a/physics/GFS_rrtmgp_sw_post.F90 b/physics/GFS_rrtmgp_sw_post.F90 index 565925864..a1a4dd7d8 100644 --- a/physics/GFS_rrtmgp_sw_post.F90 +++ b/physics/GFS_rrtmgp_sw_post.F90 @@ -149,51 +149,51 @@ subroutine GFS_rrtmgp_sw_post_run (Model, Grid, Diag, Radtend, Coupling, & ! Initialize outputs hswc(:,:) = 0. topflx_sw = topfsw_type ( 0., 0., 0. ) - sfcflx_sw = sfcfsw_type ( 0., 0., 0., 0. ) + ! sfcflx_sw = sfcfsw_type ( 0., 0., 0., 0. ) if (l_clrskysw_hr) then hsw0(:,:) = 0. endif if (l_fluxessw2D) then flxprf_sw = profsw_type ( 0., 0., 0., 0. ) endif - if (l_sfcfluxessw1D) then - scmpsw = cmpfsw_type (0.,0.,0.,0.,0.,0.) - endif + !if (l_sfcfluxessw1D) then + ! scmpsw = cmpfsw_type (0.,0.,0.,0.,0.,0.) + !endif if (Model%lsswr .and. nDay .gt. 0) then ! Clear-sky heating-rate (optional) if (l_clrskysw_HR) then call check_error_msg('GFS_rrtmgp_post',compute_heating_rate( & - fluxswUP_clrsky, & - fluxswDOWN_clrsky, & + fluxswUP_clrsky(idxday,:), & + fluxswDOWN_clrsky(idxday,:), & p_lev(idxday,1:Model%levs+1), & thetaTendClrSky)) hsw0(idxday,:)=thetaTendClrSky endif ! All-sky heating-rate (mandatory) call check_error_msg('GFS_rrtmgp_post',compute_heating_rate( & - fluxswUP_allsky, & - fluxswDOWN_allsky, & + fluxswUP_allsky(idxday,:), & + fluxswDOWN_allsky(idxday,:), & p_lev(idxday,1:Model%levs+1), & thetaTendAllSky)) hswc(idxday,:) = thetaTendAllSky ! Copy fluxes from RRTGMP types into model radiation types. ! Mandatory outputs - topflx_sw%upfxc = fluxswUP_allsky(:,iTOA) - topflx_sw%upfx0 = fluxswUP_clrsky(:,iTOA) - topflx_sw%dnfxc = fluxswDOWN_allsky(:,iTOA) - sfcflx_sw%upfxc = fluxswUP_allsky(:,iSFC) - sfcflx_sw%upfx0 = fluxswUP_clrsky(:,iSFC) - sfcflx_sw%dnfxc = fluxswDOWN_allsky(:,iSFC) - sfcflx_sw%dnfx0 = fluxswDOWN_clrsky(:,iSFC) + topflx_sw(idxday)%upfxc = fluxswUP_allsky(idxday,iTOA) + topflx_sw(idxday)%upfx0 = fluxswUP_clrsky(idxday,iTOA) + topflx_sw(idxday)%dnfxc = fluxswDOWN_allsky(idxday,iTOA) + sfcflx_sw(idxday)%upfxc = fluxswUP_allsky(idxday,iSFC) + sfcflx_sw(idxday)%upfx0 = fluxswUP_clrsky(idxday,iSFC) + sfcflx_sw(idxday)%dnfxc = fluxswDOWN_allsky(idxday,iSFC) + sfcflx_sw(idxday)%dnfx0 = fluxswDOWN_clrsky(idxday,iSFC) ! Optional output if(l_fluxessw2D) then - flxprf_sw%upfxc = fluxswUP_allsky - flxprf_sw%dnfxc = fluxswDOWN_allsky - flxprf_sw%upfx0 = fluxswUP_clrsky - flxprf_sw%dnfx0 = fluxswDOWN_clrsky + flxprf_sw(idxday,:)%upfxc = fluxswUP_allsky(idxday,:) + flxprf_sw(idxday,:)%dnfxc = fluxswDOWN_allsky(idxday,:) + flxprf_sw(idxday,:)%upfx0 = fluxswUP_clrsky(idxday,:) + flxprf_sw(idxday,:)%dnfx0 = fluxswDOWN_clrsky(idxday,:) endif endif diff --git a/physics/radlw_main.f b/physics/radlw_main.f index 01a40b8ad..00603e315 100644 --- a/physics/radlw_main.f +++ b/physics/radlw_main.f @@ -354,9 +354,6 @@ module rrtmg_lw ! ================ subroutine rrtmg_lw_init () - open(59,file='rrtmg_aux_dump.txt',status='unknown') - open(60,file='rrtmg_aux_tautot.txt',status='unknown') - open(61,file='rrtmg_aux_taucld.txt',status='unknown') end subroutine rrtmg_lw_init !> \defgroup module_radlw_main GFS radlw Main @@ -1289,28 +1286,14 @@ subroutine rrtmg_lw_run & endif endif ! if_ivflip - write(59,*) "#" - write(60,*) "#" - do j=1,nLay - write(59,"(9F10.3)") plyr(1,j),tlyr(1,j),cld_lwp(1,j), & - & cld_iwp(1,j), cld_cf(1,j), sum(totuclfl(j-1:j))/2., & - & sum(totdclfl(j-1:j))/2., sum(totuflux(j-1:j))/2., & - & sum(totdflux(j-1:j))/2. - write(60,*) tautot(:,j) - write(61,*) taucld(:,j) - enddo - enddo lab_do_iplon - + enddo lab_do_iplon !................................... end subroutine rrtmg_lw_run !----------------------------------- !> @} subroutine rrtmg_lw_finalize () - close(59) - close(60) - close(61) end subroutine rrtmg_lw_finalize @@ -1742,7 +1725,6 @@ subroutine cldprop & do ib = 1, nbands tauliq(ib) = max(f_zero, cldliq*(absliq1(index,ib) & & + fint*(absliq1(index+1,ib)-absliq1(index,ib)) )) - enddo endif ! end if_ilwcliq_block endif ! end if_cldliq_block @@ -1802,7 +1784,7 @@ subroutine cldprop & endif ! end if_cldice_block do ib = 1, nbands - taucld(ib,k) = tauice(ib) + tauliq(ib) + tauran + tausnw + taucld(ib,k) = tauice(ib) + tauliq(ib) + tauran + tausnw enddo endif lab_if_cld diff --git a/physics/rrtmg_sw_cloud_optics.F90 b/physics/rrtmg_sw_cloud_optics.F90 index d4b280032..7ff57039e 100644 --- a/physics/rrtmg_sw_cloud_optics.F90 +++ b/physics/rrtmg_sw_cloud_optics.F90 @@ -2069,11 +2069,11 @@ subroutine rrtmg_sw_cloud_optics(ncol, nlay, nBandsSW, cld_lwp, cld_ref_liq, cld asy_cld ! In-cloud asymmetry parameter (1) ! Local variables - integer :: iCol, iLay, iBand, index, ia, istr + integer :: iCol, iLay, iBand, index, ia real(kind_phys) :: tau_rain, tau_snow, factor, fint, cld_ref_iceTemp,asyw,ssaw,za1,za2 real(kind_phys), dimension(nBandsSW) :: ssa_rain, ssa_snow, asy_rain, asy_snow, & - tau_liq, ssa_liq, asy_liq, tau_ice, ssa_ice, asy_ice, forwliq, asycoliq, & + tau_liq, ssa_liq, asy_liq, tau_ice, ssa_ice, asy_ice, asycoliq, & forwice, extcoice, asycoice, ssacoice, fdelta, extcoliq, ssacoliq ! Initialize @@ -2098,7 +2098,7 @@ subroutine rrtmg_sw_cloud_optics(ncol, nlay, nBandsSW, cld_lwp, cld_ref_liq, cld asy_ice(:) = 0._kind_phys asy_rain(:) = 0._kind_phys asy_snow(:) = 0._kind_phys - if (cld_frac(iCol,iLay) .gt. 0._kind_phys) then + if (cld_frac(iCol,iLay) .gt. 1.e-12_kind_phys) then ! ########################################################################### ! Rain clouds ! ########################################################################### @@ -2231,20 +2231,20 @@ subroutine rrtmg_sw_cloud_optics(ncol, nlay, nBandsSW, cld_lwp, cld_ref_liq, cld ! ########################################################################### ! Compute total cloud radiative properties (tau, omega, and g) ! ########################################################################### - if (cld_frac(iCol,iLay) .gt. 0._kind_phys) then + if (cld_frac(iCol,iLay) .gt. 1.e-12_kind_phys) then do iBand = 1,nBandsSW ! Sum up radiative properties by type. - tau_cld(iCol,iLay,iBand) = tau_liq(iBand) + tau_ice(iBand) + tau_rain + tau_snow - ssa_cld(iCol,iLay,iBand) = ssa_liq(iBand) + ssa_ice(iBand) + ssa_rain(iBand) + ssa_snow(iBand) - asy_cld(iCol,iLay,iBand) = asy_liq(iBand) + asy_ice(iBand) + asy_rain(iBand) + asy_snow(iBand) + tau_cld(iCol,iLay,iBand) = max(1.e-12_kind_phys, tau_liq(iBand) + tau_ice(iBand) + tau_rain + tau_snow) + ssa_cld(iCol,iLay,iBand) = max(1.e-12_kind_phys, ssa_liq(iBand) + ssa_ice(iBand) + ssa_rain(iBand) + ssa_snow(iBand)) + asy_cld(iCol,iLay,iBand) = max(1.e-12_kind_phys, asy_liq(iBand) + asy_ice(iBand) + asy_rain(iBand) + asy_snow(iBand)) ! Delta-scale - asyw = asy_cld(iCol,iLay,iBand)/max(0._kind_phys, ssa_cld(iCol,iLay,iBand)) + asyw = asy_cld(iCol,iLay,iBand)/max(1.e-12_kind_phys, ssa_cld(iCol,iLay,iBand)) ssaw = min(1._kind_phys-0.000001, ssa_cld(iCol,iLay,iBand)/tau_cld(iCol,iLay,iBand)) za1 = asyw * asyw za2 = ssaw * za1 tau_cld(iCol,iLay,iBand) = (1._kind_phys - za2) * tau_cld(iCol,iLay,iBand) ssa_cld(iCol,iLay,iBand) = (ssaw - za2) / (1._kind_phys - za2) - asy_cld(iCol,iLay,iBand) = (asyw - za2/ssaw)/(1-za2/ssaw) + asy_cld(iCol,iLay,iBand) = asyw/(1+asyw) enddo ! Loop over SW bands endif ! END sum cloudy properties ! diff --git a/physics/rrtmgp_sw_rte.F90 b/physics/rrtmgp_sw_rte.F90 index 486bbb8cb..847981430 100644 --- a/physics/rrtmgp_sw_rte.F90 +++ b/physics/rrtmgp_sw_rte.F90 @@ -120,12 +120,12 @@ subroutine rrtmgp_sw_rte_run(Model, Radtend, Statein, ncol, sw_gas_props, p_lay, flux_allsky, & ! All-sky flux (W/m2) flux_clrsky ! Clear-sky flux (W/m2) real(kind_phys), dimension(nday,Model%levs+1),target :: & - fluxSW_up_allsky, fluxSW_up_clrsky, fluxSW_dn_allsky, fluxSW_dn_clrsky + fluxSW_up_allsky, fluxSW_up_clrsky, fluxSW_dn_allsky, fluxSW_dn_clrsky, fluxSW_dn_dir_allsky real(kind_phys), dimension(nday,Model%levs+1,sw_gas_props%get_nband()),target :: & fluxSWBB_up_allsky, fluxSWBB_dn_allsky real(kind_phys), dimension(ncol,Model%levs) :: vmrTemp logical :: l_ClrSky_HR=.false., l_AllSky_HR_byband=.false., l_scmpsw=.false., top_at_1 - integer :: iGas + integer :: iGas,iSFC,iTOA type(ty_optical_props_2str) :: & optical_props_cloud_daylit, & ! RRTMGP DDT: longwave cloud radiative properties optical_props_clrsky_daylit, & ! RRTMGP DDT: longwave clear-sky radiative properties @@ -141,6 +141,13 @@ subroutine rrtmgp_sw_rte_run(Model, Radtend, Statein, ncol, sw_gas_props, p_lay, ! Vertical ordering? top_at_1 = (Statein%prsi(1,1) .lt. Statein%prsi(1, Model%levs)) + if (top_at_1) then + iSFC = Model%levs+1 + iTOA = 1 + else + iSFC = 1 + iTOA = Model%levs+1 + endif ! Are any optional outputs requested? Need to know now to compute correct fluxes. l_ClrSky_HR = present(hsw0) @@ -180,10 +187,11 @@ subroutine rrtmgp_sw_rte_run(Model, Radtend, Statein, ncol, sw_gas_props, p_lay, enddo ! Initialize RRTMGP DDT containing 2D(3D) fluxes - flux_allsky%flux_up => fluxSW_up_allsky - flux_allsky%flux_dn => fluxSW_dn_allsky - flux_clrsky%flux_up => fluxSW_up_clrsky - flux_clrsky%flux_dn => fluxSW_dn_clrsky + flux_allsky%flux_up => fluxSW_up_allsky + flux_allsky%flux_dn => fluxSW_dn_allsky + flux_allsky%flux_dn_dir => fluxSW_dn_dir_allsky + flux_clrsky%flux_up => fluxSW_up_clrsky + flux_clrsky%flux_dn => fluxSW_dn_clrsky ! Only calculate fluxes by-band, only when heating-rate profiles by band are requested. if (l_AllSky_HR_byband) then flux_allsky%bnd_flux_up => fluxSWBB_up_allsky @@ -220,7 +228,7 @@ subroutine rrtmgp_sw_rte_run(Model, Radtend, Statein, ncol, sw_gas_props, p_lay, ! Store fluxes fluxUP_allsky(idxday,:) = flux_allsky%flux_up fluxDOWN_allsky(idxday,:) = flux_allsky%flux_dn - + scmpsw(idxday)%nirbm = flux_allsky%flux_dn_dir(:,iSFC) endif end subroutine rrtmgp_sw_rte_run From 206a950623bd562f1aae4cb3d74f062ec4360aa1 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Mon, 24 Jun 2019 12:17:11 -0600 Subject: [PATCH 042/167] Added piece for GFDL MP. Not curretnly exercised. --- physics/GFS_rrtmgp_pre.F90 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/physics/GFS_rrtmgp_pre.F90 b/physics/GFS_rrtmgp_pre.F90 index c6acacaaa..bdf399522 100644 --- a/physics/GFS_rrtmgp_pre.F90 +++ b/physics/GFS_rrtmgp_pre.F90 @@ -568,6 +568,12 @@ subroutine cloud_microphysics(Model, Tbd, Grid, Sfcprop, ncol, tracer, p_lay, t_ endif elseif (Model%imp_physics == Model%imp_physics_gfdl) then ! GFDL MP cldcov(1:NCOL,1:Model%levs) = tracer(1:NCOL,1:Model%levs,Model%ntclamt) + if (Model%effr_in) then + effr_l(1:ncol,1:Model%levs) = Tbd%phy_f3d(1:ncol,1:Model%levs,1) + effr_i(1:ncol,1:Model%levs) = Tbd%phy_f3d(1:ncol,1:Model%levs,2) + effr_r(1:ncol,1:Model%levs) = Tbd%phy_f3d(1:ncol,1:Model%levs,3) + effr_s(1:ncol,1:Model%levs) = Tbd%phy_f3d(1:ncol,1:Model%levs,4) + endif else ! neither of the other two cases cldcov = 0.0 endif From fa055745b654ce70e3be4a6f305d2ab6e02e7527 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Wed, 26 Jun 2019 21:50:30 +0000 Subject: [PATCH 043/167] Added rte-rrtmgp repository. --- physics/rte-rrtmgp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/physics/rte-rrtmgp b/physics/rte-rrtmgp index 913ee2881..550aacd8e 160000 --- a/physics/rte-rrtmgp +++ b/physics/rte-rrtmgp @@ -1 +1 @@ -Subproject commit 913ee2881f9e589776437e61031143874e6fa916 +Subproject commit 550aacd8e6c4bb88cfe71118378ce2fae1a84615 From f7915b9ff0d5ee993ccea474e7389ad5b7e86324 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Thu, 27 Jun 2019 18:16:17 +0000 Subject: [PATCH 044/167] Synced with NCAR repo. --- physics/GFS_DCNV_generic.F90 | 8 +- physics/GFS_MP_generic.F90 | 87 ++- physics/GFS_PBL_generic.F90 | 189 +++-- physics/GFS_debug.F90 | 8 +- physics/GFS_phys_time_vary.fv3.F90 | 30 +- physics/GFS_phys_time_vary.scm.F90 | 29 +- physics/GFS_rrtmg_pre.F90 | 19 +- physics/GFS_suite_interstitial.F90 | 73 +- physics/GFS_surface_composites.F90 | 675 ++++++++++-------- physics/GFS_surface_generic.F90 | 18 +- physics/cldmacro.F | 8 +- physics/cs_conv.F90 | 20 +- physics/cs_conv_aw_adj.F90 | 13 +- physics/dcyc2.f | 67 +- physics/docs/pdftxt/CPT_adv_suite.txt | 1 - physics/docs/pdftxt/GFSv14_suite.txt | 1 - physics/docs/pdftxt/GFSv15_suite.txt | 1 - physics/docs/pdftxt/GFSv15_suite_TKEEDMF.txt | 1 - physics/gcm_shoc.F90 | 32 +- physics/gfdl_cloud_microphys.F90 | 15 +- ...racer_config.f => gfs_phy_tracer_config.F} | 0 physics/m_micro.F90 | 105 ++- physics/m_micro_interstitial.F90 | 60 +- physics/maximum_hourly_diagnostics.F90 | 49 +- physics/micro_mg_utils.F90 | 21 +- physics/module_gfdl_cloud_microphys.F90 | 6 +- physics/module_nst_water_prop.f90 | 2 +- physics/moninshoc.f | 33 +- physics/mp_thompson.F90 | 6 +- physics/physcons.F90 | 117 +-- physics/radiation_astronomy.f | 13 +- physics/radiation_clouds.f | 214 +++--- physics/samfdeepcnv.f | 2 +- physics/samfshalcnv.f | 10 +- physics/sfc_diag.f | 20 +- physics/sfc_diff.f | 26 +- physics/sfc_drv.f | 5 +- physics/sfc_drv_ruc.F90 | 25 +- physics/sfc_nst.f | 33 +- physics/sfc_ocean.F | 10 +- physics/sfc_sice.f | 271 +++---- physics/sflx.f | 34 +- 42 files changed, 1273 insertions(+), 1084 deletions(-) rename physics/{gfs_phy_tracer_config.f => gfs_phy_tracer_config.F} (100%) diff --git a/physics/GFS_DCNV_generic.F90 b/physics/GFS_DCNV_generic.F90 index 8f52fb550..0784e921f 100644 --- a/physics/GFS_DCNV_generic.F90 +++ b/physics/GFS_DCNV_generic.F90 @@ -139,8 +139,6 @@ end subroutine GFS_DCNV_generic_post_finalize !! | ncnvcld3d | number_of_convective_3d_cloud_fields | number of convective 3d clouds fields | count | 0 | integer | | in | F | !! | rainc | lwe_thickness_of_convective_precipitation_amount_on_dynamics_timestep | convective rain at this time step | m | 1 | real | kind_phys | inout | F | !! | cldwrk | cumulative_cloud_work_function | cumulative cloud work function (valid only with sas) | m2 s-1 | 1 | real | kind_phys | inout | F | -!! | cnvprcp | cumulative_lwe_thickness_of_convective_precipitation_amount | cumulative convective precipitation | m | 1 | real | kind_phys | inout | F | -!! | cnvprcpb | cumulative_lwe_thickness_of_convective_precipitation_amount_in_bucket | cumulative convective precipitation in bucket | m | 1 | real | kind_phys | inout | F | !! | dt3dt | cumulative_change_in_temperature_due_to_deep_convection | cumulative change in temperature due to deep conv. | K | 2 | real | kind_phys | inout | F | !! | dq3dt | cumulative_change_in_water_vapor_specific_humidity_due_to_deep_convection | cumulative change in water vapor specific humidity due to deep conv. | kg kg-1 | 2 | real | kind_phys | inout | F | !! | du3dt | cumulative_change_in_x_wind_due_to_deep_convection | cumulative change in x wind due to deep convection | m s-1 | 2 | real | kind_phys | inout | F | @@ -169,7 +167,7 @@ end subroutine GFS_DCNV_generic_post_finalize subroutine GFS_DCNV_generic_post_run (im, levs, lssav, ldiag3d, lgocart, ras, cscnv, do_ca, & isppt_deep, frain, rain1, dtf, cld1d, save_u, save_v, save_t, save_qv, gu0, gv0, gt0, & gq0_water_vapor, ud_mf, dd_mf, dt_mf, con_g, clw_ice, clw_liquid, npdf3d, num_p3d, ncnvcld3d, & - rainc, cldwrk, cnvprcp, cnvprcpb, dt3dt, dq3dt, du3dt, dv3dt, upd_mf, dwn_mf, det_mf, dqdti, & + rainc, cldwrk, dt3dt, dq3dt, du3dt, dv3dt, upd_mf, dwn_mf, det_mf, dqdti, & cnvqci, upd_mfi, dwn_mfi, det_mfi, cnvw, cnvc, cnvw_phy_f3d, cnvc_phy_f3d, & cape, tconvtend, qconvtend, uconvtend, vconvtend, errmsg, errflg) @@ -189,7 +187,7 @@ subroutine GFS_DCNV_generic_post_run (im, levs, lssav, ldiag3d, lgocart, ras, cs real(kind=kind_phys), dimension(im,levs), intent(in) :: clw_ice, clw_liquid integer, intent(in) :: npdf3d, num_p3d, ncnvcld3d - real(kind=kind_phys), dimension(im), intent(inout) :: rainc, cldwrk, cnvprcp, cnvprcpb + real(kind=kind_phys), dimension(im), intent(inout) :: rainc, cldwrk ! dt3dt, dq3dt, du3dt, dv3dt upd_mf, dwn_mf, det_mf only allocated if ldiag3d == .true. real(kind=kind_phys), dimension(:,:), intent(inout) :: dt3dt, dq3dt, du3dt, dv3dt real(kind=kind_phys), dimension(:,:), intent(inout) :: upd_mf, dwn_mf, det_mf @@ -246,8 +244,6 @@ subroutine GFS_DCNV_generic_post_run (im, levs, lssav, ldiag3d, lgocart, ras, cs if (lssav) then do i=1,im cldwrk (i) = cldwrk (i) + cld1d(i) * dtf - cnvprcp(i) = cnvprcp(i) + rainc(i) - cnvprcpb(i) = cnvprcpb(i) + rainc(i) enddo if (ldiag3d) then diff --git a/physics/GFS_MP_generic.F90 b/physics/GFS_MP_generic.F90 index 0aeada850..8021f0801 100644 --- a/physics/GFS_MP_generic.F90 +++ b/physics/GFS_MP_generic.F90 @@ -104,6 +104,7 @@ end subroutine GFS_MP_generic_post_init !! | imp_physics | flag_for_microphysics_scheme | choice of microphysics scheme | flag | 0 | integer | | in | F | !! | imp_physics_gfdl | flag_for_gfdl_microphysics_scheme | choice of GFDL microphysics scheme | flag | 0 | integer | | in | F | !! | imp_physics_thompson | flag_for_thompson_microphysics_scheme | choice of Thompson microphysics scheme | flag | 0 | integer | | in | F | +!! | imp_physics_mg | flag_for_morrison_gettelman_microphysics_scheme | choice of Morrison-Gettelman microphysics scheme | flag | 0 | integer | | in | F | !! | cal_pre | flag_for_precipitation_type_algorithm | flag controls precip type algorithm | flag | 0 | logical | | in | F | !! | lssav | flag_diagnostics | logical flag for storing diagnostics | flag | 0 | logical | | in | F | !! | ldiag3d | flag_diagnostics_3D | flag for 3d diagnostic fields | flag | 0 | logical | | in | F | @@ -140,10 +141,13 @@ end subroutine GFS_MP_generic_post_init !! | doms_diag | dominant_snow_type | dominant snow type | none | 1 | real | kind_phys | inout | F | !! | tprcp | nonnegative_lwe_thickness_of_precipitation_amount_on_dynamics_timestep | total precipitation amount in each time step | m | 1 | real | kind_phys | inout | F | !! | srflag | flag_for_precipitation_type | snow/rain flag for precipitation | flag | 1 | real | kind_phys | inout | F | +!! | sr | ratio_of_snowfall_to_rainfall | snow ratio: ratio of snow to total precipitation | frac | 1 | real | kind_phys | in | F | +!! | cnvprcp | cumulative_lwe_thickness_of_convective_precipitation_amount | cumulative convective precipitation | m | 1 | real | kind_phys | inout | F | !! | totprcp | accumulated_lwe_thickness_of_precipitation_amount | accumulated total precipitation | m | 1 | real | kind_phys | inout | F | !! | totice | accumulated_lwe_thickness_of_ice_amount | accumulated ice precipitation | kg m-2 | 1 | real | kind_phys | inout | F | !! | totsnw | accumulated_lwe_thickness_of_snow_amount | accumulated snow precipitation | kg m-2 | 1 | real | kind_phys | inout | F | !! | totgrp | accumulated_lwe_thickness_of_graupel_amount | accumulated graupel precipitation | kg m-2 | 1 | real | kind_phys | inout | F | +!! | cnvprcpb | cumulative_lwe_thickness_of_convective_precipitation_amount_in_bucket | cumulative convective precipitation in bucket | m | 1 | real | kind_phys | inout | F | !! | totprcpb | accumulated_lwe_thickness_of_precipitation_amount_in_bucket | accumulated total precipitation in bucket | m | 1 | real | kind_phys | inout | F | !! | toticeb | accumulated_lwe_thickness_of_ice_amount_in_bucket | accumulated ice precipitation in bucket | kg m-2 | 1 | real | kind_phys | inout | F | !! | totsnwb | accumulated_lwe_thickness_of_snow_amount_in_bucket | accumulated snow precipitation in bucket | kg m-2 | 1 | real | kind_phys | inout | F | @@ -173,10 +177,10 @@ end subroutine GFS_MP_generic_post_init !> \section gfs_mp_gen GFS MP Generic Post General Algorithm !> @{ subroutine GFS_MP_generic_post_run(im, ix, levs, kdt, nrcm, ncld, nncl, ntcw, ntrac, imp_physics, imp_physics_gfdl, & - imp_physics_thompson, cal_pre, lssav, ldiag3d, cplflx, cplchm, con_g, dtf, frain, rainc, rain1, rann, xlat, xlon, & - gt0, gq0, prsl, prsi, phii, tsfc, ice, snow, graupel, save_t, save_qv, rain0, ice0, snow0, graupel0, del, & - rain, domr_diag, domzr_diag, domip_diag, doms_diag, tprcp, srflag, totprcp, totice, totsnw, & - totgrp, totprcpb, toticeb, totsnwb, totgrpb, dt3dt, dq3dt, rain_cpl, rainc_cpl, snow_cpl, pwat, & + imp_physics_thompson, imp_physics_mg, cal_pre, lssav, ldiag3d, cplflx, cplchm, con_g, dtf, frain, rainc, rain1, & + rann, xlat, xlon, gt0, gq0, prsl, prsi, phii, tsfc, ice, snow, graupel, save_t, save_qv, rain0, ice0, snow0, & + graupel0, del, rain, domr_diag, domzr_diag, domip_diag, doms_diag, tprcp, srflag, sr, cnvprcp, totprcp, totice, & + totsnw, totgrp, cnvprcpb, totprcpb, toticeb, totsnwb, totgrpb, dt3dt, dq3dt, rain_cpl, rainc_cpl, snow_cpl, pwat, & do_sppt, dtdtr, dtdtc, drain_cpl, dsnow_cpl, lsm, lsm_ruc, raincprv, rainncprv, iceprv, snowprv, graupelprv, & dtp, errmsg, errflg) ! @@ -184,7 +188,8 @@ subroutine GFS_MP_generic_post_run(im, ix, levs, kdt, nrcm, ncld, nncl, ntcw, nt implicit none - integer, intent(in) :: im, ix, levs, kdt, nrcm, ncld, nncl, ntcw, ntrac, imp_physics, imp_physics_gfdl, imp_physics_thompson + integer, intent(in) :: im, ix, levs, kdt, nrcm, ncld, nncl, ntcw, ntrac + integer, intent(in) :: imp_physics, imp_physics_gfdl, imp_physics_thompson, imp_physics_mg logical, intent(in) :: cal_pre, lssav, ldiag3d, cplflx, cplchm real(kind=kind_phys), intent(in) :: dtf, frain, con_g @@ -196,8 +201,11 @@ subroutine GFS_MP_generic_post_run(im, ix, levs, kdt, nrcm, ncld, nncl, ntcw, nt real(kind=kind_phys), dimension(im,levs+1), intent(in) :: prsi, phii real(kind=kind_phys), dimension(im,levs,ntrac), intent(in) :: gq0 - real(kind=kind_phys), dimension(im), intent(inout) :: rain, domr_diag, domzr_diag, domip_diag, doms_diag, tprcp, & - srflag, totprcp, totice, totsnw, totgrp, totprcpb, toticeb, totsnwb, totgrpb, rain_cpl, rainc_cpl, snow_cpl, pwat + real(kind=kind_phys), dimension(im), intent(in ) :: sr + real(kind=kind_phys), dimension(im), intent(inout) :: rain, domr_diag, domzr_diag, domip_diag, doms_diag, tprcp, & + srflag, cnvprcp, totprcp, totice, totsnw, totgrp, cnvprcpb, & + totprcpb, toticeb, totsnwb, totgrpb, rain_cpl, rainc_cpl, & + snow_cpl, pwat real(kind=kind_phys), dimension(im,levs), intent(inout) :: dt3dt, dq3dt ! Stochastic physics / surface perturbations @@ -223,16 +231,14 @@ subroutine GFS_MP_generic_post_run(im, ix, levs, kdt, nrcm, ncld, nncl, ntcw, nt ! DH* TODO: CLEANUP, all of these should be coming in through the argument list real(kind=kind_phys), parameter :: con_p001= 0.001d0 - real(kind=kind_phys), parameter :: con_day = 86400.d0 -#ifdef TRANSITION + real(kind=kind_phys), parameter :: con_day = 86400.0d0 real(kind=kind_phys), parameter :: rainmin = 1.0d-13 -#else - real(kind=kind_phys), parameter :: rainmin = 1.0e-13 -#endif - real(kind=kind_phys), parameter :: p850 = 85000.0 + real(kind=kind_phys), parameter :: p850 = 85000.0d0 ! *DH integer :: i, k, ic + + real(kind=kind_phys), parameter :: zero = 0.0d0, one = 1.0d0 real(kind=kind_phys) :: crain, csnow, onebg, tem, total_precip real(kind=kind_phys), dimension(im) :: domr, domzr, domip, doms, t850, work1 @@ -240,7 +246,7 @@ subroutine GFS_MP_generic_post_run(im, ix, levs, kdt, nrcm, ncld, nncl, ntcw, nt errmsg = '' errflg = 0 - onebg = 1.0d0/con_g + onebg = one/con_g do i = 1, im rain(i) = rainc(i) + frain * rain1(i) ! time-step convective plus explicit @@ -308,6 +314,14 @@ subroutine GFS_MP_generic_post_run(im, ix, levs, kdt, nrcm, ncld, nncl, ntcw, nt end if enddo endif + if (lssav) then + do i=1,im + domr_diag(i) = domr_diag(i) + domr(i) * dtf + domzr_diag(i) = domzr_diag(i) + domzr(i) * dtf + domip_diag(i) = domip_diag(i) + domip(i) * dtf + doms_diag(i) = doms_diag(i) + doms(i) * dtf + enddo + endif endif @@ -316,21 +330,17 @@ subroutine GFS_MP_generic_post_run(im, ix, levs, kdt, nrcm, ncld, nncl, ntcw, nt ! 'totprcpb=', Diag%totprcpb(1),'totprcp=',Diag%totprcp(1), & ! 'rain=',Diag%rain(1) do i=1,im + cnvprcp (i) = cnvprcp (i) + rainc(i) totprcp (i) = totprcp (i) + rain(i) totice (i) = totice (i) + ice(i) totsnw (i) = totsnw (i) + snow(i) totgrp (i) = totgrp (i) + graupel(i) + + cnvprcpb(i) = cnvprcpb(i) + rainc(i) totprcpb(i) = totprcpb(i) + rain(i) toticeb (i) = toticeb (i) + ice(i) totsnwb (i) = totsnwb (i) + snow(i) totgrpb (i) = totgrpb (i) + graupel(i) -! - if (cal_pre) then - domr_diag(i) = domr_diag(i) + domr(i) * dtf - domzr_diag(i) = domzr_diag(i) + domzr(i) * dtf - domip_diag(i) = domip_diag(i) + domip(i) * dtf - doms_diag(i) = doms_diag(i) + doms(i) * dtf - endif enddo if (ldiag3d) then @@ -355,6 +365,9 @@ subroutine GFS_MP_generic_post_run(im, ix, levs, kdt, nrcm, ncld, nncl, ntcw, nt enddo enddo + ! Conversion factor mm per physics timestep to m per day + tem = dtp * con_p001 / con_day + !> - For GFDL and Thompson MP scheme, determine convective snow by surface temperature; !! and determine explicit rain/snow by snow/ice/graupel coming out directly from MP !! and convective rainfall from the cumulus scheme if the surface temperature is below @@ -362,7 +375,6 @@ subroutine GFS_MP_generic_post_run(im, ix, levs, kdt, nrcm, ncld, nncl, ntcw, nt if (imp_physics == imp_physics_gfdl .or. imp_physics == imp_physics_thompson) then ! determine convective rain/snow by surface temperature ! determine large-scale rain/snow by rain/snow coming out directly from MP - tem = dtp * con_p001 / con_day do i = 1, im !tprcp(i) = max(0.0, rain(i) )! clu: rain -> tprcp ! DH now lines 245-250 srflag(i) = 0. ! clu: default srflag as 'rain' (i.e. 0) @@ -384,22 +396,29 @@ subroutine GFS_MP_generic_post_run(im, ix, levs, kdt, nrcm, ncld, nncl, ntcw, nt endif enddo elseif( .not. cal_pre) then - do i = 1, im - tprcp(i) = max(0.0, rain(i) )! clu: rain -> tprcp - srflag(i) = 0. ! clu: default srflag as 'rain' (i.e. 0) - if (t850(i) <= 273.16) then - srflag(i) = 1. ! clu: set srflag to 'snow' (i.e. 1) - endif - enddo + if (imp_physics == imp_physics_mg) then ! MG microphysics + do i=1,im + if (rain(i)*tem > rainmin) then + srflag(i) = max(zero, min(one, (rain(i)-rainc(i))*sr(i)/rain(i))) + else + srflag(i) = 0.0 + endif + enddo + else + do i = 1, im + tprcp(i) = max(0.0, rain(i) )! clu: rain -> tprcp + srflag(i) = 0.0 ! clu: default srflag as 'rain' (i.e. 0) + if (t850(i) <= 273.16) then + srflag(i) = 1.0 ! clu: set srflag to 'snow' (i.e. 1) + endif + enddo + endif endif if (cplflx .or. cplchm) then do i = 1, im - if (t850(i) > 273.16) then - rain_cpl(i) = rain_cpl(i) + rain(i) - else - snow_cpl(i) = snow_cpl(i) + rain(i) - endif + rain_cpl(i) = rain_cpl(i) + rain(i) * (one-srflag(i)) + snow_cpl(i) = snow_cpl(i) + rain(i) * srflag(i) enddo endif diff --git a/physics/GFS_PBL_generic.F90 b/physics/GFS_PBL_generic.F90 index 9731a6309..127de28e4 100644 --- a/physics/GFS_PBL_generic.F90 +++ b/physics/GFS_PBL_generic.F90 @@ -27,6 +27,9 @@ end subroutine GFS_PBL_generic_pre_finalize !! | ntsw | index_for_snow_water | tracer index for snow water | index | 0 | integer | | in | F | !! | ntlnc | index_for_liquid_cloud_number_concentration | tracer index for liquid number concentration | index | 0 | integer | | in | F | !! | ntinc | index_for_ice_cloud_number_concentration | tracer index for ice number concentration | index | 0 | integer | | in | F | +!! | ntrnc | index_for_rain_number_concentration | tracer index for rain number concentration | index | 0 | integer | | in | F | +!! | ntsnc | index_for_snow_number_concentration | tracer index for snow number concentration | index | 0 | integer | | in | F | +!! | ntgnc | index_for_graupel_number_concentration | tracer index for graupel number concentration | index | 0 | integer | | in | F | !! | ntwa | index_for_water_friendly_aerosols | tracer index for water friendly aerosol | index | 0 | integer | | in | F | !! | ntia | index_for_ice_friendly_aerosols | tracer index for ice friendly aerosol | index | 0 | integer | | in | F | !! | ntgl | index_for_graupel | tracer index for graupel | index | 0 | integer | | in | F | @@ -38,6 +41,7 @@ end subroutine GFS_PBL_generic_pre_finalize !! | imp_physics_thompson | flag_for_thompson_microphysics_scheme | choice of Thompson microphysics scheme | flag | 0 | integer | | in | F | !! | imp_physics_wsm6 | flag_for_wsm6_microphysics_scheme | choice of WSM6 microphysics scheme | flag | 0 | integer | | in | F | !! | imp_physics_zhao_carr | flag_for_zhao_carr_microphysics_scheme | choice of Zhao-Carr microphysics scheme | flag | 0 | integer | | in | F | +!! | imp_physics_mg | flag_for_morrison_gettelman_microphysics_scheme | choice of Morrison-Gettelman microphysics scheme | flag | 0 | integer | | in | F | !! | cplchm | flag_for_chemistry_coupling | flag controlling cplchm collection (default off) | flag | 0 | logical | | in | F | !! | ltaerosol | flag_for_aerosol_physics | flag for aerosol physics | flag | 0 | logical | | in | F | !! | hybedmf | flag_for_hedmf | flag for hybrid edmf pbl scheme (moninedmf) | flag | 0 | logical | | in | F | @@ -50,19 +54,21 @@ end subroutine GFS_PBL_generic_pre_finalize !! #endif subroutine GFS_PBL_generic_pre_run (im, levs, nvdiff, ntrac, & - ntqv, ntcw, ntiw, ntrw, ntsw, ntlnc, ntinc, ntwa, ntia, ntgl, ntoz, ntke, ntkev, & + ntqv, ntcw, ntiw, ntrw, ntsw, ntlnc, ntinc, ntrnc, ntsnc, ntgnc, & + ntwa, ntia, ntgl, ntoz, ntke, ntkev, & imp_physics, imp_physics_gfdl, imp_physics_thompson, imp_physics_wsm6, & - imp_physics_zhao_carr, cplchm, ltaerosol, hybedmf, do_shoc, satmedmf, & - qgrs, vdftra, errmsg, errflg) + imp_physics_zhao_carr, imp_physics_mg, cplchm, ltaerosol, hybedmf, do_shoc, & + satmedmf, qgrs, vdftra, errmsg, errflg) use machine, only : kind_phys implicit none integer, intent(in) :: im, levs, nvdiff, ntrac - integer, intent(in) :: ntqv, ntcw, ntiw, ntrw, ntsw, ntlnc, ntinc, ntwa, ntia, ntgl, ntoz, ntke, ntkev + integer, intent(in) :: ntqv, ntcw, ntiw, ntrw, ntsw, ntlnc, ntinc, ntrnc, ntsnc, ntgnc + integer, intent(in) :: ntwa, ntia, ntgl, ntoz, ntke, ntkev integer, intent(in) :: imp_physics, imp_physics_gfdl, imp_physics_thompson, imp_physics_wsm6 - integer, intent(in) :: imp_physics_zhao_carr + integer, intent(in) :: imp_physics_zhao_carr, imp_physics_mg logical, intent(in) :: cplchm, ltaerosol, hybedmf, do_shoc, satmedmf real(kind=kind_phys), dimension(im, levs, ntrac), intent(in) :: qgrs @@ -119,7 +125,41 @@ subroutine GFS_PBL_generic_pre_run (im, levs, nvdiff, ntrac, enddo enddo endif - ! + ! MG + elseif (imp_physics == imp_physics_mg) then ! MG3/2 + if (ntgl > 0) then ! MG3 + do k=1,levs + do i=1,im + vdftra(i,k,1) = qgrs(i,k,ntqv) + vdftra(i,k,2) = qgrs(i,k,ntcw) + vdftra(i,k,3) = qgrs(i,k,ntiw) + vdftra(i,k,4) = qgrs(i,k,ntrw) + vdftra(i,k,5) = qgrs(i,k,ntsw) + vdftra(i,k,6) = qgrs(i,k,ntgl) + vdftra(i,k,7) = qgrs(i,k,ntlnc) + vdftra(i,k,8) = qgrs(i,k,ntinc) + vdftra(i,k,9) = qgrs(i,k,ntrnc) + vdftra(i,k,10) = qgrs(i,k,ntsnc) + vdftra(i,k,11) = qgrs(i,k,ntgnc) + vdftra(i,k,12) = qgrs(i,k,ntoz) + enddo + enddo + else ! MG2 + do k=1,levs + do i=1,im + vdftra(i,k,1) = qgrs(i,k,ntqv) + vdftra(i,k,2) = qgrs(i,k,ntcw) + vdftra(i,k,3) = qgrs(i,k,ntiw) + vdftra(i,k,4) = qgrs(i,k,ntrw) + vdftra(i,k,5) = qgrs(i,k,ntsw) + vdftra(i,k,6) = qgrs(i,k,ntlnc) + vdftra(i,k,7) = qgrs(i,k,ntinc) + vdftra(i,k,8) = qgrs(i,k,ntrnc) + vdftra(i,k,9) = qgrs(i,k,ntsnc) + vdftra(i,k,10) = qgrs(i,k,ntoz) + enddo + enddo + endif elseif (imp_physics == imp_physics_gfdl) then ! GFDL MP do k=1,levs @@ -146,7 +186,7 @@ subroutine GFS_PBL_generic_pre_run (im, levs, nvdiff, ntrac, endif endif - if (satmedmf) then + if (ntke>0) then do k=1,levs do i=1,im vdftra(i,k,ntkev) = qgrs(i,k,ntke) @@ -186,6 +226,9 @@ end subroutine GFS_PBL_generic_post_finalize !! | ntsw | index_for_snow_water | tracer index for snow water | index | 0 | integer | | in | F | !! | ntlnc | index_for_liquid_cloud_number_concentration | tracer index for liquid number concentration | index | 0 | integer | | in | F | !! | ntinc | index_for_ice_cloud_number_concentration | tracer index for ice number concentration | index | 0 | integer | | in | F | +!! | ntrnc | index_for_rain_number_concentration | tracer index for rain number concentration | index | 0 | integer | | in | F | +!! | ntsnc | index_for_snow_number_concentration | tracer index for snow number concentration | index | 0 | integer | | in | F | +!! | ntgnc | index_for_graupel_number_concentration | tracer index for graupel number concentration | index | 0 | integer | | in | F | !! | ntwa | index_for_water_friendly_aerosols | tracer index for water friendly aerosol | index | 0 | integer | | in | F | !! | ntia | index_for_ice_friendly_aerosols | tracer index for ice friendly aerosol | index | 0 | integer | | in | F | !! | ntgl | index_for_graupel | tracer index for graupel | index | 0 | integer | | in | F | @@ -197,6 +240,7 @@ end subroutine GFS_PBL_generic_post_finalize !! | imp_physics_thompson | flag_for_thompson_microphysics_scheme | choice of Thompson microphysics scheme | flag | 0 | integer | | in | F | !! | imp_physics_wsm6 | flag_for_wsm6_microphysics_scheme | choice of WSM6 microphysics scheme | flag | 0 | integer | | in | F | !! | imp_physics_zhao_carr | flag_for_zhao_carr_microphysics_scheme | choice of Zhao-Carr microphysics scheme | flag | 0 | integer | | in | F | +!! | imp_physics_mg | flag_for_morrison_gettelman_microphysics_scheme | choice of Morrison-Gettelman microphysics scheme | flag | 0 | integer | | in | F | !! | ltaerosol | flag_for_aerosol_physics | flag for aerosol physics | flag | 0 | logical | | in | F | !! | cplflx | flag_for_flux_coupling | flag controlling cplflx collection (default off) | flag | 0 | logical | | in | F | !! | cplchm | flag_for_chemistry_coupling | flag controlling cplchm collection (default off) | flag | 0 | logical | | in | F | @@ -249,8 +293,8 @@ end subroutine GFS_PBL_generic_post_finalize !! #endif subroutine GFS_PBL_generic_post_run (im, levs, nvdiff, ntrac, & - ntqv, ntcw, ntiw, ntrw, ntsw, ntlnc, ntinc, ntwa, ntia, ntgl, ntoz, ntke, ntkev, & - imp_physics, imp_physics_gfdl, imp_physics_thompson, imp_physics_wsm6, imp_physics_zhao_carr, & + ntqv, ntcw, ntiw, ntrw, ntsw, ntlnc, ntinc, ntrnc, ntsnc, ntgnc, ntwa, ntia, ntgl, ntoz, ntke, ntkev, & + imp_physics, imp_physics_gfdl, imp_physics_thompson, imp_physics_wsm6, imp_physics_zhao_carr, imp_physics_mg, & ltaerosol, cplflx, cplchm, lssav, ldiag3d, lsidea, hybedmf, do_shoc, satmedmf, shinhong, do_ysu, & dvdftra, dusfc1, dvsfc1, dtsfc1, dqsfc1, dtf, dudt, dvdt, dtdt, htrsw, htrlw, xmu, & dqdt, dusfc_cpl, dvsfc_cpl, dtsfc_cpl, & @@ -263,9 +307,9 @@ subroutine GFS_PBL_generic_post_run (im, levs, nvdiff, ntrac, implicit none integer, intent(in) :: im, levs, nvdiff, ntrac - integer, intent(in) :: ntqv, ntcw, ntiw, ntrw, ntsw, ntlnc, ntinc, ntwa, ntia, ntgl, ntoz, ntke, ntkev + integer, intent(in) :: ntqv, ntcw, ntiw, ntrw, ntsw, ntlnc, ntinc, ntrnc, ntsnc, ntgnc, ntwa, ntia, ntgl, ntoz, ntke, ntkev integer, intent(in) :: imp_physics, imp_physics_gfdl, imp_physics_thompson, imp_physics_wsm6 - integer, intent(in) :: imp_physics_zhao_carr + integer, intent(in) :: imp_physics_zhao_carr, imp_physics_mg logical, intent(in) :: ltaerosol, cplflx, cplchm, lssav, ldiag3d, lsidea logical, intent(in) :: hybedmf, do_shoc, satmedmf, shinhong, do_ysu @@ -298,6 +342,15 @@ subroutine GFS_PBL_generic_post_run (im, levs, nvdiff, ntrac, if (nvdiff == ntrac .and. (hybedmf .or. do_shoc .or. satmedmf)) then dqdt = dvdftra elseif (nvdiff /= ntrac .and. .not. shinhong .and. .not. do_ysu) then + + if (ntke>0) then + do k=1,levs + do i=1,im + dqdt(i,k,ntke) = dvdftra(i,k,ntkev) + enddo + enddo + endif + if (imp_physics == imp_physics_wsm6) then ! WSM6 do k=1,levs @@ -335,6 +388,40 @@ subroutine GFS_PBL_generic_post_run (im, levs, nvdiff, ntrac, enddo enddo endif + elseif (imp_physics == imp_physics_mg) then ! MG3/2 + if (ntgl > 0) then ! MG + do k=1,levs + do i=1,im + dqdt(i,k,1) = dvdftra(i,k,1) + dqdt(i,k,ntcw) = dvdftra(i,k,2) + dqdt(i,k,ntiw) = dvdftra(i,k,3) + dqdt(i,k,ntrw) = dvdftra(i,k,4) + dqdt(i,k,ntsw) = dvdftra(i,k,5) + dqdt(i,k,ntgl) = dvdftra(i,k,6) + dqdt(i,k,ntlnc) = dvdftra(i,k,7) + dqdt(i,k,ntinc) = dvdftra(i,k,8) + dqdt(i,k,ntrnc) = dvdftra(i,k,9) + dqdt(i,k,ntsnc) = dvdftra(i,k,10) + dqdt(i,k,ntgnc) = dvdftra(i,k,11) + dqdt(i,k,ntoz) = dvdftra(i,k,12) + enddo + enddo + else ! MG2 + do k=1,levs + do i=1,im + dqdt(i,k,1) = dvdftra(i,k,1) + dqdt(i,k,ntcw) = dvdftra(i,k,2) + dqdt(i,k,ntiw) = dvdftra(i,k,3) + dqdt(i,k,ntrw) = dvdftra(i,k,4) + dqdt(i,k,ntsw) = dvdftra(i,k,5) + dqdt(i,k,ntlnc) = dvdftra(i,k,6) + dqdt(i,k,ntinc) = dvdftra(i,k,7) + dqdt(i,k,ntrnc) = dvdftra(i,k,8) + dqdt(i,k,ntsnc) = dvdftra(i,k,9) + dqdt(i,k,ntoz) = dvdftra(i,k,10) + enddo + enddo + endif elseif (imp_physics == imp_physics_gfdl) then ! GFDL MP do k=1,levs @@ -360,55 +447,47 @@ subroutine GFS_PBL_generic_post_run (im, levs, nvdiff, ntrac, endif endif - if (satmedmf) then - do k=1,levs - do i=1,im - dqdt(i,k,ntke) = dvdftra(i,k,ntkev) - enddo - enddo - endif - endif ! nvdiff == ntrac ! --- ... coupling insertion ! ### GJF ### the following section needs to be made CCPP-compliant when cplflx = T -! if (cplflx) then -! do i=1,im -! if (ocean(i)) then ! Ocean only, NO LAKES -! if (flag_cice(i)) cice(i) = fice_cice(i) -! if (cice(i) == 1.) then ! use results from CICE -! Coupling%dusfci_cpl(i) = dusfc_cice(i) -! Coupling%dvsfci_cpl(i) = dvsfc_cice(i) -! Coupling%dtsfci_cpl(i) = dtsfc_cice(i) -! Coupling%dqsfci_cpl(i) = dqsfc_cice(i) -! elseif (dry(i) .or. icy(i)) then ! use stress_ocean from sfc_diff for opw component at mixed point -! tem1 = max(Diag%q1(i), 1.e-8) -! rho = Statein%prsl(i,1) / (con_rd*Diag%t1(i)*(1.0+con_fvirt*tem1)) -! if (wind(i) > 0.) then -! Coupling%dusfci_cpl(i) = -rho * stress_ocean(i) * Statein%ugrs(i,1) / wind(i) ! U-momentum flux -! Coupling%dvsfci_cpl(i) = -rho * stress_ocean(i) * Statein%vgrs(i,1) / wind(i) ! V-momentum flux -! else -! Coupling%dusfci_cpl(i) = 0. -! Coupling%dvsfci_cpl(i) = 0. -! end if -! Coupling%dtsfci_cpl(i) = con_cp * rho * hflx_ocean(i) !sensible heat flux over open ocean -! Coupling%dqsfci_cpl(i) = con_hvap * rho * evap_ocean(i) ! latent heat flux over open ocean -! else ! use results from PBL scheme for 100% open ocean -! Coupling%dusfci_cpl(i) = dusfc1(i) -! Coupling%dvsfci_cpl(i) = dvsfc1(i) -! Coupling%dtsfci_cpl(i) = dtsfc1(i) -! Coupling%dqsfci_cpl(i) = dqsfc1(i) -! endif -! -! Coupling%dusfc_cpl (i) = Coupling%dusfc_cpl(i) + Coupling%dusfci_cpl(i) * dtf -! Coupling%dvsfc_cpl (i) = Coupling%dvsfc_cpl(i) + Coupling%dvsfci_cpl(i) * dtf -! Coupling%dtsfc_cpl (i) = Coupling%dtsfc_cpl(i) + Coupling%dtsfci_cpl(i) * dtf -! Coupling%dqsfc_cpl (i) = Coupling%dqsfc_cpl(i) + Coupling%dqsfci_cpl(i) * dtf -! ! -! endif ! Ocean only, NO LAKES -! enddo -! endif +! if (Model%cplflx) then +! do i=1,im +! if (Sfcprop%oceanfrac(i) > 0.0) then ! Ocean only, NO LAKES +! if (fice(i) == 1.0) then ! use results from CICE +! Coupling%dusfci_cpl(i) = dusfc_cice(i) +! Coupling%dvsfci_cpl(i) = dvsfc_cice(i) +! Coupling%dtsfci_cpl(i) = dtsfc_cice(i) +! Coupling%dqsfci_cpl(i) = dqsfc_cice(i) +! elseif (dry(i) .or. icy(i)) then ! use stress_ocean from sfc_diff for opw component at mixed point +! tem1 = max(Diag%q1(i), 1.e-8) +! rho = Statein%prsl(i,1) / (con_rd*Diag%t1(i)*(1.0+con_fvirt*tem1)) +! if (wind(i) > 0.0) then +! tem = - rho * stress_ocn(i) / wind(i) +! Coupling%dusfci_cpl(i) = tem * Statein%ugrs(i,1) ! U-momentum flux +! Coupling%dvsfci_cpl(i) = tem * Statein%vgrs(i,1) ! V-momentum flux +! else +! Coupling%dusfci_cpl(i) = 0.0 +! Coupling%dvsfci_cpl(i) = 0.0 +! endif +! Coupling%dtsfci_cpl(i) = con_cp * rho * hflx_ocn(i) ! sensible heat flux over open ocean +! Coupling%dqsfci_cpl(i) = con_hvap * rho * evap_ocn(i) ! latent heat flux over open ocean +! else ! use results from PBL scheme for 100% open ocean +! Coupling%dusfci_cpl(i) = dusfc1(i) +! Coupling%dvsfci_cpl(i) = dvsfc1(i) +! Coupling%dtsfci_cpl(i) = dtsfc1(i) +! Coupling%dqsfci_cpl(i) = dqsfc1(i) +! endif +! +! Coupling%dusfc_cpl (i) = Coupling%dusfc_cpl(i) + Coupling%dusfci_cpl(i) * dtf +! Coupling%dvsfc_cpl (i) = Coupling%dvsfc_cpl(i) + Coupling%dvsfci_cpl(i) * dtf +! Coupling%dtsfc_cpl (i) = Coupling%dtsfc_cpl(i) + Coupling%dtsfci_cpl(i) * dtf +! Coupling%dqsfc_cpl (i) = Coupling%dqsfc_cpl(i) + Coupling%dqsfci_cpl(i) * dtf +!! +! endif ! Ocean only, NO LAKES +! enddo +! endif !-------------------------------------------------------lssav if loop ---------- if (lssav) then do i=1,im diff --git a/physics/GFS_debug.F90 b/physics/GFS_debug.F90 index 9ed719d76..c4295871f 100644 --- a/physics/GFS_debug.F90 +++ b/physics/GFS_debug.F90 @@ -260,10 +260,10 @@ subroutine GFS_diagtoscreen_run (Model, Statein, Stateout, Sfcprop, Coupling, call print_var(mpirank,omprank, blkno, 'Tbd%ccn_nm' , Tbd%ccn_nm) call print_var(mpirank,omprank, blkno, 'Tbd%aer_nm' , Tbd%aer_nm) ! Diag - call print_var(mpirank,omprank, blkno, 'Diag%fluxr ', Diag%fluxr) - do n=1,size(Diag%fluxr(1,:)) - call print_var(mpirank,omprank, blkno, 'Diag%fluxr_n ', Diag%fluxr(:,n)) - end do + !call print_var(mpirank,omprank, blkno, 'Diag%fluxr ', Diag%fluxr) + !do n=1,size(Diag%fluxr(1,:)) + ! call print_var(mpirank,omprank, blkno, 'Diag%fluxr_n ', Diag%fluxr(:,n)) + !end do call print_var(mpirank,omprank, blkno, 'Diag%srunoff ', Diag%srunoff) call print_var(mpirank,omprank, blkno, 'Diag%evbsa ', Diag%evbsa) call print_var(mpirank,omprank, blkno, 'Diag%evcwa ', Diag%evcwa) diff --git a/physics/GFS_phys_time_vary.fv3.F90 b/physics/GFS_phys_time_vary.fv3.F90 index b8823fac6..76b4eead2 100644 --- a/physics/GFS_phys_time_vary.fv3.F90 +++ b/physics/GFS_phys_time_vary.fv3.F90 @@ -344,7 +344,8 @@ subroutine GFS_phys_time_vary_run (Data, Model, nthrds, errmsg, errflg) real(kind=kind_phys), parameter :: con_99 = 99.0_kind_phys real(kind=kind_phys), parameter :: con_100 = 100.0_kind_phys - integer :: i, j, k, iseed, iskip, ix, nb, nblks + integer :: i, j, k, iseed, iskip, ix, nb, nblks, kdt_rad + real(kind=kind_phys) :: sec_zero real(kind=kind_phys) :: wrk(1) real(kind=kind_phys) :: rannie(Model%cny) real(kind=kind_phys) :: rndval(Model%cnx*Model%cny*Model%nrcm) @@ -473,12 +474,29 @@ subroutine GFS_phys_time_vary_run (Data, Model, nthrds, errmsg, errflg) endif !--- determine if diagnostics buckets need to be cleared - if (mod(Model%kdt,Model%nszero) == 1) then - do nb = 1,nblks - call Data(nb)%Intdiag%rad_zero (Model) - call Data(nb)%Intdiag%phys_zero (Model) + sec_zero = nint(Model%fhzero*con_hr) + if (sec_zero >= nint(max(Model%fhswr,Model%fhlwr))) then + if (mod(Model%kdt,Model%nszero) == 1) then + do nb = 1,nblks + call Data(nb)%Intdiag%rad_zero (Model) + call Data(nb)%Intdiag%phys_zero (Model) !!!! THIS IS THE POINT AT WHICH DIAG%ZHOUR NEEDS TO BE UPDATED - enddo + enddo + endif + else + if (mod(Model%kdt,Model%nszero) == 1) then + do nb = 1,nblks + call Data(nb)%Intdiag%phys_zero (Model) + !!!! THIS IS THE POINT AT WHICH DIAG%ZHOUR NEEDS TO BE UPDATED + enddo + endif + kdt_rad = nint(min(Model%fhswr,Model%fhlwr)/Model%dtp) + if (mod(Model%kdt, kdt_rad) == 1) then + do nb = 1,nblks + call Data(nb)%Intdiag%rad_zero (Model) + !!!! THIS IS THE POINT AT WHICH DIAG%ZHOUR NEEDS TO BE UPDATED + enddo + endif endif end subroutine GFS_phys_time_vary_run diff --git a/physics/GFS_phys_time_vary.scm.F90 b/physics/GFS_phys_time_vary.scm.F90 index 714713f78..200881d2c 100644 --- a/physics/GFS_phys_time_vary.scm.F90 +++ b/physics/GFS_phys_time_vary.scm.F90 @@ -224,6 +224,7 @@ subroutine GFS_phys_time_vary_finalize(errmsg, errflg) if (allocated(ci_pres) ) deallocate(ci_pres) is_initialized = .false. + end subroutine GFS_phys_time_vary_finalize !> \section arg_table_GFS_phys_time_vary_run Argument Table @@ -264,7 +265,8 @@ subroutine GFS_phys_time_vary_run (Grid, Statein, Model, Tbd, Sfcprop, Cldprop, real(kind=kind_phys), parameter :: con_99 = 99.0_kind_phys real(kind=kind_phys), parameter :: con_100 = 100.0_kind_phys - integer :: i, j, k, iseed, iskip, ix, nb + integer :: i, j, k, iseed, iskip, ix, nb, kdt_rad + real(kind=kind_phys) :: sec_zero real(kind=kind_phys) :: wrk(1) real(kind=kind_phys) :: rannie(Model%cny) real(kind=kind_phys) :: rndval(Model%cnx*Model%cny*Model%nrcm) @@ -362,10 +364,29 @@ subroutine GFS_phys_time_vary_run (Grid, Statein, Model, Tbd, Sfcprop, Cldprop, !endif !--- determine if diagnostics buckets need to be cleared - if (mod(Model%kdt,Model%nszero) == 1) then - call Diag%rad_zero (Model) - call Diag%phys_zero (Model) + sec_zero = nint(Model%fhzero*con_hr) + if (sec_zero >= nint(max(Model%fhswr,Model%fhlwr))) then + if (mod(Model%kdt,Model%nszero) == 1) then + do nb = 1,nblks + call Diag%rad_zero (Model) + call Diag%phys_zero (Model) + !!!! THIS IS THE POINT AT WHICH DIAG%ZHOUR NEEDS TO BE UPDATED + enddo + endif + else + if (mod(Model%kdt,Model%nszero) == 1) then + do nb = 1,nblks + call Diag%phys_zero (Model) + !!!! THIS IS THE POINT AT WHICH DIAG%ZHOUR NEEDS TO BE UPDATED + enddo + endif + kdt_rad = nint(min(Model%fhswr,Model%fhlwr)/Model%dtp) + if (mod(Model%kdt, kdt_rad) == 1) then + do nb = 1,nblks + call Diag%rad_zero (Model) !!!! THIS IS THE POINT AT WHICH DIAG%ZHOUR NEEDS TO BE UPDATED + enddo + endif endif end subroutine GFS_phys_time_vary_run diff --git a/physics/GFS_rrtmg_pre.F90 b/physics/GFS_rrtmg_pre.F90 index 150247723..dde7d6f05 100644 --- a/physics/GFS_rrtmg_pre.F90 +++ b/physics/GFS_rrtmg_pre.F90 @@ -70,7 +70,7 @@ end subroutine GFS_rrtmg_pre_init !! | cldsa | cloud_area_fraction_for_radiation | fraction of clouds for low, middle,high, total and BL | frac | 2 | real | kind_phys | out | F | !! | mtopa | model_layer_number_at_cloud_top | vertical indices for low, middle and high cloud tops | index | 2 | integer | | out | F | !! | mbota | model_layer_number_at_cloud_base | vertical indices for low, middle and high cloud bases | index | 2 | integer | | out | F | -!! | de_lgth | cloud_decorrelation_length | cloud decorrelation length | km | 1 | real | kind_phys | out | F | +!! | de_lgth | cloud_decorrelation_length | cloud decorrelation length | km | 1 | real | kind_phys | out | F | !! | alb1d | surface_albedo_perturbation | surface albedo perturbation | frac | 1 | real | kind_phys | out | F | !! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | !! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | @@ -191,7 +191,7 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input integer, intent(out) :: errflg ! Local variables - integer :: me, nfxr, ntrac, ntcw, ntiw, ncld, ntrw, ntsw, ntgl + integer :: me, nfxr, ntrac, ntcw, ntiw, ncld, ntrw, ntsw, ntgl, ncndl integer :: i, j, k, k1, k2, lsk, lv, n, itop, ibtc, LP1, lla, llb, lya, lyb @@ -210,7 +210,7 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP+1) :: tem2db ! real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP+1) :: hz - real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,Model%ncnd) :: ccnd + real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,min(4,Model%ncnd)) :: ccnd real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,2:Model%ntrac) :: tracer1 real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,NF_CLDS) :: clouds real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levr+LTP,NF_VGAS) :: gasvmr @@ -235,6 +235,7 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input ntrw = Model%ntrw ntsw = Model%ntsw ntgl = Model%ntgl + ncndl = min(Model%ncnd,4) LP1 = LM + 1 ! num of in/out levels @@ -605,7 +606,7 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input enddo enddo endif - do n=1,Model%ncnd + do n=1,ncndl do k=1,LMK do i=1,IM if (ccnd(i,k,n) < epsq) ccnd(i,k,n) = 0.0 @@ -784,7 +785,7 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input ! or unified cloud and/or with MG microphysics if (Model%uni_cld .and. Model%ncld >= 2) then - call progclduni (plyr, plvl, tlyr, tvly, ccnd, Model%ncnd, & ! --- inputs + call progclduni (plyr, plvl, tlyr, tvly, ccnd, ncndl, & ! --- inputs Grid%xlat, Grid%xlon, Sfcprop%slmsk,dz,delp, & IM, LMK, LMP, cldcov, & effrl, effri, effrr, effrs, Model%effr_in, & @@ -818,7 +819,7 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input clouds, cldsa, mtopa, mbota, de_lgth) ! --- outputs else - call progclduni (plyr, plvl, tlyr, tvly, ccnd, Model%ncnd, & ! --- inputs + call progclduni (plyr, plvl, tlyr, tvly, ccnd, ncndl, & ! --- inputs Grid%xlat, Grid%xlon, Sfcprop%slmsk, dz,delp, & IM, LMK, LMP, cldcov, & effrl, effri, effrr, effrs, Model%effr_in, & @@ -835,9 +836,9 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input elseif(Model%imp_physics == 8 .or. Model%imp_physics == 6) then ! Thompson / WSM6 cloud micrphysics scheme if (Model%kdt == 1) then - Tbd%phy_f3d(:,:,1) = 10. - Tbd%phy_f3d(:,:,2) = 50. - Tbd%phy_f3d(:,:,3) = 250. + Tbd%phy_f3d(:,:,Model%nleffr) = 10. + Tbd%phy_f3d(:,:,Model%nieffr) = 50. + Tbd%phy_f3d(:,:,Model%nseffr) = 250. endif call progcld5 (plyr,plvl,tlyr,qlyr,qstl,rhly,tracer1, & ! --- inputs diff --git a/physics/GFS_suite_interstitial.F90 b/physics/GFS_suite_interstitial.F90 index eb1e2e2b4..262454f15 100644 --- a/physics/GFS_suite_interstitial.F90 +++ b/physics/GFS_suite_interstitial.F90 @@ -95,7 +95,6 @@ end subroutine GFS_suite_interstitial_1_finalize !! | im | horizontal_loop_extent | horizontal loop extent | count | 0 | integer | | in | F | !! | levs | vertical_dimension | vertical layer dimension | count | 0 | integer | | in | F | !! | ntrac | number_of_tracers | number of tracers | count | 0 | integer | | in | F | -!! | crtrh | critical_relative_humidity_at_sfc_pbltop_toa | critical relative humidity at SFC, PBL top and TOA | frac | 1 | real | kind_phys | in | F | !! | dtf | time_step_for_dynamics | dynamics timestep | s | 0 | real | kind_phys | in | F | !! | dtp | time_step_for_physics | physics timestep | s | 0 | real | kind_phys | in | F | !! | slmsk | sea_land_ice_mask_real | landmask: sea/land/ice=0/1/2 | flag | 1 | real | kind_phys | in | F | @@ -103,12 +102,8 @@ end subroutine GFS_suite_interstitial_1_finalize !! | dxmin | minimum_scaling_factor_for_critical_relative_humidity | minimum scaling factor for critical relative humidity | m2 rad-2 | 0 | real | kind_phys | in | F | !! | dxinv | inverse_scaling_factor_for_critical_relative_humidity | inverse scaling factor for critical relative humidity | rad2 m-2 | 0 | real | kind_phys | in | F | !! | pgr | surface_air_pressure | surface pressure | Pa | 1 | real | kind_phys | in | F | -!! | rhbbot | critical_relative_humidity_at_surface | critical relative humidity at the surface | frac | 0 | real | kind_phys | out | F | -!! | rhpbl | critical_relative_humidity_at_PBL_top | critical relative humidity at the PBL top | frac | 0 | real | kind_phys | out | F | -!! | rhbtop | critical_relative_humidity_at_top_of_atmosphere | critical relative humidity at the top of atmosphere | frac | 0 | real | kind_phys | out | F | !! | frain | dynamics_to_physics_timestep_ratio | ratio of dynamics timestep to physics timestep | none | 0 | real | kind_phys | out | F | !! | islmsk | sea_land_ice_mask | landmask: sea/land/ice=0/1/2 | flag | 1 | integer | | out | F | -!! | frland | land_area_fraction_for_microphysics | land area fraction used in microphysics schemes | frac | 1 | real | kind_phys | out | F | !! | work1 | grid_size_related_coefficient_used_in_scale-sensitive_schemes | grid size related coefficient used in scale-sensitive schemes | none | 1 | real | kind_phys | out | F | !! | work2 | grid_size_related_coefficient_used_in_scale-sensitive_schemes_complement | complement to work1 | none | 1 | real | kind_phys | out | F | !! | psurf | surface_air_pressure_diag | surface air pressure diagnostic | Pa | 1 | real | kind_phys | out | F | @@ -117,14 +112,11 @@ end subroutine GFS_suite_interstitial_1_finalize !! | dtdt | tendency_of_air_temperature_due_to_model_physics | updated tendency of the temperature | K s-1 | 2 | real | kind_phys | out | F | !! | dtdtc | tendency_of_air_temperature_due_to_radiative_heating_assuming_clear_sky | clear sky radiative (shortwave + longwave) heating rate at current time | K s-1 | 2 | real | kind_phys | out | F | !! | dqdt | tendency_of_tracers_due_to_model_physics | updated tendency of the tracers | kg kg-1 s-1 | 3 | real | kind_phys | out | F | -!! | tisfc | sea_ice_temperature | sea ice surface skin temperature | K | 1 | real | kind_phys | in | F | -!! | tice | sea_ice_temperature_interstitial | sea ice surface skin temperature use as interstitial | K | 1 | real | kind_phys | out | F | !! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | !! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | !! - subroutine GFS_suite_interstitial_1_run (im, levs, ntrac, crtrh, dtf, dtp, slmsk, area, dxmin, dxinv, pgr, & - rhbbot, rhpbl, rhbtop, frain, islmsk, frland, work1, work2, psurf, dudt, dvdt, dtdt, dtdtc, dqdt, & - tisfc, tice, errmsg, errflg) + subroutine GFS_suite_interstitial_1_run (im, levs, ntrac, dtf, dtp, slmsk, area, dxmin, dxinv, pgr, & + frain, islmsk, work1, work2, psurf, dudt, dvdt, dtdt, dtdtc, dqdt, errmsg, errflg) use machine, only: kind_phys @@ -133,16 +125,13 @@ subroutine GFS_suite_interstitial_1_run (im, levs, ntrac, crtrh, dtf, dtp, slmsk ! interface variables integer, intent(in) :: im, levs, ntrac real(kind=kind_phys), intent(in) :: dtf, dtp, dxmin, dxinv - real(kind=kind_phys), intent(in), dimension(3) :: crtrh real(kind=kind_phys), intent(in), dimension(im) :: slmsk, area, pgr - real(kind=kind_phys), intent(out) :: rhbbot, rhpbl, rhbtop, frain + real(kind=kind_phys), intent(out) :: frain integer, intent(out), dimension(im) :: islmsk - real(kind=kind_phys), intent(out), dimension(im) :: frland, work1, work2, psurf + real(kind=kind_phys), intent(out), dimension(im) :: work1, work2, psurf real(kind=kind_phys), intent(out), dimension(im,levs) :: dudt, dvdt, dtdt, dtdtc real(kind=kind_phys), intent(out), dimension(im,levs,ntrac) :: dqdt - real(kind=kind_phys), intent(in), dimension(im) :: tisfc - real(kind=kind_phys), intent(out), dimension(im) :: tice character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg @@ -153,26 +142,15 @@ subroutine GFS_suite_interstitial_1_run (im, levs, ntrac, crtrh, dtf, dtp, slmsk errmsg = '' errflg = 0 - rhbbot = crtrh(1) - rhpbl = crtrh(2) - rhbtop = crtrh(3) - frain = dtf / dtp do i = 1, im islmsk(i) = nint(slmsk(i)) - if (islmsk(i) == 1) then - frland(i) = 1.0 - else - frland(i) = 0.0 - endif + work1(i) = (log(area(i)) - dxmin) * dxinv work1(i) = max(0.0, min(1.0,work1(i))) work2(i) = 1.0 - work1(i) psurf(i) = pgr(i) - ! DH* 20190507 - assign sea ice temperature to interstitial variable - tice(i) = tisfc(i) - ! *DH end do do k=1,levs @@ -296,7 +274,7 @@ subroutine GFS_suite_interstitial_2_run (im, levs, lssav, ldiag3d, lsidea, cplfl logical, dimension(im) :: invrsn real(kind=kind_phys), dimension(im) :: tx1, tx2 - real(kind=kind_phys), parameter :: qmin = 1.0e-10 + real(kind=kind_phys), parameter :: qmin = 1.0d-10 ! Initialize CCPP error handling variables errmsg = '' @@ -529,6 +507,7 @@ subroutine GFS_suite_stateout_update_run (im, levs, ntrac, dtp, & errmsg = '' errflg = 0 + ! DH* add gw_dXdt terms here gt0(:,:) = tgrs(:,:) + dtdt(:,:) * dtp gu0(:,:) = ugrs(:,:) + dudt(:,:) * dtp gv0(:,:) = vgrs(:,:) + dvdt(:,:) * dtp @@ -574,7 +553,7 @@ end subroutine GFS_suite_interstitial_3_finalize !! | xlat | latitude | latitude | radians | 1 | real | kind_phys | in | F | !! | gq0 | tracer_concentration_updated_by_physics | tracer concentration updated by physics | kg kg-1 | 3 | real | kind_phys | in | F | !! | imp_physics | flag_for_microphysics_scheme | choice of microphysics scheme | flag | 0 | integer | | in | F | -!! | imp_physics_mg | flag_for_morrison_gettelman_microphysics_scheme | choice of Morrison-Gettelman rmicrophysics scheme | flag | 0 | integer | | in | F | +!! | imp_physics_mg | flag_for_morrison_gettelman_microphysics_scheme | choice of Morrison-Gettelman microphysics scheme | flag | 0 | integer | | in | F | !! | imp_physics_zhao_carr | flag_for_zhao_carr_microphysics_scheme | choice of Zhao-Carr microphysics scheme | flag | 0 | integer | | in | F | !! | imp_physics_zhao_carr_pdf | flag_for_zhao_carr_pdf_microphysics_scheme | choice of Zhao-Carr microphysics scheme with PDF clouds | flag | 0 | integer | | in | F | !! | imp_physics_gfdl | flag_for_gfdl_microphysics_scheme | choice of GFDL microphysics scheme | flag | 0 | integer | | in | F | @@ -591,6 +570,7 @@ end subroutine GFS_suite_interstitial_3_finalize !! | work1 | grid_size_related_coefficient_used_in_scale-sensitive_schemes | grid size related coefficient used in scale-sensitive schemes | none | 1 | real | kind_phys | in | F | !! | work2 | grid_size_related_coefficient_used_in_scale-sensitive_schemes_complement | complement to work1 | none | 1 | real | kind_phys | in | F | !! | kpbl | vertical_index_at_top_of_atmosphere_boundary_layer | vertical index at top atmospheric boundary layer | index | 1 | integer | | in | F | +!! | kinver | index_of_highest_temperature_inversion | index of highest temperature inversion | index | 1 | integer | | in | F | !! | clw | convective_transportable_tracers | array to contain cloud water and other convective trans. tracers | kg kg-1 | 3 | real | kind_phys | inout | F | !! | rhc | critical_relative_humidity | critical relative humidity | frac | 2 | real | kind_phys | inout | F | !! | save_qc | cloud_condensed_water_mixing_ratio_save | moist (dry+vapor, no condensates) mixing ratio of cloud water (condensate) before entering a physics scheme | kg kg-1 | 2 | real | kind_phys | inout | F | @@ -602,7 +582,7 @@ end subroutine GFS_suite_interstitial_3_finalize subroutine GFS_suite_interstitial_3_run (im, levs, nn, cscnv, satmedmf, trans_trac, do_shoc, ltaerosol, ntrac, ntcw, & ntiw, ntclamt, ntrw, ntsw, ntrnc, ntsnc, ntgl, ntgnc, xlat, gq0, imp_physics, imp_physics_mg, imp_physics_zhao_carr,& imp_physics_zhao_carr_pdf, imp_physics_gfdl, imp_physics_thompson, imp_physics_wsm6, prsi, prsl, prslk, rhcbot, & - rhcpbl, rhctop, rhcmax, islmsk, work1, work2, kpbl, & + rhcpbl, rhctop, rhcmax, islmsk, work1, work2, kpbl, kinver, & clw, rhc, save_qc, save_qi, errmsg, errflg) use machine, only: kind_phys @@ -613,7 +593,7 @@ subroutine GFS_suite_interstitial_3_run (im, levs, nn, cscnv, satmedmf, trans_tr integer, intent(in) :: im, levs, nn, ntrac, ntcw, ntiw, ntclamt, ntrw, & ntsw, ntrnc, ntsnc, ntgl, ntgnc, imp_physics, imp_physics_mg, imp_physics_zhao_carr, imp_physics_zhao_carr_pdf, & imp_physics_gfdl, imp_physics_thompson, imp_physics_wsm6 - integer, dimension(im), intent(in) :: islmsk, kpbl + integer, dimension(im), intent(in) :: islmsk, kpbl, kinver logical, intent(in) :: cscnv, satmedmf, trans_trac, do_shoc, ltaerosol real(kind=kind_phys), intent(in) :: rhcbot, rhcmax, rhcpbl, rhctop @@ -634,10 +614,13 @@ subroutine GFS_suite_interstitial_3_run (im, levs, nn, cscnv, satmedmf, trans_tr ! local variables integer :: i,k,n,tracers,kk real(kind=kind_phys) :: tem, tem1, tem2 - real(kind=kind_phys), dimension(im) :: tx1, tx2 + real(kind=kind_phys), dimension(im) :: tx1, tx2, tx3, tx4 - real(kind=kind_phys),parameter :: slope_mg = 0.02, slope_upmg = 0.04, & - turnrhcrit = 0.900, turnrhcrit_upper = 0.150 + !real(kind=kind_phys),parameter :: slope_mg = 0.02, slope_upmg = 0.04, & + ! turnrhcrit = 0.900, turnrhcrit_upper = 0.150 + ! in the following inverse of slope_mg and slope_upmg are specified + real(kind=kind_phys),parameter :: slope_mg = 50.0_kind_phys, & + slope_upmg = 25.0_kind_phys ! Initialize CCPP error handling variables errmsg = '' @@ -687,17 +670,22 @@ subroutine GFS_suite_interstitial_3_run (im, levs, nn, cscnv, satmedmf, trans_tr endif ! end if_ras or cfscnv or samf if (ntcw > 0) then - if (imp_physics == imp_physics_mg) then ! compute rhc for GMAO macro physics cloud pdf + if (imp_physics == imp_physics_mg .and. rhcpbl < 0.5) then ! compute rhc for GMAO macro physics cloud pdf do i=1,im tx1(i) = 1.0 / prsi(i,1) - tx2(i) = 1.0 - rhcmax * work1(i)-rhcbot*work2(i) + tx2(i) = 1.0 - rhcmax*work1(i)-rhcbot*work2(i) + + kk = min(kinver(i), max(2,kpbl(i))) + tx3(i) = prsi(i,kk)*tx1(i) + tx4(i) = rhcpbl - rhctop*abs(cos(xlat(i))) enddo do k = 1, levs do i = 1, im - kk = max(2,kpbl(i)) tem = prsl(i,k) * tx1(i) - tem1 = min(max((tem-prsi(i,kk)*tx1(i))/slope_mg, -20.0), 20.0) - tem2 = min(max((0.3-0.2*abs(cos(xlat(i)))-tem)/slope_upmg, -20.0), 20.0) ! Anning + tem1 = min(max((tem-tx3(i))*slope_mg, -20.0), 20.0) + ! Using rhcpbl and rhctop from the namelist instead of 0.3 and 0.2 + ! and rhcbot represents pbl top critical relative humidity + tem2 = min(max((tx4(i)-tem)*slope_upmg, -20.0), 20.0) ! Anning if (islmsk(i) > 0) then tem1 = 1.0 / (1.0+exp(tem1+tem1)) else @@ -706,7 +694,6 @@ subroutine GFS_suite_interstitial_3_run (im, levs, nn, cscnv, satmedmf, trans_tr tem2 = 1.0 / (1.0+exp(tem2)) rhc(i,k) = min(rhcmax, max(0.7, 1.0-tx2(i)*tem1*tem2)) -! rhc(i,k) = min(rhcmax, rhcmax*work1(i) + (1.0-tx2(i)*tem1*tem2)*work2(i)) enddo enddo else @@ -714,11 +701,9 @@ subroutine GFS_suite_interstitial_3_run (im, levs, nn, cscnv, satmedmf, trans_tr do i=1,im kk = max(10,kpbl(i)) if (k < kk) then - tem = rhcbot - (rhcbot-rhcpbl) * (1.0-prslk(i,k)) & - / (1.0-prslk(i,kk)) + tem = rhcbot - (rhcbot-rhcpbl) * (1.0-prslk(i,k)) / (1.0-prslk(i,kk)) else - tem = rhcpbl - (rhcpbl-rhctop) * (prslk(i,kk)-prslk(i,k)) & - / prslk(i,kk) + tem = rhcpbl - (rhcpbl-rhctop) * (prslk(i,kk)-prslk(i,k)) / prslk(i,kk) endif tem = rhcmax * work1(i) + tem * work2(i) rhc(i,k) = max(0.0, min(1.0,tem)) diff --git a/physics/GFS_surface_composites.F90 b/physics/GFS_surface_composites.F90 index e5ca18683..df99b68dc 100644 --- a/physics/GFS_surface_composites.F90 +++ b/physics/GFS_surface_composites.F90 @@ -24,16 +24,19 @@ end subroutine GFS_surface_composites_pre_finalize !! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | !! |----------------|-----------------------------------------------------------------------------------|----------------------------------------------------------------------|------------|------|-----------|-----------|--------|----------| !! | im | horizontal_loop_extent | horizontal loop extent | count | 0 | integer | | in | F | +!! | frac_grid | flag_for_fractional_grid | flag for fractional grid | flag | 0 | logical | | in | F | +!! | flag_cice | flag_for_cice | flag for cice | flag | 1 | logical | | in | F | !! | cplflx | flag_for_flux_coupling | flag controlling cplflx collection (default off) | flag | 0 | logical | | in | F | !! | landfrac | land_area_fraction | fraction of horizontal grid area occupied by land | frac | 1 | real | kind_phys | in | F | !! | lakefrac | lake_area_fraction | fraction of horizontal grid area occupied by lake | frac | 1 | real | kind_phys | in | F | !! | oceanfrac | sea_area_fraction | fraction of horizontal grid area occupied by ocean | frac | 1 | real | kind_phys | in | F | +!! | frland | land_area_fraction_for_microphysics | land area fraction used in microphysics schemes | frac | 1 | real | kind_phys | out | F | !! | dry | flag_nonzero_land_surface_fraction | flag indicating presence of some land surface area fraction | flag | 1 | logical | | inout | F | !! | icy | flag_nonzero_sea_ice_surface_fraction | flag indicating presence of some sea ice surface area fraction | flag | 1 | logical | | inout | F | !! | lake | flag_nonzero_lake_surface_fraction | flag indicating presence of some lake surface area fraction | flag | 1 | logical | | inout | F | !! | ocean | flag_nonzero_ocean_surface_fraction | flag indicating presence of some ocean surface area fraction | flag | 1 | logical | | inout | F | !! | wet | flag_nonzero_wet_surface_fraction | flag indicating presence of some ocean or lake surface area fraction | flag | 1 | logical | | inout | F | -!! | fice | sea_ice_concentration | ice fraction over open water | frac | 1 | real | kind_phys | in | F | +!! | cice | sea_ice_concentration | ice fraction over open water | frac | 1 | real | kind_phys | in | F | !! | cimin | minimum_sea_ice_concentration | minimum sea ice concentration | frac | 0 | real | kind_phys | in | F | !! | zorl | surface_roughness_length | surface roughness length | cm | 1 | real | kind_phys | in | F | !! | zorlo | surface_roughness_length_over_ocean | surface roughness length over ocean | cm | 1 | real | kind_phys | inout | F | @@ -53,103 +56,140 @@ end subroutine GFS_surface_composites_pre_finalize !! | uustar_lnd | surface_friction_velocity_over_land | surface friction velocity over land | m s-1 | 1 | real | kind_phys | inout | F | !! | uustar_ice | surface_friction_velocity_over_ice | surface friction velocity over ice | m s-1 | 1 | real | kind_phys | inout | F | !! | weasd | water_equivalent_accumulated_snow_depth | water equiv of acc snow depth over land and sea ice | mm | 1 | real | kind_phys | in | F | +!! | weasd_ocn | water_equivalent_accumulated_snow_depth_over_ocean | water equiv of acc snow depth over ocean | mm | 1 | real | kind_phys | inout | F | !! | weasd_lnd | water_equivalent_accumulated_snow_depth_over_land | water equiv of acc snow depth over land | mm | 1 | real | kind_phys | inout | F | !! | weasd_ice | water_equivalent_accumulated_snow_depth_over_ice | water equiv of acc snow depth over ice | mm | 1 | real | kind_phys | inout | F | !! | ep1d_ice | surface_upward_potential_latent_heat_flux_over_ice | surface upward potential latent heat flux over ice | W m-2 | 1 | real | kind_phys | inout | F | -!! | tsfc | surface_skin_temperature | surface skin temperature | K | 1 | real | kind_phys | in | F | +!! | tsfc | surface_skin_temperature | surface skin temperature | K | 1 | real | kind_phys | inout | F | !! | tsfco | sea_surface_temperature | sea surface temperature | K | 1 | real | kind_phys | inout | F | !! | tsfcl | surface_skin_temperature_over_land | surface skin temperature over land | K | 1 | real | kind_phys | inout | F | !! | tsfc_ocn | surface_skin_temperature_over_ocean_interstitial | surface skin temperature over ocean (temporary use as interstitial) | K | 1 | real | kind_phys | inout | F | !! | tsfc_lnd | surface_skin_temperature_over_land_interstitial | surface skin temperature over land (temporary use as interstitial) | K | 1 | real | kind_phys | inout | F | !! | tsfc_ice | surface_skin_temperature_over_ice_interstitial | surface skin temperature over ice (temporary use as interstitial) | K | 1 | real | kind_phys | inout | F | !! | tisfc | sea_ice_temperature | sea ice surface skin temperature | K | 1 | real | kind_phys | inout | F | +!! | tice | sea_ice_temperature_interstitial | sea ice surface skin temperature use as interstitial | K | 1 | real | kind_phys | out | F | !! | tsurf | surface_skin_temperature_after_iteration | surface skin temperature after iteration | K | 1 | real | kind_phys | inout | F | !! | tsurf_ocn | surface_skin_temperature_after_iteration_over_ocean | surface skin temperature after iteration over ocean | K | 1 | real | kind_phys | inout | F | !! | tsurf_lnd | surface_skin_temperature_after_iteration_over_land | surface skin temperature after iteration over land | K | 1 | real | kind_phys | inout | F | !! | tsurf_ice | surface_skin_temperature_after_iteration_over_ice | surface skin temperature after iteration over ice | K | 1 | real | kind_phys | inout | F | +!! | gflx_ice | upward_heat_flux_in_soil_over_ice | soil heat flux over ice | W m-2 | 1 | real | kind_phys | inout | F | !! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | !! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | !! #endif - subroutine GFS_surface_composites_pre_run (im, cplflx, landfrac, lakefrac, oceanfrac, & - dry, icy, lake, ocean, wet, fice, cimin, zorl, zorlo, zorll, zorl_ocn, & - zorl_lnd, zorl_ice, snowd, snowd_ocn, snowd_lnd, snowd_ice, tprcp, tprcp_ocn, & - tprcp_lnd, tprcp_ice, uustar, uustar_lnd, uustar_ice, weasd, weasd_lnd, & - weasd_ice, ep1d_ice, tsfc, tsfco, tsfcl, tsfc_ocn, tsfc_lnd, tsfc_ice, tisfc, & - tsurf, tsurf_ocn, tsurf_lnd, tsurf_ice, errmsg, errflg) + subroutine GFS_surface_composites_pre_run (im, frac_grid, flag_cice, cplflx, landfrac, lakefrac, oceanfrac, & + frland, dry, icy, lake, ocean, wet, cice, cimin, zorl, zorlo, zorll, zorl_ocn, & + zorl_lnd, zorl_ice, snowd, snowd_ocn, snowd_lnd, snowd_ice, tprcp, tprcp_ocn, & + tprcp_lnd, tprcp_ice, uustar, uustar_lnd, uustar_ice, weasd, weasd_ocn, & + weasd_lnd, weasd_ice, ep1d_ice, tsfc, tsfco, tsfcl, tsfc_ocn, tsfc_lnd, & + tsfc_ice, tisfc, tice, tsurf, tsurf_ocn, tsurf_lnd, tsurf_ice, gflx_ice, & + errmsg, errflg) use machine, only: kind_phys implicit none ! Interface variables - integer, intent(in) :: im - logical, intent(in) :: cplflx + integer, intent(in ) :: im + logical, intent(in ) :: frac_grid, cplflx + logical, dimension(im), intent(in ) :: flag_cice logical, dimension(im), intent(inout) :: dry, icy, lake, ocean, wet - real(kind=kind_phys), intent(in) :: cimin - real(kind=kind_phys), dimension(im), intent(in) :: landfrac, lakefrac, oceanfrac, fice - real(kind=kind_phys), dimension(im), intent(in) :: zorl, snowd, tprcp, uustar, weasd, tsfc + real(kind=kind_phys), intent(in ) :: cimin + real(kind=kind_phys), dimension(im), intent(in ) :: landfrac, lakefrac, oceanfrac, cice + real(kind=kind_phys), dimension(im), intent( out) :: frland + real(kind=kind_phys), dimension(im), intent(in ) :: zorl, snowd, tprcp, uustar, weasd - real(kind=kind_phys), dimension(im), intent(inout) :: zorlo, zorll, tsfco, tsfcl, tisfc, tsurf + real(kind=kind_phys), dimension(im), intent(inout) :: zorlo, zorll, tsfc, tsfco, tsfcl, tisfc, tsurf real(kind=kind_phys), dimension(im), intent(inout) :: snowd_ocn, snowd_lnd, snowd_ice, tprcp_ocn, & tprcp_lnd, tprcp_ice, zorl_ocn, zorl_lnd, zorl_ice, tsfc_ocn, tsfc_lnd, tsfc_ice, tsurf_ocn, & - tsurf_lnd, tsurf_ice, uustar_lnd, uustar_ice, weasd_lnd, weasd_ice, ep1d_ice + tsurf_lnd, tsurf_ice, uustar_lnd, uustar_ice, weasd_ocn, weasd_lnd, weasd_ice, ep1d_ice, gflx_ice + real(kind=kind_phys), dimension(im), intent( out) :: tice ! CCPP error handling character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg ! Local variables + real(kind=kind_phys), parameter :: one = 1.0d0 integer :: i ! Initialize CCPP error handling variables errmsg = '' errflg = 0 - do i = 1, im - if(oceanfrac(i)>0.) ocean(i) = .true. - if(landfrac(i) >0.) dry(i) = .true. - if(lakefrac(i) >0.) lake(i) = .true. - if(ocean(i) .or. lake(i)) wet(i) = .true. - if(wet(i) .and. fice(i) >= cimin*max(oceanfrac(i),lakefrac(i))) icy(i) = .true. - enddo - do i=1,im - if (.not. cplflx) then + frland(i) = landfrac(i) + if (frland(i) > 0.0) dry(i) = .true. + if (cice(i) >= cimin*(1.-frland(i)) .and. frland(i)<1.) icy(i) = .true. + if (frland(i)+cice(i) < 1.0 ) wet(i) = .true. ! there is some open water! + enddo + + if (frac_grid) then + do i=1,im + tsfc(i) = tsfcl(i) * frland(i) & + + tisfc(i) * cice(i) & + + tsfco(i) * (one-cice(i)-frland(i)) + enddo + elseif (cplflx) then + do i=1,im + if (flag_cice(i)) then + tsfc(i) = tisfc(i) * cice(i) & + + tsfc (i) * (one-cice(i)) + icy(i) = .true. + endif + enddo + endif + + if (.not. cplflx .or. .not. frac_grid) then + do i=1,im zorll(i) = zorl(i) zorlo(i) = zorl(i) tsfcl(i) = tsfc(i) tsfco(i) = tsfc(i) - tisfc(i) = tsfc(i) - end if - if(wet(i)) then - snowd_ocn(i) = snowd(i) - tprcp_ocn(i) = tprcp(i) - zorl_ocn(i) = zorlo(i) - tsfc_ocn(i) = tsfco(i) - tsurf_ocn(i)= tsfco(i) + !tisfc(i) = tsfc(i) + enddo + endif + + do i=1,im + if (wet(i)) then ! Water + tprcp_ocn(i) = tprcp(i) + zorl_ocn(i) = zorlo(i) + tsfc_ocn(i) = tsfco(i) + tsurf_ocn(i) = tsfco(i) +! weasd_ocn(i) = weasd(i) +! snowd_ocn(i) = snowd(i) + weasd_ocn(i) = 0.0 + snowd_ocn(i) = 0.0 endif - if (dry(i)) then + if (dry(i)) then ! Land uustar_lnd(i) = uustar(i) - weasd_lnd(i) = weasd(i) - tprcp_lnd(i) = tprcp(i) - zorl_lnd(i) = zorll(i) - tsfc_lnd(i) = tsfcl(i) - tsurf_lnd(i) = tsfcl(i) - snowd_lnd(i) = snowd(i) + weasd_lnd(i) = weasd(i) + tprcp_lnd(i) = tprcp(i) + zorl_lnd(i) = zorll(i) + tsfc_lnd(i) = tsfcl(i) + tsurf_lnd(i) = tsfcl(i) + snowd_lnd(i) = snowd(i) end if - if (icy(i)) then + if (icy(i)) then ! Ice uustar_ice(i) = uustar(i) - weasd_ice(i) = weasd(i) - tprcp_ice(i) = tprcp(i) - zorl_ice(i) = zorll(i) - tsfc_ice(i) = tisfc(i) - tsurf_ice(i)= tisfc(i) - snowd_ice(i) = snowd(i) - ep1d_ice(i) = 0. + weasd_ice(i) = weasd(i) + tprcp_ice(i) = tprcp(i) + zorl_ice(i) = zorll(i) +! tsfc_ice(i) = tisfc(i) +! tsurf_ice(i) = tisfc(i) + tsfc_ice(i) = tsfc(i) + tsurf_ice(i) = tsfc(i) + snowd_ice(i) = snowd(i) + ep1d_ice(i) = 0. + gflx_ice(i) = 0. end if enddo + ! Assign sea ice temperature to interstitial variable + do i = 1, im + tice(i) = tisfc(i) + end do + end subroutine GFS_surface_composites_pre_run end module GFS_surface_composites_pre @@ -175,147 +215,155 @@ end subroutine GFS_surface_composites_post_finalize #if 0 !> \section arg_table_GFS_surface_composites_post_run Argument Table -!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | -!! |----------------|---------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------|-------------|------|------------|-----------|--------|----------| -!! | im | horizontal_loop_extent | horizontal loop extent | count | 0 | integer | | in | F | -!! | cplflx | flag_for_flux_coupling | flag controlling cplflx collection (default off) | flag | 0 | logical | | in | F | -!! | flag_cice | flag_for_cice | flag for cice | flag | 1 | logical | | in | F | -!! | dry | flag_nonzero_land_surface_fraction | flag indicating presence of some land surface area fraction | flag | 1 | logical | | in | F | -!! | wet | flag_nonzero_wet_surface_fraction | flag indicating presence of some ocean or lake surface area fraction | flag | 1 | logical | | in | F | -!! | icy | flag_nonzero_sea_ice_surface_fraction | flag indicating presence of some sea ice surface area fraction | flag | 1 | logical | | in | F | -!! | lndfrac | land_area_fraction | fraction of horizontal grid area occupied by land | frac | 1 | real | kind_phys | in | F | -!! | lakfrac | lake_area_fraction | fraction of horizontal grid area occupied by lake | frac | 1 | real | kind_phys | in | F | -!! | ocnfrac | sea_area_fraction | fraction of horizontal grid area occupied by ocean | frac | 1 | real | kind_phys | in | F | -!! | cice | sea_ice_concentration | ice fraction over open water | frac | 1 | real | kind_phys | in | F | -!! | zorl | surface_roughness_length | surface roughness length | cm | 1 | real | kind_phys | inout | F | -!! | zorlo | surface_roughness_length_over_ocean | surface roughness length over ocean | cm | 1 | real | kind_phys | inout | F | -!! | zorll | surface_roughness_length_over_land | surface roughness length over land | cm | 1 | real | kind_phys | inout | F | -!! | zorl_ocn | surface_roughness_length_over_ocean_interstitial | surface roughness length over ocean (temporary use as interstitial) | cm | 1 | real | kind_phys | in | F | -!! | zorl_lnd | surface_roughness_length_over_land_interstitial | surface roughness length over land (temporary use as interstitial) | cm | 1 | real | kind_phys | in | F | -!! | zorl_ice | surface_roughness_length_over_ice_interstitial | surface roughness length over ice (temporary use as interstitial) | cm | 1 | real | kind_phys | in | F | -!! | cd | surface_drag_coefficient_for_momentum_in_air | surface exchange coeff for momentum | none | 1 | real | kind_phys | inout | F | -!! | cd_ocn | surface_drag_coefficient_for_momentum_in_air_over_ocean | surface exchange coeff for momentum over ocean | none | 1 | real | kind_phys | in | F | -!! | cd_lnd | surface_drag_coefficient_for_momentum_in_air_over_land | surface exchange coeff for momentum over land | none | 1 | real | kind_phys | in | F | -!! | cd_ice | surface_drag_coefficient_for_momentum_in_air_over_ice | surface exchange coeff for momentum over ice | none | 1 | real | kind_phys | in | F | -!! | cdq | surface_drag_coefficient_for_heat_and_moisture_in_air | surface exchange coeff heat & moisture | none | 1 | real | kind_phys | inout | F | -!! | cdq_ocn | surface_drag_coefficient_for_heat_and_moisture_in_air_over_ocean | surface exchange coeff heat & moisture over ocean | none | 1 | real | kind_phys | in | F | -!! | cdq_lnd | surface_drag_coefficient_for_heat_and_moisture_in_air_over_land | surface exchange coeff heat & moisture over land | none | 1 | real | kind_phys | in | F | -!! | cdq_ice | surface_drag_coefficient_for_heat_and_moisture_in_air_over_ice | surface exchange coeff heat & moisture over ice | none | 1 | real | kind_phys | in | F | -!! | rb | bulk_richardson_number_at_lowest_model_level | bulk Richardson number at the surface | none | 1 | real | kind_phys | inout | F | -!! | rb_ocn | bulk_richardson_number_at_lowest_model_level_over_ocean | bulk Richardson number at the surface over ocean | none | 1 | real | kind_phys | in | F | -!! | rb_lnd | bulk_richardson_number_at_lowest_model_level_over_land | bulk Richardson number at the surface over land | none | 1 | real | kind_phys | in | F | -!! | rb_ice | bulk_richardson_number_at_lowest_model_level_over_ice | bulk Richardson number at the surface over ice | none | 1 | real | kind_phys | in | F | -!! | stress | surface_wind_stress | surface wind stress | m2 s-2 | 1 | real | kind_phys | inout | F | -!! | stress_ocn | surface_wind_stress_over_ocean | surface wind stress over ocean | m2 s-2 | 1 | real | kind_phys | in | F | -!! | stress_lnd | surface_wind_stress_over_land | surface wind stress over land | m2 s-2 | 1 | real | kind_phys | in | F | -!! | stress_ice | surface_wind_stress_over_ice | surface wind stress over ice | m2 s-2 | 1 | real | kind_phys | in | F | -!! | ffmm | Monin-Obukhov_similarity_function_for_momentum | Monin-Obukhov similarity function for momentum | none | 1 | real | kind_phys | inout | F | -!! | ffmm_ocn | Monin-Obukhov_similarity_function_for_momentum_over_ocean | Monin-Obukhov similarity function for momentum over ocean | none | 1 | real | kind_phys | in | F | -!! | ffmm_lnd | Monin-Obukhov_similarity_function_for_momentum_over_land | Monin-Obukhov similarity function for momentum over land | none | 1 | real | kind_phys | in | F | -!! | ffmm_ice | Monin-Obukhov_similarity_function_for_momentum_over_ice | Monin-Obukhov similarity function for momentum over ice | none | 1 | real | kind_phys | in | F | -!! | ffhh | Monin-Obukhov_similarity_function_for_heat | Monin-Obukhov similarity function for heat | none | 1 | real | kind_phys | inout | F | -!! | ffhh_ocn | Monin-Obukhov_similarity_function_for_heat_over_ocean | Monin-Obukhov similarity function for heat over ocean | none | 1 | real | kind_phys | in | F | -!! | ffhh_lnd | Monin-Obukhov_similarity_function_for_heat_over_land | Monin-Obukhov similarity function for heat over land | none | 1 | real | kind_phys | in | F | -!! | ffhh_ice | Monin-Obukhov_similarity_function_for_heat_over_ice | Monin-Obukhov similarity function for heat over ice | none | 1 | real | kind_phys | in | F | -!! | uustar | surface_friction_velocity | boundary layer parameter | m s-1 | 1 | real | kind_phys | inout | F | -!! | uustar_ocn | surface_friction_velocity_over_ocean | surface friction velocity over ocean | m s-1 | 1 | real | kind_phys | in | F | -!! | uustar_lnd | surface_friction_velocity_over_land | surface friction velocity over land | m s-1 | 1 | real | kind_phys | in | F | -!! | uustar_ice | surface_friction_velocity_over_ice | surface friction velocity over ice | m s-1 | 1 | real | kind_phys | in | F | -!! | fm10 | Monin-Obukhov_similarity_function_for_momentum_at_10m | Monin-Obukhov similarity parameter for momentum at 10m | none | 1 | real | kind_phys | inout | F | -!! | fm10_ocn | Monin-Obukhov_similarity_function_for_momentum_at_10m_over_ocean | Monin-Obukhov similarity parameter for momentum at 10m over ocean | none | 1 | real | kind_phys | in | F | -!! | fm10_lnd | Monin-Obukhov_similarity_function_for_momentum_at_10m_over_land | Monin-Obukhov similarity parameter for momentum at 10m over land | none | 1 | real | kind_phys | in | F | -!! | fm10_ice | Monin-Obukhov_similarity_function_for_momentum_at_10m_over_ice | Monin-Obukhov similarity parameter for momentum at 10m over ice | none | 1 | real | kind_phys | in | F | -!! | fh2 | Monin-Obukhov_similarity_function_for_heat_at_2m | Monin-Obukhov similarity parameter for heat at 2m | none | 1 | real | kind_phys | inout | F | -!! | fh2_ocn | Monin-Obukhov_similarity_function_for_heat_at_2m_over_ocean | Monin-Obukhov similarity parameter for heat at 2m over ocean | none | 1 | real | kind_phys | in | F | -!! | fh2_lnd | Monin-Obukhov_similarity_function_for_heat_at_2m_over_land | Monin-Obukhov similarity parameter for heat at 2m over land | none | 1 | real | kind_phys | in | F | -!! | fh2_ice | Monin-Obukhov_similarity_function_for_heat_at_2m_over_ice | Monin-Obukhov similarity parameter for heat at 2m over ice | none | 1 | real | kind_phys | in | F | -!! | tsurf | surface_skin_temperature_after_iteration | surface skin temperature after iteration | K | 1 | real | kind_phys | inout | F | -!! | tsurf_ocn | surface_skin_temperature_after_iteration_over_ocean | surface skin temperature after iteration over ocean | K | 1 | real | kind_phys | in | F | -!! | tsurf_lnd | surface_skin_temperature_after_iteration_over_land | surface skin temperature after iteration over land | K | 1 | real | kind_phys | in | F | -!! | tsurf_ice | surface_skin_temperature_after_iteration_over_ice | surface skin temperature after iteration over ice | K | 1 | real | kind_phys | in | F | -!! | cmm | surface_drag_wind_speed_for_momentum_in_air | momentum exchange coefficient | m s-1 | 1 | real | kind_phys | inout | F | -!! | cmm_ocn | surface_drag_wind_speed_for_momentum_in_air_over_ocean | momentum exchange coefficient over ocean | m s-1 | 1 | real | kind_phys | in | F | -!! | cmm_lnd | surface_drag_wind_speed_for_momentum_in_air_over_land | momentum exchange coefficient over land | m s-1 | 1 | real | kind_phys | in | F | -!! | cmm_ice | surface_drag_wind_speed_for_momentum_in_air_over_ice | momentum exchange coefficient over ice | m s-1 | 1 | real | kind_phys | in | F | -!! | chh | surface_drag_mass_flux_for_heat_and_moisture_in_air | thermal exchange coefficient | kg m-2 s-1 | 1 | real | kind_phys | inout | F | -!! | chh_ocn | surface_drag_mass_flux_for_heat_and_moisture_in_air_over_ocean | thermal exchange coefficient over ocean | kg m-2 s-1 | 1 | real | kind_phys | in | F | -!! | chh_lnd | surface_drag_mass_flux_for_heat_and_moisture_in_air_over_land | thermal exchange coefficient over land | kg m-2 s-1 | 1 | real | kind_phys | in | F | -!! | chh_ice | surface_drag_mass_flux_for_heat_and_moisture_in_air_over_ice | thermal exchange coefficient over ice | kg m-2 s-1 | 1 | real | kind_phys | in | F | -!! | gflx | upward_heat_flux_in_soil | soil heat flux | W m-2 | 1 | real | kind_phys | inout | F | -!! | gflx_ocn | upward_heat_flux_in_soil_over_ocean | soil heat flux over ocean | W m-2 | 1 | real | kind_phys | in | F | -!! | gflx_lnd | upward_heat_flux_in_soil_over_land | soil heat flux over land | W m-2 | 1 | real | kind_phys | in | F | -!! | gflx_ice | upward_heat_flux_in_soil_over_ice | soil heat flux over ice | W m-2 | 1 | real | kind_phys | in | F | -!! | ep1d | surface_upward_potential_latent_heat_flux | surface upward potential latent heat flux | W m-2 | 1 | real | kind_phys | inout | F | -!! | ep1d_ocn | surface_upward_potential_latent_heat_flux_over_ocean | surface upward potential latent heat flux over ocean | W m-2 | 1 | real | kind_phys | in | F | -!! | ep1d_lnd | surface_upward_potential_latent_heat_flux_over_land | surface upward potential latent heat flux over land | W m-2 | 1 | real | kind_phys | in | F | -!! | ep1d_ice | surface_upward_potential_latent_heat_flux_over_ice | surface upward potential latent heat flux over ice | W m-2 | 1 | real | kind_phys | in | F | -!! | weasd | water_equivalent_accumulated_snow_depth | water equiv of acc snow depth over land and sea ice | mm | 1 | real | kind_phys | inout | F | -!! | weasd_lnd | water_equivalent_accumulated_snow_depth_over_land | water equiv of acc snow depth over land | mm | 1 | real | kind_phys | in | F | -!! | weasd_ice | water_equivalent_accumulated_snow_depth_over_ice | water equiv of acc snow depth over ice | mm | 1 | real | kind_phys | in | F | -!! | snowd | surface_snow_thickness_water_equivalent | water equivalent snow depth | mm | 1 | real | kind_phys | inout | F | -!! | snowd_ocn | surface_snow_thickness_water_equivalent_over_ocean | water equivalent snow depth over ocean | mm | 1 | real | kind_phys | in | F | -!! | snowd_lnd | surface_snow_thickness_water_equivalent_over_land | water equivalent snow depth over land | mm | 1 | real | kind_phys | in | F | -!! | snowd_ice | surface_snow_thickness_water_equivalent_over_ice | water equivalent snow depth over ice | mm | 1 | real | kind_phys | in | F | -!! | tprcp | nonnegative_lwe_thickness_of_precipitation_amount_on_dynamics_timestep | total precipitation amount in each time step | m | 1 | real | kind_phys | inout | F | -!! | tprcp_ocn | nonnegative_lwe_thickness_of_precipitation_amount_on_dynamics_timestep_over_ocean | total precipitation amount in each time step over ocean | m | 1 | real | kind_phys | in | F | -!! | tprcp_lnd | nonnegative_lwe_thickness_of_precipitation_amount_on_dynamics_timestep_over_land | total precipitation amount in each time step over land | m | 1 | real | kind_phys | in | F | -!! | tprcp_ice | nonnegative_lwe_thickness_of_precipitation_amount_on_dynamics_timestep_over_ice | total precipitation amount in each time step over ice | m | 1 | real | kind_phys | in | F | -!! | evap | kinematic_surface_upward_latent_heat_flux | kinematic surface upward latent heat flux | kg kg-1 m s-1 | 1 | real | kind_phys | inout | F | -!! | evap_ocn | kinematic_surface_upward_latent_heat_flux_over_ocean | kinematic surface upward latent heat flux over ocean | kg kg-1 m s-1 | 1 | real | kind_phys | in | F | -!! | evap_lnd | kinematic_surface_upward_latent_heat_flux_over_land | kinematic surface upward latent heat flux over land | kg kg-1 m s-1 | 1 | real | kind_phys | in | F | -!! | evap_ice | kinematic_surface_upward_latent_heat_flux_over_ice | kinematic surface upward latent heat flux over ice | kg kg-1 m s-1 | 1 | real | kind_phys | in | F | -!! | hflx | kinematic_surface_upward_sensible_heat_flux | kinematic surface upward sensible heat flux | K m s-1 | 1 | real | kind_phys | inout | F | -!! | hflx_ocn | kinematic_surface_upward_sensible_heat_flux_over_ocean | kinematic surface upward sensible heat flux over ocean | K m s-1 | 1 | real | kind_phys | in | F | -!! | hflx_lnd | kinematic_surface_upward_sensible_heat_flux_over_land | kinematic surface upward sensible heat flux over land | K m s-1 | 1 | real | kind_phys | in | F | -!! | hflx_ice | kinematic_surface_upward_sensible_heat_flux_over_ice | kinematic surface upward sensible heat flux over ice | K m s-1 | 1 | real | kind_phys | in | F | -!! | qss | surface_specific_humidity | surface air saturation specific humidity | kg kg-1 | 1 | real | kind_phys | inout | F | -!! | qss_ocn | surface_specific_humidity_over_ocean | surface air saturation specific humidity over ocean | kg kg-1 | 1 | real | kind_phys | in | F | -!! | qss_lnd | surface_specific_humidity_over_land | surface air saturation specific humidity over land | kg kg-1 | 1 | real | kind_phys | in | F | -!! | qss_ice | surface_specific_humidity_over_ice | surface air saturation specific humidity over ice | kg kg-1 | 1 | real | kind_phys | in | F | -!! | tsfc | surface_skin_temperature | surface skin temperature | K | 1 | real | kind_phys | inout | F | -!! | tsfco | sea_surface_temperature | sea surface temperature | K | 1 | real | kind_phys | inout | F | -!! | tsfcl | surface_skin_temperature_over_land | surface skin temperature over land | K | 1 | real | kind_phys | inout | F | -!! | tsfc_ocn | surface_skin_temperature_over_ocean_interstitial | surface skin temperature over ocean (temporary use as interstitial) | K | 1 | real | kind_phys | in | F | -!! | tsfc_lnd | surface_skin_temperature_over_land_interstitial | surface skin temperature over land (temporary use as interstitial) | K | 1 | real | kind_phys | in | F | -!! | tsfc_ice | surface_skin_temperature_over_ice_interstitial | surface skin temperature over ice (temporary use as interstitial) | K | 1 | real | kind_phys | in | F | -!! | tisfc | sea_ice_temperature | sea ice surface skin temperature | K | 1 | real | kind_phys | inout | F | -!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | -!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | +!! |----------------|-----------------------------------------------------------------------------------|-------------------------------------------------------------------------------------|-------------|------|------------|-----------|--------|----------| +!! | im | horizontal_loop_extent | horizontal loop extent | count | 0 | integer | | in | F | +!! | cplflx | flag_for_flux_coupling | flag controlling cplflx collection (default off) | flag | 0 | logical | | in | F | +!! | frac_grid | flag_for_fractional_grid | flag for fractional grid | flag | 0 | logical | | in | F | +!! | flag_cice | flag_for_cice | flag for cice | flag | 1 | logical | | in | F | +!! | islmsk | sea_land_ice_mask | sea/land/ice mask (=0/1/2) | flag | 1 | integer | | in | F | +!! | dry | flag_nonzero_land_surface_fraction | flag indicating presence of some land surface area fraction | flag | 1 | logical | | in | F | +!! | wet | flag_nonzero_wet_surface_fraction | flag indicating presence of some ocean or lake surface area fraction | flag | 1 | logical | | in | F | +!! | icy | flag_nonzero_sea_ice_surface_fraction | flag indicating presence of some sea ice surface area fraction | flag | 1 | logical | | in | F | +!! | landfrac | land_area_fraction | fraction of horizontal grid area occupied by land | frac | 1 | real | kind_phys | in | F | +!! | zorl | surface_roughness_length | surface roughness length | cm | 1 | real | kind_phys | inout | F | +!! | zorlo | surface_roughness_length_over_ocean | surface roughness length over ocean | cm | 1 | real | kind_phys | inout | F | +!! | zorll | surface_roughness_length_over_land | surface roughness length over land | cm | 1 | real | kind_phys | inout | F | +!! | zorl_ocn | surface_roughness_length_over_ocean_interstitial | surface roughness length over ocean (temporary use as interstitial) | cm | 1 | real | kind_phys | in | F | +!! | zorl_lnd | surface_roughness_length_over_land_interstitial | surface roughness length over land (temporary use as interstitial) | cm | 1 | real | kind_phys | in | F | +!! | zorl_ice | surface_roughness_length_over_ice_interstitial | surface roughness length over ice (temporary use as interstitial) | cm | 1 | real | kind_phys | in | F | +!! | cd | surface_drag_coefficient_for_momentum_in_air | surface exchange coeff for momentum | none | 1 | real | kind_phys | inout | F | +!! | cd_ocn | surface_drag_coefficient_for_momentum_in_air_over_ocean | surface exchange coeff for momentum over ocean | none | 1 | real | kind_phys | in | F | +!! | cd_lnd | surface_drag_coefficient_for_momentum_in_air_over_land | surface exchange coeff for momentum over land | none | 1 | real | kind_phys | in | F | +!! | cd_ice | surface_drag_coefficient_for_momentum_in_air_over_ice | surface exchange coeff for momentum over ice | none | 1 | real | kind_phys | in | F | +!! | cdq | surface_drag_coefficient_for_heat_and_moisture_in_air | surface exchange coeff heat & moisture | none | 1 | real | kind_phys | inout | F | +!! | cdq_ocn | surface_drag_coefficient_for_heat_and_moisture_in_air_over_ocean | surface exchange coeff heat & moisture over ocean | none | 1 | real | kind_phys | in | F | +!! | cdq_lnd | surface_drag_coefficient_for_heat_and_moisture_in_air_over_land | surface exchange coeff heat & moisture over land | none | 1 | real | kind_phys | in | F | +!! | cdq_ice | surface_drag_coefficient_for_heat_and_moisture_in_air_over_ice | surface exchange coeff heat & moisture over ice | none | 1 | real | kind_phys | in | F | +!! | rb | bulk_richardson_number_at_lowest_model_level | bulk Richardson number at the surface | none | 1 | real | kind_phys | inout | F | +!! | rb_ocn | bulk_richardson_number_at_lowest_model_level_over_ocean | bulk Richardson number at the surface over ocean | none | 1 | real | kind_phys | in | F | +!! | rb_lnd | bulk_richardson_number_at_lowest_model_level_over_land | bulk Richardson number at the surface over land | none | 1 | real | kind_phys | in | F | +!! | rb_ice | bulk_richardson_number_at_lowest_model_level_over_ice | bulk Richardson number at the surface over ice | none | 1 | real | kind_phys | in | F | +!! | stress | surface_wind_stress | surface wind stress | m2 s-2 | 1 | real | kind_phys | inout | F | +!! | stress_ocn | surface_wind_stress_over_ocean | surface wind stress over ocean | m2 s-2 | 1 | real | kind_phys | in | F | +!! | stress_lnd | surface_wind_stress_over_land | surface wind stress over land | m2 s-2 | 1 | real | kind_phys | in | F | +!! | stress_ice | surface_wind_stress_over_ice | surface wind stress over ice | m2 s-2 | 1 | real | kind_phys | in | F | +!! | ffmm | Monin-Obukhov_similarity_function_for_momentum | Monin-Obukhov similarity function for momentum | none | 1 | real | kind_phys | inout | F | +!! | ffmm_ocn | Monin-Obukhov_similarity_function_for_momentum_over_ocean | Monin-Obukhov similarity function for momentum over ocean | none | 1 | real | kind_phys | in | F | +!! | ffmm_lnd | Monin-Obukhov_similarity_function_for_momentum_over_land | Monin-Obukhov similarity function for momentum over land | none | 1 | real | kind_phys | in | F | +!! | ffmm_ice | Monin-Obukhov_similarity_function_for_momentum_over_ice | Monin-Obukhov similarity function for momentum over ice | none | 1 | real | kind_phys | in | F | +!! | ffhh | Monin-Obukhov_similarity_function_for_heat | Monin-Obukhov similarity function for heat | none | 1 | real | kind_phys | inout | F | +!! | ffhh_ocn | Monin-Obukhov_similarity_function_for_heat_over_ocean | Monin-Obukhov similarity function for heat over ocean | none | 1 | real | kind_phys | in | F | +!! | ffhh_lnd | Monin-Obukhov_similarity_function_for_heat_over_land | Monin-Obukhov similarity function for heat over land | none | 1 | real | kind_phys | in | F | +!! | ffhh_ice | Monin-Obukhov_similarity_function_for_heat_over_ice | Monin-Obukhov similarity function for heat over ice | none | 1 | real | kind_phys | in | F | +!! | uustar | surface_friction_velocity | boundary layer parameter | m s-1 | 1 | real | kind_phys | inout | F | +!! | uustar_ocn | surface_friction_velocity_over_ocean | surface friction velocity over ocean | m s-1 | 1 | real | kind_phys | in | F | +!! | uustar_lnd | surface_friction_velocity_over_land | surface friction velocity over land | m s-1 | 1 | real | kind_phys | in | F | +!! | uustar_ice | surface_friction_velocity_over_ice | surface friction velocity over ice | m s-1 | 1 | real | kind_phys | in | F | +!! | fm10 | Monin-Obukhov_similarity_function_for_momentum_at_10m | Monin-Obukhov similarity parameter for momentum at 10m | none | 1 | real | kind_phys | inout | F | +!! | fm10_ocn | Monin-Obukhov_similarity_function_for_momentum_at_10m_over_ocean | Monin-Obukhov similarity parameter for momentum at 10m over ocean | none | 1 | real | kind_phys | in | F | +!! | fm10_lnd | Monin-Obukhov_similarity_function_for_momentum_at_10m_over_land | Monin-Obukhov similarity parameter for momentum at 10m over land | none | 1 | real | kind_phys | in | F | +!! | fm10_ice | Monin-Obukhov_similarity_function_for_momentum_at_10m_over_ice | Monin-Obukhov similarity parameter for momentum at 10m over ice | none | 1 | real | kind_phys | in | F | +!! | fh2 | Monin-Obukhov_similarity_function_for_heat_at_2m | Monin-Obukhov similarity parameter for heat at 2m | none | 1 | real | kind_phys | inout | F | +!! | fh2_ocn | Monin-Obukhov_similarity_function_for_heat_at_2m_over_ocean | Monin-Obukhov similarity parameter for heat at 2m over ocean | none | 1 | real | kind_phys | in | F | +!! | fh2_lnd | Monin-Obukhov_similarity_function_for_heat_at_2m_over_land | Monin-Obukhov similarity parameter for heat at 2m over land | none | 1 | real | kind_phys | in | F | +!! | fh2_ice | Monin-Obukhov_similarity_function_for_heat_at_2m_over_ice | Monin-Obukhov similarity parameter for heat at 2m over ice | none | 1 | real | kind_phys | in | F | +!! | tsurf | surface_skin_temperature_after_iteration | surface skin temperature after iteration | K | 1 | real | kind_phys | inout | F | +!! | tsurf_ocn | surface_skin_temperature_after_iteration_over_ocean | surface skin temperature after iteration over ocean | K | 1 | real | kind_phys | in | F | +!! | tsurf_lnd | surface_skin_temperature_after_iteration_over_land | surface skin temperature after iteration over land | K | 1 | real | kind_phys | in | F | +!! | tsurf_ice | surface_skin_temperature_after_iteration_over_ice | surface skin temperature after iteration over ice | K | 1 | real | kind_phys | in | F | +!! | cmm | surface_drag_wind_speed_for_momentum_in_air | momentum exchange coefficient | m s-1 | 1 | real | kind_phys | inout | F | +!! | cmm_ocn | surface_drag_wind_speed_for_momentum_in_air_over_ocean | momentum exchange coefficient over ocean | m s-1 | 1 | real | kind_phys | in | F | +!! | cmm_lnd | surface_drag_wind_speed_for_momentum_in_air_over_land | momentum exchange coefficient over land | m s-1 | 1 | real | kind_phys | in | F | +!! | cmm_ice | surface_drag_wind_speed_for_momentum_in_air_over_ice | momentum exchange coefficient over ice | m s-1 | 1 | real | kind_phys | in | F | +!! | chh | surface_drag_mass_flux_for_heat_and_moisture_in_air | thermal exchange coefficient | kg m-2 s-1 | 1 | real | kind_phys | inout | F | +!! | chh_ocn | surface_drag_mass_flux_for_heat_and_moisture_in_air_over_ocean | thermal exchange coefficient over ocean | kg m-2 s-1 | 1 | real | kind_phys | in | F | +!! | chh_lnd | surface_drag_mass_flux_for_heat_and_moisture_in_air_over_land | thermal exchange coefficient over land | kg m-2 s-1 | 1 | real | kind_phys | in | F | +!! | chh_ice | surface_drag_mass_flux_for_heat_and_moisture_in_air_over_ice | thermal exchange coefficient over ice | kg m-2 s-1 | 1 | real | kind_phys | in | F | +!! | gflx | upward_heat_flux_in_soil | soil heat flux | W m-2 | 1 | real | kind_phys | inout | F | +!! | gflx_ocn | upward_heat_flux_in_soil_over_ocean | soil heat flux over ocean | W m-2 | 1 | real | kind_phys | in | F | +!! | gflx_lnd | upward_heat_flux_in_soil_over_land | soil heat flux over land | W m-2 | 1 | real | kind_phys | in | F | +!! | gflx_ice | upward_heat_flux_in_soil_over_ice | soil heat flux over ice | W m-2 | 1 | real | kind_phys | in | F | +!! | ep1d | surface_upward_potential_latent_heat_flux | surface upward potential latent heat flux | W m-2 | 1 | real | kind_phys | inout | F | +!! | ep1d_ocn | surface_upward_potential_latent_heat_flux_over_ocean | surface upward potential latent heat flux over ocean | W m-2 | 1 | real | kind_phys | in | F | +!! | ep1d_lnd | surface_upward_potential_latent_heat_flux_over_land | surface upward potential latent heat flux over land | W m-2 | 1 | real | kind_phys | in | F | +!! | ep1d_ice | surface_upward_potential_latent_heat_flux_over_ice | surface upward potential latent heat flux over ice | W m-2 | 1 | real | kind_phys | in | F | +!! | weasd | water_equivalent_accumulated_snow_depth | water equiv of acc snow depth over land and sea ice | mm | 1 | real | kind_phys | inout | F | +!! | weasd_ocn | water_equivalent_accumulated_snow_depth_over_ocean | water equiv of acc snow depth over ocean | mm | 1 | real | kind_phys | in | F | +!! | weasd_lnd | water_equivalent_accumulated_snow_depth_over_land | water equiv of acc snow depth over land | mm | 1 | real | kind_phys | in | F | +!! | weasd_ice | water_equivalent_accumulated_snow_depth_over_ice | water equiv of acc snow depth over ice | mm | 1 | real | kind_phys | in | F | +!! | snowd | surface_snow_thickness_water_equivalent | water equivalent snow depth | mm | 1 | real | kind_phys | inout | F | +!! | snowd_ocn | surface_snow_thickness_water_equivalent_over_ocean | water equivalent snow depth over ocean | mm | 1 | real | kind_phys | in | F | +!! | snowd_lnd | surface_snow_thickness_water_equivalent_over_land | water equivalent snow depth over land | mm | 1 | real | kind_phys | in | F | +!! | snowd_ice | surface_snow_thickness_water_equivalent_over_ice | water equivalent snow depth over ice | mm | 1 | real | kind_phys | in | F | +!! | tprcp | nonnegative_lwe_thickness_of_precipitation_amount_on_dynamics_timestep | total precipitation amount in each time step | m | 1 | real | kind_phys | inout | F | +!! | tprcp_ocn | nonnegative_lwe_thickness_of_precipitation_amount_on_dynamics_timestep_over_ocean | total precipitation amount in each time step over ocean | m | 1 | real | kind_phys | in | F | +!! | tprcp_lnd | nonnegative_lwe_thickness_of_precipitation_amount_on_dynamics_timestep_over_land | total precipitation amount in each time step over land | m | 1 | real | kind_phys | in | F | +!! | tprcp_ice | nonnegative_lwe_thickness_of_precipitation_amount_on_dynamics_timestep_over_ice | total precipitation amount in each time step over ice | m | 1 | real | kind_phys | in | F | +!! | evap | kinematic_surface_upward_latent_heat_flux | kinematic surface upward latent heat flux | kg kg-1 m s-1 | 1 | real | kind_phys | inout | F | +!! | evap_ocn | kinematic_surface_upward_latent_heat_flux_over_ocean | kinematic surface upward latent heat flux over ocean | kg kg-1 m s-1 | 1 | real | kind_phys | in | F | +!! | evap_lnd | kinematic_surface_upward_latent_heat_flux_over_land | kinematic surface upward latent heat flux over land | kg kg-1 m s-1 | 1 | real | kind_phys | in | F | +!! | evap_ice | kinematic_surface_upward_latent_heat_flux_over_ice | kinematic surface upward latent heat flux over ice | kg kg-1 m s-1 | 1 | real | kind_phys | in | F | +!! | hflx | kinematic_surface_upward_sensible_heat_flux | kinematic surface upward sensible heat flux | K m s-1 | 1 | real | kind_phys | inout | F | +!! | hflx_ocn | kinematic_surface_upward_sensible_heat_flux_over_ocean | kinematic surface upward sensible heat flux over ocean | K m s-1 | 1 | real | kind_phys | in | F | +!! | hflx_lnd | kinematic_surface_upward_sensible_heat_flux_over_land | kinematic surface upward sensible heat flux over land | K m s-1 | 1 | real | kind_phys | in | F | +!! | hflx_ice | kinematic_surface_upward_sensible_heat_flux_over_ice | kinematic surface upward sensible heat flux over ice | K m s-1 | 1 | real | kind_phys | in | F | +!! | qss | surface_specific_humidity | surface air saturation specific humidity | kg kg-1 | 1 | real | kind_phys | inout | F | +!! | qss_ocn | surface_specific_humidity_over_ocean | surface air saturation specific humidity over ocean | kg kg-1 | 1 | real | kind_phys | in | F | +!! | qss_lnd | surface_specific_humidity_over_land | surface air saturation specific humidity over land | kg kg-1 | 1 | real | kind_phys | in | F | +!! | qss_ice | surface_specific_humidity_over_ice | surface air saturation specific humidity over ice | kg kg-1 | 1 | real | kind_phys | in | F | +!! | tsfc | surface_skin_temperature | surface skin temperature | K | 1 | real | kind_phys | inout | F | +!! | tsfco | sea_surface_temperature | sea surface temperature | K | 1 | real | kind_phys | inout | F | +!! | tsfcl | surface_skin_temperature_over_land | surface skin temperature over land | K | 1 | real | kind_phys | inout | F | +!! | tsfc_ocn | surface_skin_temperature_over_ocean_interstitial | surface skin temperature over ocean (temporary use as interstitial) | K | 1 | real | kind_phys | in | F | +!! | tsfc_lnd | surface_skin_temperature_over_land_interstitial | surface skin temperature over land (temporary use as interstitial) | K | 1 | real | kind_phys | in | F | +!! | tsfc_ice | surface_skin_temperature_over_ice_interstitial | surface skin temperature over ice (temporary use as interstitial) | K | 1 | real | kind_phys | in | F | +!! | tisfc | sea_ice_temperature | sea ice surface skin temperature | K | 1 | real | kind_phys | inout | F | +!! | tice | sea_ice_temperature_interstitial | sea ice surface skin temperature use as interstitial | K | 1 | real | kind_phys | in | F | +!! | hice | sea_ice_thickness | sea ice thickness | m | 1 | real | kind_phys | inout | F | +!! | cice | sea_ice_concentration | ice fraction over open water | frac | 1 | real | kind_phys | inout | F | +!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | +!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | !! #endif - subroutine GFS_surface_composites_post_run ( & - im, cplflx, flag_cice, dry, wet, icy, lndfrac, lakfrac, ocnfrac, cice, zorl, zorlo, zorll, zorl_ocn, zorl_lnd, zorl_ice, & + subroutine GFS_surface_composites_post_run ( & + im, cplflx, frac_grid, flag_cice, islmsk, dry, wet, icy, landfrac, zorl, zorlo, zorll, zorl_ocn, zorl_lnd, zorl_ice, & cd, cd_ocn, cd_lnd, cd_ice, cdq, cdq_ocn, cdq_lnd, cdq_ice, rb, rb_ocn, rb_lnd, rb_ice, stress, stress_ocn, stress_lnd, & stress_ice, ffmm, ffmm_ocn, ffmm_lnd, ffmm_ice, ffhh, ffhh_ocn, ffhh_lnd, ffhh_ice, uustar, uustar_ocn, uustar_lnd, & uustar_ice, fm10, fm10_ocn, fm10_lnd, fm10_ice, fh2, fh2_ocn, fh2_lnd, fh2_ice, tsurf, tsurf_ocn, tsurf_lnd, tsurf_ice, & cmm, cmm_ocn, cmm_lnd, cmm_ice, chh, chh_ocn, chh_lnd, chh_ice, gflx, gflx_ocn, gflx_lnd, gflx_ice, ep1d, ep1d_ocn, & - ep1d_lnd, ep1d_ice, weasd, weasd_lnd, weasd_ice, snowd, snowd_ocn, snowd_lnd, snowd_ice, tprcp, tprcp_ocn, tprcp_lnd, & - tprcp_ice, evap, evap_ocn, evap_lnd, evap_ice, hflx, hflx_ocn, hflx_lnd, hflx_ice, qss, qss_ocn, qss_lnd, qss_ice, & - tsfc, tsfco, tsfcl, tsfc_ocn, tsfc_lnd, tsfc_ice, tisfc, errmsg, errflg) + ep1d_lnd, ep1d_ice, weasd, weasd_ocn, weasd_lnd, weasd_ice, snowd, snowd_ocn, snowd_lnd, snowd_ice, tprcp, tprcp_ocn, & + tprcp_lnd, tprcp_ice, evap, evap_ocn, evap_lnd, evap_ice, hflx, hflx_ocn, hflx_lnd, hflx_ice, qss, qss_ocn, qss_lnd, & + qss_ice, tsfc, tsfco, tsfcl, tsfc_ocn, tsfc_lnd, tsfc_ice, tisfc, tice, hice, cice, errmsg, errflg) use machine, only: kind_phys implicit none integer, intent(in) :: im - logical, intent(in) :: cplflx + logical, intent(in) :: cplflx, frac_grid logical, dimension(im), intent(in) :: flag_cice, dry, wet, icy - - real(kind=kind_phys), dimension(im), intent(in) :: lndfrac, lakfrac, ocnfrac, cice, & + integer, dimension(im), intent(in) :: islmsk + real(kind=kind_phys), dimension(im), intent(in) :: landfrac, & zorl_ocn, zorl_lnd, zorl_ice, cd_ocn, cd_lnd, cd_ice, cdq_ocn, cdq_lnd, cdq_ice, rb_ocn, rb_lnd, rb_ice, stress_ocn, & stress_lnd, stress_ice, ffmm_ocn, ffmm_lnd, ffmm_ice, ffhh_ocn, ffhh_lnd, ffhh_ice, uustar_ocn, uustar_lnd, uustar_ice, & fm10_ocn, fm10_lnd, fm10_ice, fh2_ocn, fh2_lnd, fh2_ice, tsurf_ocn, tsurf_lnd, tsurf_ice, cmm_ocn, cmm_lnd, cmm_ice, & - chh_ocn, chh_lnd, chh_ice, gflx_ocn, gflx_lnd, gflx_ice, ep1d_ocn, ep1d_lnd, ep1d_ice, weasd_lnd, weasd_ice, snowd_ocn, & - snowd_lnd, snowd_ice,tprcp_ocn, tprcp_lnd, tprcp_ice, evap_ocn, evap_lnd, evap_ice, hflx_ocn, hflx_lnd, hflx_ice, & - qss_ocn, qss_lnd, qss_ice, tsfc_ocn, tsfc_lnd, tsfc_ice + chh_ocn, chh_lnd, chh_ice, gflx_ocn, gflx_lnd, gflx_ice, ep1d_ocn, ep1d_lnd, ep1d_ice, weasd_ocn, weasd_lnd, weasd_ice, & + snowd_ocn, snowd_lnd, snowd_ice,tprcp_ocn, tprcp_lnd, tprcp_ice, evap_ocn, evap_lnd, evap_ice, hflx_ocn, hflx_lnd, & + hflx_ice, qss_ocn, qss_lnd, qss_ice, tsfc_ocn, tsfc_lnd, tsfc_ice real(kind=kind_phys), dimension(im), intent(inout) :: zorl, zorlo, zorll, cd, cdq, rb, stress, ffmm, ffhh, uustar, fm10, & fh2, tsurf, cmm, chh, gflx, ep1d, weasd, snowd, tprcp, evap, hflx, qss, tsfc, tsfco, tsfcl, tisfc + real(kind=kind_phys), dimension(im), intent(in ) :: tice ! interstitial sea ice temperature + real(kind=kind_phys), dimension(im), intent(inout) :: hice, cice + character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg + ! Local variables integer :: i + real(kind=kind_phys) :: txl, txi, txo ! Initialize CCPP error handling variables errmsg = '' @@ -323,155 +371,174 @@ subroutine GFS_surface_composites_post_run ( ! --- generate ocean/land/ice composites - ! DH* - !write(0,*) "DH DEBUG composites: i, cplflx, flag_cice, dry, wet, icy, ocnfrac, lndfrac, lakfrac, cice, tsfc_{lnd,ocn,ice}, tsfc, tsfcl, tsfco, tisfc" - ! *DH - - do i=1, im - - ! --- three-way composites (fields from sfc_diff) - zorl(i) = cmposit3(ocnfrac(i), lndfrac(i), & - lakfrac(i),cice(i), & - zorl_ocn(i), zorl_lnd(i), zorl_ice(i)) - cd(i) = cmposit3(ocnfrac(i),lndfrac(i), & - lakfrac(i),cice(i), & - cd_ocn(i), cd_lnd(i), cd_ice(i)) - cdq(i) = cmposit3(ocnfrac(i),lndfrac(i), & - lakfrac(i),cice(i), & - cdq_ocn(i), cdq_lnd(i), cdq_ice(i)) - rb(i) = cmposit3(ocnfrac(i),lndfrac(i), & - lakfrac(i),cice(i), & - rb_ocn(i), rb_lnd(i), rb_ice(i)) - stress(i) = cmposit3(ocnfrac(i),lndfrac(i), & - lakfrac(i),cice(i), & - stress_ocn(i),stress_lnd(i),stress_ice(i)) - ffmm(i) = cmposit3(ocnfrac(i),lndfrac(i), & - lakfrac(i),cice(i), & - ffmm_ocn(i), ffmm_lnd(i), ffmm_ice(i)) - ffhh(i) = cmposit3(ocnfrac(i),lndfrac(i), & - lakfrac(i),cice(i), & - ffhh_ocn(i), ffhh_lnd(i), ffhh_ice(i)) - uustar(i) = cmposit3(ocnfrac(i),lndfrac(i), & - lakfrac(i),cice(i), & - uustar_ocn(i),uustar_lnd(i),uustar_ice(i)) - fm10(i) = cmposit3(ocnfrac(i),lndfrac(i), & - lakfrac(i),cice(i), & - fm10_ocn(i), fm10_lnd(i), fm10_ice(i)) - fh2(i) = cmposit3(ocnfrac(i),lndfrac(i), & - lakfrac(i),cice(i), & - fh2_ocn(i), fh2_lnd(i), fh2_ice(i)) - tsurf(i) = cmposit3(ocnfrac(i),lndfrac(i), & - lakfrac(i),cice(i), & - tsurf_ocn(i), tsurf_lnd(i), tsurf_ice(i)) - cmm(i) = cmposit3(ocnfrac(i),lndfrac(i), & - lakfrac(i),cice(i), & - cmm_ocn(i), cmm_lnd(i), cmm_ice(i)) - chh(i) = cmposit3(ocnfrac(i),lndfrac(i), & - lakfrac(i),cice(i), & - chh_ocn(i), chh_lnd(i), chh_ice(i)) - gflx(i) = cmposit3(ocnfrac(i),lndfrac(i), & - lakfrac(i),cice(i), & - gflx_ocn(i), gflx_lnd(i), gflx_ice(i)) - ep1d(i) = cmposit3(ocnfrac(i),lndfrac(i), & - lakfrac(i),cice(i), & - ep1d_ocn(i), ep1d_lnd(i), ep1d_ice(i)) - weasd(i) = cmposit3(ocnfrac(i),lndfrac(i), & - lakfrac(i),cice(i), & - weasd(i), weasd_lnd(i), weasd_ice(i)) - snowd(i) = cmposit3(ocnfrac(i),lndfrac(i), & - lakfrac(i),cice(i), & - snowd_ocn(i), snowd_lnd(i), snowd_ice(i)) - tprcp(i) = cmposit3(ocnfrac(i),lndfrac(i), & - lakfrac(i),cice(i), & - tprcp_ocn(i), tprcp_lnd(i), tprcp_ice(i)) - - if(cplflx .and. flag_cice(i)) then ! 3-way when sfc_cice is used - evap(i) = cmposit3(ocnfrac(i),lndfrac(i), & - lakfrac(i),cice(i), & - evap_ocn(i), evap_lnd(i), evap_ice(i)) - hflx(i) = cmposit3(ocnfrac(i),lndfrac(i), & - lakfrac(i),cice(i), & - hflx_ocn(i), hflx_lnd(i), hflx_ice(i)) - qss(i) = cmposit3(ocnfrac(i),lndfrac(i), & - lakfrac(i),cice(i), & - qss_ocn(i), qss_lnd(i), qss_ice(i)) - tsfc(i) = cmposit3(ocnfrac(i),lndfrac(i), & - lakfrac(i),cice(i), & - tsfc_ocn(i), tsfc_lnd(i), tsfc_ice(i)) - else ! 2-way when sfc_sice used (fields already composited in sfc_sice) - evap(i) = cmposit2(ocnfrac(i),lndfrac(i), & - lakfrac(i),cice(i), & - evap_ocn(i), evap_lnd(i), evap_ice(i)) - hflx(i) = cmposit2(ocnfrac(i),lndfrac(i), & - lakfrac(i),cice(i), & - hflx_ocn(i), hflx_lnd(i), hflx_ice(i)) - qss(i) = cmposit2(ocnfrac(i),lndfrac(i), & - lakfrac(i),cice(i), & - qss_ocn(i), qss_lnd(i), qss_ice(i)) - tsfc(i) = cmposit2(ocnfrac(i),lndfrac(i), & - lakfrac(i),cice(i), & - tsfc_ocn(i), tsfc_lnd(i), tsfc_ice(i)) - if(icy(i)) then - cmm(i) = cmm_ice(i) - chh(i) = chh_ice(i) - gflx(i) = gflx_ice(i) - ep1d(i) = ep1d_ice(i) - weasd(i) = weasd_ice(i) - snowd(i) = snowd_ice(i) + if (frac_grid) then + + do i=1, im + + ! Three-way composites (fields from sfc_diff) + txl = landfrac(i) + txi = cice(i) ! here cice is grid fraction that is ice + txo = 1.0 - txl - txi + + zorl(i) = txl*zorl_lnd(i) + txi*zorl_ice(i) + txo*zorl_ocn(i) + cd(i) = txl*cd_lnd(i) + txi*cd_ice(i) + txo*cd_ocn(i) + cdq(i) = txl*cdq_lnd(i) + txi*cdq_ice(i) + txo*cdq_ocn(i) + rb(i) = txl*rb_lnd(i) + txi*rb_ice(i) + txo*rb_ocn(i) + stress(i) = txl*stress_lnd(i) + txi*stress_ice(i) + txo*stress_ocn(i) + ffmm(i) = txl*ffmm_lnd(i) + txi*ffmm_ice(i) + txo*ffmm_ocn(i) + ffhh(i) = txl*ffhh_lnd(i) + txi*ffhh_ice(i) + txo*ffhh_ocn(i) + uustar(i) = txl*uustar_lnd(i) + txi*uustar_ice(i) + txo*uustar_ocn(i) + fm10(i) = txl*fm10_lnd(i) + txi*fm10_ice(i) + txo*fm10_ocn(i) + fh2(i) = txl*fh2_lnd(i) + txi*fh2_ice(i) + txo*fh2_ocn(i) + !tsurf(i) = txl*tsurf_lnd(i) + txi*tice(i) + txo*tsurf_ocn(i) + !tsurf(i) = txl*tsurf_lnd(i) + txi*tsurf_ice(i) + txo*tsurf_ocn(i) ! not used again! Moorthi + cmm(i) = txl*cmm_lnd(i) + txi*cmm_ice(i) + txo*cmm_ocn(i) + chh(i) = txl*chh_lnd(i) + txi*chh_ice(i) + txo*chh_ocn(i) + gflx(i) = txl*gflx_lnd(i) + txi*gflx_ice(i) + txo*gflx_ocn(i) + ep1d(i) = txl*ep1d_lnd(i) + txi*ep1d_ice(i) + txo*ep1d_ocn(i) + !weasd(i) = txl*weasd_lnd(i) + txi*weasd_ice(i) + txo*weasd_ocn(i) + !snowd(i) = txl*snowd_lnd(i) + txi*snowd_ice(i) + txo*snowd_ocn(i) + weasd(i) = txl*weasd_lnd(i) + txi*weasd_ice(i) + snowd(i) = txl*snowd_lnd(i) + txi*snowd_ice(i) + tprcp(i) = txl*tprcp_lnd(i) + txi*tprcp_ice(i) + txo*tprcp_ocn(i) + evap(i) = txl*evap_lnd(i) + txi*evap_ice(i) + txo*evap_ocn(i) + hflx(i) = txl*hflx_lnd(i) + txi*hflx_ice(i) + txo*hflx_ocn(i) + qss(i) = txl*qss_lnd(i) + txi*qss_ice(i) + txo*qss_ocn(i) + tsfc(i) = txl*tsfc_lnd(i) + txi*tice(i) + txo*tsfc_ocn(i) + !tsfc(i) = txl*tsfc_lnd(i) + txi*tsfc_ice(i) + txo*tsfc_ocn(i) + + zorll(i) = zorl_lnd(i) + zorlo(i) = zorl_ocn(i) + + if (dry(i)) tsfcl(i) = tsfc_lnd(i) ! over land + if (wet(i)) tsfco(i) = tsfc_ocn(i) ! over lake or ocean when uncoupled + tisfc(i) = tsfc(i) ! assume bitwise identical on non-icy points + if (icy(i)) then + tisfc(i) = tsfc_ice(i) ! over ice when uncoupled +! tisfc(i) = tice(i) ! over ice when uncoupled + else + hice(i) = 0.0 + cice(i) = 0.0 end if - endif ! cplflx .and. flag_cice - - zorll(i) = zorl_lnd(i) - zorlo(i) = zorl_ocn(i) - if (dry(i)) tsfcl(i) = tsfc_lnd(i) - if (wet(i)) then - tsfco(i) = tsfc_ocn(i) - tisfc(i) = tsfc_ice(i) - end if - - ! DH* - !write(0,'(i5,5(1x,l),11e16.7)') i, cplflx, flag_cice(i), dry(i), wet(i), icy(i), & - ! ocnfrac(i), lndfrac(i), lakfrac(i), & - ! cice(i), tsfc_lnd(i), tsfc_ocn(i), tsfc_ice(i), & - ! tsfc(i), tsfcl(i), tsfco(i), tisfc(i) - ! *DH - - end do +! if (wet(i) .and. .not. cplflx) then +! tsfco(i) = tsfc3_ocn(i) ! over lake or ocean when uncoupled +! tisfc(i) = tsfc3_ice(i) ! over ice when uncoupled +! endif - ! --- compositing done - - end subroutine GFS_surface_composites_post_run + end do + else - real function cmposit2(frac_ocean,frac_dry,frac_lake,frac_ice,oceanval,landval,iceval) -! --- 2-way compositing (use with ice/non-ice composited variables) - implicit none - real(kind=kind_phys),intent(IN) :: frac_ocean,frac_dry,frac_lake,frac_ice,oceanval,landval,iceval - real(kind=kind_phys) :: frac_wet + do i=1,im + if (islmsk(i) == 1) then + zorl(i) = zorl_lnd(i) + cd(i) = cd_lnd(i) + cdq(i) = cdq_lnd(i) + rb(i) = rb_lnd(i) + stress(i) = stress_lnd(i) + ffmm(i) = ffmm_lnd(i) + ffhh(i) = ffhh_lnd(i) + uustar(i) = uustar_lnd(i) + fm10(i) = fm10_lnd(i) + fh2(i) = fh2_lnd(i) + !tsurf(i) = tsurf_lnd(i) + cmm(i) = cmm_lnd(i) + chh(i) = chh_lnd(i) + gflx(i) = gflx_lnd(i) + ep1d(i) = ep1d_lnd(i) + weasd(i) = weasd_lnd(i) + snowd(i) = snowd_lnd(i) + tprcp(i) = tprcp_lnd(i) + evap(i) = evap_lnd(i) + hflx(i) = hflx_lnd(i) + qss(i) = qss_lnd(i) + tsfc(i) = tsfc_lnd(i) + cmm(i) = cmm_lnd(i) + chh(i) = chh_lnd(i) + elseif (islmsk(i) == 0) then + zorl(i) = zorl_ocn(i) + cd(i) = cd_ocn(i) + cdq(i) = cdq_ocn(i) + rb(i) = rb_ocn(i) + stress(i) = stress_ocn(i) + ffmm(i) = ffmm_ocn(i) + ffhh(i) = ffhh_ocn(i) + uustar(i) = uustar_ocn(i) + fm10(i) = fm10_ocn(i) + fh2(i) = fh2_ocn(i) + !tsurf(i) = tsurf_ocn(i) + cmm(i) = cmm_ocn(i) + chh(i) = chh_ocn(i) + gflx(i) = gflx_ocn(i) + ep1d(i) = ep1d_ocn(i) + weasd(i) = weasd_ocn(i) + snowd(i) = snowd_ocn(i) + tprcp(i) = tprcp_ocn(i) + evap(i) = evap_ocn(i) + hflx(i) = hflx_ocn(i) + qss(i) = qss_ocn(i) + tsfc(i) = tsfc_ocn(i) + cmm(i) = cmm_ocn(i) + chh(i) = chh_ocn(i) + else + zorl(i) = zorl_ice(i) + cd(i) = cd_ice(i) + cdq(i) = cdq_ice(i) + rb(i) = rb_ice(i) + stress(i) = stress_ice(i) + ffmm(i) = ffmm_ice(i) + ffhh(i) = ffhh_ice(i) + uustar(i) = uustar_ice(i) + fm10(i) = fm10_ice(i) + fh2(i) = fh2_ice(i) + !tsurf(i) = tsurf_ice(i) + cmm(i) = cmm_ice(i) + chh(i) = chh_ice(i) + gflx(i) = gflx_ice(i) + ep1d(i) = ep1d_ice(i) + weasd(i) = weasd_ice(i) + snowd(i) = snowd_ice(i) + tprcp(i) = tprcp_ice(i) + evap(i) = evap_ice(i) + hflx(i) = hflx_ice(i) + qss(i) = qss_ice(i) + tsfc(i) = tsfc_ice(i) + cmm(i) = cmm_ice(i) + chh(i) = chh_ice(i) + endif + + zorll(i) = zorl_lnd(i) + zorlo(i) = zorl_ocn(i) + + if (flag_cice(i)) then + evap(i) = cice(i) * evap_ice(i) + (1.0-cice(i)) * evap_ocn(i) + hflx(i) = cice(i) * hflx_ice(i) + (1.0-cice(i)) * hflx_ocn(i) + tsfc(i) = cice(i) * tsfc_ice(i) + (1.0-cice(i)) * tsfc_ocn(i) + endif + + if (dry(i)) tsfcl(i) = tsfc_lnd(i) ! over land + if (wet(i)) tsfco(i) = tsfc_ocn(i) ! over lake or ocean when uncoupled + tisfc(i) = tsfc(i) ! assume bitwise identical on non-icy points + if (icy(i)) then +! tisfc(i) = tsfc_ice(i) ! over ice when uncoupled + tisfc(i) = tice(i) ! over ice when uncoupled + else + hice(i) = 0.0 + cice(i) = 0.0 + end if - frac_wet=max(frac_lake,frac_ocean) - if (frac_ice.eq.0.) then - cmposit2 = frac_dry*landval + frac_wet*oceanval - else - cmposit2 = frac_dry*landval + frac_wet*iceval - end if - return - end function cmposit2 +! if (wet(i) .and. .not. cplflx) then +! tsfco(i) = tsfc_ocn(i) ! over lake or ocean when uncoupled +! tisfc(i) = tsfc_ice(i) ! over ice when uncoupled +! endif + end do - real function cmposit3(frac_ocean,frac_dry,frac_lake,frac_ice,oceanval,landval,iceval) -! --- 3-way compositing - implicit none - real(kind=kind_phys),intent(IN) :: frac_ocean,frac_dry,frac_lake,frac_ice,oceanval,landval,iceval + end if ! if (frac_grid) - if (frac_dry == 0.0 .and. iceval == oceanval) then - cmposit3 = oceanval - else - cmposit3 = frac_dry*landval + frac_ice*iceval + (1.-frac_dry-frac_ice)*oceanval - endif + ! --- compositing done - return - end function cmposit3 + end subroutine GFS_surface_composites_post_run end module GFS_surface_composites_post diff --git a/physics/GFS_surface_generic.F90 b/physics/GFS_surface_generic.F90 index 42fe8c646..5504eb7cd 100644 --- a/physics/GFS_surface_generic.F90 +++ b/physics/GFS_surface_generic.F90 @@ -243,7 +243,8 @@ end subroutine GFS_surface_generic_post_finalize !! | cplflx | flag_for_flux_coupling | flag controlling cplflx collection (default off) | flag | 0 | logical | | in | F | !! | cplwav | flag_for_wave_coupling | flag controlling cplwav collection (default off) | flag | 0 | logical | | in | F | !! | lssav | flag_diagnostics | logical flag for storing diagnostics | flag | 0 | logical | | in | F | -!! | lndfrac | land_area_fraction | fraction of horizontal grid area occupied by land | frac | 1 | real | kind_phys | in | F | +!! | icy | flag_nonzero_sea_ice_surface_fraction | flag indicating presence of some sea ice surface area fraction | flag | 1 | logical | | in | F | +!! | wet | flag_nonzero_wet_surface_fraction | flag indicating presence of some ocean or lake surface area fraction | flag | 1 | logical | | in | F | !! | dtf | time_step_for_dynamics | dynamics timestep | s | 0 | real | kind_phys | in | F | !! | ep1d | surface_upward_potential_latent_heat_flux | surface upward potential latent heat flux | W m-2 | 1 | real | kind_phys | in | F | !! | gflx | upward_heat_flux_in_soil | upward soil heat flux | W m-2 | 1 | real | kind_phys | in | F | @@ -327,7 +328,7 @@ end subroutine GFS_surface_generic_post_finalize !! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | !! #endif - subroutine GFS_surface_generic_post_run (im, cplflx, cplwav, lssav, lndfrac, dtf, ep1d, gflx, tgrs_1, qgrs_1, ugrs_1, vgrs_1, & + subroutine GFS_surface_generic_post_run (im, cplflx, cplwav, lssav, icy, wet, dtf, ep1d, gflx, tgrs_1, qgrs_1, ugrs_1, vgrs_1,& adjsfcdlw, adjsfcdsw, adjnirbmd, adjnirdfd, adjvisbmd, adjvisdfd, adjsfculw, adjnirbmu, adjnirdfu, adjvisbmu, adjvisdfu, & t2m, q2m, u10m, v10m, tsfc, pgr, xcosz, evbs, evcw, trans, sbsno, snowc, snohf, & epi, gfluxi, t1, q1, u1, v1, dlwsfci_cpl, dswsfci_cpl, dlwsfc_cpl, dswsfc_cpl, dnirbmi_cpl, dnirdfi_cpl, dvisbmi_cpl, & @@ -340,11 +341,10 @@ subroutine GFS_surface_generic_post_run (im, cplflx, cplwav, lssav, lndfrac, dtf implicit none - integer, intent(in) :: im - logical, intent(in) :: cplflx, cplwav, lssav - real(kind=kind_phys), dimension(im), intent(in) :: lndfrac - - real(kind=kind_phys), intent(in) :: dtf + integer, intent(in) :: im + logical, intent(in) :: cplflx, cplwav, lssav + logical, dimension(im), intent(in) :: icy, wet + real(kind=kind_phys), intent(in) :: dtf real(kind=kind_phys), dimension(im), intent(in) :: ep1d, gflx, tgrs_1, qgrs_1, ugrs_1, vgrs_1, adjsfcdlw, adjsfcdsw, & adjnirbmd, adjnirdfd, adjvisbmd, adjvisdfd, adjsfculw, adjnirbmu, adjnirdfu, adjvisbmu, adjvisdfu, & @@ -362,7 +362,7 @@ subroutine GFS_surface_generic_post_run (im, cplflx, cplwav, lssav, lndfrac, dtf character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg - real(kind=kind_phys), parameter :: albdf = 0.06 + real(kind=kind_phys), parameter :: albdf = 0.06d0 integer :: i real(kind=kind_phys) :: tem, xcosz_loc, ocalnirdf_cpl, ocalnirbm_cpl, ocalvisdf_cpl, ocalvisbm_cpl @@ -413,7 +413,7 @@ subroutine GFS_surface_generic_post_run (im, cplflx, cplwav, lssav, lndfrac, dtf ! them to net SW heat fluxes do i=1,im - if(lndfrac(i) < 1.) then ! Not 100% land + if (wet(i) .or. icy(i)) then ! not 100% land ! --- compute open water albedo xcosz_loc = max( 0.0, min( 1.0, xcosz(i) )) ocalnirdf_cpl = 0.06 diff --git a/physics/cldmacro.F b/physics/cldmacro.F index 086277f0e..a2d5aeb70 100644 --- a/physics/cldmacro.F +++ b/physics/cldmacro.F @@ -625,8 +625,10 @@ subroutine fix_up_clouds_2M(QV, TE, QLC, QIC, CF, QLA, QIA, AF, & real, intent(inout) :: TE,QV,QLC,CF,QLA,AF,QIC,QIA, NL, NI ! real, parameter :: qmin = 1.0e-8, qmini = 1.0e-7 - real, parameter :: nmin = 1.0e-3, cfmin = 1.0e-5 +! real, parameter :: nmin = 1.0e-3, cfmin = 1.0e-5 + real, parameter :: nmin = 1.0, cfmin = 1.0e-5 &, RI_cub = 6.4e-14, RL_cub = 1.0e-15 + &, fourb3 = 4.0/3.0 if (AF <= cfmin) then ! Fix if Anvil cloud fraction too small QV = QV + QLA + QIA @@ -687,13 +689,13 @@ subroutine fix_up_clouds_2M(QV, TE, QLC, QIC, CF, QLA, QIA, AF, & if (QLA+QLC <= qc_min(1)) then NL = 0.0 elseif (NL <= nmin) then ! make sure NL > 0 if Q >0 - NL = max((QLA+QLC)/( 1.333 * MAPL_PI *RL_cub*997.0), nmin) + NL = max((QLA+QLC)/( fourb3 * MAPL_PI *RL_cub*997.0), nmin) endif if (QIA+QIC <= qc_min(2)) then NI = 0.0 elseif (NI <= nmin) then ! make sure NI > 0 if Q >0 - NI = max((QIA+QIC)/( 1.333 * MAPL_PI *RI_cub*500.0), nmin) + NI = max((QIA+QIC)/( fourb3 * MAPL_PI *RI_cub*500.0), nmin) endif end subroutine fix_up_clouds_2M diff --git a/physics/cs_conv.F90 b/physics/cs_conv.F90 index d5c2e1011..2d88200c3 100644 --- a/physics/cs_conv.F90 +++ b/physics/cs_conv.F90 @@ -209,9 +209,9 @@ module cs_conv ! spblcrit=0.03, & !< minimum cloudbase height in p/ps ! spblcrit=0.035,& !< minimum cloudbase height in p/ps ! spblcrit=0.025,& !< minimum cloudbase height in p/ps - cincrit=-150.0 -! cincrit=-120.0 -! cincrit=-100.0 + cincrit= 150.0 +! cincrit= 120.0 +! cincrit= 100.0 !DD precz0 and preczh control partitioning of water between detrainment !DD and precipitation. Decrease for more precip @@ -390,15 +390,15 @@ subroutine cs_conv_run(IM , IJSDIM , KMAX , ntracp1 , NN, & ! ! input arguments ! - INTEGER, INTENT(IN) :: IM,IJSDIM, KMAX, ntracp1, NN, NTR, mype, nctp, mp_phys, kdt, lat !! DD, for GFS, pass in - logical, intent(in) :: otspt(ntracp1,2) ! otspt(:,1) - on/off switch for tracer transport by updraft and - ! downdraft. should not include subgrid PDF and turbulence - ! otspt(:,2) - on/off switch for tracer transport by subsidence - ! should include subgrid PDF and turbulence + INTEGER, INTENT(IN) :: IM,IJSDIM, KMAX, ntracp1, nn, NTR, mype, nctp, mp_phys, kdt, lat !! DD, for GFS, pass in + logical, intent(in) :: otspt(1:ntracp1,1:2)! otspt(:,1) - on/off switch for tracer transport by updraft and + ! downdraft. should not include subgrid PDF and turbulence + ! otspt(:,2) - on/off switch for tracer transport by subsidence + ! should include subgrid PDF and turbulence real(r8), intent(inout) :: t(IM,KMAX) ! temperature at mid-layer (K) real(r8), intent(inout) :: q(IM,KMAX) ! water vapor array including moisture (kg/kg) - real(r8), intent(inout) :: clw(IM,KMAX,NN) ! tracer array including cloud condensate (kg/kg) + real(r8), intent(inout) :: clw(IM,KMAX,nn) ! tracer array including cloud condensate (kg/kg) real(r8), intent(in) :: pap(IM,KMAX) ! pressure at mid-layer (Pa) real(r8), intent(in) :: paph(IM,KMAX+1) ! pressure at boundaries (Pa) real(r8), intent(in) :: zm(IM,KMAX) ! geopotential at mid-layer (m) @@ -1177,7 +1177,7 @@ SUBROUTINE CS_CUMLUS (im , IJSDIM, KMAX , NTR , & !DD dimensions ENDDO DO I=ISTS,IENS IF (JBUOY(I) /= 2) CIN(I) = -999.D0 - if (cin(i) < cincrit) kb(i) = -1 + if (cin(i) > cincrit) kb(i) = -1 ENDDO !DDsigma some initialization before summing over cloud type diff --git a/physics/cs_conv_aw_adj.F90 b/physics/cs_conv_aw_adj.F90 index 08d3f4516..82807dbdd 100644 --- a/physics/cs_conv_aw_adj.F90 +++ b/physics/cs_conv_aw_adj.F90 @@ -45,6 +45,8 @@ end subroutine cs_conv_aw_adj_finalize !! | cldfrac | cloud_fraction_for_MG | cloud fraction used by Morrison-Gettelman MP | frac | 2 | real | kind_phys | inout | F | !! | subcldfrac | subgrid_scale_cloud_fraction_from_shoc | subgrid-scale cloud fraction from the SHOC scheme | frac | 2 | real | kind_phys | inout | F | !! | prcp | lwe_thickness_of_explicit_precipitation_amount | explicit precipitation (rain, ice, snow, graupel, ...) on physics timestep | m | 1 | real | kind_phys | inout | F | +!! | imp_physics | flag_for_microphysics_scheme | choice of microphysics scheme | flag | 0 | integer | | in | F | +!! | imp_physics_mg | flag_for_morrison_gettelman_microphysics_scheme | choice of Morrison-Gettelman microphysics scheme | flag | 0 | integer | | in | F | !! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | !! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | !! @@ -52,7 +54,7 @@ end subroutine cs_conv_aw_adj_finalize subroutine cs_conv_aw_adj_run(im, levs, do_cscnv, do_aw, do_shoc, & ntrac, ncld, ntcw, ntclamt, nncl, con_g, sigmafrac, & gt0, gq0, save_t, save_q, prsi, cldfrac, subcldfrac, & - prcp, errmsg, errflg) + prcp, imp_physics, imp_physics_mg, errmsg, errflg) use machine, only: kind_phys @@ -72,6 +74,7 @@ subroutine cs_conv_aw_adj_run(im, levs, do_cscnv, do_aw, do_shoc, & real(kind_phys), dimension(im,levs), intent(inout) :: cldfrac real(kind_phys), dimension(im,levs), intent(inout) :: subcldfrac real(kind_phys), dimension(im), intent(inout) :: prcp + integer, intent(in ) :: imp_physics, imp_physics_mg character(len=*), intent( out) :: errmsg integer, intent( out) :: errflg @@ -109,6 +112,14 @@ subroutine cs_conv_aw_adj_run(im, levs, do_cscnv, do_aw, do_shoc, & temrain1(i) = temrain1(i) - (prsi(i,k)-prsi(i,k+1)) * tem2 * onebg enddo enddo +! add convective clouds if shoc is true and not MG microphysics + if (do_shoc .and. imp_physics /= imp_physics_mg) then + do k = 1,levs + do i = 1,im + subcldfrac(i,k) = min(1.0, subcldfrac(i,k) + sigmafrac(i,k)) + enddo + enddo + endif ! do n=ntcw,ntcw+nncl-1 do k = 1,levs diff --git a/physics/dcyc2.f b/physics/dcyc2.f index a6f699fa2..5844e7371 100644 --- a/physics/dcyc2.f +++ b/physics/dcyc2.f @@ -51,7 +51,7 @@ end subroutine dcyc2t3_finalize ! sfcdsw,sfcnsw,sfcdlw,swh,swhc,hlw,hlwc, ! ! sfcnirbmu,sfcnirdfu,sfcvisbmu,sfcvisdfu, ! ! sfcnirbmd,sfcnirdfd,sfcvisbmd,sfcvisdfd, ! -! ix, im, levs, ! +! ix, im, levs, deltim, fhswr, ! ! input/output: ! ! dtdt,dtdtc, ! ! outputs: ! @@ -90,6 +90,8 @@ end subroutine dcyc2t3_finalize ! sfcvisdfd(im)- real, tot sky sfc uv+vis-diff sw dnward flux (w/m2)! ! ix, im - integer, horiz. dimention and num of used points ! ! levs - integer, vertical layer dimension ! +! deltim - real, physics time step in seconds ! +! fhswr - real, Short wave radiation time step in seconds ! ! ! ! input/output: ! ! dtdt(im,levs)- real, model time step adjusted total radiation ! @@ -154,6 +156,9 @@ end subroutine dcyc2t3_finalize !! spectral component fluxes !!- Oct 2014 y. hous s. moorthi - add emissivity contribution to !! upward longwave flux +!!- Mar 2019 s. moorthi - modify xmu calculation in a time centered +!! way and add more accuracy when physics +!! time step is close to radiation time step !> \section arg_table_dcyc2t3_run Argument Table !! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | !! |----------------|------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------|---------|------|-----------|-----------|--------|----------| @@ -188,6 +193,7 @@ end subroutine dcyc2t3_finalize !! | im | horizontal_loop_extent | horizontal loop extent | count | 0 | integer | | in | F | !! | levs | vertical_dimension | number of vertical layers | count | 0 | integer | | in | F | !! | deltim | time_step_for_dynamics | dynamics timestep | s | 0 | real | kind_phys | in | F | +!! | fhswr | frequency_for_shortwave_radiation | frequency for shortwave radiation | s | 0 | real | kind_phys | in | F | !! | dtdt | tendency_of_air_temperature_due_to_model_physics | total radiative heating rate at current time | K s-1 | 2 | real | kind_phys | inout | F | !! | dtdtc | tendency_of_air_temperature_due_to_radiative_heating_assuming_clear_sky | clear sky radiative (shortwave + longwave) heating rate at current time | K s-1 | 2 | real | kind_phys | inout | F | !! | adjsfcdsw | surface_downwelling_shortwave_flux | surface downwelling shortwave flux at current time | W m-2 | 1 | real | kind_phys | out | F | @@ -215,7 +221,7 @@ subroutine dcyc2t3_run & & sfcdsw,sfcnsw,sfcdlw,swh,swhc,hlw,hlwc, & & sfcnirbmu,sfcnirdfu,sfcvisbmu,sfcvisdfu, & & sfcnirbmd,sfcnirdfd,sfcvisbmd,sfcvisdfd, & - & ix, im, levs, deltim, & + & ix, im, levs, deltim, fhswr, & & dtdt,dtdtc, & ! --- input/output: & adjsfcdsw,adjsfcnsw,adjsfcdlw,adjsfculw,xmu,xcosz, & ! --- outputs: & adjnirbmu,adjnirdfu,adjvisbmu,adjvisdfu, & @@ -229,15 +235,18 @@ subroutine dcyc2t3_run & implicit none ! ! --- constant parameters: - real(kind=kind_phys), parameter :: f_eps = 0.0001, hour12 = 12.0,& - & f7200 = 1.0/7200.0, & + real(kind=kind_phys), parameter :: f_eps = 0.0001_kind_phys, & + & hour12 = 12.0_kind_phys, & + & f3600 = 1.0/3600.0_kind_phys, & + & f7200 = 1.0/7200.0_kind_phys, & + & czlimt = 0.0001_kind_phys, & ! ~ cos(89.99427) & pid12 = con_pi / hour12 ! --- inputs: integer, intent(in) :: ix, im, levs real(kind=kind_phys), intent(in) :: solhr, slag, cdec, sdec, & - & deltim + & deltim, fhswr real(kind=kind_phys), dimension(im), intent(in) :: & & sinlat, coslat, xlon, coszen, tsea, tf, tsflw, sfcdlw, & @@ -262,16 +271,51 @@ subroutine dcyc2t3_run & integer, intent(out) :: errflg ! --- locals: - integer :: i, k - real(kind=kind_phys) :: cns, ss, cc, ch, tem1, tem2 + integer :: i, k, nstp, nstl, it, istsun(im) + real(kind=kind_phys) :: cns, coszn, tem1, tem2, anginc, & + & rstl, solang ! !===> ... begin here ! ! Initialize CCPP error handling variables errmsg = '' errflg = 0 + + tem1 = fhswr / deltim + nstp = max(6, nint(tem1)) + nstl = max(1, nint(nstp/tem1)) ! - cns = pid12 * (solhr + deltim*f7200 - hour12) + slag +! --- ... sw time-step adjustment for current cosine of zenith angle +! ---------------------------------------------------------- + if (nstl == 1) then + cns = pid12 * (solhr + deltim*f7200 - hour12) + slag + do i = 1, IM + xcosz(i) = sdec*sinlat(i) + cdec*coslat(i)*cos(cns+xlon(i)) + enddo + elseif (nstl == nstp) then + do i = 1, IM + xcosz(i) = coszen(i) + enddo + else + rstl = 1.0 / float(nstl) + solang = pid12 * (solhr - hour12) + anginc = pid12 * deltim * f3600 * rstl + do i = 1, im + xcosz(i) = 0.0 + istsun(i) = 0.0 + enddo + do it=1,nstl + cns = solang + (float(it)-0.5)*anginc + slag + do i = 1, IM + coszn = sdec*sinlat(i) + cdec*coslat(i)*cos(cns+xlon(i)) + xcosz(i) = xcosz(i) + max(0.0, coszn) + if (coszn > czlimt) istsun(i) = istsun(i) + 1 + enddo + enddo + do i = 1, IM + if (istsun(i) > 0) xcosz(i) = xcosz(i) / istsun(i) ! mean cosine of solar zenith angle at current time + enddo + endif ! do i = 1, im @@ -289,15 +333,8 @@ subroutine dcyc2t3_run & adjsfculw(i) = sfcemis(i) * con_sbc * tem2 * tem2 & + (1.0 - sfcemis(i)) * adjsfcdlw(i) ! -!> - SW time-step adjustment: - - ss = sinlat(i) * sdec - cc = coslat(i) * cdec - ch = cc * cos( xlon(i)+cns ) - xcosz(i) = ch + ss ! cosine of solar zenith angle at current time !> - normalize by average value over radiation period for daytime. - if ( xcosz(i) > f_eps .and. coszen(i) > f_eps ) then xmu(i) = xcosz(i) / coszen(i) else diff --git a/physics/docs/pdftxt/CPT_adv_suite.txt b/physics/docs/pdftxt/CPT_adv_suite.txt index fa9801e07..1edb934a2 100644 --- a/physics/docs/pdftxt/CPT_adv_suite.txt +++ b/physics/docs/pdftxt/CPT_adv_suite.txt @@ -118,7 +118,6 @@ The advanced CPT physics suite uses the parameterizations in the following order m_micro_post cs_conv_aw_adj GFS_MP_generic_post - sfc_sice_post diff --git a/physics/docs/pdftxt/GFSv14_suite.txt b/physics/docs/pdftxt/GFSv14_suite.txt index 138de59e6..25e03e7fd 100644 --- a/physics/docs/pdftxt/GFSv14_suite.txt +++ b/physics/docs/pdftxt/GFSv14_suite.txt @@ -106,7 +106,6 @@ The GFS v14 suite uses the parameterizations in the following order, as defined zhaocarr_gscond zhaocarr_precpd GFS_MP_generic_post - sfc_sice_post maximum_hourly_diagnostics diff --git a/physics/docs/pdftxt/GFSv15_suite.txt b/physics/docs/pdftxt/GFSv15_suite.txt index cf7e68068..821ca9680 100644 --- a/physics/docs/pdftxt/GFSv15_suite.txt +++ b/physics/docs/pdftxt/GFSv15_suite.txt @@ -126,7 +126,6 @@ The GFSv15 suite uses the parameterizations in the following order, as defined i GFS_MP_generic_pre gfdl_cloud_microphys GFS_MP_generic_post - sfc_sice_post maximum_hourly_diagnostics diff --git a/physics/docs/pdftxt/GFSv15_suite_TKEEDMF.txt b/physics/docs/pdftxt/GFSv15_suite_TKEEDMF.txt index 3b0868cec..a60f3b3b6 100644 --- a/physics/docs/pdftxt/GFSv15_suite_TKEEDMF.txt +++ b/physics/docs/pdftxt/GFSv15_suite_TKEEDMF.txt @@ -113,7 +113,6 @@ The GFSv15plus suite uses the parameterizations in the following order, as defin GFS_MP_generic_pre gfdl_cloud_microphys GFS_MP_generic_post - sfc_sice_post maximum_hourly_diagnostics diff --git a/physics/gcm_shoc.F90 b/physics/gcm_shoc.F90 index f2c9b7a7b..dff067893 100644 --- a/physics/gcm_shoc.F90 +++ b/physics/gcm_shoc.F90 @@ -33,7 +33,7 @@ end subroutine shoc_finalize !! | imp_physics_gfdl | flag_for_gfdl_microphysics_scheme | choice of GFDL microphysics scheme | flag | 0 | integer | | in | F | !! | imp_physics_zhao_carr | flag_for_zhao_carr_microphysics_scheme | choice of Zhao-Carr microphysics scheme | flag | 0 | integer | | in | F | !! | imp_physics_zhao_carr_pdf | flag_for_zhao_carr_pdf_microphysics_scheme | choice of Zhao-Carr microphysics scheme with PDF clouds | flag | 0 | integer | | in | F | -!! | imp_physics_mg | flag_for_morrison_gettelman_microphysics_scheme | choice of Morrison-Gettelman rmicrophysics scheme | flag | 0 | integer | | in | F | +!! | imp_physics_mg | flag_for_morrison_gettelman_microphysics_scheme | choice of Morrison-Gettelman microphysics scheme | flag | 0 | integer | | in | F | !! | fprcp | number_of_frozen_precipitation_species | number of frozen precipitation species | count | 0 | integer | | in | F | !! | tcr | cloud_phase_transition_threshold_temperature | threshold temperature below which cloud starts to freeze | K | 0 | real | kind_phys | in | F | !! | tcrf | cloud_phase_transition_denominator | denominator in cloud phase transition = 1/(tcr-tf) | K-1 | 0 | real | kind_phys | in | F | @@ -110,7 +110,7 @@ subroutine shoc_run (ix, nx, nzm, do_shoc, shocaftcnv, mg3_as_mg2, imp_physics, character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg - real(kind=kind_phys), parameter :: epsq = 1.e-20 + real(kind=kind_phys), parameter :: epsq = 1.d-20 integer :: i, k @@ -125,7 +125,6 @@ subroutine shoc_run (ix, nx, nzm, do_shoc, shocaftcnv, mg3_as_mg2, imp_physics, if (shocaftcnv) then if (imp_physics == imp_physics_mg) then - skip_macro = do_shoc if (abs(fprcp) == 1 .or. mg3_as_mg2) then do k=1,nzm do i=1,nx @@ -147,11 +146,10 @@ subroutine shoc_run (ix, nx, nzm, do_shoc, shocaftcnv, mg3_as_mg2, imp_physics, endif else if (imp_physics == imp_physics_mg) then - skip_macro = do_shoc do k=1,nzm do i=1,nx - ! DH* THESE ARE NOT IN THE ORIGINAL CODE (AND THEY WERE NEVER) ::: clw_ice(i,k) = gq0_cloud_ice(i,k) ! ice - ! DH* THESE ARE NOT IN THE ORIGINAL CODE (AND THEY WERE NEVER) ::: clw_liquid(i,k) = gq0_cloud_liquid(i,k) ! water + !clw_ice(i,k) = gq0_cloud_ice(i,k) ! ice + !clw_liquid(i,k) = gq0_cloud_liquid(i,k) ! water !GF - since gq0(ntlnc/ntinc) are passed in directly, no need to copy !ncpl(i,k) = Stateout%gq0(i,k,ntlnc) !ncpi(i,k) = Stateout%gq0(i,k,ntinc) @@ -172,7 +170,7 @@ subroutine shoc_run (ix, nx, nzm, do_shoc, shocaftcnv, mg3_as_mg2, imp_physics, !qrn(i,k) = gq0_rain(i,k) qsnw(i,k) = gq0_snow(i,k) + gq0_graupel(i,k) qgl(i,k) = 0.0 - clw_ice(i,k) = clw_ice(i,k) + gq0_graupel(i,k) + !clw_ice(i,k) = clw_ice(i,k) + gq0_graupel(i,k) enddo enddo endif @@ -221,18 +219,18 @@ subroutine shoc_run (ix, nx, nzm, do_shoc, shocaftcnv, mg3_as_mg2, imp_physics, cld_sgs, tke, hflx, evap, prnum, tkh, wthv_sec, .false., 1, ncpl, ncpi, & con_cp, con_g, con_hvap, con_hfus, con_rv, con_rd, con_pi, con_fvirt) - if (.not.shocaftcnv) then - if (imp_physics == imp_physics_mg .and. fprcp > 1) then - do k=1,nzm - do i=1,nx - clw_ice(i,k) = clw_ice(i,k) - gq0_graupel(i,k) - enddo - enddo - endif - endif ! .not. shocaftcnv + !if (.not.shocaftcnv) then + ! if (imp_physics == imp_physics_mg .and. fprcp > 1) then + ! do k=1,nzm + ! do i=1,nx + ! clw_ice(i,k) = clw_ice(i,k) - gq0_graupel(i,k) + ! enddo + ! enddo + ! endif + !endif ! .not. shocaftcnv !GF since gq0(ntlnc/ntinc) are passed in directly, no need to copy back - ! if (ntlnc > 0 .and. ntinc > 0 .and. ncld >= 2) then + ! if (imp_physics == Model%imp_physics_mg) then ! do k=1,nzm ! do i=1,nx ! Stateout%gq0(i,k,ntlnc) = ncpl(i,k) diff --git a/physics/gfdl_cloud_microphys.F90 b/physics/gfdl_cloud_microphys.F90 index 3fd83210f..8e6f645ca 100644 --- a/physics/gfdl_cloud_microphys.F90 +++ b/physics/gfdl_cloud_microphys.F90 @@ -159,8 +159,7 @@ end subroutine gfdl_cloud_microphys_finalize !! | phys_hydrostatic | flag_for_hydrostatic_heating_from_physics | flag indicating hydrostatic heating from physics | flag | 0 | logical | | in | F | !! | lradar | flag_for_radar_reflectivity | flag for radar reflectivity | flag | 0 | logical | | in | F | !! | refl_10cm | radar_reflectivity_10cm | instantaneous refl_10cm | dBZ | 2 | real | kind_phys | inout | F | -!! | kdt | index_of_time_step | current forecast iteration | index | 0 | integer | | in | F | -!! | nsteps_per_reset | number_of_time_steps_per_maximum_hourly_time_interval | number_of_time_steps_per_maximum_hourly_time_interval | count | 0 | integer | | in | F | +!! | reset | flag_reset_maximum_hourly_fields | flag for resetting maximum hourly fields | flag | 0 | logical | | in | F | !! | effr_in | flag_for_cloud_effective_radii | flag for cloud effective radii calculations in microphysics | | 0 | logical | | in | F | !! | rew | effective_radius_of_stratiform_cloud_liquid_water_particle_in_um | eff. radius of cloud liquid water particle in micrometer | um | 2 | real | kind_phys | inout | F | !! | rei | effective_radius_of_stratiform_cloud_ice_particle_in_um | eff. radius of cloud ice water particle in micrometer | um | 2 | real | kind_phys | inout | F | @@ -176,7 +175,7 @@ subroutine gfdl_cloud_microphys_run( & gt0, gu0, gv0, vvl, prsl, phii, del, & rain0, ice0, snow0, graupel0, prcp0, sr, & dtp, hydrostatic, phys_hydrostatic, lradar, refl_10cm, & - kdt, nsteps_per_reset, effr_in, rew, rei, rer, res, reg, errmsg, errflg) + reset, effr_in, rew, rei, rer, res, reg, errmsg, errflg) use machine, only: kind_phys @@ -187,11 +186,7 @@ subroutine gfdl_cloud_microphys_run( & real(kind=kind_phys), parameter :: one = 1.0d0 real(kind=kind_phys), parameter :: con_p001= 0.001d0 real(kind=kind_phys), parameter :: con_day = 86400.d0 -#ifdef TRANSITION real(kind=kind_phys), parameter :: rainmin = 1.0d-13 -#else - real(kind=kind_phys), parameter :: rainmin = 1.0e-13 -#endif ! *DH ! interface variables @@ -217,8 +212,7 @@ subroutine gfdl_cloud_microphys_run( & logical, intent (in) :: lradar real(kind=kind_phys), intent(inout), dimension(1:im,1:levs) :: refl_10cm - integer, intent (in) :: kdt, nsteps_per_reset - logical, intent (in) :: effr_in + logical, intent (in) :: reset, effr_in real(kind=kind_phys), intent(inout), dimension(1:im,1:levs) :: rew, rei, rer, res, reg character(len=*), intent(out) :: errmsg @@ -237,7 +231,6 @@ subroutine gfdl_cloud_microphys_run( & real(kind=kind_phys), volatile :: volatile_var1, volatile_var2 #endif - ! Initialize CCPP error handling variables errmsg = '' errflg = 0 @@ -298,7 +291,7 @@ subroutine gfdl_cloud_microphys_run( & qv1, ql1, qr1, qi1, qs1, qg1, qa1, qn1, qv_dt, ql_dt, qr_dt, qi_dt, & qs_dt, qg_dt, qa_dt, pt_dt, pt, w, uin, vin, u_dt, v_dt, dz, delp, & garea, dtp, frland, rain0, snow0, ice0, graupel0, hydrostatic, & - phys_hydrostatic, p123, lradar, refl, kdt, nsteps_per_reset) + phys_hydrostatic, p123, lradar, refl, reset) tem = dtp*con_p001/con_day ! fix negative values diff --git a/physics/gfs_phy_tracer_config.f b/physics/gfs_phy_tracer_config.F similarity index 100% rename from physics/gfs_phy_tracer_config.f rename to physics/gfs_phy_tracer_config.F diff --git a/physics/m_micro.F90 b/physics/m_micro.F90 index f973842f0..2e33ce542 100644 --- a/physics/m_micro.F90 +++ b/physics/m_micro.F90 @@ -20,7 +20,7 @@ module m_micro !! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | !! |------------------------|-------------------------------------------------|---------------------------------------------------------------------------------------------|-------------|------|------------|-----------|--------|----------| !! | imp_physics | flag_for_microphysics_scheme | choice of microphysics scheme | flag | 0 | integer | | in | F | -!! | imp_physics_mg | flag_for_morrison_gettelman_microphysics_scheme | choice of Morrison-Gettelman rmicrophysics scheme | flag | 0 | integer | | in | F | +!! | imp_physics_mg | flag_for_morrison_gettelman_microphysics_scheme | choice of Morrison-Gettelman microphysics scheme | flag | 0 | integer | | in | F | !! | fprcp | number_of_frozen_precipitation_species | number of frozen precipitation species | count | 0 | integer | | in | F | !! | gravit | gravitational_acceleration | gravitational acceleration | m s-2 | 0 | real | kind_phys | in | F | !! | rair | gas_constant_dry_air | ideal gas constant for dry air | J kg-1 K-1 | 0 | real | kind_phys | in | F | @@ -260,7 +260,7 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & use aer_cloud, only: AerProps, getINsubset,init_aer, & & aerosol_activate,AerConversion1 use cldmacro, only: macro_cloud,meltfrz_inst,update_cld, & - & meltfrz_inst + & meltfrz_inst, fix_up_clouds_2M use cldwat2m_micro,only: mmicro_pcond use micro_mg2_0, only: micro_mg_tend2_0 => micro_mg_tend, qcvar2 => qcvar use micro_mg3_0, only: micro_mg_tend3_0 => micro_mg_tend, qcvar3 => qcvar @@ -284,7 +284,8 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & real, parameter :: one=1.0, oneb3=one/3.0, onebcp=one/cp, & & kapa=rgas*onebcp, cpbg=cp/grav, & & lvbcp=hvap*onebcp, lsbcp=(hvap+hfus)*onebcp,& - qsmall=1.e-14, rainmin = 1.0e-13 + & qsmall=1.e-14, rainmin = 1.0e-13, & + & fourb3=4.0/3.0, RL_cub=1.0e-15, nmin=1.0 integer, parameter :: ncolmicro = 1 integer,intent(in) :: im, ix,lm, ipr, kdt, fprcp, pdfflag @@ -627,6 +628,32 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & DT_MOIST = dt_i dt_r8 = dt_i + if (kdt == 1) then + DO K=1, LM + DO I = 1,IM + CALL fix_up_clouds_2M(Q1(I,K), TEMP(i,k), QLLS(I,K), & + & QILS(I,K), CLLS(I,K), QLCN(I,K), & + & QICN(I,K), CLCN(I,K), NCPL(I,K), & + & NCPI(I,K), qc_min) + if (rnw(i,k) <= qc_min(1)) then + ncpl(i,k) = 0.0 + elseif (ncpl(i,k) <= nmin) then ! make sure NL > 0 if Q >0 + ncpl(i,k) = max(rnw(i,k) / (fourb3 * PI *RL_cub*997.0), nmin) + endif + if (snw(i,k) <= qc_min(2)) then + ncpl(i,k) = 0.0 + elseif (ncps(i,k) <= nmin) then + ncps(i,k) = max(snw(i,k) / (fourb3 * PI *RL_cub*500.0), nmin) + endif + if (qgl(i,k) <= qc_min(2)) then + ncgl(i,k) = 0.0 + elseif (ncgl(i,k) <= nmin) then + ncgl(i,k) = max(qgl(i,k) / (fourb3 * PI *RL_cub*500.0), nmin) + endif + + enddo + enddo + endif do i=1,im KCBL(i) = max(LM-KCBL(i),10) KCT(i) = 10 @@ -1743,15 +1770,39 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & !TVQX1 = SUM( ( Q1 + QL_TOT + QI_TOT(1:im,:,:))*DM, 3) & - if (.not. skip_macro) then + if (skip_macro) then + do k=1,lm + do i=1,im + CALL fix_up_clouds_2M(Q1(I,K), TEMP(i,k), QLLS(I,K), & + & QILS(I,K), CLLS(I,K), QLCN(I,K), & + & QICN(I,K), CLCN(I,K), NCPL(I,K), & + & NCPI(I,K), qc_min) + if (rnw(i,k) <= qc_min(1)) then + ncpl(i,k) = 0.0 + elseif (ncpl(i,k) <= nmin) then ! make sure NL > 0 if Q >0 + ncpl(i,k) = max(rnw(i,k) / (fourb3 * PI *RL_cub*997.0), nmin) + endif + if (snw(i,k) <= qc_min(2)) then + ncpl(i,k) = 0.0 + elseif (ncps(i,k) <= nmin) then + ncps(i,k) = max(snw(i,k) / (fourb3 * PI *RL_cub*500.0), nmin) + endif + if (qgl(i,k) <= qc_min(2)) then + ncgl(i,k) = 0.0 + elseif (ncgl(i,k) <= nmin) then + ncgl(i,k) = max(qgl(i,k) / (fourb3 * PI *RL_cub*500.0), nmin) + endif + enddo + enddo + else do k=1,lm do i=1,im QLCN(i,k) = QL_TOT(i,k) * FQA(i,k) QLLS(i,k) = QL_TOT(i,k) - QLCN(i,k) QICN(i,k) = QI_TOT(i,k) * FQA(i,k) QILS(i,k) = QI_TOT(i,k) - QICN(i,k) - end do - end do + enddo + enddo !> - Call update_cld() call update_cld(im, lm, DT_MOIST, ALPHT_X, qc_min & @@ -1765,8 +1816,24 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & do i=1,im QL_TOT(I,K) = QLLS(I,K) + QLCN(I,K) QI_TOT(I,K) = QILS(I,K) + QICN(I,K) - end do - end do +! + if (rnw(i,k) <= qc_min(1)) then + ncpl(i,k) = 0.0 + elseif (ncpl(i,k) <= nmin) then ! make sure NL > 0 if Q >0 + ncpl(i,k) = max(rnw(i,k) / (fourb3 * PI *RL_cub*997.0), nmin) + endif + if (snw(i,k) <= qc_min(2)) then + ncpl(i,k) = 0.0 + elseif (ncps(i,k) <= nmin) then + ncps(i,k) = max(snw(i,k) / (fourb3 * PI *RL_cub*500.0), nmin) + endif + if (qgl(i,k) <= qc_min(2)) then + ncgl(i,k) = 0.0 + elseif (ncgl(i,k) <= nmin) then + ncgl(i,k) = max(qgl(i,k) / (fourb3 * PI *RL_cub*500.0), nmin) + endif + enddo + enddo deallocate(CNV_MFD,CNV_FICE,CNV_NDROP,CNV_NICE) ! deallocate(CNV_MFD,CNV_PRC3,CNV_FICE,CNV_NDROP,CNV_NICE) endif @@ -1806,11 +1873,17 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & qi_o(i,k) = QI_TOT(i,ll) END DO END DO - if (.not. skip_macro) then + if (skip_macro) then + DO K=1, LM + ll = lm-k+1 + DO I = 1,IM + CLLS_io(i,k) = max(0.0, min(CLLS(i,ll)+CLCN(i,ll),1.0)) + enddo + enddo + else DO K=1, LM ll = lm-k+1 DO I = 1,IM -! CLLS_io(i,k) = max(0.0, min(CLLS(i,ll)+CLCN(i,ll),1.0)) CLLS_io(i,k) = CLLS(i,ll) enddo enddo @@ -1832,15 +1905,21 @@ subroutine m_micro_run( im, ix, lm, flipv, dt_i & qi_o(i,k) = QI_TOT(i,k) END DO END DO - if (.not. skip_macro) then + if (skip_macro) then + DO K=1, LM + DO I = 1,IM + CLLS_io(i,k) = max(0.0, min(CLLS(i,k)+CLCN(i,k),1.0)) + enddo + enddo + else DO K=1, LM DO I = 1,IM -! CLLS_io(i,k) = max(0.0, min(CLLS(i,k)+CLCN(i,k),1.0)) CLLS_io(i,k) = CLLS(i,k) enddo enddo endif - endif + endif ! end of flipv if + DO I = 1,IM tx1 = LS_PRC2(i) + LS_SNR(i) rn_o(i) = tx1 * dt_i * 0.001 diff --git a/physics/m_micro_interstitial.F90 b/physics/m_micro_interstitial.F90 index 259c82519..c40740e63 100644 --- a/physics/m_micro_interstitial.F90 +++ b/physics/m_micro_interstitial.F90 @@ -23,6 +23,7 @@ end subroutine m_micro_pre_init !! | im | horizontal_loop_extent | horizontal loop extent | count | 0 | integer | | in | F | !! | levs | vertical_dimension | number of vertical layers | count | 0 | integer | | in | F | !! | do_shoc | flag_for_shoc | flag for SHOC | flag | 0 | logical | | in | F | +!! | skip_macro | flag_skip_macro | flag to skip cloud macrophysics in Morrison scheme | flag | 0 | logical | | inout | F | !! | fprcp | number_of_frozen_precipitation_species | number of frozen precipitation species | count | 0 | integer | | in | F | !! | mg3_as_mg2 | flag_mg3_as_mg2 | flag for controlling prep for Morrison-Gettelman microphysics | flag | 0 | logical | | in | F | !! | gq0_ice | ice_water_mixing_ratio_updated_by_physics | moist (dry+vapor, no condensates) mixing ratio of ice water updated by physics | kg kg-1 | 2 | real | kind_phys | in | F | @@ -56,8 +57,8 @@ end subroutine m_micro_pre_init !! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | !! #endif - subroutine m_micro_pre_run (im, levs, do_shoc, fprcp, mg3_as_mg2, gq0_ice, gq0_water, gq0_rain, & - gq0_snow, gq0_graupel, gq0_rain_nc, gq0_snow_nc, gq0_graupel_nc, cld_shoc, cnvc, cnvw, tcr, tcrf, gt0, & + subroutine m_micro_pre_run (im, levs, do_shoc, skip_macro, fprcp, mg3_as_mg2, gq0_ice, gq0_water, gq0_rain, & + gq0_snow, gq0_graupel, gq0_rain_nc, gq0_snow_nc, gq0_graupel_nc, cld_shoc, cnvc, cnvw, tcr, tcrf, gt0, & qrn, qsnw, qgl, ncpr, ncps, ncgl, cld_frc_MG, qlcn, qicn, cf_upi, clw_water, clw_ice, clcn, errmsg, errflg ) use machine, only : kind_phys @@ -65,6 +66,7 @@ subroutine m_micro_pre_run (im, levs, do_shoc, fprcp, mg3_as_mg2, gq0_ice, gq0_w integer, intent(in) :: im, levs, fprcp logical, intent(in) :: do_shoc, mg3_as_mg2 + logical, intent(inout) :: skip_macro real(kind=kind_phys), intent(in) :: tcr, tcrf real(kind=kind_phys), intent(in) :: & @@ -97,6 +99,7 @@ subroutine m_micro_pre_run (im, levs, do_shoc, fprcp, mg3_as_mg2, gq0_ice, gq0_w ! year. I believe this will make the physical interaction more reasonable ! Anning 12/5/2015 changed ntcw hold liquid only if (do_shoc) then + skip_macro = do_shoc if (fprcp == 0) then do k=1,levs do i=1,im @@ -215,19 +218,24 @@ end subroutine m_micro_post_init !! | qrn | local_rain_water_mixing_ratio | moist (dry+vapor, no condensates) mixing ratio of rain water local to physics | kg kg-1 | 2 | real | kind_phys | inout | F | !! | qsnw | local_snow_water_mixing_ratio | moist (dry+vapor, no condensates) mixing ratio of snow water local to physics | kg kg-1 | 2 | real | kind_phys | inout | F | !! | qgl | local_graupel_mixing_ratio | moist (dry+vapor, no condensates) mixing ratio of graupel local to physics | kg kg-1 | 2 | real | kind_phys | inout | F | +!! | gq0_ice | ice_water_mixing_ratio_updated_by_physics | moist (dry+vapor, no condensates) mixing ratio of ice water updated by physics | kg kg-1 | 2 | real | kind_phys | in | F | !! | gq0_rain | rain_water_mixing_ratio_updated_by_physics | moist (dry+vapor, no condensates) mixing ratio of rain water updated by physics | kg kg-1 | 2 | real | kind_phys | out | F | !! | gq0_snow | snow_water_mixing_ratio_updated_by_physics | moist (dry+vapor, no condensates) mixing ratio of snow water updated by physics | kg kg-1 | 2 | real | kind_phys | out | F | !! | gq0_graupel | graupel_mixing_ratio_updated_by_physics | moist (dry+vapor, no condensates) mixing ratio of graupel updated by physics | kg kg-1 | 2 | real | kind_phys | out | F | !! | gq0_rain_nc | rain_number_concentration_updated_by_physics | number concentration of rain updated by physics | kg-1 | 2 | real | kind_phys | out | F | !! | gq0_snow_nc | snow_number_concentration_updated_by_physics | number concentration of snow updated by physics | kg-1 | 2 | real | kind_phys | out | F | !! | gq0_graupel_nc | graupel_number_concentration_updated_by_physics | number concentration of graupel updated by physics | kg-1 | 2 | real | kind_phys | out | F | +!! | ice | lwe_thickness_of_ice_amount_on_dynamics_timestep | ice fall at this time step | m | 1 | real | kind_phys | out | F | +!! | snow | lwe_thickness_of_snow_amount_on_dynamics_timestep | snow fall at this time step | m | 1 | real | kind_phys | out | F | +!! | graupel | lwe_thickness_of_graupel_amount_on_dynamics_timestep | graupel fall at this time step | m | 1 | real | kind_phys | out | F | +!! | dtp | time_step_for_physics | physics timestep | s | 0 | real | kind_phys | in | F | !! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | !! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | !! - subroutine m_micro_post_run( & - im, levs, fprcp, mg3_as_mg2, ncpr, ncps, ncgl, qrn, qsnw, qgl, & - gq0_rain, gq0_snow, gq0_graupel, gq0_rain_nc, gq0_snow_nc, & - gq0_graupel_nc, errmsg, errflg) + subroutine m_micro_post_run( & + im, levs, fprcp, mg3_as_mg2, ncpr, ncps, ncgl, qrn, qsnw, qgl, & + gq0_ice, gq0_rain, gq0_snow, gq0_graupel, gq0_rain_nc, gq0_snow_nc, & + gq0_graupel_nc, ice, snow, graupel, dtp, errmsg, errflg) use machine, only : kind_phys implicit none @@ -235,17 +243,33 @@ subroutine m_micro_post_run( & integer, intent(in) :: im, levs, fprcp logical, intent(in) :: mg3_as_mg2 - real(kind=kind_phys), intent(in) :: ncpr(:,:), ncps(:,:), ncgl(:,:) - real(kind=kind_phys), intent(inout) :: qrn(:,:), qsnw(:,:), qgl(:,:) - real(kind=kind_phys), intent(inout) :: gq0_rain(:,:), gq0_snow(:,:), & - gq0_graupel(:,:), gq0_rain_nc(:,:), gq0_snow_nc(:,:), gq0_graupel_nc(:,:) + real(kind=kind_phys), intent(in ) :: ncpr(1:im,1:levs) + real(kind=kind_phys), intent(in ) :: ncps(1:im,1:levs) + real(kind=kind_phys), intent(in ) :: ncgl(1:im,1:levs) + real(kind=kind_phys), intent(inout) :: qrn(1:im,1:levs) + real(kind=kind_phys), intent(inout) :: qsnw(1:im,1:levs) + real(kind=kind_phys), intent(inout) :: qgl(1:im,1:levs) + real(kind=kind_phys), intent(inout) :: gq0_ice(1:im,1:levs) + real(kind=kind_phys), intent(inout) :: gq0_rain(1:im,1:levs) + real(kind=kind_phys), intent(inout) :: gq0_snow(1:im,1:levs) + real(kind=kind_phys), intent(inout) :: gq0_graupel(1:im,1:levs) + real(kind=kind_phys), intent(inout) :: gq0_rain_nc(1:im,1:levs) + real(kind=kind_phys), intent(inout) :: gq0_snow_nc(1:im,1:levs) + real(kind=kind_phys), intent(inout) :: gq0_graupel_nc(1:im,1:levs) + real(kind=kind_phys), intent( out) :: ice(1:im) + real(kind=kind_phys), intent( out) :: snow(1:im) + real(kind=kind_phys), intent( out) :: graupel(1:im) + real(kind=kind_phys), intent(in ) :: dtp character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg + ! Local variables + real(kind=kind_phys), parameter :: qsmall = 1.0d-20 + real(kind=kind_phys), parameter :: con_p001 = 0.001d0 + real(kind=kind_phys), parameter :: con_day = 86400.0d0 integer :: i, k - - real(kind=kind_phys), parameter :: qsmall = 1.0e-20 + real(kind=kind_phys) :: tem ! Initialize CCPP error handling variables errmsg = '' @@ -260,7 +284,7 @@ subroutine m_micro_post_run( & ! &, gq0(1,1,1),gq0(1,1,ntcw),gq0(1,1,ntcw+1),' m_micro ') ! if (lprnt) write(0,*) ' rain1=',rain1(ipr)*86400.0, & -! &' rainc=',diag%rainc(ipr)*86400.0 & +! &' rainc=',diag%rainc(ipr)*86400.0 ! &,' cn_prc=',cn_prc(ipr),' cn_snr=',cn_snr(ipr) ! if(lprnt) write(0,*) ' aftgt0=',Stateout%gt0(ipr,:),' kdt=',kdt ! if (lprnt) write(0,*) ' aftlsgq0=',stateout%gq0(ipr,:,1),' kdt=',kdt @@ -273,6 +297,7 @@ subroutine m_micro_post_run( & ! if (lprnt) write(0,*)' qsnwa=',qsnw(ipr,:),' kdt=',kdt ! if (lprnt) write(0,*)' qglba',qgl(ipr,:),' kdt=',kdt + tem = dtp * con_p001 / con_day if (abs(fprcp) == 1 .or. mg3_as_mg2) then do k=1,levs do i=1,im @@ -284,6 +309,10 @@ subroutine m_micro_post_run( & gq0_snow_nc(i,k) = ncps(i,k) enddo enddo + do i=1,im + ice(i) = tem * gq0_ice(i,1) + snow(i) = tem * qsnw(i,1) + enddo elseif (fprcp > 1) then do k=1,levs do i=1,im @@ -298,6 +327,11 @@ subroutine m_micro_post_run( & gq0_graupel_nc(i,k) = ncgl(i,k) enddo enddo + do i=1,im + ice(i) = tem * gq0_ice(i,1) + snow(i) = tem * qsnw(i,1) + graupel(i) = tem * qgl(i,1) + enddo endif diff --git a/physics/maximum_hourly_diagnostics.F90 b/physics/maximum_hourly_diagnostics.F90 index 545f393b9..62c68c937 100644 --- a/physics/maximum_hourly_diagnostics.F90 +++ b/physics/maximum_hourly_diagnostics.F90 @@ -26,8 +26,7 @@ end subroutine maximum_hourly_diagnostics_finalize !! |----------------------|--------------------------------------------------------------------|--------------------------------------------------------------------|------------|------|-----------|-----------|--------|----------| !! | im | horizontal_loop_extent | horizontal loop extent | count | 0 | integer | | in | F | !! | levs | vertical_dimension | number of vertical levels | count | 0 | integer | | in | F | -!! | kdt | index_of_time_step | current forecast iteration | index | 0 | integer | | in | F | -!! | nsteps_per_reset | number_of_time_steps_per_maximum_hourly_time_interval | number_of_time_steps_per_maximum_hourly_time_interval | count | 0 | integer | | in | F | +!! | reset | flag_reset_maximum_hourly_fields | flag for resetting maximum hourly fields | flag | 0 | logical | | in | F | !! | lradar | flag_for_radar_reflectivity | flag for radar reflectivity | flag | 0 | logical | | in | F | !! | imp_physics | flag_for_microphysics_scheme | choice of microphysics scheme | flag | 0 | integer | | in | F | !! | imp_physics_gfdl | flag_for_gfdl_microphysics_scheme | choice of GFDL microphysics scheme | flag | 0 | integer | | in | F | @@ -54,15 +53,15 @@ end subroutine maximum_hourly_diagnostics_finalize !! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | !! #endif - subroutine maximum_hourly_diagnostics_run(im, levs, kdt, nsteps_per_reset, lradar, imp_physics, & + subroutine maximum_hourly_diagnostics_run(im, levs, reset, lradar, imp_physics, & imp_physics_gfdl, imp_physics_thompson, con_g, phil, & gt0, refl_10cm, refdmax, refdmax263k, u10m, v10m, & u10max, v10max, spd10max, pgr, t2m, q2m, t02max, & t02min, rh02max, rh02min, errmsg, errflg) ! Interface variables - integer, intent(in) :: im, levs, kdt, nsteps_per_reset - logical, intent(in) :: lradar + integer, intent(in) :: im, levs + logical, intent(in) :: reset, lradar integer, intent(in) :: imp_physics, imp_physics_gfdl, imp_physics_thompson real(kind_phys), intent(in ) :: con_g real(kind_phys), intent(in ) :: phil(im,levs) @@ -88,30 +87,24 @@ subroutine maximum_hourly_diagnostics_run(im, levs, kdt, nsteps_per_reset, lrada ! Local variables real(kind_phys), dimension(:), allocatable :: refd, refd263k real(kind_phys) :: tem, pshltr, QCQ, rh02 - integer :: kdtminus1, i + integer :: i ! Initialize CCPP error handling variables errmsg = '' errflg = 0 - kdtminus1 = kdt-1 - !Calculate hourly max 1-km agl and -10C reflectivity if (lradar .and. (imp_physics == imp_physics_gfdl .or. imp_physics == imp_physics_thompson)) then allocate(refd(im)) allocate(refd263k(im)) call max_fields(phil,refl_10cm,con_g,im,levs,refd,gt0,refd263k) - if(mod(kdtminus1,nsteps_per_reset)==0)then + if (reset) then do i=1,im refdmax(i) = -35. refdmax263k(i) = -35. enddo endif do i=1,im - !if(mod(kdtminus1,nsteps_per_reset)==0)then - ! refdmax(I) = -35. - ! refdmax263k(I) = -35. - !endif refdmax(i) = max(refdmax(i),refd(i)) refdmax263k(i) = max(refdmax263k(i),refd263k(i)) enddo @@ -119,7 +112,7 @@ subroutine maximum_hourly_diagnostics_run(im, levs, kdt, nsteps_per_reset, lrada deallocate (refd263k) endif ! - if(mod(kdtminus1,nsteps_per_reset)==0)then + if (reset) then do i=1,im spd10max(i) = -999. u10max(i) = -999. @@ -133,15 +126,6 @@ subroutine maximum_hourly_diagnostics_run(im, levs, kdt, nsteps_per_reset, lrada do i=1,im ! find max hourly wind speed then decompose tem = sqrt(u10m(i)*u10m(i) + v10m(i)*v10m(i)) - !if(mod(kdtminus1,nsteps_per_reset)==0)then - ! spd10max(i) = -999. - ! u10max(i) = -999. - ! v10max(i) = -999. - ! t02max(i) = -999. - ! t02min(i) = 999. - ! rh02max(i) = -999. - ! rh02min(i) = 999. - !endif if (tem > spd10max(i)) then spd10max(i) = tem u10max(i) = u10m(i) @@ -150,16 +134,16 @@ subroutine maximum_hourly_diagnostics_run(im, levs, kdt, nsteps_per_reset, lrada pshltr=pgr(i)*exp(-0.068283/gt0(i,1)) QCQ=PQ0/pshltr*EXP(A2A*(t2m(i)-A3)/(t2m(i)-A4)) rh02=q2m(i)/QCQ - IF (rh02.GT.1.0) THEN - rh02=1.0 + IF (rh02 > 1.0) THEN + rh02 = 1.0 ENDIF - IF (rh02.LT.RHmin) THEN !use smaller RH limit for stratosphere - rh02=RHmin + IF (rh02 < RHmin) THEN !use smaller RH limit for stratosphere + rh02 = RHmin ENDIF - rh02max(i)=max(rh02max(i),rh02) - rh02min(i)=min(rh02min(i),rh02) - t02max(i)=max(t02max(i),t2m(i)) !<--- hourly max 2m t - t02min(i)=min(t02min(i),t2m(i)) !<--- hourly min 2m t + rh02max(i) = max(rh02max(i),rh02) + rh02min(i) = min(rh02min(i),rh02) + t02max(i) = max(t02max(i),t2m(i)) !<--- hourly max 2m t + t02min(i) = min(t02min(i),t2m(i)) !<--- hourly min 2m t enddo end subroutine maximum_hourly_diagnostics_run @@ -183,8 +167,7 @@ subroutine max_fields(phil,ref3D,grav,im,levs,refd,tk,refd263k) do i=1,im refd(I) = -35. vloop: do k=1,levs-1 - if ( (z(i,k+1)) .ge. 1000. & - .and.(z(i,k)) .le. 1000.) then + if ( z(i,k+1) >= 1000. .and. z(i,k) <= 1000.) then zmidp1=z(i,k+1) zmidLOC=z(i,k) dbz1(1)=ref3d(i,k+1) !- dBZ (not Z) values diff --git a/physics/micro_mg_utils.F90 b/physics/micro_mg_utils.F90 index fe1c8c8b0..46985c46c 100644 --- a/physics/micro_mg_utils.F90 +++ b/physics/micro_mg_utils.F90 @@ -253,7 +253,8 @@ module micro_mg_utils ! Mass of each raindrop created from autoconversion. real(r8), parameter :: droplet_mass_25um = 4._r8/3._r8*pi*rhow*(25.e-6_r8)**3 -real(r8), parameter :: droplet_mass_40um = 4._r8/3._r8*pi*rhow*(40.e-6_r8)**3 +real(r8), parameter :: droplet_mass_40um = 4._r8/3._r8*pi*rhow*(40.e-6_r8)**3, & + droplet_mass_40umi = 1._r8/droplet_mass_40um !========================================================= ! Constants set in initialization @@ -1014,7 +1015,8 @@ subroutine sb2001v2_liq_autoconversion(pgam,qc,nc,qr,rho,relvar,au,nprc,nprc1,mg ! parameters for Seifert and Beheng (2001) autoconversion/accretion real(r8), parameter :: kc = 9.44e9_r8 real(r8), parameter :: kr = 5.78e3_r8 - real(r8), parameter :: auf = kc / (20._r8*2.6e-7_r8) * 1000._r8 + real(r8), parameter :: auf = kc / (20._r8*2.6e-7_r8) * 1000._r8, & + con_nprc1 = two/2.6e-7_r8*1000._r8 real(r8) :: dum, dum1, nu, pra_coef, tx1, tx2, tx3, tx4 integer :: dumi, i @@ -1045,8 +1047,10 @@ subroutine sb2001v2_liq_autoconversion(pgam,qc,nc,qr,rho,relvar,au,nprc,nprc1,mg ! (rho(i)*qc(i)/1000._r8)**4._r8/(rho(i)*nc(i)/1.e6_r8)**2._r8* & ! (1._r8+dum1/(1._r8-dum)**2)*1000._r8 / rho(i) - nprc1(i) = au(i) * two / 2.6e-7_r8 * 1000._r8 - nprc(i) = au(i) / droplet_mass_40um +! nprc1(i) = au(i) * two / 2.6e-7_r8 * 1000._r8 +! nprc(i) = au(i) / droplet_mass_40um + nprc1(i) = au(i) * con_nprc1 + nprc(i) = au(i) * droplet_mass_40umi else au(i) = zero nprc1(i) = zero @@ -1080,7 +1084,8 @@ subroutine liu_liq_autoconversion(pgam,qc,nc,qr,rho,relvar, & real(r8) :: xs,lw, nw, beta6 ! real(r8), parameter :: dcrit=1.0e-6, miu_disp=1. ! real(r8), parameter :: dcrit=1.0e-3, miu_disp=1. - real(r8), parameter :: dcrit=2.0e-3, miu_disp=0.8 + real(r8), parameter :: dcrit = 2.0e-3, miu_disp = 0.8, & + con_nprc1 = two/2.6e-7_r8*1000._r8 integer :: i do i=1,mgncol @@ -1099,8 +1104,10 @@ subroutine liu_liq_autoconversion(pgam,qc,nc,qr,rho,relvar, & / (gamma(relvar(i))*(relvar(i)*relvar(i))) au(i) = au(i) * dcrit - nprc1(i)= au(i) * (two/2.6e-7_r8*1000._r8) - nprc(i) = au(i) / droplet_mass_40um +! nprc1(i)= au(i) * (two/2.6e-7_r8*1000._r8) +! nprc(i) = au(i) / droplet_mass_40um + nprc1(i)= au(i) * con_nprc1 + nprc(i) = au(i) * droplet_mass_40umi else au(i) = zero nprc1(i) = zero diff --git a/physics/module_gfdl_cloud_microphys.F90 b/physics/module_gfdl_cloud_microphys.F90 index 23acefb9b..ac3795566 100644 --- a/physics/module_gfdl_cloud_microphys.F90 +++ b/physics/module_gfdl_cloud_microphys.F90 @@ -327,7 +327,7 @@ subroutine gfdl_cloud_microphys_mod_driver ( qv_dt, ql_dt, qr_dt, qi_dt, qs_dt, qg_dt, qa_dt, pt_dt, pt, w, & uin, vin, udt, vdt, dz, delp, area, dt_in, land, & rain, snow, ice, graupel, hydrostatic, phys_hydrostatic, & - p, lradar, refl_10cm, kdt, nsteps_per_reset) + p, lradar, refl_10cm,reset) implicit none @@ -357,7 +357,7 @@ subroutine gfdl_cloud_microphys_mod_driver ( real, intent (in), dimension (iis:iie, jjs:jje, kks:kke) :: p logical, intent (in) :: lradar real, intent (out), dimension (iis:iie, jjs:jje, kks:kke) :: refl_10cm - integer, intent (in) :: kdt, nsteps_per_reset + logical, intent (in) :: reset ! Local variables logical :: melti = .false. @@ -595,7 +595,7 @@ subroutine gfdl_cloud_microphys_mod_driver ( ! call mpp_clock_end (gfdl_mp_clock) if(lradar) then ! Only set melti to true at the output times - if(mod(kdt,nsteps_per_reset)==0)then + if (reset) then melti=.true. else melti=.false. diff --git a/physics/module_nst_water_prop.f90 b/physics/module_nst_water_prop.f90 index 8b38ffb18..20c4dff88 100644 --- a/physics/module_nst_water_prop.f90 +++ b/physics/module_nst_water_prop.f90 @@ -746,7 +746,7 @@ subroutine get_dtzm_2d(xt,xz,dt_cool,zc,wet,icy,z1,z2,nx,ny,dtm) endif endif endif - endif ! if ( wet(i,j) .and. .not.icy(i,j) ) then + endif ! if wet(i,j) .and. .not.icy(i,j) enddo enddo ! diff --git a/physics/moninshoc.f b/physics/moninshoc.f index 05473db6c..96b294824 100644 --- a/physics/moninshoc.f +++ b/physics/moninshoc.f @@ -40,7 +40,7 @@ end subroutine moninshoc_finalize !! | q1 | vertically_diffused_tracer_concentration | tracer concentration diffused by PBL scheme | kg kg-1 | 3 | real | kind_phys | in | F | !! | tkh | atmosphere_heat_diffusivity_from_shoc | diffusivity for heat from the SHOC scheme | m2 s-1 | 2 | real | kind_phys | in | F | !! | prnum | prandtl_number | turbulent Prandtl number | none | 2 | real | kind_phys | inout | F | -!! | ntke | index_for_turbulent_kinetic_energy | tracer index for turbulent kinetic energy | index | 0 | integer | | in | F | +!! | ntke | index_for_turbulent_kinetic_energy_vertical_diffusion_tracer | index for turbulent kinetic energy in the vertically diffused tracer array | index | 0 | integer | | in | F | !! | psk | dimensionless_exner_function_at_lowest_model_interface | dimensionless Exner function at the surface interface | none | 1 | real | kind_phys | in | F | !! | rbsoil | bulk_richardson_number_at_lowest_model_level | bulk Richardson number at the surface | none | 1 | real | kind_phys | in | F | !! | zorl | surface_roughness_length | surface roughness length in cm | cm | 1 | real | kind_phys | in | F | @@ -71,6 +71,7 @@ end subroutine moninshoc_finalize !! | xkzm_m | atmosphere_momentum_diffusivity_background | background value of momentum diffusivity | m2 s-1 | 0 | real | kind_phys | in | F | !! | xkzm_h | atmosphere_heat_diffusivity_background | background value of heat diffusivity | m2 s-1 | 0 | real | kind_phys | in | F | !! | xkzm_s | diffusivity_background_sigma_level | sigma level threshold for background diffusivity | none | 0 | real | kind_phys | in | F | +!! | xkzminv | atmosphere_heat_diffusivity_background_maximum | max. background val. diffusivity in inversion layers | m2 s-1 | 0 | real | kind_phys | in | F | !! | lprnt | flag_print | flag for printing diagnostics to output | flag | 0 | logical | | in | F | !! | ipr | horizontal_index_of_printed_column | horizontal index of printed column | index | 0 | integer | | in | F | !! | me | mpi_rank | current MPI-rank | index | 0 | integer | | in | F | @@ -88,7 +89,8 @@ subroutine moninshoc_run (ix,im,km,ntrac,ntcw,ncnd,dv,du,tau,rtg, & tsea,heat,evap,stress,spd1,kpbl, & prsi,del,prsl,prslk,phii,phil,delt, & dusfc,dvsfc,dtsfc,dqsfc,dkt,hpbl, - & kinver,xkzm_m,xkzm_h,xkzm_s,lprnt,ipr,me, + & kinver,xkzm_m,xkzm_h,xkzm_s,xkzminv, + & lprnt,ipr,me, & grav, rd, cp, hvap, fv, & errmsg,errflg) ! @@ -105,7 +107,7 @@ subroutine moninshoc_run (ix,im,km,ntrac,ntcw,ncnd,dv,du,tau,rtg, integer, dimension(im), intent(in) :: kinver real(kind=kind_phys), intent(in) :: delt, - & xkzm_m, xkzm_h, xkzm_s + & xkzm_m, xkzm_h, xkzm_s, xkzminv real(kind=kind_phys), intent(in) :: grav, & rd, cp, hvap, fv real(kind=kind_phys), dimension(im), intent(in) :: psk, @@ -208,7 +210,8 @@ subroutine moninshoc_run (ix,im,km,ntrac,ntcw,ncnd,dv,du,tau,rtg, do i=1,im xkzo(i,k) = 0.0 xkzmo(i,k) = 0.0 - if (k < kinver(i)) then +! if (k < kinver(i)) then + if (k <= kinver(i)) then ! vertical background diffusivity for heat and momentum tem1 = 1.0 - prsi(i,k+1) * tx1(i) tem1 = min(1.0, exp(-tem1 * tem1 * 10.0)) @@ -224,16 +227,16 @@ subroutine moninshoc_run (ix,im,km,ntrac,ntcw,ncnd,dv,du,tau,rtg, ! ! diffusivity in the inversion layer is set to be xkzminv (m^2/s) ! -! do k = 1,kmpbl -! do i=1,im -! if(zi(i,k+1) > 250.) then -! tem1 = (t1(i,k+1)-t1(i,k)) * rdzt(i,k) -! if(tem1 > 1.e-5) then -! xkzo(i,k) = min(xkzo(i,k),xkzminv) -! endif -! endif -! enddo -! enddo + do k = 1,kmpbl + do i=1,im + if(zi(i,k+1) > 250.) then + tem1 = (t1(i,k+1)-t1(i,k)) * rdzt(i,k) + if(tem1 > 1.e-5) then + xkzo(i,k) = min(xkzo(i,k),xkzminv) + endif + endif + enddo + enddo ! ! do i = 1,im @@ -499,8 +502,6 @@ subroutine moninshoc_run (ix,im,km,ntrac,ntcw,ncnd,dv,du,tau,rtg, ttend = (a1(i,k)-t1(i,k)) * rdt qtend = (a2(i,k)-q1(i,k,1)) * rdt tau(i,k) = tau(i,k) + ttend -! if(lprnt .and. i==ipr .and. k<11) write(0,*)' tau=',tau(ipr,k) -! &,' ttend=',ttend,' a1=',a1(ipr,k),' t1=',t1(ipr,k) rtg(i,k,1) = rtg(i,k,1) + qtend dtsfc(i) = dtsfc(i) + cont*del(i,k)*ttend dqsfc(i) = dqsfc(i) + conq*del(i,k)*qtend diff --git a/physics/mp_thompson.F90 b/physics/mp_thompson.F90 index e87847f95..9fdd43bad 100644 --- a/physics/mp_thompson.F90 +++ b/physics/mp_thompson.F90 @@ -183,9 +183,9 @@ end subroutine mp_thompson_init !! | sr | ratio_of_snowfall_to_rainfall | ratio of snowfall to large-scale rainfall | frac | 1 | real | kind_phys | out | F | !! | refl_10cm | radar_reflectivity_10cm | instantaneous refl_10cm | dBZ | 2 | real | kind_phys | out | F | !! | do_radar_ref | flag_for_radar_reflectivity | flag for radar reflectivity | flag | 0 | logical | | in | F | -!! | re_cloud | effective_radius_of_stratiform_cloud_liquid_water_particle_in_um | eff. radius of cloud liquid water particle in micrometer | um | 2 | real | kind_phys | none | F | -!! | re_ice | effective_radius_of_stratiform_cloud_ice_particle_in_um | eff. radius of cloud ice water particle in micrometer | um | 2 | real | kind_phys | none | F | -!! | re_snow | effective_radius_of_stratiform_cloud_snow_particle_in_um | effective radius of cloud snow particle in micrometers | um | 2 | real | kind_phys | none | F | +!! | re_cloud | effective_radius_of_stratiform_cloud_liquid_water_particle_in_um | eff. radius of cloud liquid water particle in micrometer | um | 2 | real | kind_phys | out | F | +!! | re_ice | effective_radius_of_stratiform_cloud_ice_particle_in_um | eff. radius of cloud ice water particle in micrometer | um | 2 | real | kind_phys | out | F | +!! | re_snow | effective_radius_of_stratiform_cloud_snow_particle_in_um | effective radius of cloud snow particle in micrometers | um | 2 | real | kind_phys | out | F | !! | mpicomm | mpi_comm | MPI communicator | index | 0 | integer | | in | F | !! | mpirank | mpi_rank | current MPI-rank | index | 0 | integer | | in | F | !! | mpiroot | mpi_root | master MPI-rank | index | 0 | integer | | in | F | diff --git a/physics/physcons.F90 b/physics/physcons.F90 index 9027f4cba..0a95bc679 100644 --- a/physics/physcons.F90 +++ b/physics/physcons.F90 @@ -44,45 +44,47 @@ module physcons !> \name Math constants ! real(kind=kind_phys),parameter:: con_pi =3.1415926535897931 !< pi real(kind=kind_phys),parameter:: con_pi =4.0d0*atan(1.0d0) !< pi - real(kind=kind_phys),parameter:: con_sqrt2 =1.414214e+0 !< square root of 2 - real(kind=kind_phys),parameter:: con_sqrt3 =1.732051e+0 !< quare root of 3 + real(kind=kind_phys),parameter:: con_sqrt2 =1.414214e+0_kind_phys !< square root of 2 + real(kind=kind_phys),parameter:: con_sqrt3 =1.732051e+0_kind_phys !< quare root of 3 !> \name Geophysics/Astronomy constants - real(kind=kind_phys),parameter:: con_rerth =6.3712e+6 !< radius of earth (\f$m\f$) - real(kind=kind_phys),parameter:: con_g =9.80665e+0 !< gravity (\f$m/s^{2}\f$) - real(kind=kind_phys),parameter:: con_omega =7.2921e-5 !< ang vel of earth (\f$s^{-1}\f$) - real(kind=kind_phys),parameter:: con_p0 =1.01325e5 !< standard atmospheric pressure (\f$Pa\f$) -! real(kind=kind_phys),parameter:: con_solr =1.36822e+3 ! solar constant (W/m2)-aer(2001) - real(kind=kind_phys),parameter:: con_solr_old =1.3660e+3 !< solar constant (\f$W/m^{2}\f$)-Liu(2002) - real(kind=kind_phys),parameter:: con_solr =1.3608e+3 !< solar constant (\f$W/m^{2}\f$)-nasa-sorce Tim(2008) -! real(kind=kind_phys),parameter:: con_solr =1.36742732e+3 ! solar constant (W/m2)-gfdl(1989) - OPR as of Jan 2006 - ! Selected geophysics/astronomy constants with kind=kind_dyn - real(kind=kind_dyn), parameter:: con_g_dyn =9.80665e+0 !< gravity (\f$m/s^{2}\f$) + real(kind=kind_phys),parameter:: con_rerth =6.3712e+6_kind_phys !< radius of earth (\f$m\f$) + real(kind=kind_phys),parameter:: con_g =9.80665e+0_kind_phys !< gravity (\f$m/s^{2}\f$) + real(kind=kind_phys),parameter:: con_omega =7.2921e-5_kind_phys !< ang vel of earth (\f$s^{-1}\f$) + real(kind=kind_phys),parameter:: con_p0 =1.01325e5_kind_phys !< standard atmospheric pressure (\f$Pa\f$) +! real(kind=kind_phys),parameter:: con_solr =1.36822e+3_kind_phys ! solar constant (W/m2)-aer(2001) + real(kind=kind_phys),parameter:: con_solr_old =1.3660e+3_kind_phys !< solar constant (\f$W/m^{2}\f$)-Liu(2002) + real(kind=kind_phys),parameter:: con_solr =1.3608e+3_kind_phys !< solar constant (\f$W/m^{2}\f$)-nasa-sorce Tim(2008) +! real(kind=kind_phys),parameter:: con_solr =1.36742732e+3_kind_phys ! solar constant (W/m2)-gfdl(1989) - OPR as of Jan 2006 + ! Selected geophysics/astronomy constants with kind=kind_dyn DH* CHECK IF THIS BREAKS B4B AND IF SO REMOVE _kind_dyn + real(kind=kind_dyn), parameter:: con_g_dyn =9.80665e+0_kind_dyn !< gravity (\f$m/s^{2}\f$) !> \name Thermodynamics constants - real(kind=kind_phys),parameter:: con_rgas =8.314472 !< molar gas constant (\f$J/mol/K\f$) - real(kind=kind_phys),parameter:: con_rd =2.8705e+2 !< gas constant air (\f$J/kg/K\f$) - real(kind=kind_phys),parameter:: con_rv =4.6150e+2 !< gas constant H2O (\f$J/kg/K\f$) - real(kind=kind_phys),parameter:: con_cp =1.0046e+3 !< spec heat air at p (\f$J/kg/K\f$) - real(kind=kind_phys),parameter:: con_cv =7.1760e+2 !< spec heat air at v (\f$J/kg/K\f$) - real(kind=kind_phys),parameter:: con_cvap =1.8460e+3 !< spec heat H2O gas (\f$J/kg/K\f$) - real(kind=kind_phys),parameter:: con_cliq =4.1855e+3 !< spec heat H2O liq (\f$J/kg/K\f$) - real(kind=kind_phys),parameter:: con_csol =2.1060e+3 !< spec heat H2O ice (\f$J/kg/K\f$) - real(kind=kind_phys),parameter:: con_hvap =2.5000e+6 !< lat heat H2O cond (\f$J/kg\f$) - real(kind=kind_phys),parameter:: con_hfus =3.3358e+5 !< lat heat H2O fusion (\f$J/kg\f$) - real(kind=kind_phys),parameter:: con_psat =6.1078e+2 !< pres at H2O 3pt (\f$Pa\f$) - real(kind=kind_phys),parameter:: con_t0c =2.7315e+2 !< temp at 0C (K) - real(kind=kind_phys),parameter:: con_ttp =2.7316e+2 !< temp at H2O 3pt (K) - real(kind=kind_phys),parameter:: con_tice =2.7120e+2 !< temp freezing sea (K) - real(kind=kind_phys),parameter:: con_jcal =4.1855E+0 !< joules per calorie - real(kind=kind_phys),parameter:: con_rhw0 =1022.0 !< sea water reference density (\f$kg/m^{3}\f$) - real(kind=kind_phys),parameter:: con_epsq =1.0E-12 !< min q for computing precip type - ! Selected thermodynamics constants with kind=kind_dyn - real(kind=kind_dyn), parameter:: con_rd_dyn =2.8705e+2 !< gas constant air (\f$J/kg/K\f$) - real(kind=kind_dyn), parameter:: con_rv_dyn =4.6150e+2 !< gas constant H2O (\f$J/kg/K\f$) - real(kind=kind_dyn), parameter:: con_cp_dyn =1.0046e+3 !< spec heat air at p (\f$J/kg/K\f$) - real(kind=kind_dyn), parameter:: con_hvap_dyn =2.5000e+6 !< lat heat H2O cond (\f$J/kg\f$) - real(kind=kind_dyn), parameter:: con_hfus_dyn =3.3358e+5 !< lat heat H2O fusion (\f$J/kg\f$) + real(kind=kind_phys),parameter:: con_rgas =8.314472_kind_phys !< molar gas constant (\f$J/mol/K\f$) + real(kind=kind_phys),parameter:: con_rd =2.8705e+2_kind_phys !< gas constant air (\f$J/kg/K\f$) + real(kind=kind_phys),parameter:: con_rv =4.6150e+2_kind_phys !< gas constant H2O (\f$J/kg/K\f$) + real(kind=kind_phys),parameter:: con_cp =1.0046e+3_kind_phys !< spec heat air at p (\f$J/kg/K\f$) + real(kind=kind_phys),parameter:: con_cv =7.1760e+2_kind_phys !< spec heat air at v (\f$J/kg/K\f$) + real(kind=kind_phys),parameter:: con_cvap =1.8460e+3_kind_phys !< spec heat H2O gas (\f$J/kg/K\f$) + real(kind=kind_phys),parameter:: con_cliq =4.1855e+3_kind_phys !< spec heat H2O liq (\f$J/kg/K\f$) + real(kind=kind_phys),parameter:: con_csol =2.1060e+3_kind_phys !< spec heat H2O ice (\f$J/kg/K\f$) + real(kind=kind_phys),parameter:: con_hvap =2.5000e+6_kind_phys !< lat heat H2O cond (\f$J/kg\f$) +! real(kind=kind_phys),parameter:: con_hvap =2.5010e+6_kind_phys ! from AMS + real(kind=kind_phys),parameter:: con_hfus =3.3358e+5_kind_phys !< lat heat H2O fusion (\f$J/kg\f$) +! real(kind=kind_phys),parameter:: con_hfus =3.3370e+5_kind_phys ! from AMS + real(kind=kind_phys),parameter:: con_psat =6.1078e+2_kind_phys !< pres at H2O 3pt (\f$Pa\f$) + real(kind=kind_phys),parameter:: con_t0c =2.7315e+2_kind_phys !< temp at 0C (K) + real(kind=kind_phys),parameter:: con_ttp =2.7316e+2_kind_phys !< temp at H2O 3pt (K) + real(kind=kind_phys),parameter:: con_tice =2.7120e+2_kind_phys !< temp freezing sea (K) + real(kind=kind_phys),parameter:: con_jcal =4.1855E+0_kind_phys !< joules per calorie + real(kind=kind_phys),parameter:: con_rhw0 =1022.0_kind_phys !< sea water reference density (\f$kg/m^{3}\f$) + real(kind=kind_phys),parameter:: con_epsq =1.0E-12_kind_phys !< min q for computing precip type + ! Selected thermodynamics constants with kind=kind_dyn DH* CHECK IF THIS BREAKS B4B AND IF SO REMOVE _kind_dyn + real(kind=kind_dyn), parameter:: con_rd_dyn =2.8705e+2_kind_dyn !< gas constant air (\f$J/kg/K\f$) + real(kind=kind_dyn), parameter:: con_rv_dyn =4.6150e+2_kind_dyn !< gas constant H2O (\f$J/kg/K\f$) + real(kind=kind_dyn), parameter:: con_cp_dyn =1.0046e+3_kind_dyn !< spec heat air at p (\f$J/kg/K\f$) + real(kind=kind_dyn), parameter:: con_hvap_dyn =2.5000e+6_kind_dyn !< lat heat H2O cond (\f$J/kg\f$) + real(kind=kind_dyn), parameter:: con_hfus_dyn =3.3358e+5_kind_dyn !< lat heat H2O fusion (\f$J/kg\f$) !> \name Secondary constants real(kind=kind_phys),parameter:: con_rocp =con_rd/con_cp @@ -96,23 +98,24 @@ module physcons real(kind=kind_phys),parameter:: con_xponb =-con_dldt/con_rv+con_hvap/(con_rv*con_ttp) !> \name Other Physics/Chemistry constants (source: 2002 CODATA) - real(kind=kind_phys),parameter:: con_c =2.99792458e+8 !< speed of light (\f$m/s\f$) - real(kind=kind_phys),parameter:: con_plnk =6.6260693e-34 !< planck constant (\f$J/s\f$) - real(kind=kind_phys),parameter:: con_boltz =1.3806505e-23 !< boltzmann constant (\f$J/K\f$) - real(kind=kind_phys),parameter:: con_sbc =5.670400e-8 !< stefan-boltzmann (\f$W/m^{2}/K^{4}\f$) - real(kind=kind_phys),parameter:: con_avgd =6.0221415e23 !< avogadro constant (\f$mol^{-1}\f$) - real(kind=kind_phys),parameter:: con_gasv =22413.996e-6 !< vol of ideal gas at 273.15K, 101.325kPa (\f$m^{3}/mol\f$) -! real(kind=kind_phys),parameter:: con_amd =28.970 !< molecular wght of dry air (g/mol) - real(kind=kind_phys),parameter:: con_amd =28.9644 !< molecular wght of dry air (\f$g/mol\f$) - real(kind=kind_phys),parameter:: con_amw =18.0154 !< molecular wght of water vapor (\f$g/mol\f$) - real(kind=kind_phys),parameter:: con_amo3 =47.9982 !< molecular wght of o3 (\f$g/mol\f$) -! real(kind=kind_phys),parameter:: con_amo3 =48.0 !< molecular wght of o3 (g/mol) - real(kind=kind_phys),parameter:: con_amco2 =44.011 !< molecular wght of co2 (\f$g/mol\f$) - real(kind=kind_phys),parameter:: con_amo2 =31.9999 !< molecular wght of o2 (\f$g/mol\f$) - real(kind=kind_phys),parameter:: con_amch4 =16.043 !< molecular wght of ch4 (\f$g/mol\f$) - real(kind=kind_phys),parameter:: con_amn2o =44.013 !< molecular wght of n2o (\f$g/mol\f$) - real(kind=kind_phys),parameter:: con_thgni =-38.15 !< temperature the H.G.Nuc. ice starts - real(kind=kind_phys),parameter:: cimin =0.15 !< minimum ice concentration + real(kind=kind_phys),parameter:: con_c =2.99792458e+8_kind_phys !< speed of light (\f$m/s\f$) + real(kind=kind_phys),parameter:: con_plnk =6.6260693e-34_kind_phys !< planck constant (\f$J/s\f$) + real(kind=kind_phys),parameter:: con_boltz =1.3806505e-23_kind_phys !< boltzmann constant (\f$J/K\f$) + real(kind=kind_phys),parameter:: con_sbc =5.670400e-8_kind_phys !< stefan-boltzmann (\f$W/m^{2}/K^{4}\f$) + real(kind=kind_phys),parameter:: con_avgd =6.0221415e23_kind_phys !< avogadro constant (\f$mol^{-1}\f$) + real(kind=kind_phys),parameter:: con_gasv =22413.996e-6_kind_phys !< vol of ideal gas at 273.15K, 101.325kPa (\f$m^{3}/mol\f$) +! real(kind=kind_phys),parameter:: con_amd =28.970_kind_phys !< molecular wght of dry air (g/mol) + real(kind=kind_phys),parameter:: con_amd =28.9644_kind_phys !< molecular wght of dry air (\f$g/mol\f$) + real(kind=kind_phys),parameter:: con_amw =18.0154_kind_phys !< molecular wght of water vapor (\f$g/mol\f$) + real(kind=kind_phys),parameter:: con_amo3 =47.9982_kind_phys !< molecular wght of o3 (\f$g/mol\f$) +! real(kind=kind_phys),parameter:: con_amo3 =48.0_kind_phys !< molecular wght of o3 (g/mol) + real(kind=kind_phys),parameter:: con_amco2 =44.011_kind_phys !< molecular wght of co2 (\f$g/mol\f$) + real(kind=kind_phys),parameter:: con_amo2 =31.9999_kind_phys !< molecular wght of o2 (\f$g/mol\f$) + real(kind=kind_phys),parameter:: con_amch4 =16.043_kind_phys !< molecular wght of ch4 (\f$g/mol\f$) + real(kind=kind_phys),parameter:: con_amn2o =44.013_kind_phys !< molecular wght of n2o (\f$g/mol\f$) + real(kind=kind_phys),parameter:: con_thgni =-38.15_kind_phys !< temperature the H.G.Nuc. ice starts + + real(kind=kind_phys),parameter:: cimin =0.15 !< minimum ice concentration !> \name Miscellaneous physics related constants (For WSM6; Moorthi - Jul 2014) ! integer, parameter :: max_lon=16000, max_lat=8000, min_lon=192, min_lat=94 @@ -123,12 +126,12 @@ module physcons ! real(kind=kind_phys), parameter:: rlapse = 0.65e-2, rhc_max = 0.9999999 ! new ! real(kind=kind_phys), parameter:: rlapse = 0.65e-2, rhc_max = 0.9900 - real(kind=kind_phys), parameter:: rlapse = 0.65e-2 - real(kind=kind_phys), parameter:: cb2mb = 10.0, pa2mb = 0.01 + real(kind=kind_phys), parameter:: rlapse = 0.65e-2_kind_phys + real(kind=kind_phys), parameter:: cb2mb = 10.0_kind_phys, pa2mb = 0.01_kind_phys ! for wsm6 - real(kind=kind_phys),parameter:: rhowater = 1000. !< density of water (kg/m^3) - real(kind=kind_phys),parameter:: rhosnow = 100. !< density of snow (kg/m^3) - real(kind=kind_phys),parameter:: rhoair = 1.28 !< density of air near surface (kg/m^3) + real(kind=kind_phys),parameter:: rhowater = 1000._kind_phys !< density of water (kg/m^3) + real(kind=kind_phys),parameter:: rhosnow = 100._kind_phys !< density of snow (kg/m^3) + real(kind=kind_phys),parameter:: rhoair = 1.28_kind_phys !< density of air near surface (kg/m^3) !........................................! end module physcons ! diff --git a/physics/radiation_astronomy.f b/physics/radiation_astronomy.f index 8a788b257..f1651ca84 100644 --- a/physics/radiation_astronomy.f +++ b/physics/radiation_astronomy.f @@ -611,7 +611,7 @@ subroutine sol_update & ! --- ... setting up calculation parameters used by subr coszmn - nswr = nint(deltsw / deltim) ! number of mdl t-step per sw call + nswr = max(1, nint(deltsw/deltim)) ! number of mdl t-step per sw call dtswh = deltsw / f3600 ! time length in hours ! if ( deltsw >= f3600 ) then ! for longer sw call interval @@ -624,7 +624,7 @@ subroutine sol_update & ! anginc = pid12 * dtswh / float(nstp-1) ! solar angle inc during each calc step - nstp = nswr + nstp = max(6, nswr) anginc = pid12 * dtswh / float(nstp) if ( me == 0 ) then @@ -870,7 +870,7 @@ subroutine coszmn & real (kind=kind_phys), intent(out) :: coszen(:), coszdg(:) ! --- locals: - real (kind=kind_phys) :: coszn, cns, ss, cc, solang, rstp + real (kind=kind_phys) :: coszn, cns, solang, rstp integer :: istsun(IM), i, it, j, lat @@ -886,12 +886,9 @@ subroutine coszmn & do it = 1, nstp cns = solang + (float(it)-0.5)*anginc + sollag - do i = 1, IM - ss = sinlat(i) * sindec - cc = coslat(i) * cosdec - - coszn = ss + cc * cos(cns + xlon(i)) + coszn = sindec * sinlat(i) + cosdec * coslat(i) & + & * cos(cns+xlon(i)) coszen(i) = coszen(i) + max(0.0, coszn) if (coszn > czlimt) istsun(i) = istsun(i) + 1 enddo diff --git a/physics/radiation_clouds.f b/physics/radiation_clouds.f index 5fa31a670..506723ff1 100644 --- a/physics/radiation_clouds.f +++ b/physics/radiation_clouds.f @@ -2741,26 +2741,27 @@ subroutine progclduni & ! ==================== definition of variables ==================== ! ! ! ! input variables: ! -! plyr (IX,NLAY) : model layer mean pressure in mb (100Pa) ! -! plvl (IX,NLP1) : model level pressure in mb (100Pa) ! -! tlyr (IX,NLAY) : model layer mean temperature in k ! -! tvly (IX,NLAY) : model layer virtual temperature in k ! -! ccnd (IX,NLAY) : layer cloud condensate amount ! -! ncnd : number of layer cloud condensate types ! -! xlat (IX) : grid latitude in radians, default to pi/2 -> -pi/2! -! range, otherwise see in-line comment ! -! xlon (IX) : grid longitude in radians (not used) ! -! slmsk (IX) : sea/land mask array (sea:0,land:1,sea-ice:2) ! -! IX : horizontal dimention ! -! NLAY,NLP1 : vertical layer/level dimensions ! -! cldtot : unified cloud fracrion from moist physics ! -! effrl (ix,nlay) : effective radius for liquid water ! -! effri (ix,nlay) : effective radius for ice water ! -! effrr (ix,nlay) : effective radius for rain water ! -! effrs (ix,nlay) : effective radius for snow water ! -! effr_in : logical - if .true. use input effective radii ! -! dz (ix,nlay) : layer thickness (km) ! -! delp (ix,nlay) : model layer pressure thickness in mb (100Pa) ! +! plyr (IX,NLAY) : model layer mean pressure in mb (100Pa) ! +! plvl (IX,NLP1) : model level pressure in mb (100Pa) ! +! tlyr (IX,NLAY) : model layer mean temperature in k ! +! tvly (IX,NLAY) : model layer virtual temperature in k ! +! ccnd (IX,NLAY,ncnd) : layer cloud condensate amount ! +! water, ice, rain, snow (+ graupel) ! +! ncnd : number of layer cloud condensate types (max of 4) ! +! xlat (IX) : grid latitude in radians, default to pi/2 -> -pi/2! +! range, otherwise see in-line comment ! +! xlon (IX) : grid longitude in radians (not used) ! +! slmsk (IX) : sea/land mask array (sea:0,land:1,sea-ice:2) ! +! IX : horizontal dimention ! +! NLAY,NLP1 : vertical layer/level dimensions ! +! cldtot : unified cloud fracrion from moist physics ! +! effrl (ix,nlay) : effective radius for liquid water ! +! effri (ix,nlay) : effective radius for ice water ! +! effrr (ix,nlay) : effective radius for rain water ! +! effrs (ix,nlay) : effective radius for snow water ! +! effr_in : logical - if .true. use input effective radii ! +! dz (ix,nlay) : layer thickness (km) ! +! delp (ix,nlay) : model layer pressure thickness in mb (100Pa) ! ! ! ! output variables: ! ! clouds(IX,NLAY,NF_CLDS) : cloud profiles ! @@ -2818,7 +2819,7 @@ subroutine progclduni & ! --- local variables: real (kind=kind_phys), dimension(IX,NLAY) :: cldcnv, cwp, cip, & - & crp, csp, rew, rei, res, rer, tem2d + & crp, csp, rew, rei, res, rer real (kind=kind_phys), dimension(IX,NLAY,ncnd) :: cndf real (kind=kind_phys) :: ptop1(IX,NK_CLDS+1), rxlat(ix) @@ -2830,47 +2831,23 @@ subroutine progclduni & ! !===> ... begin here ! - do nf=1,nf_clds - do k=1,nlay - do i=1,ix - clouds(i,k,nf) = 0.0 - enddo +! do nf=1,nf_clds +! do k=1,nlay +! do i=1,ix +! clouds(i,k,nf) = 0.0 +! enddo +! enddo +! enddo +! + do k = 1, NLAY + do i = 1, IX + cldcnv(i,k) = 0.0 + cwp(i,k) = 0.0 + cip(i,k) = 0.0 + crp(i,k) = 0.0 + csp(i,k) = 0.0 enddo enddo -! clouds(:,:,:) = 0.0 - - if (effr_in) then - do k = 1, NLAY - do i = 1, IX - cldcnv(i,k) = 0.0 - cwp (i,k) = 0.0 - cip (i,k) = 0.0 - crp (i,k) = 0.0 - csp (i,k) = 0.0 - rew (i,k) = effrl (i,k) - rei (i,k) = max(10.0, min(150.0,effri (i,k))) - rer (i,k) = effrr (i,k) - res (i,k) = effrs (i,k) - tem2d (i,k) = min( 1.0, max( 0.0,(con_ttp-tlyr(i,k))*0.05)) - enddo - enddo - else - do k = 1, NLAY - do i = 1, IX - cldcnv(i,k) = 0.0 - cwp (i,k) = 0.0 - cip (i,k) = 0.0 - crp (i,k) = 0.0 - csp (i,k) = 0.0 - rew (i,k) = reliq_def ! default liq radius to 10 micron - rei (i,k) = reice_def ! default ice radius to 50 micron - rer (i,k) = rrain_def ! default rain radius to 1000 micron - res (i,k) = rsnow_def ! default snow radius to 250 micron - tem2d (i,k) = min(1.0, max(0.0, (con_ttp-tlyr(i,k))*0.05)) - enddo - enddo - endif -! do n=1,ncnd do k = 1, NLAY do i = 1, IX @@ -2878,7 +2855,7 @@ subroutine progclduni & enddo enddo enddo - if ( lcrick ) then + if ( lcrick ) then ! vertical smoorthing do n=1,ncnd do i = 1, IX cndf(i,1,n) = 0.75*ccnd(i,1,n) + 0.25*ccnd(i,2,n) @@ -2893,54 +2870,25 @@ subroutine progclduni & enddo endif -!> - Find top pressure for each cloud domain for given latitude. -! ptopc(k,i): top presure of each cld domain (k=1-4 are sfc,L,m,h; -! --- i=1,2 are low-lat (<45 degree) and pole regions) - - do i =1, IX - rxlat(i) = abs( xlat(i) / con_pi ) ! if xlat in pi/2 -> -pi/2 range -! rxlat(i) = abs(0.5 - xlat(i)/con_pi) ! if xlat in 0 -> pi range - enddo - - do id = 1, 4 - tem1 = ptopc(id,2) - ptopc(id,1) - - do i =1, IX - ptop1(i,id) = ptopc(id,1) + tem1*max( 0.0, 4.0*rxlat(i)-1.0 ) - enddo - enddo - !> -# Compute cloud liquid/ice condensate path in \f$ g/m^2 \f$ . - if (ncnd == 2) then - do k = 1, NLAY - do i = 1, IX - tem1 = gfac * delp(i,k) - cwp(i,k) = cndf(i,k,1) * tem1 - cip(i,k) = cndf(i,k,2) * tem1 - enddo + if (ncnd == 2) then + do k = 1, NLAY + do i = 1, IX + tem1 = gfac * delp(i,k) + cwp(i,k) = cndf(i,k,1) * tem1 + cip(i,k) = cndf(i,k,2) * tem1 enddo - elseif (ncnd == 4 .or. ncnd == 5) then - do k = 1, NLAY - do i = 1, IX - tem1 = gfac * delp(i,k) - cwp(i,k) = cndf(i,k,1) * tem1 - cip(i,k) = cndf(i,k,2) * tem1 - crp(i,k) = cndf(i,k,3) * tem1 - csp(i,k) = cndf(i,k,4) * tem1 - enddo + enddo + elseif (ncnd == 4) then + do k = 1, NLAY + do i = 1, IX + tem1 = gfac * delp(i,k) + cwp(i,k) = cndf(i,k,1) * tem1 + cip(i,k) = cndf(i,k,2) * tem1 + crp(i,k) = cndf(i,k,3) * tem1 + csp(i,k) = cndf(i,k,4) * tem1 enddo - endif - -!> -# Compute effective liquid cloud droplet radius over land. - - if(.not. effr_in) then - do i = 1, IX - if (nint(slmsk(i)) == 1) then - do k = 1, NLAY - rew(i,k) = 5.0 + 5.0 * tem2d(i,k) - enddo - endif enddo endif @@ -2969,10 +2917,39 @@ subroutine progclduni & enddo endif -!> - Compute effective ice cloud droplet radius following -!! Heymsfield and McFarquhar (1996) \cite heymsfield_and_mcfarquhar_1996. +! assign/calculate efective radii for cloud water, ice, rain, snow + + if (effr_in) then + do k = 1, NLAY + do i = 1, IX + rew(i,k) = effrl (i,k) + rei(i,k) = max(10.0, min(150.0,effri (i,k))) + rer(i,k) = effrr (i,k) + res(i,k) = effrs (i,k) + enddo + enddo + else + do k = 1, NLAY + do i = 1, IX + rew(i,k) = reliq_def ! default liq radius to 10 micron + rei(i,k) = reice_def ! default ice radius to 50 micron + rer(i,k) = rrain_def ! default rain radius to 1000 micron + res(i,k) = rsnow_def ! default snow radius to 250 micron + enddo + enddo +!> -# Compute effective liquid cloud droplet radius over land. + do i = 1, IX + if (nint(slmsk(i)) == 1) then + do k = 1, NLAY + tem1 = min(1.0, max(0.0, (con_ttp-tlyr(i,k))*0.05)) + rew(i,k) = 5.0 + 5.0 * tem1 + enddo + endif + enddo + +!> -# Compute effective ice cloud droplet radius following Heymsfield +!! and McFarquhar (1996) \cite heymsfield_and_mcfarquhar_1996. - if(.not. effr_in) then do k = 1, NLAY do i = 1, IX tem2 = tlyr(i,k) - con_ttp @@ -2997,7 +2974,6 @@ subroutine progclduni & enddo enddo endif - ! do k = 1, NLAY do i = 1, IX @@ -3013,8 +2989,24 @@ subroutine progclduni & enddo enddo -! --- ... estimate clouds decorrelation length in km -! this is only a tentative test, need to consider change later +!> -# Find top pressure for each cloud domain for given latitude. +! ptopc(k,i): top presure of each cld domain (k=1-4 are sfc,L,m,h; +! --- i=1,2 are low-lat (<45 degree) and pole regions) + + do i =1, IX + rxlat(i) = abs( xlat(i) / con_pi ) ! if xlat in pi/2 -> -pi/2 range +! rxlat(i) = abs(0.5 - xlat(i)/con_pi) ! if xlat in 0 -> pi range + enddo + + do id = 1, 4 + tem1 = ptopc(id,2) - ptopc(id,1) + do i =1, IX + ptop1(i,id) = ptopc(id,1) + tem1*max( 0.0, 4.0*rxlat(i)-1.0 ) + enddo + enddo + +!> -# Estimate clouds decorrelation length in km +! this is only a tentative test, need to consider change later if ( iovr == 3 ) then do i = 1, ix diff --git a/physics/samfdeepcnv.f b/physics/samfdeepcnv.f index 4577d96d3..d4b48af35 100644 --- a/physics/samfdeepcnv.f +++ b/physics/samfdeepcnv.f @@ -104,7 +104,7 @@ end subroutine samfdeepcnv_finalize !! | cnv_ndrop | number_concentration_of_cloud_liquid_water_particles_for_detrainment | droplet number concentration in convective detrainment | m-3 | 2 | real | kind_phys | inout | F | !! | cnv_nice | number_concentration_of_ice_crystals_for_detrainment | crystal number concentration in convective detrainment | m-3 | 2 | real | kind_phys | inout | F | !! | mp_phys | flag_for_microphysics_scheme | choice of microphysics scheme | flag | 0 | integer | | in | F | -!! | mp_phys_mg | flag_for_morrison_gettelman_microphysics_scheme | choice of Morrison-Gettelman rmicrophysics scheme | flag | 0 | integer | | in | F | +!! | mp_phys_mg | flag_for_morrison_gettelman_microphysics_scheme | choice of Morrison-Gettelman microphysics scheme | flag | 0 | integer | | in | F | !! | clam | entrainment_rate_coefficient_deep_convection | entrainment rate coefficient for deep conv. | none | 0 | real | kind_phys | in | F | !! | c0s | rain_conversion_parameter_deep_convection | convective rain conversion parameter for deep conv. | m-1 | 0 | real | kind_phys | in | F | !! | c1 | detrainment_conversion_parameter_deep_convection | convective detrainment conversion parameter for deep conv. | m-1 | 0 | real | kind_phys | in | F | diff --git a/physics/samfshalcnv.f b/physics/samfshalcnv.f index de64cf211..183467d4b 100644 --- a/physics/samfshalcnv.f +++ b/physics/samfshalcnv.f @@ -1880,7 +1880,6 @@ subroutine samfshalcnv_post_run (im, levs, lssav, shcnvcw, frain, character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg - real(kind=kind_phys), dimension(im) :: raincs integer :: i, k ! Initialize CCPP error handling variables @@ -1888,15 +1887,8 @@ subroutine samfshalcnv_post_run (im, levs, lssav, shcnvcw, frain, errflg = 0 do i=1,im - raincs(i) = frain * rain1(i) - rainc(i) = rainc(i) + raincs(i) + rainc(i) = rainc(i) + frain * rain1(i) enddo - if (lssav) then - do i=1,im - cnvprcp(i) = cnvprcp(i) + raincs(i) - cnvprcpb(i) = cnvprcpb(i) + raincs(i) - enddo - endif ! in mfshalcnv, 'cnvw' and 'cnvc' are set to zero before computation starts: if (shcnvcw .and. num_p3d == 4 .and. npdf3d == 3) then do k=1,levs diff --git a/physics/sfc_diag.f b/physics/sfc_diag.f index 86fb9f39b..7200e9231 100644 --- a/physics/sfc_diag.f +++ b/physics/sfc_diag.f @@ -28,6 +28,12 @@ end subroutine sfc_diag_finalize !! | v1 | y_wind_at_lowest_model_layer_updated_by_physics | y component of 1st model layer wind | m s-1 | 1 | real | kind_phys | in | F | !! | t1 | air_temperature_at_lowest_model_layer_updated_by_physics | 1st model layer air temperature | K | 1 | real | kind_phys | in | F | !! | q1 | water_vapor_specific_humidity_at_lowest_model_layer_updated_by_physics | 1st model layer specific humidity | kg kg-1 | 1 | real | kind_phys | in | F | +!! | prslki | ratio_of_exner_function_between_midlayer_and_interface_at_lowest_model_layer | Exner function ratio bt midlayer and interface at 1st layer | ratio | 1 | real | kind_phys | in | F | +!! | evap | kinematic_surface_upward_latent_heat_flux | surface upward evaporation flux | kg kg-1 m s-1 | 1 | real | kind_phys | in | F | +!! | fm | Monin-Obukhov_similarity_function_for_momentum | Monin-Obukhov similarity parameter for momentum | none | 1 | real | kind_phys | in | F | +!! | fh | Monin-Obukhov_similarity_function_for_heat | Monin-Obukhov similarity parameter for heat | none | 1 | real | kind_phys | in | F | +!! | fm10 | Monin-Obukhov_similarity_function_for_momentum_at_10m | Monin-Obukhov similarity parameter for momentum | none | 1 | real | kind_phys | in | F | +!! | fh2 | Monin-Obukhov_similarity_function_for_heat_at_2m | Monin-Obukhov similarity parameter for heat | none | 1 | real | kind_phys | in | F | !! | tskin | surface_skin_temperature | surface skin temperature | K | 1 | real | kind_phys | in | F | !! | qsurf | surface_specific_humidity | surface specific humidity | kg kg-1 | 1 | real | kind_phys | in | F | !! | f10m | ratio_of_wind_at_lowest_model_layer_and_wind_at_10m | ratio of fm10 and fm | ratio | 1 | real | kind_phys | out | F | @@ -35,12 +41,6 @@ end subroutine sfc_diag_finalize !! | v10m | y_wind_at_10m | y component of wind at 10 m | m s-1 | 1 | real | kind_phys | out | F | !! | t2m | temperature_at_2m | temperature at 2 m | K | 1 | real | kind_phys | out | F | !! | q2m | specific_humidity_at_2m | specific humidity at 2 m | kg kg-1 | 1 | real | kind_phys | out | F | -!! | prslki | ratio_of_exner_function_between_midlayer_and_interface_at_lowest_model_layer | Exner function ratio bt midlayer and interface at 1st layer | ratio | 1 | real | kind_phys | in | F | -!! | evap | kinematic_surface_upward_latent_heat_flux | surface upward evaporation flux | kg kg-1 m s-1 | 1 | real | kind_phys | in | F | -!! | fm | Monin-Obukhov_similarity_function_for_momentum | Monin-Obukhov similarity parameter for momentum | none | 1 | real | kind_phys | in | F | -!! | fh | Monin-Obukhov_similarity_function_for_heat | Monin-Obukhov similarity parameter for heat | none | 1 | real | kind_phys | in | F | -!! | fm10 | Monin-Obukhov_similarity_function_for_momentum_at_10m | Monin-Obukhov similarity parameter for momentum | none | 1 | real | kind_phys | in | F | -!! | fh2 | Monin-Obukhov_similarity_function_for_heat_at_2m | Monin-Obukhov similarity parameter for heat | none | 1 | real | kind_phys | in | F | !! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | !! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | !! @@ -48,9 +48,9 @@ end subroutine sfc_diag_finalize !! \section detailed Detailed Algorithm !! @{ subroutine sfc_diag_run & - & (im,grav,cp,eps,epsm1,ps,u1,v1,t1,q1, & - & tskin,qsurf,f10m,u10m,v10m,t2m,q2m, & - & prslki,evap,fm,fh,fm10,fh2,errmsg,errflg & + & (im,grav,cp,eps,epsm1,ps,u1,v1,t1,q1,prslki, & + & evap,fm,fh,fm10,fh2,tskin,qsurf, & + & f10m,u10m,v10m,t2m,q2m,errmsg,errflg & & ) ! use machine , only : kind_phys @@ -70,7 +70,7 @@ subroutine sfc_diag_run & ! locals ! real(kind=kind_phys), parameter :: qmin=1.0e-8 - integer ::k,i + integer :: k,i ! real(kind=kind_phys) :: fhi, qss, wrk ! real(kind=kind_phys) sig2k, fhi, qss diff --git a/physics/sfc_diff.f b/physics/sfc_diff.f index ff503d3b2..5361b6355 100644 --- a/physics/sfc_diff.f +++ b/physics/sfc_diff.f @@ -59,7 +59,6 @@ end subroutine sfc_diff_finalize !! | wet | flag_nonzero_wet_surface_fraction | flag indicating presence of some ocean or lake surface area fraction | flag | 1 | logical | | in | F | !! | dry | flag_nonzero_land_surface_fraction | flag indicating presence of some land surface area fraction | flag | 1 | logical | | in | F | !! | icy | flag_nonzero_sea_ice_surface_fraction | flag indicating presence of some sea ice surface area fraction | flag | 1 | logical | | in | F | -!! | fice | sea_ice_concentration | ice fraction over open water | frac | 1 | real | kind_phys | in | F | !! | tskin_ocn | surface_skin_temperature_over_ocean_interstitial | surface skin temperature over ocean (temporary use as interstitial) | K | 1 | real | kind_phys | in | F | !! | tskin_lnd | surface_skin_temperature_over_land_interstitial | surface skin temperature over land (temporary use as interstitial) | K | 1 | real | kind_phys | in | F | !! | tskin_ice | surface_skin_temperature_over_ice_interstitial | surface skin temperature over ice (temporary use as interstitial) | K | 1 | real | kind_phys | in | F | @@ -135,7 +134,7 @@ subroutine sfc_diff_run (im,rvrdm1,eps,epsm1,grav, & !intent(in) & sigmaf,vegtype,shdmax,ivegsrc, & !intent(in) & z0pert,ztpert, & ! mg, sfc-perts !intent(in) & flag_iter,redrag, & !intent(in) - & wet,dry,icy,fice, & !intent(in) + & wet,dry,icy, & !intent(in) & tskin_ocn, tskin_lnd, tskin_ice, & !intent(in) & tsurf_ocn, tsurf_lnd, tsurf_ice, & !intent(in) & snwdph_ocn,snwdph_lnd,snwdph_ice, & !intent(in) @@ -170,8 +169,7 @@ subroutine sfc_diff_run (im,rvrdm1,eps,epsm1,grav, & !intent(in) real(kind=kind_phys), dimension(im), intent(in) :: & & tskin_ocn, tskin_lnd, tskin_ice, & & tsurf_ocn, tsurf_lnd, tsurf_ice, & - & snwdph_ocn,snwdph_lnd,snwdph_ice, & - & fice + & snwdph_ocn,snwdph_lnd,snwdph_ice real(kind=kind_phys), dimension(im), intent(inout) :: & & z0rl_ocn, z0rl_lnd, z0rl_ice, & @@ -237,24 +235,24 @@ subroutine sfc_diff_run (im,rvrdm1,eps,epsm1,grav, & !intent(in) & + max(0.0, min(ddvel(i), 30.0)), 1.0) tem1 = 1.0 + rvrdm1 * max(q1(i),1.e-8) thv1 = t1(i) * prslki(i) * tem1 - tvs_ocn = 0.5 * (tsurf_ocn(i)+tskin_ocn(i)) * tem1 tvs_lnd = 0.5 * (tsurf_lnd(i)+tskin_lnd(i)) * tem1 tvs_ice = 0.5 * (tsurf_ice(i)+tskin_ice(i)) * tem1 + tvs_ocn = 0.5 * (tsurf_ocn(i)+tskin_ocn(i)) * tem1 qs1 = fpvs(t1(i)) qs1 = max(1.0e-8, eps * qs1 / (prsl1(i) + epsm1 * qs1)) - z0_ocn = 0.01 * z0rl_ocn(i) - z0max_ocn = max(1.0e-6, min(z0_ocn,z1(i))) - z0_lnd = 0.01 * z0rl_lnd(i) - z0max_lnd = max(1.0e-6, min(z0_lnd,z1(i))) - z0_ice = 0.01 * z0rl_ice(i) - z0max_ice = max(1.0e-6, min(z0_ice,z1(i))) + z0_lnd = 0.01 * z0rl_lnd(i) + z0max_lnd = max(1.0e-6, min(z0_lnd,z1(i))) + z0_ice = 0.01 * z0rl_ice(i) + z0max_ice = max(1.0e-6, min(z0_ice,z1(i))) + z0_ocn = 0.01 * z0rl_ocn(i) + z0max_ocn = max(1.0e-6, min(z0_ocn,z1(i))) ! compute stability dependent exchange coefficients ! this portion of the code is presently suppressed ! - if (wet(i) .and. fice(i) < 1.) then ! some open ocean + if (wet(i)) then ! some open ocean ustar_ocn(i) = sqrt(grav * z0_ocn / charnock) !** test xubin's new z0 @@ -346,7 +344,7 @@ subroutine sfc_diff_run (im,rvrdm1,eps,epsm1,grav, & !intent(in) ztmax_ice = max(ztmax_ice,1.0e-6) ! BWG begin "stability" block, 2019-03-23 - if (wet(i) .and. fice(i) < 1.) then ! Some open ocean + if (wet(i)) then ! Some open ocean call stability ! --- inputs: & (z1(i),snwdph_ocn(i),thv1,wind(i), @@ -382,7 +380,7 @@ subroutine sfc_diff_run (im,rvrdm1,eps,epsm1,grav, & !intent(in) ! ! update z0 over ocean ! - if (wet(i) .and. fice(i) < 1.) then + if (wet(i)) then z0_ocn = (charnock / grav) * ustar_ocn(i) * ustar_ocn(i) ! mbek -- toga-coare flux algorithm diff --git a/physics/sfc_drv.f b/physics/sfc_drv.f index 51ed2fe98..ffe47ee17 100644 --- a/physics/sfc_drv.f +++ b/physics/sfc_drv.f @@ -514,13 +514,12 @@ subroutine lsm_noah_run & !! 0.5 and the perturbations go to zero as vegetation fraction approaches its upper !! or lower bound. vegfp = vegfpert(i) ! sfc-perts, mgehne - ! sfc perts, mgehne if (pertvegf(1)>0.0) then ! compute beta distribution parameters for vegetation fraction mv = shdfac sv = pertvegf(1)*mv*(1.-mv) - alphav = mv*mv*(1.-mv)/(sv*sv)-mv - betav = alphav*(1.-mv)/mv + alphav = mv*mv*(1.0-mv)/(sv*sv)-mv + betav = alphav*(1.0-mv)/mv ! compute beta distribution value corresponding ! to the given percentile albPpert to use as new albedo call ppfbet(vegfp,alphav,betav,iflag,vegftmp) diff --git a/physics/sfc_drv_ruc.F90 b/physics/sfc_drv_ruc.F90 index f7899a75d..3b0e64637 100644 --- a/physics/sfc_drv_ruc.F90 +++ b/physics/sfc_drv_ruc.F90 @@ -189,8 +189,8 @@ end subroutine lsm_ruc_finalize !! | snet | surface_net_downwelling_shortwave_flux | surface net downwelling shortwave flux at current time | W m-2 | 1 | real | kind_phys | in | F | !! | sfcemis | surface_longwave_emissivity | surface lw emissivity in fraction | frac | 1 | real | kind_phys | inout | F | !! | wspd | wind_speed_at_lowest_model_layer | wind speed at lowest model level | m s-1 | 1 | real | kind_phys | inout | F | -!! | cm | surface_drag_coefficient_for_momentum_in_air | surface exchange coeff for momentum | none | 1 | real | kind_phys | in | F | -!! | ch | surface_drag_coefficient_for_heat_and_moisture_in_air | surface exchange coeff heat & moisture | none | 1 | real | kind_phys | in | F | +!! | cm | surface_drag_coefficient_for_momentum_in_air_over_land | surface exchange coeff for momentum over land | none | 1 | real | kind_phys | in | F | +!! | ch | surface_drag_coefficient_for_heat_and_moisture_in_air_over_land | surface exchange coeff heat & moisture over land | none | 1 | real | kind_phys | in | F | !! | chh | surface_drag_mass_flux_for_heat_and_moisture_in_air_over_land | thermal exchange coefficient over land | kg m-2 s-1 | 1 | real | kind_phys | inout | F | !! | cmm | surface_drag_wind_speed_for_momentum_in_air_over_land | momentum exchange coefficient over land | m s-1 | 1 | real | kind_phys | inout | F | !! | wet1 | normalized_soil_wetness | normalized soil wetness | frac | 1 | real | kind_phys | inout | F | @@ -222,9 +222,9 @@ end subroutine lsm_ruc_finalize !! | smfrkeep | volume_fraction_of_frozen_soil_moisture_for_land_surface_model | volume fraction of frozen soil moisture for lsm | frac | 2 | real | kind_phys | inout | F | !! | tslb | soil_temperature_for_land_surface_model | soil temperature for land surface model | K | 2 | real | kind_phys | inout | F | !! | stm | soil_moisture_content | soil moisture content | kg m-2 | 1 | real | kind_phys | inout | F | -!! | tskin | surface_skin_temperature_over_land_interstitial | surface skin temperature over land (temporary use as interstitial)| K | 1 | real | kind_phys | inout | F | +!! | tskin | surface_skin_temperature_over_land_interstitial | surface skin temperature over land use as interstitial | K | 1 | real | kind_phys | inout | F | !! | tsurf | surface_skin_temperature_after_iteration_over_land | surface skin temperature after iteration over land | K | 1 | real | kind_phys | inout | F | -!! | tice | sea_ice_temperature | sea ice surface skin temperature | K | 1 | real | kind_phys | inout | F | +!! | tice | sea_ice_temperature_interstitial | sea ice surface skin temperature use as interstitial | K | 1 | real | kind_phys | inout | F | !! | tsnow | snow_temperature_bottom_first_layer | snow temperature at the bottom of first snow layer | K | 1 | real | kind_phys | inout | F | !! | snowfallac | total_accumulated_snowfall | run-total snow accumulation on the ground | kg m-2 | 1 | real | kind_phys | inout | F | !! | acsnow | accumulated_water_equivalent_of_frozen_precip | snow water equivalent of run-total frozen precip | kg m-2 | 1 | real | kind_phys | inout | F | @@ -1069,12 +1069,6 @@ subroutine lsm_ruc_run & ! --- inpu smfrkeep(i,k) = smfrsoil(i,k,j) enddo - !do k = 1, lsoil - ! smc(i,k) = smsoil(i,k,j) - ! slc(i,k) = slsoil(i,k,j) - ! stc(i,k) = stsoil(i,k,j) - !enddo - ! --- ... do not return the following output fields to parent model ! ec - canopy water evaporation (m s-1) ! edir - direct soil evaporation (m s-1) @@ -1139,6 +1133,17 @@ subroutine lsm_ruc_run & ! --- inpu deallocate(soilctop) deallocate(landusef) ! + ! Update standard (Noah LSM) soil variables for physics + ! that require these variables (e.g. sfc_sice), independent + ! of whether it is a land point or not + do i = 1, im + do k = 1, lsoil + smc(i,k) = smois(i,k) + slc(i,k) = sh2o(i,k) + stc(i,k) = tslb(i,k) + enddo + enddo + return !................................... end subroutine lsm_ruc_run diff --git a/physics/sfc_nst.f b/physics/sfc_nst.f index a0e60f380..1e2eeb3e0 100644 --- a/physics/sfc_nst.f +++ b/physics/sfc_nst.f @@ -165,8 +165,8 @@ subroutine sfc_nst_run & ! ch - real, surface exchange coeff heat & moisture(m/s) im ! ! prsl1 - real, surface layer mean pressure (pa) im ! ! prslki - real, im ! -! wet - logical, =T if any ocn/lak water (F otherwise) im ! -! icy - logical, =T if "enough" ice (F otherwise) im ! +! wet - logical, =T if any ocn/lake water (F otherwise) im ! +! icy - logical, =T if any ice im ! ! xlon - real, longitude (radians) im ! ! sinlat - real, sin of latitude im ! ! stress - real, wind stress (n/m**2) im ! @@ -620,8 +620,8 @@ subroutine sfc_nst_run & & zsea1,zsea2,dtz) tsurf(i) = max(271.2, tref(i) + dtz ) - if (lprnt .and. i == ipr) print *,' tsurf=',tsurf(i),' tref=', - &tref(i),' xz=',xz(i),' dt_cool=',dt_cool(i) +! if (lprnt .and. i == ipr) print *,' tsurf=',tsurf(i),' tref=', +! &tref(i),' xz=',xz(i),' dt_cool=',dt_cool(i) !> - Call cal_w() to calculate \a w_0 and \a w_d. if ( xt(i) > 0.0 ) then @@ -667,9 +667,9 @@ subroutine sfc_nst_run & ! if ( nstf_name1 > 1 ) then tskin(i) = tsurf(i) - endif ! if ( nstf_name1 > 1 then - endif ! if(flag_guess(i)) then - endif ! if(wet(i) .and. .not.icy(i)) then + endif ! if nstf_name1 > 1 + endif ! if flag_guess(i) + endif ! if wet(i) .and. .not.icy(i) enddo ! if (lprnt .and. i == ipr) print *,' beg xz8=',xz(i) @@ -799,21 +799,6 @@ subroutine sfc_nst_pre_run errmsg = '' errflg = 0 - do i=1,im - if(icy(i)) then - zorl_ocn(i) = zorl_ice(i) - cd_ocn(i) = cd_ice(i) - cdq_ocn(i) = cdq_ice(i) - rb_ocn(i) = rb_ice(i) - stress_ocn(i) = stress_ice(i) - ffmm_ocn(i) = ffmm_ice(i) - ffhh_ocn(i) = ffhh_ice(i) - uustar_ocn(i) = uustar_ice(i) - fm10_ocn(i) = fm10_ice(i) - fh2_ocn(i) = fh2_ice(i) - endif - enddo - do i=1,im if (wet(i) .and. .not. icy(i)) then tem = (oro(i)-oro_uf(i)) * rlapse @@ -923,7 +908,7 @@ subroutine sfc_nst_post_run & do i = 1, im if (wet(i) .and. .not. icy(i)) then - tsurf_ocn(i) = tsurf_ocn(i) - (oro(i)-oro_uf(i)) * rlapse + tsurf_ocn(i) = tsurf_ocn(i) - (oro(i)-oro_uf(i)) * rlapse endif enddo @@ -938,7 +923,7 @@ subroutine sfc_nst_post_run & & im, 1, dtzm) do i = 1, im if ( wet(i) .and. .not. icy(i) ) then - tsfc_ocn(i) = max(271.2,tref(i) + dtzm(i)) - & + tsfc_ocn(i) = max(271.2,tref(i) + dtzm(i)) - & & (oro(i)-oro_uf(i))*rlapse endif enddo diff --git a/physics/sfc_ocean.F b/physics/sfc_ocean.F index a0a835555..e5cb95232 100644 --- a/physics/sfc_ocean.F +++ b/physics/sfc_ocean.F @@ -37,7 +37,6 @@ end subroutine sfc_ocean_finalize !! | prsl1 | air_pressure_at_lowest_model_layer | surface layer mean pressure | Pa | 1 | real | kind_phys | in | F | !! | prslki | ratio_of_exner_function_between_midlayer_and_interface_at_lowest_model_layer | Exner function ratio bt midlayer and interface at 1st layer | ratio | 1 | real | kind_phys | in | F | !! | wet | flag_nonzero_wet_surface_fraction | flag indicating presence of some ocean or lake surface area fraction | flag | 1 | logical | | in | F | -!! | fice | sea_ice_concentration | ice fraction over open water | frac | 1 | real | kind_phys | in | F | !! | ddvel | surface_wind_enhancement_due_to_convection | wind enhancement due to convection | m s-1 | 1 | real | kind_phys | in | F | !! | flag_iter | flag_for_iteration | flag for iteration | flag | 1 | logical | | in | F | !! | qsurf | surface_specific_humidity_over_ocean | surface air saturation specific humidity over ocean | kg kg-1 | 1 | real | kind_phys | inout | F | @@ -55,7 +54,7 @@ subroutine sfc_ocean_run & !................................... ! --- inputs: & ( im, cp, rd, eps, epsm1, hvap, rvrdm1, ps, u1, v1, t1, q1, & - & tskin, cm, ch, prsl1, prslki, wet, fice, ddvel, & + & tskin, cm, ch, prsl1, prslki, wet, ddvel, & & flag_iter, & ! --- outputs: & qsurf, cmm, chh, gflux, evap, hflx, ep, & @@ -70,7 +69,7 @@ subroutine sfc_ocean_run & ! call sfc_ocean ! ! inputs: ! ! ( im, ps, u1, v1, t1, q1, tskin, cm, ch, ! -! prsl1, prslki, wet, fice, ddvel, flag_iter, ! +! prsl1, prslki, wet, ddvel, flag_iter, ! ! outputs: ! ! qsurf, cmm, chh, gflux, evap, hflx, ep ) ! ! ! @@ -102,7 +101,6 @@ subroutine sfc_ocean_run & ! prsl1 - real, surface layer mean pressure im ! ! prslki - real, im ! ! wet - logical, =T if any ocean/lak, =F otherwise im ! -! fice - real, ice fraction im ! ! ddvel - real, wind enhancement due to convection (m/s) im ! ! flag_iter- logical, im ! ! ! @@ -128,7 +126,7 @@ subroutine sfc_ocean_run & & rvrdm1 real (kind=kind_phys), dimension(im), intent(in) :: ps, u1, v1, & - & t1, q1, tskin, cm, ch, prsl1, prslki, ddvel, fice + & t1, q1, tskin, cm, ch, prsl1, prslki, ddvel logical, dimension(im), intent(in) :: flag_iter, wet @@ -159,7 +157,7 @@ subroutine sfc_ocean_run & ! ! --- ... flag for open water do i = 1, im - flag(i) = (wet(i) .and. fice(i)<1. .and. flag_iter(i)) + flag(i) = (wet(i) .and. flag_iter(i)) ! --- ... initialize variables. all units are supposedly m.k.s. unless specified ! ps is in pascals, wind is wind speed, diff --git a/physics/sfc_sice.f b/physics/sfc_sice.f index 19b05f789..58f1c0549 100644 --- a/physics/sfc_sice.f +++ b/physics/sfc_sice.f @@ -1,82 +1,6 @@ !> \file sfc_sice.f !! This file contains the GFS three level thermodynamic sea ice model. -!> This module comtains the CCPP-compliant GFS sea ice post interstitial codes, which returns -!! updated ice thickness and concentration to global arrays -!! where there is no ice, and set temperature to surface skin temperature. - module sfc_sice_post - - contains - -!! \section arg_table_sfc_sice_post_init Argument Table -!! - subroutine sfc_sice_post_init - end subroutine sfc_sice_post_init - -!! \section arg_table_sfc_sice_post_finalize Argument Table -!! - subroutine sfc_sice_post_finalize - end subroutine sfc_sice_post_finalize - -!! \section arg_table_sfc_sice_post_run Argument Table -!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | -!! |----------------|-------------------------------------------------------|---------------------------------------------------|-------|------|-----------|-----------|--------|----------| -!! | im | horizontal_loop_extent | horizontal loop extent | count | 0 | integer | | in | F | -!! | cplflx | flag_for_flux_coupling | flag controlling cplflx collection (default off) | flag | 0 | logical | | in | F | -!! | islmsk | sea_land_ice_mask | sea/land/ice mask (=0/1/2) | flag | 1 | integer | | in | F | -!! | tice | sea_ice_temperature_interstitial | sea-ice surface temperature use as interstitial | K | 1 | real | kind_phys | in | F | -!! | tsfc | surface_skin_temperature | surface skin temperature | K | 1 | real | kind_phys | in | F | -!! | fice | sea_ice_concentration | sea-ice concentration [0,1] | frac | 1 | real | kind_phys | inout | F | -!! | hice | sea_ice_thickness | sea-ice thickness | m | 1 | real | kind_phys | inout | F | -!! | tisfc | sea_ice_temperature | sea-ice surface temperature | K | 1 | real | kind_phys | inout | F | -!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | -!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | -!! - subroutine sfc_sice_post_run(im, cplflx, islmsk, tice, tsfc, & - & fice, hice, tisfc, errmsg, errflg) - - use machine, only : kind_phys - - implicit none - -! --- input - integer, intent(in) :: im - logical, intent(in) :: cplflx - integer, dimension(im), intent(in) :: islmsk - real(kind=kind_phys), dimension(im), intent(in) :: tice, tsfc - -! --- input/output - real(kind=kind_phys), dimension(im), intent(inout) :: fice, hice, & - & tisfc - - character(len=*), intent(out) :: errmsg - integer, intent(out) :: errflg - -! --- locals - integer :: i - - ! Initialize CCPP error handling variables - errmsg = '' - errflg = 0 - -!--- return updated ice thickness & concentration to global arrays -! where there is no ice, set temperature to surface skin temperature. - if(.not. cplflx) then - do i = 1, im - if (islmsk(i) == 2) then - tisfc(i) = tice(i) - else - hice(i) = 0.0 - fice(i) = 0.0 - tisfc(i) = tsfc(i) - endif - enddo - endif - - end subroutine sfc_sice_post_run - - end module sfc_sice_post - !> This module contains the CCPP-compliant GFS sea ice scheme. module sfc_sice @@ -124,8 +48,6 @@ end subroutine sfc_sice_finalize !! | islimsk | sea_land_ice_mask | sea/land/ice mask (=0/1/2) | flag | 1 | integer | | in | F | !! | ddvel | surface_wind_enhancement_due_to_convection | wind enhancement due to convection | m s-1 | 1 | real | kind_phys | in | F | !! | flag_iter | flag_for_iteration | flag for iteration | flag | 1 | logical | | in | F | -!! | mom4ice | flag_for_mom4_coupling | flag for Mom4 coupling | flag | 0 | logical | | in | F | -!! | lsm | flag_for_land_surface_scheme | flag for land sfc scheme =0: osu; =1: noah | flag | 0 | integer | | in | F | !! | lprnt | flag_print | switch for printing sample column to stdout | flag | 0 | logical | | in | F | !! | ipr | horizontal_index_of_printed_column | horizontal index of printed column | index | 0 | integer | | in | F | !! | hice | sea_ice_thickness | sea-ice thickness | m | 1 | real | kind_phys | inout | F | @@ -174,7 +96,7 @@ subroutine sfc_sice_run & & t0c, rd, cimin, ps, u1, v1, t1, q1, delt, & & sfcemis, dlwflx, sfcnsw, sfcdsw, srflag, & & cm, ch, prsl1, prslki, islimsk, ddvel, & - & flag_iter, mom4ice, lsm, lprnt, ipr, & + & flag_iter, lprnt, ipr, & & hice, fice, tice, weasd, tskin, tprcp, stc, ep, & ! --- input/outputs: & snwdph, qsurf, snowmt, gflux, cmm, chh, evap, hflx, & ! --- outputs: & errmsg, errflg @@ -190,7 +112,7 @@ subroutine sfc_sice_run & ! ( im, km, ps, u1, v1, t1, q1, delt, ! ! sfcemis, dlwflx, sfcnsw, sfcdsw, srflag, ! ! cm, ch, prsl1, prslki, islimsk, ddvel, ! -! flag_iter, mom4ice, lsm, ! +! flag_iter, ! ! input/outputs: ! ! hice, fice, tice, weasd, tskin, tprcp, stc, ep, ! ! outputs: ! @@ -203,7 +125,8 @@ subroutine sfc_sice_run & !! two-layer ice model !!- 200x -- sarah lu added flag_iter !!- oct 2006 -- h. wei added cmm and chh to output -!!- 2007 -- x. wu modified for mom4 coupling (i.e. mom4ice) +!!- 2007 -- x. wu modified for mom4 coupling (i.e. cpldice) +!! (not used anymore) !!- 2007 -- s. moorthi micellaneous changes !!- may 2009 -- y.-t. hou modified to include surface emissivity !! effect on lw radiation. replaced the confusing @@ -236,9 +159,6 @@ subroutine sfc_sice_run & ! islimsk - integer, sea/land/ice mask (=0/1/2) im ! ! ddvel - real, im ! ! flag_iter- logical, im ! -! mom4ice - logical, im ! -! lsm - integer, flag for land surface model scheme 1 ! -! =0: use osu scheme; =1: use noah scheme ! ! ! ! input/outputs: ! ! hice - real, sea-ice thickness im ! @@ -268,16 +188,17 @@ subroutine sfc_sice_run & implicit none ! ! - Define constant parameters - integer, parameter :: kmi = 2 !< 2-layer of ice - real(kind=kind_phys), parameter :: himax = 8.0 !< maximum ice thickness allowed - real(kind=kind_phys), parameter :: himin = 0.1 !< minimum ice thickness required - real(kind=kind_phys), parameter :: hsmax = 2.0 !< maximum snow depth allowed - real(kind=kind_phys), parameter :: timin = 173.0 !< minimum temperature allowed for snow/ice - real(kind=kind_phys), parameter :: albfw = 0.06 !< albedo for lead - real(kind=kind_phys), parameter :: dsi = 1.0/0.33 + integer, parameter :: kmi = 2 !< 2-layer of ice + real(kind=kind_phys), parameter :: zero = 0.0d0, one = 1.0d0 + real(kind=kind_phys), parameter :: himax = 8.0d0 !< maximum ice thickness allowed + real(kind=kind_phys), parameter :: himin = 0.1d0 !< minimum ice thickness required + real(kind=kind_phys), parameter :: hsmax = 2.0d0 !< maximum snow depth allowed + real(kind=kind_phys), parameter :: timin = 173.0d0 !< minimum temperature allowed for snow/ice + real(kind=kind_phys), parameter :: albfw = 0.06d0 !< albedo for lead + real(kind=kind_phys), parameter :: dsi = one/0.33d0 ! --- inputs: - integer, intent(in) :: im, km, lsm, ipr + integer, intent(in) :: im, km, ipr logical, intent(in) :: lprnt real (kind=kind_phys), intent(in) :: sbc, hvap, tgice, cp, eps, & @@ -291,7 +212,6 @@ subroutine sfc_sice_run & real (kind=kind_phys), intent(in) :: delt logical, dimension(im), intent(in) :: flag_iter - logical, intent(in) :: mom4ice ! --- input/outputs: real (kind=kind_phys), dimension(im), intent(inout) :: hice, & @@ -310,7 +230,7 @@ subroutine sfc_sice_run & real (kind=kind_phys), dimension(im) :: ffw, evapi, evapw, & & sneti, snetw, hfd, hfi, & ! & hflxi, hflxw, sneti, snetw, qssi, qssw, hfd, hfi, hfw, & - & focn, snof, hi_save, hs_save, rch, rho, & + & focn, snof, rch, rho, & & snowd, theta1 real (kind=kind_phys) :: t12, t14, tem, stsice(im,kmi) @@ -323,8 +243,8 @@ subroutine sfc_sice_run & ! !===> ... begin here ! - cpinv = 1.0/cp - hvapi = 1.0/hvap + cpinv = one/cp + hvapi = one/hvap elocp = hvap/cp ! Initialize CCPP error handling variables @@ -336,11 +256,20 @@ subroutine sfc_sice_run & do i = 1, im flag(i) = (islimsk(i) == 2) .and. flag_iter(i) if (flag_iter(i) .and. islimsk(i) < 2) then - hice(i) = 0.0 - fice(i) = 0.0 + hice(i) = zero + fice(i) = zero + endif + enddo +! + do i = 1, im + if (flag(i)) then + if (srflag(i) > zero) then + ep(i) = ep(i)*(one-srflag(i)) + weasd(i) = weasd(i) + 1.e3*tprcp(i)*srflag(i) + tprcp(i) = tprcp(i)*(one-srflag(i)) + endif endif enddo - !> - Update/read sea ice temperature from soil temperature and initialize variables. do k = 1, kmi @@ -350,25 +279,6 @@ subroutine sfc_sice_run & endif enddo enddo -! - if (mom4ice) then - do i = 1, im - if (flag(i)) then ! sea ice - hi_save(i) = hice(i) - hs_save(i) = weasd(i) * 0.001 - endif - enddo - elseif (lsm > 0) then ! --- ... snow-rain detection - do i = 1, im - if (flag(i)) then - if (srflag(i) > 0) then - ep(i) = ep(i)*(1.-srflag(i)) - weasd(i) = weasd(i) + 1.e3*tprcp(i)*srflag(i) - tprcp(i) = tprcp(i)*(1.-srflag(i)) - endif - endif - enddo - endif ! --- ... initialize variables. all units are supposedly m.k.s. unless specifie ! psurf is in pascals, wind is wind speed, theta1 is adiabatic surface @@ -385,25 +295,24 @@ subroutine sfc_sice_run & ! sfcnsw is the net shortwave flux (direction: dn-up) wind = max(sqrt(u1(i)*u1(i) + v1(i)*v1(i)) & - & + max(0.0, min(ddvel(i), 30.0)), 1.0) + & + max(zero, min(ddvel(i), 30.0d0)), one) q0 = max(q1(i), 1.0e-8) ! tsurf(i) = tskin(i) theta1(i) = t1(i) * prslki(i) - rho(i) = prsl1(i) / (rd*t1(i)*(1.0+rvrdm1*q0)) + rho(i) = prsl1(i) / (rd*t1(i)*(one+rvrdm1*q0)) qs1 = fpvs(t1(i)) qs1 = max(eps*qs1 / (prsl1(i) + epsm1*qs1), 1.e-8) q0 = min(qs1, q0) - ffw(i) = 1.0 - fice(i) if (fice(i) < cimin) then print *,'warning: ice fraction is low:', fice(i) fice(i) = cimin - ffw (i) = 1.0 - fice(i) tice(i) = tgice tskin(i)= tgice print *,'fix ice fraction: reset it to:', fice(i) endif + ffw(i) = 1.0 - fice(i) qssi = fpvs(tice(i)) qssi = eps*qssi / (ps(i) + epsm1*qssi) @@ -412,11 +321,7 @@ subroutine sfc_sice_run & !> - Convert snow depth in water equivalent from mm to m unit. - if (mom4ice) then - snowd(i) = weasd(i) * 0.001 / fice(i) - else - snowd(i) = weasd(i) * 0.001 - endif + snowd(i) = weasd(i) * 0.001d0 ! flagsnw(i) = .false. ! --- ... when snow depth is less than 1 mm, a patchy snow is assumed and @@ -436,10 +341,8 @@ subroutine sfc_sice_run & evapw(i) = elocp * rch(i) * (qssw - q0) ! evap(i) = fice(i)*evapi(i) + ffw(i)*evapw(i) -! if (lprnt) write(0,*)' tice=',tice(ipr) - - snetw(i) = sfcdsw(i) * (1.0 - albfw) - snetw(i) = min(3.0*sfcnsw(i)/(1.0+2.0*ffw(i)), snetw(i)) + snetw(i) = sfcdsw(i) * (one - albfw) + snetw(i) = min(3.0*sfcnsw(i)/(one+2.0d0*ffw(i)), snetw(i)) !> - Calculate net solar incoming at top \a sneti. sneti(i) = (sfcnsw(i) - ffw(i)*snetw(i)) / fice(i) @@ -451,8 +354,8 @@ subroutine sfc_sice_run & hfi(i) = -dlwflx(i) + sfcemis(i)*sbc*t14 + evapi(i) & & + rch(i)*(tice(i) - theta1(i)) !> - Calculate heat flux derivative at surface \a hfd. - hfd(i) = 4.0*sfcemis(i)*sbc*tice(i)*t12 & - & + (1.0 + elocp*eps*hvap*qs1/(rd*t12)) * rch(i) + hfd(i) = 4.0d0*sfcemis(i)*sbc*tice(i)*t12 & + & + (one + elocp*eps*hvap*qs1/(rd*t12)) * rch(i) t12 = tgice * tgice t14 = t12 * t12 @@ -464,14 +367,14 @@ subroutine sfc_sice_run & !> - Assigin heat flux from ocean \a focn and snowfall rate as constants, which !! should be from ocean model and other physics. - focn(i) = 2.0 ! heat flux from ocean - should be from ocn model - snof(i) = 0.0 ! snowfall rate - snow accumulates in gbphys + focn(i) = 2.0d0 ! heat flux from ocean - should be from ocn model + snof(i) = zero ! snowfall rate - snow accumulates in gbphys !> - Initialize snow depth \a snowd. hice(i) = max( min( hice(i), himax ), himin ) snowd(i) = min( snowd(i), hsmax ) - if (snowd(i) > (2.0*hice(i))) then + if (snowd(i) > (2.0d0*hice(i))) then print *, 'warning: too much snow :',snowd(i) snowd(i) = hice(i) + hice(i) print *,'fix: decrease snow depth to:',snowd(i) @@ -480,23 +383,13 @@ subroutine sfc_sice_run & enddo !> - Call the three-layer thermodynamics sea ice model ice3lay(). -! if (lprnt) write(0,*)' tice2=',tice(ipr) call ice3lay ! --- inputs: ! & ( im, kmi, fice, flag, hfi, hfd, sneti, focn, delt, ! + & lprnt, ipr, ! --- outputs: ! & snowd, hice, stsice, tice, snof, snowmt, gflux ) ! -! if (lprnt) write(0,*)' tice3=',tice(ipr) - if (mom4ice) then - do i = 1, im - if (flag(i)) then - hice(i) = hi_save(i) - snowd(i) = hs_save(i) - endif - enddo - endif - do i = 1, im if (flag(i)) then if (tice(i) < timin) then @@ -589,6 +482,7 @@ subroutine ice3lay !................................... ! --- inputs: & ( im, kmi, fice, flag, hfi, hfd, sneti, focn, delt, & + & lprnt, ipr, ! --- input/outputs: & snowd, hice, stsice, tice, snof, & ! --- outputs: @@ -648,31 +542,32 @@ subroutine ice3lay ! ! --- constant parameters: (properties of ice, snow, and seawater) - real (kind=kind_phys), parameter :: ds = 330.0 !< snow (ov sea ice) density (kg/m^3) - real (kind=kind_phys), parameter :: dw =1000.0 !< fresh water density (kg/m^3) + real (kind=kind_phys), parameter :: ds = 330.0d0 !< snow (ov sea ice) density (kg/m^3) + real (kind=kind_phys), parameter :: dw =1000.0d0 !< fresh water density (kg/m^3) real (kind=kind_phys), parameter :: dsdw = ds/dw real (kind=kind_phys), parameter :: dwds = dw/ds - real (kind=kind_phys), parameter :: t0c =273.15 !< freezing temp of fresh ice (k) - real (kind=kind_phys), parameter :: ks = 0.31 !< conductivity of snow (w/mk) - real (kind=kind_phys), parameter :: i0 = 0.3 !< ice surface penetrating solar fraction - real (kind=kind_phys), parameter :: ki = 2.03 !< conductivity of ice (w/mk) - real (kind=kind_phys), parameter :: di = 917.0 !< density of ice (kg/m^3) + real (kind=kind_phys), parameter :: ks = 0.31d0 !< conductivity of snow (w/mk) + real (kind=kind_phys), parameter :: i0 = 0.3d0 !< ice surface penetrating solar fraction + real (kind=kind_phys), parameter :: ki = 2.03d0 !< conductivity of ice (w/mk) + real (kind=kind_phys), parameter :: di = 917.0d0 !< density of ice (kg/m^3) real (kind=kind_phys), parameter :: didw = di/dw real (kind=kind_phys), parameter :: dsdi = ds/di - real (kind=kind_phys), parameter :: ci = 2054.0 !< heat capacity of fresh ice (j/kg/k) - real (kind=kind_phys), parameter :: li = 3.34e5 !< latent heat of fusion (j/kg-ice) - real (kind=kind_phys), parameter :: si = 1.0 !< salinity of sea ice - real (kind=kind_phys), parameter :: mu = 0.054 !< relates freezing temp to salinity - real (kind=kind_phys), parameter :: tfi = -mu*si !< sea ice freezing temp = -mu*salinity - real (kind=kind_phys), parameter :: tfw = -1.8 !< tfw - seawater freezing temp (c) - real (kind=kind_phys), parameter :: tfi0 = tfi-0.0001 + real (kind=kind_phys), parameter :: ci = 2054.0d0 !< heat capacity of fresh ice (j/kg/k) + real (kind=kind_phys), parameter :: li = 3.34e5 !< latent heat of fusion (j/kg-ice) + real (kind=kind_phys), parameter :: si = 1.0d0 !< salinity of sea ice + real (kind=kind_phys), parameter :: mu = 0.054d0 !< relates freezing temp to salinity + real (kind=kind_phys), parameter :: tfi = -mu*si !< sea ice freezing temp = -mu*salinity + real (kind=kind_phys), parameter :: tfw = -1.8d0 !< tfw - seawater freezing temp (c) + real (kind=kind_phys), parameter :: tfi0 = tfi-0.0001d0 real (kind=kind_phys), parameter :: dici = di*ci real (kind=kind_phys), parameter :: dili = di*li real (kind=kind_phys), parameter :: dsli = ds*li - real (kind=kind_phys), parameter :: ki4 = ki*4.0 + real (kind=kind_phys), parameter :: ki4 = ki*4.0d0 + real (kind=kind_phys), parameter :: zero = 0.0d0, one = 1.0d0 ! --- inputs: - integer, intent(in) :: im, kmi + integer, intent(in) :: im, kmi, ipr + logical :: lprnt real (kind=kind_phys), dimension(im), intent(in) :: fice, hfi, & & hfd, sneti, focn @@ -701,10 +596,10 @@ subroutine ice3lay ! !===> ... begin here ! - dt2 = 2.0 * delt - dt4 = 4.0 * delt - dt6 = 6.0 * delt - dt2i = 1.0 / dt2 + dt2 = 2.0d0 * delt + dt4 = 4.0d0 * delt + dt6 = 6.0d0 * delt + dt2i = one / dt2 do i = 1, im if (flag(i)) then @@ -723,9 +618,9 @@ subroutine ice3lay stsice(i,2) = min(stsice(i,2)-t0c, tfi0) ! degc ip = i0 * sneti(i) ! ip +v (in winton ip=-i0*sneti as sol -v) - if (snowd(i) > 0.0) then - tsf = 0.0 - ip = 0.0 + if (snowd(i) > zero) then + tsf = zero + ip = zero else tsf = tfi ip = i0 * sneti(i) ! ip +v here (in winton ip=-i0*sneti) @@ -745,7 +640,7 @@ subroutine ice3lay !! points (see \a eq.(10) in Winton (2000) \cite winton_2000). k32 = (ki+ki) / hice(i) - wrk = 1.0 / (dt6*k32 + dici*hice(i)) + wrk = one / (dt6*k32 + dici*hice(i)) a10 = dici*hice(i)*dt2i + k32*(dt4*k32 + dici*hice(i))*wrk b10 = -di*hice(i) * (ci*stsice(i,1) + li*tfi/stsice(i,1)) & & * dt2i - ip & @@ -758,7 +653,7 @@ subroutine ice3lay !> - Calculate the new upper ice temperature following \a eq.(21) !! in Winton (2000) \cite winton_2000. - stsice(i,1) = -(sqrt(b1*b1 - 4.0*a1*c1) + b1)/(a1+a1) + stsice(i,1) = -(sqrt(b1*b1 - 4.0d0*a1*c1) + b1)/(a1+a1) tice(i) = (k12*stsice(i,1) - ai) / (k12 + bi) !> - If the surface temperature is greater than the freezing temperature @@ -771,11 +666,11 @@ subroutine ice3lay if (tice(i) > tsf) then a1 = a10 + k12 b1 = b10 - k12*tsf - stsice(i,1) = -(sqrt(b1*b1 - 4.0*a1*c1) + b1)/(a1+a1) + stsice(i,1) = -(sqrt(b1*b1 - 4.0d0*a1*c1) + b1)/(a1+a1) tice(i) = tsf tmelt = (k12*(stsice(i,1)-tsf) - (ai+bi*tsf)) * delt else - tmelt = 0.0 + tmelt =zero snowd(i) = snowd(i) + snof(i)*delt endif !> - Calculate the new lower ice temperature following \a eq.(15) @@ -791,8 +686,8 @@ subroutine ice3lay !> - Calculation of ice and snow mass changes. - h1 = 0.5 * hice(i) - h2 = 0.5 * hice(i) + h1 = 0.5d0 * hice(i) + h2 = 0.5d0 * hice(i) !> - Calculate the top layer thickness. @@ -803,14 +698,14 @@ subroutine ice3lay snowmt(i) = snowd(i) h1 = h1 - (tmelt - snowd(i)*dsli) & & / (di * (ci - li/stsice(i,1)) * (tfi - stsice(i,1))) - snowd(i) = 0.0 + snowd(i) = zero endif ! --- ... and bottom !> - When the energy for bottem melting \f$M_b\f$ is negative (i.e., freezing !! is happening),calculate the bottom layer thickness \f$h_2\f$ and the new !! lower layer temperature (see \a eqs.(24)-(26)). - if (bmelt < 0.0) then + if (bmelt < zero) then dh = -bmelt / (dili + dici*(tfi - tfw)) stsice(i,2) = (h2*stsice(i,2) + dh*tfw) / (h2 + dh) h2 = h2 + dh @@ -823,11 +718,11 @@ subroutine ice3lay hice(i) = h1 + h2 - if (hice(i) > 0.0) then - if (h1 > 0.5*hice(i)) then - f1 = 1.0 - (h2+h2) / hice(i) + if (hice(i) > zero) then + if (h1 > 0.5d0*hice(i)) then + f1 = one - (h2+h2) / hice(i) stsice(i,2) = f1 * (stsice(i,1) + li*tfi/(ci*stsice(i,1)))& - & + (1.0 - f1)*stsice(i,2) + & + (one - f1)*stsice(i,2) if (stsice(i,2) > tfi) then hice(i) = hice(i) - h2*ci*(stsice(i,2) - tfi)/ (li*delt) @@ -836,23 +731,23 @@ subroutine ice3lay else f1 = (h1+h1) / hice(i) stsice(i,1) = f1 * (stsice(i,1) + li*tfi/(ci*stsice(i,1)))& - & + (1.0 - f1)*stsice(i,2) + & + (one - f1)*stsice(i,2) stsice(i,1) = (stsice(i,1) - sqrt(stsice(i,1)*stsice(i,1) & - & - 4.0*tfi*li/ci)) * 0.5 + & - 4.0d0*tfi*li/ci)) * 0.5d0 endif k12 = ki4*ks / (ks*hice(i) + ki4*snowd(i)) gflux(i) = k12 * (stsice(i,1) - tice(i)) else snowd(i) = snowd(i) + (h1*(ci*(stsice(i,1) - tfi) & - & - li*(1.0 - tfi/stsice(i,1))) & + & - li*(one - tfi/stsice(i,1))) & & + h2*(ci*(stsice(i,2) - tfi) - li)) / li - hice(i) = max(0.0, snowd(i)*dsdi) - snowd(i) = 0.0 + hice(i) = max(zero, snowd(i)*dsdi) + snowd(i) = zero stsice(i,1) = tfw stsice(i,2) = tfw - gflux(i) = 0.0 + gflux(i) = zero endif ! end if_hice_block gflux(i) = fice(i) * gflux(i) diff --git a/physics/sflx.f b/physics/sflx.f index 926115f13..102d25fcd 100644 --- a/physics/sflx.f +++ b/physics/sflx.f @@ -345,10 +345,9 @@ subroutine gfssflx &! --- input ! ! --- parameters for heat storage parametrization ! - real (kind=kind_phys) :: cpx, cpx1, cpfac, xx1, xx2, xx3 - real (kind=kind_phys), parameter :: z0min=0.2 - real (kind=kind_phys), parameter :: z0max=1.0 - + real (kind=kind_phys) :: cpx, cpx1, cpfac, xx1, xx2 + real (kind=kind_phys), parameter :: z0min=0.2_kind_phys, & + & z0max=1.0_kind_phys ! !===> ... begin here ! @@ -802,19 +801,18 @@ subroutine gfssflx &! --- input ! ! --- enhance cp as a function of z0 to mimic heat storage ! - cpx = cp - cpx1 = cp1 - cpfac = 1. - if(lheatstrg) then - if((ivegsrc == 1 .and. vegtyp /= 13) - & .or. ivegsrc == 2) then - xx1 = (z0 - z0min) / (z0max - z0min) - xx2 = min(max(xx1, 0.), 1.) - xx3 = 1. + xx2 - cpx = cp * xx3 - cpx1 = cp1 * xx3 - cpfac = cp / cpx - endif + cpx = cp + cpx1 = cp1 + cpfac = 1.0 + if (lheatstrg) then + if ((ivegsrc == 1 .and. vegtyp /= 13) + & .or. ivegsrc == 2) then + xx1 = (z0 - z0min) / (z0max - z0min) + xx2 = 1.0 + min(max(xx1, 0.0), 1.0) + cpx = cp * xx2 + cpx1 = cp1 * xx2 + cpfac = cp / cpx + endif endif !> - Call penman() to calculate potential evaporation (\a etp), @@ -2724,7 +2722,7 @@ subroutine snopac ! --- ... before call shflx in this snowpack case, set zz1 and yy arguments to ! special values that ensure that ground heat flux calculated in shflx -! matches that already computer for below the snowpack, thus the sfc +! matches that already computed for below the snowpack, thus the sfc ! heat flux to be computed in shflx will effectively be the flux at the ! snow top surface. t11 is a dummy arguement so we will not use the ! skin temp value as revised by shflx. From 7f8fc0b7fed7a60b17c48e0ac1d65572b3f43967 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Mon, 1 Jul 2019 18:13:46 +0000 Subject: [PATCH 045/167] Correction to MPI calls. --- physics/rrtmgp_lw_cloud_optics.F90 | 28 ++++++++++++++-------------- physics/rrtmgp_lw_gas_optics.F90 | 2 +- physics/rrtmgp_sw_cloud_optics.F90 | 28 ++++++++++++++-------------- physics/rrtmgp_sw_gas_optics.F90 | 2 +- 4 files changed, 30 insertions(+), 30 deletions(-) diff --git a/physics/rrtmgp_lw_cloud_optics.F90 b/physics/rrtmgp_lw_cloud_optics.F90 index 850d1307b..e56fa9c44 100644 --- a/physics/rrtmgp_lw_cloud_optics.F90 +++ b/physics/rrtmgp_lw_cloud_optics.F90 @@ -264,19 +264,19 @@ subroutine rrtmgp_lw_cloud_optics_init(Model, mpicomm, mpirank, mpiroot, lw_clou ! Broadcast arrays to all processors #ifdef MPI if (Model%rrtmgp_cld_optics .eq. 1) then - call MPI_BCAST(radliq_lwr, size(radliq_lwr), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(radliq_upr, size(radliq_upr), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(radliq_fac, size(radliq_fac), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(radice_lwr, size(radice_lwr), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(radice_upr, size(radice_upr), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(radice_fac, size(radice_fac), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(radliq_lwr, 1, kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(radliq_upr, 1, kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(radliq_fac, 1, kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(radice_lwr, 1, kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(radice_upr, 1, kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(radice_fac, 1, kind_phys, mpiroot, mpicomm, ierr) call MPI_BCAST(lut_extliq, size(lut_extliq), kind_phys, mpiroot, mpicomm, ierr) call MPI_BCAST(lut_ssaliq, size(lut_ssaliq), kind_phys, mpiroot, mpicomm, ierr) call MPI_BCAST(lut_asyliq, size(lut_asyliq), kind_phys, mpiroot, mpicomm, ierr) call MPI_BCAST(lut_extice, size(lut_extice), kind_phys, mpiroot, mpicomm, ierr) call MPI_BCAST(lut_ssaice, size(lut_ssaice), kind_phys, mpiroot, mpicomm, ierr) call MPI_BCAST(lut_asyice, size(lut_asyice), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(band_lims_cldy), size(band_lims_cldy), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(band_lims_cldy , size(band_lims_cldy), kind_phys, mpiroot, mpicomm, ierr) endif if (Model%rrtmgp_cld_optics .eq. 2) then call MPI_BCAST(pade_extliq, size(pade_extliq), kind_phys, mpiroot, mpicomm, ierr) @@ -285,13 +285,13 @@ subroutine rrtmgp_lw_cloud_optics_init(Model, mpicomm, mpirank, mpiroot, lw_clou call MPI_BCAST(pade_extice, size(pade_extice), kind_phys, mpiroot, mpicomm, ierr) call MPI_BCAST(pade_ssaice, size(pade_ssaice), kind_phys, mpiroot, mpicomm, ierr) call MPI_BCAST(pade_asyice, size(pade_asyice), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_extliq), size(pade_sizereg_extliq), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_ssaliq), size(pade_sizereg_ssaliq), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_asyliq), size(pade_sizereg_asyliq), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_extice), size(pade_sizereg_extice), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_ssaice), size(pade_sizereg_ssaice), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_asyice), size(pade_sizereg_asyice), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(band_lims_cldy), size(band_lims_cldy), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_extliq, size(pade_sizereg_extliq), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_ssaliq, size(pade_sizereg_ssaliq), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_asyliq, size(pade_sizereg_asyliq), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_extice, size(pade_sizereg_extice), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_ssaice, size(pade_sizereg_ssaice), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_asyice, size(pade_sizereg_asyice), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(band_lims_cldy, size(band_lims_cldy), kind_phys, mpiroot, mpicomm, ierr) endif #endif diff --git a/physics/rrtmgp_lw_gas_optics.F90 b/physics/rrtmgp_lw_gas_optics.F90 index 5b92f8894..34094b624 100644 --- a/physics/rrtmgp_lw_gas_optics.F90 +++ b/physics/rrtmgp_lw_gas_optics.F90 @@ -123,7 +123,7 @@ subroutine rrtmgp_lw_gas_optics_init(Model, Radtend, mpicomm, mpirank, mpiroot, ! Local variables integer :: ncid_lw,dimID,varID,status,iGas - integer,dimension(:),allocatable :: temp1,temp2,temp3,temp4 + integer,dimension(:),allocatable :: temp1,temp2,temp3,temp4, temp_log_array1, temp_log_array2, temp_log_array3, temp_log_array4 character(len=264) :: lw_gas_props_file integer,parameter :: max_strlen=256 diff --git a/physics/rrtmgp_sw_cloud_optics.F90 b/physics/rrtmgp_sw_cloud_optics.F90 index 61c0340d5..8f273551e 100644 --- a/physics/rrtmgp_sw_cloud_optics.F90 +++ b/physics/rrtmgp_sw_cloud_optics.F90 @@ -264,19 +264,19 @@ subroutine rrtmgp_sw_cloud_optics_init(Model,mpicomm, mpirank, mpiroot, sw_cloud ! Broadcast arrays to all processors #ifdef MPI if (Model%rrtmgp_cld_optics .eq. 1) then - call MPI_BCAST(radliq_lwr_sw, size(radliq_lwr_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(radliq_upr_sw, size(radliq_upr_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(radliq_fac_sw, size(radliq_fac_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(radice_lwr_sw, size(radice_lwr_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(radice_upr_sw, size(radice_upr_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(radice_fac_sw, size(radice_fac_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(radliq_lwr_sw, 1, kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(radliq_upr_sw, 1, kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(radliq_fac_sw, 1, kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(radice_lwr_sw, 1, kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(radice_upr_sw, 1, kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(radice_fac_sw, 1, kind_phys, mpiroot, mpicomm, ierr) call MPI_BCAST(lut_extliq_sw, size(lut_extliq_sw), kind_phys, mpiroot, mpicomm, ierr) call MPI_BCAST(lut_ssaliq_sw, size(lut_ssaliq_sw), kind_phys, mpiroot, mpicomm, ierr) call MPI_BCAST(lut_asyliq_sw, size(lut_asyliq_sw), kind_phys, mpiroot, mpicomm, ierr) call MPI_BCAST(lut_extice_sw, size(lut_extice_sw), kind_phys, mpiroot, mpicomm, ierr) call MPI_BCAST(lut_ssaice_sw, size(lut_ssaice_sw), kind_phys, mpiroot, mpicomm, ierr) call MPI_BCAST(lut_asyice_sw, size(lut_asyice_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(band_lims_cldy_sw), size(band_lims_cldy_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(band_lims_cldy_sw, size(band_lims_cldy_sw), kind_phys, mpiroot, mpicomm, ierr) endif if (Model%rrtmgp_cld_optics .eq. 2) then call MPI_BCAST(pade_extliq_sw, size(pade_extliq_sw), kind_phys, mpiroot, mpicomm, ierr) @@ -285,13 +285,13 @@ subroutine rrtmgp_sw_cloud_optics_init(Model,mpicomm, mpirank, mpiroot, sw_cloud call MPI_BCAST(pade_extice_sw, size(pade_extice_sw), kind_phys, mpiroot, mpicomm, ierr) call MPI_BCAST(pade_ssaice_sw, size(pade_ssaice_sw), kind_phys, mpiroot, mpicomm, ierr) call MPI_BCAST(pade_asyice_sw, size(pade_asyice_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_extliq_sw), size(pade_sizereg_extliq_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_ssaliq_sw), size(pade_sizereg_ssaliq_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_asyliq_sw), size(pade_sizereg_asyliq_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_extice_sw), size(pade_sizereg_extice_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_ssaice_sw), size(pade_sizereg_ssaice_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_asyice_sw), size(pade_sizereg_asyice_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(band_lims_cldy_sw), size(band_lims_cldy_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_extliq_sw, size(pade_sizereg_extliq_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_ssaliq_sw, size(pade_sizereg_ssaliq_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_asyliq_sw, size(pade_sizereg_asyliq_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_extice_sw, size(pade_sizereg_extice_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_ssaice_sw, size(pade_sizereg_ssaice_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_asyice_sw, size(pade_sizereg_asyice_sw), kind_phys, mpiroot, mpicomm, ierr) + call MPI_BCAST(band_lims_cldy_sw, size(band_lims_cldy_sw), kind_phys, mpiroot, mpicomm, ierr) endif #endif diff --git a/physics/rrtmgp_sw_gas_optics.F90 b/physics/rrtmgp_sw_gas_optics.F90 index b25ce53fb..e4c91306e 100644 --- a/physics/rrtmgp_sw_gas_optics.F90 +++ b/physics/rrtmgp_sw_gas_optics.F90 @@ -117,7 +117,7 @@ subroutine rrtmgp_sw_gas_optics_init(Model, Radtend, mpicomm, mpirank, mpiroot, ! Local variables integer :: status,ncid_sw,dimid,varID,iGas - integer,dimension(:),allocatable :: temp1,temp2,temp3,temp4 + integer,dimension(:),allocatable :: temp1,temp2,temp3,temp4, temp_log_array1, temp_log_array2, temp_log_array3, temp_log_array4 character(len=264) :: sw_gas_props_file ! Initialize From d6946ed8eccc87a080936da4500ed1bccbce3456 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Thu, 19 Sep 2019 11:40:36 -0600 Subject: [PATCH 046/167] Updated rrtmgp external --- physics/rte-rrtmgp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/physics/rte-rrtmgp b/physics/rte-rrtmgp index 913ee2881..e45a5fb8b 160000 --- a/physics/rte-rrtmgp +++ b/physics/rte-rrtmgp @@ -1 +1 @@ -Subproject commit 913ee2881f9e589776437e61031143874e6fa916 +Subproject commit e45a5fb8b691620cede3ad53e6e08a946cbf7ad4 From 2ead7272da521a06bfb38805f75ffae53b9b72ec Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Thu, 19 Sep 2019 11:54:25 -0600 Subject: [PATCH 047/167] Update .gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index ff0eb4314..c7b16950f 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ physics/*.xml *.cmake *.mk *.html +physics/rte-rrtmgp \ No newline at end of file From c668a6aa3b1af6f4858d6017577b347ee0c9185e Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Mon, 23 Sep 2019 10:56:22 -0600 Subject: [PATCH 048/167] Modified arg_tables. Added .meta files --- physics/GFS_rrtmgp_gas_optics.F90 | 10 +- physics/GFS_rrtmgp_gas_optics.meta | 36 +++ physics/GFS_rrtmgp_lw_post.F90 | 23 +- physics/GFS_rrtmgp_lw_post.meta | 156 ++++++++++ physics/GFS_rrtmgp_post.F90 | 23 +- physics/GFS_rrtmgp_post.meta | 164 +++++++++++ physics/GFS_rrtmgp_pre.F90 | 44 +-- physics/GFS_rrtmgp_pre.meta | 343 ++++++++++++++++++++++ physics/GFS_rrtmgp_setup.F90 | 58 +--- physics/GFS_rrtmgp_setup.meta | 370 ++++++++++++++++++++++++ physics/GFS_rrtmgp_sw_post.F90 | 27 +- physics/GFS_rrtmgp_sw_post.meta | 187 ++++++++++++ physics/rrtmgp_lw_cloud_optics.F90 | 38 +-- physics/rrtmgp_lw_cloud_optics.meta | 245 ++++++++++++++++ physics/rrtmgp_lw_clrallsky_driver.F90 | 25 +- physics/rrtmgp_lw_clrallsky_driver.meta | 174 +++++++++++ physics/rrtmgp_lw_gas_optics.F90 | 35 +-- physics/rrtmgp_lw_gas_optics.meta | 216 ++++++++++++++ physics/rrtmgp_lw_rte.F90 | 29 +- physics/rrtmgp_lw_rte.meta | 190 ++++++++++++ physics/rrtmgp_sw_cloud_optics.F90 | 40 +-- physics/rrtmgp_sw_cloud_optics.meta | 261 +++++++++++++++++ physics/rrtmgp_sw_clrallsky_driver.F90 | 27 +- physics/rrtmgp_sw_clrallsky_driver.meta | 189 ++++++++++++ physics/rrtmgp_sw_gas_optics.F90 | 33 +-- physics/rrtmgp_sw_gas_optics.meta | 199 +++++++++++++ physics/rrtmgp_sw_rte.F90 | 30 +- physics/rrtmgp_sw_rte.meta | 214 ++++++++++++++ physics/rte-rrtmgp | 2 +- 29 files changed, 2987 insertions(+), 401 deletions(-) create mode 100644 physics/GFS_rrtmgp_gas_optics.meta create mode 100644 physics/GFS_rrtmgp_lw_post.meta create mode 100644 physics/GFS_rrtmgp_post.meta create mode 100644 physics/GFS_rrtmgp_pre.meta create mode 100644 physics/GFS_rrtmgp_setup.meta create mode 100644 physics/GFS_rrtmgp_sw_post.meta create mode 100644 physics/rrtmgp_lw_cloud_optics.meta create mode 100644 physics/rrtmgp_lw_clrallsky_driver.meta create mode 100644 physics/rrtmgp_lw_gas_optics.meta create mode 100644 physics/rrtmgp_lw_rte.meta create mode 100644 physics/rrtmgp_sw_cloud_optics.meta create mode 100644 physics/rrtmgp_sw_clrallsky_driver.meta create mode 100644 physics/rrtmgp_sw_gas_optics.meta create mode 100644 physics/rrtmgp_sw_rte.meta diff --git a/physics/GFS_rrtmgp_gas_optics.F90 b/physics/GFS_rrtmgp_gas_optics.F90 index 956130db3..8332785cf 100644 --- a/physics/GFS_rrtmgp_gas_optics.F90 +++ b/physics/GFS_rrtmgp_gas_optics.F90 @@ -3,14 +3,10 @@ module GFS_rrtmgp_gas_optics use GFS_typedefs, only: GFS_control_type,GFS_radtend_type contains -!! \section arg_table_GFS_rrtmgp_gas_optics_init Argument Table -!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | -!! |--------------|-----------------------------------|---------------------------------------------------------|----------|------|-----------------------|-----------|--------|----------| -!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | -!! | Radtend | GFS_radtend_type_instance | Fortran DDT containing FV3-GFS radiation tendencies | DDT | 0 | GFS_radtend_type | | inout | F | -!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | -!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! \section arg_table_GFS_rrtmgp_gas_optics +!! \htmlinclude GFS_rrtmgp_gas_optics.html !! + ! ######################################################################################### ! SUBROUTINE GFS_rrtmgp_gas_optics_init() ! ######################################################################################### diff --git a/physics/GFS_rrtmgp_gas_optics.meta b/physics/GFS_rrtmgp_gas_optics.meta new file mode 100644 index 000000000..71090f948 --- /dev/null +++ b/physics/GFS_rrtmgp_gas_optics.meta @@ -0,0 +1,36 @@ +[ccpp-arg-table] + name = GFS_rrtmgp_gas_optics_init + type = scheme +[Model] + standard_name = GFS_control_type + long_name = Fortran DDT containing FV3-GFS model control parameters + units = DDT + dimensions = () + type = GFS_control_type + intent = in + optional = F +[Radtend] + standard_name = GFS_radtend_type + long_name = Fortran DDT containing FV3-GFS radiation tendencies + units = DDT + dimensions = () + type = GFS_radtend_type + intent = inout + optional = F +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out + optional = F +[errflg] + standard_name = ccpp_error_flag + long_name = error flag for error handling in CCPP + units = flag + dimensions = () + type = integer + intent = out + optional = F diff --git a/physics/GFS_rrtmgp_lw_post.F90 b/physics/GFS_rrtmgp_lw_post.F90 index b742f8543..2a443e308 100644 --- a/physics/GFS_rrtmgp_lw_post.F90 +++ b/physics/GFS_rrtmgp_lw_post.F90 @@ -24,27 +24,8 @@ end subroutine GFS_rrtmgp_lw_post_init ! PGI compiler does not accept lines longer than 264 characters, remove during pre-processing #ifndef __PGI -!> \section arg_table_GFS_rrtmgp_lw_post_run Argument Table -!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | -!! |-------------------|------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------|----------|------|----------------------|-----------|--------|----------| -!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | -!! | Grid | GFS_grid_type_instance | Fortran DDT containing FV3-GFS grid and interpolation related data | DDT | 0 | GFS_grid_type | | in | F | -!! | Radtend | GFS_radtend_type_instance | Fortran DDT containing FV3-GFS radiation tendencies | DDT | 0 | GFS_radtend_type | | inout | F | -!! | Coupling | GFS_coupling_type_instance | Fortran DDT containing FV3-GFS fields to/from coupling with other components | DDT | 0 | GFS_coupling_type | | inout | F | -!! | im | horizontal_loop_extent | horizontal loop extent | count | 0 | integer | | in | F | -!! | tsfa | surface_air_temperature_for_radiation | lowest model layer air temperature for radiation | K | 1 | real | kind_phys | in | F | -!! | p_lev | air_pressure_at_interface_for_RRTMGP_in_hPa | air pressure level | hPa | 2 | real | kind_phys | in | F | -!! | fluxlwUP_allsky | lw_flux_profile_upward_allsky | RRTMGP upward longwave all-sky flux profile | W m-2 | 2 | real | kind_phys | in | F | -!! | fluxlwDOWN_allsky | lw_flux_profile_downward_allsky | RRTMGP downward longwave all-sky flux profile | W m-2 | 2 | real | kind_phys | in | F | -!! | fluxlwUP_clrsky | lw_flux_profile_upward_clrsky | RRTMGP upward longwave clr-sky flux profile | W m-2 | 2 | real | kind_phys | in | F | -!! | fluxlwDOWN_clrsky | lw_flux_profile_downward_clrsky | RRTMGP downward longwave clr-sky flux profile | W m-2 | 2 | real | kind_phys | in | F | -!! | hlwc | tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_step | longwave total sky heating rate | K s-1 | 2 | real | kind_phys | out | F | -!! | topflx_lw | lw_fluxes_top_atmosphere | longwave total sky fluxes at the top of the atm | W m-2 | 1 | topflw_type | | inout | F | -!! | sfcflx_lw | lw_fluxes_sfc | longwave total sky fluxes at the Earth surface | W m-2 | 1 | sfcflw_type | | inout | F | -!! | flxprf_lw | lw_fluxes | lw fluxes total sky / csk and up / down at levels | W m-2 | 2 | proflw_type | | inout | T | -!! | hlw0 | tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_time_step | longwave clear sky heating rate | K s-1 | 2 | real | kind_phys | inout | T | -!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | -!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!> \section arg_table_GFS_rrtmgp_lw_post +!! \htmlinclude GFS_rrtmgp_lw_post.html !! #endif subroutine GFS_rrtmgp_lw_post_run (Model, Grid, Radtend, & diff --git a/physics/GFS_rrtmgp_lw_post.meta b/physics/GFS_rrtmgp_lw_post.meta new file mode 100644 index 000000000..b72f950cd --- /dev/null +++ b/physics/GFS_rrtmgp_lw_post.meta @@ -0,0 +1,156 @@ +[ccpp-arg-table] + name = GFS_rrtmgp_lw_post_run + type = scheme +[Model] + standard_name = GFS_control_type + long_name = Fortran DDT containing FV3-GFS model control parameters + units = DDT + dimensions = () + type = GFS_control_type + intent = in + optional = F +[Grid] + standard_name = GFS_grid_type + long_name = Fortran DDT containing FV3-GFS grid and interpolation related data + units = DDT + dimensions = () + type = GFS_grid_type + intent = in + optional = F +[Radtend] + standard_name = GFS_radtend_type + long_name = Fortran DDT containing FV3-GFS radiation tendencies + units = DDT + dimensions = () + type = GFS_radtend_type + intent = inout + optional = F +[Coupling] + standard_name = GFS_coupling_type + long_name = Fortran DDT containing FV3-GFS fields to/from coupling with other components + units = DDT + dimensions = () + type = GFS_coupling_type + intent = inout + optional = F +[im] + standard_name = horizontal_loop_extent + long_name = horizontal loop extent + units = count + dimensions = () + type = integer + intent = in + optional = F +[tsfa] + standard_name = surface_air_temperature_for_radiation + long_name = lowest model layer air temperature for radiation + units = K + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[p_lev] + standard_name = air_pressure_at_interface_for_RRTMGP_in_hPa + long_name = air pressure level + units = hPa + dimensions = (horizontal_dimension,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = in + optional = F +[fluxlwUP_allsky] + standard_name = lw_flux_profile_upward_allsky + long_name = RRTMGP upward longwave all-sky flux profile + units = W m-2 + dimensions = (horizontal_dimension,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = in + optional = F +[fluxlwDOWN_allsky] + standard_name = lw_flux_profile_downward_allsky + long_name = RRTMGP downward longwave all-sky flux profile + units = W m-2 + dimensions = (horizontal_dimension,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = in + optional = F +[fluxlwUP_clrsky] + standard_name = lw_flux_profile_upward_clrsky + long_name = RRTMGP upward longwave clr-sky flux profile + units = W m-2 + dimensions = (horizontal_dimension,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = in + optional = F +[fluxlwDOWN_clrsky] + standard_name = lw_flux_profile_downward_clrsky + long_name = RRTMGP downward longwave clr-sky flux profile + units = W m-2 + dimensions = (horizontal_dimension,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = in + optional = F +[hlwc] + standard_name = tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_step + long_name = longwave total sky heating rate + units = K s-1 + dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + type = real + kind = kind_phys + intent = out + optional = F +[topflx_lw] + standard_name = lw_fluxes_top_atmosphere + long_name = longwave total sky fluxes at the top of the atm + units = W m-2 + dimensions = (horizontal_dimension) + type = topflw_type + intent = inout + optional = F +[sfcflx_lw] + standard_name = lw_fluxes_sfc + long_name = longwave total sky fluxes at the Earth surface + units = W m-2 + dimensions = (horizontal_dimension) + type = sfcflw_type + intent = inout + optional = F +[flxprf_lw] + standard_name = lw_fluxes + long_name = lw fluxes total sky / csk and up / down at levels + units = W m-2 + dimensions = (horizontal_dimension,adjusted_vertical_level_dimension_for_radiation) + type = proflw_type + intent = inout + optional = T +[hlw0] + standard_name = tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_time_step + long_name = longwave clear sky heating rate + units = K s-1 + dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + type = real + kind = kind_phys + intent = inout + optional = T +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out + optional = F +[errflg] + standard_name = ccpp_error_flag + long_name = error flag for error handling in CCPP + units = flag + dimensions = () + type = integer + intent = out + optional = F diff --git a/physics/GFS_rrtmgp_post.F90 b/physics/GFS_rrtmgp_post.F90 index 65ec81d32..968b44b2a 100644 --- a/physics/GFS_rrtmgp_post.F90 +++ b/physics/GFS_rrtmgp_post.F90 @@ -26,27 +26,8 @@ module GFS_rrtmgp_post subroutine GFS_rrtmgp_post_init () end subroutine GFS_rrtmgp_post_init -!> \section arg_table_GFS_rrtmgp_post_run Argument Table -!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | -!! |----------------|---------------------------------------------------------------|------------------------------------------------------------------------------|----------|------|-------------------|-----------|--------|----------| -!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | -!! | Grid | GFS_grid_type_instance | Fortran DDT containing FV3-GFS grid and interpolation related data | DDT | 0 | GFS_grid_type | | in | F | -!! | Diag | GFS_diag_type_instance | Fortran DDT containing FV3-GFS diagnotics data | DDT | 0 | GFS_diag_type | | inout | F | -!! | Radtend | GFS_radtend_type_instance | Fortran DDT containing FV3-GFS radiation tendencies | DDT | 0 | GFS_radtend_type | | inout | F | -!! | Statein | GFS_statein_type_instance | Fortran DDT containing FV3-GFS prognostic state data in from dycore | DDT | 0 | GFS_statein_type | | in | F | -!! | Coupling | GFS_coupling_type_instance | Fortran DDT containing FV3-GFS fields to/from coupling with other components | DDT | 0 | GFS_coupling_type | | inout | F | -!! | scmpsw | components_of_surface_downward_shortwave_fluxes | derived type for special components of surface downward shortwave fluxes | W m-2 | 1 | cmpfsw_type | | inout | T | -!! | ncol | horizontal_loop_extent | horizontal loop extent | count | 0 | integer | | in | F | -!! | raddt | time_step_for_radiation | radiation time step | s | 0 | real | kind_phys | in | F | -!! | aerodp | atmosphere_optical_thickness_due_to_ambient_aerosol_particles | vertical integrated optical depth for various aerosol species | none | 2 | real | kind_phys | in | F | -!! | cldsa | cloud_area_fraction_for_radiation | fraction of clouds for low, middle, high, total and BL | frac | 2 | real | kind_phys | in | F | -!! | mtopa | model_layer_number_at_cloud_top | vertical indices for low, middle and high cloud tops | index | 2 | integer | | in | F | -!! | mbota | model_layer_number_at_cloud_base | vertical indices for low, middle and high cloud bases | index | 2 | integer | | in | F | -!! | cloud_fraction | total_cloud_fraction | layer total cloud fraction | frac | 2 | real | kind_phys | in | F | -!! | cldtaulw | cloud_optical_depth_layers_at_10mu_band | approx 10mu band layer cloud optical depth | none | 2 | real | kind_phys | in | F | -!! | cldtausw | cloud_optical_depth_layers_at_0.55mu_band | approx .55mu band layer cloud optical depth | none | 2 | real | kind_phys | in | F | -!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | -!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!> \section arg_table_GFS_rrtmgp_post +!! \htmlinclude GFS_rrtmgp_post.html !! subroutine GFS_rrtmgp_post_run (Model, Grid, Diag, Radtend, Statein, Coupling, scmpsw, & ncol, raddt, aerodp, cldsa, mtopa, mbota, cloud_fraction, cldtaulw, cldtausw, & diff --git a/physics/GFS_rrtmgp_post.meta b/physics/GFS_rrtmgp_post.meta new file mode 100644 index 000000000..1c393382e --- /dev/null +++ b/physics/GFS_rrtmgp_post.meta @@ -0,0 +1,164 @@ +[ccpp-arg-table] + name = GFS_rrtmgp_post_init + type = scheme + +######################################################################## +[ccpp-arg-table] + name = GFS_rrtmgp_post_run + type = scheme +[Model] + standard_name = GFS_control_type + long_name = Fortran DDT containing FV3-GFS model control parameters + units = DDT + dimensions = () + type = GFS_control_type + intent = in + optional = F +[Grid] + standard_name = GFS_grid_type + long_name = Fortran DDT containing FV3-GFS grid and interpolation related data + units = DDT + dimensions = () + type = GFS_grid_type + intent = in + optional = F +[Diag] + standard_name = GFS_diag_type + long_name = Fortran DDT containing FV3-GFS diagnotics data + units = DDT + dimensions = () + type = GFS_diag_type + intent = inout + optional = F +[Radtend] + standard_name = GFS_radtend_type + long_name = Fortran DDT containing FV3-GFS radiation tendencies + units = DDT + dimensions = () + type = GFS_radtend_type + intent = inout + optional = F +[Statein] + standard_name = GFS_statein_type + long_name = Fortran DDT containing FV3-GFS prognostic state data in from dycore + units = DDT + dimensions = () + type = GFS_statein_type + intent = in + optional = F +[Coupling] + standard_name = GFS_coupling_type + long_name = Fortran DDT containing FV3-GFS fields to/from coupling with other components + units = DDT + dimensions = () + type = GFS_coupling_type + intent = inout + optional = F +[scmpsw] + standard_name = components_of_surface_downward_shortwave_fluxes + long_name = derived type for special components of surface downward shortwave fluxes + units = W m-2 + dimensions = (horizontal_dimension) + type = cmpfsw_type + intent = inout + optional = T +[ncol] + standard_name = horizontal_loop_extent + long_name = horizontal loop extent + units = count + dimensions = () + type = integer + intent = in + optional = F +[raddt] + standard_name = time_step_for_radiation + long_name = radiation time step + units = s + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[aerodp] + standard_name = atmosphere_optical_thickness_due_to_ambient_aerosol_particles + long_name = vertical integrated optical depth for various aerosol species + units = none + dimensions = (horizontal_dimension,number_of_species_for_aerosol_optical_depth) + type = real + kind = kind_phys + intent = in + optional = F +[cldsa] + standard_name = cloud_area_fraction_for_radiation + long_name = fraction of clouds for low, middle, high, total and BL + units = frac + dimensions = (horizontal_dimension,5) + type = real + kind = kind_phys + intent = in + optional = F +[mtopa] + standard_name = model_layer_number_at_cloud_top + long_name = vertical indices for low, middle and high cloud tops + units = index + dimensions = (horizontal_dimension,3) + type = integer + intent = in + optional = F +[mbota] + standard_name = model_layer_number_at_cloud_base + long_name = vertical indices for low, middle and high cloud bases + units = index + dimensions = (horizontal_dimension,3) + type = integer + intent = in + optional = F +[cloud_fraction] + standard_name = total_cloud_fraction + long_name = layer total cloud fraction + units = frac + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[cldtaulw] + standard_name = cloud_optical_depth_layers_at_10mu_band + long_name = approx 10mu band layer cloud optical depth + units = none + dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + type = real + kind = kind_phys + intent = in + optional = F +[cldtausw] + standard_name = cloud_optical_depth_layers_at_0_55mu_band + long_name = approx .55mu band layer cloud optical depth + units = none + dimensions = (horizontal_dimension,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = in + optional = F +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out + optional = F +[errflg] + standard_name = ccpp_error_flag + long_name = error flag for error handling in CCPP + units = flag + dimensions = () + type = integer + intent = out + optional = F + +######################################################################## +[ccpp-arg-table] + name = GFS_rrtmgp_post_finalize + type = scheme diff --git a/physics/GFS_rrtmgp_pre.F90 b/physics/GFS_rrtmgp_pre.F90 index bdf399522..7741d9f37 100644 --- a/physics/GFS_rrtmgp_pre.F90 +++ b/physics/GFS_rrtmgp_pre.F90 @@ -66,48 +66,8 @@ module GFS_rrtmgp_pre subroutine GFS_rrtmgp_pre_init () end subroutine GFS_rrtmgp_pre_init -!> \section arg_table_GFS_rrtmgp_pre_run Argument Table -!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | -!! |--------------------|---------------------------------------------------------------|-------------------------------------------------------------------------------|----------|------|-----------------------|-----------|--------|----------| -!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | -!! | Grid | GFS_grid_type_instance | Fortran DDT containing FV3-GFS grid and interpolation related data | DDT | 0 | GFS_grid_type | | in | F | -!! | Sfcprop | GFS_sfcprop_type_instance | Fortran DDT containing FV3-GFS surface fields | DDT | 0 | GFS_sfcprop_type | | in | F | -!! | Statein | GFS_statein_type_instance | Fortran DDT containing FV3-GFS prognostic state data in from dycore | DDT | 0 | GFS_statein_type | | in | F | -!! | Tbd | GFS_tbd_type_instance | Fortran DDT containing FV3-GFS data not yet assigned to a defined container | DDT | 0 | GFS_tbd_type | | in | F | -!! | Coupling | GFS_coupling_type_instance | Fortran DDT containing FV3-GFS fields needed for coupling | DDT | 0 | GFS_coupling_type | | in | F | -!! | Radtend | GFS_radtend_type_instance | Fortran DDT containing FV3-GFS radiation tendencies | DDT | 0 | GFS_radtend_type | | inout | F | -!! | ncol | horizontal_loop_extent | horizontal loop extent | count | 0 | integer | | in | F | -!! | lw_gas_props | coefficients_for_lw_gas_optics | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | -!! | sw_gas_props | coefficients_for_sw_gas_optics | DDT containing spectral information for RRTMGP SW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | -!! | raddt | time_step_for_radiation | radiation time step | s | 0 | real | kind_phys | out | F | -!! | p_lay | air_pressure_at_layer_for_RRTMGP_in_hPa | air pressure at vertical layer for radiation calculation | hPa | 2 | real | kind_phys | out | F | -!! | p_lev | air_pressure_at_interface_for_RRTMGP_in_hPa | air pressure at vertical interface for radiation calculation | hPa | 2 | real | kind_phys | out | F | -!! | t_lay | air_temperature_at_layer_for_RRTMGP | air temperature at vertical layer for radiation calculation | K | 2 | real | kind_phys | out | F | -!! | t_lev | air_temperature_at_interface_for_RRTMGP | air temperature at vertical interface for radiation calculation | K | 2 | real | kind_phys | out | F | -!! | tsfg | surface_ground_temperature_for_radiation | surface ground temperature for radiation | K | 1 | real | kind_phys | out | F | -!! | tsfa | surface_air_temperature_for_radiation | lowest model layer air temperature for radiation | K | 1 | real | kind_phys | out | F | -!! | cld_frac | total_cloud_fraction | layer total cloud fraction | frac | 2 | real | kind_phys | out | F | -!! | cld_lwp | cloud_liquid_water_path | layer cloud liquid water path | g m-2 | 2 | real | kind_phys | out | F | -!! | cld_reliq | mean_effective_radius_for_liquid_cloud | mean effective radius for liquid cloud | micron | 2 | real | kind_phys | out | F | -!! | cld_iwp | cloud_ice_water_path | layer cloud ice water path | g m-2 | 2 | real | kind_phys | out | F | -!! | cld_reice | mean_effective_radius_for_ice_cloud | mean effective radius for ice cloud | micron | 2 | real | kind_phys | out | F | -!! | cld_swp | cloud_snow_water_path | layer cloud snow water path | g m-2 | 2 | real | kind_phys | out | F | -!! | cld_resnow | mean_effective_radius_for_snow_flake | mean effective radius for snow cloud | micron | 2 | real | kind_phys | out | F | -!! | cld_rwp | cloud_rain_water_path | layer cloud rain water path | g m-2 | 2 | real | kind_phys | out | F | -!! | cld_rerain | mean_effective_radius_for_rain_drop | mean effective radius for rain cloud | micron | 2 | real | kind_phys | out | F | -!! | faerlw | aerosol_optical_properties_for_longwave_bands_01-16 | aerosol optical properties for longwave bands 01-16 | various | 4 | real | kind_phys | out | F | -!! | faersw | aerosol_optical_properties_for_shortwave_bands_01-16 | aerosol optical properties for shortwave bands 01-16 | various | 4 | real | kind_phys | out | F | -!! | mtopa | model_layer_number_at_cloud_top | vertical indices for low, middle and high cloud tops | index | 2 | integer | | out | F | -!! | mbota | model_layer_number_at_cloud_base | vertical indices for low, middle and high cloud bases | index | 2 | integer | | out | F | -!! | de_lgth | cloud_decorrelation_length | cloud decorrelation length | km | 1 | real | kind_phys | out | F | -!! | cldsa | cloud_area_fraction_for_radiation | fraction of clouds for low, middle, high, total and BL | frac | 2 | real | kind_phys | out | F | -!! | aerodp | atmosphere_optical_thickness_due_to_ambient_aerosol_particles | vertical integrated optical depth for various aerosol species | none | 2 | real | kind_phys | out | F | -!! | alb1d | surface_albedo_perturbation | surface albedo perturbation | frac | 1 | real | kind_phys | out | F | -!! | gas_concentrations | Gas_concentrations_for_RRTMGP_suite | DDT containing gas concentrations for RRTMGP radiation scheme | DDT | 0 | ty_gas_concs | | out | F | -!! | nday | daytime_points_dimension | daytime points dimension | count | 0 | integer | | out | F | -!! | idxday | daytime_points | daytime points | index | 1 | integer | | out | F | -!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | -!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!> \section arg_table_GFS_rrtmgp_pre +!! \htmlinclude GFS_rrtmgp_pre.html !! ! Attention - the output arguments lm, im, lmk, lmp must not be set ! in the CCPP version - they are defined in the interstitial_create routine diff --git a/physics/GFS_rrtmgp_pre.meta b/physics/GFS_rrtmgp_pre.meta new file mode 100644 index 000000000..7131bd2b8 --- /dev/null +++ b/physics/GFS_rrtmgp_pre.meta @@ -0,0 +1,343 @@ +[ccpp-arg-table] + name = GFS_rrtmgp_pre_run + type = scheme +[Model] + standard_name = GFS_control_type + long_name = Fortran DDT containing FV3-GFS model control parameters + units = DDT + dimensions = () + type = GFS_control_type + intent = in + optional = F +[Grid] + standard_name = GFS_grid_type + long_name = Fortran DDT containing FV3-GFS grid and interpolation related data + units = DDT + dimensions = () + type = GFS_grid_type + intent = in + optional = F +[Sfcprop] + standard_name = GFS_sfcprop_type + long_name = Fortran DDT containing FV3-GFS surface fields + units = DDT + dimensions = () + type = GFS_sfcprop_type + intent = in + optional = F +[Statein] + standard_name = GFS_statein_type + long_name = Fortran DDT containing FV3-GFS prognostic state data in from dycore + units = DDT + dimensions = () + type = GFS_statein_type + intent = in + optional = F +[Tbd] + standard_name = GFS_tbd_type + long_name = Fortran DDT containing FV3-GFS data not yet assigned to a defined container + units = DDT + dimensions = () + type = GFS_tbd_type + intent = in + optional = F +[Coupling] + standard_name = GFS_coupling_type + long_name = Fortran DDT containing FV3-GFS fields needed for coupling + units = DDT + dimensions = () + type = GFS_coupling_type + intent = in + optional = F +[Radtend] + standard_name = GFS_radtend_type + long_name = Fortran DDT containing FV3-GFS radiation tendencies + units = DDT + dimensions = () + type = GFS_radtend_type + intent = inout + optional = F +[ncol] + standard_name = horizontal_loop_extent + long_name = horizontal loop extent + units = count + dimensions = () + type = integer + intent = in + optional = F +[lw_gas_props] + standard_name = coefficients_for_lw_gas_optics + long_name = DDT containing spectral information for RRTMGP LW radiation scheme + units = DDT + dimensions = () + type = ty_gas_optics_rrtmgp + intent = in + optional = F +[sw_gas_props] + standard_name = coefficients_for_sw_gas_optics + long_name = DDT containing spectral information for RRTMGP SW radiation scheme + units = DDT + dimensions = () + type = ty_gas_optics_rrtmgp + intent = in + optional = F +[raddt] + standard_name = time_step_for_radiation + long_name = radiation time step + units = s + dimensions = () + type = real + kind = kind_phys + intent = out + optional = F +[p_lay] + standard_name = air_pressure_at_layer_for_RRTMGP_in_hPa + long_name = air pressure at vertical layer for radiation calculation + units = hPa + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[p_lev] + standard_name = air_pressure_at_interface_for_RRTMGP_in_hPa + long_name = air pressure at vertical interface for radiation calculation + units = hPa + dimensions = (horizontal_dimension,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = out + optional = F +[t_lay] + standard_name = air_temperature_at_layer_for_RRTMGP + long_name = air temperature at vertical layer for radiation calculation + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[t_lev] + standard_name = air_temperature_at_interface_for_RRTMGP + long_name = air temperature at vertical interface for radiation calculation + units = K + dimensions = (horizontal_dimension,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = out + optional = F +[tsfg] + standard_name = surface_ground_temperature_for_radiation + long_name = surface ground temperature for radiation + units = K + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[tsfa] + standard_name = surface_air_temperature_for_radiation + long_name = lowest model layer air temperature for radiation + units = K + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[cld_frac] + standard_name = RRTMGP_total_cloud_fraction + long_name = layer total cloud fraction + units = frac + dimensions = (horizontal_dimension,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = out + optional = F +[cld_lwp] + standard_name = RRTMGP_cloud_liquid_water_path + long_name = layer cloud liquid water path + units = g m-2 + dimensions = (horizontal_dimension,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = out + optional = F +[cld_reliq] + standard_name = RRTMGP_mean_effective_radius_for_liquid_cloud + long_name = mean effective radius for liquid cloud + units = micron + dimensions = (horizontal_dimension,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = out + optional = F +[cld_iwp] + standard_name = RRTMGP_cloud_ice_water_path + long_name = layer cloud ice water path + units = g m-2 + dimensions = (horizontal_dimension,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = out + optional = F +[cld_reice] + standard_name = RRTMGP_mean_effective_radius_for_ice_cloud + long_name = mean effective radius for ice cloud + units = micron + dimensions = (horizontal_dimension,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = out + optional = F +[cld_swp] + standard_name = RRTMGP_cloud_snow_water_path + long_name = layer cloud snow water path + units = g m-2 + dimensions = (horizontal_dimension,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = out + optional = F +[cld_resnow] + standard_name = RRTMGP_mean_effective_radius_for_snow_flake + long_name = mean effective radius for snow cloud + units = micron + dimensions = (horizontal_dimension,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = out + optional = F +[cld_rwp] + standard_name = RRTMGP_cloud_rain_water_path + long_name = layer cloud rain water path + units = g m-2 + dimensions = (horizontal_dimension,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = out + optional = F +[cld_rerain] + standard_name = RRTMGP_mean_effective_radius_for_rain_drop + long_name = mean effective radius for rain cloud + units = micron + dimensions = (horizontal_dimension,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = out + optional = F +[faerlw] + standard_name = aerosol_optical_properties_for_longwave_bands_01_16 + long_name = aerosol optical properties for longwave bands 01-16 + units = various + dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_longwave_radiation,number_of_aerosol_output_fields_for_longwave_radiation) + type = real + kind = kind_phys + intent = out + optional = F +[faersw] + standard_name = aerosol_optical_properties_for_shortwave_bands_01_16 + long_name = aerosol optical properties for shortwave bands 01-16 + units = various + dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_shortwave_radiation,number_of_aerosol_output_fields_for_shortwave_radiation) + type = real + kind = kind_phys + intent = out + optional = F +[mtopa] + standard_name = model_layer_number_at_cloud_top + long_name = vertical indices for low, middle and high cloud tops + units = index + dimensions = (horizontal_dimension,3) + type = integer + intent = out + optional = F +[mbota] + standard_name = model_layer_number_at_cloud_base + long_name = vertical indices for low, middle and high cloud bases + units = index + dimensions = (horizontal_dimension,3) + type = integer + intent = out + optional = F +[de_lgth] + standard_name = cloud_decorrelation_length + long_name = cloud decorrelation length + units = km + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[cldsa] + standard_name = cloud_area_fraction_for_radiation + long_name = fraction of clouds for low, middle, high, total and BL + units = frac + dimensions = (horizontal_dimension,5) + type = real + kind = kind_phys + intent = out + optional = F +[aerodp] + standard_name = atmosphere_optical_thickness_due_to_ambient_aerosol_particles + long_name = vertical integrated optical depth for various aerosol species + units = none + dimensions = (horizontal_dimension,number_of_species_for_aerosol_optical_depth) + type = real + kind = kind_phys + intent = out + optional = F +[alb1d] + standard_name = surface_albedo_perturbation + long_name = surface albedo perturbation + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[gas_concentrations] + standard_name = Gas_concentrations_for_RRTMGP_suite + long_name = DDT containing gas concentrations for RRTMGP radiation scheme + units = DDT + dimensions = () + type = ty_gas_concs + intent = out + optional = F +[nday] + standard_name = daytime_points_dimension + long_name = daytime points dimension + units = count + dimensions = () + type = integer + intent = out + optional = F +[idxday] + standard_name = daytime_points + long_name = daytime points + units = index + dimensions = (horizontal_dimension) + type = integer + intent = out + optional = F +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out + optional = F +[errflg] + standard_name = ccpp_error_flag + long_name = error flag for error handling in CCPP + units = flag + dimensions = () + type = integer + intent = out + optional = F + +######################################################################## +[ccpp-arg-table] + name = GFS_rrtmgp_pre_finalize + type = scheme diff --git a/physics/GFS_rrtmgp_setup.F90 b/physics/GFS_rrtmgp_setup.F90 index 8307d1aa8..270c0b471 100644 --- a/physics/GFS_rrtmgp_setup.F90 +++ b/physics/GFS_rrtmgp_setup.F90 @@ -39,38 +39,8 @@ module GFS_rrtmgp_setup !> \defgroup GFS_rrtmgp_setup GFS RRTMGP Scheme Setup !! @{ -!! \section arg_table_GFS_rrtmgp_setup_init Argument Table -!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | -!! |--------------------------|-------------------------------------------------------------------------------|---------------------------------------------------------------|---------------|------|-----------|-----------|--------|----------| -!! | si | vertical_sigma_coordinate_for_radiation_initialization | vertical sigma coordinate for radiation initialization | none | 1 | real | kind_phys | in | F | -!! | levr | number_of_vertical_layers_for_radiation_calculations | number of vertical levels for radiation calculations | count | 0 | integer | | in | F | -!! | ictm | flag_for_initial_time-date_control | flag for initial conditions and forcing | flag | 0 | integer | | in | F | -!! | isol | flag_for_solar_constant | use prescribed solar constant | flag | 0 | integer | | in | F | -!! | ico2 | flag_for_using_prescribed_global_mean_co2_value | prescribed global mean value (old opernl) | flag | 0 | integer | | in | F | -!! | iaer | flag_for_default_aerosol_effect_in_shortwave_radiation | default aerosol effect in sw only | flag | 0 | integer | | in | F | -!! | ialb | flag_for_using_climatology_albedo | flag for using climatology alb, based on sfc type | flag | 0 | integer | | in | F | -!! | iems | flag_for_surface_emissivity_control | surface emissivity control flag, use fixed value of 1 | flag | 0 | integer | | in | F | -!! | ntcw | index_for_liquid_cloud_condensate | tracer index for cloud condensate (or liquid water) | index | 0 | integer | | in | F | -!! | num_p3d | array_dimension_of_3d_arrays_for_microphysics | number of 3D arrays needed for microphysics | count | 0 | integer | | in | F | -!! | ntoz | index_for_ozone | tracer index for ozone mixing ratio | index | 0 | integer | | in | F | -!! | iovr_sw | flag_for_max-random_overlap_clouds_for_shortwave_radiation | sw: max-random overlap clouds | flag | 0 | integer | | in | F | -!! | iovr_lw | flag_for_max-random_overlap_clouds_for_longwave_radiation | lw: max-random overlap clouds | flag | 0 | integer | | in | F | -!! | isubc_sw | flag_for_sw_clouds_without_sub-grid_approximation | flag for sw clouds without sub-grid approximation | flag | 0 | integer | | in | F | -!! | isubc_lw | flag_for_lw_clouds_without_sub-grid_approximation | flag for lw clouds without sub-grid approximation | flag | 0 | integer | | in | F | -!! | icliq_sw | flag_for_optical_property_for_liquid_clouds_for_shortwave_radiation | sw optical property for liquid clouds | flag | 0 | integer | | in | F | -!! | crick_proof | flag_for_CRICK-proof_cloud_water | flag for CRICK-Proof cloud water | flag | 0 | logical | | in | F | -!! | ccnorm | flag_for_cloud_condensate_normalized_by_cloud_cover | flag for cloud condensate normalized by cloud cover | flag | 0 | logical | | in | F | -!! | imp_physics | flag_for_microphysics_scheme | choice of microphysics scheme | flag | 0 | integer | | in | F | -!! | norad_precip | flag_for_precipitation_effect_on_radiation | radiation precip flag for Ferrier/Moorthi | flag | 0 | logical | | in | F | -!! | idate | date_and_time_at_model_initialization_reordered | initialization date and time | none | 1 | integer | | in | F | -!! | iflip | flag_for_vertical_index_direction_control | flag for vertical index direction control | flag | 0 | integer | | in | F | -!! | im | horizontal_loop_extent | horizontal loop extent | count | 0 | integer | | in | F | -!! | faerlw | aerosol_optical_properties_for_longwave_bands_01-16 | optical properties for longwave bands 01-16 | various | 4 | real | kind_phys | in | F | -!! | faersw | aerosol_optical_properties_for_shortwave_bands_01-16 | aerosol optical properties for shortwave bands 01-16 | various | 4 | real | kind_phys | in | F | -!! | aerodp | atmosphere_optical_thickness_due_to_ambient_aerosol_particles | vertical integrated optical depth for various aerosol species | none | 2 | real | kind_phys | in | F | -!! | me | mpi_rank | current MPI-rank | index | 0 | integer | | in | F | -!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | -!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! \section arg_table_GFS_rrtmgp_setup +!! \htmlinclude GFS_rrtmgp_setup.html !! subroutine GFS_rrtmgp_setup_init ( & si, levr, ictm, isol, ico2, iaer, ialb, iems, ntcw, & @@ -346,21 +316,8 @@ subroutine GFS_rrtmgp_setup_init ( & end subroutine GFS_rrtmgp_setup_init -!> \section arg_table_GFS_rrtmgp_setup_run Argument Table -!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | -!! |--------------------------|-------------------------------------------------------------------------------|---------------------------------------------------------|---------------|------|-----------|-----------|--------|----------| -!! | idate | date_and_time_at_model_initialization | initialization date and time | none | 1 | integer | | in | F | -!! | jdate | forecast_date_and_time | current forecast date and time | none | 1 | integer | | in | F | -!! | deltsw | frequency_for_shortwave_radiation | frequency for shortwave radiation | s | 0 | real | kind_phys | in | F | -!! | deltim | time_step_for_dynamics | dynamics timestep | s | 0 | real | kind_phys | in | F | -!! | lsswr | flag_to_calc_sw | logical flags for sw radiation calls | flag | 0 | logical | | in | F | -!! | me | mpi_rank | current MPI-rank | index | 0 | integer | | in | F | -!! | slag | equation_of_time | equation of time (radian) | radians | 0 | real | kind_phys | out | F | -!! | sdec | sine_of_solar_declination_angle | sin of the solar declination angle | none | 0 | real | kind_phys | out | F | -!! | cdec | cosine_of_solar_declination_angle | cos of the solar declination angle | none | 0 | real | kind_phys | out | F | -!! | solcon | solar_constant | solar constant (sun-earth distant adjusted) | W m-2 | 0 | real | kind_phys | out | F | -!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | -!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!> \section arg_table_GFS_rrtmgp_setup +!! \htmlinclude GFS_rrtmgp_setup.html !! subroutine GFS_rrtmgp_setup_run ( & idate, jdate, deltsw, deltim, lsswr, me, & @@ -398,11 +355,8 @@ subroutine GFS_rrtmgp_setup_run ( & end subroutine GFS_rrtmgp_setup_run -!> \section arg_table_GFS_rrtmgp_setup_finalize Argument Table -!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | -!! |--------------------------|-------------------------------------------------------------------------------|---------------------------------------------------------|---------------|------|-----------|-----------|--------|----------| -!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | -!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!> \section arg_table_GFS_rrtmgp_setup +!! \htmlinclude GFS_rrtmgp_setup.html !! subroutine GFS_rrtmgp_setup_finalize (errmsg, errflg) diff --git a/physics/GFS_rrtmgp_setup.meta b/physics/GFS_rrtmgp_setup.meta new file mode 100644 index 000000000..0e7e7b702 --- /dev/null +++ b/physics/GFS_rrtmgp_setup.meta @@ -0,0 +1,370 @@ +[ccpp-arg-table] + name = GFS_rrtmgp_setup_init + type = scheme +[si] + standard_name = vertical_sigma_coordinate_for_radiation_initialization + long_name = vertical sigma coordinate for radiation initialization + units = none + dimensions = (number_of_vertical_layers_for_radiation_calculations_plus_one) + type = real + kind = kind_phys + intent = in + optional = F +[levr] + standard_name = number_of_vertical_layers_for_radiation_calculations + long_name = number of vertical levels for radiation calculations + units = count + dimensions = () + type = integer + intent = in + optional = F +[ictm] + standard_name = flag_for_initial_time_date_control + long_name = flag for initial conditions and forcing + units = flag + dimensions = () + type = integer + intent = in + optional = F +[isol] + standard_name = flag_for_solar_constant + long_name = use prescribed solar constant + units = flag + dimensions = () + type = integer + intent = in + optional = F +[ico2] + standard_name = flag_for_using_prescribed_global_mean_co2_value + long_name = prescribed global mean value (old opernl) + units = flag + dimensions = () + type = integer + intent = in + optional = F +[iaer] + standard_name = flag_for_default_aerosol_effect_in_shortwave_radiation + long_name = default aerosol effect in sw only + units = flag + dimensions = () + type = integer + intent = in + optional = F +[ialb] + standard_name = flag_for_using_climatology_albedo + long_name = flag for using climatology alb, based on sfc type + units = flag + dimensions = () + type = integer + intent = in + optional = F +[iems] + standard_name = flag_for_surface_emissivity_control + long_name = surface emissivity control flag, use fixed value of 1 + units = flag + dimensions = () + type = integer + intent = in + optional = F +[ntcw] + standard_name = index_for_liquid_cloud_condensate + long_name = tracer index for cloud condensate (or liquid water) + units = index + dimensions = () + type = integer + intent = in + optional = F +[num_p3d] + standard_name = array_dimension_of_3d_arrays_for_microphysics + long_name = number of 3D arrays needed for microphysics + units = count + dimensions = () + type = integer + intent = in + optional = F +[ntoz] + standard_name = index_for_ozone + long_name = tracer index for ozone mixing ratio + units = index + dimensions = () + type = integer + intent = in + optional = F +[iovr_sw] + standard_name = flag_for_max_random_overlap_clouds_for_shortwave_radiation + long_name = sw: max-random overlap clouds + units = flag + dimensions = () + type = integer + intent = in + optional = F +[iovr_lw] + standard_name = flag_for_max_random_overlap_clouds_for_longwave_radiation + long_name = lw: max-random overlap clouds + units = flag + dimensions = () + type = integer + intent = in + optional = F +[isubc_sw] + standard_name = flag_for_sw_clouds_without_sub_grid_approximation + long_name = flag for sw clouds without sub-grid approximation + units = flag + dimensions = () + type = integer + intent = in + optional = F +[isubc_lw] + standard_name = flag_for_lw_clouds_without_sub_grid_approximation + long_name = flag for lw clouds without sub-grid approximation + units = flag + dimensions = () + type = integer + intent = in + optional = F +[icliq_sw] + standard_name = flag_for_optical_property_for_liquid_clouds_for_shortwave_radiation + long_name = sw optical property for liquid clouds + units = flag + dimensions = () + type = integer + intent = in + optional = F +[crick_proof] + standard_name = flag_for_CRICK_proof_cloud_water + long_name = flag for CRICK-Proof cloud water + units = flag + dimensions = () + type = logical + intent = in + optional = F +[ccnorm] + standard_name = flag_for_cloud_condensate_normalized_by_cloud_cover + long_name = flag for cloud condensate normalized by cloud cover + units = flag + dimensions = () + type = logical + intent = in + optional = F +[imp_physics] + standard_name = flag_for_microphysics_scheme + long_name = choice of microphysics scheme + units = flag + dimensions = () + type = integer + intent = in + optional = F +[norad_precip] + standard_name = flag_for_precipitation_effect_on_radiation + long_name = radiation precip flag for Ferrier/Moorthi + units = flag + dimensions = () + type = logical + intent = in + optional = F +[idate] + standard_name = date_and_time_at_model_initialization_reordered + long_name = initialization date and time + units = none + dimensions = (4) + type = integer + intent = in + optional = F +[iflip] + standard_name = flag_for_vertical_index_direction_control + long_name = flag for vertical index direction control + units = flag + dimensions = () + type = integer + intent = in + optional = F +[im] + standard_name = horizontal_loop_extent + long_name = horizontal loop extent + units = count + dimensions = () + type = integer + intent = in + optional = F +[faerlw] + standard_name = aerosol_optical_properties_for_longwave_bands_01_16 + long_name = optical properties for longwave bands 01-16 + units = various + dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_longwave_radiation,number_of_aerosol_output_fields_for_longwave_radiation) + type = real + kind = kind_phys + intent = in + optional = F +[faersw] + standard_name = aerosol_optical_properties_for_shortwave_bands_01_16 + long_name = aerosol optical properties for shortwave bands 01-16 + units = various + dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_shortwave_radiation,number_of_aerosol_output_fields_for_shortwave_radiation) + type = real + kind = kind_phys + intent = in + optional = F +[aerodp] + standard_name = atmosphere_optical_thickness_due_to_ambient_aerosol_particles + long_name = vertical integrated optical depth for various aerosol species + units = none + dimensions = (horizontal_dimension,number_of_species_for_aerosol_optical_depth) + type = real + kind = kind_phys + intent = in + optional = F +[me] + standard_name = mpi_rank + long_name = current MPI-rank + units = index + dimensions = () + type = integer + intent = in + optional = F +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out + optional = F +[errflg] + standard_name = ccpp_error_flag + long_name = error flag for error handling in CCPP + units = flag + dimensions = () + type = integer + intent = out + optional = F + +######################################################################## +[ccpp-arg-table] + name = GFS_rrtmgp_setup_run + type = scheme +[idate] + standard_name = date_and_time_at_model_initialization + long_name = initialization date and time + units = none + dimensions = (8) + type = integer + intent = in + optional = F +[jdate] + standard_name = forecast_date_and_time + long_name = current forecast date and time + units = none + dimensions = (8) + type = integer + intent = in + optional = F +[deltsw] + standard_name = frequency_for_shortwave_radiation + long_name = frequency for shortwave radiation + units = s + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[deltim] + standard_name = time_step_for_dynamics + long_name = dynamics timestep + units = s + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[lsswr] + standard_name = flag_to_calc_sw + long_name = logical flags for sw radiation calls + units = flag + dimensions = () + type = logical + intent = in + optional = F +[me] + standard_name = mpi_rank + long_name = current MPI-rank + units = index + dimensions = () + type = integer + intent = in + optional = F +[slag] + standard_name = equation_of_time + long_name = equation of time (radian) + units = radians + dimensions = () + type = real + kind = kind_phys + intent = out + optional = F +[sdec] + standard_name = sine_of_solar_declination_angle + long_name = sin of the solar declination angle + units = none + dimensions = () + type = real + kind = kind_phys + intent = out + optional = F +[cdec] + standard_name = cosine_of_solar_declination_angle + long_name = cos of the solar declination angle + units = none + dimensions = () + type = real + kind = kind_phys + intent = out + optional = F +[solcon] + standard_name = solar_constant + long_name = solar constant (sun-earth distant adjusted) + units = W m-2 + dimensions = () + type = real + kind = kind_phys + intent = out + optional = F +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out + optional = F +[errflg] + standard_name = ccpp_error_flag + long_name = error flag for error handling in CCPP + units = flag + dimensions = () + type = integer + intent = out + optional = F + +######################################################################## +[ccpp-arg-table] + name = GFS_rrtmgp_setup_finalize + type = scheme +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out + optional = F +[errflg] + standard_name = ccpp_error_flag + long_name = error flag for error handling in CCPP + units = flag + dimensions = () + type = integer + intent = out + optional = F diff --git a/physics/GFS_rrtmgp_sw_post.F90 b/physics/GFS_rrtmgp_sw_post.F90 index a1a4dd7d8..c53350d2a 100644 --- a/physics/GFS_rrtmgp_sw_post.F90 +++ b/physics/GFS_rrtmgp_sw_post.F90 @@ -25,31 +25,8 @@ end subroutine GFS_rrtmgp_sw_post_init ! PGI compiler does not accept lines longer than 264 characters, remove during pre-processing #ifndef __PGI -!> \section arg_table_GFS_rrtmgp_sw_post_run Argument Table -!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | -!! |-------------------|------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------|----------|------|----------------------|-----------|--------|----------| -!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | -!! | Grid | GFS_grid_type_instance | Fortran DDT containing FV3-GFS grid and interpolation related data | DDT | 0 | GFS_grid_type | | in | F | -!! | Diag | GFS_diag_type_instance | Fortran DDT containing FV3-GFS diagnotics data | DDT | 0 | GFS_diag_type | | inout | F | -!! | Radtend | GFS_radtend_type_instance | Fortran DDT containing FV3-GFS radiation tendencies | DDT | 0 | GFS_radtend_type | | inout | F | -!! | Coupling | GFS_coupling_type_instance | Fortran DDT containing FV3-GFS fields to/from coupling with other components | DDT | 0 | GFS_coupling_type | | inout | F | -!! | scmpsw | components_of_surface_downward_shortwave_fluxes | derived type for special components of surface downward shortwave fluxes | W m-2 | 1 | cmpfsw_type | | inout | T | -!! | im | horizontal_loop_extent | horizontal loop extent | count | 0 | integer | | in | F | -!! | p_lev | air_pressure_at_interface_for_RRTMGP_in_hPa | air pressure level | hPa | 2 | real | kind_phys | in | F | -!! | nday | daytime_points_dimension | daytime points dimension | count | 0 | integer | | in | F | -!! | idxday | daytime_points | daytime points | index | 1 | integer | | in | F | -!! | fluxswUP_allsky | sw_flux_profile_upward_allsky | RRTMGP upward shortwave all-sky flux profile | W m-2 | 2 | real | kind_phys | in | F | -!! | fluxswDOWN_allsky | sw_flux_profile_downward_allsky | RRTMGP downward shortwave all-sky flux profile | W m-2 | 2 | real | kind_phys | in | F | -!! | fluxswUP_clrsky | sw_flux_profile_upward_clrsky | RRTMGP upward shortwave clr-sky flux profile | W m-2 | 2 | real | kind_phys | in | F | -!! | fluxswDOWN_clrsky | sw_flux_profile_downward_clrsky | RRTMGP downward shortwave clr-sky flux profile | W m-2 | 2 | real | kind_phys | in | F | -!! | sw_gas_props | coefficients_for_sw_gas_optics | DDT containing spectral information for RRTMGP SW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | -!! | hswc | tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step | shortwave total sky heating rate | K s-1 | 2 | real | kind_phys | out | F | -!! | topflx_sw | sw_fluxes_top_atmosphere | shortwave total sky fluxes at the top of the atm | W m-2 | 1 | topfsw_type | | inout | F | -!! | sfcflx_sw | sw_fluxes_sfc | shortwave total sky fluxes at the Earth surface | W m-2 | 1 | sfcfsw_type | | inout | F | -!! | flxprf_sw | sw_fluxes | sw fluxes total sky / csk and up / down at levels | W m-2 | 2 | profsw_type | | inout | T | -!! | hsw0 | tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_time_step | shortwave clear sky heating rate | K s-1 | 2 | real | kind_phys | inout | T | -!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | -!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!> \section arg_table_GFS_rrtmgp_sw_post +!! \htmlinclude GFS_rrtmgp_sw_post.html !! #endif subroutine GFS_rrtmgp_sw_post_run (Model, Grid, Diag, Radtend, Coupling, & diff --git a/physics/GFS_rrtmgp_sw_post.meta b/physics/GFS_rrtmgp_sw_post.meta new file mode 100644 index 000000000..00bc675fe --- /dev/null +++ b/physics/GFS_rrtmgp_sw_post.meta @@ -0,0 +1,187 @@ +[ccpp-arg-table] + name = GFS_rrtmgp_sw_post_run + type = scheme +[Model] + standard_name = GFS_control_type + long_name = Fortran DDT containing FV3-GFS model control parameters + units = DDT + dimensions = () + type = GFS_control_type + intent = in + optional = F +[Grid] + standard_name = GFS_grid_type + long_name = Fortran DDT containing FV3-GFS grid and interpolation related data + units = DDT + dimensions = () + type = GFS_grid_type + intent = in + optional = F +[Diag] + standard_name = GFS_diag_type + long_name = Fortran DDT containing FV3-GFS diagnotics data + units = DDT + dimensions = () + type = GFS_diag_type + intent = inout + optional = F +[Radtend] + standard_name = GFS_radtend_type + long_name = Fortran DDT containing FV3-GFS radiation tendencies + units = DDT + dimensions = () + type = GFS_radtend_type + intent = inout + optional = F +[Coupling] + standard_name = GFS_coupling_type + long_name = Fortran DDT containing FV3-GFS fields to/from coupling with other components + units = DDT + dimensions = () + type = GFS_coupling_type + intent = inout + optional = F +[scmpsw] + standard_name = components_of_surface_downward_shortwave_fluxes + long_name = derived type for special components of surface downward shortwave fluxes + units = W m-2 + dimensions = (horizontal_dimension) + type = cmpfsw_type + intent = inout + optional = T +[im] + standard_name = horizontal_loop_extent + long_name = horizontal loop extent + units = count + dimensions = () + type = integer + intent = in + optional = F +[p_lev] + standard_name = air_pressure_at_interface_for_RRTMGP_in_hPa + long_name = air pressure level + units = hPa + dimensions = (horizontal_dimension,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = in + optional = F +[nday] + standard_name = daytime_points_dimension + long_name = daytime points dimension + units = count + dimensions = () + type = integer + intent = in + optional = F +[idxday] + standard_name = daytime_points + long_name = daytime points + units = index + dimensions = (horizontal_dimension) + type = integer + intent = in + optional = F +[fluxswUP_allsky] + standard_name = sw_flux_profile_upward_allsky + long_name = RRTMGP upward shortwave all-sky flux profile + units = W m-2 + dimensions = (horizontal_dimension,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = in + optional = F +[fluxswDOWN_allsky] + standard_name = sw_flux_profile_downward_allsky + long_name = RRTMGP downward shortwave all-sky flux profile + units = W m-2 + dimensions = (horizontal_dimension,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = in + optional = F +[fluxswUP_clrsky] + standard_name = sw_flux_profile_upward_clrsky + long_name = RRTMGP upward shortwave clr-sky flux profile + units = W m-2 + dimensions = (horizontal_dimension,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = in + optional = F +[fluxswDOWN_clrsky] + standard_name = sw_flux_profile_downward_clrsky + long_name = RRTMGP downward shortwave clr-sky flux profile + units = W m-2 + dimensions = (horizontal_dimension,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = in + optional = F +[sw_gas_props] + standard_name = coefficients_for_sw_gas_optics + long_name = DDT containing spectral information for RRTMGP SW radiation scheme + units = DDT + dimensions = () + type = ty_gas_optics_rrtmgp + intent = in + optional = F +[hswc] + standard_name = tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step + long_name = shortwave total sky heating rate + units = K s-1 + dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + type = real + kind = kind_phys + intent = out + optional = F +[topflx_sw] + standard_name = sw_fluxes_top_atmosphere + long_name = shortwave total sky fluxes at the top of the atm + units = W m-2 + dimensions = (horizontal_dimension) + type = topfsw_type + intent = inout + optional = F +[sfcflx_sw] + standard_name = sw_fluxes_sfc + long_name = shortwave total sky fluxes at the Earth surface + units = W m-2 + dimensions = (horizontal_dimension) + type = sfcfsw_type + intent = inout + optional = F +[flxprf_sw] + standard_name = sw_fluxes + long_name = sw fluxes total sky / csk and up / down at levels + units = W m-2 + dimensions = (horizontal_dimension,adjusted_vertical_level_dimension_for_radiation) + type = profsw_type + intent = inout + optional = T +[hsw0] + standard_name = sw_heating_rate_clear_sky + long_name = shortwave clear sky heating rate + units = K s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = T +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out + optional = F +[errflg] + standard_name = ccpp_error_flag + long_name = error flag for error handling in CCPP + units = flag + dimensions = () + type = integer + intent = out + optional = F diff --git a/physics/rrtmgp_lw_cloud_optics.F90 b/physics/rrtmgp_lw_cloud_optics.F90 index 850d1307b..142dc9085 100644 --- a/physics/rrtmgp_lw_cloud_optics.F90 +++ b/physics/rrtmgp_lw_cloud_optics.F90 @@ -15,16 +15,8 @@ module rrtmgp_lw_cloud_optics public rrtmgp_lw_cloud_optics_init, rrtmgp_lw_cloud_optics_run, rrtmgp_lw_cloud_optics_finalize contains -!! \section arg_table_rrtmgp_lw_cloud_optics_init Argument Table -!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | -!! |----------------|----------------------------------|--------------------------------------------------------------------|-------|------|------------------|-------|--------|----------| -!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | -!! | mpirank | mpi_rank | current MPI rank | index | 0 | integer | | in | F | -!! | mpiroot | mpi_root | master MPI rank | index | 0 | integer | | in | F | -!! | mpicomm | mpi_comm | MPI communicator | index | 0 | integer | | in | F | -!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | -!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | -!! | lw_cloud_props | coefficients_for_lw_cloud_optics | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_cloud_optics | | out | F | +!! \section arg_table_rrtmgp_lw_cloud_optics +!! \htmlinclude rrtmgp_lw_cloud_optics.html !! ! ######################################################################################### ! SUBROUTINE rrtmgp_lw_cloud_optics_init() @@ -312,30 +304,8 @@ subroutine rrtmgp_lw_cloud_optics_init(Model, mpicomm, mpirank, mpiroot, lw_clou end subroutine rrtmgp_lw_cloud_optics_init -!! \section arg_table_rrtmgp_lw_cloud_optics_run Argument Table -!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | -!! |-----------------------|-----------------------------------------------------|------------------------------------------------------------------------------|---------|------|-----------------------|-----------|--------|----------| -!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | -!! | ncol | horizontal_loop_extent | horizontal dimension | count | 0 | integer | | in | F | -!! | cld_frac | total_cloud_fraction | layer total cloud fraction | frac | 2 | real | kind_phys | in | F | -!! | cld_lwp | cloud_liquid_water_path | layer cloud liquid water path | g m-2 | 2 | real | kind_phys | in | F | -!! | cld_reliq | mean_effective_radius_for_liquid_cloud | mean effective radius for liquid cloud | micron | 2 | real | kind_phys | in | F | -!! | cld_iwp | cloud_ice_water_path | layer cloud ice water path | g m-2 | 2 | real | kind_phys | in | F | -!! | cld_reice | mean_effective_radius_for_ice_cloud | mean effective radius for ice cloud | micron | 2 | real | kind_phys | in | F | -!! | cld_swp | cloud_snow_water_path | layer cloud snow water path | g m-2 | 2 | real | kind_phys | in | F | -!! | cld_resnow | mean_effective_radius_for_snow_flake | mean effective radius for snow cloud | micron | 2 | real | kind_phys | in | F | -!! | cld_rwp | cloud_rain_water_path | layer cloud rain water path | g m-2 | 2 | real | kind_phys | in | F | -!! | cld_rerain | mean_effective_radius_for_rain_drop | mean effective radius for rain cloud | micron | 2 | real | kind_phys | in | F | -!! | icseed_lw | seed_random_numbers_sw | seed for random number generation for shortwave radiation | none | 1 | integer | | in | F | -!! | aerosols | aerosol_optical_properties_for_longwave_bands_01-16 | aerosol optical properties for longwave bands 01-16 | various | 4 | real | kind_phys | in | F | -!! | lw_cloud_props | coefficients_for_lw_cloud_optics | DDT containing spectral information for cloudy RRTMGP LW radiation scheme | DDT | 0 | ty_cloud_optics | | in | F | -!! | lw_gas_props | coefficients_for_lw_gas_optics | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | -!! | ipsdlw0 | initial_permutation_seed_lw | initial seed for McICA LW | none | 0 | integer | | in | F | -!! | optical_props_clouds | longwave_optical_properties_for_cloudy_atmosphere | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_1scl | | out | F | -!! | optical_props_aerosol | longwave_optical_properties_for_aerosols | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_1scl | | out | F | -!! | cldtaulw | cloud_optical_depth_layers_at_10mu_band | approx 10mu band layer cloud optical depth | none | 2 | real | kind_phys | out | F | -!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | -!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! \section arg_table_rrtmgp_lw_cloud_optics +!! \html_include rrtmgp_lw_cloud_optics.html !! ! ######################################################################################### ! SUBROUTINE rrtmgp_lw_cloud_optics_run() diff --git a/physics/rrtmgp_lw_cloud_optics.meta b/physics/rrtmgp_lw_cloud_optics.meta new file mode 100644 index 000000000..a3b39c6e9 --- /dev/null +++ b/physics/rrtmgp_lw_cloud_optics.meta @@ -0,0 +1,245 @@ +[ccpp-arg-table] + name = rrtmgp_lw_cloud_optics_init + type = scheme +[Model] + standard_name = GFS_control_type + long_name = Fortran DDT containing FV3-GFS model control parameters + units = DDT + dimensions = () + type = GFS_control_type + intent = in + optional = F +[mpirank] + standard_name = mpi_rank + long_name = current MPI rank + units = index + dimensions = () + type = integer + intent = in + optional = F +[mpiroot] + standard_name = mpi_root + long_name = master MPI rank + units = index + dimensions = () + type = integer + intent = in + optional = F +[mpicomm] + standard_name = mpi_comm + long_name = MPI communicator + units = index + dimensions = () + type = integer + intent = in + optional = F +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out + optional = F +[errflg] + standard_name = ccpp_error_flag + long_name = error flag for error handling in CCPP + units = flag + dimensions = () + type = integer + intent = out + optional = F +[lw_cloud_props] + standard_name = coefficients_for_lw_cloud_optics + long_name = DDT containing spectral information for RRTMGP LW radiation scheme + units = DDT + dimensions = () + type = ty_cloud_optics + intent = out + optional = F + +######################################################################## +[ccpp-arg-table] + name = rrtmgp_lw_cloud_optics_run + type = scheme +[Model] + standard_name = GFS_control_type + long_name = Fortran DDT containing FV3-GFS model control parameters + units = DDT + dimensions = () + type = GFS_control_type + intent = in + optional = F +[ncol] + standard_name = horizontal_loop_extent + long_name = horizontal dimension + units = count + dimensions = () + type = integer + intent = in + optional = F +[cld_frac] + standard_name = total_cloud_fraction + long_name = layer total cloud fraction + units = frac + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[cld_lwp] + standard_name = RRTMGP_cloud_liquid_water_path + long_name = layer cloud liquid water path + units = g m-2 + dimensions = (horizontal_dimension,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = in + optional = F +[cld_reliq] + standard_name = RRTMGP_mean_effective_radius_for_liquid_cloud + long_name = mean effective radius for liquid cloud + units = micron + dimensions = (horizontal_dimension,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = in + optional = F +[cld_iwp] + standard_name = RRTMGP_cloud_ice_water_path + long_name = layer cloud ice water path + units = g m-2 + dimensions = (horizontal_dimension,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = in + optional = F +[cld_reice] + standard_name = RRTMGP_mean_effective_radius_for_ice_cloud + long_name = mean effective radius for ice cloud + units = micron + dimensions = (horizontal_dimension,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = in + optional = F +[cld_swp] + standard_name = RRTMGP_cloud_snow_water_path + long_name = layer cloud snow water path + units = g m-2 + dimensions = (horizontal_dimension,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = in + optional = F +[cld_resnow] + standard_name = RRTMGP_mean_effective_radius_for_snow_flake + long_name = mean effective radius for snow cloud + units = micron + dimensions = (horizontal_dimension,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = in + optional = F +[cld_rwp] + standard_name = RRTMGP_cloud_rain_water_path + long_name = layer cloud rain water path + units = g m-2 + dimensions = (horizontal_dimension,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = in + optional = F +[cld_rerain] + standard_name = RRTMGP_mean_effective_radius_for_rain_drop + long_name = mean effective radius for rain cloud + units = micron + dimensions = (horizontal_dimension,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = in + optional = F +[icseed_lw] + standard_name = seed_random_numbers_sw + long_name = seed for random number generation for shortwave radiation + units = none + dimensions = (horizontal_dimension) + type = integer + intent = in + optional = F +[aerosols] + standard_name = aerosol_optical_properties_for_longwave_bands_01_16 + long_name = aerosol optical properties for longwave bands 01-16 + units = various + dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_longwave_radiation,number_of_aerosol_output_fields_for_longwave_radiation) + type = real + kind = kind_phys + intent = in + optional = F +[lw_cloud_props] + standard_name = coefficients_for_lw_cloud_optics + long_name = DDT containing spectral information for cloudy RRTMGP LW radiation scheme + units = DDT + dimensions = () + type = ty_cloud_optics + intent = in + optional = F +[lw_gas_props] + standard_name = coefficients_for_lw_gas_optics + long_name = DDT containing spectral information for RRTMGP LW radiation scheme + units = DDT + dimensions = () + type = ty_gas_optics_rrtmgp + intent = in + optional = F +[ipsdlw0] + standard_name = initial_permutation_seed_lw + long_name = initial seed for McICA LW + units = none + dimensions = () + type = integer + intent = in + optional = F +[optical_props_clouds] + standard_name = longwave_optical_properties_for_cloudy_atmosphere + long_name = Fortran DDT containing RRTMGP optical properties + units = DDT + dimensions = () + type = ty_optical_props_1scl + intent = out + optional = F +[optical_props_aerosol] + standard_name = longwave_optical_properties_for_aerosols + long_name = Fortran DDT containing RRTMGP optical properties + units = DDT + dimensions = () + type = ty_optical_props_1scl + intent = out + optional = F +[cldtaulw] + standard_name = cloud_optical_depth_layers_at_10mu_band + long_name = approx 10mu band layer cloud optical depth + units = none + dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + type = real + kind = kind_phys + intent = out + optional = F +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out + optional = F +[errflg] + standard_name = ccpp_error_flag + long_name = error flag for error handling in CCPP + units = flag + dimensions = () + type = integer + intent = out + optional = F diff --git a/physics/rrtmgp_lw_clrallsky_driver.F90 b/physics/rrtmgp_lw_clrallsky_driver.F90 index e1d360dce..9d438aed0 100644 --- a/physics/rrtmgp_lw_clrallsky_driver.F90 +++ b/physics/rrtmgp_lw_clrallsky_driver.F90 @@ -24,29 +24,8 @@ end subroutine rrtmgp_lw_clrallsky_driver_init ! ######################################################################################### ! SUBROUTINE rrtmgp_lw_clrallsky_driver_run ! ######################################################################################### -!! \section arg_table_rrtmgp_lw_clrallsky_driver_run Argument Table -!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | -!! |-------------------------|-----------------------------------------------------------------------------------------------|--------------------------------------------------------------------|-------|------|-----------------------|-----------|--------|----------| -!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | -!! | Radtend | GFS_radtend_type_instance | Fortran DDT containing FV3-GFS radiation tendencies | DDT | 0 | GFS_radtend_type | | in | F | -!! | ncol | horizontal_loop_extent | horizontal dimension | count | 0 | integer | | in | F | -!! | p_lay | air_pressure_at_layer_for_RRTMGP_in_hPa | air pressure layer | hPa | 2 | real | kind_phys | in | F | -!! | p_lev | air_pressure_at_interface_for_RRTMGP_in_hPa | air pressure level | hPa | 2 | real | kind_phys | in | F | -!! | t_lay | air_temperature_at_layer_for_RRTMGP | air temperature layer | K | 2 | real | kind_phys | in | F | -!! | skt | surface_ground_temperature_for_radiation | surface ground temperature for radiation | K | 1 | real | kind_phys | in | F | -!! | lw_gas_props | coefficients_for_lw_gas_optics | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | -!! | optical_propsLW_clds | longwave_optical_properties_for_cloudy_atmosphere | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_1scl | | in | F | -!! | optical_propsLW_aerosol | longwave_optical_properties_for_aerosols | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_1scl | | in | F | -!! | gas_concentrations | Gas_concentrations_for_RRTMGP_suite | DDT containing gas concentrations for RRTMGP radiation scheme | DDT | 0 | ty_gas_concs | | in | F | -!! | lslwr | flag_to_calc_lw | flag to calculate LW irradiances | flag | 0 | logical | | in | F | -!! | hlw0 | tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_time_step | longwave clear sky heating rate | K s-1 | 2 | real | kind_phys | in | T | -!! | hlwb | lw_heating_rate_spectral | longwave total sky heating rate (spectral) | K s-1 | 3 | real | kind_phys | in | T | -!! | fluxUP_allsky | lw_flux_profile_upward_allsky | RRTMGP upward longwave all-sky flux profile | W m-2 | 2 | real | kind_phys | out | F | -!! | fluxDOWN_allsky | lw_flux_profile_downward_allsky | RRTMGP downward longwave all-sky flux profile | W m-2 | 2 | real | kind_phys | out | F | -!! | fluxUP_clrsky | lw_flux_profile_upward_clrsky | RRTMGP upward longwave clr-sky flux profile | W m-2 | 2 | real | kind_phys | out | F | -!! | fluxDOWN_clrsky | lw_flux_profile_downward_clrsky | RRTMGP downward longwave clr-sky flux profile | W m-2 | 2 | real | kind_phys | out | F | -!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | -!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! \section arg_table_rrtmgp_lw_clrallsky_drive +!! \htmlinclude rrtmgp_lw_clrallsky_driver.html !! subroutine rrtmgp_lw_clrallsky_driver_run(Model, Radtend, ncol, lw_gas_props, p_lay, t_lay, p_lev, skt, & gas_concentrations, optical_propsLW_clds, optical_propsLW_aerosol,& diff --git a/physics/rrtmgp_lw_clrallsky_driver.meta b/physics/rrtmgp_lw_clrallsky_driver.meta new file mode 100644 index 000000000..bc520ad64 --- /dev/null +++ b/physics/rrtmgp_lw_clrallsky_driver.meta @@ -0,0 +1,174 @@ +[ccpp-arg-table] + name = rrtmgp_lw_clrallsky_driver_run + type = scheme +[Model] + standard_name = GFS_control_type + long_name = Fortran DDT containing FV3-GFS model control parameters + units = DDT + dimensions = () + type = GFS_control_type + intent = in + optional = F +[Radtend] + standard_name = GFS_radtend_type + long_name = Fortran DDT containing FV3-GFS radiation tendencies + units = DDT + dimensions = () + type = GFS_radtend_type + intent = in + optional = F +[ncol] + standard_name = horizontal_loop_extent + long_name = horizontal dimension + units = count + dimensions = () + type = integer + intent = in + optional = F +[p_lay] + standard_name = air_pressure_at_layer_for_RRTMGP_in_hPa + long_name = air pressure layer + units = hPa + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[p_lev] + standard_name = air_pressure_at_interface_for_RRTMGP_in_hPa + long_name = air pressure level + units = hPa + dimensions = (horizontal_dimension,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = in + optional = F +[t_lay] + standard_name = air_temperature_at_layer_for_RRTMGP + long_name = air temperature layer + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[skt] + standard_name = surface_ground_temperature_for_radiation + long_name = surface ground temperature for radiation + units = K + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[lw_gas_props] + standard_name = coefficients_for_lw_gas_optics + long_name = DDT containing spectral information for RRTMGP LW radiation scheme + units = DDT + dimensions = () + type = ty_gas_optics_rrtmgp + intent = in + optional = F +[optical_propsLW_clds] + standard_name = longwave_optical_properties_for_cloudy_atmosphere + long_name = Fortran DDT containing RRTMGP optical properties + units = DDT + dimensions = () + type = ty_optical_props_1scl + intent = in + optional = F +[optical_propsLW_aerosol] + standard_name = longwave_optical_properties_for_aerosols + long_name = Fortran DDT containing RRTMGP optical properties + units = DDT + dimensions = () + type = ty_optical_props_1scl + intent = in + optional = F +[gas_concentrations] + standard_name = Gas_concentrations_for_RRTMGP_suite + long_name = DDT containing gas concentrations for RRTMGP radiation scheme + units = DDT + dimensions = () + type = ty_gas_concs + intent = in + optional = F +[lslwr] + standard_name = flag_to_calc_lw + long_name = flag to calculate LW irradiances + units = flag + dimensions = () + type = logical + intent = in + optional = F +[hlw0] + standard_name = tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_time_step + long_name = longwave clear sky heating rate + units = K s-1 + dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + type = real + kind = kind_phys + intent = in + optional = T +[hlwb] + standard_name = lw_heating_rate_spectral + long_name = longwave total sky heating rate (spectral) + units = K s-1 + dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_longwave_radiation) + type = real + kind = kind_phys + intent = in + optional = T +[fluxUP_allsky] + standard_name = lw_flux_profile_upward_allsky + long_name = RRTMGP upward longwave all-sky flux profile + units = W m-2 + dimensions = (horizontal_dimension,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = out + optional = F +[fluxDOWN_allsky] + standard_name = lw_flux_profile_downward_allsky + long_name = RRTMGP downward longwave all-sky flux profile + units = W m-2 + dimensions = (horizontal_dimension,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = out + optional = F +[fluxUP_clrsky] + standard_name = lw_flux_profile_upward_clrsky + long_name = RRTMGP upward longwave clr-sky flux profile + units = W m-2 + dimensions = (horizontal_dimension,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = out + optional = F +[fluxDOWN_clrsky] + standard_name = lw_flux_profile_downward_clrsky + long_name = RRTMGP downward longwave clr-sky flux profile + units = W m-2 + dimensions = (horizontal_dimension,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = out + optional = F +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out + optional = F +[errflg] + standard_name = ccpp_error_flag + long_name = error flag for error handling in CCPP + units = flag + dimensions = () + type = integer + intent = out + optional = F diff --git a/physics/rrtmgp_lw_gas_optics.F90 b/physics/rrtmgp_lw_gas_optics.F90 index 5b92f8894..f17b1f675 100644 --- a/physics/rrtmgp_lw_gas_optics.F90 +++ b/physics/rrtmgp_lw_gas_optics.F90 @@ -18,18 +18,8 @@ module rrtmgp_lw_gas_optics ! ######################################################################################### ! SUBROUTINE rrtmgp_sw_gas_optics_init ! ######################################################################################### -!! \section arg_table_rrtmgp_lw_gas_optics_init Argument Table -!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | -!! |--------------|----------------------------------------------|--------------------------------------------------------------------|-------|------|----------------------|-------|--------|----------| -!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | -!! | Radtend | GFS_radtend_type_instance | Fortran DDT containing FV3-GFS radiation tendencies | DDT | 0 | GFS_radtend_type | | in | F | -!! | mpirank | mpi_rank | current MPI rank | index | 0 | integer | | in | F | -!! | mpiroot | mpi_root | master MPI rank | index | 0 | integer | | in | F | -!! | mpicomm | mpi_comm | MPI communicator | index | 0 | integer | | in | F | -!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | -!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | -!! | ipsdlw0 | initial_permutation_seed_lw | initial seed for McICA LW | none | 0 | integer | | out | F | -!! | lw_gas_props | coefficients_for_lw_gas_optics | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | out | F | +!! \section arg_table_rrtmgp_lw_gas_optics +!! \htmlinclude rrtmgp_lw_gas_optics.html !! subroutine rrtmgp_lw_gas_optics_init(Model, Radtend, mpicomm, mpirank, mpiroot, lw_gas_props, & ipsdlw0, errmsg, errflg) @@ -422,25 +412,8 @@ end subroutine rrtmgp_lw_gas_optics_init ! If calling rte/mo_rte_sw.F90:rte_sw() directly, place calls to compute source ! function and gas_optics() here. ! ######################################################################################### -!! \section arg_table_rrtmgp_lw_gas_optics_run Argument Table -!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | -!! |----------------------|------------------------------------------------------------------------|--------------------------------------------------------------------|-------|------|-----------------------|-----------|--------|----------| -!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | -!! | Radtend | GFS_radtend_type_instance | Fortran DDT containing FV3-GFS radiation tendencies | DDT | 0 | GFS_radtend_type | | in | F | -!! | lw_gas_props | coefficients_for_lw_gas_optics | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | -!! | ncol | horizontal_loop_extent | horizontal dimension | count | 0 | integer | | in | F | -!! | p_lay | air_pressure_at_layer_for_RRTMGP_in_hPa | air pressure layer | hPa | 2 | real | kind_phys | in | F | -!! | p_lev | air_pressure_at_interface_for_RRTMGP_in_hPa | air pressure level | hPa | 2 | real | kind_phys | in | F | -!! | t_lay | air_temperature_at_layer_for_RRTMGP | air temperature layer | K | 2 | real | kind_phys | in | F | -!! | t_lev | air_temperature_at_interface_for_RRTMGP | air temperature level | K | 2 | real | kind_phys | in | F | -!! | skt | surface_ground_temperature_for_radiation | surface ground temperature for radiation | K | 1 | real | kind_phys | in | F | -!! | gas_concentrations | Gas_concentrations_for_RRTMGP_suite | DDT containing gas concentrations for RRTMGP radiation scheme | DDT | 0 | ty_gas_concs | | in | F | -!! | lslwr | flag_to_calc_lw | flag to calculate LW irradiances | flag | 0 | logical | | in | F | -!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | -!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | -!! | optical_props_clrsky | longwave_optical_properties_for_clear_sky | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_1scl | | out | F | -!! | sources_LW | longwave_source_function | Fortran DDT containing RRTMGP source functions | DDT | 0 | ty_source_func_lw | | out | F | -!! | toa_src | incident_terrestrial_irradiance_at_top_of_atmosphere_by_spectral_point | top of atmosphere incident terrestrial flux in each spectral point | | 2 | real | kind_phys | out | F | +!! \section arg_table_rrtmgp_lw_gas_optics +!! \htmlinclude rrtmgp_lw_gas_optics.html !! subroutine rrtmgp_lw_gas_optics_run(Model, Radtend, lw_gas_props, ncol, p_lay, p_lev, t_lay, t_lev, skt, & gas_concentrations, lslwr, optical_props_clrsky, sources_LW, toa_src, errmsg, errflg) diff --git a/physics/rrtmgp_lw_gas_optics.meta b/physics/rrtmgp_lw_gas_optics.meta new file mode 100644 index 000000000..8b1f59822 --- /dev/null +++ b/physics/rrtmgp_lw_gas_optics.meta @@ -0,0 +1,216 @@ +[ccpp-arg-table] + name = rrtmgp_lw_gas_optics_init + type = scheme +[Model] + standard_name = GFS_control_type + long_name = Fortran DDT containing FV3-GFS model control parameters + units = DDT + dimensions = () + type = GFS_control_type + intent = in + optional = F +[Radtend] + standard_name = GFS_radtend_type + long_name = Fortran DDT containing FV3-GFS radiation tendencies + units = DDT + dimensions = () + type = GFS_radtend_type + intent = in + optional = F +[mpirank] + standard_name = mpi_rank + long_name = current MPI rank + units = index + dimensions = () + type = integer + intent = in + optional = F +[mpiroot] + standard_name = mpi_root + long_name = master MPI rank + units = index + dimensions = () + type = integer + intent = in + optional = F +[mpicomm] + standard_name = mpi_comm + long_name = MPI communicator + units = index + dimensions = () + type = integer + intent = in + optional = F +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out + optional = F +[errflg] + standard_name = ccpp_error_flag + long_name = error flag for error handling in CCPP + units = flag + dimensions = () + type = integer + intent = out + optional = F +[ipsdlw0] + standard_name = initial_permutation_seed_lw + long_name = initial seed for McICA LW + units = none + dimensions = () + type = integer + intent = out + optional = F +[lw_gas_props] + standard_name = coefficients_for_lw_gas_optics + long_name = DDT containing spectral information for RRTMGP LW radiation scheme + units = DDT + dimensions = () + type = ty_gas_optics_rrtmgp + intent = out + optional = F + +######################################################################## +[ccpp-arg-table] + name = rrtmgp_lw_gas_optics_run + type = scheme +[Model] + standard_name = GFS_control_type + long_name = Fortran DDT containing FV3-GFS model control parameters + units = DDT + dimensions = () + type = GFS_control_type + intent = in + optional = F +[Radtend] + standard_name = GFS_radtend_type + long_name = Fortran DDT containing FV3-GFS radiation tendencies + units = DDT + dimensions = () + type = GFS_radtend_type + intent = in + optional = F +[lw_gas_props] + standard_name = coefficients_for_lw_gas_optics + long_name = DDT containing spectral information for RRTMGP LW radiation scheme + units = DDT + dimensions = () + type = ty_gas_optics_rrtmgp + intent = in + optional = F +[ncol] + standard_name = horizontal_loop_extent + long_name = horizontal dimension + units = count + dimensions = () + type = integer + intent = in + optional = F +[p_lay] + standard_name = air_pressure_at_layer_for_RRTMGP_in_hPa + long_name = air pressure layer + units = hPa + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[p_lev] + standard_name = air_pressure_at_interface_for_RRTMGP_in_hPa + long_name = air pressure level + units = hPa + dimensions = (horizontal_dimension,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = in + optional = F +[t_lay] + standard_name = air_temperature_at_layer_for_RRTMGP + long_name = air temperature layer + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[t_lev] + standard_name = air_temperature_at_interface_for_RRTMGP + long_name = air temperature level + units = K + dimensions = (horizontal_dimension,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = in + optional = F +[skt] + standard_name = surface_ground_temperature_for_radiation + long_name = surface ground temperature for radiation + units = K + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[gas_concentrations] + standard_name = Gas_concentrations_for_RRTMGP_suite + long_name = DDT containing gas concentrations for RRTMGP radiation scheme + units = DDT + dimensions = () + type = ty_gas_concs + intent = in + optional = F +[lslwr] + standard_name = flag_to_calc_lw + long_name = flag to calculate LW irradiances + units = flag + dimensions = () + type = logical + intent = in + optional = F +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out + optional = F +[errflg] + standard_name = ccpp_error_flag + long_name = error flag for error handling in CCPP + units = flag + dimensions = () + type = integer + intent = out + optional = F +[optical_props_clrsky] + standard_name = longwave_optical_properties_for_clear_sky + long_name = Fortran DDT containing RRTMGP optical properties + units = DDT + dimensions = () + type = ty_optical_props_1scl + intent = out + optional = F +[sources_LW] + standard_name = longwave_source_function + long_name = Fortran DDT containing RRTMGP source functions + units = DDT + dimensions = () + type = ty_source_func_lw + intent = out + optional = F +[toa_src] + standard_name = incident_terrestrial_irradiance_at_top_of_atmosphere_by_spectral_point + long_name = top of atmosphere incident terrestrial flux in each spectral point + units = + dimensions = (horizontal_dimension,number_of_sw_spectral_points_rrtmgp) + type = real + kind = kind_phys + intent = out + optional = F diff --git a/physics/rrtmgp_lw_rte.F90 b/physics/rrtmgp_lw_rte.F90 index 870a1a8f6..c6bb4f40a 100644 --- a/physics/rrtmgp_lw_rte.F90 +++ b/physics/rrtmgp_lw_rte.F90 @@ -24,32 +24,9 @@ end subroutine rrtmgp_lw_rte_init ! ######################################################################################### ! SUBROUTINE rrtmgp_lw_rte_run ! ######################################################################################### -!! \section arg_table_rrtmgp_lw_rte_run Argument Table -!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | -!! |-----------------------|-----------------------------------------------------------------------------------------------|---------------------------------------------------------------------|-------|------|-----------------------|-----------|--------|----------| -!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | -!! | Radtend | GFS_radtend_type_instance | Fortran DDT containing FV3-GFS radiation tendencies | DDT | 0 | GFS_radtend_type | | in | F | -!! | Statein | GFS_statein_type_instance | Fortran DDT containing FV3-GFS prognostic state data in from dycore | DDT | 0 | GFS_statein_type | | in | F | -!! | ncol | horizontal_loop_extent | horizontal dimension | count | 0 | integer | | in | F | -!! | p_lay | air_pressure_at_layer_for_RRTMGP_in_hPa | air pressure layer | hPa | 2 | real | kind_phys | in | F | -!! | p_lev | air_pressure_at_interface_for_RRTMGP_in_hPa | air pressure level | hPa | 2 | real | kind_phys | in | F | -!! | t_lay | air_temperature_at_layer_for_RRTMGP | air temperature layer | K | 2 | real | kind_phys | in | F | -!! | skt | surface_ground_temperature_for_radiation | surface ground temperature for radiation | K | 1 | real | kind_phys | in | F | -!! | lw_gas_props | coefficients_for_lw_gas_optics | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | -!! | optical_props_clrsky | longwave_optical_properties_for_clear_sky | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_1scl | | inout | F | -!! | optical_props_cloud | longwave_optical_properties_for_cloudy_atmosphere | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_1scl | | in | F | -!! | optical_props_aerosol | longwave_optical_properties_for_aerosols | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_1scl | | in | F | -!! | sources | longwave_source_function | Fortran DDT containing RRTMGP source functions | DDT | 0 | ty_source_func_lw | | in | F | -!! | lslwr | flag_to_calc_lw | flag to calculate LW irradiances | flag | 0 | logical | | in | F | -!! | hlw0 | tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_time_step | longwave clear sky heating rate | K s-1 | 2 | real | kind_phys | in | T | -!! | hlwb | lw_heating_rate_spectral | longwave total sky heating rate (spectral) | K s-1 | 3 | real | kind_phys | in | T | -!! | fluxUP_allsky | lw_flux_profile_upward_allsky | RRTMGP upward longwave all-sky flux profile | W m-2 | 2 | real | kind_phys | out | F | -!! | fluxDOWN_allsky | lw_flux_profile_downward_allsky | RRTMGP downward longwave all-sky flux profile | W m-2 | 2 | real | kind_phys | out | F | -!! | fluxUP_clrsky | lw_flux_profile_upward_clrsky | RRTMGP upward longwave clr-sky flux profile | W m-2 | 2 | real | kind_phys | out | F | -!! | fluxDOWN_clrsky | lw_flux_profile_downward_clrsky | RRTMGP downward longwave clr-sky flux profile | W m-2 | 2 | real | kind_phys | out | F | -!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | -!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | -!! +!! \section arg_table_rrtmgp_lw_rte +!! \htmlinclude rrtmgp_lw_rte.html +! subroutine rrtmgp_lw_rte_run(Model, Statein, Radtend, ncol, lw_gas_props, p_lay, t_lay, p_lev, & skt, sources, optical_props_clrsky, optical_props_cloud, optical_props_aerosol, lslwr,& fluxUP_allsky, fluxDOWN_allsky, fluxUP_clrsky, fluxDOWN_clrsky, hlw0, hlwb, errmsg, errflg) diff --git a/physics/rrtmgp_lw_rte.meta b/physics/rrtmgp_lw_rte.meta new file mode 100644 index 000000000..e3fdb7ac3 --- /dev/null +++ b/physics/rrtmgp_lw_rte.meta @@ -0,0 +1,190 @@ +[ccpp-arg-table] + name = rrtmgp_lw_rte_run + type = scheme +[Model] + standard_name = GFS_control_type + long_name = Fortran DDT containing FV3-GFS model control parameters + units = DDT + dimensions = () + type = GFS_control_type + intent = in + optional = F +[Radtend] + standard_name = GFS_radtend_type + long_name = Fortran DDT containing FV3-GFS radiation tendencies + units = DDT + dimensions = () + type = GFS_radtend_type + intent = in + optional = F +[Statein] + standard_name = GFS_statein_type + long_name = Fortran DDT containing FV3-GFS prognostic state data in from dycore + units = DDT + dimensions = () + type = GFS_statein_type + intent = in + optional = F +[ncol] + standard_name = horizontal_loop_extent + long_name = horizontal dimension + units = count + dimensions = () + type = integer + intent = in + optional = F +[p_lay] + standard_name = air_pressure_at_layer_for_RRTMGP_in_hPa + long_name = air pressure layer + units = hPa + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[p_lev] + standard_name = air_pressure_at_interface_for_RRTMGP_in_hPa + long_name = air pressure level + units = hPa + dimensions = (horizontal_dimension,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = in + optional = F +[t_lay] + standard_name = air_temperature_at_layer_for_RRTMGP + long_name = air temperature layer + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[skt] + standard_name = surface_ground_temperature_for_radiation + long_name = surface ground temperature for radiation + units = K + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[lw_gas_props] + standard_name = coefficients_for_lw_gas_optics + long_name = DDT containing spectral information for RRTMGP LW radiation scheme + units = DDT + dimensions = () + type = ty_gas_optics_rrtmgp + intent = in + optional = F +[optical_props_clrsky] + standard_name = longwave_optical_properties_for_clear_sky + long_name = Fortran DDT containing RRTMGP optical properties + units = DDT + dimensions = () + type = ty_optical_props_1scl + intent = inout + optional = F +[optical_props_cloud] + standard_name = longwave_optical_properties_for_cloudy_atmosphere + long_name = Fortran DDT containing RRTMGP optical properties + units = DDT + dimensions = () + type = ty_optical_props_1scl + intent = in + optional = F +[optical_props_aerosol] + standard_name = longwave_optical_properties_for_aerosols + long_name = Fortran DDT containing RRTMGP optical properties + units = DDT + dimensions = () + type = ty_optical_props_1scl + intent = in + optional = F +[sources] + standard_name = longwave_source_function + long_name = Fortran DDT containing RRTMGP source functions + units = DDT + dimensions = () + type = ty_source_func_lw + intent = in + optional = F +[lslwr] + standard_name = flag_to_calc_lw + long_name = flag to calculate LW irradiances + units = flag + dimensions = () + type = logical + intent = in + optional = F +[hlw0] + standard_name = tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_time_step + long_name = longwave clear sky heating rate + units = K s-1 + dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + type = real + kind = kind_phys + intent = in + optional = T +[hlwb] + standard_name = lw_heating_rate_spectral + long_name = longwave total sky heating rate (spectral) + units = K s-1 + dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_longwave_radiation) + type = real + kind = kind_phys + intent = in + optional = T +[fluxUP_allsky] + standard_name = lw_flux_profile_upward_allsky + long_name = RRTMGP upward longwave all-sky flux profile + units = W m-2 + dimensions = (horizontal_dimension,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = out + optional = F +[fluxDOWN_allsky] + standard_name = lw_flux_profile_downward_allsky + long_name = RRTMGP downward longwave all-sky flux profile + units = W m-2 + dimensions = (horizontal_dimension,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = out + optional = F +[fluxUP_clrsky] + standard_name = lw_flux_profile_upward_clrsky + long_name = RRTMGP upward longwave clr-sky flux profile + units = W m-2 + dimensions = (horizontal_dimension,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = out + optional = F +[fluxDOWN_clrsky] + standard_name = lw_flux_profile_downward_clrsky + long_name = RRTMGP downward longwave clr-sky flux profile + units = W m-2 + dimensions = (horizontal_dimension,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = out + optional = F +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out + optional = F +[errflg] + standard_name = ccpp_error_flag + long_name = error flag for error handling in CCPP + units = flag + dimensions = () + type = integer + intent = out + optional = F diff --git a/physics/rrtmgp_sw_cloud_optics.F90 b/physics/rrtmgp_sw_cloud_optics.F90 index 61c0340d5..eb64a3bde 100644 --- a/physics/rrtmgp_sw_cloud_optics.F90 +++ b/physics/rrtmgp_sw_cloud_optics.F90 @@ -14,16 +14,8 @@ module rrtmgp_sw_cloud_optics contains -!! \section arg_table_rrtmgp_sw_cloud_optics_init Argument Table -!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | -!! |----------------|----------------------------------|--------------------------------------------------------------------|-------|------|------------------|-------|--------|----------| -!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | -!! | mpirank | mpi_rank | current MPI rank | index | 0 | integer | | in | F | -!! | mpiroot | mpi_root | master MPI rank | index | 0 | integer | | in | F | -!! | mpicomm | mpi_comm | MPI communicator | index | 0 | integer | | in | F | -!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | -!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | -!! | sw_cloud_props | coefficients_for_sw_cloud_optics | DDT containing spectral information for RRTMGP SW radiation scheme | DDT | 0 | ty_cloud_optics | | out | F | +!! \section arg_table_rrtmgp_sw_cloud_optics +!! \html_include rrtmgp_lw_cloud_optics.html !! ! ######################################################################################### ! SUBROUTINE sw_cloud_optics_init @@ -313,32 +305,8 @@ subroutine rrtmgp_sw_cloud_optics_init(Model,mpicomm, mpirank, mpiroot, sw_cloud endif end subroutine rrtmgp_sw_cloud_optics_init -!! \section arg_table_rrtmgp_sw_cloud_optics_run Argument Table -!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | -!! |-----------------------|------------------------------------------------------|------------------------------------------------------------------------------|---------|------|-----------------------|-----------|--------|----------| -!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | -!! | ncol | horizontal_loop_extent | horizontal dimension | count | 0 | integer | | in | F | -!! | cld_frac | total_cloud_fraction | layer total cloud fraction | frac | 2 | real | kind_phys | in | F | -!! | cld_lwp | cloud_liquid_water_path | layer cloud liquid water path | g m-2 | 2 | real | kind_phys | in | F | -!! | cld_reliq | mean_effective_radius_for_liquid_cloud | mean effective radius for liquid cloud | micron | 2 | real | kind_phys | in | F | -!! | cld_iwp | cloud_ice_water_path | layer cloud ice water path | g m-2 | 2 | real | kind_phys | in | F | -!! | cld_reice | mean_effective_radius_for_ice_cloud | mean effective radius for ice cloud | micron | 2 | real | kind_phys | in | F | -!! | cld_swp | cloud_snow_water_path | layer cloud snow water path | g m-2 | 2 | real | kind_phys | in | F | -!! | cld_resnow | mean_effective_radius_for_snow_flake | mean effective radius for snow cloud | micron | 2 | real | kind_phys | in | F | -!! | cld_rwp | cloud_rain_water_path | layer cloud rain water path | g m-2 | 2 | real | kind_phys | in | F | -!! | cld_rerain | mean_effective_radius_for_rain_drop | mean effective radius for rain cloud | micron | 2 | real | kind_phys | in | F | -!! | icseed_sw | seed_random_numbers_sw | seed for random number generation for shortwave radiation | none | 1 | integer | | in | F | -!! | aerosols | aerosol_optical_properties_for_shortwave_bands_01-16 | aerosol optical properties for shortwave bands 01-16 | various | 4 | real | kind_phys | in | F | -!! | sw_cloud_props | coefficients_for_sw_cloud_optics | DDT containing spectral information for cloudy RRTMGP SW radiation scheme | DDT | 0 | ty_cloud_optics | | in | F | -!! | sw_gas_props | coefficients_for_sw_gas_optics | DDT containing spectral information for RRTMGP SW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | -!! | ipsdsw0 | initial_permutation_seed_sw | initial seed for McICA SW | none | 0 | integer | | in | F | -!! | nday | daytime_points_dimension | daytime points dimension | count | 0 | integer | | in | F | -!! | idxday | daytime_points | daytime points | index | 1 | integer | | in | F | -!! | optical_props_clouds | shortwave_optical_properties_for_cloudy_atmosphere | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_2str | | out | F | -!! | optical_props_aerosol | shortwave_optical_properties_for_aerosols | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_2str | | out | F | -!! | cldtausw | cloud_optical_depth_layers_at_0.55mu_band | approx .55mu band layer cloud optical depth | none | 2 | real | kind_phys | out | F | -!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | -!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! \section arg_table_rrtmgp_sw_cloud_optics +!! \htmlinclude rrtmgp_sw_cloud_optics.html !! ! ######################################################################################### ! SUBROTUINE rrtmgp_sw_cloud_optics_run() diff --git a/physics/rrtmgp_sw_cloud_optics.meta b/physics/rrtmgp_sw_cloud_optics.meta new file mode 100644 index 000000000..3de57da2c --- /dev/null +++ b/physics/rrtmgp_sw_cloud_optics.meta @@ -0,0 +1,261 @@ +[ccpp-arg-table] + name = rrtmgp_sw_cloud_optics_init + type = scheme +[Model] + standard_name = GFS_control_type + long_name = Fortran DDT containing FV3-GFS model control parameters + units = DDT + dimensions = () + type = GFS_control_type + intent = in + optional = F +[mpirank] + standard_name = mpi_rank + long_name = current MPI rank + units = index + dimensions = () + type = integer + intent = in + optional = F +[mpiroot] + standard_name = mpi_root + long_name = master MPI rank + units = index + dimensions = () + type = integer + intent = in + optional = F +[mpicomm] + standard_name = mpi_comm + long_name = MPI communicator + units = index + dimensions = () + type = integer + intent = in + optional = F +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out + optional = F +[errflg] + standard_name = ccpp_error_flag + long_name = error flag for error handling in CCPP + units = flag + dimensions = () + type = integer + intent = out + optional = F +[sw_cloud_props] + standard_name = coefficients_for_sw_cloud_optics + long_name = DDT containing spectral information for RRTMGP SW radiation scheme + units = DDT + dimensions = () + type = ty_cloud_optics + intent = out + optional = F + +######################################################################## +[ccpp-arg-table] + name = rrtmgp_sw_cloud_optics_run + type = scheme +[Model] + standard_name = GFS_control_type + long_name = Fortran DDT containing FV3-GFS model control parameters + units = DDT + dimensions = () + type = GFS_control_type + intent = in + optional = F +[ncol] + standard_name = horizontal_loop_extent + long_name = horizontal dimension + units = count + dimensions = () + type = integer + intent = in + optional = F +[cld_frac] + standard_name = RRTMGP_total_cloud_fraction + long_name = layer total cloud fraction + units = frac + dimensions = (horizontal_dimension,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = in + optional = F +[cld_lwp] + standard_name = RRTMGP_cloud_liquid_water_path + long_name = layer cloud liquid water path + units = g m-2 + dimensions = (horizontal_dimension,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = in + optional = F +[cld_reliq] + standard_name = RRTMGP_mean_effective_radius_for_liquid_cloud + long_name = mean effective radius for liquid cloud + units = micron + dimensions = (horizontal_dimension,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = in + optional = F +[cld_iwp] + standard_name = RRTMGP_cloud_ice_water_path + long_name = layer cloud ice water path + units = g m-2 + dimensions = (horizontal_dimension,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = in + optional = F +[cld_reice] + standard_name = RRTMGP_mean_effective_radius_for_ice_cloud + long_name = mean effective radius for ice cloud + units = micron + dimensions = (horizontal_dimension,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = in + optional = F +[cld_swp] + standard_name = RRTMGP_cloud_snow_water_path + long_name = layer cloud snow water path + units = g m-2 + dimensions = (horizontal_dimension,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = in + optional = F +[cld_resnow] + standard_name = RRTMGP_mean_effective_radius_for_snow_flake + long_name = mean effective radius for snow cloud + units = micron + dimensions = (horizontal_dimension,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = in + optional = F +[cld_rwp] + standard_name = RRTMGP_cloud_rain_water_path + long_name = layer cloud rain water path + units = g m-2 + dimensions = (horizontal_dimension,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = in + optional = F +[cld_rerain] + standard_name = RRTMGP_mean_effective_radius_for_rain_drop + long_name = mean effective radius for rain cloud + units = micron + dimensions = (horizontal_dimension,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = in + optional = F +[icseed_sw] + standard_name = seed_random_numbers_sw + long_name = seed for random number generation for shortwave radiation + units = none + dimensions = (horizontal_dimension) + type = integer + intent = in + optional = F +[aerosols] + standard_name = aerosol_optical_properties_for_shortwave_bands_01_16 + long_name = aerosol optical properties for shortwave bands 01-16 + units = various + dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_shortwave_radiation,number_of_aerosol_output_fields_for_shortwave_radiation) + type = real + kind = kind_phys + intent = in + optional = F +[sw_cloud_props] + standard_name = coefficients_for_sw_cloud_optics + long_name = DDT containing spectral information for cloudy RRTMGP SW radiation scheme + units = DDT + dimensions = () + type = ty_cloud_optics + intent = in + optional = F +[sw_gas_props] + standard_name = coefficients_for_sw_gas_optics + long_name = DDT containing spectral information for RRTMGP SW radiation scheme + units = DDT + dimensions = () + type = ty_gas_optics_rrtmgp + intent = in + optional = F +[ipsdsw0] + standard_name = initial_permutation_seed_sw + long_name = initial seed for McICA SW + units = none + dimensions = () + type = integer + intent = in + optional = F +[nday] + standard_name = daytime_points_dimension + long_name = daytime points dimension + units = count + dimensions = () + type = integer + intent = in + optional = F +[idxday] + standard_name = daytime_points + long_name = daytime points + units = index + dimensions = (horizontal_dimension) + type = integer + intent = in + optional = F +[optical_props_clouds] + standard_name = shortwave_optical_properties_for_cloudy_atmosphere + long_name = Fortran DDT containing RRTMGP optical properties + units = DDT + dimensions = () + type = ty_optical_props_2str + intent = out + optional = F +[optical_props_aerosol] + standard_name = shortwave_optical_properties_for_aerosols + long_name = Fortran DDT containing RRTMGP optical properties + units = DDT + dimensions = () + type = ty_optical_props_2str + intent = out + optional = F +[cldtausw] + standard_name = cloud_optical_depth_layers_at_0_55mu_band + long_name = approx .55mu band layer cloud optical depth + units = none + dimensions = (horizontal_dimension,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = out + optional = F +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out + optional = F +[errflg] + standard_name = ccpp_error_flag + long_name = error flag for error handling in CCPP + units = flag + dimensions = () + type = integer + intent = out + optional = F diff --git a/physics/rrtmgp_sw_clrallsky_driver.F90 b/physics/rrtmgp_sw_clrallsky_driver.F90 index baa6c1fad..b990ce142 100644 --- a/physics/rrtmgp_sw_clrallsky_driver.F90 +++ b/physics/rrtmgp_sw_clrallsky_driver.F90 @@ -26,31 +26,8 @@ end subroutine rrtmgp_sw_clrallsky_driver_init ! ######################################################################################### ! SUBROUTINE rrtmgp_sw_clrallsky_driver_run ! ######################################################################################### -!! \section arg_table_rrtmgp_sw_clrallsky_driver_run Argument Table -!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | -!! |-------------------------|------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------|-------|------|-----------------------|-----------|--------|----------| -!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | -!! | Radtend | GFS_radtend_type_instance | Fortran DDT containing FV3-GFS radiation tendencies | DDT | 0 | GFS_radtend_type | | in | F | -!! | ncol | horizontal_loop_extent | horizontal dimension | count | 0 | integer | | in | F | -!! | p_lay | air_pressure_at_layer_for_RRTMGP_in_hPa | air pressure layer | hPa | 2 | real | kind_phys | in | F | -!! | p_lev | air_pressure_at_interface_for_RRTMGP_in_hPa | air pressure level | hPa | 2 | real | kind_phys | in | F | -!! | t_lay | air_temperature_at_layer_for_RRTMGP | air temperature layer | K | 2 | real | kind_phys | in | F | -!! | sw_gas_props | coefficients_for_sw_gas_optics | DDT containing spectral information for RRTMGP SW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | -!! | optical_props_clds | shortwave_optical_properties_for_cloudy_atmosphere | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_2str | | in | F | -!! | optical_props_aerosol | shortwave_optical_properties_for_aerosols | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_2str | | in | F | -!! | gas_concentrations | Gas_concentrations_for_RRTMGP_suite | DDT containing gas concentrations for RRTMGP radiation scheme | DDT | 0 | ty_gas_concs | | in | F | -!! | lsswr | flag_to_calc_sw | flag to calculate SW irradiances | flag | 0 | logical | | in | F | -!! | nday | daytime_points_dimension | daytime points dimension | count | 0 | integer | | in | F | -!! | idxday | daytime_points | daytime points | index | 1 | integer | | in | F | -!! | hsw0 | tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_time_step | shortwave clear sky heating rate | K s-1 | 2 | real | kind_phys | inout | T | -!! | hswb | sw_heating_rate_spectral | shortwave total sky heating rate (spectral) | K s-1 | 3 | real | kind_phys | inout | T | -!! | scmpsw | components_of_surface_downward_shortwave_fluxes | derived type for special components of surface downward shortwave fluxes | W m-2 | 1 | cmpfsw_type | | inout | T | -!! | fluxUP_allsky | sw_flux_profile_upward_allsky | RRTMGP upward shortwave all-sky flux profile | W m-2 | 2 | real | kind_phys | out | F | -!! | fluxDOWN_allsky | sw_flux_profile_downward_allsky | RRTMGP downward shortwave all-sky flux profile | W m-2 | 2 | real | kind_phys | out | F | -!! | fluxUP_clrsky | sw_flux_profile_upward_clrsky | RRTMGP upward shortwave clr-sky flux profile | W m-2 | 2 | real | kind_phys | out | F | -!! | fluxDOWN_clrsky | sw_flux_profile_downward_clrsky | RRTMGP downward shortwave clr-sky flux profile | W m-2 | 2 | real | kind_phys | out | F | -!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | -!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! \section arg_table_rrtmgp_sw_clrallsky_driver +!! \htmlinclude rrtmgp_sw_clrallsky_driver.html !! subroutine rrtmgp_sw_clrallsky_driver_run(Model, Radtend, ncol, sw_gas_props, p_lay, t_lay, p_lev, gas_concentrations, & optical_props_clds, optical_props_aerosol, & diff --git a/physics/rrtmgp_sw_clrallsky_driver.meta b/physics/rrtmgp_sw_clrallsky_driver.meta new file mode 100644 index 000000000..979ed8b55 --- /dev/null +++ b/physics/rrtmgp_sw_clrallsky_driver.meta @@ -0,0 +1,189 @@ +[ccpp-arg-table] + name = rrtmgp_sw_clrallsky_driver_run + type = scheme +[Model] + standard_name = GFS_control_type + long_name = Fortran DDT containing FV3-GFS model control parameters + units = DDT + dimensions = () + type = GFS_control_type + intent = in + optional = F +[Radtend] + standard_name = GFS_radtend_type + long_name = Fortran DDT containing FV3-GFS radiation tendencies + units = DDT + dimensions = () + type = GFS_radtend_type + intent = in + optional = F +[ncol] + standard_name = horizontal_loop_extent + long_name = horizontal dimension + units = count + dimensions = () + type = integer + intent = in + optional = F +[p_lay] + standard_name = air_pressure_at_layer_for_RRTMGP_in_hPa + long_name = air pressure layer + units = hPa + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[p_lev] + standard_name = air_pressure_at_interface_for_RRTMGP_in_hPa + long_name = air pressure level + units = hPa + dimensions = (horizontal_dimension,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = in + optional = F +[t_lay] + standard_name = air_temperature_at_layer_for_RRTMGP + long_name = air temperature layer + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[sw_gas_props] + standard_name = coefficients_for_sw_gas_optics + long_name = DDT containing spectral information for RRTMGP SW radiation scheme + units = DDT + dimensions = () + type = ty_gas_optics_rrtmgp + intent = in + optional = F +[optical_props_clds] + standard_name = shortwave_optical_properties_for_cloudy_atmosphere + long_name = Fortran DDT containing RRTMGP optical properties + units = DDT + dimensions = () + type = ty_optical_props_2str + intent = in + optional = F +[optical_props_aerosol] + standard_name = shortwave_optical_properties_for_aerosols + long_name = Fortran DDT containing RRTMGP optical properties + units = DDT + dimensions = () + type = ty_optical_props_2str + intent = in + optional = F +[gas_concentrations] + standard_name = Gas_concentrations_for_RRTMGP_suite + long_name = DDT containing gas concentrations for RRTMGP radiation scheme + units = DDT + dimensions = () + type = ty_gas_concs + intent = in + optional = F +[lsswr] + standard_name = flag_to_calc_sw + long_name = flag to calculate SW irradiances + units = flag + dimensions = () + type = logical + intent = in + optional = F +[nday] + standard_name = daytime_points_dimension + long_name = daytime points dimension + units = count + dimensions = () + type = integer + intent = in + optional = F +[idxday] + standard_name = daytime_points + long_name = daytime points + units = index + dimensions = (horizontal_dimension) + type = integer + intent = in + optional = F +[hsw0] + standard_name = sw_heating_rate_clear_sky + long_name = shortwave clear sky heating rate + units = K s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = T +[hswb] + standard_name = sw_heating_rate_spectral + long_name = shortwave total sky heating rate (spectral) + units = K s-1 + dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_shortwave_radiation) + type = real + kind = kind_phys + intent = inout + optional = T +[scmpsw] + standard_name = components_of_surface_downward_shortwave_fluxes + long_name = derived type for special components of surface downward shortwave fluxes + units = W m-2 + dimensions = (horizontal_dimension) + type = cmpfsw_type + intent = inout + optional = T +[fluxUP_allsky] + standard_name = sw_flux_profile_upward_allsky + long_name = RRTMGP upward shortwave all-sky flux profile + units = W m-2 + dimensions = (horizontal_dimension,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = out + optional = F +[fluxDOWN_allsky] + standard_name = sw_flux_profile_downward_allsky + long_name = RRTMGP downward shortwave all-sky flux profile + units = W m-2 + dimensions = (horizontal_dimension,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = out + optional = F +[fluxUP_clrsky] + standard_name = sw_flux_profile_upward_clrsky + long_name = RRTMGP upward shortwave clr-sky flux profile + units = W m-2 + dimensions = (horizontal_dimension,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = out + optional = F +[fluxDOWN_clrsky] + standard_name = sw_flux_profile_downward_clrsky + long_name = RRTMGP downward shortwave clr-sky flux profile + units = W m-2 + dimensions = (horizontal_dimension,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = out + optional = F +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out + optional = F +[errflg] + standard_name = ccpp_error_flag + long_name = error flag for error handling in CCPP + units = flag + dimensions = () + type = integer + intent = out + optional = F diff --git a/physics/rrtmgp_sw_gas_optics.F90 b/physics/rrtmgp_sw_gas_optics.F90 index b25ce53fb..7a3860620 100644 --- a/physics/rrtmgp_sw_gas_optics.F90 +++ b/physics/rrtmgp_sw_gas_optics.F90 @@ -14,18 +14,8 @@ module rrtmgp_sw_gas_optics ! ######################################################################################### ! SUBROUTINE sw_gas_optics_init ! ######################################################################################### -!! \section arg_table_rrtmgp_sw_gas_optics_init Argument Table -!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | -!! |--------------|----------------------------------------------|--------------------------------------------------------------------|-------|------|----------------------|-------|--------|----------| -!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | -!! | Radtend | GFS_radtend_type_instance | Fortran DDT containing FV3-GFS radiation tendencies | DDT | 0 | GFS_radtend_type | | in | F | -!! | mpirank | mpi_rank | current MPI rank | index | 0 | integer | | in | F | -!! | mpiroot | mpi_root | master MPI rank | index | 0 | integer | | in | F | -!! | mpicomm | mpi_comm | MPI communicator | index | 0 | integer | | in | F | -!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | -!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | -!! | ipsdsw0 | initial_permutation_seed_sw | initial seed for McICA SW | none | 0 | integer | | out | F | -!! | sw_gas_props | coefficients_for_sw_gas_optics | DDT containing spectral information for RRTMGP SW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | out | F | +!! \section arg_table_rrtmgp_sw_gas_optics +!! \htmlinclude rrtmgp_sw_gas_optics.html !! subroutine rrtmgp_sw_gas_optics_init(Model, Radtend, mpicomm, mpirank, mpiroot, sw_gas_props, & ipsdsw0, errmsg, errflg) @@ -419,23 +409,8 @@ end subroutine rrtmgp_sw_gas_optics_init ! If calling rte/mo_rte_sw.F90:rte_sw() directly, place calls to compute source ! function and gas_optics() here. ! ######################################################################################### -!! \section arg_table_rrtmgp_sw_gas_optics_run Argument Table -!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | -!! |----------------------|------------------------------------------------------------------|--------------------------------------------------------------------|-------|------|-----------------------|-----------|--------|----------| -!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | -!! | Radtend | GFS_radtend_type_instance | Fortran DDT containing FV3-GFS radiation tendencies | DDT | 0 | GFS_radtend_type | | in | F | -!! | sw_gas_props | coefficients_for_sw_gas_optics | DDT containing spectral information for RRTMGP SW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | -!! | ncol | horizontal_loop_extent | horizontal dimension | count | 0 | integer | | in | F | -!! | p_lay | air_pressure_at_layer_for_RRTMGP_in_hPa | air pressure layer | hPa | 2 | real | kind_phys | in | F | -!! | p_lev | air_pressure_at_interface_for_RRTMGP_in_hPa | air pressure level | hPa | 2 | real | kind_phys | in | F | -!! | t_lay | air_temperature_at_layer_for_RRTMGP | air temperature layer | K | 2 | real | kind_phys | in | F | -!! | t_lev | air_temperature_at_interface_for_RRTMGP | air temperature level | K | 2 | real | kind_phys | in | F | -!! | gas_concentrations | Gas_concentrations_for_RRTMGP_suite | DDT containing gas concentrations for RRTMGP radiation scheme | DDT | 0 | ty_gas_concs | | in | F | -!! | lsswr | flag_to_calc_sw | flag to calculate SW irradiances | flag | 0 | logical | | in | F | -!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | -!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | -!! | optical_props_clrsky | shortwave_optical_properties_for_clear_sky | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_2str | | out | F | -!! | toa_src | incident_solar_irradiance_at_top_of_atmosphere_by_spectral_point | top of atmosphere incident solar flux in each spectral point | | 2 | real | kind_phys | out | F | +!! \section arg_table_rrtmgp_sw_gas_optics +!! \htmlinclude rrtmgp_sw_gas_optics.html !! subroutine rrtmgp_sw_gas_optics_run(Model, Radtend, sw_gas_props, ncol, p_lay, p_lev, t_lay, t_lev, & gas_concentrations, lsswr, optical_props_clrsky, toa_src, errmsg, errflg) diff --git a/physics/rrtmgp_sw_gas_optics.meta b/physics/rrtmgp_sw_gas_optics.meta new file mode 100644 index 000000000..f9f0b3ef3 --- /dev/null +++ b/physics/rrtmgp_sw_gas_optics.meta @@ -0,0 +1,199 @@ +[ccpp-arg-table] + name = rrtmgp_sw_gas_optics_init + type = scheme +[Model] + standard_name = GFS_control_type + long_name = Fortran DDT containing FV3-GFS model control parameters + units = DDT + dimensions = () + type = GFS_control_type + intent = in + optional = F +[Radtend] + standard_name = GFS_radtend_type + long_name = Fortran DDT containing FV3-GFS radiation tendencies + units = DDT + dimensions = () + type = GFS_radtend_type + intent = in + optional = F +[mpirank] + standard_name = mpi_rank + long_name = current MPI rank + units = index + dimensions = () + type = integer + intent = in + optional = F +[mpiroot] + standard_name = mpi_root + long_name = master MPI rank + units = index + dimensions = () + type = integer + intent = in + optional = F +[mpicomm] + standard_name = mpi_comm + long_name = MPI communicator + units = index + dimensions = () + type = integer + intent = in + optional = F +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out + optional = F +[errflg] + standard_name = ccpp_error_flag + long_name = error flag for error handling in CCPP + units = flag + dimensions = () + type = integer + intent = out + optional = F +[ipsdsw0] + standard_name = initial_permutation_seed_sw + long_name = initial seed for McICA SW + units = none + dimensions = () + type = integer + intent = out + optional = F +[sw_gas_props] + standard_name = coefficients_for_sw_gas_optics + long_name = DDT containing spectral information for RRTMGP SW radiation scheme + units = DDT + dimensions = () + type = ty_gas_optics_rrtmgp + intent = out + optional = F + +######################################################################## +[ccpp-arg-table] + name = rrtmgp_sw_gas_optics_run + type = scheme +[Model] + standard_name = GFS_control_type + long_name = Fortran DDT containing FV3-GFS model control parameters + units = DDT + dimensions = () + type = GFS_control_type + intent = in + optional = F +[Radtend] + standard_name = GFS_radtend_type + long_name = Fortran DDT containing FV3-GFS radiation tendencies + units = DDT + dimensions = () + type = GFS_radtend_type + intent = in + optional = F +[sw_gas_props] + standard_name = coefficients_for_sw_gas_optics + long_name = DDT containing spectral information for RRTMGP SW radiation scheme + units = DDT + dimensions = () + type = ty_gas_optics_rrtmgp + intent = in + optional = F +[ncol] + standard_name = horizontal_loop_extent + long_name = horizontal dimension + units = count + dimensions = () + type = integer + intent = in + optional = F +[p_lay] + standard_name = air_pressure_at_layer_for_RRTMGP_in_hPa + long_name = air pressure layer + units = hPa + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[p_lev] + standard_name = air_pressure_at_interface_for_RRTMGP_in_hPa + long_name = air pressure level + units = hPa + dimensions = (horizontal_dimension,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = in + optional = F +[t_lay] + standard_name = air_temperature_at_layer_for_RRTMGP + long_name = air temperature layer + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[t_lev] + standard_name = air_temperature_at_interface_for_RRTMGP + long_name = air temperature level + units = K + dimensions = (horizontal_dimension,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = in + optional = F +[gas_concentrations] + standard_name = Gas_concentrations_for_RRTMGP_suite + long_name = DDT containing gas concentrations for RRTMGP radiation scheme + units = DDT + dimensions = () + type = ty_gas_concs + intent = in + optional = F +[lsswr] + standard_name = flag_to_calc_sw + long_name = flag to calculate SW irradiances + units = flag + dimensions = () + type = logical + intent = in + optional = F +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out + optional = F +[errflg] + standard_name = ccpp_error_flag + long_name = error flag for error handling in CCPP + units = flag + dimensions = () + type = integer + intent = out + optional = F +[optical_props_clrsky] + standard_name = shortwave_optical_properties_for_clear_sky + long_name = Fortran DDT containing RRTMGP optical properties + units = DDT + dimensions = () + type = ty_optical_props_2str + intent = out + optional = F +[toa_src] + standard_name = incident_solar_irradiance_at_top_of_atmosphere_by_spectral_point + long_name = top of atmosphere incident solar flux in each spectral point + units = + dimensions = (horizontal_dimension,number_of_sw_spectral_points_rrtmgp) + type = real + kind = kind_phys + intent = out + optional = F diff --git a/physics/rrtmgp_sw_rte.F90 b/physics/rrtmgp_sw_rte.F90 index 847981430..49242142d 100644 --- a/physics/rrtmgp_sw_rte.F90 +++ b/physics/rrtmgp_sw_rte.F90 @@ -26,34 +26,8 @@ end subroutine rrtmgp_sw_rte_init ! ######################################################################################### ! SUBROUTINE rrtmgp_sw_rte_run ! ######################################################################################### -!! \section arg_table_rrtmgp_sw_rte_run Argument Table -!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | -!! |-------------------------|------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------|-------|------|-----------------------|-----------|--------|----------| -!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | -!! | Radtend | GFS_radtend_type_instance | Fortran DDT containing FV3-GFS radiation tendencies | DDT | 0 | GFS_radtend_type | | in | F | -!! | Statein | GFS_statein_type_instance | Fortran DDT containing FV3-GFS prognostic state data in from dycore | DDT | 0 | GFS_statein_type | | in | F | -!! | ncol | horizontal_loop_extent | horizontal dimension | count | 0 | integer | | in | F | -!! | p_lay | air_pressure_at_layer_for_RRTMGP_in_hPa | air pressure layer | hPa | 2 | real | kind_phys | in | F | -!! | p_lev | air_pressure_at_interface_for_RRTMGP_in_hPa | air pressure level | hPa | 2 | real | kind_phys | in | F | -!! | t_lay | air_temperature_at_layer_for_RRTMGP | air temperature layer | K | 2 | real | kind_phys | in | F | -!! | sw_gas_props | coefficients_for_sw_gas_optics | DDT containing spectral information for RRTMGP SW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | -!! | optical_props_clrsky | shortwave_optical_properties_for_clear_sky | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_2str | | in | F | -!! | optical_props_cloud | shortwave_optical_properties_for_cloudy_atmosphere | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_2str | | in | F | -!! | optical_props_aerosol | shortwave_optical_properties_for_aerosols | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_2str | | in | F | -!! | gas_concentrations | Gas_concentrations_for_RRTMGP_suite | DDT containing gas concentrations for RRTMGP radiation scheme | DDT | 0 | ty_gas_concs | | in | F | -!! | lsswr | flag_to_calc_sw | flag to calculate SW irradiances | flag | 0 | logical | | in | F | -!! | nday | daytime_points_dimension | daytime points dimension | count | 0 | integer | | in | F | -!! | idxday | daytime_points | daytime points | index | 1 | integer | | in | F | -!! | toa_src | incident_solar_irradiance_at_top_of_atmosphere_by_spectral_point | top of atmosphere incident solar flux in each spectral point | | 2 | real | kind_phys | in | F | -!! | hsw0 | tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_time_step | shortwave clear sky heating rate | K s-1 | 2 | real | kind_phys | inout | T | -!! | hswb | sw_heating_rate_spectral | shortwave total sky heating rate (spectral) | K s-1 | 3 | real | kind_phys | inout | T | -!! | scmpsw | components_of_surface_downward_shortwave_fluxes | derived type for special components of surface downward shortwave fluxes | W m-2 | 1 | cmpfsw_type | | inout | T | -!! | fluxUP_allsky | sw_flux_profile_upward_allsky | RRTMGP upward shortwave all-sky flux profile | W m-2 | 2 | real | kind_phys | out | F | -!! | fluxDOWN_allsky | sw_flux_profile_downward_allsky | RRTMGP downward shortwave all-sky flux profile | W m-2 | 2 | real | kind_phys | out | F | -!! | fluxUP_clrsky | sw_flux_profile_upward_clrsky | RRTMGP upward shortwave clr-sky flux profile | W m-2 | 2 | real | kind_phys | out | F | -!! | fluxDOWN_clrsky | sw_flux_profile_downward_clrsky | RRTMGP downward shortwave clr-sky flux profile | W m-2 | 2 | real | kind_phys | out | F | -!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | -!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! \section arg_table_rrtmgp_sw_rte +!! \htmlinclude rrtmgp_sw_rte.html !! subroutine rrtmgp_sw_rte_run(Model, Radtend, Statein, ncol, sw_gas_props, p_lay, t_lay, p_lev, gas_concentrations, & optical_props_clrsky, optical_props_cloud, optical_props_aerosol, & diff --git a/physics/rrtmgp_sw_rte.meta b/physics/rrtmgp_sw_rte.meta new file mode 100644 index 000000000..37e1551ea --- /dev/null +++ b/physics/rrtmgp_sw_rte.meta @@ -0,0 +1,214 @@ +[ccpp-arg-table] + name = rrtmgp_sw_rte_run + type = scheme +[Model] + standard_name = GFS_control_type + long_name = Fortran DDT containing FV3-GFS model control parameters + units = DDT + dimensions = () + type = GFS_control_type + intent = in + optional = F +[Radtend] + standard_name = GFS_radtend_type + long_name = Fortran DDT containing FV3-GFS radiation tendencies + units = DDT + dimensions = () + type = GFS_radtend_type + intent = in + optional = F +[Statein] + standard_name = GFS_statein_type + long_name = Fortran DDT containing FV3-GFS prognostic state data in from dycore + units = DDT + dimensions = () + type = GFS_statein_type + intent = in + optional = F +[ncol] + standard_name = horizontal_loop_extent + long_name = horizontal dimension + units = count + dimensions = () + type = integer + intent = in + optional = F +[p_lay] + standard_name = air_pressure_at_layer_for_RRTMGP_in_hPa + long_name = air pressure layer + units = hPa + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[p_lev] + standard_name = air_pressure_at_interface_for_RRTMGP_in_hPa + long_name = air pressure level + units = hPa + dimensions = (horizontal_dimension,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = in + optional = F +[t_lay] + standard_name = air_temperature_at_layer_for_RRTMGP + long_name = air temperature layer + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[sw_gas_props] + standard_name = coefficients_for_sw_gas_optics + long_name = DDT containing spectral information for RRTMGP SW radiation scheme + units = DDT + dimensions = () + type = ty_gas_optics_rrtmgp + intent = in + optional = F +[optical_props_clrsky] + standard_name = shortwave_optical_properties_for_clear_sky + long_name = Fortran DDT containing RRTMGP optical properties + units = DDT + dimensions = () + type = ty_optical_props_2str + intent = in + optional = F +[optical_props_cloud] + standard_name = shortwave_optical_properties_for_cloudy_atmosphere + long_name = Fortran DDT containing RRTMGP optical properties + units = DDT + dimensions = () + type = ty_optical_props_2str + intent = in + optional = F +[optical_props_aerosol] + standard_name = shortwave_optical_properties_for_aerosols + long_name = Fortran DDT containing RRTMGP optical properties + units = DDT + dimensions = () + type = ty_optical_props_2str + intent = in + optional = F +[gas_concentrations] + standard_name = Gas_concentrations_for_RRTMGP_suite + long_name = DDT containing gas concentrations for RRTMGP radiation scheme + units = DDT + dimensions = () + type = ty_gas_concs + intent = in + optional = F +[lsswr] + standard_name = flag_to_calc_sw + long_name = flag to calculate SW irradiances + units = flag + dimensions = () + type = logical + intent = in + optional = F +[nday] + standard_name = daytime_points_dimension + long_name = daytime points dimension + units = count + dimensions = () + type = integer + intent = in + optional = F +[idxday] + standard_name = daytime_points + long_name = daytime points + units = index + dimensions = (horizontal_dimension) + type = integer + intent = in + optional = F +[toa_src] + standard_name = incident_solar_irradiance_at_top_of_atmosphere_by_spectral_point + long_name = top of atmosphere incident solar flux in each spectral point + units = + dimensions = (horizontal_dimension,number_of_sw_spectral_points_rrtmgp) + type = real + kind = kind_phys + intent = in + optional = F +[hsw0] + standard_name = sw_heating_rate_clear_sky + long_name = shortwave clear sky heating rate + units = K s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = T +[hswb] + standard_name = sw_heating_rate_spectral + long_name = shortwave total sky heating rate (spectral) + units = K s-1 + dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_shortwave_radiation) + type = real + kind = kind_phys + intent = inout + optional = T +[scmpsw] + standard_name = components_of_surface_downward_shortwave_fluxes + long_name = derived type for special components of surface downward shortwave fluxes + units = W m-2 + dimensions = (horizontal_dimension) + type = cmpfsw_type + intent = inout + optional = T +[fluxUP_allsky] + standard_name = sw_flux_profile_upward_allsky + long_name = RRTMGP upward shortwave all-sky flux profile + units = W m-2 + dimensions = (horizontal_dimension,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = out + optional = F +[fluxDOWN_allsky] + standard_name = sw_flux_profile_downward_allsky + long_name = RRTMGP downward shortwave all-sky flux profile + units = W m-2 + dimensions = (horizontal_dimension,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = out + optional = F +[fluxUP_clrsky] + standard_name = sw_flux_profile_upward_clrsky + long_name = RRTMGP upward shortwave clr-sky flux profile + units = W m-2 + dimensions = (horizontal_dimension,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = out + optional = F +[fluxDOWN_clrsky] + standard_name = sw_flux_profile_downward_clrsky + long_name = RRTMGP downward shortwave clr-sky flux profile + units = W m-2 + dimensions = (horizontal_dimension,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = out + optional = F +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out + optional = F +[errflg] + standard_name = ccpp_error_flag + long_name = error flag for error handling in CCPP + units = flag + dimensions = () + type = integer + intent = out + optional = F diff --git a/physics/rte-rrtmgp b/physics/rte-rrtmgp index e45a5fb8b..a2566ac81 160000 --- a/physics/rte-rrtmgp +++ b/physics/rte-rrtmgp @@ -1 +1 @@ -Subproject commit e45a5fb8b691620cede3ad53e6e08a946cbf7ad4 +Subproject commit a2566ac81f6d7f63bc01be92388702c95f0a3703 From f5562ee5c658119530b5f90e01c388e6840b499d Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Tue, 24 Sep 2019 09:55:14 -0600 Subject: [PATCH 049/167] Fixed some bugs in argument tables. --- physics/GFS_rrtmgp_gas_optics.F90 | 6 +- physics/GFS_rrtmgp_gas_optics.meta | 10 +++ physics/GFS_rrtmgp_lw_post.F90 | 5 +- physics/GFS_rrtmgp_post.F90 | 6 +- physics/GFS_rrtmgp_post.meta | 4 +- physics/GFS_rrtmgp_pre.F90 | 2 +- physics/GFS_rrtmgp_pre.meta | 11 ++- physics/GFS_rrtmgp_setup.F90 | 8 +- physics/GFS_rrtmgp_sw_post.F90 | 5 +- physics/radlw_param.meta | 6 ++ physics/radsw_param.meta | 6 ++ physics/rrtmgp_lw_cloud_optics.F90 | 20 +++-- physics/rrtmgp_lw_cloud_optics.meta | 115 ++++++++++++------------- physics/rrtmgp_lw_clrallsky_driver.F90 | 2 +- physics/rrtmgp_lw_gas_optics.F90 | 4 +- physics/rrtmgp_lw_rte.F90 | 4 +- physics/rrtmgp_sw_cloud_optics.F90 | 6 +- physics/rrtmgp_sw_cloud_optics.meta | 2 +- physics/rrtmgp_sw_clrallsky_driver.F90 | 2 +- physics/rrtmgp_sw_gas_optics.F90 | 4 +- physics/rrtmgp_sw_rte.F90 | 2 +- 21 files changed, 118 insertions(+), 112 deletions(-) diff --git a/physics/GFS_rrtmgp_gas_optics.F90 b/physics/GFS_rrtmgp_gas_optics.F90 index 8332785cf..42a1cf2b6 100644 --- a/physics/GFS_rrtmgp_gas_optics.F90 +++ b/physics/GFS_rrtmgp_gas_optics.F90 @@ -1,9 +1,13 @@ +!> \file GFS_rrtmgp_gas_optics.f90 +!! This file contains module GFS_rrtmgp_gas_optics use machine, only: kind_phys use GFS_typedefs, only: GFS_control_type,GFS_radtend_type + + public GFS_rrtmgp_gas_optics_init,GFS_rrtmgp_gas_optics_run,GFS_rrtmgp_gas_optics_finalize contains -!! \section arg_table_GFS_rrtmgp_gas_optics +!! \section arg_table_GFS_rrtmgp_gas_optics_init !! \htmlinclude GFS_rrtmgp_gas_optics.html !! diff --git a/physics/GFS_rrtmgp_gas_optics.meta b/physics/GFS_rrtmgp_gas_optics.meta index 71090f948..0955e0ee8 100644 --- a/physics/GFS_rrtmgp_gas_optics.meta +++ b/physics/GFS_rrtmgp_gas_optics.meta @@ -34,3 +34,13 @@ type = integer intent = out optional = F + +######################################################################## +[ccpp-arg-table] + name = GFS_rrtmgp_gas_optics_run + type = scheme + +######################################################################## +[ccpp-arg-table] + name = GFS_rrtmgp_gas_optics_finalize + type = scheme \ No newline at end of file diff --git a/physics/GFS_rrtmgp_lw_post.F90 b/physics/GFS_rrtmgp_lw_post.F90 index 2a443e308..986a025ee 100644 --- a/physics/GFS_rrtmgp_lw_post.F90 +++ b/physics/GFS_rrtmgp_lw_post.F90 @@ -22,12 +22,9 @@ module GFS_rrtmgp_lw_post subroutine GFS_rrtmgp_lw_post_init() end subroutine GFS_rrtmgp_lw_post_init - ! PGI compiler does not accept lines longer than 264 characters, remove during pre-processing -#ifndef __PGI -!> \section arg_table_GFS_rrtmgp_lw_post +!> \section arg_table_GFS_rrtmgp_lw_post_run !! \htmlinclude GFS_rrtmgp_lw_post.html !! -#endif subroutine GFS_rrtmgp_lw_post_run (Model, Grid, Radtend, & Coupling, im, p_lev, & tsfa, fluxlwUP_allsky, fluxlwDOWN_allsky, fluxlwUP_clrsky, fluxlwDOWN_clrsky, & diff --git a/physics/GFS_rrtmgp_post.F90 b/physics/GFS_rrtmgp_post.F90 index 968b44b2a..095409cb4 100644 --- a/physics/GFS_rrtmgp_post.F90 +++ b/physics/GFS_rrtmgp_post.F90 @@ -19,14 +19,10 @@ module GFS_rrtmgp_post implicit none contains -!>\defgroup GFS_rrtmgp_post GFS RRTMGP Scheme Post -!! @{ -!> \section arg_table_GFS_rrtmgp_post_init Argument Table -!! subroutine GFS_rrtmgp_post_init () end subroutine GFS_rrtmgp_post_init -!> \section arg_table_GFS_rrtmgp_post +!> \section arg_table_GFS_rrtmgp_post_run !! \htmlinclude GFS_rrtmgp_post.html !! subroutine GFS_rrtmgp_post_run (Model, Grid, Diag, Radtend, Statein, Coupling, scmpsw, & diff --git a/physics/GFS_rrtmgp_post.meta b/physics/GFS_rrtmgp_post.meta index 1c393382e..4b46c8684 100644 --- a/physics/GFS_rrtmgp_post.meta +++ b/physics/GFS_rrtmgp_post.meta @@ -123,7 +123,7 @@ intent = in optional = F [cldtaulw] - standard_name = cloud_optical_depth_layers_at_10mu_band + standard_name = RRTMGP_cloud_optical_depth_layers_at_10mu_band long_name = approx 10mu band layer cloud optical depth units = none dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) @@ -132,7 +132,7 @@ intent = in optional = F [cldtausw] - standard_name = cloud_optical_depth_layers_at_0_55mu_band + standard_name = RRTMGP_cloud_optical_depth_layers_at_0_55mu_band long_name = approx .55mu band layer cloud optical depth units = none dimensions = (horizontal_dimension,vertical_dimension_plus_one) diff --git a/physics/GFS_rrtmgp_pre.F90 b/physics/GFS_rrtmgp_pre.F90 index 7741d9f37..c8f2ef1f5 100644 --- a/physics/GFS_rrtmgp_pre.F90 +++ b/physics/GFS_rrtmgp_pre.F90 @@ -66,7 +66,7 @@ module GFS_rrtmgp_pre subroutine GFS_rrtmgp_pre_init () end subroutine GFS_rrtmgp_pre_init -!> \section arg_table_GFS_rrtmgp_pre +!> \section arg_table_GFS_rrtmgp_pre_run !! \htmlinclude GFS_rrtmgp_pre.html !! ! Attention - the output arguments lm, im, lmk, lmp must not be set diff --git a/physics/GFS_rrtmgp_pre.meta b/physics/GFS_rrtmgp_pre.meta index 7131bd2b8..322b34bd6 100644 --- a/physics/GFS_rrtmgp_pre.meta +++ b/physics/GFS_rrtmgp_pre.meta @@ -226,23 +226,22 @@ intent = out optional = F [faerlw] - standard_name = aerosol_optical_properties_for_longwave_bands_01_16 + standard_name = RRTMGP_aerosol_optical_properties_for_longwave_bands_01_16 long_name = aerosol optical properties for longwave bands 01-16 units = various - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_longwave_radiation,number_of_aerosol_output_fields_for_longwave_radiation) + dimensions = (horizontal_dimension,vertical_dimension_plus_one, number_of_lw_bands_rrtmgp,number_of_aerosol_output_fields_for_longwave_radiation) type = real kind = kind_phys intent = out optional = F [faersw] - standard_name = aerosol_optical_properties_for_shortwave_bands_01_16 + standard_name = RRTMGP_aerosol_optical_properties_for_shortwave_bands_01_16 long_name = aerosol optical properties for shortwave bands 01-16 units = various - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_shortwave_radiation,number_of_aerosol_output_fields_for_shortwave_radiation) + dimensions = (horizontal_dimension,vertical_dimension_plus_one, number_of_sw_bands_rrtmgp, number_of_aerosol_output_fields_for_shortwave_radiation) type = real - kind = kind_phys intent = out - optional = F + kind = kind_phys [mtopa] standard_name = model_layer_number_at_cloud_top long_name = vertical indices for low, middle and high cloud tops diff --git a/physics/GFS_rrtmgp_setup.F90 b/physics/GFS_rrtmgp_setup.F90 index 270c0b471..bf52b72df 100644 --- a/physics/GFS_rrtmgp_setup.F90 +++ b/physics/GFS_rrtmgp_setup.F90 @@ -37,9 +37,7 @@ module GFS_rrtmgp_setup contains -!> \defgroup GFS_rrtmgp_setup GFS RRTMGP Scheme Setup -!! @{ -!! \section arg_table_GFS_rrtmgp_setup +!! \section arg_table_GFS_rrtmgp_setup_init !! \htmlinclude GFS_rrtmgp_setup.html !! subroutine GFS_rrtmgp_setup_init ( & @@ -316,7 +314,7 @@ subroutine GFS_rrtmgp_setup_init ( & end subroutine GFS_rrtmgp_setup_init -!> \section arg_table_GFS_rrtmgp_setup +!> \section arg_table_GFS_rrtmgp_setup_run !! \htmlinclude GFS_rrtmgp_setup.html !! subroutine GFS_rrtmgp_setup_run ( & @@ -355,7 +353,7 @@ subroutine GFS_rrtmgp_setup_run ( & end subroutine GFS_rrtmgp_setup_run -!> \section arg_table_GFS_rrtmgp_setup +!> \section arg_table_GFS_rrtmgp_setup_finalize !! \htmlinclude GFS_rrtmgp_setup.html !! subroutine GFS_rrtmgp_setup_finalize (errmsg, errflg) diff --git a/physics/GFS_rrtmgp_sw_post.F90 b/physics/GFS_rrtmgp_sw_post.F90 index c53350d2a..ed0af14a9 100644 --- a/physics/GFS_rrtmgp_sw_post.F90 +++ b/physics/GFS_rrtmgp_sw_post.F90 @@ -23,12 +23,9 @@ module GFS_rrtmgp_sw_post subroutine GFS_rrtmgp_sw_post_init() end subroutine GFS_rrtmgp_sw_post_init - ! PGI compiler does not accept lines longer than 264 characters, remove during pre-processing -#ifndef __PGI -!> \section arg_table_GFS_rrtmgp_sw_post +!> \section arg_table_GFS_rrtmgp_sw_post_run !! \htmlinclude GFS_rrtmgp_sw_post.html !! -#endif subroutine GFS_rrtmgp_sw_post_run (Model, Grid, Diag, Radtend, Coupling, & scmpsw, im, p_lev, sw_gas_props, nday, idxday, fluxswUP_allsky, fluxswDOWN_allsky, & fluxswUP_clrsky, fluxswDOWN_clrsky, hswc, topflx_sw, sfcflx_sw, flxprf_sw, hsw0, & diff --git a/physics/radlw_param.meta b/physics/radlw_param.meta index a06a89512..61aee1d37 100644 --- a/physics/radlw_param.meta +++ b/physics/radlw_param.meta @@ -23,3 +23,9 @@ units = DDT dimensions = () type = sfcflw_type +[proflw_type] + standard_name = proflw_type + long_name = definition of type proflw_type + units = DDT + dimensions = () + type = proflw_type diff --git a/physics/radsw_param.meta b/physics/radsw_param.meta index 9f7c8a35a..4f4f320f6 100644 --- a/physics/radsw_param.meta +++ b/physics/radsw_param.meta @@ -34,3 +34,9 @@ units = DDT dimensions = () type = cmpfsw_type +[profsw_type] + standard_name = profsw_type + long_name = definition of type profsw_type + units = DDT + dimensions = () + type = profsw_type \ No newline at end of file diff --git a/physics/rrtmgp_lw_cloud_optics.F90 b/physics/rrtmgp_lw_cloud_optics.F90 index 142dc9085..64f88522f 100644 --- a/physics/rrtmgp_lw_cloud_optics.F90 +++ b/physics/rrtmgp_lw_cloud_optics.F90 @@ -1,3 +1,5 @@ +!>\file rrtmgp_lw_cloud_optics.F90 +!! This file contains module rrtmgp_lw_cloud_optics use machine, only: kind_phys use GFS_typedefs, only: GFS_control_type @@ -15,7 +17,7 @@ module rrtmgp_lw_cloud_optics public rrtmgp_lw_cloud_optics_init, rrtmgp_lw_cloud_optics_run, rrtmgp_lw_cloud_optics_finalize contains -!! \section arg_table_rrtmgp_lw_cloud_optics +!! \section arg_table_rrtmgp_lw_cloud_optics_init !! \htmlinclude rrtmgp_lw_cloud_optics.html !! ! ######################################################################################### @@ -304,16 +306,16 @@ subroutine rrtmgp_lw_cloud_optics_init(Model, mpicomm, mpirank, mpiroot, lw_clou end subroutine rrtmgp_lw_cloud_optics_init -!! \section arg_table_rrtmgp_lw_cloud_optics -!! \html_include rrtmgp_lw_cloud_optics.html +!! \section arg_table_rrtmgp_lw_cloud_optics_run +!! \htmlinclude rrtmgp_lw_cloud_optics.html !! ! ######################################################################################### ! SUBROUTINE rrtmgp_lw_cloud_optics_run() ! ######################################################################################### - subroutine rrtmgp_lw_cloud_optics_run(Model, ncol, icseed_lw,cld_frac, & - cld_lwp, cld_reliq, cld_iwp, cld_reice, cld_swp, cld_resnow, cld_rwp, cld_rerain, & - aerosols, lw_cloud_props, lw_gas_props, ipsdlw0, & - optical_props_clouds, optical_props_aerosol, cldtaulw, errmsg, errflg) + subroutine rrtmgp_lw_cloud_optics_run(Model, ncol, ipsdlw0, icseed_lw, cld_frac, cld_lwp, & + cld_reliq, cld_iwp, cld_reice, cld_swp, cld_resnow, cld_rwp, cld_rerain, & + lw_cloud_props, lw_gas_props, aerosols, & + cldtaulw, optical_props_clouds, optical_props_aerosol, errmsg, errflg) ! Inputs type(GFS_control_type), intent(in) :: & @@ -342,10 +344,10 @@ subroutine rrtmgp_lw_cloud_optics_run(Model, ncol, icseed_lw,cld_frac, & lw_gas_props real(kind_phys), intent(in),dimension(ncol, model%levs, lw_gas_props%get_nband(),3) :: & aerosols ! - real(kind_phys), dimension(ncol,Model%levs), intent(out) :: & - cldtaulw ! approx 10.mu band layer cloud optical depth ! Outputs + real(kind_phys), dimension(ncol,Model%levs), intent(out) :: & + cldtaulw ! approx 10.mu band layer cloud optical depth type(ty_optical_props_1scl),intent(out) :: & optical_props_clouds, & ! optical_props_aerosol ! diff --git a/physics/rrtmgp_lw_cloud_optics.meta b/physics/rrtmgp_lw_cloud_optics.meta index a3b39c6e9..b2e37e55a 100644 --- a/physics/rrtmgp_lw_cloud_optics.meta +++ b/physics/rrtmgp_lw_cloud_optics.meta @@ -79,127 +79,127 @@ type = integer intent = in optional = F +[ipsdlw0] + standard_name = initial_permutation_seed_lw + long_name = initial seed for McICA LW + units = none + dimensions = () + type = integer + intent = in + optional = F +[icseed_lw] + standard_name = seed_random_numbers_lw_for_RRTMGP + long_name = seed for random number generation for longwave radiation + units = none + dimensions = (horizontal_dimension) + type = integer + intent = in + optional = F [cld_frac] - standard_name = total_cloud_fraction + standard_name = RRTMGP_total_cloud_fraction long_name = layer total cloud fraction units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_dimension,vertical_dimension_plus_one) type = real - kind = kind_phys intent = in - optional = F + kind = kind_phys [cld_lwp] standard_name = RRTMGP_cloud_liquid_water_path long_name = layer cloud liquid water path units = g m-2 dimensions = (horizontal_dimension,vertical_dimension_plus_one) type = real - kind = kind_phys intent = in - optional = F + kind = kind_phys [cld_reliq] standard_name = RRTMGP_mean_effective_radius_for_liquid_cloud long_name = mean effective radius for liquid cloud units = micron dimensions = (horizontal_dimension,vertical_dimension_plus_one) type = real - kind = kind_phys intent = in - optional = F + kind = kind_phys [cld_iwp] standard_name = RRTMGP_cloud_ice_water_path long_name = layer cloud ice water path units = g m-2 dimensions = (horizontal_dimension,vertical_dimension_plus_one) type = real - kind = kind_phys intent = in - optional = F + kind = kind_phys [cld_reice] standard_name = RRTMGP_mean_effective_radius_for_ice_cloud long_name = mean effective radius for ice cloud units = micron dimensions = (horizontal_dimension,vertical_dimension_plus_one) type = real - kind = kind_phys intent = in - optional = F + kind = kind_phys [cld_swp] standard_name = RRTMGP_cloud_snow_water_path - long_name = layer cloud snow water path + long_name = cloud snow water path units = g m-2 dimensions = (horizontal_dimension,vertical_dimension_plus_one) type = real - kind = kind_phys intent = in - optional = F + kind = kind_phys [cld_resnow] standard_name = RRTMGP_mean_effective_radius_for_snow_flake - long_name = mean effective radius for snow cloud + long_name = mean effective radius for snow flake units = micron dimensions = (horizontal_dimension,vertical_dimension_plus_one) type = real - kind = kind_phys intent = in - optional = F + kind = kind_phys [cld_rwp] standard_name = RRTMGP_cloud_rain_water_path - long_name = layer cloud rain water path + long_name = cloud rain water path units = g m-2 dimensions = (horizontal_dimension,vertical_dimension_plus_one) type = real - kind = kind_phys intent = in - optional = F + kind = kind_phys [cld_rerain] standard_name = RRTMGP_mean_effective_radius_for_rain_drop - long_name = mean effective radius for rain cloud + long_name = mean effective radius for rain drop units = micron dimensions = (horizontal_dimension,vertical_dimension_plus_one) type = real - kind = kind_phys - intent = in - optional = F -[icseed_lw] - standard_name = seed_random_numbers_sw - long_name = seed for random number generation for shortwave radiation - units = none - dimensions = (horizontal_dimension) - type = integer intent = in - optional = F -[aerosols] - standard_name = aerosol_optical_properties_for_longwave_bands_01_16 - long_name = aerosol optical properties for longwave bands 01-16 - units = various - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_longwave_radiation,number_of_aerosol_output_fields_for_longwave_radiation) - type = real kind = kind_phys +[lw_gas_props] + standard_name = coefficients_for_lw_gas_optics + long_name = DDT containing spectral information for RRTMGP LW radiation scheme + units = DDT + dimensions = () intent = in + type = ty_gas_optics_rrtmgp optional = F [lw_cloud_props] standard_name = coefficients_for_lw_cloud_optics - long_name = DDT containing spectral information for cloudy RRTMGP LW radiation scheme + long_name = DDT containing spectral information for RRTMGP LW radiation scheme units = DDT dimensions = () - type = ty_cloud_optics intent = in + type = ty_cloud_optics optional = F -[lw_gas_props] - standard_name = coefficients_for_lw_gas_optics - long_name = DDT containing spectral information for RRTMGP LW radiation scheme - units = DDT - dimensions = () - type = ty_gas_optics_rrtmgp +[aerosols] + standard_name = RRTMGP_aerosol_optical_properties_for_longwave_bands_01_16 + long_name = aerosol optical properties for longwave bands 01-16 + units = various + dimensions = (horizontal_dimension,vertical_dimension_plus_one, number_of_lw_bands_rrtmgp,number_of_aerosol_output_fields_for_longwave_radiation) + type = real + kind = kind_phys intent = in optional = F -[ipsdlw0] - standard_name = initial_permutation_seed_lw - long_name = initial seed for McICA LW +[cldtaulw] + standard_name = RRTMGP_cloud_optical_depth_layers_at_10mu_band + long_name = approx 10mu band layer cloud optical depth units = none - dimensions = () - type = integer - intent = in + dimensions = (horizontal_dimension,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = out optional = F [optical_props_clouds] standard_name = longwave_optical_properties_for_cloudy_atmosphere @@ -217,15 +217,6 @@ type = ty_optical_props_1scl intent = out optional = F -[cldtaulw] - standard_name = cloud_optical_depth_layers_at_10mu_band - long_name = approx 10mu band layer cloud optical depth - units = none - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) - type = real - kind = kind_phys - intent = out - optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP @@ -242,4 +233,4 @@ dimensions = () type = integer intent = out - optional = F + optional = F \ No newline at end of file diff --git a/physics/rrtmgp_lw_clrallsky_driver.F90 b/physics/rrtmgp_lw_clrallsky_driver.F90 index 9d438aed0..3ee39ba45 100644 --- a/physics/rrtmgp_lw_clrallsky_driver.F90 +++ b/physics/rrtmgp_lw_clrallsky_driver.F90 @@ -24,7 +24,7 @@ end subroutine rrtmgp_lw_clrallsky_driver_init ! ######################################################################################### ! SUBROUTINE rrtmgp_lw_clrallsky_driver_run ! ######################################################################################### -!! \section arg_table_rrtmgp_lw_clrallsky_drive +!! \section arg_table_rrtmgp_lw_clrallsky_driver_run !! \htmlinclude rrtmgp_lw_clrallsky_driver.html !! subroutine rrtmgp_lw_clrallsky_driver_run(Model, Radtend, ncol, lw_gas_props, p_lay, t_lay, p_lev, skt, & diff --git a/physics/rrtmgp_lw_gas_optics.F90 b/physics/rrtmgp_lw_gas_optics.F90 index f17b1f675..94b31c32e 100644 --- a/physics/rrtmgp_lw_gas_optics.F90 +++ b/physics/rrtmgp_lw_gas_optics.F90 @@ -18,7 +18,7 @@ module rrtmgp_lw_gas_optics ! ######################################################################################### ! SUBROUTINE rrtmgp_sw_gas_optics_init ! ######################################################################################### -!! \section arg_table_rrtmgp_lw_gas_optics +!! \section arg_table_rrtmgp_lw_gas_optics_init !! \htmlinclude rrtmgp_lw_gas_optics.html !! subroutine rrtmgp_lw_gas_optics_init(Model, Radtend, mpicomm, mpirank, mpiroot, lw_gas_props, & @@ -412,7 +412,7 @@ end subroutine rrtmgp_lw_gas_optics_init ! If calling rte/mo_rte_sw.F90:rte_sw() directly, place calls to compute source ! function and gas_optics() here. ! ######################################################################################### -!! \section arg_table_rrtmgp_lw_gas_optics +!! \section arg_table_rrtmgp_lw_gas_optics_run !! \htmlinclude rrtmgp_lw_gas_optics.html !! subroutine rrtmgp_lw_gas_optics_run(Model, Radtend, lw_gas_props, ncol, p_lay, p_lev, t_lay, t_lev, skt, & diff --git a/physics/rrtmgp_lw_rte.F90 b/physics/rrtmgp_lw_rte.F90 index c6bb4f40a..b035d9447 100644 --- a/physics/rrtmgp_lw_rte.F90 +++ b/physics/rrtmgp_lw_rte.F90 @@ -24,9 +24,9 @@ end subroutine rrtmgp_lw_rte_init ! ######################################################################################### ! SUBROUTINE rrtmgp_lw_rte_run ! ######################################################################################### -!! \section arg_table_rrtmgp_lw_rte +!! \section arg_table_rrtmgp_lw_rte_run !! \htmlinclude rrtmgp_lw_rte.html -! +!! subroutine rrtmgp_lw_rte_run(Model, Statein, Radtend, ncol, lw_gas_props, p_lay, t_lay, p_lev, & skt, sources, optical_props_clrsky, optical_props_cloud, optical_props_aerosol, lslwr,& fluxUP_allsky, fluxDOWN_allsky, fluxUP_clrsky, fluxDOWN_clrsky, hlw0, hlwb, errmsg, errflg) diff --git a/physics/rrtmgp_sw_cloud_optics.F90 b/physics/rrtmgp_sw_cloud_optics.F90 index eb64a3bde..e380027ad 100644 --- a/physics/rrtmgp_sw_cloud_optics.F90 +++ b/physics/rrtmgp_sw_cloud_optics.F90 @@ -14,8 +14,8 @@ module rrtmgp_sw_cloud_optics contains -!! \section arg_table_rrtmgp_sw_cloud_optics -!! \html_include rrtmgp_lw_cloud_optics.html +!! \section arg_table_rrtmgp_sw_cloud_optics_init +!! \htmlinclude rrtmgp_lw_cloud_optics.html !! ! ######################################################################################### ! SUBROUTINE sw_cloud_optics_init @@ -305,7 +305,7 @@ subroutine rrtmgp_sw_cloud_optics_init(Model,mpicomm, mpirank, mpiroot, sw_cloud endif end subroutine rrtmgp_sw_cloud_optics_init -!! \section arg_table_rrtmgp_sw_cloud_optics +!! \section arg_table_rrtmgp_sw_cloud_optics_run !! \htmlinclude rrtmgp_sw_cloud_optics.html !! ! ######################################################################################### diff --git a/physics/rrtmgp_sw_cloud_optics.meta b/physics/rrtmgp_sw_cloud_optics.meta index 3de57da2c..d70370d70 100644 --- a/physics/rrtmgp_sw_cloud_optics.meta +++ b/physics/rrtmgp_sw_cloud_optics.meta @@ -234,7 +234,7 @@ intent = out optional = F [cldtausw] - standard_name = cloud_optical_depth_layers_at_0_55mu_band + standard_name = RRTMGP_cloud_optical_depth_layers_at_0_55mu_band long_name = approx .55mu band layer cloud optical depth units = none dimensions = (horizontal_dimension,vertical_dimension_plus_one) diff --git a/physics/rrtmgp_sw_clrallsky_driver.F90 b/physics/rrtmgp_sw_clrallsky_driver.F90 index b990ce142..99f42a688 100644 --- a/physics/rrtmgp_sw_clrallsky_driver.F90 +++ b/physics/rrtmgp_sw_clrallsky_driver.F90 @@ -26,7 +26,7 @@ end subroutine rrtmgp_sw_clrallsky_driver_init ! ######################################################################################### ! SUBROUTINE rrtmgp_sw_clrallsky_driver_run ! ######################################################################################### -!! \section arg_table_rrtmgp_sw_clrallsky_driver +!! \section arg_table_rrtmgp_sw_clrallsky_driver_run !! \htmlinclude rrtmgp_sw_clrallsky_driver.html !! subroutine rrtmgp_sw_clrallsky_driver_run(Model, Radtend, ncol, sw_gas_props, p_lay, t_lay, p_lev, gas_concentrations, & diff --git a/physics/rrtmgp_sw_gas_optics.F90 b/physics/rrtmgp_sw_gas_optics.F90 index 7a3860620..37bf25c74 100644 --- a/physics/rrtmgp_sw_gas_optics.F90 +++ b/physics/rrtmgp_sw_gas_optics.F90 @@ -14,7 +14,7 @@ module rrtmgp_sw_gas_optics ! ######################################################################################### ! SUBROUTINE sw_gas_optics_init ! ######################################################################################### -!! \section arg_table_rrtmgp_sw_gas_optics +!! \section arg_table_rrtmgp_sw_gas_optics_init !! \htmlinclude rrtmgp_sw_gas_optics.html !! subroutine rrtmgp_sw_gas_optics_init(Model, Radtend, mpicomm, mpirank, mpiroot, sw_gas_props, & @@ -409,7 +409,7 @@ end subroutine rrtmgp_sw_gas_optics_init ! If calling rte/mo_rte_sw.F90:rte_sw() directly, place calls to compute source ! function and gas_optics() here. ! ######################################################################################### -!! \section arg_table_rrtmgp_sw_gas_optics +!! \section arg_table_rrtmgp_sw_gas_optics_run !! \htmlinclude rrtmgp_sw_gas_optics.html !! subroutine rrtmgp_sw_gas_optics_run(Model, Radtend, sw_gas_props, ncol, p_lay, p_lev, t_lay, t_lev, & diff --git a/physics/rrtmgp_sw_rte.F90 b/physics/rrtmgp_sw_rte.F90 index 49242142d..d31b9a785 100644 --- a/physics/rrtmgp_sw_rte.F90 +++ b/physics/rrtmgp_sw_rte.F90 @@ -26,7 +26,7 @@ end subroutine rrtmgp_sw_rte_init ! ######################################################################################### ! SUBROUTINE rrtmgp_sw_rte_run ! ######################################################################################### -!! \section arg_table_rrtmgp_sw_rte +!! \section arg_table_rrtmgp_sw_rte_run !! \htmlinclude rrtmgp_sw_rte.html !! subroutine rrtmgp_sw_rte_run(Model, Radtend, Statein, ncol, sw_gas_props, p_lay, t_lay, p_lev, gas_concentrations, & From 4b61376adab644be38453bb3cd427b355c2b801e Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Tue, 24 Sep 2019 16:29:48 -0600 Subject: [PATCH 050/167] Getting closer... --- physics/GFS_rrtmgp_lw_post.meta | 24 ++++---- physics/GFS_rrtmgp_post.F90 | 6 +- physics/GFS_rrtmgp_post.meta | 8 +-- physics/GFS_rrtmgp_pre.F90 | 24 ++++---- physics/GFS_rrtmgp_pre.meta | 4 +- physics/GFS_rrtmgp_setup.F90 | 26 ++++---- physics/GFS_rrtmgp_setup.meta | 18 +++--- physics/GFS_rrtmgp_sw_post.F90 | 2 +- physics/GFS_rrtmgp_sw_post.meta | 24 ++++---- physics/rrtmgp_lw_cloud_optics.F90 | 28 ++++----- physics/rrtmgp_lw_cloud_optics.meta | 8 +-- physics/rrtmgp_lw_clrallsky_driver.F90 | 31 +++++----- physics/rrtmgp_lw_clrallsky_driver.meta | 37 +++++------ physics/rrtmgp_lw_gas_optics.F90 | 35 +++++------ physics/rrtmgp_lw_gas_optics.meta | 13 +--- physics/rrtmgp_lw_rte.F90 | 34 +++++----- physics/rrtmgp_lw_rte.meta | 34 +++++----- physics/rrtmgp_sw_cloud_optics.F90 | 46 +++++++------- physics/rrtmgp_sw_cloud_optics.meta | 10 +-- physics/rrtmgp_sw_clrallsky_driver.F90 | 60 +++++++++--------- physics/rrtmgp_sw_clrallsky_driver.meta | 30 ++++----- physics/rrtmgp_sw_gas_optics.F90 | 22 +++---- physics/rrtmgp_sw_gas_optics.meta | 11 +--- physics/rrtmgp_sw_rte.F90 | 82 ++++++++++++------------- physics/rrtmgp_sw_rte.meta | 37 +++++------ 25 files changed, 312 insertions(+), 342 deletions(-) diff --git a/physics/GFS_rrtmgp_lw_post.meta b/physics/GFS_rrtmgp_lw_post.meta index b72f950cd..d9863b41a 100644 --- a/physics/GFS_rrtmgp_lw_post.meta +++ b/physics/GFS_rrtmgp_lw_post.meta @@ -60,7 +60,7 @@ intent = in optional = F [fluxlwUP_allsky] - standard_name = lw_flux_profile_upward_allsky + standard_name = RRTMGP_lw_flux_profile_upward_allsky long_name = RRTMGP upward longwave all-sky flux profile units = W m-2 dimensions = (horizontal_dimension,vertical_dimension_plus_one) @@ -69,7 +69,7 @@ intent = in optional = F [fluxlwDOWN_allsky] - standard_name = lw_flux_profile_downward_allsky + standard_name = RRTMGP_lw_flux_profile_downward_allsky long_name = RRTMGP downward longwave all-sky flux profile units = W m-2 dimensions = (horizontal_dimension,vertical_dimension_plus_one) @@ -78,7 +78,7 @@ intent = in optional = F [fluxlwUP_clrsky] - standard_name = lw_flux_profile_upward_clrsky + standard_name = RRTMGP_lw_flux_profile_upward_clrsky long_name = RRTMGP upward longwave clr-sky flux profile units = W m-2 dimensions = (horizontal_dimension,vertical_dimension_plus_one) @@ -87,7 +87,7 @@ intent = in optional = F [fluxlwDOWN_clrsky] - standard_name = lw_flux_profile_downward_clrsky + standard_name = RRTMGP_lw_flux_profile_downward_clrsky long_name = RRTMGP downward longwave clr-sky flux profile units = W m-2 dimensions = (horizontal_dimension,vertical_dimension_plus_one) @@ -96,10 +96,10 @@ intent = in optional = F [hlwc] - standard_name = tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_step - long_name = longwave total sky heating rate + standard_name = RRTMGP_lw_heating_rate_all_sky + long_name = RRTMGP longwave all sky heating rate units = K s-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys intent = out @@ -121,18 +121,18 @@ intent = inout optional = F [flxprf_lw] - standard_name = lw_fluxes + standard_name = RRTMGP_lw_fluxes long_name = lw fluxes total sky / csk and up / down at levels units = W m-2 - dimensions = (horizontal_dimension,adjusted_vertical_level_dimension_for_radiation) + dimensions = (horizontal_dimension,vertical_dimension_plus_one) type = proflw_type intent = inout optional = T [hlw0] - standard_name = tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_time_step - long_name = longwave clear sky heating rate + standard_name = RRTMGP_lw_heating_rate_clear_sky + long_name = RRTMGP longwave clear sky heating rate units = K s-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys intent = inout diff --git a/physics/GFS_rrtmgp_post.F90 b/physics/GFS_rrtmgp_post.F90 index 095409cb4..ad2c7ee66 100644 --- a/physics/GFS_rrtmgp_post.F90 +++ b/physics/GFS_rrtmgp_post.F90 @@ -26,7 +26,7 @@ end subroutine GFS_rrtmgp_post_init !! \htmlinclude GFS_rrtmgp_post.html !! subroutine GFS_rrtmgp_post_run (Model, Grid, Diag, Radtend, Statein, Coupling, scmpsw, & - ncol, raddt, aerodp, cldsa, mtopa, mbota, cloud_fraction, cldtaulw, cldtausw, & + ncol, raddt, aerodp, cldsa, mtopa, mbota, cld_frac, cldtaulw, cldtausw, & errmsg, errflg) ! Inputs @@ -54,7 +54,7 @@ subroutine GFS_rrtmgp_post_run (Model, Grid, Diag, Radtend, Statein, Coupling, s mbota, & ! vertical indices for low, middle and high cloud tops mtopa ! vertical indices for low, middle and high cloud bases real(kind_phys), dimension(ncol,Model%levs), intent(in) :: & - cloud_fraction, & ! Total cloud fraction in each layer + cld_frac, & ! Total cloud fraction in each layer cldtausw, & ! approx .55mu band layer cloud optical depth cldtaulw ! approx 10.mu band layer cloud optical depth ! Inputs (optional) @@ -186,7 +186,7 @@ subroutine GFS_rrtmgp_post_run (Model, Grid, Diag, Radtend, Statein, Coupling, s ! if (.not. Model%uni_cld) then if (Model%lgocart .or. Model%ldiag3d) then do k = 1, Model%levs - Coupling%cldcovi(1:ncol,k) = cloud_fraction(1:ncol,k) + Coupling%cldcovi(1:ncol,k) = cld_frac(1:ncol,k) enddo endif endif ! end_if_lssav diff --git a/physics/GFS_rrtmgp_post.meta b/physics/GFS_rrtmgp_post.meta index 4b46c8684..8d4033202 100644 --- a/physics/GFS_rrtmgp_post.meta +++ b/physics/GFS_rrtmgp_post.meta @@ -113,11 +113,11 @@ type = integer intent = in optional = F -[cloud_fraction] - standard_name = total_cloud_fraction +[cld_frac] + standard_name = RRTMGP_total_cloud_fraction long_name = layer total cloud fraction units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_dimension,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -126,7 +126,7 @@ standard_name = RRTMGP_cloud_optical_depth_layers_at_10mu_band long_name = approx 10mu band layer cloud optical depth units = none - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_dimension,vertical_dimension_plus_one) type = real kind = kind_phys intent = in diff --git a/physics/GFS_rrtmgp_pre.F90 b/physics/GFS_rrtmgp_pre.F90 index c8f2ef1f5..360886a57 100644 --- a/physics/GFS_rrtmgp_pre.F90 +++ b/physics/GFS_rrtmgp_pre.F90 @@ -74,8 +74,8 @@ end subroutine GFS_rrtmgp_pre_init subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, Tbd, & ! IN ncol, lw_gas_props, sw_gas_props, & ! IN raddt, p_lay, t_lay, p_lev, t_lev, tsfg, tsfa, alb1d, cld_frac, cld_lwp, & ! OUT - cld_reliq, cld_iwp, cld_reice, cld_swp, cld_resnow, cld_rwp, cld_rerain, faerlw, & ! OUT - faersw, cldsa, mtopa, mbota, de_lgth, aerodp, nday, idxday, gas_concentrations, errmsg, errflg) + cld_reliq, cld_iwp, cld_reice, cld_swp, cld_resnow, cld_rwp, cld_rerain, aerosolslw, & ! OUT + aerosolssw, cldsa, mtopa, mbota, de_lgth, aerodp, nday, idxday, gas_concentrations, errmsg, errflg) ! Inputs type(GFS_control_type), intent(in) :: & @@ -133,9 +133,9 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, cld_rwp, & ! Cloud rain water path cld_rerain ! Cloud rain effective radius real(kind_phys), dimension(ncol,Model%levs,sw_gas_props%get_nband(),NF_AESW), intent(out) ::& - faersw ! Aerosol radiative properties in each SW band. + aerosolssw ! Aerosol radiative properties in each SW band. real(kind_phys), dimension(ncol,Model%levs,lw_gas_props%get_nband(),NF_AELW), intent(out) ::& - faerlw ! Aerosol radiative properties in each LW band. + aerosolslw ! Aerosol radiative properties in each LW band. integer,dimension(ncol,3),intent(out) :: & mbota, & ! Vertical indices for cloud tops mtopa ! Vertical indices for cloud bases @@ -157,7 +157,7 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, real(kind_phys), dimension(ncol, Model%levs, 2:Model%ntrac) :: tracer real(kind_phys), dimension(ncol, Model%levs, NF_VGAS) :: gas_vmr real(kind_phys), dimension(ncol, Model%levs, NF_CLDS) :: clouds - real(kind_phys), dimension(ncol, Model%levs, sw_gas_props%get_nband(), NF_AESW)::faersw2 + real(kind_phys), dimension(ncol, Model%levs, sw_gas_props%get_nband(), NF_AESW)::aerosolssw2 ! Initialize CCPP error handling variables errmsg = '' @@ -283,18 +283,18 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, ! ####################################################################################### call setaer(p_lev, p_lay, Statein%prslk(1:NCOL,iSFC:iTOA), tv_lay, relhum, & Sfcprop%slmsk, tracer, Grid%xlon, Grid%xlat, NCOL, Model%levs, Model%levs+1, & - Model%lsswr, Model%lslwr, faersw2, faerlw, aerodp) + Model%lsswr, Model%lslwr, aerosolssw2, aerosolslw, aerodp) ! Store aerosol optical properties ! SW. ! For RRTMGP SW the bands are now ordered from [IR(band) -> nIR -> UV], in RRTMG the ! band ordering was [nIR -> UV -> IR(band)] - faersw(1:NCOL,1:Model%levs,1,1) = faersw2(1:NCOL,1:Model%levs,sw_gas_props%get_nband(),1) - faersw(1:NCOL,1:Model%levs,1,2) = faersw2(1:NCOL,1:Model%levs,sw_gas_props%get_nband(),2) - faersw(1:NCOL,1:Model%levs,1,3) = faersw2(1:NCOL,1:Model%levs,sw_gas_props%get_nband(),3) - faersw(1:NCOL,1:Model%levs,2:sw_gas_props%get_nband(),1) = faersw2(1:NCOL,1:Model%levs,1:sw_gas_props%get_nband()-1,1) - faersw(1:NCOL,1:Model%levs,2:sw_gas_props%get_nband(),2) = faersw2(1:NCOL,1:Model%levs,1:sw_gas_props%get_nband()-1,2) - faersw(1:NCOL,1:Model%levs,2:sw_gas_props%get_nband(),3) = faersw2(1:NCOL,1:Model%levs,1:sw_gas_props%get_nband()-1,3) + aerosolssw(1:NCOL,1:Model%levs,1,1) = aerosolssw2(1:NCOL,1:Model%levs,sw_gas_props%get_nband(),1) + aerosolssw(1:NCOL,1:Model%levs,1,2) = aerosolssw2(1:NCOL,1:Model%levs,sw_gas_props%get_nband(),2) + aerosolssw(1:NCOL,1:Model%levs,1,3) = aerosolssw2(1:NCOL,1:Model%levs,sw_gas_props%get_nband(),3) + aerosolssw(1:NCOL,1:Model%levs,2:sw_gas_props%get_nband(),1) = aerosolssw2(1:NCOL,1:Model%levs,1:sw_gas_props%get_nband()-1,1) + aerosolssw(1:NCOL,1:Model%levs,2:sw_gas_props%get_nband(),2) = aerosolssw2(1:NCOL,1:Model%levs,1:sw_gas_props%get_nband()-1,2) + aerosolssw(1:NCOL,1:Model%levs,2:sw_gas_props%get_nband(),3) = aerosolssw2(1:NCOL,1:Model%levs,1:sw_gas_props%get_nband()-1,3) ! Setup surface ground temperature and ground/air skin temperature if required. tsfg(1:NCOL) = Sfcprop%tsfc(1:NCOL) diff --git a/physics/GFS_rrtmgp_pre.meta b/physics/GFS_rrtmgp_pre.meta index 322b34bd6..d5122d73b 100644 --- a/physics/GFS_rrtmgp_pre.meta +++ b/physics/GFS_rrtmgp_pre.meta @@ -225,7 +225,7 @@ kind = kind_phys intent = out optional = F -[faerlw] +[aerosolslw] standard_name = RRTMGP_aerosol_optical_properties_for_longwave_bands_01_16 long_name = aerosol optical properties for longwave bands 01-16 units = various @@ -234,7 +234,7 @@ kind = kind_phys intent = out optional = F -[faersw] +[aerosolssw] standard_name = RRTMGP_aerosol_optical_properties_for_shortwave_bands_01_16 long_name = aerosol optical properties for shortwave bands 01-16 units = various diff --git a/physics/GFS_rrtmgp_setup.F90 b/physics/GFS_rrtmgp_setup.F90 index bf52b72df..77e604c72 100644 --- a/physics/GFS_rrtmgp_setup.F90 +++ b/physics/GFS_rrtmgp_setup.F90 @@ -46,7 +46,7 @@ subroutine GFS_rrtmgp_setup_init ( & icliq_sw, crick_proof, ccnorm, & imp_physics, & norad_precip, idate, iflip, & - im, faerlw, faersw, aerodp, & ! for consistency checks + im, aerosolslw, aerosolssw, aerodp, & ! for consistency checks me, errmsg, errflg) ! ================= subprogram documentation block ================ ! ! ! @@ -185,8 +185,8 @@ subroutine GFS_rrtmgp_setup_init ( & integer, intent(in) :: iflip ! For consistency checks integer, intent(in) :: im - real(kind_phys), intent(in) :: faerlw(:,:,:,:) - real(kind_phys), intent(in) :: faersw(:,:,:,:) + real(kind_phys), intent(in) :: aerosolslw(:,:,:,:) + real(kind_phys), intent(in) :: aerosolssw(:,:,:,:) real(kind_phys), intent(in) :: aerodp(:,:) ! End for consistency checks integer, intent(in) :: me @@ -194,8 +194,8 @@ subroutine GFS_rrtmgp_setup_init ( & integer, intent(out) :: errflg ! For consistency checks - real(kind_phys), dimension(im,levr,NBDLW,NF_AELW) :: faerlw_check - real(kind_phys), dimension(im,levr,NBDSW,NF_AESW) :: faersw_check + real(kind_phys), dimension(im,levr,NBDLW,NF_AELW) :: aerosolslw_check + real(kind_phys), dimension(im,levr,NBDSW,NF_AESW) :: aerosolssw_check real(kind_phys), dimension(im,NSPC1) :: aerodp_check ! End for consistency checks @@ -208,21 +208,21 @@ subroutine GFS_rrtmgp_setup_init ( & ! Consistency checks for dimensions of arrays, this is required ! to detect differences in FV3's parameters that are used to ! dimension certain arrays and the values in ccpp-physics - if (size(faerlw(1,:,:,:)).ne.size(faerlw_check(1,:,:,:))) then + if (size(aerosolslw(1,:,:,:)).ne.size(aerosolslw_check(1,:,:,:))) then write(errmsg,"(3a,4i4,a,4i4)") & - "Runtime error: dimension mismatch for faerlw,", & + "Runtime error: dimension mismatch for aerosolslw,", & " check definitions of Model%levs, nbdlw, nf_aelw:", & - " expected shape ", shape(faerlw_check(:,:,:,:)), & - " but got ", shape(faerlw(:,:,:,:)) + " expected shape ", shape(aerosolslw_check(:,:,:,:)), & + " but got ", shape(aerosolslw(:,:,:,:)) errflg = 1 return end if - if (size(faersw(1,:,:,:)).ne.size(faersw_check(1,:,:,:))) then + if (size(aerosolssw(1,:,:,:)).ne.size(aerosolssw_check(1,:,:,:))) then write(errmsg,"(3a,4i4,a,4i4)") & - "Runtime error: dimension mismatch for faersw,", & + "Runtime error: dimension mismatch for aerosolssw,", & " check definitions of Model%levs, nbdsw, nf_aesw:", & - " expected shape ", shape(faersw_check(:,:,:,:)), & - " but got ", shape(faersw(:,:,:,:)) + " expected shape ", shape(aerosolssw_check(:,:,:,:)), & + " but got ", shape(aerosolssw(:,:,:,:)) errflg = 1 return end if diff --git a/physics/GFS_rrtmgp_setup.meta b/physics/GFS_rrtmgp_setup.meta index 0e7e7b702..cf14c3de4 100644 --- a/physics/GFS_rrtmgp_setup.meta +++ b/physics/GFS_rrtmgp_setup.meta @@ -186,24 +186,24 @@ type = integer intent = in optional = F -[faerlw] - standard_name = aerosol_optical_properties_for_longwave_bands_01_16 - long_name = optical properties for longwave bands 01-16 +[aerosolssw] + standard_name = RRTMGP_aerosol_optical_properties_for_shortwave_bands_01_16 + long_name = aerosol optical properties for shortwave bands 01-16 units = various - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_longwave_radiation,number_of_aerosol_output_fields_for_longwave_radiation) + dimensions = (horizontal_dimension,vertical_dimension_plus_one, number_of_sw_bands_rrtmgp, number_of_aerosol_output_fields_for_shortwave_radiation) type = real kind = kind_phys intent = in optional = F -[faersw] - standard_name = aerosol_optical_properties_for_shortwave_bands_01_16 - long_name = aerosol optical properties for shortwave bands 01-16 +[aerosolslw] + standard_name = RRTMGP_aerosol_optical_properties_for_longwave_bands_01_16 + long_name = aerosol optical properties for longwave bands 01-16 units = various - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_shortwave_radiation,number_of_aerosol_output_fields_for_shortwave_radiation) + dimensions = (horizontal_dimension,vertical_dimension_plus_one, number_of_lw_bands_rrtmgp,number_of_aerosol_output_fields_for_longwave_radiation) type = real kind = kind_phys - intent = in optional = F + intent = in [aerodp] standard_name = atmosphere_optical_thickness_due_to_ambient_aerosol_particles long_name = vertical integrated optical depth for various aerosol species diff --git a/physics/GFS_rrtmgp_sw_post.F90 b/physics/GFS_rrtmgp_sw_post.F90 index ed0af14a9..9c9e7c16c 100644 --- a/physics/GFS_rrtmgp_sw_post.F90 +++ b/physics/GFS_rrtmgp_sw_post.F90 @@ -36,7 +36,7 @@ subroutine GFS_rrtmgp_sw_post_run (Model, Grid, Diag, Radtend, Coupling, & Model ! Fortran DDT containing FV3-GFS model control parameters type(GFS_grid_type), intent(in) :: & Grid ! Fortran DDT containing FV3-GFS grid and interpolation related data - type(GFS_coupling_type), intent(inout) :: & + type(GFS_coupling_type), intent(inout) :: & Coupling ! Fortran DDT containing FV3-GFS fields to/from coupling with other components type(GFS_radtend_type), intent(inout) :: & Radtend ! Fortran DDT containing FV3-GFS radiation tendencies diff --git a/physics/GFS_rrtmgp_sw_post.meta b/physics/GFS_rrtmgp_sw_post.meta index 00bc675fe..0b2baa03c 100644 --- a/physics/GFS_rrtmgp_sw_post.meta +++ b/physics/GFS_rrtmgp_sw_post.meta @@ -83,7 +83,7 @@ intent = in optional = F [fluxswUP_allsky] - standard_name = sw_flux_profile_upward_allsky + standard_name = RRTMGP_sw_flux_profile_upward_allsky long_name = RRTMGP upward shortwave all-sky flux profile units = W m-2 dimensions = (horizontal_dimension,vertical_dimension_plus_one) @@ -92,7 +92,7 @@ intent = in optional = F [fluxswDOWN_allsky] - standard_name = sw_flux_profile_downward_allsky + standard_name = RRTMGP_sw_flux_profile_downward_allsky long_name = RRTMGP downward shortwave all-sky flux profile units = W m-2 dimensions = (horizontal_dimension,vertical_dimension_plus_one) @@ -101,7 +101,7 @@ intent = in optional = F [fluxswUP_clrsky] - standard_name = sw_flux_profile_upward_clrsky + standard_name = RRTMGP_sw_flux_profile_upward_clrsky long_name = RRTMGP upward shortwave clr-sky flux profile units = W m-2 dimensions = (horizontal_dimension,vertical_dimension_plus_one) @@ -110,7 +110,7 @@ intent = in optional = F [fluxswDOWN_clrsky] - standard_name = sw_flux_profile_downward_clrsky + standard_name = RRTMGP_sw_flux_profile_downward_clrsky long_name = RRTMGP downward shortwave clr-sky flux profile units = W m-2 dimensions = (horizontal_dimension,vertical_dimension_plus_one) @@ -127,14 +127,14 @@ intent = in optional = F [hswc] - standard_name = tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step - long_name = shortwave total sky heating rate + standard_name = RRTMGP_sw_heating_rate_all_sky + long_name = RRTMGP shortwave all sky heating rate units = K s-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys - intent = out optional = F + intent = out [topflx_sw] standard_name = sw_fluxes_top_atmosphere long_name = shortwave total sky fluxes at the top of the atm @@ -152,16 +152,16 @@ intent = inout optional = F [flxprf_sw] - standard_name = sw_fluxes + standard_name = RRTMGP_sw_fluxes long_name = sw fluxes total sky / csk and up / down at levels units = W m-2 - dimensions = (horizontal_dimension,adjusted_vertical_level_dimension_for_radiation) + dimensions = (horizontal_dimension,adjusted_vertical_level_dimension_plus_one) type = profsw_type intent = inout optional = T [hsw0] - standard_name = sw_heating_rate_clear_sky - long_name = shortwave clear sky heating rate + standard_name = RRTMGP_sw_heating_rate_clear_sky + long_name = RRTMGP shortwave clear sky heating rate units = K s-1 dimensions = (horizontal_dimension,vertical_dimension) type = real diff --git a/physics/rrtmgp_lw_cloud_optics.F90 b/physics/rrtmgp_lw_cloud_optics.F90 index 64f88522f..48af8b7c2 100644 --- a/physics/rrtmgp_lw_cloud_optics.F90 +++ b/physics/rrtmgp_lw_cloud_optics.F90 @@ -314,8 +314,8 @@ end subroutine rrtmgp_lw_cloud_optics_init ! ######################################################################################### subroutine rrtmgp_lw_cloud_optics_run(Model, ncol, ipsdlw0, icseed_lw, cld_frac, cld_lwp, & cld_reliq, cld_iwp, cld_reice, cld_swp, cld_resnow, cld_rwp, cld_rerain, & - lw_cloud_props, lw_gas_props, aerosols, & - cldtaulw, optical_props_clouds, optical_props_aerosol, errmsg, errflg) + lw_cloud_props, lw_gas_props, aerosolslw, & + cldtaulw, lw_optical_props_clouds, lw_optical_props_aerosol, errmsg, errflg) ! Inputs type(GFS_control_type), intent(in) :: & @@ -343,14 +343,14 @@ subroutine rrtmgp_lw_cloud_optics_run(Model, ncol, ipsdlw0, icseed_lw, cld_frac, type(ty_gas_optics_rrtmgp),intent(in) :: & lw_gas_props real(kind_phys), intent(in),dimension(ncol, model%levs, lw_gas_props%get_nband(),3) :: & - aerosols ! + aerosolslw ! ! Outputs real(kind_phys), dimension(ncol,Model%levs), intent(out) :: & cldtaulw ! approx 10.mu band layer cloud optical depth type(ty_optical_props_1scl),intent(out) :: & - optical_props_clouds, & ! - optical_props_aerosol ! + lw_optical_props_clouds, & ! + lw_optical_props_aerosol ! integer, intent(out) :: & errflg ! character(len=*), intent(out) :: & @@ -360,7 +360,7 @@ subroutine rrtmgp_lw_cloud_optics_run(Model, ncol, ipsdlw0, icseed_lw, cld_frac, integer :: iCol integer,dimension(ncol) :: ipseed_lw logical,dimension(ncol,model%levs) :: liqmask, icemask - type(ty_optical_props_1scl) :: optical_props_cloudsByBand + type(ty_optical_props_1scl) :: lw_optical_props_cloudsByBand type(random_stat) :: rng_stat real(kind_phys), dimension(lw_gas_props%get_ngpt(),model%levs,ncol) :: rng3D real(kind_phys), dimension(lw_gas_props%get_ngpt()*model%levs) :: rng1D @@ -397,19 +397,19 @@ subroutine rrtmgp_lw_cloud_optics_run(Model, ncol, ipsdlw0, icseed_lw, cld_frac, ! Allocate space for RRTMGP DDTs containing cloud and aerosol radiative properties ! ####################################################################################### ! Cloud optics [nCol,model%levs,nBands] - call check_error_msg('rrtmgp_lw_cloud_optics_run',optical_props_cloudsByBand%alloc_1scl(& + call check_error_msg('rrtmgp_lw_cloud_optics_run',lw_optical_props_cloudsByBand%alloc_1scl(& ncol, model%levs, lw_gas_props%get_band_lims_wavenumber())) ! Aerosol optics [nCol,model%levs,nBands] - call check_error_msg('rrtmgp_lw_cloud_optics_run',optical_props_aerosol%alloc_1scl( & + call check_error_msg('rrtmgp_lw_cloud_optics_run',lw_optical_props_aerosol%alloc_1scl( & ncol, model%levs, lw_gas_props%get_band_lims_wavenumber())) ! Cloud optics [nCol,model%levs,nGpts] - call check_error_msg('rrtmgp_lw_cloud_optics_run',optical_props_clouds%alloc_1scl( & + call check_error_msg('rrtmgp_lw_cloud_optics_run',lw_optical_props_clouds%alloc_1scl( & ncol, model%levs, lw_gas_props)) ! ####################################################################################### ! Copy aerosol optical information to RRTMGP DDT ! ####################################################################################### - optical_props_aerosol%tau = aerosols(:,:,:,1) * (1. - aerosols(:,:,:,2)) + lw_optical_props_aerosol%tau = aerosolslw(:,:,:,1) * (1. - aerosolslw(:,:,:,2)) ! ####################################################################################### ! Compute cloud-optics for RTE. @@ -427,7 +427,7 @@ subroutine rrtmgp_lw_cloud_optics_run(Model, ncol, ipsdlw0, icseed_lw, cld_frac, cld_iwp, & ! IN - Cloud ice water path cld_reliq, & ! IN - Cloud liquid effective radius cld_reice, & ! IN - Cloud ice effective radius - optical_props_cloudsByBand)) ! OUT - RRTMGP DDT containing cloud radiative properties + lw_optical_props_cloudsByBand)) ! OUT - RRTMGP DDT containing cloud radiative properties ! in each band else ! ii) RRTMG cloud-optics. @@ -435,7 +435,7 @@ subroutine rrtmgp_lw_cloud_optics_run(Model, ncol, ipsdlw0, icseed_lw, cld_frac, call rrtmg_lw_cloud_optics(ncol, model%levs, lw_gas_props%get_nband(), cld_lwp, & cld_reliq, cld_iwp, cld_reice, cld_rwp, cld_rerain, cld_swp, cld_resnow, & cld_frac, tau_cld) - optical_props_cloudsByBand%tau = tau_cld + lw_optical_props_cloudsByBand%tau = tau_cld endif endif @@ -458,10 +458,10 @@ subroutine rrtmgp_lw_cloud_optics_run(Model, ncol, ipsdlw0, icseed_lw, cld_frac, end select ! Map band optical depth to each g-point using McICA - call check_error_msg('rrtmgp_lw_cloud_optics_run',draw_samples(cldfracMCICA,optical_props_cloudsByBand,optical_props_clouds)) + call check_error_msg('rrtmgp_lw_cloud_optics_run',draw_samples(cldfracMCICA,lw_optical_props_cloudsByBand,lw_optical_props_clouds)) ! GFS_RRTMGP_POST_RUN() requires the LW optical depth ~10microns - cldtaulw = optical_props_cloudsByBand%tau(:,:,7) + cldtaulw = lw_optical_props_cloudsByBand%tau(:,:,7) end subroutine rrtmgp_lw_cloud_optics_run diff --git a/physics/rrtmgp_lw_cloud_optics.meta b/physics/rrtmgp_lw_cloud_optics.meta index b2e37e55a..7703610f4 100644 --- a/physics/rrtmgp_lw_cloud_optics.meta +++ b/physics/rrtmgp_lw_cloud_optics.meta @@ -183,7 +183,7 @@ intent = in type = ty_cloud_optics optional = F -[aerosols] +[aerosolslw] standard_name = RRTMGP_aerosol_optical_properties_for_longwave_bands_01_16 long_name = aerosol optical properties for longwave bands 01-16 units = various @@ -201,7 +201,7 @@ kind = kind_phys intent = out optional = F -[optical_props_clouds] +[lw_optical_props_clouds] standard_name = longwave_optical_properties_for_cloudy_atmosphere long_name = Fortran DDT containing RRTMGP optical properties units = DDT @@ -209,7 +209,7 @@ type = ty_optical_props_1scl intent = out optional = F -[optical_props_aerosol] +[lw_optical_props_aerosol] standard_name = longwave_optical_properties_for_aerosols long_name = Fortran DDT containing RRTMGP optical properties units = DDT @@ -233,4 +233,4 @@ dimensions = () type = integer intent = out - optional = F \ No newline at end of file + optional = F diff --git a/physics/rrtmgp_lw_clrallsky_driver.F90 b/physics/rrtmgp_lw_clrallsky_driver.F90 index 3ee39ba45..2d5237916 100644 --- a/physics/rrtmgp_lw_clrallsky_driver.F90 +++ b/physics/rrtmgp_lw_clrallsky_driver.F90 @@ -27,9 +27,10 @@ end subroutine rrtmgp_lw_clrallsky_driver_init !! \section arg_table_rrtmgp_lw_clrallsky_driver_run !! \htmlinclude rrtmgp_lw_clrallsky_driver.html !! - subroutine rrtmgp_lw_clrallsky_driver_run(Model, Radtend, ncol, lw_gas_props, p_lay, t_lay, p_lev, skt, & - gas_concentrations, optical_propsLW_clds, optical_propsLW_aerosol,& - lslwr, fluxUP_allsky, fluxDOWN_allsky, fluxUP_clrsky, fluxDOWN_clrsky, hlw0, hlwb, errmsg, errflg) + subroutine rrtmgp_lw_clrallsky_driver_run(Model, Radtend, ncol, lw_gas_props, p_lay, t_lay,& + p_lev, skt, gas_concentrations, lw_optical_props_clouds, lw_optical_props_aerosol, & + lslwr, fluxlwUP_allsky, fluxlwDOWN_allsky, fluxlwUP_clrsky, fluxlwDOWN_clrsky, hlw0, & + hlwb, errmsg, errflg) ! Inputs type(GFS_control_type), intent(in) :: & @@ -48,8 +49,8 @@ subroutine rrtmgp_lw_clrallsky_driver_run(Model, Radtend, ncol, lw_gas_props, p_ type(ty_gas_optics_rrtmgp),intent(in) :: & lw_gas_props ! DDT containing LW spectral information type(ty_optical_props_1scl),intent(in) :: & - optical_propsLW_clds, & ! RRTMGP DDT: longwave cloud radiative properties - optical_propsLW_aerosol ! RRTMGP DDT: longwave aerosol radiative properties + lw_optical_props_clouds, & ! RRTMGP DDT: longwave cloud radiative properties + lw_optical_props_aerosol ! RRTMGP DDT: longwave aerosol radiative properties type(ty_gas_concs),intent(in) :: & gas_concentrations ! RRTMGP DDT: trace gas concentrations (vmr) logical, intent(in) :: & @@ -59,10 +60,10 @@ subroutine rrtmgp_lw_clrallsky_driver_run(Model, Radtend, ncol, lw_gas_props, p_ character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg real(kind_phys), dimension(ncol,model%levs), intent(out) :: & - fluxUP_allsky, & ! All-sky flux (W/m2) - fluxDOWN_allsky, & ! All-sky flux (W/m2) - fluxUP_clrsky, & ! Clear-sky flux (W/m2) - fluxDOWN_clrsky ! All-sky flux (W/m2) + fluxlwUP_allsky, & ! All-sky flux (W/m2) + fluxlwDOWN_allsky, & ! All-sky flux (W/m2) + fluxlwUP_clrsky, & ! Clear-sky flux (W/m2) + fluxlwDOWN_clrsky ! All-sky flux (W/m2) ! Outputs (optional) real(kind_phys), dimension(ncol,model%levs,lw_gas_props%get_nband()), optional, intent(inout) :: & @@ -109,14 +110,14 @@ subroutine rrtmgp_lw_clrallsky_driver_run(Model, Radtend, ncol, lw_gas_props, p_ p_lev, & ! IN - pressure at layer centers (Pa) skt, & ! IN - skin temperature (K) Radtend%sfc_emiss_byband, & ! IN - surface emissivity in each LW band - optical_propsLW_clds, & ! IN - DDT containing cloud optical information + lw_optical_props_clouds, & ! IN - DDT containing cloud optical information flux_allsky, & ! OUT - Fluxes, all-sky, 3D (nCol,model%levs,nBand) flux_clrsky, & ! OUT - Fluxes, clear-sky, 3D (nCol,model%levs,nBand) - aer_props = optical_propsLW_aerosol)) ! IN(optional) - DDT containing aerosol optical information - fluxUP_allsky = flux_allsky%flux_up - fluxDOWN_allsky = flux_allsky%flux_dn - fluxUP_clrsky = flux_clrsky%flux_up - fluxDOWN_clrsky = flux_clrsky%flux_dn + aer_props = lw_optical_props_aerosol)) ! IN(optional) - DDT containing aerosol optical information + fluxlwUP_allsky = flux_allsky%flux_up + fluxlwDOWN_allsky = flux_allsky%flux_dn + fluxlwUP_clrsky = flux_clrsky%flux_up + fluxlwDOWN_clrsky = flux_clrsky%flux_dn end subroutine rrtmgp_lw_clrallsky_driver_run diff --git a/physics/rrtmgp_lw_clrallsky_driver.meta b/physics/rrtmgp_lw_clrallsky_driver.meta index bc520ad64..00609ce31 100644 --- a/physics/rrtmgp_lw_clrallsky_driver.meta +++ b/physics/rrtmgp_lw_clrallsky_driver.meta @@ -69,7 +69,7 @@ type = ty_gas_optics_rrtmgp intent = in optional = F -[optical_propsLW_clds] +[lw_optical_props_clouds] standard_name = longwave_optical_properties_for_cloudy_atmosphere long_name = Fortran DDT containing RRTMGP optical properties units = DDT @@ -77,7 +77,7 @@ type = ty_optical_props_1scl intent = in optional = F -[optical_propsLW_aerosol] +[lw_optical_props_aerosol] standard_name = longwave_optical_properties_for_aerosols long_name = Fortran DDT containing RRTMGP optical properties units = DDT @@ -102,25 +102,26 @@ intent = in optional = F [hlw0] - standard_name = tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_time_step - long_name = longwave clear sky heating rate + standard_name = RRTMGP_lw_heating_rate_clear_sky + long_name = RRTMGP longwave clear sky heating rate units = K s-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys - intent = in optional = T + intent = in [hlwb] - standard_name = lw_heating_rate_spectral - long_name = longwave total sky heating rate (spectral) + standard_name = RRTMGP_lw_heating_rate_spectral + long_name = RRTMGP longwave total sky heating rate (spectral) units = K s-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_longwave_radiation) + dimensions = (horizontal_dimension,vertical_dimension,number_of_lw_spectral_points_rrtmgp) type = real kind = kind_phys - intent = in optional = T -[fluxUP_allsky] - standard_name = lw_flux_profile_upward_allsky + kind = kind_phys + intent = in +[fluxlwUP_allsky] + standard_name = RRTMGP_lw_flux_profile_upward_allsky long_name = RRTMGP upward longwave all-sky flux profile units = W m-2 dimensions = (horizontal_dimension,vertical_dimension_plus_one) @@ -128,8 +129,8 @@ kind = kind_phys intent = out optional = F -[fluxDOWN_allsky] - standard_name = lw_flux_profile_downward_allsky +[fluxlwDOWN_allsky] + standard_name = RRTMGP_lw_flux_profile_downward_allsky long_name = RRTMGP downward longwave all-sky flux profile units = W m-2 dimensions = (horizontal_dimension,vertical_dimension_plus_one) @@ -137,8 +138,8 @@ kind = kind_phys intent = out optional = F -[fluxUP_clrsky] - standard_name = lw_flux_profile_upward_clrsky +[fluxlwUP_clrsky] + standard_name = RRTMGP_lw_flux_profile_upward_clrsky long_name = RRTMGP upward longwave clr-sky flux profile units = W m-2 dimensions = (horizontal_dimension,vertical_dimension_plus_one) @@ -146,8 +147,8 @@ kind = kind_phys intent = out optional = F -[fluxDOWN_clrsky] - standard_name = lw_flux_profile_downward_clrsky +[fluxlwDOWN_clrsky] + standard_name = RRTMGP_lw_flux_profile_downward_clrsky long_name = RRTMGP downward longwave clr-sky flux profile units = W m-2 dimensions = (horizontal_dimension,vertical_dimension_plus_one) diff --git a/physics/rrtmgp_lw_gas_optics.F90 b/physics/rrtmgp_lw_gas_optics.F90 index 94b31c32e..f829fa18c 100644 --- a/physics/rrtmgp_lw_gas_optics.F90 +++ b/physics/rrtmgp_lw_gas_optics.F90 @@ -415,8 +415,9 @@ end subroutine rrtmgp_lw_gas_optics_init !! \section arg_table_rrtmgp_lw_gas_optics_run !! \htmlinclude rrtmgp_lw_gas_optics.html !! - subroutine rrtmgp_lw_gas_optics_run(Model, Radtend, lw_gas_props, ncol, p_lay, p_lev, t_lay, t_lev, skt, & - gas_concentrations, lslwr, optical_props_clrsky, sources_LW, toa_src, errmsg, errflg) + subroutine rrtmgp_lw_gas_optics_run(Model, Radtend, lw_gas_props, ncol, p_lay, p_lev, t_lay,& + t_lev, skt, gas_concentrations, lslwr, lw_optical_props_clrsky, sources, & + errmsg, errflg) ! Inputs type(GFS_control_type), intent(in) :: & @@ -447,11 +448,9 @@ subroutine rrtmgp_lw_gas_optics_run(Model, Radtend, lw_gas_props, ncol, p_lay, p integer, intent(out) :: & errflg ! Error code type(ty_optical_props_1scl),intent(out) :: & - optical_props_clrsky ! + lw_optical_props_clrsky ! type(ty_source_func_lw),intent(out) :: & - sources_LW - real(kind_phys),dimension(ncol,lw_gas_props%get_ngpt()),intent(out) :: & - toa_src + sources ! Initialize CCPP error handling variables errmsg = '' @@ -460,9 +459,9 @@ subroutine rrtmgp_lw_gas_optics_run(Model, Radtend, lw_gas_props, ncol, p_lay, p if (.not. Model%lslwr) return ! Allocate space - call check_error_msg('rrtmgp_lw_gas_optics_run',optical_props_clrsky%alloc_1scl(ncol, model%levs, lw_gas_props)) - call check_error_msg('rrtmgp_lw_gas_optics_run',sources_LW%init(lw_gas_props)) - call check_error_msg('rrtmgp_lw_gas_optics_run',sources_LW%alloc(ncol, Model%levs)) + call check_error_msg('rrtmgp_lw_gas_optics_run',lw_optical_props_clrsky%alloc_1scl(ncol, model%levs, lw_gas_props)) + call check_error_msg('rrtmgp_lw_gas_optics_run',sources%init(lw_gas_props)) + call check_error_msg('rrtmgp_lw_gas_optics_run',sources%alloc(ncol, Model%levs)) ! Compute boundary-condition (Only do for low-ceiling models) !call check_error_msg('rrtmgp_lw_gas_optics_run',compute_bc(& @@ -471,19 +470,19 @@ subroutine rrtmgp_lw_gas_optics_run(Model, Radtend, lw_gas_props, ncol, p_lay, p ! p_lev, & ! IN - ! t_lay, & ! IN - ! gas_concentrations, & ! IN - - ! toa_src)) ! OUT - + ! Radtend%toa_src_lw)) ! OUT - ! Gas-optics (djs asks pincus: I think it makes sense to have a generic gas_optics interface in ! ty_gas_optics_rrtmgp, just as in ty_gas_optics. call check_error_msg('rrtmgp_lw_gas_optics_run',lw_gas_props%gas_optics_int(& - p_lay, & ! IN - - p_lev, & ! IN - - t_lay, & ! IN - - skt, & ! IN - - gas_concentrations, & ! IN - - optical_props_clrsky, & ! OUT - - sources_LW, & ! OUT - - tlev=t_lev)) ! IN - + p_lay, & ! IN - + p_lev, & ! IN - + t_lay, & ! IN - + skt, & ! IN - + gas_concentrations, & ! IN - + lw_optical_props_clrsky, & ! OUT - + sources, & ! OUT - + tlev=t_lev)) ! IN - end subroutine rrtmgp_lw_gas_optics_run diff --git a/physics/rrtmgp_lw_gas_optics.meta b/physics/rrtmgp_lw_gas_optics.meta index 8b1f59822..087f44367 100644 --- a/physics/rrtmgp_lw_gas_optics.meta +++ b/physics/rrtmgp_lw_gas_optics.meta @@ -189,7 +189,7 @@ type = integer intent = out optional = F -[optical_props_clrsky] +[lw_optical_props_clrsky] standard_name = longwave_optical_properties_for_clear_sky long_name = Fortran DDT containing RRTMGP optical properties units = DDT @@ -197,7 +197,7 @@ type = ty_optical_props_1scl intent = out optional = F -[sources_LW] +[sources] standard_name = longwave_source_function long_name = Fortran DDT containing RRTMGP source functions units = DDT @@ -205,12 +205,3 @@ type = ty_source_func_lw intent = out optional = F -[toa_src] - standard_name = incident_terrestrial_irradiance_at_top_of_atmosphere_by_spectral_point - long_name = top of atmosphere incident terrestrial flux in each spectral point - units = - dimensions = (horizontal_dimension,number_of_sw_spectral_points_rrtmgp) - type = real - kind = kind_phys - intent = out - optional = F diff --git a/physics/rrtmgp_lw_rte.F90 b/physics/rrtmgp_lw_rte.F90 index b035d9447..ce2ef93fd 100644 --- a/physics/rrtmgp_lw_rte.F90 +++ b/physics/rrtmgp_lw_rte.F90 @@ -28,8 +28,8 @@ end subroutine rrtmgp_lw_rte_init !! \htmlinclude rrtmgp_lw_rte.html !! subroutine rrtmgp_lw_rte_run(Model, Statein, Radtend, ncol, lw_gas_props, p_lay, t_lay, p_lev, & - skt, sources, optical_props_clrsky, optical_props_cloud, optical_props_aerosol, lslwr,& - fluxUP_allsky, fluxDOWN_allsky, fluxUP_clrsky, fluxDOWN_clrsky, hlw0, hlwb, errmsg, errflg) + skt, sources, lw_optical_props_clrsky, lw_optical_props_clouds, lw_optical_props_aerosol, lslwr,& + fluxlwUP_allsky, fluxlwDOWN_allsky, fluxlwUP_clrsky, fluxlwDOWN_clrsky, hlw0, hlwb, errmsg, errflg) ! Inputs type(GFS_control_type), intent(in) :: & @@ -50,10 +50,10 @@ subroutine rrtmgp_lw_rte_run(Model, Statein, Radtend, ncol, lw_gas_props, p_lay, type(ty_gas_optics_rrtmgp),intent(in) :: & lw_gas_props ! DDT containing LW spectral information type(ty_optical_props_1scl),intent(inout) :: & - optical_props_clrsky ! RRTMGP DDT: longwave clear-sky radiative properties + lw_optical_props_clrsky ! RRTMGP DDT: longwave clear-sky radiative properties type(ty_optical_props_1scl),intent(in) :: & - optical_props_cloud, & ! RRTMGP DDT: longwave cloud radiative properties - optical_props_aerosol ! RRTMGP DDT: longwave aerosol radiative properties + lw_optical_props_clouds, & ! RRTMGP DDT: longwave cloud radiative properties + lw_optical_props_aerosol ! RRTMGP DDT: longwave aerosol radiative properties type(ty_source_func_lw),intent(in) :: & sources logical, intent(in) :: & @@ -65,10 +65,10 @@ subroutine rrtmgp_lw_rte_run(Model, Statein, Radtend, ncol, lw_gas_props, p_lay, integer, intent(out) :: & errflg ! CCPP error flag real(kind_phys), dimension(ncol,model%levs+1), intent(out) :: & - fluxUP_allsky, & ! All-sky flux (W/m2) - fluxDOWN_allsky, & ! All-sky flux (W/m2) - fluxUP_clrsky, & ! Clear-sky flux (W/m2) - fluxDOWN_clrsky ! All-sky flux (W/m2) + fluxlwUP_allsky, & ! All-sky flux (W/m2) + fluxlwDOWN_allsky, & ! All-sky flux (W/m2) + fluxlwUP_clrsky, & ! Clear-sky flux (W/m2) + fluxlwDOWN_clrsky ! All-sky flux (W/m2) ! Outputs (optional) real(kind_phys), dimension(ncol,model%levs,lw_gas_props%get_nband()), optional, intent(inout) :: & @@ -111,31 +111,31 @@ subroutine rrtmgp_lw_rte_run(Model, Statein, Radtend, ncol, lw_gas_props, p_lay, ! Compute clear-sky fluxes (if requested) ! Clear-sky fluxes are gas+aerosol - call check_error_msg('rrtmgp_lw_rte_run',optical_props_aerosol%increment(optical_props_clrsky)) + call check_error_msg('rrtmgp_lw_rte_run',lw_optical_props_aerosol%increment(lw_optical_props_clrsky)) if (l_ClrSky_HR) then call check_error_msg('rrtmgp_lw_rte_run',rte_lw( & - optical_props_clrsky, & ! IN - optical-properties + lw_optical_props_clrsky, & ! IN - optical-properties top_at_1, & ! IN - veritcal ordering flag sources, & ! IN - source function Radtend%sfc_emiss_byband, & ! IN - surface emissivity in each LW band flux_clrsky)) ! Store fluxes - fluxUP_clrsky = flux_clrsky%flux_up - fluxDOWN_clrsky = flux_clrsky%flux_dn + fluxlwUP_clrsky = flux_clrsky%flux_up + fluxlwDOWN_clrsky = flux_clrsky%flux_dn endif ! All-sky fluxes ! Clear-sky fluxes are (gas+aerosol)+clouds - call check_error_msg('rrtmgp_lw_rte_run',optical_props_cloud%increment(optical_props_clrsky)) + call check_error_msg('rrtmgp_lw_rte_run',lw_optical_props_clouds%increment(lw_optical_props_clrsky)) call check_error_msg('rrtmgp_lw_rte_run',rte_lw( & - optical_props_clrsky, & ! IN - optical-properties + lw_optical_props_clrsky, & ! IN - optical-properties top_at_1, & ! IN - veritcal ordering flag sources, & ! IN - source function Radtend%sfc_emiss_byband, & ! IN - surface emissivity in each LW band flux_allsky)) ! Store fluxes - fluxUP_allsky = flux_allsky%flux_up - fluxDOWN_allsky = flux_allsky%flux_dn + fluxlwUP_allsky = flux_allsky%flux_up + fluxlwDOWN_allsky = flux_allsky%flux_dn end subroutine rrtmgp_lw_rte_run diff --git a/physics/rrtmgp_lw_rte.meta b/physics/rrtmgp_lw_rte.meta index e3fdb7ac3..8e5d653ee 100644 --- a/physics/rrtmgp_lw_rte.meta +++ b/physics/rrtmgp_lw_rte.meta @@ -77,7 +77,7 @@ type = ty_gas_optics_rrtmgp intent = in optional = F -[optical_props_clrsky] +[lw_optical_props_clrsky] standard_name = longwave_optical_properties_for_clear_sky long_name = Fortran DDT containing RRTMGP optical properties units = DDT @@ -85,7 +85,7 @@ type = ty_optical_props_1scl intent = inout optional = F -[optical_props_cloud] +[lw_optical_props_clouds] standard_name = longwave_optical_properties_for_cloudy_atmosphere long_name = Fortran DDT containing RRTMGP optical properties units = DDT @@ -93,7 +93,7 @@ type = ty_optical_props_1scl intent = in optional = F -[optical_props_aerosol] +[lw_optical_props_aerosol] standard_name = longwave_optical_properties_for_aerosols long_name = Fortran DDT containing RRTMGP optical properties units = DDT @@ -118,25 +118,25 @@ intent = in optional = F [hlw0] - standard_name = tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_time_step - long_name = longwave clear sky heating rate + standard_name = RRTMGP_lw_heating_rate_clear_sky + long_name = RRTMGP longwave clear sky heating rate units = K s-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys intent = in optional = T [hlwb] - standard_name = lw_heating_rate_spectral - long_name = longwave total sky heating rate (spectral) + standard_name = RRTMGP_lw_heating_rate_spectral + long_name = RRTMGP longwave total sky heating rate (spectral) units = K s-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_longwave_radiation) + dimensions = (horizontal_dimension,vertical_dimension,number_of_lw_spectral_points_rrtmgp) type = real kind = kind_phys intent = in optional = T -[fluxUP_allsky] - standard_name = lw_flux_profile_upward_allsky +[fluxlwUP_allsky] + standard_name = RRTMGP_lw_flux_profile_upward_allsky long_name = RRTMGP upward longwave all-sky flux profile units = W m-2 dimensions = (horizontal_dimension,vertical_dimension_plus_one) @@ -144,8 +144,8 @@ kind = kind_phys intent = out optional = F -[fluxDOWN_allsky] - standard_name = lw_flux_profile_downward_allsky +[fluxlwDOWN_allsky] + standard_name = RRTMGP_lw_flux_profile_downward_allsky long_name = RRTMGP downward longwave all-sky flux profile units = W m-2 dimensions = (horizontal_dimension,vertical_dimension_plus_one) @@ -153,8 +153,8 @@ kind = kind_phys intent = out optional = F -[fluxUP_clrsky] - standard_name = lw_flux_profile_upward_clrsky +[fluxlwUP_clrsky] + standard_name = RRTMGP_lw_flux_profile_upward_clrsky long_name = RRTMGP upward longwave clr-sky flux profile units = W m-2 dimensions = (horizontal_dimension,vertical_dimension_plus_one) @@ -162,8 +162,8 @@ kind = kind_phys intent = out optional = F -[fluxDOWN_clrsky] - standard_name = lw_flux_profile_downward_clrsky +[fluxlwDOWN_clrsky] + standard_name = RRTMGP_lw_flux_profile_downward_clrsky long_name = RRTMGP downward longwave clr-sky flux profile units = W m-2 dimensions = (horizontal_dimension,vertical_dimension_plus_one) diff --git a/physics/rrtmgp_sw_cloud_optics.F90 b/physics/rrtmgp_sw_cloud_optics.F90 index e380027ad..6efdb5f01 100644 --- a/physics/rrtmgp_sw_cloud_optics.F90 +++ b/physics/rrtmgp_sw_cloud_optics.F90 @@ -311,10 +311,10 @@ end subroutine rrtmgp_sw_cloud_optics_init ! ######################################################################################### ! SUBROTUINE rrtmgp_sw_cloud_optics_run() ! ######################################################################################### - subroutine rrtmgp_sw_cloud_optics_run(Model, ncol, icseed_sw, cld_frac, & ! IN - cld_lwp, cld_reliq, cld_iwp, cld_reice, cld_swp, cld_resnow, cld_rwp, cld_rerain, & ! IN - aerosols, sw_cloud_props, sw_gas_props, ipsdsw0, nday, idxday, & ! IN - optical_props_clouds, optical_props_aerosol, cldtausw, errmsg, errflg) ! OUT + subroutine rrtmgp_sw_cloud_optics_run(Model, ncol, icseed_sw, cld_frac, cld_lwp, cld_reliq,& + cld_iwp, cld_reice, cld_swp, cld_resnow, cld_rwp, cld_rerain, aerosolssw, & + sw_cloud_props, sw_gas_props, ipsdsw0, nday, idxday, & ! IN + sw_optical_props_clouds, sw_optical_props_aerosol, cldtausw, errmsg, errflg) ! OUT ! Inputs type(GFS_control_type), intent(in) :: & @@ -345,12 +345,12 @@ subroutine rrtmgp_sw_cloud_optics_run(Model, ncol, icseed_sw, cld_frac, & type(ty_gas_optics_rrtmgp),intent(in) :: & sw_gas_props real(kind_phys), intent(in),dimension(ncol, model%levs, sw_gas_props%get_nband(),3) :: & - aerosols ! + aerosolssw ! ! Outputs type(ty_optical_props_2str),intent(out) :: & - optical_props_clouds, & - optical_props_aerosol + sw_optical_props_clouds, & + sw_optical_props_aerosol real(kind_phys), dimension(ncol,Model%levs), intent(out) :: & cldtausw ! approx 10.mu band layer cloud optical depth integer, intent(out) :: errflg @@ -360,7 +360,7 @@ subroutine rrtmgp_sw_cloud_optics_run(Model, ncol, icseed_sw, cld_frac, & integer :: iCol integer,dimension(ncol) :: ipseed_sw logical,dimension(ncol,model%levs) :: liqmask, icemask - type(ty_optical_props_2str) :: optical_props_cloudsByBand + type(ty_optical_props_2str) :: sw_optical_props_cloudsByBand type(random_stat) :: rng_stat real(kind_phys), dimension(sw_gas_props%get_ngpt(),model%levs,ncol) :: rng3D real(kind_phys), dimension(sw_gas_props%get_ngpt()*model%levs) :: rng1D @@ -397,21 +397,21 @@ subroutine rrtmgp_sw_cloud_optics_run(Model, ncol, icseed_sw, cld_frac, & ! Allocate space for RRTMGP DDTs containing cloud and aerosol radiative properties ! ####################################################################################### ! Cloud optics [ncol,model%levs,nBands] - call check_error_msg('rrtmgp_sw_cloud_optics_run',optical_props_cloudsByBand%alloc_2str(& + call check_error_msg('rrtmgp_sw_cloud_optics_run',sw_optical_props_cloudsByBand%alloc_2str(& ncol, model%levs, sw_gas_props%get_band_lims_wavenumber())) ! Aerosol optics [ncol,model%levs,nBands] - call check_error_msg('rrtmgp_sw_cloud_optics_run',optical_props_aerosol%alloc_2str( & + call check_error_msg('rrtmgp_sw_cloud_optics_run',sw_optical_props_aerosol%alloc_2str( & ncol, model%levs, sw_gas_props%get_band_lims_wavenumber())) ! Cloud optics [ncol,model%levs,nGpt] - call check_error_msg('rrtmgp_sw_cloud_optics_run',optical_props_clouds%alloc_2str( & + call check_error_msg('rrtmgp_sw_cloud_optics_run',sw_optical_props_clouds%alloc_2str( & ncol, model%levs, sw_gas_props)) ! ####################################################################################### ! Copy aerosol optical information to RRTMGP DDT ! ####################################################################################### - optical_props_aerosol%tau = aerosols(:,:,:,1) - optical_props_aerosol%ssa = aerosols(:,:,:,2) - optical_props_aerosol%g = aerosols(:,:,:,3) + sw_optical_props_aerosol%tau = aerosolssw(:,:,:,1) + sw_optical_props_aerosol%ssa = aerosolssw(:,:,:,2) + sw_optical_props_aerosol%g = aerosolssw(:,:,:,3) ! ####################################################################################### ! Compute cloud-optics for RTE. @@ -429,21 +429,21 @@ subroutine rrtmgp_sw_cloud_optics_run(Model, ncol, icseed_sw, cld_frac, & cld_iwp, & ! IN - Cloud ice water path cld_reliq, & ! IN - Cloud liquid effective radius cld_reice, & ! IN - Cloud ice effective radius - optical_props_cloudsByBand)) ! OUT - RRTMGP DDT containing cloud radiative properties + sw_optical_props_cloudsByBand)) ! OUT - RRTMGP DDT containing cloud radiative properties ! in each band else ! RRTMG cloud-optics if (any(cld_frac .gt. 0)) then - optical_props_cloudsByBand%tau(:,:,:) = 0._kind_phys - optical_props_cloudsByBand%ssa(:,:,:) = 0._kind_phys - optical_props_cloudsByBand%g(:,:,:) = 0._kind_phys + sw_optical_props_cloudsByBand%tau(:,:,:) = 0._kind_phys + sw_optical_props_cloudsByBand%ssa(:,:,:) = 0._kind_phys + sw_optical_props_cloudsByBand%g(:,:,:) = 0._kind_phys call rrtmg_sw_cloud_optics(nday, model%levs, sw_gas_props%get_nband(), cld_lwp(idxday,:), & cld_reliq(idxday,:), cld_iwp(idxday,:), cld_reice(idxday,:), cld_rwp(idxday,:), & cld_rerain(idxday,:), cld_swp(idxday,:), cld_resnow(idxday,:), cld_frac(idxday,:),& tau_cld, ssa_cld, asy_cld) - optical_props_cloudsByBand%tau(idxday,:,:) = tau_cld - optical_props_cloudsByBand%ssa(idxday,:,:) = ssa_cld - optical_props_cloudsByBand%g(idxday,:,:) = asy_cld + sw_optical_props_cloudsByBand%tau(idxday,:,:) = tau_cld + sw_optical_props_cloudsByBand%ssa(idxday,:,:) = ssa_cld + sw_optical_props_cloudsByBand%g(idxday,:,:) = asy_cld endif endif ! ####################################################################################### @@ -465,10 +465,10 @@ subroutine rrtmgp_sw_cloud_optics_run(Model, ncol, icseed_sw, cld_frac, & end select ! Map band optical depth to each g-point using McICA - call check_error_msg('rrtmgp_sw_cloud_optics_run',draw_samples(cldfracMCICA,optical_props_cloudsByBand,optical_props_clouds)) + call check_error_msg('rrtmgp_sw_cloud_optics_run',draw_samples(cldfracMCICA,sw_optical_props_cloudsByBand,sw_optical_props_clouds)) ! GFS_RRTMGP_POST_RUN() requires the SW optical depth ~0.55microns - cldtausw = optical_props_cloudsByBand%tau(:,:,11) + cldtausw = sw_optical_props_cloudsByBand%tau(:,:,11) end subroutine rrtmgp_sw_cloud_optics_run diff --git a/physics/rrtmgp_sw_cloud_optics.meta b/physics/rrtmgp_sw_cloud_optics.meta index d70370d70..1bbd21d53 100644 --- a/physics/rrtmgp_sw_cloud_optics.meta +++ b/physics/rrtmgp_sw_cloud_optics.meta @@ -161,15 +161,15 @@ intent = in optional = F [icseed_sw] - standard_name = seed_random_numbers_sw + standard_name = seed_random_numbers_sw_for_RRTMGP long_name = seed for random number generation for shortwave radiation units = none dimensions = (horizontal_dimension) type = integer intent = in optional = F -[aerosols] - standard_name = aerosol_optical_properties_for_shortwave_bands_01_16 +[aerosolssw] + standard_name = RRTMGP_aerosol_optical_properties_for_shortwave_bands_01_16 long_name = aerosol optical properties for shortwave bands 01-16 units = various dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_shortwave_radiation,number_of_aerosol_output_fields_for_shortwave_radiation) @@ -217,7 +217,7 @@ type = integer intent = in optional = F -[optical_props_clouds] +[sw_optical_props_clouds] standard_name = shortwave_optical_properties_for_cloudy_atmosphere long_name = Fortran DDT containing RRTMGP optical properties units = DDT @@ -225,7 +225,7 @@ type = ty_optical_props_2str intent = out optional = F -[optical_props_aerosol] +[sw_optical_props_aerosol] standard_name = shortwave_optical_properties_for_aerosols long_name = Fortran DDT containing RRTMGP optical properties units = DDT diff --git a/physics/rrtmgp_sw_clrallsky_driver.F90 b/physics/rrtmgp_sw_clrallsky_driver.F90 index 99f42a688..4d284b71d 100644 --- a/physics/rrtmgp_sw_clrallsky_driver.F90 +++ b/physics/rrtmgp_sw_clrallsky_driver.F90 @@ -29,10 +29,10 @@ end subroutine rrtmgp_sw_clrallsky_driver_init !! \section arg_table_rrtmgp_sw_clrallsky_driver_run !! \htmlinclude rrtmgp_sw_clrallsky_driver.html !! - subroutine rrtmgp_sw_clrallsky_driver_run(Model, Radtend, ncol, sw_gas_props, p_lay, t_lay, p_lev, gas_concentrations, & - optical_props_clds, optical_props_aerosol, & - lsswr, nday, idxday, hsw0, hswb, scmpsw, & - fluxUP_allsky, fluxDOWN_allsky, fluxUP_clrsky, fluxDOWN_clrsky, errmsg, errflg) + subroutine rrtmgp_sw_clrallsky_driver_run(Model, Radtend, ncol, sw_gas_props, p_lay, t_lay,& + p_lev, gas_concentrations,sw_optical_props_clouds, sw_optical_props_aerosol, lsswr, & + nday, idxday, hsw0, hswb, scmpsw, & + fluxswUP_allsky, fluxswDOWN_allsky, fluxswUP_clrsky, fluxswDOWN_clrsky, errmsg, errflg) ! Inputs type(GFS_control_type), intent(in) :: Model @@ -50,8 +50,8 @@ subroutine rrtmgp_sw_clrallsky_driver_run(Model, Radtend, ncol, sw_gas_props, p_ type(ty_gas_optics_rrtmgp),intent(in) :: & sw_gas_props ! DDT containing SW spectral information type(ty_optical_props_2str),intent(in) :: & - optical_props_clds, & ! RRTMGP DDT: longwave cloud radiative properties - optical_props_aerosol ! RRTMGP DDT: longwave aerosol radiative properties + sw_optical_props_clouds, & ! RRTMGP DDT: longwave cloud radiative properties + sw_optical_props_aerosol ! RRTMGP DDT: longwave aerosol radiative properties type(ty_gas_concs),intent(in) :: & gas_concentrations ! RRTMGP DDT: trace gas concentrations (vmr) @@ -62,10 +62,10 @@ subroutine rrtmgp_sw_clrallsky_driver_run(Model, Radtend, ncol, sw_gas_props, p_ character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg real(kind_phys), dimension(ncol,Model%levs), intent(out) :: & - fluxUP_allsky, & ! All-sky flux (W/m2) - fluxDOWN_allsky, & ! All-sky flux (W/m2) - fluxUP_clrsky, & ! Clear-sky flux (W/m2) - fluxDOWN_clrsky ! All-sky flux (W/m2) + fluxswUP_allsky, & ! All-sky flux (W/m2) + fluxswDOWN_allsky, & ! All-sky flux (W/m2) + fluxswUP_clrsky, & ! Clear-sky flux (W/m2) + fluxswDOWN_clrsky ! All-sky flux (W/m2) ! Inputs (optional) (NOTE. We only need the optional arguments to know what fluxes to output, HR's are computed later) real(kind_phys), dimension(ncol,Model%levs), optional, intent(inout) :: & @@ -94,8 +94,8 @@ subroutine rrtmgp_sw_clrallsky_driver_run(Model, Radtend, ncol, sw_gas_props, p_ logical :: l_ClrSky_HR=.false., l_AllSky_HR_byband=.false., l_scmpsw=.false. integer :: iGas type(ty_optical_props_2str) :: & - optical_props_clds_daylit, & ! RRTMGP DDT: longwave cloud radiative properties - optical_props_aerosol_daylit ! RRTMGP DDT: longwave aerosol radiative properties + sw_optical_props_clouds_daylit, & ! RRTMGP DDT: longwave cloud radiative properties + sw_optical_props_aerosol_daylit ! RRTMGP DDT: longwave aerosol radiative properties type(ty_gas_concs) :: & gas_concentrations_daylit ! RRTMGP DDT: trace gas concentrations (vmr) @@ -112,24 +112,24 @@ subroutine rrtmgp_sw_clrallsky_driver_run(Model, Radtend, ncol, sw_gas_props, p_ if ( l_scmpsw ) then scmpsw = cmpfsw_type (0., 0., 0., 0., 0., 0.) endif - fluxUP_allsky(:,:) = 0._kind_phys - fluxDOWN_allsky(:,:) = 0._kind_phys - fluxUP_clrsky(:,:) = 0._kind_phys - fluxDOWN_clrsky(:,:) = 0._kind_phys + fluxswUP_allsky(:,:) = 0._kind_phys + fluxswDOWN_allsky(:,:) = 0._kind_phys + fluxswUP_clrsky(:,:) = 0._kind_phys + fluxswDOWN_clrsky(:,:) = 0._kind_phys if (nDay .gt. 0) then ! Subset the cloud and aerosol radiative properties over daylit points. ! Cloud optics [nDay,Model%levs,nBands] - call check_error_msg('rrtmgp_sw_clrallsky_driver_run',optical_props_clds_daylit%alloc_2str(nday, Model%levs, sw_gas_props)) - optical_props_clds_daylit%tau = optical_props_clds%tau(idxday,:,:) - optical_props_clds_daylit%ssa = optical_props_clds%ssa(idxday,:,:) - optical_props_clds_daylit%g = optical_props_clds%g(idxday,:,:) + call check_error_msg('rrtmgp_sw_clrallsky_driver_run',sw_optical_props_clouds_daylit%alloc_2str(nday, Model%levs, sw_gas_props)) + sw_optical_props_clouds_daylit%tau = sw_optical_props_clouds%tau(idxday,:,:) + sw_optical_props_clouds_daylit%ssa = sw_optical_props_clouds%ssa(idxday,:,:) + sw_optical_props_clouds_daylit%g = sw_optical_props_clouds%g(idxday,:,:) ! Aerosol optics [nDay,Model%levs,nBands] - call check_error_msg('rrtmgp_sw_clrallsky_driver_run',optical_props_aerosol_daylit%alloc_2str(nday, Model%levs, sw_gas_props%get_band_lims_wavenumber())) - optical_props_aerosol_daylit%tau = optical_props_aerosol%tau(idxday,:,:) - optical_props_aerosol_daylit%ssa = optical_props_aerosol%ssa(idxday,:,:) - optical_props_aerosol_daylit%g = optical_props_aerosol%g(idxday,:,:) + call check_error_msg('rrtmgp_sw_clrallsky_driver_run',sw_optical_props_aerosol_daylit%alloc_2str(nday, Model%levs, sw_gas_props%get_band_lims_wavenumber())) + sw_optical_props_aerosol_daylit%tau = sw_optical_props_aerosol%tau(idxday,:,:) + sw_optical_props_aerosol_daylit%ssa = sw_optical_props_aerosol%ssa(idxday,:,:) + sw_optical_props_aerosol_daylit%g = sw_optical_props_aerosol%g(idxday,:,:) ! Similarly, subset the gas concentrations. do iGas=1,Model%nGases @@ -158,14 +158,14 @@ subroutine rrtmgp_sw_clrallsky_driver_run(Model, Radtend, ncol, sw_gas_props, p_ Radtend%coszen(idxday), & ! IN - Cosine of solar zenith angle Radtend%sfc_alb_nir_dir(:,idxday), & ! IN - Shortwave surface albedo (direct) Radtend%sfc_alb_nir_dif(:,idxday), & ! IN - Shortwave surface albedo (diffuse) - optical_props_clds_daylit, & ! IN - DDT containing cloud optical information + sw_optical_props_clouds_daylit, & ! IN - DDT containing cloud optical information flux_allsky, & ! OUT - Fluxes, all-sky, 3D (nCol,Model%levs,nBand) flux_clrsky, & ! OUT - Fluxes, clear-sky, 3D (nCol,Model%levs,nBand) - aer_props = optical_props_aerosol_daylit)) ! IN(optional) - DDT containing aerosol optical information - fluxUP_allsky(idxday,:) = flux_allsky%flux_up - fluxDOWN_allsky(idxday,:) = flux_allsky%flux_dn - fluxUP_clrsky(idxday,:) = flux_clrsky%flux_up - fluxDOWN_clrsky(idxday,:) = flux_clrsky%flux_dn + aer_props = sw_optical_props_aerosol_daylit)) ! IN(optional) - DDT containing aerosol optical information + fluxswUP_allsky(idxday,:) = flux_allsky%flux_up + fluxswDOWN_allsky(idxday,:) = flux_allsky%flux_dn + fluxswUP_clrsky(idxday,:) = flux_clrsky%flux_up + fluxswDOWN_clrsky(idxday,:) = flux_clrsky%flux_dn endif end subroutine rrtmgp_sw_clrallsky_driver_run diff --git a/physics/rrtmgp_sw_clrallsky_driver.meta b/physics/rrtmgp_sw_clrallsky_driver.meta index 979ed8b55..fdc8d2e4e 100644 --- a/physics/rrtmgp_sw_clrallsky_driver.meta +++ b/physics/rrtmgp_sw_clrallsky_driver.meta @@ -60,7 +60,7 @@ type = ty_gas_optics_rrtmgp intent = in optional = F -[optical_props_clds] +[sw_optical_props_clouds] standard_name = shortwave_optical_properties_for_cloudy_atmosphere long_name = Fortran DDT containing RRTMGP optical properties units = DDT @@ -68,7 +68,7 @@ type = ty_optical_props_2str intent = in optional = F -[optical_props_aerosol] +[sw_optical_props_aerosol] standard_name = shortwave_optical_properties_for_aerosols long_name = Fortran DDT containing RRTMGP optical properties units = DDT @@ -109,8 +109,8 @@ intent = in optional = F [hsw0] - standard_name = sw_heating_rate_clear_sky - long_name = shortwave clear sky heating rate + standard_name = RRTMGP_sw_heating_rate_clear_sky + long_name = RRTMGP shortwave clear sky heating rate units = K s-1 dimensions = (horizontal_dimension,vertical_dimension) type = real @@ -118,10 +118,10 @@ intent = inout optional = T [hswb] - standard_name = sw_heating_rate_spectral - long_name = shortwave total sky heating rate (spectral) + standard_name = RRTMGP_sw_heating_rate_spectral + long_name = RRTMGP shortwave total sky heating rate (spectral) units = K s-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_shortwave_radiation) + dimensions = (horizontal_dimension,vertical_dimension,number_of_sw_spectral_points_rrtmgp) type = real kind = kind_phys intent = inout @@ -134,8 +134,8 @@ type = cmpfsw_type intent = inout optional = T -[fluxUP_allsky] - standard_name = sw_flux_profile_upward_allsky +[fluxswUP_allsky] + standard_name = RRTMGP_sw_flux_profile_upward_allsky long_name = RRTMGP upward shortwave all-sky flux profile units = W m-2 dimensions = (horizontal_dimension,vertical_dimension_plus_one) @@ -143,8 +143,8 @@ kind = kind_phys intent = out optional = F -[fluxDOWN_allsky] - standard_name = sw_flux_profile_downward_allsky +[fluxswDOWN_allsky] + standard_name = RRTMGP_sw_flux_profile_downward_allsky long_name = RRTMGP downward shortwave all-sky flux profile units = W m-2 dimensions = (horizontal_dimension,vertical_dimension_plus_one) @@ -152,8 +152,8 @@ kind = kind_phys intent = out optional = F -[fluxUP_clrsky] - standard_name = sw_flux_profile_upward_clrsky +[fluxswUP_clrsky] + standard_name = RRTMGP_sw_flux_profile_upward_clrsky long_name = RRTMGP upward shortwave clr-sky flux profile units = W m-2 dimensions = (horizontal_dimension,vertical_dimension_plus_one) @@ -161,8 +161,8 @@ kind = kind_phys intent = out optional = F -[fluxDOWN_clrsky] - standard_name = sw_flux_profile_downward_clrsky +[fluxswDOWN_clrsky] + standard_name = RRTMGP_sw_flux_profile_downward_clrsky long_name = RRTMGP downward shortwave clr-sky flux profile units = W m-2 dimensions = (horizontal_dimension,vertical_dimension_plus_one) diff --git a/physics/rrtmgp_sw_gas_optics.F90 b/physics/rrtmgp_sw_gas_optics.F90 index 37bf25c74..32e2888d2 100644 --- a/physics/rrtmgp_sw_gas_optics.F90 +++ b/physics/rrtmgp_sw_gas_optics.F90 @@ -413,7 +413,7 @@ end subroutine rrtmgp_sw_gas_optics_init !! \htmlinclude rrtmgp_sw_gas_optics.html !! subroutine rrtmgp_sw_gas_optics_run(Model, Radtend, sw_gas_props, ncol, p_lay, p_lev, t_lay, t_lev, & - gas_concentrations, lsswr, optical_props_clrsky, toa_src, errmsg, errflg) + gas_concentrations, lsswr, sw_optical_props_clrsky, errmsg, errflg) ! Inputs type(GFS_control_type), intent(in) :: & @@ -442,9 +442,7 @@ subroutine rrtmgp_sw_gas_optics_run(Model, Radtend, sw_gas_props, ncol, p_lay, p integer, intent(out) :: & errflg ! Error code type(ty_optical_props_2str),intent(out) :: & - optical_props_clrsky ! - real(kind_phys),dimension(ncol,sw_gas_props%get_ngpt()),intent(out) :: & - toa_src + sw_optical_props_clrsky ! ! Initialize CCPP error handling variables errmsg = '' @@ -453,17 +451,17 @@ subroutine rrtmgp_sw_gas_optics_run(Model, Radtend, sw_gas_props, ncol, p_lay, p if (.not. Model%lsswr) return ! Allocate space - call check_error_msg('rrtmgp_sw_gas_optics_run',optical_props_clrsky%alloc_2str(ncol, model%levs, sw_gas_props)) + call check_error_msg('rrtmgp_sw_gas_optics_run',sw_optical_props_clrsky%alloc_2str(ncol, model%levs, sw_gas_props)) ! Gas-optics (djs asks pincus: I think it makes sense to have a generic gas_optics interface in ! ty_gas_optics_rrtmgp, just as in ty_gas_optics. call check_error_msg('rrtmgp_sw_gas_optics_run',sw_gas_props%gas_optics_ext(& - p_lay, & ! - p_lev, & ! - t_lay, & ! - gas_concentrations, & ! - optical_props_clrsky, & ! - toa_src)) ! + p_lay, & ! + p_lev, & ! + t_lay, & ! + gas_concentrations, & ! + sw_optical_props_clrsky, & ! + Radtend%toa_src_sw)) ! ! Compute boundary-condition (only for low ceiling models, set in GFS_typedefs.F90) !call check_error_msg('rrtmgp_sw_gas_optics_run',compute_bc(& @@ -472,7 +470,7 @@ subroutine rrtmgp_sw_gas_optics_run(Model, Radtend, sw_gas_props, ncol, p_lay, p ! p_lev, & ! IN - ! t_lay, & ! IN - ! gas_concentrations, & ! IN - - ! toa_src, & ! OUT - + ! Radtend%toa_src_sw & ! OUT - ! mu0 = Radtend%coszen)) end subroutine rrtmgp_sw_gas_optics_run diff --git a/physics/rrtmgp_sw_gas_optics.meta b/physics/rrtmgp_sw_gas_optics.meta index f9f0b3ef3..daf7b3a74 100644 --- a/physics/rrtmgp_sw_gas_optics.meta +++ b/physics/rrtmgp_sw_gas_optics.meta @@ -180,7 +180,7 @@ type = integer intent = out optional = F -[optical_props_clrsky] +[sw_optical_props_clrsky] standard_name = shortwave_optical_properties_for_clear_sky long_name = Fortran DDT containing RRTMGP optical properties units = DDT @@ -188,12 +188,3 @@ type = ty_optical_props_2str intent = out optional = F -[toa_src] - standard_name = incident_solar_irradiance_at_top_of_atmosphere_by_spectral_point - long_name = top of atmosphere incident solar flux in each spectral point - units = - dimensions = (horizontal_dimension,number_of_sw_spectral_points_rrtmgp) - type = real - kind = kind_phys - intent = out - optional = F diff --git a/physics/rrtmgp_sw_rte.F90 b/physics/rrtmgp_sw_rte.F90 index d31b9a785..f7d8f8fc9 100644 --- a/physics/rrtmgp_sw_rte.F90 +++ b/physics/rrtmgp_sw_rte.F90 @@ -29,10 +29,10 @@ end subroutine rrtmgp_sw_rte_init !! \section arg_table_rrtmgp_sw_rte_run !! \htmlinclude rrtmgp_sw_rte.html !! - subroutine rrtmgp_sw_rte_run(Model, Radtend, Statein, ncol, sw_gas_props, p_lay, t_lay, p_lev, gas_concentrations, & - optical_props_clrsky, optical_props_cloud, optical_props_aerosol, & - lsswr, nday, idxday, toa_src, hsw0, hswb, scmpsw, & - fluxUP_allsky, fluxDOWN_allsky, fluxUP_clrsky, fluxDOWN_clrsky, errmsg, errflg) + subroutine rrtmgp_sw_rte_run(Model, Radtend, Statein, ncol, sw_gas_props, p_lay, t_lay, & + p_lev, gas_concentrations, sw_optical_props_clrsky, sw_optical_props_clouds, & + sw_optical_props_aerosol, lsswr, nday, idxday, hsw0, hswb, scmpsw, & + fluxswUP_allsky, fluxswDOWN_allsky, fluxswUP_clrsky, fluxswDOWN_clrsky, errmsg, errflg) ! Inputs type(GFS_control_type), intent(in) :: & @@ -54,25 +54,23 @@ subroutine rrtmgp_sw_rte_run(Model, Radtend, Statein, ncol, sw_gas_props, p_lay, type(ty_gas_optics_rrtmgp),intent(in) :: & sw_gas_props ! DDT containing SW spectral information type(ty_optical_props_2str),intent(in) :: & - optical_props_clrsky, & ! RRTMGP DDT: longwave clear-sky radiative properties - optical_props_cloud, & ! RRTMGP DDT: longwave cloud radiative properties - optical_props_aerosol ! RRTMGP DDT: longwave aerosol radiative properties + sw_optical_props_clrsky, & ! RRTMGP DDT: longwave clear-sky radiative properties + sw_optical_props_clouds, & ! RRTMGP DDT: longwave cloud radiative properties + sw_optical_props_aerosol ! RRTMGP DDT: longwave aerosol radiative properties type(ty_gas_concs),intent(in) :: & gas_concentrations ! RRTMGP DDT: trace gas concentrations (vmr) logical, intent(in) :: & lsswr ! Flag to calculate SW irradiances - real(kind_phys),dimension(ncol,sw_gas_props%get_ngpt()),intent(in) :: & - toa_src ! Outputs character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg real(kind_phys), dimension(ncol,Model%levs+1), intent(out) :: & - fluxUP_allsky, & ! All-sky flux (W/m2) - fluxDOWN_allsky, & ! All-sky flux (W/m2) - fluxUP_clrsky, & ! Clear-sky flux (W/m2) - fluxDOWN_clrsky ! All-sky flux (W/m2) + fluxswUP_allsky, & ! All-sky flux (W/m2) + fluxswDOWN_allsky, & ! All-sky flux (W/m2) + fluxswUP_clrsky, & ! Clear-sky flux (W/m2) + fluxswDOWN_clrsky ! All-sky flux (W/m2) ! Inputs (optional) (NOTE. We only need the optional arguments to know what fluxes to output, HR's are computed later) real(kind_phys), dimension(ncol,Model%levs), optional, intent(inout) :: & @@ -101,9 +99,9 @@ subroutine rrtmgp_sw_rte_run(Model, Radtend, Statein, ncol, sw_gas_props, p_lay, logical :: l_ClrSky_HR=.false., l_AllSky_HR_byband=.false., l_scmpsw=.false., top_at_1 integer :: iGas,iSFC,iTOA type(ty_optical_props_2str) :: & - optical_props_cloud_daylit, & ! RRTMGP DDT: longwave cloud radiative properties - optical_props_clrsky_daylit, & ! RRTMGP DDT: longwave clear-sky radiative properties - optical_props_aerosol_daylit ! RRTMGP DDT: longwave aerosol radiative properties + sw_optical_props_clouds_daylit, & ! RRTMGP DDT: longwave cloud radiative properties + sw_optical_props_clrsky_daylit, & ! RRTMGP DDT: longwave clear-sky radiative properties + sw_optical_props_aerosol_daylit ! RRTMGP DDT: longwave aerosol radiative properties type(ty_gas_concs) :: & gas_concentrations_daylit ! RRTMGP DDT: trace gas concentrations (vmr) @@ -130,29 +128,29 @@ subroutine rrtmgp_sw_rte_run(Model, Radtend, Statein, ncol, sw_gas_props, p_lay, if ( l_scmpsw ) then scmpsw = cmpfsw_type (0., 0., 0., 0., 0., 0.) endif - fluxUP_allsky(:,:) = 0._kind_phys - fluxDOWN_allsky(:,:) = 0._kind_phys - fluxUP_clrsky(:,:) = 0._kind_phys - fluxDOWN_clrsky(:,:) = 0._kind_phys + fluxswUP_allsky(:,:) = 0._kind_phys + fluxswDOWN_allsky(:,:) = 0._kind_phys + fluxswUP_clrsky(:,:) = 0._kind_phys + fluxswDOWN_clrsky(:,:) = 0._kind_phys if (nDay .gt. 0) then ! Subset the cloud and aerosol radiative properties over daylit points. ! Cloud optics [nDay,Model%levs,nGpts] - call check_error_msg('rrtmgp_sw_rte_run',optical_props_cloud_daylit%alloc_2str(nday, Model%levs, sw_gas_props)) - optical_props_cloud_daylit%tau = optical_props_cloud%tau(idxday,:,:) - optical_props_cloud_daylit%ssa = optical_props_cloud%ssa(idxday,:,:) - optical_props_cloud_daylit%g = optical_props_cloud%g(idxday,:,:) + call check_error_msg('rrtmgp_sw_rte_run',sw_optical_props_clouds_daylit%alloc_2str(nday, Model%levs, sw_gas_props)) + sw_optical_props_clouds_daylit%tau = sw_optical_props_clouds%tau(idxday,:,:) + sw_optical_props_clouds_daylit%ssa = sw_optical_props_clouds%ssa(idxday,:,:) + sw_optical_props_clouds_daylit%g = sw_optical_props_clouds%g(idxday,:,:) ! Aerosol optics [nDay,Model%levs,nBands] - call check_error_msg('rrtmgp_sw_rte_run',optical_props_aerosol_daylit%alloc_2str(nday, Model%levs, sw_gas_props%get_band_lims_wavenumber())) - optical_props_aerosol_daylit%tau = optical_props_aerosol%tau(idxday,:,:) - optical_props_aerosol_daylit%ssa = optical_props_aerosol%ssa(idxday,:,:) - optical_props_aerosol_daylit%g = optical_props_aerosol%g(idxday,:,:) + call check_error_msg('rrtmgp_sw_rte_run',sw_optical_props_aerosol_daylit%alloc_2str(nday, Model%levs, sw_gas_props%get_band_lims_wavenumber())) + sw_optical_props_aerosol_daylit%tau = sw_optical_props_aerosol%tau(idxday,:,:) + sw_optical_props_aerosol_daylit%ssa = sw_optical_props_aerosol%ssa(idxday,:,:) + sw_optical_props_aerosol_daylit%g = sw_optical_props_aerosol%g(idxday,:,:) ! Clear-sky optics [nDay,Model%levs,nGpts] - call check_error_msg('rrtmgp_sw_rte_run',optical_props_clrsky_daylit%alloc_2str(nday, Model%levs, sw_gas_props)) - optical_props_clrsky_daylit%tau = optical_props_clrsky%tau(idxday,:,:) - optical_props_clrsky_daylit%ssa = optical_props_clrsky%ssa(idxday,:,:) - optical_props_clrsky_daylit%g = optical_props_clrsky%g(idxday,:,:) + call check_error_msg('rrtmgp_sw_rte_run',sw_optical_props_clrsky_daylit%alloc_2str(nday, Model%levs, sw_gas_props)) + sw_optical_props_clrsky_daylit%tau = sw_optical_props_clrsky%tau(idxday,:,:) + sw_optical_props_clrsky_daylit%ssa = sw_optical_props_clrsky%ssa(idxday,:,:) + sw_optical_props_clrsky_daylit%g = sw_optical_props_clrsky%g(idxday,:,:) ! Similarly, subset the gas concentrations. do iGas=1,Model%nGases @@ -174,34 +172,34 @@ subroutine rrtmgp_sw_rte_run(Model, Radtend, Statein, ncol, sw_gas_props, p_lay, ! Compute clear-sky fluxes (if requested) ! Clear-sky fluxes are gas+aerosol - call check_error_msg('rrtmgp_sw_rte_run',optical_props_aerosol_daylit%increment(optical_props_clrsky_daylit)) + call check_error_msg('rrtmgp_sw_rte_run',sw_optical_props_aerosol_daylit%increment(sw_optical_props_clrsky_daylit)) if (l_ClrSky_HR) then call check_error_msg('rrtmgp_sw_rte_run',rte_sw( & - optical_props_clrsky_daylit, & ! IN - optical-properties + sw_optical_props_clrsky_daylit, & ! IN - optical-properties top_at_1, & ! IN - veritcal ordering flag Radtend%coszen(idxday), & ! IN - Cosine of solar zenith angle - toa_src(idxday,:), & ! IN - incident solar flux at TOA + Radtend%toa_src_sw(idxday,:), & ! IN - incident solar flux at TOA Radtend%sfc_alb_nir_dir(:,idxday), & ! IN - Shortwave surface albedo (direct) Radtend%sfc_alb_nir_dif(:,idxday), & ! IN - Shortwave surface albedo (diffuse) flux_clrsky)) ! OUT - Fluxes, clear-sky, 3D (nCol,Model%levs,nBand) ! Store fluxes - fluxUP_clrsky(idxday,:) = flux_clrsky%flux_up - fluxDOWN_clrsky(idxday,:) = flux_clrsky%flux_dn + fluxswUP_clrsky(idxday,:) = flux_clrsky%flux_up + fluxswDOWN_clrsky(idxday,:) = flux_clrsky%flux_dn endif ! Compute all-sky fluxes - call check_error_msg('rrtmgp_sw_rte_run',optical_props_cloud_daylit%increment(optical_props_clrsky_daylit)) + call check_error_msg('rrtmgp_sw_rte_run',sw_optical_props_clouds_daylit%increment(sw_optical_props_clrsky_daylit)) call check_error_msg('rrtmgp_sw_rte_run',rte_sw( & - optical_props_clrsky_daylit, & ! IN - optical-properties + sw_optical_props_clrsky_daylit, & ! IN - optical-properties top_at_1, & ! IN - veritcal ordering flag Radtend%coszen(idxday), & ! IN - Cosine of solar zenith angle - toa_src(idxday,:), & ! IN - incident solar flux at TOA + Radtend%toa_src_sw(idxday,:), & ! IN - incident solar flux at TOA Radtend%sfc_alb_nir_dir(:,idxday), & ! IN - Shortwave surface albedo (direct) Radtend%sfc_alb_nir_dif(:,idxday), & ! IN - Shortwave surface albedo (diffuse) flux_allsky)) ! OUT - Fluxes, clear-sky, 3D (nCol,Model%levs,nBand) ! Store fluxes - fluxUP_allsky(idxday,:) = flux_allsky%flux_up - fluxDOWN_allsky(idxday,:) = flux_allsky%flux_dn + fluxswUP_allsky(idxday,:) = flux_allsky%flux_up + fluxswDOWN_allsky(idxday,:) = flux_allsky%flux_dn scmpsw(idxday)%nirbm = flux_allsky%flux_dn_dir(:,iSFC) endif end subroutine rrtmgp_sw_rte_run diff --git a/physics/rrtmgp_sw_rte.meta b/physics/rrtmgp_sw_rte.meta index 37e1551ea..250e4c463 100644 --- a/physics/rrtmgp_sw_rte.meta +++ b/physics/rrtmgp_sw_rte.meta @@ -68,7 +68,7 @@ type = ty_gas_optics_rrtmgp intent = in optional = F -[optical_props_clrsky] +[sw_optical_props_clrsky] standard_name = shortwave_optical_properties_for_clear_sky long_name = Fortran DDT containing RRTMGP optical properties units = DDT @@ -76,7 +76,7 @@ type = ty_optical_props_2str intent = in optional = F -[optical_props_cloud] +[sw_optical_props_clouds] standard_name = shortwave_optical_properties_for_cloudy_atmosphere long_name = Fortran DDT containing RRTMGP optical properties units = DDT @@ -84,7 +84,7 @@ type = ty_optical_props_2str intent = in optional = F -[optical_props_aerosol] +[sw_optical_props_aerosol] standard_name = shortwave_optical_properties_for_aerosols long_name = Fortran DDT containing RRTMGP optical properties units = DDT @@ -124,17 +124,8 @@ type = integer intent = in optional = F -[toa_src] - standard_name = incident_solar_irradiance_at_top_of_atmosphere_by_spectral_point - long_name = top of atmosphere incident solar flux in each spectral point - units = - dimensions = (horizontal_dimension,number_of_sw_spectral_points_rrtmgp) - type = real - kind = kind_phys - intent = in - optional = F [hsw0] - standard_name = sw_heating_rate_clear_sky + standard_name = RRTMGP_sw_heating_rate_clear_sky long_name = shortwave clear sky heating rate units = K s-1 dimensions = (horizontal_dimension,vertical_dimension) @@ -143,10 +134,10 @@ intent = inout optional = T [hswb] - standard_name = sw_heating_rate_spectral + standard_name = RRTMGP_sw_heating_rate_spectral long_name = shortwave total sky heating rate (spectral) units = K s-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_shortwave_radiation) + dimensions = (horizontal_dimension,vertical_dimension,number_of_sw_spectral_points_rrtmgp) type = real kind = kind_phys intent = inout @@ -159,8 +150,8 @@ type = cmpfsw_type intent = inout optional = T -[fluxUP_allsky] - standard_name = sw_flux_profile_upward_allsky +[fluxswUP_allsky] + standard_name = RRTMGP_sw_flux_profile_upward_allsky long_name = RRTMGP upward shortwave all-sky flux profile units = W m-2 dimensions = (horizontal_dimension,vertical_dimension_plus_one) @@ -168,8 +159,8 @@ kind = kind_phys intent = out optional = F -[fluxDOWN_allsky] - standard_name = sw_flux_profile_downward_allsky +[fluxswDOWN_allsky] + standard_name = RRTMGP_sw_flux_profile_downward_allsky long_name = RRTMGP downward shortwave all-sky flux profile units = W m-2 dimensions = (horizontal_dimension,vertical_dimension_plus_one) @@ -177,8 +168,8 @@ kind = kind_phys intent = out optional = F -[fluxUP_clrsky] - standard_name = sw_flux_profile_upward_clrsky +[fluxswUP_clrsky] + standard_name = RRTMGP_sw_flux_profile_upward_clrsky long_name = RRTMGP upward shortwave clr-sky flux profile units = W m-2 dimensions = (horizontal_dimension,vertical_dimension_plus_one) @@ -186,8 +177,8 @@ kind = kind_phys intent = out optional = F -[fluxDOWN_clrsky] - standard_name = sw_flux_profile_downward_clrsky +[fluxswDOWN_clrsky] + standard_name = RRTMGP_sw_flux_profile_downward_clrsky long_name = RRTMGP downward shortwave clr-sky flux profile units = W m-2 dimensions = (horizontal_dimension,vertical_dimension_plus_one) From 5cb9f93ff5a9de81fb0a0e937fdc0f10de6bb1ac Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Tue, 24 Sep 2019 17:59:06 -0600 Subject: [PATCH 051/167] change RRTMGP scheme metadata to use instances of DDTs rather than the type definition --- physics/GFS_rrtmgp_gas_optics.meta | 8 +++---- physics/GFS_rrtmgp_lw_post.meta | 16 +++++++------- physics/GFS_rrtmgp_post.meta | 24 ++++++++++----------- physics/GFS_rrtmgp_pre.meta | 28 ++++++++++++------------- physics/GFS_rrtmgp_sw_post.meta | 20 +++++++++--------- physics/rrtmgp_lw_cloud_optics.meta | 8 +++---- physics/rrtmgp_lw_clrallsky_driver.meta | 8 +++---- physics/rrtmgp_lw_gas_optics.meta | 16 +++++++------- physics/rrtmgp_lw_rte.meta | 12 +++++------ physics/rrtmgp_sw_cloud_optics.meta | 8 +++---- physics/rrtmgp_sw_clrallsky_driver.meta | 8 +++---- physics/rrtmgp_sw_gas_optics.meta | 16 +++++++------- physics/rrtmgp_sw_rte.meta | 12 +++++------ 13 files changed, 92 insertions(+), 92 deletions(-) diff --git a/physics/GFS_rrtmgp_gas_optics.meta b/physics/GFS_rrtmgp_gas_optics.meta index 0955e0ee8..3179ce484 100644 --- a/physics/GFS_rrtmgp_gas_optics.meta +++ b/physics/GFS_rrtmgp_gas_optics.meta @@ -2,16 +2,16 @@ name = GFS_rrtmgp_gas_optics_init type = scheme [Model] - standard_name = GFS_control_type - long_name = Fortran DDT containing FV3-GFS model control parameters + standard_name = GFS_control_type_instance + long_name = instance of derived type GFS_control_type units = DDT dimensions = () type = GFS_control_type intent = in optional = F [Radtend] - standard_name = GFS_radtend_type - long_name = Fortran DDT containing FV3-GFS radiation tendencies + standard_name = GFS_radtend_type_instance + long_name = instance of derived type GFS_radtend_type units = DDT dimensions = () type = GFS_radtend_type diff --git a/physics/GFS_rrtmgp_lw_post.meta b/physics/GFS_rrtmgp_lw_post.meta index d9863b41a..dcd5ea158 100644 --- a/physics/GFS_rrtmgp_lw_post.meta +++ b/physics/GFS_rrtmgp_lw_post.meta @@ -2,32 +2,32 @@ name = GFS_rrtmgp_lw_post_run type = scheme [Model] - standard_name = GFS_control_type - long_name = Fortran DDT containing FV3-GFS model control parameters + standard_name = GFS_control_type_instance + long_name = instance of derived type GFS_control_type units = DDT dimensions = () type = GFS_control_type intent = in optional = F [Grid] - standard_name = GFS_grid_type - long_name = Fortran DDT containing FV3-GFS grid and interpolation related data + standard_name = GFS_grid_type_instance + long_name = instance of derived type GFS_grid_type units = DDT dimensions = () type = GFS_grid_type intent = in optional = F [Radtend] - standard_name = GFS_radtend_type - long_name = Fortran DDT containing FV3-GFS radiation tendencies + standard_name = GFS_radtend_type_instance + long_name = instance of derived type GFS_radtend_type units = DDT dimensions = () type = GFS_radtend_type intent = inout optional = F [Coupling] - standard_name = GFS_coupling_type - long_name = Fortran DDT containing FV3-GFS fields to/from coupling with other components + standard_name = GFS_coupling_type_instance + long_name = instance of derived type GFS_coupling_type units = DDT dimensions = () type = GFS_coupling_type diff --git a/physics/GFS_rrtmgp_post.meta b/physics/GFS_rrtmgp_post.meta index 8d4033202..067fe7e7f 100644 --- a/physics/GFS_rrtmgp_post.meta +++ b/physics/GFS_rrtmgp_post.meta @@ -7,48 +7,48 @@ name = GFS_rrtmgp_post_run type = scheme [Model] - standard_name = GFS_control_type - long_name = Fortran DDT containing FV3-GFS model control parameters + standard_name = GFS_control_type_instance + long_name = instance of derived type GFS_control_type units = DDT dimensions = () type = GFS_control_type intent = in optional = F [Grid] - standard_name = GFS_grid_type - long_name = Fortran DDT containing FV3-GFS grid and interpolation related data + standard_name = GFS_grid_type_instance + long_name = instance of derived type GFS_grid_type units = DDT dimensions = () type = GFS_grid_type intent = in optional = F [Diag] - standard_name = GFS_diag_type - long_name = Fortran DDT containing FV3-GFS diagnotics data + standard_name = GFS_diag_type_instance + long_name = instance of derived type GFS_diag_type units = DDT dimensions = () type = GFS_diag_type intent = inout optional = F [Radtend] - standard_name = GFS_radtend_type - long_name = Fortran DDT containing FV3-GFS radiation tendencies + standard_name = GFS_radtend_type_instance + long_name = instance of derived type GFS_radtend_type units = DDT dimensions = () type = GFS_radtend_type intent = inout optional = F [Statein] - standard_name = GFS_statein_type - long_name = Fortran DDT containing FV3-GFS prognostic state data in from dycore + standard_name = GFS_statein_type_instance + long_name = instance of derived type GFS_statein_type units = DDT dimensions = () type = GFS_statein_type intent = in optional = F [Coupling] - standard_name = GFS_coupling_type - long_name = Fortran DDT containing FV3-GFS fields to/from coupling with other components + standard_name = GFS_coupling_type_instance + long_name = instance of derived type GFS_coupling_type units = DDT dimensions = () type = GFS_coupling_type diff --git a/physics/GFS_rrtmgp_pre.meta b/physics/GFS_rrtmgp_pre.meta index d5122d73b..74362b448 100644 --- a/physics/GFS_rrtmgp_pre.meta +++ b/physics/GFS_rrtmgp_pre.meta @@ -2,56 +2,56 @@ name = GFS_rrtmgp_pre_run type = scheme [Model] - standard_name = GFS_control_type - long_name = Fortran DDT containing FV3-GFS model control parameters + standard_name = GFS_control_type_instance + long_name = instance of derived type GFS_control_type units = DDT dimensions = () type = GFS_control_type intent = in optional = F [Grid] - standard_name = GFS_grid_type - long_name = Fortran DDT containing FV3-GFS grid and interpolation related data + standard_name = GFS_grid_type_instance + long_name = instance of derived type GFS_grid_type units = DDT dimensions = () type = GFS_grid_type intent = in optional = F [Sfcprop] - standard_name = GFS_sfcprop_type - long_name = Fortran DDT containing FV3-GFS surface fields + standard_name = GFS_sfcprop_type_instance + long_name = instance of derived type GFS_sfcprop_type units = DDT dimensions = () type = GFS_sfcprop_type intent = in optional = F [Statein] - standard_name = GFS_statein_type - long_name = Fortran DDT containing FV3-GFS prognostic state data in from dycore + standard_name = GFS_statein_type_instance + long_name = instance of derived type GFS_statein_type units = DDT dimensions = () type = GFS_statein_type intent = in optional = F [Tbd] - standard_name = GFS_tbd_type - long_name = Fortran DDT containing FV3-GFS data not yet assigned to a defined container + standard_name = GFS_tbd_type_instance + long_name = instance of derived type GFS_tbd_type units = DDT dimensions = () type = GFS_tbd_type intent = in optional = F [Coupling] - standard_name = GFS_coupling_type - long_name = Fortran DDT containing FV3-GFS fields needed for coupling + standard_name = GFS_coupling_type_instance + long_name = instance of derived type GFS_coupling_type units = DDT dimensions = () type = GFS_coupling_type intent = in optional = F [Radtend] - standard_name = GFS_radtend_type - long_name = Fortran DDT containing FV3-GFS radiation tendencies + standard_name = GFS_radtend_type_instance + long_name = instance of derived type GFS_radtend_type units = DDT dimensions = () type = GFS_radtend_type diff --git a/physics/GFS_rrtmgp_sw_post.meta b/physics/GFS_rrtmgp_sw_post.meta index 0b2baa03c..894af17f7 100644 --- a/physics/GFS_rrtmgp_sw_post.meta +++ b/physics/GFS_rrtmgp_sw_post.meta @@ -2,40 +2,40 @@ name = GFS_rrtmgp_sw_post_run type = scheme [Model] - standard_name = GFS_control_type - long_name = Fortran DDT containing FV3-GFS model control parameters + standard_name = GFS_control_type_instance + long_name = instance of derived type GFS_control_type units = DDT dimensions = () type = GFS_control_type intent = in optional = F [Grid] - standard_name = GFS_grid_type - long_name = Fortran DDT containing FV3-GFS grid and interpolation related data + standard_name = GFS_grid_type_instance + long_name = instance of derived type GFS_grid_type units = DDT dimensions = () type = GFS_grid_type intent = in optional = F [Diag] - standard_name = GFS_diag_type - long_name = Fortran DDT containing FV3-GFS diagnotics data + standard_name = GFS_diag_type_instance + long_name = instance of derived type GFS_diag_type units = DDT dimensions = () type = GFS_diag_type intent = inout optional = F [Radtend] - standard_name = GFS_radtend_type - long_name = Fortran DDT containing FV3-GFS radiation tendencies + standard_name = GFS_radtend_type_instance + long_name = instance of derived type GFS_radtend_type units = DDT dimensions = () type = GFS_radtend_type intent = inout optional = F [Coupling] - standard_name = GFS_coupling_type - long_name = Fortran DDT containing FV3-GFS fields to/from coupling with other components + standard_name = GFS_coupling_type_instance + long_name = instance of derived type GFS_coupling_type units = DDT dimensions = () type = GFS_coupling_type diff --git a/physics/rrtmgp_lw_cloud_optics.meta b/physics/rrtmgp_lw_cloud_optics.meta index 7703610f4..5a1fe99d5 100644 --- a/physics/rrtmgp_lw_cloud_optics.meta +++ b/physics/rrtmgp_lw_cloud_optics.meta @@ -2,8 +2,8 @@ name = rrtmgp_lw_cloud_optics_init type = scheme [Model] - standard_name = GFS_control_type - long_name = Fortran DDT containing FV3-GFS model control parameters + standard_name = GFS_control_type_instance + long_name = instance of derived type GFS_control_type units = DDT dimensions = () type = GFS_control_type @@ -64,8 +64,8 @@ name = rrtmgp_lw_cloud_optics_run type = scheme [Model] - standard_name = GFS_control_type - long_name = Fortran DDT containing FV3-GFS model control parameters + standard_name = GFS_control_type_instance + long_name = instance of derived type GFS_control_type units = DDT dimensions = () type = GFS_control_type diff --git a/physics/rrtmgp_lw_clrallsky_driver.meta b/physics/rrtmgp_lw_clrallsky_driver.meta index 00609ce31..c72d2b11f 100644 --- a/physics/rrtmgp_lw_clrallsky_driver.meta +++ b/physics/rrtmgp_lw_clrallsky_driver.meta @@ -2,16 +2,16 @@ name = rrtmgp_lw_clrallsky_driver_run type = scheme [Model] - standard_name = GFS_control_type - long_name = Fortran DDT containing FV3-GFS model control parameters + standard_name = GFS_control_type_instance + long_name = instance of derived type GFS_control_type units = DDT dimensions = () type = GFS_control_type intent = in optional = F [Radtend] - standard_name = GFS_radtend_type - long_name = Fortran DDT containing FV3-GFS radiation tendencies + standard_name = GFS_radtend_type_instance + long_name = instance of derived type GFS_radtend_type units = DDT dimensions = () type = GFS_radtend_type diff --git a/physics/rrtmgp_lw_gas_optics.meta b/physics/rrtmgp_lw_gas_optics.meta index 087f44367..027fa7e58 100644 --- a/physics/rrtmgp_lw_gas_optics.meta +++ b/physics/rrtmgp_lw_gas_optics.meta @@ -2,16 +2,16 @@ name = rrtmgp_lw_gas_optics_init type = scheme [Model] - standard_name = GFS_control_type - long_name = Fortran DDT containing FV3-GFS model control parameters + standard_name = GFS_control_type_instance + long_name = instance of derived type GFS_control_type units = DDT dimensions = () type = GFS_control_type intent = in optional = F [Radtend] - standard_name = GFS_radtend_type - long_name = Fortran DDT containing FV3-GFS radiation tendencies + standard_name = GFS_radtend_type_instance + long_name = instance of derived type GFS_radtend_type units = DDT dimensions = () type = GFS_radtend_type @@ -80,16 +80,16 @@ name = rrtmgp_lw_gas_optics_run type = scheme [Model] - standard_name = GFS_control_type - long_name = Fortran DDT containing FV3-GFS model control parameters + standard_name = GFS_control_type_instance + long_name = instance of derived type GFS_control_type units = DDT dimensions = () type = GFS_control_type intent = in optional = F [Radtend] - standard_name = GFS_radtend_type - long_name = Fortran DDT containing FV3-GFS radiation tendencies + standard_name = GFS_radtend_type_instance + long_name = instance of derived type GFS_radtend_type units = DDT dimensions = () type = GFS_radtend_type diff --git a/physics/rrtmgp_lw_rte.meta b/physics/rrtmgp_lw_rte.meta index 8e5d653ee..25beee51d 100644 --- a/physics/rrtmgp_lw_rte.meta +++ b/physics/rrtmgp_lw_rte.meta @@ -2,24 +2,24 @@ name = rrtmgp_lw_rte_run type = scheme [Model] - standard_name = GFS_control_type - long_name = Fortran DDT containing FV3-GFS model control parameters + standard_name = GFS_control_type_instance + long_name = instance of derived type GFS_control_type units = DDT dimensions = () type = GFS_control_type intent = in optional = F [Radtend] - standard_name = GFS_radtend_type - long_name = Fortran DDT containing FV3-GFS radiation tendencies + standard_name = GFS_radtend_type_instance + long_name = instance of derived type GFS_radtend_type units = DDT dimensions = () type = GFS_radtend_type intent = in optional = F [Statein] - standard_name = GFS_statein_type - long_name = Fortran DDT containing FV3-GFS prognostic state data in from dycore + standard_name = GFS_statein_type_instance + long_name = instance of derived type GFS_statein_type units = DDT dimensions = () type = GFS_statein_type diff --git a/physics/rrtmgp_sw_cloud_optics.meta b/physics/rrtmgp_sw_cloud_optics.meta index 1bbd21d53..2b0d54a47 100644 --- a/physics/rrtmgp_sw_cloud_optics.meta +++ b/physics/rrtmgp_sw_cloud_optics.meta @@ -2,8 +2,8 @@ name = rrtmgp_sw_cloud_optics_init type = scheme [Model] - standard_name = GFS_control_type - long_name = Fortran DDT containing FV3-GFS model control parameters + standard_name = GFS_control_type_instance + long_name = instance of derived type GFS_control_type units = DDT dimensions = () type = GFS_control_type @@ -64,8 +64,8 @@ name = rrtmgp_sw_cloud_optics_run type = scheme [Model] - standard_name = GFS_control_type - long_name = Fortran DDT containing FV3-GFS model control parameters + standard_name = GFS_control_type_instance + long_name = instance of derived type GFS_control_type units = DDT dimensions = () type = GFS_control_type diff --git a/physics/rrtmgp_sw_clrallsky_driver.meta b/physics/rrtmgp_sw_clrallsky_driver.meta index fdc8d2e4e..888179efd 100644 --- a/physics/rrtmgp_sw_clrallsky_driver.meta +++ b/physics/rrtmgp_sw_clrallsky_driver.meta @@ -2,16 +2,16 @@ name = rrtmgp_sw_clrallsky_driver_run type = scheme [Model] - standard_name = GFS_control_type - long_name = Fortran DDT containing FV3-GFS model control parameters + standard_name = GFS_control_type_instance + long_name = instance of derived type GFS_control_type units = DDT dimensions = () type = GFS_control_type intent = in optional = F [Radtend] - standard_name = GFS_radtend_type - long_name = Fortran DDT containing FV3-GFS radiation tendencies + standard_name = GFS_radtend_type_instance + long_name = instance of derived type GFS_radtend_type units = DDT dimensions = () type = GFS_radtend_type diff --git a/physics/rrtmgp_sw_gas_optics.meta b/physics/rrtmgp_sw_gas_optics.meta index daf7b3a74..b18f1490b 100644 --- a/physics/rrtmgp_sw_gas_optics.meta +++ b/physics/rrtmgp_sw_gas_optics.meta @@ -2,16 +2,16 @@ name = rrtmgp_sw_gas_optics_init type = scheme [Model] - standard_name = GFS_control_type - long_name = Fortran DDT containing FV3-GFS model control parameters + standard_name = GFS_control_type_instance + long_name = instance of derived type GFS_control_type units = DDT dimensions = () type = GFS_control_type intent = in optional = F [Radtend] - standard_name = GFS_radtend_type - long_name = Fortran DDT containing FV3-GFS radiation tendencies + standard_name = GFS_radtend_type_instance + long_name = instance of derived type GFS_radtend_type units = DDT dimensions = () type = GFS_radtend_type @@ -80,16 +80,16 @@ name = rrtmgp_sw_gas_optics_run type = scheme [Model] - standard_name = GFS_control_type - long_name = Fortran DDT containing FV3-GFS model control parameters + standard_name = GFS_control_type_instance + long_name = instance of derived type GFS_control_type units = DDT dimensions = () type = GFS_control_type intent = in optional = F [Radtend] - standard_name = GFS_radtend_type - long_name = Fortran DDT containing FV3-GFS radiation tendencies + standard_name = GFS_radtend_type_instance + long_name = instance of derived type GFS_radtend_type units = DDT dimensions = () type = GFS_radtend_type diff --git a/physics/rrtmgp_sw_rte.meta b/physics/rrtmgp_sw_rte.meta index 250e4c463..1e320ce0a 100644 --- a/physics/rrtmgp_sw_rte.meta +++ b/physics/rrtmgp_sw_rte.meta @@ -2,24 +2,24 @@ name = rrtmgp_sw_rte_run type = scheme [Model] - standard_name = GFS_control_type - long_name = Fortran DDT containing FV3-GFS model control parameters + standard_name = GFS_control_type_instance + long_name = instance of derived type GFS_control_type units = DDT dimensions = () type = GFS_control_type intent = in optional = F [Radtend] - standard_name = GFS_radtend_type - long_name = Fortran DDT containing FV3-GFS radiation tendencies + standard_name = GFS_radtend_type_instance + long_name = instance of derived type GFS_radtend_type units = DDT dimensions = () type = GFS_radtend_type intent = in optional = F [Statein] - standard_name = GFS_statein_type - long_name = Fortran DDT containing FV3-GFS prognostic state data in from dycore + standard_name = GFS_statein_type_instance + long_name = instance of derived type GFS_statein_type units = DDT dimensions = () type = GFS_statein_type From 34d5fe1584e8f2fd0f013fb4799e58441473c7e4 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Thu, 26 Sep 2019 14:22:39 -0600 Subject: [PATCH 052/167] Working --- physics/GFS_rrtmgp_gas_optics.F90 | 1 - physics/GFS_rrtmgp_post.meta | 8 +- physics/GFS_rrtmgp_pre.F90 | 1 + physics/GFS_rrtmgp_pre.meta | 40 +++--- physics/GFS_rrtmgp_setup.F90 | 182 +++++++------------------ physics/GFS_rrtmgp_setup.meta | 35 ----- physics/rrtmgp_lw_cloud_optics.meta | 40 +++--- physics/rrtmgp_lw_clrallsky_driver.F90 | 2 +- physics/rrtmgp_sw_cloud_optics.F90 | 2 +- physics/rrtmgp_sw_cloud_optics.meta | 40 +++--- physics/rrtmgp_sw_clrallsky_driver.F90 | 2 +- 11 files changed, 118 insertions(+), 235 deletions(-) diff --git a/physics/GFS_rrtmgp_gas_optics.F90 b/physics/GFS_rrtmgp_gas_optics.F90 index 42a1cf2b6..73a23078d 100644 --- a/physics/GFS_rrtmgp_gas_optics.F90 +++ b/physics/GFS_rrtmgp_gas_optics.F90 @@ -35,7 +35,6 @@ subroutine GFS_rrtmgp_gas_optics_init(Model, Radtend, errmsg, errflg) errmsg = '' errflg = 0 - ! Which gases are active? Provided via physics namelist. if (len(Model%active_gases) .gt. 0) then diff --git a/physics/GFS_rrtmgp_post.meta b/physics/GFS_rrtmgp_post.meta index 067fe7e7f..76411512d 100644 --- a/physics/GFS_rrtmgp_post.meta +++ b/physics/GFS_rrtmgp_post.meta @@ -114,10 +114,10 @@ intent = in optional = F [cld_frac] - standard_name = RRTMGP_total_cloud_fraction + standard_name = total_cloud_fraction long_name = layer total cloud fraction units = frac - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys intent = in @@ -126,7 +126,7 @@ standard_name = RRTMGP_cloud_optical_depth_layers_at_10mu_band long_name = approx 10mu band layer cloud optical depth units = none - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys intent = in @@ -135,7 +135,7 @@ standard_name = RRTMGP_cloud_optical_depth_layers_at_0_55mu_band long_name = approx .55mu band layer cloud optical depth units = none - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys intent = in diff --git a/physics/GFS_rrtmgp_pre.F90 b/physics/GFS_rrtmgp_pre.F90 index 360886a57..df85c752f 100644 --- a/physics/GFS_rrtmgp_pre.F90 +++ b/physics/GFS_rrtmgp_pre.F90 @@ -317,6 +317,7 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, cld_rerain = clouds(:,:,7) cld_swp = clouds(:,:,8) cld_resnow = clouds(:,:,9) + print*,clouds(:,:,5) ! ####################################################################################### ! mg, sfc-perts diff --git a/physics/GFS_rrtmgp_pre.meta b/physics/GFS_rrtmgp_pre.meta index 74362b448..f0e21928e 100644 --- a/physics/GFS_rrtmgp_pre.meta +++ b/physics/GFS_rrtmgp_pre.meta @@ -145,82 +145,82 @@ intent = out optional = F [cld_frac] - standard_name = RRTMGP_total_cloud_fraction + standard_name = total_cloud_fraction long_name = layer total cloud fraction units = frac - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys intent = out optional = F [cld_lwp] - standard_name = RRTMGP_cloud_liquid_water_path + standard_name = cloud_liquid_water_path long_name = layer cloud liquid water path units = g m-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys intent = out optional = F [cld_reliq] - standard_name = RRTMGP_mean_effective_radius_for_liquid_cloud + standard_name = mean_effective_radius_for_liquid_cloud long_name = mean effective radius for liquid cloud units = micron - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys intent = out optional = F [cld_iwp] - standard_name = RRTMGP_cloud_ice_water_path + standard_name = cloud_ice_water_path long_name = layer cloud ice water path units = g m-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys intent = out optional = F [cld_reice] - standard_name = RRTMGP_mean_effective_radius_for_ice_cloud + standard_name = mean_effective_radius_for_ice_cloud long_name = mean effective radius for ice cloud units = micron - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys intent = out optional = F [cld_swp] - standard_name = RRTMGP_cloud_snow_water_path + standard_name = cloud_snow_water_path long_name = layer cloud snow water path units = g m-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys intent = out optional = F [cld_resnow] - standard_name = RRTMGP_mean_effective_radius_for_snow_flake + standard_name = mean_effective_radius_for_snow_flake long_name = mean effective radius for snow cloud units = micron - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys intent = out optional = F [cld_rwp] - standard_name = RRTMGP_cloud_rain_water_path + standard_name = cloud_rain_water_path long_name = layer cloud rain water path units = g m-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys intent = out optional = F [cld_rerain] - standard_name = RRTMGP_mean_effective_radius_for_rain_drop + standard_name = mean_effective_radius_for_rain_drop long_name = mean effective radius for rain cloud units = micron - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys intent = out @@ -229,7 +229,7 @@ standard_name = RRTMGP_aerosol_optical_properties_for_longwave_bands_01_16 long_name = aerosol optical properties for longwave bands 01-16 units = various - dimensions = (horizontal_dimension,vertical_dimension_plus_one, number_of_lw_bands_rrtmgp,number_of_aerosol_output_fields_for_longwave_radiation) + dimensions = (horizontal_dimension,vertical_dimension, number_of_lw_bands_rrtmgp,number_of_aerosol_output_fields_for_longwave_radiation) type = real kind = kind_phys intent = out @@ -238,7 +238,7 @@ standard_name = RRTMGP_aerosol_optical_properties_for_shortwave_bands_01_16 long_name = aerosol optical properties for shortwave bands 01-16 units = various - dimensions = (horizontal_dimension,vertical_dimension_plus_one, number_of_sw_bands_rrtmgp, number_of_aerosol_output_fields_for_shortwave_radiation) + dimensions = (horizontal_dimension,vertical_dimension, number_of_sw_bands_rrtmgp, number_of_aerosol_output_fields_for_shortwave_radiation) type = real intent = out kind = kind_phys diff --git a/physics/GFS_rrtmgp_setup.F90 b/physics/GFS_rrtmgp_setup.F90 index 77e604c72..bf9bfa04d 100644 --- a/physics/GFS_rrtmgp_setup.F90 +++ b/physics/GFS_rrtmgp_setup.F90 @@ -3,7 +3,6 @@ module GFS_rrtmgp_setup use physparam, only : isolar , ictmflg, ico2flg, ioznflg, iaerflg,& -! & iaermdl, laswflg, lalwflg, lavoflg, icldflg, & & iaermdl, icldflg, & & iovrsw , iovrlw , lcrick , lcnorm , lnoprec, & & ialbflg, iemsflg, isubcsw, isubclw, ivflip , ipsd0, & @@ -21,7 +20,7 @@ module GFS_rrtmgp_setup ! --- version tag and last revision date character(40), parameter :: & - & VTAGRAD='NCEP-Radiation_driver v5.2 Jan 2013 ' + & VTAGRAD='NCEP-RRTMGP_driver v1.0 Sep 2019 ' ! & VTAGRAD='NCEP-Radiation_driver v5.1 Nov 2012 ' ! & VTAGRAD='NCEP-Radiation_driver v5.0 Aug 2012 ' @@ -36,7 +35,8 @@ module GFS_rrtmgp_setup logical :: loz1st = .true. contains - +!> \defgroup GFS_rrtmgp_setup GFS RRTMGP Scheme Setup +!! @{ !! \section arg_table_GFS_rrtmgp_setup_init !! \htmlinclude GFS_rrtmgp_setup.html !! @@ -46,7 +46,6 @@ subroutine GFS_rrtmgp_setup_init ( & icliq_sw, crick_proof, ccnorm, & imp_physics, & norad_precip, idate, iflip, & - im, aerosolslw, aerosolssw, aerodp, & ! for consistency checks me, errmsg, errflg) ! ================= subprogram documentation block ================ ! ! ! @@ -183,71 +182,38 @@ subroutine GFS_rrtmgp_setup_init ( & logical, intent(in) :: norad_precip integer, intent(in) :: idate(4) integer, intent(in) :: iflip - ! For consistency checks - integer, intent(in) :: im - real(kind_phys), intent(in) :: aerosolslw(:,:,:,:) - real(kind_phys), intent(in) :: aerosolssw(:,:,:,:) - real(kind_phys), intent(in) :: aerodp(:,:) - ! End for consistency checks integer, intent(in) :: me character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg - ! For consistency checks - real(kind_phys), dimension(im,levr,NBDLW,NF_AELW) :: aerosolslw_check - real(kind_phys), dimension(im,levr,NBDSW,NF_AESW) :: aerosolssw_check - real(kind_phys), dimension(im,NSPC1) :: aerodp_check - ! End for consistency checks ! Initialize the CCPP error handling variables errmsg = '' errflg = 0 - if (is_initialized) return - ! Consistency checks for dimensions of arrays, this is required - ! to detect differences in FV3's parameters that are used to - ! dimension certain arrays and the values in ccpp-physics - if (size(aerosolslw(1,:,:,:)).ne.size(aerosolslw_check(1,:,:,:))) then - write(errmsg,"(3a,4i4,a,4i4)") & - "Runtime error: dimension mismatch for aerosolslw,", & - " check definitions of Model%levs, nbdlw, nf_aelw:", & - " expected shape ", shape(aerosolslw_check(:,:,:,:)), & - " but got ", shape(aerosolslw(:,:,:,:)) - errflg = 1 - return - end if - if (size(aerosolssw(1,:,:,:)).ne.size(aerosolssw_check(1,:,:,:))) then - write(errmsg,"(3a,4i4,a,4i4)") & - "Runtime error: dimension mismatch for aerosolssw,", & - " check definitions of Model%levs, nbdsw, nf_aesw:", & - " expected shape ", shape(aerosolssw_check(:,:,:,:)), & - " but got ", shape(aerosolssw(:,:,:,:)) - errflg = 1 - return - end if - if (size(aerodp(1,:)).ne.size(aerodp_check(1,:))) then - write(errmsg,"(3a,2i4,a,2i4)") & - "Runtime error: dimension mismatch for aerodp,", & - " check definitions of nspc1:", & - " expected shape ", shape(aerodp_check(:,:)), & - " but got ", shape(aerodp(:,:)) - errflg = 1 - return - end if - - ! End of consistency checks - - isolar = isol ! solar constant control flag - ictmflg= ictm ! data ic time/date control flag - ico2flg= ico2 ! co2 data source control flag - ioznflg= ntoz ! ozone data source control flag + ! Set radiation parameters + isolar = isol ! solar constant control flag + ictmflg = ictm ! data ic time/date control flag + ico2flg = ico2 ! co2 data source control flag + ioznflg = ntoz ! ozone data source control flag + iswcliq = icliq_sw ! optical property for liquid clouds for sw + iovrsw = iovr_sw ! cloud overlapping control flag for sw + iovrlw = iovr_lw ! cloud overlapping control flag for lw + lcrick = crick_proof ! control flag for eliminating CRICK + lcnorm = ccnorm ! control flag for in-cld condensate + lnoprec = norad_precip ! precip effect on radiation flag (ferrier microphysics) + isubcsw = isubc_sw ! sub-column cloud approx flag in sw radiation + isubclw = isubc_lw ! sub-column cloud approx flag in lw radiation + ialbflg = ialb ! surface albedo control flag + iemsflg = iems ! surface emissivity control flag + ivflip = iflip ! vertical index direction control flag if ( ictm==0 .or. ictm==-2 ) then - iaerflg = mod(iaer, 100) ! no volcanic aerosols for clim hindcast + iaerflg = mod(iaer, 100) ! no volcanic aerosols for clim hindcast else - iaerflg = mod(iaer, 1000) + iaerflg = mod(iaer, 1000) endif iaermdl = iaer/1000 ! control flag for aerosol scheme selection if ( iaermdl < 0 .or. (iaermdl>2 .and. iaermdl/=5) ) then @@ -255,64 +221,41 @@ subroutine GFS_rrtmgp_setup_init ( & stop 7777 endif -! if ( ntcw > 0 ) then - icldflg = 1 ! prognostic cloud optical prop scheme -! else -! icldflg = 0 ! no support for diag cloud opt prop scheme -! endif - - iswcliq = icliq_sw ! optical property for liquid clouds for sw - - iovrsw = iovr_sw ! cloud overlapping control flag for sw - iovrlw = iovr_lw ! cloud overlapping control flag for lw - - lcrick = crick_proof ! control flag for eliminating CRICK - lcnorm = ccnorm ! control flag for in-cld condensate - lnoprec = norad_precip ! precip effect on radiation flag (ferrier microphysics) - isubcsw = isubc_sw ! sub-column cloud approx flag in sw radiation - isubclw = isubc_lw ! sub-column cloud approx flag in lw radiation - - ialbflg= ialb ! surface albedo control flag - iemsflg= iems ! surface emissivity control flag + !if ( ntcw > 0 ) then + icldflg = 1 ! prognostic cloud optical prop scheme + !else + ! icldflg = 0 ! no support for diag cloud opt prop scheme + !endif - ivflip = iflip ! vertical index direction control flag - -! --- assign initial permutation seed for mcica cloud-radiation + ! Set initial permutation seed for mcica cloud-radiation if ( isubc_sw>0 .or. isubc_lw>0 ) then -! ipsd0 = 17*idate(1)+43*idate(2)+37*idate(3)+23*idate(4) + ipsd0 - ipsd0 = 17*idate(1)+43*idate(2)+37*idate(3)+23*idate(4) + ipsd0 = 17*idate(1)+43*idate(2)+37*idate(3)+23*idate(4) endif if ( me == 0 ) then - print *,' In rad_initialize (GFS_rrtmgp_setup_init), before calling radinit' - print *,' si =',si - print *,' levr=',levr,' ictm=',ictm,' isol=',isol,' ico2=',ico2,& - & ' iaer=',iaer,' ialb=',ialb,' iems=',iems,' ntcw=',ntcw - print *,' np3d=',num_p3d,' ntoz=',ntoz,' iovr_sw=',iovr_sw, & - & ' iovr_lw=',iovr_lw,' isubc_sw=',isubc_sw, & - & ' isubc_lw=',isubc_lw,' icliq_sw=',icliq_sw, & - & ' iflip=',iflip,' me=',me - print *,' crick_proof=',crick_proof, & - & ' ccnorm=',ccnorm,' norad_precip=',norad_precip + print *,' In rad_initialize (GFS_rrtmgp_setup_init), before calling radinit' + print *,' si =',si + print *,' levr=',levr,' ictm=',ictm,' isol=',isol,' ico2=',ico2,& + ' iaer=',iaer,' ialb=',ialb,' iems=',iems,' ntcw=',ntcw + print *,' np3d=',num_p3d,' ntoz=',ntoz,' iovr_sw=',iovr_sw, & + ' iovr_lw=',iovr_lw,' isubc_sw=',isubc_sw, & + ' isubc_lw=',isubc_lw,' icliq_sw=',icliq_sw, & + ' iflip=',iflip,' me=',me + print *,' crick_proof=',crick_proof, & + ' ccnorm=',ccnorm,' norad_precip=',norad_precip endif - call radinit & -! --- inputs: - & ( si, levr, imp_physics, me ) -! --- outputs: -! ( none ) + call radinit( si, levr, imp_physics, me ) if ( me == 0 ) then - print *,' Radiation sub-cloud initial seed =',ipsd0, & - & ' IC-idate =',idate - print *,' return from rad_initialize (GFS_rrtmgp_setup_init) - after calling radinit' + print *,' Radiation sub-cloud initial seed =',ipsd0, & + ' IC-idate =',idate + print *,' return from rad_initialize (GFS_rrtmgp_setup_init) - after calling radinit' endif -! + is_initialized = .true. -! return - - end subroutine GFS_rrtmgp_setup_init + end subroutine GFS_rrtmgp_setup_init !> \section arg_table_GFS_rrtmgp_setup_run !! \htmlinclude GFS_rrtmgp_setup.html @@ -497,8 +440,6 @@ subroutine radinit( si, NLAY, imp_physics, me ) use module_radiation_gases, only : gas_init use module_radiation_surface, only : sfc_init use module_radiation_clouds, only : cld_init - ! DH* these should be called by rrtmgp_lw_init and rrtmgp_sw_init! - use rrtmg_sw, only : rswinit implicit none @@ -585,39 +526,16 @@ subroutine radinit( si, NLAY, imp_physics, me ) endif endif -!> -# Initialization -!! - astronomy initialization routine: -!! call module_radiation_astronomy::sol_init() -!! - aerosols initialization routine: -!! call module_radiation_aerosols::aer_init() -!! - CO2 and other gases intialization routine: -!! call module_radiation_gases::gas_init() -!! - surface intialization routine: -!! call module_radiation_surface::sfc_init() -!! - cloud initialization routine: -!! call module_radiation_clouds::cld_init() -!! - LW radiation initialization routine: -!! call module_radlw_main::rlwinit() -!! - SW radiation initialization routine: -!! call module_radsw_main::rswinit() -! Initialization - - call sol_init ( me ) ! --- ... astronomy initialization routine - - call aer_init ( NLAY, me ) ! --- ... aerosols initialization routine - - call gas_init ( me ) ! --- ... co2 and other gases initialization routine - - call sfc_init ( me ) ! --- ... surface initialization routine + ! Initialization + call sol_init ( me ) ! --- ... astronomy initialization routine + call aer_init ( NLAY, me ) ! --- ... aerosols initialization routine + call gas_init ( me ) ! --- ... co2 and other gases initialization routine + call sfc_init ( me ) ! --- ... surface initialization routine call cld_init ( si, NLAY, imp_physics, me) ! --- ... cloud initialization routine - !call rlwinit ( me ) ! --- ... lw radiation initialization routine - - call rswinit ( me ) ! --- ... sw radiation initialization routine -! return -!................................... + !................................... end subroutine radinit !----------------------------------- diff --git a/physics/GFS_rrtmgp_setup.meta b/physics/GFS_rrtmgp_setup.meta index cf14c3de4..b14f3aa68 100644 --- a/physics/GFS_rrtmgp_setup.meta +++ b/physics/GFS_rrtmgp_setup.meta @@ -178,41 +178,6 @@ type = integer intent = in optional = F -[im] - standard_name = horizontal_loop_extent - long_name = horizontal loop extent - units = count - dimensions = () - type = integer - intent = in - optional = F -[aerosolssw] - standard_name = RRTMGP_aerosol_optical_properties_for_shortwave_bands_01_16 - long_name = aerosol optical properties for shortwave bands 01-16 - units = various - dimensions = (horizontal_dimension,vertical_dimension_plus_one, number_of_sw_bands_rrtmgp, number_of_aerosol_output_fields_for_shortwave_radiation) - type = real - kind = kind_phys - intent = in - optional = F -[aerosolslw] - standard_name = RRTMGP_aerosol_optical_properties_for_longwave_bands_01_16 - long_name = aerosol optical properties for longwave bands 01-16 - units = various - dimensions = (horizontal_dimension,vertical_dimension_plus_one, number_of_lw_bands_rrtmgp,number_of_aerosol_output_fields_for_longwave_radiation) - type = real - kind = kind_phys - optional = F - intent = in -[aerodp] - standard_name = atmosphere_optical_thickness_due_to_ambient_aerosol_particles - long_name = vertical integrated optical depth for various aerosol species - units = none - dimensions = (horizontal_dimension,number_of_species_for_aerosol_optical_depth) - type = real - kind = kind_phys - intent = in - optional = F [me] standard_name = mpi_rank long_name = current MPI-rank diff --git a/physics/rrtmgp_lw_cloud_optics.meta b/physics/rrtmgp_lw_cloud_optics.meta index 5a1fe99d5..53ea2bb2a 100644 --- a/physics/rrtmgp_lw_cloud_optics.meta +++ b/physics/rrtmgp_lw_cloud_optics.meta @@ -96,74 +96,74 @@ intent = in optional = F [cld_frac] - standard_name = RRTMGP_total_cloud_fraction + standard_name = total_cloud_fraction long_name = layer total cloud fraction units = frac - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_dimension,vertical_dimension) type = real intent = in kind = kind_phys [cld_lwp] - standard_name = RRTMGP_cloud_liquid_water_path + standard_name = cloud_liquid_water_path long_name = layer cloud liquid water path units = g m-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_dimension,vertical_dimension) type = real intent = in kind = kind_phys [cld_reliq] - standard_name = RRTMGP_mean_effective_radius_for_liquid_cloud + standard_name = mean_effective_radius_for_liquid_cloud long_name = mean effective radius for liquid cloud units = micron - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_dimension,vertical_dimension) type = real intent = in kind = kind_phys [cld_iwp] - standard_name = RRTMGP_cloud_ice_water_path + standard_name = cloud_ice_water_path long_name = layer cloud ice water path units = g m-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_dimension,vertical_dimension) type = real intent = in kind = kind_phys [cld_reice] - standard_name = RRTMGP_mean_effective_radius_for_ice_cloud + standard_name = mean_effective_radius_for_ice_cloud long_name = mean effective radius for ice cloud units = micron - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_dimension,vertical_dimension) type = real intent = in kind = kind_phys [cld_swp] - standard_name = RRTMGP_cloud_snow_water_path + standard_name = cloud_snow_water_path long_name = cloud snow water path units = g m-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_dimension,vertical_dimension) type = real intent = in kind = kind_phys [cld_resnow] - standard_name = RRTMGP_mean_effective_radius_for_snow_flake + standard_name = mean_effective_radius_for_snow_flake long_name = mean effective radius for snow flake units = micron - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_dimension,vertical_dimension) type = real intent = in kind = kind_phys [cld_rwp] - standard_name = RRTMGP_cloud_rain_water_path + standard_name = cloud_rain_water_path long_name = cloud rain water path units = g m-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_dimension,vertical_dimension) type = real intent = in kind = kind_phys [cld_rerain] - standard_name = RRTMGP_mean_effective_radius_for_rain_drop + standard_name = mean_effective_radius_for_rain_drop long_name = mean effective radius for rain drop units = micron - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_dimension,vertical_dimension) type = real intent = in kind = kind_phys @@ -187,7 +187,7 @@ standard_name = RRTMGP_aerosol_optical_properties_for_longwave_bands_01_16 long_name = aerosol optical properties for longwave bands 01-16 units = various - dimensions = (horizontal_dimension,vertical_dimension_plus_one, number_of_lw_bands_rrtmgp,number_of_aerosol_output_fields_for_longwave_radiation) + dimensions = (horizontal_dimension,vertical_dimension, number_of_lw_bands_rrtmgp,number_of_aerosol_output_fields_for_longwave_radiation) type = real kind = kind_phys intent = in @@ -196,7 +196,7 @@ standard_name = RRTMGP_cloud_optical_depth_layers_at_10mu_band long_name = approx 10mu band layer cloud optical depth units = none - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys intent = out diff --git a/physics/rrtmgp_lw_clrallsky_driver.F90 b/physics/rrtmgp_lw_clrallsky_driver.F90 index 2d5237916..004a3fb90 100644 --- a/physics/rrtmgp_lw_clrallsky_driver.F90 +++ b/physics/rrtmgp_lw_clrallsky_driver.F90 @@ -59,7 +59,7 @@ subroutine rrtmgp_lw_clrallsky_driver_run(Model, Radtend, ncol, lw_gas_props, p_ ! Outputs character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg - real(kind_phys), dimension(ncol,model%levs), intent(out) :: & + real(kind_phys), dimension(ncol,model%levs+1), intent(out) :: & fluxlwUP_allsky, & ! All-sky flux (W/m2) fluxlwDOWN_allsky, & ! All-sky flux (W/m2) fluxlwUP_clrsky, & ! Clear-sky flux (W/m2) diff --git a/physics/rrtmgp_sw_cloud_optics.F90 b/physics/rrtmgp_sw_cloud_optics.F90 index 6efdb5f01..84911e7b6 100644 --- a/physics/rrtmgp_sw_cloud_optics.F90 +++ b/physics/rrtmgp_sw_cloud_optics.F90 @@ -456,7 +456,7 @@ subroutine rrtmgp_sw_cloud_optics_run(Model, ncol, icseed_sw, cld_frac, cld_lwp, call random_number(rng1D,rng_stat) rng3D(:,:,iCol) = reshape(source = rng1D,shape=[sw_gas_props%get_ngpt(),model%levs]) enddo - + ! Call McICA select case ( iovrsw ) ! Maximumn-random diff --git a/physics/rrtmgp_sw_cloud_optics.meta b/physics/rrtmgp_sw_cloud_optics.meta index 2b0d54a47..0e0e968ab 100644 --- a/physics/rrtmgp_sw_cloud_optics.meta +++ b/physics/rrtmgp_sw_cloud_optics.meta @@ -80,82 +80,82 @@ intent = in optional = F [cld_frac] - standard_name = RRTMGP_total_cloud_fraction + standard_name = total_cloud_fraction long_name = layer total cloud fraction units = frac - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys intent = in optional = F [cld_lwp] - standard_name = RRTMGP_cloud_liquid_water_path + standard_name = cloud_liquid_water_path long_name = layer cloud liquid water path units = g m-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys intent = in optional = F [cld_reliq] - standard_name = RRTMGP_mean_effective_radius_for_liquid_cloud + standard_name = mean_effective_radius_for_liquid_cloud long_name = mean effective radius for liquid cloud units = micron - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys intent = in optional = F [cld_iwp] - standard_name = RRTMGP_cloud_ice_water_path + standard_name = cloud_ice_water_path long_name = layer cloud ice water path units = g m-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys intent = in optional = F [cld_reice] - standard_name = RRTMGP_mean_effective_radius_for_ice_cloud + standard_name = mean_effective_radius_for_ice_cloud long_name = mean effective radius for ice cloud units = micron - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys intent = in optional = F [cld_swp] - standard_name = RRTMGP_cloud_snow_water_path + standard_name = cloud_snow_water_path long_name = layer cloud snow water path units = g m-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys intent = in optional = F [cld_resnow] - standard_name = RRTMGP_mean_effective_radius_for_snow_flake + standard_name = mean_effective_radius_for_snow_flake long_name = mean effective radius for snow cloud units = micron - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys intent = in optional = F [cld_rwp] - standard_name = RRTMGP_cloud_rain_water_path + standard_name = cloud_rain_water_path long_name = layer cloud rain water path units = g m-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys intent = in optional = F [cld_rerain] - standard_name = RRTMGP_mean_effective_radius_for_rain_drop + standard_name = mean_effective_radius_for_rain_drop long_name = mean effective radius for rain cloud units = micron - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys intent = in @@ -172,7 +172,7 @@ standard_name = RRTMGP_aerosol_optical_properties_for_shortwave_bands_01_16 long_name = aerosol optical properties for shortwave bands 01-16 units = various - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_shortwave_radiation,number_of_aerosol_output_fields_for_shortwave_radiation) + dimensions = (horizontal_dimension,vertical_dimension,number_of_lw_bands_rrtmgp,number_of_aerosol_output_fields_for_shortwave_radiation) type = real kind = kind_phys intent = in @@ -237,7 +237,7 @@ standard_name = RRTMGP_cloud_optical_depth_layers_at_0_55mu_band long_name = approx .55mu band layer cloud optical depth units = none - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys intent = out diff --git a/physics/rrtmgp_sw_clrallsky_driver.F90 b/physics/rrtmgp_sw_clrallsky_driver.F90 index 4d284b71d..249975783 100644 --- a/physics/rrtmgp_sw_clrallsky_driver.F90 +++ b/physics/rrtmgp_sw_clrallsky_driver.F90 @@ -61,7 +61,7 @@ subroutine rrtmgp_sw_clrallsky_driver_run(Model, Radtend, ncol, sw_gas_props, p_ ! Outputs character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg - real(kind_phys), dimension(ncol,Model%levs), intent(out) :: & + real(kind_phys), dimension(ncol,Model%levs+1), intent(out) :: & fluxswUP_allsky, & ! All-sky flux (W/m2) fluxswDOWN_allsky, & ! All-sky flux (W/m2) fluxswUP_clrsky, & ! Clear-sky flux (W/m2) From 3958a870e7bf851456cfe80ffc8c7ebb7643045b Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Mon, 7 Oct 2019 15:06:55 -0600 Subject: [PATCH 053/167] Changes were made to use RRTMGP for SW calculation, and RRTMG for the LW calculation. --- physics/GFS_rrtmgp_gas_optics.F90 | 2 + physics/GFS_rrtmgp_lw_post.F90 | 88 +++- physics/GFS_rrtmgp_lw_post.meta | 77 +++ physics/GFS_rrtmgp_lw_pre.F90 | 118 +++++ physics/GFS_rrtmgp_lw_pre.meta | 144 ++++++ physics/GFS_rrtmgp_post.F90 | 202 -------- physics/GFS_rrtmgp_pre.F90 | 189 +++----- physics/GFS_rrtmgp_pre.meta | 116 +++-- physics/GFS_rrtmgp_setup.F90 | 452 +++++++----------- physics/GFS_rrtmgp_setup.meta | 8 + physics/GFS_rrtmgp_sw_post.F90 | 103 +++- physics/GFS_rrtmgp_sw_post.meta | 69 +++ physics/GFS_rrtmgp_sw_pre.F90 | 188 ++++++++ ...rtmgp_post.meta => GFS_rrtmgp_sw_pre.meta} | 161 ++++--- physics/rrtmgp_aux.F90 | 6 + physics/rrtmgp_lw_gas_optics.F90 | 7 +- physics/rrtmgp_sw_gas_optics.F90 | 22 +- 17 files changed, 1192 insertions(+), 760 deletions(-) create mode 100644 physics/GFS_rrtmgp_lw_pre.F90 create mode 100644 physics/GFS_rrtmgp_lw_pre.meta delete mode 100644 physics/GFS_rrtmgp_post.F90 create mode 100644 physics/GFS_rrtmgp_sw_pre.F90 rename physics/{GFS_rrtmgp_post.meta => GFS_rrtmgp_sw_pre.meta} (56%) diff --git a/physics/GFS_rrtmgp_gas_optics.F90 b/physics/GFS_rrtmgp_gas_optics.F90 index 73a23078d..3ff397268 100644 --- a/physics/GFS_rrtmgp_gas_optics.F90 +++ b/physics/GFS_rrtmgp_gas_optics.F90 @@ -59,6 +59,8 @@ subroutine GFS_rrtmgp_gas_optics_init(Model, Radtend, errmsg, errflg) end subroutine GFS_rrtmgp_gas_optics_init ! subroutine GFS_rrtmgp_gas_optics_run() + + end subroutine GFS_rrtmgp_gas_optics_run ! subroutine GFS_rrtmgp_gas_optics_finalize() diff --git a/physics/GFS_rrtmgp_lw_post.F90 b/physics/GFS_rrtmgp_lw_post.F90 index 986a025ee..0d5a9c974 100644 --- a/physics/GFS_rrtmgp_lw_post.F90 +++ b/physics/GFS_rrtmgp_lw_post.F90 @@ -5,7 +5,9 @@ module GFS_rrtmgp_lw_post use GFS_typedefs, only: GFS_coupling_type, & GFS_control_type, & GFS_grid_type, & - GFS_radtend_type + GFS_radtend_type, & + GFS_statein_type, & + GFS_diag_type use module_radiation_aerosols, only: NSPC1 use module_radlw_parameters, only: topflw_type, sfcflw_type, proflw_type ! RRTMGP DDT's @@ -25,10 +27,10 @@ end subroutine GFS_rrtmgp_lw_post_init !> \section arg_table_GFS_rrtmgp_lw_post_run !! \htmlinclude GFS_rrtmgp_lw_post.html !! - subroutine GFS_rrtmgp_lw_post_run (Model, Grid, Radtend, & - Coupling, im, p_lev, & - tsfa, fluxlwUP_allsky, fluxlwDOWN_allsky, fluxlwUP_clrsky, fluxlwDOWN_clrsky, & - hlwc, topflx_lw, sfcflx_lw, flxprf_lw, hlw0, errmsg, errflg) + subroutine GFS_rrtmgp_lw_post_run (Model, Grid, Radtend, Coupling, Diag, Statein, im, & + p_lev, tsfa, fluxlwUP_allsky, fluxlwDOWN_allsky, fluxlwUP_clrsky, fluxlwDOWN_clrsky,& + raddt, aerodp, cldsa, mtopa, mbota, cld_frac, cldtaulw, hlwc, topflx_lw, & + sfcflx_lw, flxprf_lw, hlw0, errmsg, errflg) ! Inputs type(GFS_control_type), intent(in) :: & @@ -39,6 +41,10 @@ subroutine GFS_rrtmgp_lw_post_run (Model, Grid, Radtend, & Coupling ! Fortran DDT containing FV3-GFS fields to/from coupling with other components type(GFS_radtend_type), intent(inout) :: & Radtend ! Fortran DDT containing FV3-GFS radiation tendencies + type(GFS_diag_type), intent(inout) :: & + Diag ! Fortran DDT containing FV3-GFS diagnotics data + type(GFS_statein_type), intent(in) :: & + Statein ! Fortran DDT containing FV3-GFS prognostic state data in from dycore integer, intent(in) :: & im ! Horizontal loop extent real(kind_phys), dimension(size(Grid%xlon,1)), intent(in) :: & @@ -50,6 +56,18 @@ subroutine GFS_rrtmgp_lw_post_run (Model, Grid, Radtend, & fluxlwDOWN_allsky, & ! LW All-sky flux (W/m2) fluxlwUP_clrsky, & ! LW Clear-sky flux (W/m2) fluxlwDOWN_clrsky ! LW All-sky flux (W/m2) + real(kind_phys), intent(in) :: & + raddt ! Radiation time step + real(kind_phys), dimension(im,NSPC1), intent(in) :: & + aerodp ! Vertical integrated optical depth for various aerosol species + real(kind_phys), dimension(im,5), intent(in) :: & + cldsa ! Fraction of clouds for low, middle, high, total and BL + integer, dimension(im,3), intent(in) ::& + mbota, & ! vertical indices for low, middle and high cloud tops + mtopa ! vertical indices for low, middle and high cloud bases + real(kind_phys), dimension(im,Model%levs), intent(in) :: & + cld_frac, & ! Total cloud fraction in each layer + cldtaulw ! approx 10.mu band layer cloud optical depth ! Outputs (mandatory) character(len=*), intent(out) :: & @@ -80,10 +98,11 @@ subroutine GFS_rrtmgp_lw_post_run (Model, Grid, Radtend, & ! dnfx0 - clear sky dnward flux (W/m2) ! Local variables - integer :: k, iSFC, iTOA + integer :: i, j, k, iSFC, iTOA, itop, ibtc logical :: l_clrskylw_hr, l_fluxeslw2d, top_at_1 + real(kind_phys) :: tem0d, tem1, tem2 - ! Initialize CCPP error handling variables + ! Initialize CCPP error handling variables errmsg = '' errflg = 0 @@ -163,6 +182,61 @@ subroutine GFS_rrtmgp_lw_post_run (Model, Grid, Radtend, & Coupling%sfcdlw(:) = Radtend%sfcflw(:)%dnfxc endif + ! ####################################################################################### + ! Save LW diagnostics + ! - For time averaged output quantities (including total-sky and clear-sky SW and LW + ! fluxes at TOA and surface; conventional 3-domain cloud amount, cloud top and base + ! pressure, and cloud top temperature; aerosols AOD, etc.), store computed results in + ! corresponding slots of array fluxr with appropriate time weights. + ! - Collect the fluxr data for wrtsfc + ! ####################################################################################### + if (Model%lssav) then + if (Model%lslwr) then + do i=1,im + ! LW all-sky fluxes + Diag%fluxr(i,1 ) = Diag%fluxr(i,1 ) + Model%fhlwr * Diag%topflw(i)%upfxc ! total sky top lw up + Diag%fluxr(i,19) = Diag%fluxr(i,19) + Model%fhlwr * Radtend%sfcflw(i)%dnfxc ! total sky sfc lw dn + Diag%fluxr(i,20) = Diag%fluxr(i,20) + Model%fhlwr * Radtend%sfcflw(i)%upfxc ! total sky sfc lw up + ! LW clear-sky fluxes + Diag%fluxr(i,28) = Diag%fluxr(i,28) + Model%fhlwr * Diag%topflw(i)%upfx0 ! clear sky top lw up + Diag%fluxr(i,30) = Diag%fluxr(i,30) + Model%fhlwr * Radtend%sfcflw(i)%dnfx0 ! clear sky sfc lw dn + Diag%fluxr(i,33) = Diag%fluxr(i,33) + Model%fhlwr * Radtend%sfcflw(i)%upfx0 ! clear sky sfc lw up + enddo + + do i=1,im + Diag%fluxr(i,17) = Diag%fluxr(i,17) + raddt * cldsa(i,4) + Diag%fluxr(i,18) = Diag%fluxr(i,18) + raddt * cldsa(i,5) + enddo + + ! Save cld frac,toplyr,botlyr and top temp, note that the order of h,m,l cloud is reversed for + ! the fluxr output. save interface pressure (pa) of top/bot + do j = 1, 3 + do i = 1, IM + tem0d = raddt * cldsa(i,j) + itop = mtopa(i,j) + ibtc = mbota(i,j) + Diag%fluxr(i, 8-j) = Diag%fluxr(i, 8-j) + tem0d + Diag%fluxr(i,11-j) = Diag%fluxr(i,11-j) + tem0d * Statein%prsi(i,itop) + Diag%fluxr(i,14-j) = Diag%fluxr(i,14-j) + tem0d * Statein%prsi(i,ibtc) + Diag%fluxr(i,17-j) = Diag%fluxr(i,17-j) + tem0d * Statein%tgrs(i,itop) + + ! Add optical depth and emissivity output + tem2 = 0. + do k=ibtc,itop + tem2 = tem2 + cldtaulw(i,k) ! approx 10. mu channel + enddo + Diag%fluxr(i,46-j) = Diag%fluxr(i,46-j) + tem0d * (1.0-exp(-tem2)) + enddo + enddo + endif + + if (Model%lgocart .or. Model%ldiag3d) then + do k = 1, Model%levs + Coupling%cldcovi(1:im,k) = cld_frac(1:im,k) + enddo + endif + endif + end subroutine GFS_rrtmgp_lw_post_run subroutine GFS_rrtmgp_lw_post_finalize () diff --git a/physics/GFS_rrtmgp_lw_post.meta b/physics/GFS_rrtmgp_lw_post.meta index dcd5ea158..c159b9ae9 100644 --- a/physics/GFS_rrtmgp_lw_post.meta +++ b/physics/GFS_rrtmgp_lw_post.meta @@ -33,6 +33,22 @@ type = GFS_coupling_type intent = inout optional = F +[Diag] + standard_name = GFS_diag_type_instance + long_name = instance of derived type GFS_diag_type + units = DDT + dimensions = () + type = GFS_diag_type + intent = inout + optional = F +[Statein] + standard_name = GFS_statein_type_instance + long_name = instance of derived type GFS_statein_type + units = DDT + dimensions = () + type = GFS_statein_type + intent = in + optional = F [im] standard_name = horizontal_loop_extent long_name = horizontal loop extent @@ -95,6 +111,67 @@ kind = kind_phys intent = in optional = F +[raddt] + standard_name = time_step_for_radiation + long_name = radiation time step + units = s + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[aerodp] + standard_name = atmosphere_optical_thickness_due_to_ambient_aerosol_particles + long_name = vertical integrated optical depth for various aerosol species + units = none + dimensions = (horizontal_dimension,number_of_species_for_aerosol_optical_depth) + type = real + kind = kind_phys + intent = in + optional = F +[cldsa] + standard_name = cloud_area_fraction_for_radiation + long_name = fraction of clouds for low, middle, high, total and BL + units = frac + dimensions = (horizontal_dimension,5) + type = real + kind = kind_phys + intent = in + optional = F +[mtopa] + standard_name = model_layer_number_at_cloud_top + long_name = vertical indices for low, middle and high cloud tops + units = index + dimensions = (horizontal_dimension,3) + type = integer + intent = in + optional = F +[mbota] + standard_name = model_layer_number_at_cloud_base + long_name = vertical indices for low, middle and high cloud bases + units = index + dimensions = (horizontal_dimension,3) + type = integer + intent = in + optional = F +[cld_frac] + standard_name = total_cloud_fraction + long_name = layer total cloud fraction + units = frac + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[cldtaulw] + standard_name = RRTMGP_cloud_optical_depth_layers_at_10mu_band + long_name = approx 10mu band layer cloud optical depth + units = none + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F [hlwc] standard_name = RRTMGP_lw_heating_rate_all_sky long_name = RRTMGP longwave all sky heating rate diff --git a/physics/GFS_rrtmgp_lw_pre.F90 b/physics/GFS_rrtmgp_lw_pre.F90 new file mode 100644 index 000000000..6122e774c --- /dev/null +++ b/physics/GFS_rrtmgp_lw_pre.F90 @@ -0,0 +1,118 @@ +!> \file GFS_rrtmgp_lw_pre.f90 +!! This file contains +module GFS_rrtmgp_lw_pre + use physparam + use machine, only: & + kind_phys ! Working type + use GFS_typedefs, only: & + GFS_control_type, & ! + GFS_sfcprop_type, & ! Surface fields + GFS_grid_type, & ! Grid and interpolation related data + GFS_statein_type, & ! + GFS_radtend_type ! Radiation tendencies needed in physics + use module_radiation_surface, only: & + setemis ! Routine to compute surface-emissivity + use module_radiation_aerosols, only: & + NF_AESW, & ! Number of optical-fields in SW output (3=tau+g+omega) + NF_AELW, & ! Number of optical-fields in LW output (3=tau+g+omega) + setaer, & ! Routine to compute aerosol radiative properties (tau,g,omega) + NSPC1 ! Number of species for vertically integrated aerosol optical-depth + use mo_gas_optics_rrtmgp, only: & + ty_gas_optics_rrtmgp + + public GFS_rrtmgp_lw_pre_run,GFS_rrtmgp_lw_pre_init,GFS_rrtmgp_lw_pre_finalize + +contains + + subroutine GFS_rrtmgp_lw_pre_init () + end subroutine GFS_rrtmgp_lw_pre_init + +!> \section arg_table_GFS_rrtmgp_lw_pre_run +!! \htmlinclude GFS_rrtmgp_lw_pre.html +!! + subroutine GFS_rrtmgp_lw_pre_run (Model, Grid, Sfcprop, Statein, ncol, p_lay, p_lev, & + tv_lay, relhum, tracer, lw_gas_props, Radtend, aerosolslw, aerodp, errmsg, errflg) + + ! Inputs + type(GFS_control_type), intent(in) :: & + Model ! Fortran DDT containing FV3-GFS model control parameters + type(GFS_grid_type), intent(in) :: & + Grid ! Fortran DDT containing FV3-GFS grid and interpolation related data + type(GFS_sfcprop_type), intent(in) :: & + Sfcprop ! Fortran DDT containing FV3-GFS surface fields + type(GFS_statein_type), intent(in) :: & + Statein ! Fortran DDT containing FV3-GFS prognostic state data in from dycore + integer, intent(in) :: & + ncol ! Number of horizontal grid points + real(kind_phys), dimension(ncol,Model%levs),intent(in) :: & + p_lay, & ! Layer pressure + tv_lay, & ! Layer virtual-temperature + relhum ! Layer relative-humidity + real(kind_phys), dimension(ncol, Model%levs, 2:Model%ntrac),intent(in) :: & + tracer + real(kind_phys), dimension(ncol,Model%levs+1),intent(in) :: & + p_lev ! Interface (level) pressure + type(ty_gas_optics_rrtmgp),intent(in) :: & + lw_gas_props ! RRTMGP DDT containing spectral information for LW calculation + + ! Outputs + type(GFS_radtend_type), intent(inout) :: & + Radtend ! Fortran DDT containing FV3-GFS radiation tendencies + real(kind_phys), dimension(ncol,Model%levs,lw_gas_props%get_nband(),NF_AELW), intent(out) ::& + aerosolslw ! Aerosol radiative properties in each SW band. + real(kind_phys), dimension(ncol,NSPC1), intent(inout) :: & + aerodp ! Vertical integrated optical depth for various aerosol species + character(len=*), intent(out) :: & + errmsg ! Error message + integer, intent(out) :: & + errflg ! Error flag + + ! Local + integer :: iSFC, iTOA + logical :: top_at_1 + real(kind_phys), dimension(ncol, Model%levs, Model%rrtmgp_nBandsSW, NF_AESW) :: & + aerosolssw2 + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + + if (.not. Model%lslwr) return + + ! ####################################################################################### + ! What is vertical ordering? + ! ####################################################################################### + top_at_1 = (Statein%prsi(1,1) .lt. Statein%prsi(1, Model%levs)) + if (top_at_1) then + iSFC = Model%levs + iTOA = 1 + else + iSFC = 1 + iTOA = Model%levs + endif + + ! ####################################################################################### + ! Call module_radiation_surface::setemis(),to setup surface emissivity for LW radiation. + ! ####################################################################################### + call setemis (Grid%xlon, Grid%xlat, Sfcprop%slmsk, Sfcprop%snowd, Sfcprop%sncovr, & + Sfcprop%zorl, Sfcprop%tsfc,Sfcprop%tsfc, Sfcprop%hprim, NCOL, & + Radtend%semis) + do iBand=1,lw_gas_props%get_nband() + Radtend%sfc_emiss_byband(iBand,1:NCOL) = Radtend%semis(1:NCOL) + enddo + + ! ####################################################################################### + ! Call module_radiation_aerosols::setaer(),to setup aerosols property profile + ! ####################################################################################### + call setaer(p_lev, p_lay, Statein%prslk(1:NCOL,iSFC:iTOA), tv_lay, relhum, & + Sfcprop%slmsk, tracer, Grid%xlon, Grid%xlat, ncol, Model%levs, Model%levs+1, & + .false., Model%lslwr, aerosolssw2, aerosolslw, aerodp) + + + end subroutine GFS_rrtmgp_lw_pre_run + +!> \section arg_table_GFS_rrtmgp_lw_pre_finalize Argument Table +!! + subroutine GFS_rrtmgp_lw_pre_finalize () + end subroutine GFS_rrtmgp_lw_pre_finalize + +end module GFS_rrtmgp_lw_pre diff --git a/physics/GFS_rrtmgp_lw_pre.meta b/physics/GFS_rrtmgp_lw_pre.meta new file mode 100644 index 000000000..e7954f4ec --- /dev/null +++ b/physics/GFS_rrtmgp_lw_pre.meta @@ -0,0 +1,144 @@ +[ccpp-arg-table] + name = GFS_rrtmgp_lw_pre_run + type = scheme +[Model] + standard_name = GFS_control_type_instance + long_name = instance of derived type GFS_control_type + units = DDT + dimensions = () + type = GFS_control_type + intent = in + optional = F +[Grid] + standard_name = GFS_grid_type_instance + long_name = instance of derived type GFS_grid_type + units = DDT + dimensions = () + type = GFS_grid_type + intent = in + optional = F +[Sfcprop] + standard_name = GFS_sfcprop_type_instance + long_name = instance of derived type GFS_sfcprop_type + units = DDT + dimensions = () + type = GFS_sfcprop_type + intent = in + optional = F +[Statein] + standard_name = GFS_statein_type_instance + long_name = instance of derived type GFS_statein_type + units = DDT + dimensions = () + type = GFS_statein_type + intent = in + optional = F +[Radtend] + standard_name = GFS_radtend_type_instance + long_name = instance of derived type GFS_radtend_type + units = DDT + dimensions = () + type = GFS_radtend_type + intent = inout + optional = F +[ncol] + standard_name = horizontal_loop_extent + long_name = horizontal loop extent + units = count + dimensions = () + type = integer + intent = in + optional = F +[tv_lay] + standard_name = virtual_temperature + long_name = layer virtual temperature + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[relhum] + standard_name = relative_humidity + long_name = layer relative humidity + units = frac + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[p_lay] + standard_name = air_pressure_at_layer_for_RRTMGP_in_hPa + long_name = air pressure at vertical layer for radiation calculation + units = hPa + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[p_lev] + standard_name = air_pressure_at_interface_for_RRTMGP_in_hPa + long_name = air pressure at vertical interface for radiation calculation + units = hPa + dimensions = (horizontal_dimension,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = in + optional = F +[tracer] + standard_name = chemical_tracers + long_name = chemical tracers + units = g g-1 + dimensions = (horizontal_dimension,vertical_dimension,number_of_tracers) + type = real + kind = kind_phys + intent = in + optional = F +[lw_gas_props] + standard_name = coefficients_for_lw_gas_optics + long_name = DDT containing spectral information for RRTMGP LW radiation scheme + units = DDT + dimensions = () + type = ty_gas_optics_rrtmgp + intent = in + optional = F +[aerodp] + standard_name = atmosphere_optical_thickness_due_to_ambient_aerosol_particles + long_name = vertical integrated optical depth for various aerosol species + units = none + dimensions = (horizontal_dimension,number_of_species_for_aerosol_optical_depth) + type = real + kind = kind_phys + intent = inout + optional = F +[aerosolslw] + standard_name = RRTMGP_aerosol_optical_properties_for_longwave_bands_01_16 + long_name = aerosol optical properties for longwave bands 01-16 + units = various + dimensions = (horizontal_dimension,vertical_dimension, number_of_lw_bands_rrtmgp,number_of_aerosol_output_fields_for_longwave_radiation) + type = real + kind = kind_phys + intent = out + optional = F +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out + optional = F +[errflg] + standard_name = ccpp_error_flag + long_name = error flag for error handling in CCPP + units = flag + dimensions = () + type = integer + intent = out + optional = F + +######################################################################## +[ccpp-arg-table] + name = GFS_rrtmgp_pre_lw_finalize + type = scheme diff --git a/physics/GFS_rrtmgp_post.F90 b/physics/GFS_rrtmgp_post.F90 deleted file mode 100644 index ad2c7ee66..000000000 --- a/physics/GFS_rrtmgp_post.F90 +++ /dev/null @@ -1,202 +0,0 @@ -!>\file GFS_rrtmgp_post.f90 -!! This file contains -module GFS_rrtmgp_post - use machine, only: kind_phys - use GFS_typedefs, only: GFS_statein_type, & - GFS_coupling_type, & - GFS_control_type, & - GFS_grid_type, & - GFS_radtend_type, & - GFS_diag_type - use module_radiation_aerosols, only: NSPC1 - use module_radlw_parameters, only: topflw_type, sfcflw_type, proflw_type - use module_radsw_parameters, only: topfsw_type, sfcfsw_type, profsw_type, cmpfsw_type - ! RRTMGP DDT's - use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp - use mo_fluxes_byband, only: ty_fluxes_byband - use mo_heating_rates, only: compute_heating_rate - - implicit none -contains - - subroutine GFS_rrtmgp_post_init () - end subroutine GFS_rrtmgp_post_init - -!> \section arg_table_GFS_rrtmgp_post_run -!! \htmlinclude GFS_rrtmgp_post.html -!! - subroutine GFS_rrtmgp_post_run (Model, Grid, Diag, Radtend, Statein, Coupling, scmpsw, & - ncol, raddt, aerodp, cldsa, mtopa, mbota, cld_frac, cldtaulw, cldtausw, & - errmsg, errflg) - - ! Inputs - type(GFS_control_type), intent(in) :: & - Model ! Fortran DDT containing FV3-GFS model control parameters - type(GFS_grid_type), intent(in) :: & - Grid ! Fortran DDT containing FV3-GFS grid and interpolation related data - type(GFS_statein_type), intent(in) :: & - Statein ! Fortran DDT containing FV3-GFS prognostic state data in from dycore - type(GFS_coupling_type), intent(inout) :: & - Coupling ! Fortran DDT containing FV3-GFS fields to/from coupling with other components - type(GFS_radtend_type), intent(inout) :: & - Radtend ! Fortran DDT containing FV3-GFS radiation tendencies - type(GFS_diag_type), intent(inout) :: & - Diag ! Fortran DDT containing FV3-GFS diagnotics data - integer, intent(in) :: & - ncol ! Horizontal loop extent - real(kind_phys), intent(in) :: & - raddt ! Radiation time step - real(kind_phys), dimension(ncol,NSPC1), intent(in) :: & - aerodp ! Vertical integrated optical depth for various aerosol species - real(kind_phys), dimension(ncol,5), intent(in) :: & - cldsa ! Fraction of clouds for low, middle, high, total and BL - integer, dimension(ncol,3), intent(in) ::& - mbota, & ! vertical indices for low, middle and high cloud tops - mtopa ! vertical indices for low, middle and high cloud bases - real(kind_phys), dimension(ncol,Model%levs), intent(in) :: & - cld_frac, & ! Total cloud fraction in each layer - cldtausw, & ! approx .55mu band layer cloud optical depth - cldtaulw ! approx 10.mu band layer cloud optical depth - ! Inputs (optional) - type(cmpfsw_type), dimension(ncol), intent(inout), optional :: & - scmpsw ! 2D surface fluxes, components: - ! uvbfc - total sky downward uv-b flux at (W/m2) - ! uvbf0 - clear sky downward uv-b flux at (W/m2) - ! nirbm - downward nir direct beam flux (W/m2) - ! nirdf - downward nir diffused flux (W/m2) - ! visbm - downward uv+vis direct beam flux (W/m2) - ! visdf - downward uv+vis diffused flux (W/m2) - - ! Outputs (mandatory) - character(len=*), intent(out) :: & - errmsg - integer, intent(out) :: & - errflg - - ! Local variables - integer :: i, j, k, itop, ibtc - real(kind_phys) :: tem0d, tem1, tem2 - - ! Initialize CCPP error handling variables - errmsg = '' - errflg = 0 - - if (.not. (Model%lsswr .or. Model%lslwr)) return - - ! ####################################################################################### - ! ####################################################################################### - !> - For time averaged output quantities (including total-sky and - !! clear-sky SW and LW fluxes at TOA and surface; conventional - !! 3-domain cloud amount, cloud top and base pressure, and cloud top - !! temperature; aerosols AOD, etc.), store computed results in - !! corresponding slots of array fluxr with appropriate time weights. - ! --- ... collect the fluxr data for wrtsfc - ! ####################################################################################### - ! ####################################################################################### - - if (Model%lssav) then - if (Model%lsswr) then - do i=1,ncol - Diag%fluxr(i,34) = Diag%fluxr(i,34) + Model%fhswr*aerodp(i,1) ! total aod at 550nm - Diag%fluxr(i,35) = Diag%fluxr(i,35) + Model%fhswr*aerodp(i,2) ! DU aod at 550nm - Diag%fluxr(i,36) = Diag%fluxr(i,36) + Model%fhswr*aerodp(i,3) ! BC aod at 550nm - Diag%fluxr(i,37) = Diag%fluxr(i,37) + Model%fhswr*aerodp(i,4) ! OC aod at 550nm - Diag%fluxr(i,38) = Diag%fluxr(i,38) + Model%fhswr*aerodp(i,5) ! SU aod at 550nm - Diag%fluxr(i,39) = Diag%fluxr(i,39) + Model%fhswr*aerodp(i,6) ! SS aod at 550nm - enddo - endif - - ! Save LW TOA and SFC fluxes - if (Model%lslwr) then - do i=1,ncol - ! LW all-sky fluxes - Diag%fluxr(i,1 ) = Diag%fluxr(i,1 ) + Model%fhlwr * Diag%topflw(i)%upfxc ! total sky top lw up - Diag%fluxr(i,19) = Diag%fluxr(i,19) + Model%fhlwr * Radtend%sfcflw(i)%dnfxc ! total sky sfc lw dn - Diag%fluxr(i,20) = Diag%fluxr(i,20) + Model%fhlwr * Radtend%sfcflw(i)%upfxc ! total sky sfc lw up - ! LW clear-sky fluxes - Diag%fluxr(i,28) = Diag%fluxr(i,28) + Model%fhlwr * Diag%topflw(i)%upfx0 ! clear sky top lw up - Diag%fluxr(i,30) = Diag%fluxr(i,30) + Model%fhlwr * Radtend%sfcflw(i)%dnfx0 ! clear sky sfc lw dn - Diag%fluxr(i,33) = Diag%fluxr(i,33) + Model%fhlwr * Radtend%sfcflw(i)%upfx0 ! clear sky sfc lw up - enddo - endif - - ! Save sw toa and sfc fluxes with proper diurnal sw wgt. coszen=mean cosz over daylight - ! part of sw calling interval, while coszdg= mean cosz over entire interval - if (Model%lsswr) then - do i = 1, NCOL - if (Radtend%coszen(i) > 0.) then - ! SW all-sky fluxes - tem0d = Model%fhswr * Radtend%coszdg(i) / Radtend%coszen(i) - Diag%fluxr(i,2 ) = Diag%fluxr(i,2) + Diag%topfsw(i)%upfxc * tem0d ! total sky top sw up - Diag%fluxr(i,3 ) = Diag%fluxr(i,3) + Radtend%sfcfsw(i)%upfxc * tem0d ! total sky sfc sw up - Diag%fluxr(i,4 ) = Diag%fluxr(i,4) + Radtend%sfcfsw(i)%dnfxc * tem0d ! total sky sfc sw dn - ! SW uv-b fluxes - Diag%fluxr(i,21) = Diag%fluxr(i,21) + scmpsw(i)%uvbfc * tem0d ! total sky uv-b sw dn - Diag%fluxr(i,22) = Diag%fluxr(i,22) + scmpsw(i)%uvbf0 * tem0d ! clear sky uv-b sw dn - ! SW TOA incoming fluxes - Diag%fluxr(i,23) = Diag%fluxr(i,23) + Diag%topfsw(i)%dnfxc * tem0d ! top sw dn - ! SW SFC flux components - Diag%fluxr(i,24) = Diag%fluxr(i,24) + scmpsw(i)%visbm * tem0d ! uv/vis beam sw dn - Diag%fluxr(i,25) = Diag%fluxr(i,25) + scmpsw(i)%visdf * tem0d ! uv/vis diff sw dn - Diag%fluxr(i,26) = Diag%fluxr(i,26) + scmpsw(i)%nirbm * tem0d ! nir beam sw dn - Diag%fluxr(i,27) = Diag%fluxr(i,27) + scmpsw(i)%nirdf * tem0d ! nir diff sw dn - ! SW clear-sky fluxes - Diag%fluxr(i,29) = Diag%fluxr(i,29) + Diag%topfsw(i)%upfx0 * tem0d ! clear sky top sw up - Diag%fluxr(i,31) = Diag%fluxr(i,31) + Radtend%sfcfsw(i)%upfx0 * tem0d ! clear sky sfc sw up - Diag%fluxr(i,32) = Diag%fluxr(i,32) + Radtend%sfcfsw(i)%dnfx0 * tem0d ! clear sky sfc sw dn - endif - enddo - endif - - ! --- save total and boundary layer clouds - - if (Model%lsswr .or. Model%lslwr) then - do i=1,ncol - Diag%fluxr(i,17) = Diag%fluxr(i,17) + raddt * cldsa(i,4) - Diag%fluxr(i,18) = Diag%fluxr(i,18) + raddt * cldsa(i,5) - enddo - - ! --- save cld frac,toplyr,botlyr and top temp, note that the order - ! of h,m,l cloud is reversed for the fluxr output. - ! --- save interface pressure (pa) of top/bot - - do j = 1, 3 - do i = 1, NCOL - tem0d = raddt * cldsa(i,j) - itop = mtopa(i,j) - ibtc = mbota(i,j) - Diag%fluxr(i, 8-j) = Diag%fluxr(i, 8-j) + tem0d - Diag%fluxr(i,11-j) = Diag%fluxr(i,11-j) + tem0d * Statein%prsi(i,itop) - Diag%fluxr(i,14-j) = Diag%fluxr(i,14-j) + tem0d * Statein%prsi(i,ibtc) - Diag%fluxr(i,17-j) = Diag%fluxr(i,17-j) + tem0d * Statein%tgrs(i,itop) - - ! Anning adds optical depth and emissivity output - tem1 = 0. - tem2 = 0. - do k=ibtc,itop - tem1 = tem1 + cldtausw(i,k) ! approx .55 mu channel - tem2 = tem2 + cldtaulw(i,k) ! approx 10. mu channel - enddo - Diag%fluxr(i,43-j) = Diag%fluxr(i,43-j) + tem0d * tem1 - Diag%fluxr(i,46-j) = Diag%fluxr(i,46-j) + tem0d * (1.0-exp(-tem2)) - enddo - enddo - endif - - ! if (.not. Model%uni_cld) then - if (Model%lgocart .or. Model%ldiag3d) then - do k = 1, Model%levs - Coupling%cldcovi(1:ncol,k) = cld_frac(1:ncol,k) - enddo - endif - endif ! end_if_lssav - ! - end subroutine GFS_rrtmgp_post_run - -!> \section arg_table_GFS_rrtmgp_post_finalize Argument Table -!! - subroutine GFS_rrtmgp_post_finalize () - - end subroutine GFS_rrtmgp_post_finalize - -end module GFS_rrtmgp_post diff --git a/physics/GFS_rrtmgp_pre.F90 b/physics/GFS_rrtmgp_pre.F90 index df85c752f..6a93eec36 100644 --- a/physics/GFS_rrtmgp_pre.F90 +++ b/physics/GFS_rrtmgp_pre.F90 @@ -50,7 +50,7 @@ module GFS_rrtmgp_pre ! RRTMGP types use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp use mo_gas_concentrations, only: ty_gas_concs - use rrtmgp_aux, only: check_error_msg + use rrtmgp_aux, only: check_error_msg, rrtmgp_minP, rrtmgp_minT real(kind_phys), parameter :: & amd = 28.9644_kind_phys, & ! Molecular weight of dry-air (g/mol) @@ -62,20 +62,66 @@ module GFS_rrtmgp_pre public GFS_rrtmgp_pre_run,GFS_rrtmgp_pre_init,GFS_rrtmgp_pre_finalize contains + +!! \section arg_table_GFS_rrtmgp_pre_init +!! \htmlinclude GFS_rrtmgp_pre_init.html +!! + ! ######################################################################################### + ! SUBROUTINE GFS_rrtmgp_pre_init() + ! ######################################################################################### + subroutine GFS_rrtmgp_pre_init(Model, Radtend, errmsg, errflg) + ! Inputs + type(GFS_control_type), intent(in) :: & + Model ! DDT containing model control parameters + type(GFS_radtend_type), intent(inout) :: & + Radtend ! Fortran DDT containing FV3-GFS radiation tendencies + ! Outputs + character(len=*), intent(out) :: & + errmsg ! Error message + integer, intent(out) :: & + errflg ! Error flag + + ! Local variables + character(len=1) :: tempstr + integer :: ij, count + integer,dimension(Model%ngases,2) :: gasIndices + + ! Initialize + errmsg = '' + errflg = 0 - subroutine GFS_rrtmgp_pre_init () + ! Which gases are active? Provided via physics namelist. + if (len(Model%active_gases) .gt. 0) then + + ! Pull out gas names from list... + ! First grab indices in character array corresponding to start:end of gas name. + gasIndices(1,1)=1 + count=1 + do ij=1,len(Model%active_gases) + tempstr=trim(Model%active_gases(ij:ij)) + if (tempstr .eq. '_') then + gasIndices(count,2)=ij-1 + gasIndices(count+1,1)=ij+1 + count=count+1 + endif + enddo + gasIndices(Model%ngases,2)=len(trim(Model%active_gases)) + ! Now extract the gas names + do ij=1,Model%ngases + Radtend%active_gases(ij,1) = Model%active_gases(gasIndices(ij,1):gasIndices(ij,2)) + enddo + endif end subroutine GFS_rrtmgp_pre_init !> \section arg_table_GFS_rrtmgp_pre_run !! \htmlinclude GFS_rrtmgp_pre.html !! - ! Attention - the output arguments lm, im, lmk, lmp must not be set - ! in the CCPP version - they are defined in the interstitial_create routine subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, Tbd, & ! IN ncol, lw_gas_props, sw_gas_props, & ! IN - raddt, p_lay, t_lay, p_lev, t_lev, tsfg, tsfa, alb1d, cld_frac, cld_lwp, & ! OUT - cld_reliq, cld_iwp, cld_reice, cld_swp, cld_resnow, cld_rwp, cld_rerain, aerosolslw, & ! OUT - aerosolssw, cldsa, mtopa, mbota, de_lgth, aerodp, nday, idxday, gas_concentrations, errmsg, errflg) + raddt, p_lay, t_lay, p_lev, t_lev, tsfg, tsfa, cld_frac, cld_lwp, & ! OUT + cld_reliq, cld_iwp, cld_reice, cld_swp, cld_resnow, cld_rwp, cld_rerain, & ! OUT + tv_lay, relhum, tracer, cldsa, mtopa, mbota, de_lgth, gas_concentrations, & ! OUT + errmsg, errflg) ! Inputs type(GFS_control_type), intent(in) :: & @@ -110,12 +156,6 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, real(kind_phys), dimension(ncol), intent(out) :: & tsfg, & ! Ground temperature tsfa ! Skin temperature - integer, intent(out) :: & - nday ! Number of daylit points - integer, dimension(ncol), intent(out) :: & - idxday ! Indices for daylit points - real(kind_phys), dimension(ncol), intent(out) :: & - alb1d ! Surface albedo pertubation type(ty_gas_concs),intent(out) :: & gas_concentrations ! RRTMGP DDT containing gas volumne mixing ratios character(len=*), intent(out) :: & @@ -132,10 +172,11 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, cld_resnow, & ! Cloud snow effective radius cld_rwp, & ! Cloud rain water path cld_rerain ! Cloud rain effective radius - real(kind_phys), dimension(ncol,Model%levs,sw_gas_props%get_nband(),NF_AESW), intent(out) ::& - aerosolssw ! Aerosol radiative properties in each SW band. - real(kind_phys), dimension(ncol,Model%levs,lw_gas_props%get_nband(),NF_AELW), intent(out) ::& - aerosolslw ! Aerosol radiative properties in each LW band. + real(kind_phys), dimension(ncol,Model%levs),intent(out) :: & + tv_lay, & ! + relhum + real(kind_phys), dimension(ncol, Model%levs, 2:Model%ntrac),intent(out) :: & + tracer integer,dimension(ncol,3),intent(out) :: & mbota, & ! Vertical indices for cloud tops mtopa ! Vertical indices for cloud bases @@ -143,8 +184,6 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, cldsa ! Fraction of clouds for low, middle, high, total and BL real(kind_phys), dimension(ncol), intent(out) :: & de_lgth ! - real(kind_phys), dimension(ncol,NSPC1), intent(out) :: & - aerodp ! Vertical integrated optical depth for various aerosol species ! Local variables integer :: i, j, iCol, iBand, iSFC, iTOA, iLay @@ -152,12 +191,9 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, real(kind_phys),dimension(NCOL,Model%levs) :: vmr_o3, vmr_h2o real(kind_phys) :: es, qs real(kind_phys), dimension(ncol, NF_ALBD) :: sfcalb - real(kind_phys), dimension(ncol, Model%levs) :: relhum, qs_lay, q_lay, deltaZ, tv_lay,& - deltaP, o3_lay - real(kind_phys), dimension(ncol, Model%levs, 2:Model%ntrac) :: tracer + real(kind_phys), dimension(ncol, Model%levs) :: qs_lay, q_lay, deltaZ, deltaP, o3_lay real(kind_phys), dimension(ncol, Model%levs, NF_VGAS) :: gas_vmr real(kind_phys), dimension(ncol, Model%levs, NF_CLDS) :: clouds - real(kind_phys), dimension(ncol, Model%levs, sw_gas_props%get_nband(), NF_AESW)::aerosolssw2 ! Initialize CCPP error handling variables errmsg = '' @@ -201,10 +237,10 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, enddo ! Guard against case when model uppermost model layer higher than rrtmgp allows. - where(p_lev(1:nCol,iTOA+1) .lt. sw_gas_props%get_press_min()) + where(p_lev(1:nCol,iTOA+1) .lt. rrtmgp_minP) ! Set to RRTMGP min(pressure/temperature) - p_lev(1:nCol,iTOA+1) = spread(sw_gas_props%get_press_min(),dim=1,ncopies=ncol) - t_lev(1:nCol,iTOA+1) = spread(sw_gas_props%get_temp_min(),dim=1,ncopies=ncol) + p_lev(1:nCol,iTOA+1) = spread(rrtmgp_minP, dim=1,ncopies=ncol) + t_lev(1:nCol,iTOA+1) = spread(rrtmgp_minT, dim=1,ncopies=ncol) ! Recompute layer pressure/temperature. p_lay(1:NCOL,iTOA) = 0.5_kind_phys*(p_lev(1:NCOL,iTOA) + p_lev(1:NCOL,iTOA+1)) t_lay(1:NCOL,iTOA) = 0.5_kind_phys*(t_lev(1:NCOL,iTOA) + t_lev(1:NCOL,iTOA+1)) @@ -255,8 +291,8 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, ! Compute volume mixing-ratios for ozone (mmr) and specific-humidity. vmr_h2o = merge((q_lay/(1-q_lay))*amdw, 0., q_lay .ne. 1.) vmr_o3 = merge(o3_lay*amdo3, 0., o3_lay .gt. 0.) - ! - !call gas_concentrations%reset() + + ! Populate RRTMGP DDT w/ gas-concentrations call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations%set_vmr('o2', gas_vmr(:,:,4))) call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations%set_vmr('co2', gas_vmr(:,:,1))) call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations%set_vmr('ch4', gas_vmr(:,:,3))) @@ -265,38 +301,13 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations%set_vmr('o3', vmr_o3)) ! ####################################################################################### - ! Radiation time step (output) (Is this really needed?) + ! Radiation time step (output) (Is this really needed?) (Used by some diangostics) ! ####################################################################################### raddt = min(Model%fhswr, Model%fhlwr) ! ####################################################################################### - ! Compute cosine of zenith angle (only when SW is called) - ! ####################################################################################### - if (Model%lsswr) then - call coszmn (Grid%xlon, Grid%sinlat, Grid%coslat, Model%solhr, NCOL, Model%me, & - Radtend%coszen, Radtend%coszdg) - endif - - ! ####################################################################################### - ! Call module_radiation_aerosols::setaer(),to setup aerosols property profile for both - ! LW and SW radiation. - ! ####################################################################################### - call setaer(p_lev, p_lay, Statein%prslk(1:NCOL,iSFC:iTOA), tv_lay, relhum, & - Sfcprop%slmsk, tracer, Grid%xlon, Grid%xlat, NCOL, Model%levs, Model%levs+1, & - Model%lsswr, Model%lslwr, aerosolssw2, aerosolslw, aerodp) - - ! Store aerosol optical properties - ! SW. - ! For RRTMGP SW the bands are now ordered from [IR(band) -> nIR -> UV], in RRTMG the - ! band ordering was [nIR -> UV -> IR(band)] - aerosolssw(1:NCOL,1:Model%levs,1,1) = aerosolssw2(1:NCOL,1:Model%levs,sw_gas_props%get_nband(),1) - aerosolssw(1:NCOL,1:Model%levs,1,2) = aerosolssw2(1:NCOL,1:Model%levs,sw_gas_props%get_nband(),2) - aerosolssw(1:NCOL,1:Model%levs,1,3) = aerosolssw2(1:NCOL,1:Model%levs,sw_gas_props%get_nband(),3) - aerosolssw(1:NCOL,1:Model%levs,2:sw_gas_props%get_nband(),1) = aerosolssw2(1:NCOL,1:Model%levs,1:sw_gas_props%get_nband()-1,1) - aerosolssw(1:NCOL,1:Model%levs,2:sw_gas_props%get_nband(),2) = aerosolssw2(1:NCOL,1:Model%levs,1:sw_gas_props%get_nband()-1,2) - aerosolssw(1:NCOL,1:Model%levs,2:sw_gas_props%get_nband(),3) = aerosolssw2(1:NCOL,1:Model%levs,1:sw_gas_props%get_nband()-1,3) - ! Setup surface ground temperature and ground/air skin temperature if required. + ! ####################################################################################### tsfg(1:NCOL) = Sfcprop%tsfc(1:NCOL) tsfa(1:NCOL) = Sfcprop%tsfc(1:NCOL) @@ -316,73 +327,7 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, cld_rwp = clouds(:,:,6) cld_rerain = clouds(:,:,7) cld_swp = clouds(:,:,8) - cld_resnow = clouds(:,:,9) - print*,clouds(:,:,5) - - ! ####################################################################################### - ! mg, sfc-perts - ! --- scale random patterns for surface perturbations with perturbation size - ! --- turn vegetation fraction pattern into percentile pattern - ! ####################################################################################### - alb1d(:) = 0. - if (Model%do_sfcperts) then - if (Model%pertalb(1) > 0.) then - do i=1,ncol - call cdfnor(Coupling%sfc_wts(i,5),alb1d(i)) - enddo - endif - endif - - ! ####################################################################################### - ! Call module_radiation_surface::setemis(),to setup surface emissivity for LW radiation. - ! ####################################################################################### - if (Model%lslwr) then - call setemis (Grid%xlon, Grid%xlat, Sfcprop%slmsk, Sfcprop%snowd, Sfcprop%sncovr, & - Sfcprop%zorl, tsfg, tsfa, Sfcprop%hprim, NCOL, Radtend%semis) - do iBand=1,lw_gas_props%get_nband() - Radtend%sfc_emiss_byband(iBand,1:NCOL) = Radtend%semis(1:NCOL) - enddo - endif - - ! ####################################################################################### - ! For SW, gather daylit points, compute surface albedo in each band, - ! ####################################################################################### - if (Model%lsswr) then - ! Check for daytime points for SW radiation. - nday = 0 - idxday = 0 - do i = 1, NCOL - if (Radtend%coszen(i) >= 0.0001) then - nday = nday + 1 - idxday(nday) = i - endif - enddo - - ! Call module_radiation_surface::setalb() to setup surface albedo. - call setalb (Sfcprop%slmsk, Sfcprop%snowd, Sfcprop%sncovr,& ! --- inputs: - Sfcprop%snoalb, Sfcprop%zorl, Radtend%coszen,& - tsfg, tsfa, Sfcprop%hprim, Sfcprop%alvsf, & - Sfcprop%alnsf, Sfcprop%alvwf, Sfcprop%alnwf, & - Sfcprop%facsf, Sfcprop%facwf, Sfcprop%fice, & - Sfcprop%tisfc, NCOL, & - alb1d, Model%pertalb, & ! mg, sfc-perts - sfcalb) ! --- outputs - - ! Approximate mean surface albedo from vis- and nir- diffuse values. - Radtend%sfalb(:) = max(0.01, 0.5 * (sfcalb(:,2) + sfcalb(:,4))) - else - nday = 0 - idxday = 0 - sfcalb = 0.0 - endif - - ! Spread across all SW bands - do iBand=1,sw_gas_props%get_nband() - Radtend%sfc_alb_nir_dir(iBand,1:NCOL) = sfcalb(1:NCOL,1) - Radtend%sfc_alb_nir_dif(iBand,1:NCOL) = sfcalb(1:NCOL,2) - Radtend%sfc_alb_uvvis_dir(iBand,1:NCOL) = sfcalb(1:NCOL,3) - Radtend%sfc_alb_uvvis_dif(iBand,1:NCOL) = sfcalb(1:NCOL,4) - enddo + cld_resnow = clouds(:,:,9) end subroutine GFS_rrtmgp_pre_run diff --git a/physics/GFS_rrtmgp_pre.meta b/physics/GFS_rrtmgp_pre.meta index f0e21928e..1379ea1aa 100644 --- a/physics/GFS_rrtmgp_pre.meta +++ b/physics/GFS_rrtmgp_pre.meta @@ -1,3 +1,41 @@ +[ccpp-arg-table] + name = GFS_rrtmgp_pre_init + type = scheme +[Model] + standard_name = GFS_control_type_instance + long_name = instance of derived type GFS_control_type + units = DDT + dimensions = () + type = GFS_control_type + intent = in + optional = F +[Radtend] + standard_name = GFS_radtend_type_instance + long_name = instance of derived type GFS_radtend_type + units = DDT + dimensions = () + type = GFS_radtend_type + intent = inout + optional = F +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out + optional = F +[errflg] + standard_name = ccpp_error_flag + long_name = error flag for error handling in CCPP + units = flag + dimensions = () + type = integer + intent = out + optional = F + +######################################################################## [ccpp-arg-table] name = GFS_rrtmgp_pre_run type = scheme @@ -144,6 +182,33 @@ kind = kind_phys intent = out optional = F +[tv_lay] + standard_name = virtual_temperature + long_name = layer virtual temperature + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[relhum] + standard_name = relative_humidity + long_name = layer relative humidity + units = frac + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[tracer] + standard_name = chemical_tracers + long_name = chemical tracers + units = g g-1 + dimensions = (horizontal_dimension,vertical_dimension,number_of_tracers) + type = real + kind = kind_phys + intent = out + optional = F [cld_frac] standard_name = total_cloud_fraction long_name = layer total cloud fraction @@ -225,23 +290,6 @@ kind = kind_phys intent = out optional = F -[aerosolslw] - standard_name = RRTMGP_aerosol_optical_properties_for_longwave_bands_01_16 - long_name = aerosol optical properties for longwave bands 01-16 - units = various - dimensions = (horizontal_dimension,vertical_dimension, number_of_lw_bands_rrtmgp,number_of_aerosol_output_fields_for_longwave_radiation) - type = real - kind = kind_phys - intent = out - optional = F -[aerosolssw] - standard_name = RRTMGP_aerosol_optical_properties_for_shortwave_bands_01_16 - long_name = aerosol optical properties for shortwave bands 01-16 - units = various - dimensions = (horizontal_dimension,vertical_dimension, number_of_sw_bands_rrtmgp, number_of_aerosol_output_fields_for_shortwave_radiation) - type = real - intent = out - kind = kind_phys [mtopa] standard_name = model_layer_number_at_cloud_top long_name = vertical indices for low, middle and high cloud tops @@ -276,24 +324,6 @@ kind = kind_phys intent = out optional = F -[aerodp] - standard_name = atmosphere_optical_thickness_due_to_ambient_aerosol_particles - long_name = vertical integrated optical depth for various aerosol species - units = none - dimensions = (horizontal_dimension,number_of_species_for_aerosol_optical_depth) - type = real - kind = kind_phys - intent = out - optional = F -[alb1d] - standard_name = surface_albedo_perturbation - long_name = surface albedo perturbation - units = frac - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = out - optional = F [gas_concentrations] standard_name = Gas_concentrations_for_RRTMGP_suite long_name = DDT containing gas concentrations for RRTMGP radiation scheme @@ -302,22 +332,6 @@ type = ty_gas_concs intent = out optional = F -[nday] - standard_name = daytime_points_dimension - long_name = daytime points dimension - units = count - dimensions = () - type = integer - intent = out - optional = F -[idxday] - standard_name = daytime_points - long_name = daytime points - units = index - dimensions = (horizontal_dimension) - type = integer - intent = out - optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP diff --git a/physics/GFS_rrtmgp_setup.F90 b/physics/GFS_rrtmgp_setup.F90 index bf9bfa04d..01a4420d0 100644 --- a/physics/GFS_rrtmgp_setup.F90 +++ b/physics/GFS_rrtmgp_setup.F90 @@ -2,14 +2,14 @@ !! This file contains module GFS_rrtmgp_setup - use physparam, only : isolar , ictmflg, ico2flg, ioznflg, iaerflg,& - & iaermdl, icldflg, & - & iovrsw , iovrlw , lcrick , lcnorm , lnoprec, & - & ialbflg, iemsflg, isubcsw, isubclw, ivflip , ipsd0, & - & iswcliq, & - & kind_phys - - + use physparam, only : & + isolar, ictmflg, ico2flg, ioznflg, iaerflg, iaermdl, icldflg, & + iovrsw, iovrlw, lcrick, lcnorm, lnoprec, ialbflg, iemsflg, & + isubcsw, isubclw, ivflip , ipsd0, iswcliq + use machine, only: & + kind_phys ! Working type + use GFS_typedefs, only: & + GFS_control_type ! Model control parameters implicit none public GFS_rrtmgp_setup_init, GFS_rrtmgp_setup_run, GFS_rrtmgp_setup_finalize @@ -18,12 +18,11 @@ module GFS_rrtmgp_setup logical :: is_initialized = .false. - ! --- version tag and last revision date + ! Version tag and last revision date character(40), parameter :: & - & VTAGRAD='NCEP-RRTMGP_driver v1.0 Sep 2019 ' - ! & VTAGRAD='NCEP-Radiation_driver v5.1 Nov 2012 ' - ! & VTAGRAD='NCEP-Radiation_driver v5.0 Aug 2012 ' + VTAGRAD='NCEP-RRTMGP_driver v1.0 Sep 2019 ' + ! Defaults !> new data input control variables (set/reset in subroutines radinit/radupdate): integer :: month0 = 0 integer :: iyear0 = 0 @@ -40,290 +39,167 @@ module GFS_rrtmgp_setup !! \section arg_table_GFS_rrtmgp_setup_init !! \htmlinclude GFS_rrtmgp_setup.html !! - subroutine GFS_rrtmgp_setup_init ( & - si, levr, ictm, isol, ico2, iaer, ialb, iems, ntcw, & - num_p3d, ntoz, iovr_sw, iovr_lw, isubc_sw, isubc_lw, & - icliq_sw, crick_proof, ccnorm, & - imp_physics, & - norad_precip, idate, iflip, & - me, errmsg, errflg) -! ================= subprogram documentation block ================ ! -! ! -! subprogram: GFS_rrtmgp_setup_init - a subprogram to initialize radiation ! -! ! -! usage: call GFS_rrtmgp_setup_init ! -! ! -! attributes: ! -! language: fortran 90 ! -! ! -! program history: ! -! mar 2012 - yu-tai hou create the program to initialize fixed ! -! control variables for radiaion processes. this ! -! subroutine is called at the start of model run. ! -! nov 2012 - yu-tai hou modified control parameter through ! -! module 'physparam'. ! -! mar 2014 - sarah lu iaermdl is determined from iaer ! -! jul 2014 - s moorthi add npdf3d for pdf clouds ! -! ! -! ==================== defination of variables ==================== ! -! ! -! input parameters: ! -! si : model vertical sigma interface or equivalence ! -! levr : number of model vertical layers ! -! ictm :=yyyy#, external data time/date control flag ! -! = -2: same as 0, but superimpose seasonal cycle ! -! from climatology data set. ! -! = -1: use user provided external data for the ! -! forecast time, no extrapolation. ! -! = 0: use data at initial cond time, if not ! -! available, use latest, no extrapolation. ! -! = 1: use data at the forecast time, if not ! -! available, use latest and extrapolation. ! -! =yyyy0: use yyyy data for the forecast time, ! -! no further data extrapolation. ! -! =yyyy1: use yyyy data for the fcst. if needed, do ! -! extrapolation to match the fcst time. ! -! isol := 0: use the old fixed solar constant in "physcon"! -! =10: use the new fixed solar constant in "physcon"! -! = 1: use noaa ann-mean tsi tbl abs-scale data tabl! -! = 2: use noaa ann-mean tsi tbl tim-scale data tabl! -! = 3: use cmip5 ann-mean tsi tbl tim-scale data tbl! -! = 4: use cmip5 mon-mean tsi tbl tim-scale data tbl! -! ico2 :=0: use prescribed global mean co2 (old oper) ! -! =1: use observed co2 annual mean value only ! -! =2: use obs co2 monthly data with 2-d variation ! -! iaer : 4-digit aerosol flag (dabc for aermdl,volc,lw,sw)! -! d: =0 or none, opac-climatology aerosol scheme ! -! =1 use gocart climatology aerosol scheme ! -! =2 use gocart progostic aerosol scheme ! -! a: =0 use background stratospheric aerosol ! -! =1 incl stratospheric vocanic aeros ! -! b: =0 no topospheric aerosol in lw radiation ! -! =1 include tropspheric aerosols for lw ! -! c: =0 no topospheric aerosol in sw radiation ! -! =1 include tropspheric aerosols for sw ! -! ialb : control flag for surface albedo schemes ! -! =0: climatology, based on surface veg types ! -! =1: modis retrieval based surface albedo scheme ! -! iems : ab 2-digit control flag ! -! a: =0 set sfc air/ground t same for lw radiation ! -! =1 set sfc air/ground t diff for lw radiation ! -! b: =0 use fixed sfc emissivity=1.0 (black-body) ! -! =1 use varying climtology sfc emiss (veg based)! -! =2 future development (not yet) ! -! ntcw :=0 no cloud condensate calculated ! -! >0 array index location for cloud condensate ! -! num_p3d :=3: ferrier's microphysics cloud scheme ! -! =4: zhao/carr/sundqvist microphysics cloud ! -! npdf3d =0 no pdf clouds ! -! =3 (when num_p3d=4) pdf clouds with zhao/carr/ ! -! sundqvist scheme ! -! ntoz : ozone data control flag ! -! =0: use climatological ozone profile ! -! >0: use interactive ozone profile ! -! icliq_sw : sw optical property for liquid clouds ! -! =0:input cld opt depth, ignoring iswcice setting ! -! =1:cloud optical property scheme based on Hu and ! -! Stamnes(1993) \cite hu_and_stamnes_1993 method ! -! =2:cloud optical property scheme based on Hu and ! -! Stamnes(1993) -updated ! -! iovr_sw/iovr_lw : control flag for cloud overlap (sw/lw rad) ! -! =0: random overlapping clouds ! -! =1: max/ran overlapping clouds ! -! =2: maximum overlap clouds (mcica only) ! -! =3: decorrelation-length overlap (mcica only) ! -! isubc_sw/isubc_lw: sub-column cloud approx control flag (sw/lw rad) ! -! =0: with out sub-column cloud approximation ! -! =1: mcica sub-col approx. prescribed random seed ! -! =2: mcica sub-col approx. provided random seed ! -! crick_proof : control flag for eliminating CRICK ! -! ccnorm : control flag for in-cloud condensate mixing ratio! -! norad_precip : control flag for not using precip in radiation ! -! idate(4) : ncep absolute date and time of initial condition ! -! (hour, month, day, year) ! -! iflip : control flag for direction of vertical index ! -! =0: index from toa to surface ! -! =1: index from surface to toa ! -! me : print control flag ! -! ! -! subroutines called: radinit ! -! ! -! =================================================================== ! -! - use module_radsw_parameters, only: NBDSW - use module_radlw_parameters, only: NBDLW - use module_radiation_aerosols,only: NF_AELW, NF_AESW, NSPC1 - use module_radiation_clouds, only: NF_CLDS - use module_radiation_gases, only: NF_VGAS - use module_radiation_surface, only: NF_ALBD - - implicit none - - ! interface variables - real (kind=kind_phys), intent(in) :: si(levr+1) - integer, intent(in) :: levr - integer, intent(in) :: ictm - integer, intent(in) :: isol - integer, intent(in) :: ico2 - integer, intent(in) :: iaer - integer, intent(in) :: ialb - integer, intent(in) :: iems - integer, intent(in) :: ntcw - integer, intent(in) :: num_p3d - integer, intent(in) :: ntoz - integer, intent(in) :: iovr_sw - integer, intent(in) :: iovr_lw - integer, intent(in) :: isubc_sw - integer, intent(in) :: isubc_lw - integer, intent(in) :: icliq_sw - logical, intent(in) :: crick_proof - logical, intent(in) :: ccnorm - integer, intent(in) :: imp_physics - logical, intent(in) :: norad_precip - integer, intent(in) :: idate(4) - integer, intent(in) :: iflip - integer, intent(in) :: me - character(len=*), intent(out) :: errmsg - integer, intent(out) :: errflg - - - ! Initialize the CCPP error handling variables - errmsg = '' - errflg = 0 - if (is_initialized) return - - - ! Set radiation parameters - isolar = isol ! solar constant control flag - ictmflg = ictm ! data ic time/date control flag - ico2flg = ico2 ! co2 data source control flag - ioznflg = ntoz ! ozone data source control flag - iswcliq = icliq_sw ! optical property for liquid clouds for sw - iovrsw = iovr_sw ! cloud overlapping control flag for sw - iovrlw = iovr_lw ! cloud overlapping control flag for lw - lcrick = crick_proof ! control flag for eliminating CRICK - lcnorm = ccnorm ! control flag for in-cld condensate - lnoprec = norad_precip ! precip effect on radiation flag (ferrier microphysics) - isubcsw = isubc_sw ! sub-column cloud approx flag in sw radiation - isubclw = isubc_lw ! sub-column cloud approx flag in lw radiation - ialbflg = ialb ! surface albedo control flag - iemsflg = iems ! surface emissivity control flag - ivflip = iflip ! vertical index direction control flag - - if ( ictm==0 .or. ictm==-2 ) then - iaerflg = mod(iaer, 100) ! no volcanic aerosols for clim hindcast - else - iaerflg = mod(iaer, 1000) - endif - iaermdl = iaer/1000 ! control flag for aerosol scheme selection - if ( iaermdl < 0 .or. (iaermdl>2 .and. iaermdl/=5) ) then - print *, ' Error -- IAER flag is incorrect, Abort' - stop 7777 - endif - - !if ( ntcw > 0 ) then - icldflg = 1 ! prognostic cloud optical prop scheme - !else - ! icldflg = 0 ! no support for diag cloud opt prop scheme - !endif - - ! Set initial permutation seed for mcica cloud-radiation - if ( isubc_sw>0 .or. isubc_lw>0 ) then - ipsd0 = 17*idate(1)+43*idate(2)+37*idate(3)+23*idate(4) - endif - - if ( me == 0 ) then - print *,' In rad_initialize (GFS_rrtmgp_setup_init), before calling radinit' - print *,' si =',si - print *,' levr=',levr,' ictm=',ictm,' isol=',isol,' ico2=',ico2,& - ' iaer=',iaer,' ialb=',ialb,' iems=',iems,' ntcw=',ntcw - print *,' np3d=',num_p3d,' ntoz=',ntoz,' iovr_sw=',iovr_sw, & - ' iovr_lw=',iovr_lw,' isubc_sw=',isubc_sw, & - ' isubc_lw=',isubc_lw,' icliq_sw=',icliq_sw, & - ' iflip=',iflip,' me=',me - print *,' crick_proof=',crick_proof, & - ' ccnorm=',ccnorm,' norad_precip=',norad_precip - endif - - call radinit( si, levr, imp_physics, me ) - - if ( me == 0 ) then - print *,' Radiation sub-cloud initial seed =',ipsd0, & - ' IC-idate =',idate - print *,' return from rad_initialize (GFS_rrtmgp_setup_init) - after calling radinit' - endif - - is_initialized = .true. - return - end subroutine GFS_rrtmgp_setup_init + subroutine GFS_rrtmgp_setup_init (Model, si, levr, ictm, isol, ico2, & + iaer, ialb, iems, ntcw, num_p3d, ntoz, iovr_sw, iovr_lw, & + isubc_sw, isubc_lw, icliq_sw, crick_proof, ccnorm, imp_physics, & + norad_precip, idate, iflip, me, & + errmsg, errflg) + implicit none + + ! Inputs + type(GFS_control_type), intent(in) :: & + Model ! DDT containing model control parameters + real(kind_phys), dimension(levr+1, intent(in) :: & + si + integer, intent(in) :: levr, ictm, isol, ico2, iaer, ialb, iems, & + ntcw, num_p3d, ntoz, iovr_sw, iovr_lw, isubc_sw, isubc_lw, & + icliq_sw, imp_physics, iflip, me + logical, intent(in) :: & + crick_proof, ccnorm, norad_precip + integer, intent(in), dimension(4) :: & + idate + ! Outputs + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + + ! Initialize the CCPP error handling variables + errmsg = '' + errflg = 0 + if (is_initialized) return + + ! Set radiation parameters + isolar = isol ! solar constant control flag + ictmflg = ictm ! data ic time/date control flag + ico2flg = ico2 ! co2 data source control flag + ioznflg = ntoz ! ozone data source control flag + iswcliq = icliq_sw ! optical property for liquid clouds for sw + iovrsw = iovr_sw ! cloud overlapping control flag for sw + iovrlw = iovr_lw ! cloud overlapping control flag for lw + lcrick = crick_proof ! control flag for eliminating CRICK + lcnorm = ccnorm ! control flag for in-cld condensate + lnoprec = norad_precip ! precip effect on radiation flag (ferrier microphysics) + isubcsw = isubc_sw ! sub-column cloud approx flag in sw radiation + isubclw = isubc_lw ! sub-column cloud approx flag in lw radiation + ialbflg = ialb ! surface albedo control flag + iemsflg = iems ! surface emissivity control flag + ivflip = iflip ! vertical index direction control flag + + if ( ictm==0 .or. ictm==-2 ) then + iaerflg = mod(iaer, 100) ! no volcanic aerosols for clim hindcast + else + iaerflg = mod(iaer, 1000) + endif + iaermdl = iaer/1000 ! control flag for aerosol scheme selection + if ( iaermdl < 0 .or. (iaermdl>2 .and. iaermdl/=5) ) then + print *, ' Error -- IAER flag is incorrect, Abort' + stop 7777 + endif + + !if ( ntcw > 0 ) then + icldflg = 1 ! prognostic cloud optical prop scheme + !else + ! icldflg = 0 ! no support for diag cloud opt prop scheme + !endif + + ! Set initial permutation seed for mcica cloud-radiation + if ( isubc_sw>0 .or. isubc_lw>0 ) then + ipsd0 = 17*idate(1)+43*idate(2)+37*idate(3)+23*idate(4) + endif + + if ( me == 0 ) then + print *,' In rad_initialize (GFS_rrtmgp_setup_init), before calling radinit' + print *,' si =',si + print *,' levr=',levr,' ictm=',ictm,' isol=',isol,' ico2=',ico2,& + ' iaer=',iaer,' ialb=',ialb,' iems=',iems,' ntcw=',ntcw + print *,' np3d=',num_p3d,' ntoz=',ntoz,' iovr_sw=',iovr_sw, & + ' iovr_lw=',iovr_lw,' isubc_sw=',isubc_sw, & + ' isubc_lw=',isubc_lw,' icliq_sw=',icliq_sw, & + ' iflip=',iflip,' me=',me + print *,' crick_proof=',crick_proof, & + ' ccnorm=',ccnorm,' norad_precip=',norad_precip + endif + + ! Hack for using RRTMGP-Sw and RRTMG-LW + if (.not. Model%do_GPsw_Glw) then + call radinit( si, levr, imp_physics, me ) + endif + + if ( me == 0 ) then + print *,' Radiation sub-cloud initial seed =',ipsd0, & + ' IC-idate =',idate + print *,' return from rad_initialize (GFS_rrtmgp_setup_init) - after calling radinit' + endif + + is_initialized = .true. + return + end subroutine GFS_rrtmgp_setup_init !> \section arg_table_GFS_rrtmgp_setup_run !! \htmlinclude GFS_rrtmgp_setup.html !! - subroutine GFS_rrtmgp_setup_run ( & - idate, jdate, deltsw, deltim, lsswr, me, & - slag, sdec, cdec, solcon, errmsg, errflg) - - implicit none - - ! interface variables - integer, intent(in) :: idate(:) - integer, intent(in) :: jdate(:) - real(kind=kind_phys), intent(in) :: deltsw - real(kind=kind_phys), intent(in) :: deltim - logical, intent(in) :: lsswr - integer, intent(in) :: me - real(kind=kind_phys), intent(out) :: slag - real(kind=kind_phys), intent(out) :: sdec - real(kind=kind_phys), intent(out) :: cdec - real(kind=kind_phys), intent(out) :: solcon - character(len=*), intent(out) :: errmsg - integer, intent(out) :: errflg - - ! Check initialization state - if (.not.is_initialized) then - write(errmsg, fmt='((a))') 'GFS_rrtmgp_setup_run called before GFS_rrtmgp_setup_init' - errflg = 1 - return - end if - - ! Initialize the CCPP error handling variables - errmsg = '' - errflg = 0 - - call radupdate(idate,jdate,deltsw,deltim,lsswr,me, & - slag,sdec,cdec,solcon) - + subroutine GFS_rrtmgp_setup_run (idate, jdate, deltsw, deltim, lsswr, me, & + slag, sdec, cdec, solcon, errmsg, errflg) + + implicit none + + ! interface variables + integer, intent(in) :: idate(:) + integer, intent(in) :: jdate(:) + real(kind=kind_phys), intent(in) :: deltsw + real(kind=kind_phys), intent(in) :: deltim + logical, intent(in) :: lsswr + integer, intent(in) :: me + real(kind=kind_phys), intent(out) :: slag + real(kind=kind_phys), intent(out) :: sdec + real(kind=kind_phys), intent(out) :: cdec + real(kind=kind_phys), intent(out) :: solcon + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + + ! Check initialization state + if (.not.is_initialized) then + write(errmsg, fmt='((a))') 'GFS_rrtmgp_setup_run called before GFS_rrtmgp_setup_init' + errflg = 1 + return + end if + + ! Initialize the CCPP error handling variables + errmsg = '' + errflg = 0 + + call radupdate(idate,jdate,deltsw,deltim,lsswr,me, & + slag,sdec,cdec,solcon) + end subroutine GFS_rrtmgp_setup_run - -!> \section arg_table_GFS_rrtmgp_setup_finalize -!! \htmlinclude GFS_rrtmgp_setup.html -!! + + !> \section arg_table_GFS_rrtmgp_setup_finalize + !! \htmlinclude GFS_rrtmgp_setup.html + !! subroutine GFS_rrtmgp_setup_finalize (errmsg, errflg) - - implicit none - - character(len=*), intent( out) :: errmsg - integer, intent( out) :: errflg - - ! Initialize the CCPP error handling variables - errmsg = '' - errflg = 0 - - if (.not.is_initialized) return - - ! do finalization stuff if needed - - is_initialized = .false. - + + implicit none + + character(len=*), intent( out) :: errmsg + integer, intent( out) :: errflg + + ! Initialize the CCPP error handling variables + errmsg = '' + errflg = 0 + + if (.not.is_initialized) return + + ! do finalization stuff if needed + + is_initialized = .false. + end subroutine GFS_rrtmgp_setup_finalize - - -! Private functions - - + + + ! Private functions + + subroutine radinit( si, NLAY, imp_physics, me ) -!................................... + !................................... ! --- inputs: ! & ( si, NLAY, imp_physics, me ) diff --git a/physics/GFS_rrtmgp_setup.meta b/physics/GFS_rrtmgp_setup.meta index b14f3aa68..e40ad865a 100644 --- a/physics/GFS_rrtmgp_setup.meta +++ b/physics/GFS_rrtmgp_setup.meta @@ -1,6 +1,14 @@ [ccpp-arg-table] name = GFS_rrtmgp_setup_init type = scheme +[Model] + standard_name = GFS_control_type_instance + long_name = instance of derived type GFS_control_type + units = DDT + dimensions = () + type = GFS_control_type + intent = in + optional = F [si] standard_name = vertical_sigma_coordinate_for_radiation_initialization long_name = vertical sigma coordinate for radiation initialization diff --git a/physics/GFS_rrtmgp_sw_post.F90 b/physics/GFS_rrtmgp_sw_post.F90 index 9c9e7c16c..1dbfe6843 100644 --- a/physics/GFS_rrtmgp_sw_post.F90 +++ b/physics/GFS_rrtmgp_sw_post.F90 @@ -6,7 +6,8 @@ module GFS_rrtmgp_sw_post GFS_control_type, & GFS_grid_type, & GFS_radtend_type, & - GFS_diag_type + GFS_diag_type, & + GFS_statein_type use module_radiation_aerosols, only: NSPC1 use module_radsw_parameters, only: topfsw_type, sfcfsw_type, profsw_type, cmpfsw_type ! RRTMGP DDT's @@ -26,10 +27,10 @@ end subroutine GFS_rrtmgp_sw_post_init !> \section arg_table_GFS_rrtmgp_sw_post_run !! \htmlinclude GFS_rrtmgp_sw_post.html !! - subroutine GFS_rrtmgp_sw_post_run (Model, Grid, Diag, Radtend, Coupling, & - scmpsw, im, p_lev, sw_gas_props, nday, idxday, fluxswUP_allsky, fluxswDOWN_allsky, & - fluxswUP_clrsky, fluxswDOWN_clrsky, hswc, topflx_sw, sfcflx_sw, flxprf_sw, hsw0, & - errmsg, errflg) + subroutine GFS_rrtmgp_sw_post_run (Model, Grid, Diag, Radtend, Coupling, Statein, & + scmpsw, im, p_lev, sw_gas_props, nday, idxday, fluxswUP_allsky, fluxswDOWN_allsky,& + fluxswUP_clrsky, fluxswDOWN_clrsky, raddt, aerodp, cldsa, mbota, mtopa, cld_frac, & + cldtausw, hswc, topflx_sw, sfcflx_sw, flxprf_sw, hsw0, errmsg, errflg) ! Inputs type(GFS_control_type), intent(in) :: & @@ -42,6 +43,8 @@ subroutine GFS_rrtmgp_sw_post_run (Model, Grid, Diag, Radtend, Coupling, & Radtend ! Fortran DDT containing FV3-GFS radiation tendencies type(GFS_diag_type), intent(inout) :: & Diag ! Fortran DDT containing FV3-GFS diagnotics data + type(GFS_statein_type), intent(in) :: & + Statein ! Fortran DDT containing FV3-GFS prognostic state data in from dycore integer, intent(in) :: & im, & ! Horizontal loop extent nDay ! Number of daylit columns @@ -56,6 +59,18 @@ subroutine GFS_rrtmgp_sw_post_run (Model, Grid, Diag, Radtend, Coupling, & fluxswDOWN_allsky, & ! SW All-sky flux (W/m2) fluxswUP_clrsky, & ! SW Clear-sky flux (W/m2) fluxswDOWN_clrsky ! SW All-sky flux (W/m2) + real(kind_phys), intent(in) :: & + raddt ! Radiation time step + real(kind_phys), dimension(im,NSPC1), intent(in) :: & + aerodp ! Vertical integrated optical depth for various aerosol species + real(kind_phys), dimension(im,5), intent(in) :: & + cldsa ! Fraction of clouds for low, middle, high, total and BL + integer, dimension(im,3), intent(in) ::& + mbota, & ! vertical indices for low, middle and high cloud tops + mtopa ! vertical indices for low, middle and high cloud bases + real(kind_phys), dimension(im,Model%levs), intent(in) :: & + cld_frac, & ! Total cloud fraction in each layer + cldtausw ! approx .55mu band layer cloud optical depth ! Outputs (mandatory) character(len=*), intent(out) :: & @@ -93,7 +108,8 @@ subroutine GFS_rrtmgp_sw_post_run (Model, Grid, Diag, Radtend, Coupling, & ! visbm - downward uv+vis direct beam flux (W/m2) ! visdf - downward uv+vis diffused flux (W/m2) ! Local variables - integer :: i, k, iSFC, iTOA + integer :: i, j, k, iSFC, iTOA, itop, ibtc + real(kind_phys) :: tem0d, tem1, tem2 real(kind_phys), dimension(nDay, Model%levs) :: thetaTendClrSky, thetaTendAllSky logical :: l_clrskysw_hr, l_fluxessw2d, top_at_1, l_sfcFluxessw1D @@ -230,6 +246,81 @@ subroutine GFS_rrtmgp_sw_post_run (Model, Grid, Diag, Radtend, Coupling, & enddo endif ! end_if_lsswr + ! ####################################################################################### + ! Save SW diagnostics + ! - For time averaged output quantities (including total-sky and clear-sky SW and LW + ! fluxes at TOA and surface; conventional 3-domain cloud amount, cloud top and base + ! pressure, and cloud top temperature; aerosols AOD, etc.), store computed results in + ! corresponding slots of array fluxr with appropriate time weights. + ! - Collect the fluxr data for wrtsfc + ! ####################################################################################### + if (Model%lssav) then + if (Model%lsswr) then + do i=1,im + Diag%fluxr(i,34) = Diag%fluxr(i,34) + Model%fhswr*aerodp(i,1) ! total aod at 550nm + Diag%fluxr(i,35) = Diag%fluxr(i,35) + Model%fhswr*aerodp(i,2) ! DU aod at 550nm + Diag%fluxr(i,36) = Diag%fluxr(i,36) + Model%fhswr*aerodp(i,3) ! BC aod at 550nm + Diag%fluxr(i,37) = Diag%fluxr(i,37) + Model%fhswr*aerodp(i,4) ! OC aod at 550nm + Diag%fluxr(i,38) = Diag%fluxr(i,38) + Model%fhswr*aerodp(i,5) ! SU aod at 550nm + Diag%fluxr(i,39) = Diag%fluxr(i,39) + Model%fhswr*aerodp(i,6) ! SS aod at 550nm + if (Radtend%coszen(i) > 0.) then + ! SW all-sky fluxes + tem0d = Model%fhswr * Radtend%coszdg(i) / Radtend%coszen(i) + Diag%fluxr(i,2 ) = Diag%fluxr(i,2) + Diag%topfsw(i)%upfxc * tem0d ! total sky top sw up + Diag%fluxr(i,3 ) = Diag%fluxr(i,3) + Radtend%sfcfsw(i)%upfxc * tem0d ! total sky sfc sw up + Diag%fluxr(i,4 ) = Diag%fluxr(i,4) + Radtend%sfcfsw(i)%dnfxc * tem0d ! total sky sfc sw dn + ! SW uv-b fluxes + Diag%fluxr(i,21) = Diag%fluxr(i,21) + scmpsw(i)%uvbfc * tem0d ! total sky uv-b sw dn + Diag%fluxr(i,22) = Diag%fluxr(i,22) + scmpsw(i)%uvbf0 * tem0d ! clear sky uv-b sw dn + ! SW TOA incoming fluxes + Diag%fluxr(i,23) = Diag%fluxr(i,23) + Diag%topfsw(i)%dnfxc * tem0d ! top sw dn + ! SW SFC flux components + Diag%fluxr(i,24) = Diag%fluxr(i,24) + scmpsw(i)%visbm * tem0d ! uv/vis beam sw dn + Diag%fluxr(i,25) = Diag%fluxr(i,25) + scmpsw(i)%visdf * tem0d ! uv/vis diff sw dn + Diag%fluxr(i,26) = Diag%fluxr(i,26) + scmpsw(i)%nirbm * tem0d ! nir beam sw dn + Diag%fluxr(i,27) = Diag%fluxr(i,27) + scmpsw(i)%nirdf * tem0d ! nir diff sw dn + ! SW clear-sky fluxes + Diag%fluxr(i,29) = Diag%fluxr(i,29) + Diag%topfsw(i)%upfx0 * tem0d ! clear sky top sw up + Diag%fluxr(i,31) = Diag%fluxr(i,31) + Radtend%sfcfsw(i)%upfx0 * tem0d ! clear sky sfc sw up + Diag%fluxr(i,32) = Diag%fluxr(i,32) + Radtend%sfcfsw(i)%dnfx0 * tem0d ! clear sky sfc sw dn + endif + enddo + + ! Save total and boundary-layer clouds + do i=1,im + Diag%fluxr(i,17) = Diag%fluxr(i,17) + raddt * cldsa(i,4) + Diag%fluxr(i,18) = Diag%fluxr(i,18) + raddt * cldsa(i,5) + enddo + + ! Save cld frac,toplyr,botlyr and top temp, note that the order of h,m,l cloud + ! is reversed for the fluxr output. save interface pressure (pa) of top/bot + do j = 1, 3 + do i = 1, im + tem0d = raddt * cldsa(i,j) + itop = mtopa(i,j) + ibtc = mbota(i,j) + Diag%fluxr(i, 8-j) = Diag%fluxr(i, 8-j) + tem0d + Diag%fluxr(i,11-j) = Diag%fluxr(i,11-j) + tem0d * Statein%prsi(i,itop) + Diag%fluxr(i,14-j) = Diag%fluxr(i,14-j) + tem0d * Statein%prsi(i,ibtc) + Diag%fluxr(i,17-j) = Diag%fluxr(i,17-j) + tem0d * Statein%tgrs(i,itop) + + ! Add optical depth and emissivity output + tem1 = 0. + do k=ibtc,itop + tem1 = tem1 + cldtausw(i,k) ! approx .55 mu channel + enddo + Diag%fluxr(i,43-j) = Diag%fluxr(i,43-j) + tem0d * tem1 + enddo + enddo + endif + + if (Model%lgocart .or. Model%ldiag3d) then + do k = 1, Model%levs + Coupling%cldcovi(1:im,k) = cld_frac(1:im,k) + enddo + endif + endif + end subroutine GFS_rrtmgp_sw_post_run diff --git a/physics/GFS_rrtmgp_sw_post.meta b/physics/GFS_rrtmgp_sw_post.meta index 894af17f7..83f1deaad 100644 --- a/physics/GFS_rrtmgp_sw_post.meta +++ b/physics/GFS_rrtmgp_sw_post.meta @@ -41,6 +41,14 @@ type = GFS_coupling_type intent = inout optional = F +[Statein] + standard_name = GFS_statein_type_instance + long_name = instance of derived type GFS_statein_type + units = DDT + dimensions = () + type = GFS_statein_type + intent = in + optional = F [scmpsw] standard_name = components_of_surface_downward_shortwave_fluxes long_name = derived type for special components of surface downward shortwave fluxes @@ -118,6 +126,67 @@ kind = kind_phys intent = in optional = F +[raddt] + standard_name = time_step_for_radiation + long_name = radiation time step + units = s + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[aerodp] + standard_name = atmosphere_optical_thickness_due_to_ambient_aerosol_particles + long_name = vertical integrated optical depth for various aerosol species + units = none + dimensions = (horizontal_dimension,number_of_species_for_aerosol_optical_depth) + type = real + kind = kind_phys + intent = in + optional = F +[cldsa] + standard_name = cloud_area_fraction_for_radiation + long_name = fraction of clouds for low, middle, high, total and BL + units = frac + dimensions = (horizontal_dimension,5) + type = real + kind = kind_phys + intent = in + optional = F +[mtopa] + standard_name = model_layer_number_at_cloud_top + long_name = vertical indices for low, middle and high cloud tops + units = index + dimensions = (horizontal_dimension,3) + type = integer + intent = in + optional = F +[mbota] + standard_name = model_layer_number_at_cloud_base + long_name = vertical indices for low, middle and high cloud bases + units = index + dimensions = (horizontal_dimension,3) + type = integer + intent = in + optional = F +[cld_frac] + standard_name = total_cloud_fraction + long_name = layer total cloud fraction + units = frac + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[cldtausw] + standard_name = RRTMGP_cloud_optical_depth_layers_at_0_55mu_band + long_name = approx .55mu band layer cloud optical depth + units = none + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F [sw_gas_props] standard_name = coefficients_for_sw_gas_optics long_name = DDT containing spectral information for RRTMGP SW radiation scheme diff --git a/physics/GFS_rrtmgp_sw_pre.F90 b/physics/GFS_rrtmgp_sw_pre.F90 new file mode 100644 index 000000000..56dd38619 --- /dev/null +++ b/physics/GFS_rrtmgp_sw_pre.F90 @@ -0,0 +1,188 @@ +!> \file GFS_rrtmgp_sw_pre.f90 +!! This file contains +module GFS_rrtmgp_sw_pre + use physparam + use machine, only: & + kind_phys ! Working type + use GFS_typedefs, only: & + GFS_sfcprop_type, & ! Surface fields + GFS_control_type, & ! Model control parameters + GFS_grid_type, & ! Grid and interpolation related data + GFS_coupling_type, & ! + GFS_statein_type, & ! + GFS_radtend_type ! Radiation tendencies needed in physics + use module_radiation_astronomy,only: & + coszmn ! Function to compute cos(SZA) + use module_radiation_surface, only: & + NF_ALBD, & ! Number of surface albedo categories (4; nir-direct, nir-diffuse, uvvis-direct, uvvis-diffuse) + setalb ! Routine to compute surface albedo + ! DJS2019: This radiation_aerosols_module is a whole-lotta mess that needs some love. As it stands now, it's + ! entirely dependent on RRTMG legacy code. + use module_radiation_aerosols, only: & + NF_AESW, & ! Number of optical-fields in SW output (3=tau+g+omega) + NF_AELW, & ! Number of optical-fields in LW output (3=tau+g+omega) + setaer, & ! Routine to compute aerosol radiative properties (tau,g,omega) + NSPC1 ! Number of species for vertically integrated aerosol optical-depth + use surface_perturbation, only: & + cdfnor ! Routine to compute CDF (used to compute percentiles) + use mo_gas_optics_rrtmgp, only: & + ty_gas_optics_rrtmgp + public GFS_rrtmgp_sw_pre_run,GFS_rrtmgp_sw_pre_init,GFS_rrtmgp_sw_pre_finalize + +contains + + subroutine GFS_rrtmgp_sw_pre_init () + end subroutine GFS_rrtmgp_sw_pre_init + +!> \section arg_table_GFS_rrtmgp_sw_pre_run +!! \htmlinclude GFS_rrtmgp_sw_pre.html +!! + subroutine GFS_rrtmgp_sw_pre_run (Model, Grid, Sfcprop, Statein, ncol, p_lay, & + p_lev, tv_lay, relhum, tracer, sw_gas_props, nday, idxday, alb1d, RadTend, & + Coupling, aerosolssw, aerodp, errmsg, errflg) + + ! Inputs + type(GFS_control_type), intent(in) :: & + Model ! Fortran DDT containing FV3-GFS model control parameters + type(GFS_grid_type), intent(in) :: & + Grid ! Fortran DDT containing FV3-GFS grid and interpolation related data + type(GFS_sfcprop_type), intent(in) :: & + Sfcprop ! Fortran DDT containing FV3-GFS surface fields + type(GFS_statein_type), intent(in) :: & + Statein ! Fortran DDT containing FV3-GFS prognostic state data in from dycore + integer, intent(in) :: & + ncol ! Number of horizontal grid points + real(kind_phys), dimension(ncol,Model%levs),intent(in) :: & + p_lay, & ! Layer pressure + tv_lay, & ! Layer virtual-temperature + relhum ! Layer relative-humidity + real(kind_phys), dimension(ncol, Model%levs, 2:Model%ntrac),intent(in) :: & + tracer + real(kind_phys), dimension(ncol,Model%levs+1),intent(in) :: & + p_lev ! Interface (level) pressure + type(ty_gas_optics_rrtmgp),intent(in) :: & + sw_gas_props ! RRTMGP DDT containing spectral information for SW calculation + + ! Outputs + integer, intent(out) :: & + nday ! Number of daylit points + integer, dimension(ncol), intent(out) :: & + idxday ! Indices for daylit points + real(kind_phys), dimension(ncol), intent(out) :: & + alb1d ! Surface albedo pertubation + type(GFS_radtend_type), intent(inout) :: & + Radtend ! Fortran DDT containing FV3-GFS radiation tendencies + type(GFS_coupling_type), intent(inout) :: & + Coupling + real(kind_phys), dimension(ncol,Model%levs,sw_gas_props%get_nband(),NF_AESW), intent(out) ::& + aerosolssw ! Aerosol radiative properties in each SW band. + real(kind_phys), dimension(ncol,NSPC1), intent(inout) :: & + aerodp ! Vertical integrated optical depth for various aerosol species + character(len=*), intent(out) :: & + errmsg ! Error message + integer, intent(out) :: & + errflg ! Error flag + + ! Local variables + integer :: i, j, iCol, iBand, iSFC, iTOA, iLay + real(kind_phys), dimension(ncol, NF_ALBD) :: sfcalb + real(kind_phys), dimension(ncol, Model%levs, sw_gas_props%get_nband(), NF_AESW) :: & + aerosolssw2 + real(kind_phys), dimension(ncol, Model%levs, Model%rrtmgp_nBandsLW, NF_AELW) :: & + aerosolslw + logical :: top_at_1 + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + + if (.not. Model%lsswr) return + + ! ####################################################################################### + ! What is vertical ordering? + ! ####################################################################################### + top_at_1 = (Statein%prsi(1,1) .lt. Statein%prsi(1, Model%levs)) + if (top_at_1) then + iSFC = Model%levs + iTOA = 1 + else + iSFC = 1 + iTOA = Model%levs + endif + + ! ####################################################################################### + ! Compute cosine of zenith angle (only when SW is called) + ! ####################################################################################### + call coszmn (Grid%xlon, Grid%sinlat, Grid%coslat, Model%solhr, NCOL, Model%me, & + Radtend%coszen, Radtend%coszdg) + + ! ####################################################################################### + ! For SW, gather daylit points, compute surface albedo in each band, + ! ####################################################################################### + ! Check for daytime points for SW radiation. + nday = 0 + idxday = 0 + do i = 1, NCOL + if (Radtend%coszen(i) >= 0.0001) then + nday = nday + 1 + idxday(nday) = i + endif + enddo + + ! ####################################################################################### + ! mg, sfc-perts + ! --- scale random patterns for surface perturbations with perturbation size + ! --- turn vegetation fraction pattern into percentile pattern + ! ####################################################################################### + alb1d(:) = 0. + if (Model%do_sfcperts) then + if (Model%pertalb(1) > 0.) then + do i=1,ncol + call cdfnor(Coupling%sfc_wts(i,5),alb1d(i)) + enddo + endif + endif + + ! Call module_radiation_surface::setalb() to setup surface albedo. + call setalb (Sfcprop%slmsk, Sfcprop%snowd, Sfcprop%sncovr, Sfcprop%snoalb, Sfcprop%zorl, & + Radtend%coszen, Sfcprop%tsfc, Sfcprop%tsfc, Sfcprop%hprim, Sfcprop%alvsf, & + Sfcprop%alnsf, Sfcprop%alvwf, Sfcprop%alnwf, Sfcprop%facsf, Sfcprop%facwf, & + Sfcprop%fice, Sfcprop%tisfc, NCOL, alb1d, Model%pertalb, sfcalb) + + ! Approximate mean surface albedo from vis- and nir- diffuse values. + Radtend%sfalb(:) = max(0.01, 0.5 * (sfcalb(:,2) + sfcalb(:,4))) + + ! Spread across all SW bands + do iBand=1,sw_gas_props%get_nband() + Radtend%sfc_alb_nir_dir(iBand,1:NCOL) = sfcalb(1:NCOL,1) + Radtend%sfc_alb_nir_dif(iBand,1:NCOL) = sfcalb(1:NCOL,2) + Radtend%sfc_alb_uvvis_dir(iBand,1:NCOL) = sfcalb(1:NCOL,3) + Radtend%sfc_alb_uvvis_dif(iBand,1:NCOL) = sfcalb(1:NCOL,4) + enddo + + ! ####################################################################################### + ! Call module_radiation_aerosols::setaer(),to setup aerosols property profile + ! ####################################################################################### + call setaer(p_lev, p_lay, Statein%prslk(1:NCOL,iSFC:iTOA), tv_lay, relhum, & + Sfcprop%slmsk, tracer, Grid%xlon, Grid%xlat, NCOL, Model%levs, Model%levs+1, & + Model%lsswr, .false., aerosolssw2, aerosolslw, aerodp) + + ! Store aerosol optical properties + ! SW. + ! For RRTMGP SW the bands are now ordered from [IR(band) -> nIR -> UV], in RRTMG the + ! band ordering was [nIR -> UV -> IR(band)] + aerosolssw(1:NCOL,1:Model%levs,1,1) = aerosolssw2(1:NCOL,1:Model%levs,sw_gas_props%get_nband(),1) + aerosolssw(1:NCOL,1:Model%levs,1,2) = aerosolssw2(1:NCOL,1:Model%levs,sw_gas_props%get_nband(),2) + aerosolssw(1:NCOL,1:Model%levs,1,3) = aerosolssw2(1:NCOL,1:Model%levs,sw_gas_props%get_nband(),3) + aerosolssw(1:NCOL,1:Model%levs,2:sw_gas_props%get_nband(),1) = aerosolssw2(1:NCOL,1:Model%levs,1:sw_gas_props%get_nband()-1,1) + aerosolssw(1:NCOL,1:Model%levs,2:sw_gas_props%get_nband(),2) = aerosolssw2(1:NCOL,1:Model%levs,1:sw_gas_props%get_nband()-1,2) + aerosolssw(1:NCOL,1:Model%levs,2:sw_gas_props%get_nband(),3) = aerosolssw2(1:NCOL,1:Model%levs,1:sw_gas_props%get_nband()-1,3) + + end subroutine GFS_rrtmgp_sw_pre_run + +!> \section arg_table_GFS_rrtmgp_sw_pre_finalize Argument Table +!! + subroutine GFS_rrtmgp_sw_pre_finalize () + end subroutine GFS_rrtmgp_sw_pre_finalize + +end module GFS_rrtmgp_sw_pre diff --git a/physics/GFS_rrtmgp_post.meta b/physics/GFS_rrtmgp_sw_pre.meta similarity index 56% rename from physics/GFS_rrtmgp_post.meta rename to physics/GFS_rrtmgp_sw_pre.meta index 76411512d..05a76151b 100644 --- a/physics/GFS_rrtmgp_post.meta +++ b/physics/GFS_rrtmgp_sw_pre.meta @@ -1,10 +1,5 @@ [ccpp-arg-table] - name = GFS_rrtmgp_post_init - type = scheme - -######################################################################## -[ccpp-arg-table] - name = GFS_rrtmgp_post_run + name = GFS_rrtmgp_sw_pre_run type = scheme [Model] standard_name = GFS_control_type_instance @@ -22,21 +17,13 @@ type = GFS_grid_type intent = in optional = F -[Diag] - standard_name = GFS_diag_type_instance - long_name = instance of derived type GFS_diag_type - units = DDT - dimensions = () - type = GFS_diag_type - intent = inout - optional = F -[Radtend] - standard_name = GFS_radtend_type_instance - long_name = instance of derived type GFS_radtend_type +[Sfcprop] + standard_name = GFS_sfcprop_type_instance + long_name = instance of derived type GFS_sfcprop_type units = DDT dimensions = () - type = GFS_radtend_type - intent = inout + type = GFS_sfcprop_type + intent = in optional = F [Statein] standard_name = GFS_statein_type_instance @@ -46,22 +33,22 @@ type = GFS_statein_type intent = in optional = F +[Radtend] + standard_name = GFS_radtend_type_instance + long_name = instance of derived type GFS_radtend_type + units = DDT + dimensions = () + type = GFS_radtend_type + intent = inout + optional = F [Coupling] standard_name = GFS_coupling_type_instance - long_name = instance of derived type GFS_coupling_type + long_name = Fortran DDT containing FV3-GFS fields to/from coupling with other components units = DDT dimensions = () type = GFS_coupling_type intent = inout optional = F -[scmpsw] - standard_name = components_of_surface_downward_shortwave_fluxes - long_name = derived type for special components of surface downward shortwave fluxes - units = W m-2 - dimensions = (horizontal_dimension) - type = cmpfsw_type - intent = inout - optional = T [ncol] standard_name = horizontal_loop_extent long_name = horizontal loop extent @@ -70,75 +57,100 @@ type = integer intent = in optional = F -[raddt] - standard_name = time_step_for_radiation - long_name = radiation time step - units = s - dimensions = () +[tv_lay] + standard_name = virtual_temperature + long_name = layer virtual temperature + units = K + dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys intent = in optional = F -[aerodp] - standard_name = atmosphere_optical_thickness_due_to_ambient_aerosol_particles - long_name = vertical integrated optical depth for various aerosol species - units = none - dimensions = (horizontal_dimension,number_of_species_for_aerosol_optical_depth) +[relhum] + standard_name = relative_humidity + long_name = layer relative humidity + units = frac + dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys intent = in optional = F -[cldsa] - standard_name = cloud_area_fraction_for_radiation - long_name = fraction of clouds for low, middle, high, total and BL - units = frac - dimensions = (horizontal_dimension,5) +[p_lay] + standard_name = air_pressure_at_layer_for_RRTMGP_in_hPa + long_name = air pressure at vertical layer for radiation calculation + units = hPa + dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys intent = in optional = F -[mtopa] - standard_name = model_layer_number_at_cloud_top - long_name = vertical indices for low, middle and high cloud tops - units = index - dimensions = (horizontal_dimension,3) - type = integer +[p_lev] + standard_name = air_pressure_at_interface_for_RRTMGP_in_hPa + long_name = air pressure at vertical interface for radiation calculation + units = hPa + dimensions = (horizontal_dimension,vertical_dimension_plus_one) + type = real + kind = kind_phys intent = in optional = F -[mbota] - standard_name = model_layer_number_at_cloud_base - long_name = vertical indices for low, middle and high cloud bases - units = index - dimensions = (horizontal_dimension,3) - type = integer +[tracer] + standard_name = chemical_tracers + long_name = chemical tracers + units = g g-1 + dimensions = (horizontal_dimension,vertical_dimension,number_of_tracers) + type = real + kind = kind_phys + intent = in + optional = F +[sw_gas_props] + standard_name = coefficients_for_sw_gas_optics + long_name = DDT containing spectral information for RRTMGP SW radiation scheme + units = DDT + dimensions = () + type = ty_gas_optics_rrtmgp intent = in optional = F -[cld_frac] - standard_name = total_cloud_fraction - long_name = layer total cloud fraction +[alb1d] + standard_name = surface_albedo_perturbation + long_name = surface albedo perturbation units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_dimension) type = real kind = kind_phys - intent = in + intent = out optional = F -[cldtaulw] - standard_name = RRTMGP_cloud_optical_depth_layers_at_10mu_band - long_name = approx 10mu band layer cloud optical depth - units = none - dimensions = (horizontal_dimension,vertical_dimension) +[nday] + standard_name = daytime_points_dimension + long_name = daytime points dimension + units = count + dimensions = () + type = integer + intent = out + optional = F +[idxday] + standard_name = daytime_points + long_name = daytime points + units = index + dimensions = (horizontal_dimension) + type = integer + intent = out + optional = F +[aerosolssw] + standard_name = RRTMGP_aerosol_optical_properties_for_shortwave_bands_01_16 + long_name = aerosol optical properties for shortwave bands 01-16 + units = various + dimensions = (horizontal_dimension,vertical_dimension, number_of_sw_bands_rrtmgp, number_of_aerosol_output_fields_for_shortwave_radiation) type = real + intent = out kind = kind_phys - intent = in - optional = F -[cldtausw] - standard_name = RRTMGP_cloud_optical_depth_layers_at_0_55mu_band - long_name = approx .55mu band layer cloud optical depth +[aerodp] + standard_name = atmosphere_optical_thickness_due_to_ambient_aerosol_particles + long_name = vertical integrated optical depth for various aerosol species units = none - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_dimension,number_of_species_for_aerosol_optical_depth) type = real kind = kind_phys - intent = in + intent = inout optional = F [errmsg] standard_name = ccpp_error_message @@ -157,8 +169,7 @@ type = integer intent = out optional = F - ######################################################################## [ccpp-arg-table] - name = GFS_rrtmgp_post_finalize - type = scheme + name = GFS_rrtmgp_sw_pre_finalize + type = scheme \ No newline at end of file diff --git a/physics/rrtmgp_aux.F90 b/physics/rrtmgp_aux.F90 index 2df87992f..0ee837b97 100644 --- a/physics/rrtmgp_aux.F90 +++ b/physics/rrtmgp_aux.F90 @@ -1,5 +1,11 @@ module rrtmgp_aux + use machine, only: & + kind_phys ! Working type implicit none + + real(kind_phys) :: & + rrtmgp_minP, & ! Minimum pressure allowed in RRTMGP + rrtmgp_minT ! Minimum temperature allowed in RRTMGP contains ! subroutine rrtmgp_aux_init() diff --git a/physics/rrtmgp_lw_gas_optics.F90 b/physics/rrtmgp_lw_gas_optics.F90 index f829fa18c..99670b678 100644 --- a/physics/rrtmgp_lw_gas_optics.F90 +++ b/physics/rrtmgp_lw_gas_optics.F90 @@ -7,7 +7,7 @@ module rrtmgp_lw_gas_optics use mo_source_functions, only: ty_source_func_lw use mo_optical_props, only: ty_optical_props_1scl use mo_compute_bc, only: compute_bc - use rrtmgp_aux, only: check_error_msg + use rrtmgp_aux, only: check_error_msg, rrtmgp_minP, rrtmgp_minT use netcdf ! Parameters @@ -402,6 +402,11 @@ subroutine rrtmgp_lw_gas_optics_init(Model, Radtend, mpicomm, mpirank, mpiroot, ! Set initial permutation seed for McICA, initially set to number of G-points ipsdlw0 = lw_gas_props%get_ngpt() + + ! Store minimum pressure/temperature allowed by RRTMGP + rrtmgp_minP = lw_gas_props%get_press_min() + rrtmgp_minT = lw_gas_props%get_temp_min() + end subroutine rrtmgp_lw_gas_optics_init ! ######################################################################################### diff --git a/physics/rrtmgp_sw_gas_optics.F90 b/physics/rrtmgp_sw_gas_optics.F90 index 32e2888d2..00ddc174a 100644 --- a/physics/rrtmgp_sw_gas_optics.F90 +++ b/physics/rrtmgp_sw_gas_optics.F90 @@ -1,12 +1,13 @@ module rrtmgp_sw_gas_optics - use machine, only: kind_phys - use GFS_typedefs, only: GFS_control_type, GFS_radtend_type - use mo_rte_kind, only: wl - use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp - use mo_gas_concentrations, only: ty_gas_concs - use rrtmgp_aux, only: check_error_msg - use mo_optical_props, only: ty_optical_props_2str - use mo_compute_bc, only: compute_bc + use machine, only: kind_phys + use GFS_typedefs, only: GFS_control_type, GFS_radtend_type + use module_radiation_gases, only: NF_VGAS + use mo_rte_kind, only: wl + use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp + use mo_gas_concentrations, only: ty_gas_concs + use rrtmgp_aux, only: check_error_msg, rrtmgp_minP, rrtmgp_minT + use mo_optical_props, only: ty_optical_props_2str + use mo_compute_bc, only: compute_bc use netcdf contains @@ -399,6 +400,11 @@ subroutine rrtmgp_sw_gas_optics_init(Model, Radtend, mpicomm, mpirank, mpiroot, ! Set initial permutation seed for McICA, initially set to number of G-points ipsdsw0 = sw_gas_props%get_ngpt() + + ! Store minimum pressure/temperature allowed by RRTMGP + rrtmgp_minP = sw_gas_props%get_press_min() + rrtmgp_minT = sw_gas_props%get_temp_min() + end subroutine rrtmgp_sw_gas_optics_init ! ######################################################################################### From eba4af6bfbae1f1b2d36f140607f099a1ef9cc49 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Wed, 9 Oct 2019 17:38:22 +0000 Subject: [PATCH 054/167] Added RRTMGP as submodule --- .gitmodules | 4 ++++ physics/rte-rrtmgp | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 .gitmodules diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 000000000..31a66453e --- /dev/null +++ b/.gitmodules @@ -0,0 +1,4 @@ +[submodule "physics/rte-rrtmgp"] + path = physics/rte-rrtmgp + url = https://github.com/dustinswales/rte-rrtmgp + branch = rrtmgp-ccpp \ No newline at end of file diff --git a/physics/rte-rrtmgp b/physics/rte-rrtmgp index a2566ac81..609a07bdf 160000 --- a/physics/rte-rrtmgp +++ b/physics/rte-rrtmgp @@ -1 +1 @@ -Subproject commit a2566ac81f6d7f63bc01be92388702c95f0a3703 +Subproject commit 609a07bdfe899989bf0171c14b7e63702fec9bcc From ac3006455f9c343f03bc204d10d9ccb08392499b Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Wed, 9 Oct 2019 17:54:02 +0000 Subject: [PATCH 055/167] updated .gitmodules --- .gitmodules | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index 31a66453e..19b855a70 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,4 +1,4 @@ [submodule "physics/rte-rrtmgp"] path = physics/rte-rrtmgp - url = https://github.com/dustinswales/rte-rrtmgp - branch = rrtmgp-ccpp \ No newline at end of file + url = https://dustinswales@github.com/dustinswales/rte-rrtmgp + branch = rrtmgp-CCPP \ No newline at end of file From 0b79698508a943c472340b812e82459e5a07c554 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Wed, 9 Oct 2019 18:01:33 +0000 Subject: [PATCH 056/167] Switched rte-rrtmgp submodule bracnh --- physics/rte-rrtmgp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/physics/rte-rrtmgp b/physics/rte-rrtmgp index 609a07bdf..a2566ac81 160000 --- a/physics/rte-rrtmgp +++ b/physics/rte-rrtmgp @@ -1 +1 @@ -Subproject commit 609a07bdfe899989bf0171c14b7e63702fec9bcc +Subproject commit a2566ac81f6d7f63bc01be92388702c95f0a3703 From 816ba3f2ab5c86a1524eba9de2c20f76086a2dbe Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Wed, 16 Oct 2019 22:30:12 +0000 Subject: [PATCH 057/167] Fixed a bug --- physics/GFS_rrtmgp_setup.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/physics/GFS_rrtmgp_setup.F90 b/physics/GFS_rrtmgp_setup.F90 index 01a4420d0..42ce8662c 100644 --- a/physics/GFS_rrtmgp_setup.F90 +++ b/physics/GFS_rrtmgp_setup.F90 @@ -49,7 +49,7 @@ subroutine GFS_rrtmgp_setup_init (Model, si, levr, ictm, isol, ico2, & ! Inputs type(GFS_control_type), intent(in) :: & Model ! DDT containing model control parameters - real(kind_phys), dimension(levr+1, intent(in) :: & + real(kind_phys), dimension(levr+1), intent(in) :: & si integer, intent(in) :: levr, ictm, isol, ico2, iaer, ialb, iems, & ntcw, num_p3d, ntoz, iovr_sw, iovr_lw, isubc_sw, isubc_lw, & From 04bdd4fde2f2d7110982c8e420cba8045bc8f1fd Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Thu, 17 Oct 2019 18:18:28 +0000 Subject: [PATCH 058/167] Modified calls to radiaiton routines. --- physics/GFS_rrtmgp_lw_pre.F90 | 2 +- physics/GFS_rrtmgp_sw_pre.F90 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/physics/GFS_rrtmgp_lw_pre.F90 b/physics/GFS_rrtmgp_lw_pre.F90 index 6122e774c..deddc7013 100644 --- a/physics/GFS_rrtmgp_lw_pre.F90 +++ b/physics/GFS_rrtmgp_lw_pre.F90 @@ -94,7 +94,7 @@ subroutine GFS_rrtmgp_lw_pre_run (Model, Grid, Sfcprop, Statein, ncol, p_lay, ! Call module_radiation_surface::setemis(),to setup surface emissivity for LW radiation. ! ####################################################################################### call setemis (Grid%xlon, Grid%xlat, Sfcprop%slmsk, Sfcprop%snowd, Sfcprop%sncovr, & - Sfcprop%zorl, Sfcprop%tsfc,Sfcprop%tsfc, Sfcprop%hprim, NCOL, & + Sfcprop%zorl, Sfcprop%tsfc,Sfcprop%tsfc, Sfcprop%hprime(:,1), NCOL, & Radtend%semis) do iBand=1,lw_gas_props%get_nband() Radtend%sfc_emiss_byband(iBand,1:NCOL) = Radtend%semis(1:NCOL) diff --git a/physics/GFS_rrtmgp_sw_pre.F90 b/physics/GFS_rrtmgp_sw_pre.F90 index 56dd38619..1bbf0d3f1 100644 --- a/physics/GFS_rrtmgp_sw_pre.F90 +++ b/physics/GFS_rrtmgp_sw_pre.F90 @@ -145,7 +145,7 @@ subroutine GFS_rrtmgp_sw_pre_run (Model, Grid, Sfcprop, Statein, ncol, p_lay, ! Call module_radiation_surface::setalb() to setup surface albedo. call setalb (Sfcprop%slmsk, Sfcprop%snowd, Sfcprop%sncovr, Sfcprop%snoalb, Sfcprop%zorl, & - Radtend%coszen, Sfcprop%tsfc, Sfcprop%tsfc, Sfcprop%hprim, Sfcprop%alvsf, & + Radtend%coszen, Sfcprop%tsfc, Sfcprop%tsfc, Sfcprop%hprime(:,1), Sfcprop%alvsf, & Sfcprop%alnsf, Sfcprop%alvwf, Sfcprop%alnwf, Sfcprop%facsf, Sfcprop%facwf, & Sfcprop%fice, Sfcprop%tisfc, NCOL, alb1d, Model%pertalb, sfcalb) From 2f23b9322841879cee20e412eedaf1f427ec679b Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Thu, 17 Oct 2019 19:11:05 +0000 Subject: [PATCH 059/167] Remove deprecated code --- physics/GFS_rrtmgp_lw_post.F90 | 8 +------- physics/GFS_rrtmgp_sw_post.F90 | 6 ------ 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/physics/GFS_rrtmgp_lw_post.F90 b/physics/GFS_rrtmgp_lw_post.F90 index 0d5a9c974..b423e4d22 100644 --- a/physics/GFS_rrtmgp_lw_post.F90 +++ b/physics/GFS_rrtmgp_lw_post.F90 @@ -228,13 +228,7 @@ subroutine GFS_rrtmgp_lw_post_run (Model, Grid, Radtend, Coupling, Diag, Statei Diag%fluxr(i,46-j) = Diag%fluxr(i,46-j) + tem0d * (1.0-exp(-tem2)) enddo enddo - endif - - if (Model%lgocart .or. Model%ldiag3d) then - do k = 1, Model%levs - Coupling%cldcovi(1:im,k) = cld_frac(1:im,k) - enddo - endif + endif endif end subroutine GFS_rrtmgp_lw_post_run diff --git a/physics/GFS_rrtmgp_sw_post.F90 b/physics/GFS_rrtmgp_sw_post.F90 index 1dbfe6843..ed272f530 100644 --- a/physics/GFS_rrtmgp_sw_post.F90 +++ b/physics/GFS_rrtmgp_sw_post.F90 @@ -313,12 +313,6 @@ subroutine GFS_rrtmgp_sw_post_run (Model, Grid, Diag, Radtend, Coupling, Statein enddo enddo endif - - if (Model%lgocart .or. Model%ldiag3d) then - do k = 1, Model%levs - Coupling%cldcovi(1:im,k) = cld_frac(1:im,k) - enddo - endif endif From 6126278f2879e155396c58b31d4c7ad8ffc3a8e7 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Fri, 25 Oct 2019 17:32:46 +0000 Subject: [PATCH 060/167] Fixed typo in MPI_BCAST() calls --- physics/rrtmgp_lw_gas_optics.F90 | 2 +- physics/rrtmgp_sw_gas_optics.F90 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/physics/rrtmgp_lw_gas_optics.F90 b/physics/rrtmgp_lw_gas_optics.F90 index 9194c0f84..03c168fe6 100644 --- a/physics/rrtmgp_lw_gas_optics.F90 +++ b/physics/rrtmgp_lw_gas_optics.F90 @@ -167,7 +167,7 @@ subroutine rrtmgp_lw_gas_optics_init(Model, Radtend, mpicomm, mpirank, mpiroot, call MPI_BCAST(npress, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) call MPI_BCAST(nabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) call MPI_BCAST(nminorabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nextraabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nextrabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) call MPI_BCAST(nmixingfracs, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) call MPI_BCAST(nlayers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) call MPI_BCAST(nbnds, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) diff --git a/physics/rrtmgp_sw_gas_optics.F90 b/physics/rrtmgp_sw_gas_optics.F90 index 632ddffb9..3cb1046fc 100644 --- a/physics/rrtmgp_sw_gas_optics.F90 +++ b/physics/rrtmgp_sw_gas_optics.F90 @@ -159,7 +159,7 @@ subroutine rrtmgp_sw_gas_optics_init(Model, Radtend, mpicomm, mpirank, mpiroot, call MPI_BCAST(npress_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) call MPI_BCAST(nabsorbers_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) call MPI_BCAST(nminorabsorbers_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nextraabsorbers_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nextrabsorbers_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) call MPI_BCAST(nmixingfracs_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) call MPI_BCAST(nlayers_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) call MPI_BCAST(nbnds_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) From f35effe345487621f30aeaa9d8f56c09d9344c13 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Fri, 25 Oct 2019 22:06:21 +0000 Subject: [PATCH 061/167] Some more changes in MPI commands within initialization --- physics/rrtmgp_lw_cloud_optics.F90 | 92 ++++++++++++++++-------- physics/rrtmgp_lw_gas_optics.F90 | 105 ++++++++++++++++----------- physics/rrtmgp_sw_cloud_optics.F90 | 94 ++++++++++++++++-------- physics/rrtmgp_sw_gas_optics.F90 | 110 +++++++++++++++++------------ 4 files changed, 254 insertions(+), 147 deletions(-) diff --git a/physics/rrtmgp_lw_cloud_optics.F90 b/physics/rrtmgp_lw_cloud_optics.F90 index 164c2cc0a..b3d36b070 100644 --- a/physics/rrtmgp_lw_cloud_optics.F90 +++ b/physics/rrtmgp_lw_cloud_optics.F90 @@ -126,11 +126,11 @@ subroutine rrtmgp_lw_cloud_optics_init(Model, mpicomm, mpirank, mpiroot, lw_clou status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=npairsLWcldy) status = nf90_close(ncid_lw_clds) endif - endif - ! Check to ensure that number of ice-roughness categories is feasible. - if (Model%rrtmgp_nrghice .gt. nrghice_lw) then - errmsg = 'Number of RRTMGP ice-roughness categories requested in namelist file is not allowed' + ! Check to ensure that number of ice-roughness categories is feasible. + if (Model%rrtmgp_nrghice .gt. nrghice_lw) then + errmsg = 'Number of RRTMGP ice-roughness categories requested in namelist file is not allowed' + endif endif ! Broadcast dimensions to all processors @@ -258,34 +258,66 @@ subroutine rrtmgp_lw_cloud_optics_init(Model, mpicomm, mpirank, mpiroot, lw_clou ! Broadcast arrays to all processors #ifdef MPI if (Model%rrtmgp_cld_optics .eq. 1) then - call MPI_BCAST(radliq_lwr, 1, kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(radliq_upr, 1, kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(radliq_fac, 1, kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(radice_lwr, 1, kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(radice_upr, 1, kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(radice_fac, 1, kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_extliq, size(lut_extliq), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_ssaliq, size(lut_ssaliq), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_asyliq, size(lut_asyliq), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_extice, size(lut_extice), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_ssaice, size(lut_ssaice), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_asyice, size(lut_asyice), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(band_lims_cldy , size(band_lims_cldy), kind_phys, mpiroot, mpicomm, ierr) +#ifndef SINGLE_PREC + call MPI_BCAST(radliq_lwr, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(radliq_upr, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(radliq_fac, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(radice_lwr, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(radice_upr, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(radice_fac, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_extliq, size(lut_extliq), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_ssaliq, size(lut_ssaliq), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_asyliq, size(lut_asyliq), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_extice, size(lut_extice), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_ssaice, size(lut_ssaice), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_asyice, size(lut_asyice), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(band_lims_cldy , size(band_lims_cldy), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +#else + call MPI_BCAST(radliq_lwr, 1, MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(radliq_upr, 1, MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(radliq_fac, 1, MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(radice_lwr, 1, MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(radice_upr, 1, MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(radice_fac, 1, MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_extliq, size(lut_extliq), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_ssaliq, size(lut_ssaliq), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_asyliq, size(lut_asyliq), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_extice, size(lut_extice), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_ssaice, size(lut_ssaice), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_asyice, size(lut_asyice), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(band_lims_cldy , size(band_lims_cldy), MPI_REAL, mpiroot, mpicomm, ierr) +#endif endif if (Model%rrtmgp_cld_optics .eq. 2) then - call MPI_BCAST(pade_extliq, size(pade_extliq), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_ssaliq, size(pade_ssaliq), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_asyliq, size(pade_asyliq), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_extice, size(pade_extice), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_ssaice, size(pade_ssaice), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_asyice, size(pade_asyice), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_extliq, size(pade_sizereg_extliq), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_ssaliq, size(pade_sizereg_ssaliq), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_asyliq, size(pade_sizereg_asyliq), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_extice, size(pade_sizereg_extice), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_ssaice, size(pade_sizereg_ssaice), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_asyice, size(pade_sizereg_asyice), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(band_lims_cldy, size(band_lims_cldy), kind_phys, mpiroot, mpicomm, ierr) +#ifndef SINGLE_PREC + call MPI_BCAST(pade_extliq, size(pade_extliq), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_ssaliq, size(pade_ssaliq), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_asyliq, size(pade_asyliq), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_extice, size(pade_extice), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_ssaice, size(pade_ssaice), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_asyice, size(pade_asyice), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_extliq, size(pade_sizereg_extliq), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_ssaliq, size(pade_sizereg_ssaliq), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_asyliq, size(pade_sizereg_asyliq), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_extice, size(pade_sizereg_extice), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_ssaice, size(pade_sizereg_ssaice), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_asyice, size(pade_sizereg_asyice), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(band_lims_cldy, size(band_lims_cldy), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +#else + call MPI_BCAST(pade_extliq, size(pade_extliq), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_ssaliq, size(pade_ssaliq), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_asyliq, size(pade_asyliq), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_extice, size(pade_extice), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_ssaice, size(pade_ssaice), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_asyice, size(pade_asyice), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_extliq, size(pade_sizereg_extliq), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_ssaliq, size(pade_sizereg_ssaliq), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_asyliq, size(pade_sizereg_asyliq), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_extice, size(pade_sizereg_extice), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_ssaice, size(pade_sizereg_ssaice), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_asyice, size(pade_sizereg_asyice), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(band_lims_cldy, size(band_lims_cldy), MPI_REAL, mpiroot, mpicomm, ierr) +#endif endif #endif diff --git a/physics/rrtmgp_lw_gas_optics.F90 b/physics/rrtmgp_lw_gas_optics.F90 index 03c168fe6..773bdeda4 100644 --- a/physics/rrtmgp_lw_gas_optics.F90 +++ b/physics/rrtmgp_lw_gas_optics.F90 @@ -325,20 +325,37 @@ subroutine rrtmgp_lw_gas_optics_init(Model, Radtend, mpicomm, mpirank, mpiroot, call MPI_BCAST(kminor_start_lower, size(kminor_start_lower), MPI_INTEGER, mpiroot, mpicomm, ierr) call MPI_BCAST(key_species, size(key_species), MPI_INTEGER, mpiroot, mpicomm, ierr) call MPI_BCAST(band2gpt, size(band2gpt), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(band_lims, size(band_lims), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(press_ref, size(press_ref), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(temp_ref, size(temp_ref), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(kminor_lower, size(kminor_lower), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(kminor_upper, size(kminor_upper), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(scaling_gas_lower, size(scaling_gas_lower), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(scaling_gas_upper, size(scaling_gas_upper), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(vmr_ref, size(vmr_ref), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(kmajor, size(kmajor), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(temp_ref_p, 1, kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(temp_ref_t, 1, kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(press_ref_trop, 1, kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(totplnk, size(totplnk), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(planck_frac, size(planck_frac), kind_phys, mpiroot, mpicomm, ierr) +#ifndef SINGLE_PREC + call MPI_BCAST(band_lims, size(band_lims), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(press_ref, size(press_ref), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(temp_ref, size(temp_ref), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(kminor_lower, size(kminor_lower), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(kminor_upper, size(kminor_upper), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(scaling_gas_lower, size(scaling_gas_lower), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(scaling_gas_upper, size(scaling_gas_upper), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(vmr_ref, size(vmr_ref), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(kmajor, size(kmajor), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(temp_ref_p, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(temp_ref_t, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(press_ref_trop, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(totplnk, size(totplnk), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(planck_frac, size(planck_frac), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +#else + call MPI_BCAST(band_lims, size(band_lims), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(press_ref, size(press_ref), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(temp_ref, size(temp_ref), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(kminor_lower, size(kminor_lower), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(kminor_upper, size(kminor_upper), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(scaling_gas_lower, size(scaling_gas_lower), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(scaling_gas_upper, size(scaling_gas_upper), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(vmr_ref, size(vmr_ref), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(kmajor, size(kmajor), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(temp_ref_p, 1, MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(temp_ref_t, 1, MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(press_ref_trop, 1, MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(totplnk, size(totplnk), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(planck_frac, size(planck_frac), MPI_REAL, mpiroot, mpicomm, ierr) +#endif ! Character arrays do ij=1,nabsorbers call MPI_BCAST(gas_names(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) @@ -355,37 +372,41 @@ subroutine rrtmgp_lw_gas_optics_init(Model, Radtend, mpicomm, mpirank, mpiroot, enddo ! Logical arrays (First convert to integer-array, then broadcast) ! - allocate(temp_log_array1(nminor_absorber_intervals_lower)) - where(minor_scales_with_density_lower) - temp_log_array1 = 1 - elsewhere - temp_log_array1 = 0 - end where - call MPI_BCAST(temp_log_array1, size(temp_log_array1), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(minor_scales_with_density_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(scale_by_complement_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(minor_scales_with_density_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(scale_by_complement_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, ierr) + !allocate(temp_log_array1(nminor_absorber_intervals_lower)) + !where(minor_scales_with_density_lower) + ! temp_log_array1 = 1 + !elsewhere + ! temp_log_array1 = 0 + !end where + !call MPI_BCAST(temp_log_array1, size(temp_log_array1), MPI_INTEGER, mpiroot, mpicomm, ierr) ! - allocate(temp_log_array2(nminor_absorber_intervals_lower)) - where(scale_by_complement_lower) - temp_log_array2 = 1 - elsewhere - temp_log_array2 = 0 - end where - call MPI_BCAST(temp_log_array2, size(temp_log_array2), MPI_INTEGER, mpiroot, mpicomm, ierr) + !allocate(temp_log_array2(nminor_absorber_intervals_lower)) + !where(scale_by_complement_lower) + ! temp_log_array2 = 1 + !elsewhere + ! temp_log_array2 = 0 + !end where + !call MPI_BCAST(temp_log_array2, size(temp_log_array2), MPI_INTEGER, mpiroot, mpicomm, ierr) ! - allocate(temp_log_array3(nminor_absorber_intervals_upper)) - where(minor_scales_with_density_upper) - temp_log_array3 = 1 - elsewhere - temp_log_array3 = 0 - end where - call MPI_BCAST(temp_log_array3, size(temp_log_array3), MPI_INTEGER, mpiroot, mpicomm, ierr) + !allocate(temp_log_array3(nminor_absorber_intervals_upper)) + !where(minor_scales_with_density_upper) + ! temp_log_array3 = 1 + !elsewhere + ! temp_log_array3 = 0 + !end where + !call MPI_BCAST(temp_log_array3, size(temp_log_array3), MPI_INTEGER, mpiroot, mpicomm, ierr) ! - allocate(temp_log_array4(nminor_absorber_intervals_upper)) - where(scale_by_complement_upper) - temp_log_array4 = 1 - elsewhere - temp_log_array4 = 0 - end where - call MPI_BCAST(temp_log_array4, size(temp_log_array4), MPI_INTEGER, mpiroot, mpicomm, ierr) + !allocate(temp_log_array4(nminor_absorber_intervals_upper)) + !where(scale_by_complement_upper) + ! temp_log_array4 = 1 + !elsewhere + ! temp_log_array4 = 0 + !end where + !call MPI_BCAST(temp_log_array4, size(temp_log_array4), MPI_INTEGER, mpiroot, mpicomm, ierr) #endif ! Initialize gas concentrations and gas optics class with data diff --git a/physics/rrtmgp_sw_cloud_optics.F90 b/physics/rrtmgp_sw_cloud_optics.F90 index aeab012a8..3d721ff12 100644 --- a/physics/rrtmgp_sw_cloud_optics.F90 +++ b/physics/rrtmgp_sw_cloud_optics.F90 @@ -124,18 +124,18 @@ subroutine rrtmgp_sw_cloud_optics_init(Model,mpicomm, mpirank, mpiroot, sw_cloud status = nf90_inquire_dimension(ncid_sw_clds, dimid, len=npairsSWcldy_sw) status = nf90_close(ncid_sw_clds) endif - endif - ! Check to ensure that number of ice-roughness categories is feasible. - if (Model%rrtmgp_nrghice .gt. nrghice_sw) then - errmsg = 'Number of RRTMGP ice-roughness categories requested in namelist file is not allowed' + ! Check to ensure that number of ice-roughness categories is feasible. + if (Model%rrtmgp_nrghice .gt. nrghice_sw) then + errmsg = 'Number of RRTMGP ice-roughness categories requested in namelist file is not allowed' + endif endif ! Broadcast dimensions to all processors #ifdef MPI if (Model%rrtmgp_cld_optics .eq. 1 .or. Model%rrtmgp_cld_optics .eq. 2) then call MPI_BCAST(nbandSWcldy_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nrghice_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nrghice_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) call MPI_BCAST(nsize_liq_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) call MPI_BCAST(nsize_ice_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) call MPI_BCAST(nsizereg_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) @@ -256,34 +256,66 @@ subroutine rrtmgp_sw_cloud_optics_init(Model,mpicomm, mpirank, mpiroot, sw_cloud ! Broadcast arrays to all processors #ifdef MPI if (Model%rrtmgp_cld_optics .eq. 1) then - call MPI_BCAST(radliq_lwr_sw, 1, kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(radliq_upr_sw, 1, kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(radliq_fac_sw, 1, kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(radice_lwr_sw, 1, kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(radice_upr_sw, 1, kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(radice_fac_sw, 1, kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_extliq_sw, size(lut_extliq_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_ssaliq_sw, size(lut_ssaliq_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_asyliq_sw, size(lut_asyliq_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_extice_sw, size(lut_extice_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_ssaice_sw, size(lut_ssaice_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_asyice_sw, size(lut_asyice_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(band_lims_cldy_sw, size(band_lims_cldy_sw), kind_phys, mpiroot, mpicomm, ierr) +#ifndef SINGLE_PREC + call MPI_BCAST(radliq_lwr_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(radliq_upr_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(radliq_fac_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(radice_lwr_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(radice_upr_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(radice_fac_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_extliq_sw, size(lut_extliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_ssaliq_sw, size(lut_ssaliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_asyliq_sw, size(lut_asyliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_extice_sw, size(lut_extice_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_ssaice_sw, size(lut_ssaice_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_asyice_sw, size(lut_asyice_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(band_lims_cldy_sw, size(band_lims_cldy_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +#else + call MPI_BCAST(radliq_lwr_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(radliq_upr_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(radliq_fac_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(radice_lwr_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(radice_upr_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(radice_fac_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_extliq_sw, size(lut_extliq_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_ssaliq_sw, size(lut_ssaliq_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_asyliq_sw, size(lut_asyliq_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_extice_sw, size(lut_extice_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_ssaice_sw, size(lut_ssaice_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_asyice_sw, size(lut_asyice_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(band_lims_cldy_sw, size(band_lims_cldy_sw), MPI_REAL, mpiroot, mpicomm, ierr) +#endif endif if (Model%rrtmgp_cld_optics .eq. 2) then - call MPI_BCAST(pade_extliq_sw, size(pade_extliq_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_ssaliq_sw, size(pade_ssaliq_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_asyliq_sw, size(pade_asyliq_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_extice_sw, size(pade_extice_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_ssaice_sw, size(pade_ssaice_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_asyice_sw, size(pade_asyice_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_extliq_sw, size(pade_sizereg_extliq_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_ssaliq_sw, size(pade_sizereg_ssaliq_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_asyliq_sw, size(pade_sizereg_asyliq_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_extice_sw, size(pade_sizereg_extice_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_ssaice_sw, size(pade_sizereg_ssaice_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_asyice_sw, size(pade_sizereg_asyice_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(band_lims_cldy_sw, size(band_lims_cldy_sw), kind_phys, mpiroot, mpicomm, ierr) +#ifndef SINGLE_PREC + call MPI_BCAST(pade_extliq_sw, size(pade_extliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_ssaliq_sw, size(pade_ssaliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_asyliq_sw, size(pade_asyliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_extice_sw, size(pade_extice_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_ssaice_sw, size(pade_ssaice_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_asyice_sw, size(pade_asyice_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_extliq_sw, size(pade_sizereg_extliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_ssaliq_sw, size(pade_sizereg_ssaliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_asyliq_sw, size(pade_sizereg_asyliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_extice_sw, size(pade_sizereg_extice_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_ssaice_sw, size(pade_sizereg_ssaice_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_asyice_sw, size(pade_sizereg_asyice_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(band_lims_cldy_sw, size(band_lims_cldy_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +#else + call MPI_BCAST(pade_extliq_sw, size(pade_extliq_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_ssaliq_sw, size(pade_ssaliq_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_asyliq_sw, size(pade_asyliq_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_extice_sw, size(pade_extice_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_ssaice_sw, size(pade_ssaice_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_asyice_sw, size(pade_asyice_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_extliq_sw, size(pade_sizereg_extliq_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_ssaliq_sw, size(pade_sizereg_ssaliq_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_asyliq_sw, size(pade_sizereg_asyliq_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_extice_sw, size(pade_sizereg_extice_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_ssaice_sw, size(pade_sizereg_ssaice_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_asyice_sw, size(pade_sizereg_asyice_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(band_lims_cldy_sw, size(band_lims_cldy_sw), MPI_REAL, mpiroot, mpicomm, ierr) +#endif endif #endif diff --git a/physics/rrtmgp_sw_gas_optics.F90 b/physics/rrtmgp_sw_gas_optics.F90 index 3cb1046fc..8e73d42b1 100644 --- a/physics/rrtmgp_sw_gas_optics.F90 +++ b/physics/rrtmgp_sw_gas_optics.F90 @@ -320,21 +320,39 @@ subroutine rrtmgp_sw_gas_optics_init(Model, Radtend, mpicomm, mpirank, mpiroot, call MPI_BCAST(kminor_start_lower_sw, size(kminor_start_lower_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) call MPI_BCAST(key_species_sw, size(key_species_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) call MPI_BCAST(band2gpt_sw, size(band2gpt_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(band_lims_sw, size(band_lims_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(press_ref_sw, size(press_ref_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(temp_ref_sw, size(temp_ref_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(kminor_lower_sw, size(kminor_lower_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(kminor_upper_sw, size(kminor_upper_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(scaling_gas_lower_sw, size(scaling_gas_lower_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(scaling_gas_upper_sw, size(scaling_gas_upper_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(vmr_ref_sw, size(vmr_ref_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(kmajor_sw, size(kmajor_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(temp_ref_p_sw, 1, kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(temp_ref_t_sw, 1, kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(press_ref_trop_sw, 1, kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(solar_source_sw, size(solar_source_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(rayl_lower_sw, size(rayl_lower_sw), kind_phys, mpiroot, mpicomm, ierr) - call MPI_BCAST(rayl_upper_sw, size(rayl_upper_sw), kind_phys, mpiroot, mpicomm, ierr) +#ifndef SINGLE_PREC + call MPI_BCAST(band_lims_sw, size(band_lims_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(press_ref_sw, size(press_ref_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(temp_ref_sw, size(temp_ref_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(kminor_lower_sw, size(kminor_lower_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(kminor_upper_sw, size(kminor_upper_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(scaling_gas_lower_sw, size(scaling_gas_lower_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(scaling_gas_upper_sw, size(scaling_gas_upper_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(vmr_ref_sw, size(vmr_ref_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(kmajor_sw, size(kmajor_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(temp_ref_p_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(temp_ref_t_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(press_ref_trop_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(solar_source_sw, size(solar_source_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(rayl_lower_sw, size(rayl_lower_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(rayl_upper_sw, size(rayl_upper_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +#else + call MPI_BCAST(band_lims_sw, size(band_lims_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(press_ref_sw, size(press_ref_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(temp_ref_sw, size(temp_ref_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(kminor_lower_sw, size(kminor_lower_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(kminor_upper_sw, size(kminor_upper_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(scaling_gas_lower_sw, size(scaling_gas_lower_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(scaling_gas_upper_sw, size(scaling_gas_upper_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(vmr_ref_sw, size(vmr_ref_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(kmajor_sw, size(kmajor_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(temp_ref_p_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(temp_ref_t_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(press_ref_trop_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(solar_source_sw, size(solar_source_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(rayl_lower_sw, size(rayl_lower_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(rayl_upper_sw, size(rayl_upper_sw), MPI_REAL, mpiroot, mpicomm, ierr) +#endif ! Character arrays do ij=1,nabsorbers_sw call MPI_BCAST(gas_names_sw(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) @@ -351,37 +369,41 @@ subroutine rrtmgp_sw_gas_optics_init(Model, Radtend, mpicomm, mpirank, mpiroot, enddo ! Logical arrays (First convert to integer-array, then broadcast) ! - allocate(temp_log_array1(nminor_absorber_intervals_lower_sw)) - where(minor_scales_with_density_lower_sw) - temp_log_array1 = 1 - elsewhere - temp_log_array1 = 0 - end where - call MPI_BCAST(temp_log_array1, size(temp_log_array1), MPI_INTEGER, mpiroot, mpicomm, ierr) - ! - allocate(temp_log_array2(nminor_absorber_intervals_lower_sw)) - where(scale_by_complement_lower_sw) - temp_log_array2 = 1 - elsewhere - temp_log_array2 = 0 - end where - call MPI_BCAST(temp_log_array2, size(temp_log_array2), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(minor_scales_with_density_lower_sw, nminor_absorber_intervals_lower_sw, MPI_LOGICAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(scale_by_complement_lower_sw, nminor_absorber_intervals_lower_sw, MPI_LOGICAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(minor_scales_with_density_upper_sw, nminor_absorber_intervals_upper_sw, MPI_LOGICAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(scale_by_complement_upper_sw, nminor_absorber_intervals_upper_sw, MPI_LOGICAL, mpiroot, mpicomm, ierr) + !allocate(temp_log_array1(nminor_absorber_intervals_lower_sw)) + !where(minor_scales_with_density_lower_sw) + ! temp_log_array1 = 1 + !elsewhere + ! temp_log_array1 = 0 + !end where + !call MPI_BCAST(temp_log_array1, size(temp_log_array1), MPI_INTEGER, mpiroot, mpicomm, ierr) ! - allocate(temp_log_array3(nminor_absorber_intervals_upper_sw)) - where(minor_scales_with_density_upper_sw) - temp_log_array3 = 1 - elsewhere - temp_log_array3 = 0 - end where - call MPI_BCAST(temp_log_array3, size(temp_log_array3), MPI_INTEGER, mpiroot, mpicomm, ierr) + !allocate(temp_log_array2(nminor_absorber_intervals_lower_sw)) + !where(scale_by_complement_lower_sw) + ! temp_log_array2 = 1 + !elsewhere + ! temp_log_array2 = 0 + !end where + !call MPI_BCAST(temp_log_array2, size(temp_log_array2), MPI_INTEGER, mpiroot, mpicomm, ierr) ! - allocate(temp_log_array4(nminor_absorber_intervals_upper_sw)) - where(scale_by_complement_upper_sw) - temp_log_array4 = 1 - elsewhere - temp_log_array4 = 0 - end where - call MPI_BCAST(temp_log_array4, size(temp_log_array4), MPI_INTEGER, mpiroot, mpicomm, ierr) + !allocate(temp_log_array3(nminor_absorber_intervals_upper_sw)) + !where(minor_scales_with_density_upper_sw) + ! temp_log_array3 = 1 + !elsewhere + ! temp_log_array3 = 0 + !end where + !call MPI_BCAST(temp_log_array3, size(temp_log_array3), MPI_INTEGER, mpiroot, mpicomm, ierr) + !! + !allocate(temp_log_array4(nminor_absorber_intervals_upper_sw)) + !where(scale_by_complement_upper_sw) + ! temp_log_array4 = 1 + !elsewhere + ! temp_log_array4 = 0 + !end where + !call MPI_BCAST(temp_log_array4, size(temp_log_array4), MPI_INTEGER, mpiroot, mpicomm, ierr) #endif ! Initialize gas concentrations and gas optics class with data From fe6c9aeb5b0cdad9cf3d711c7268e7ee81706698 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Tue, 29 Oct 2019 14:17:19 +0000 Subject: [PATCH 062/167] Moved RRTMGP active gases from GFS_radtend_type to GFS_control_type. --- physics/GFS_rrtmgp_gas_optics.F90 | 2 +- physics/GFS_rrtmgp_pre.F90 | 4 ++-- physics/GFS_rrtmgp_pre.meta | 2 +- physics/rrtmgp_lw_gas_optics.F90 | 2 +- physics/rrtmgp_sw_clrallsky_driver.F90 | 4 ++-- physics/rrtmgp_sw_gas_optics.F90 | 2 +- physics/rrtmgp_sw_rte.F90 | 4 ++-- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/physics/GFS_rrtmgp_gas_optics.F90 b/physics/GFS_rrtmgp_gas_optics.F90 index 3ff397268..1054c0908 100644 --- a/physics/GFS_rrtmgp_gas_optics.F90 +++ b/physics/GFS_rrtmgp_gas_optics.F90 @@ -53,7 +53,7 @@ subroutine GFS_rrtmgp_gas_optics_init(Model, Radtend, errmsg, errflg) gasIndices(Model%ngases,2)=len(trim(Model%active_gases)) ! Now extract the gas names do ij=1,Model%ngases - Radtend%active_gases(ij,1) = Model%active_gases(gasIndices(ij,1):gasIndices(ij,2)) + Radtend%active_gases(ij) = Model%active_gases(gasIndices(ij,1):gasIndices(ij,2)) enddo endif end subroutine GFS_rrtmgp_gas_optics_init diff --git a/physics/GFS_rrtmgp_pre.F90 b/physics/GFS_rrtmgp_pre.F90 index 6a93eec36..a501b196b 100644 --- a/physics/GFS_rrtmgp_pre.F90 +++ b/physics/GFS_rrtmgp_pre.F90 @@ -71,7 +71,7 @@ module GFS_rrtmgp_pre ! ######################################################################################### subroutine GFS_rrtmgp_pre_init(Model, Radtend, errmsg, errflg) ! Inputs - type(GFS_control_type), intent(in) :: & + type(GFS_control_type), intent(inout) :: & Model ! DDT containing model control parameters type(GFS_radtend_type), intent(inout) :: & Radtend ! Fortran DDT containing FV3-GFS radiation tendencies @@ -108,7 +108,7 @@ subroutine GFS_rrtmgp_pre_init(Model, Radtend, errmsg, errflg) gasIndices(Model%ngases,2)=len(trim(Model%active_gases)) ! Now extract the gas names do ij=1,Model%ngases - Radtend%active_gases(ij,1) = Model%active_gases(gasIndices(ij,1):gasIndices(ij,2)) + Model%active_gases_array(ij) = Model%active_gases(gasIndices(ij,1):gasIndices(ij,2)) enddo endif end subroutine GFS_rrtmgp_pre_init diff --git a/physics/GFS_rrtmgp_pre.meta b/physics/GFS_rrtmgp_pre.meta index 1379ea1aa..e70d7400c 100644 --- a/physics/GFS_rrtmgp_pre.meta +++ b/physics/GFS_rrtmgp_pre.meta @@ -7,7 +7,7 @@ units = DDT dimensions = () type = GFS_control_type - intent = in + intent = inout optional = F [Radtend] standard_name = GFS_radtend_type_instance diff --git a/physics/rrtmgp_lw_gas_optics.F90 b/physics/rrtmgp_lw_gas_optics.F90 index 773bdeda4..3ae94dea1 100644 --- a/physics/rrtmgp_lw_gas_optics.F90 +++ b/physics/rrtmgp_lw_gas_optics.F90 @@ -411,7 +411,7 @@ subroutine rrtmgp_lw_gas_optics_init(Model, Radtend, mpicomm, mpirank, mpiroot, ! Initialize gas concentrations and gas optics class with data do iGas=1,Model%nGases - call check_error_msg('lw_gas_optics_init',gas_concentrations%set_vmr(Radtend%active_gases(iGas,1), 0._kind_phys)) + call check_error_msg('lw_gas_optics_init',gas_concentrations%set_vmr(Model%active_gases_array(iGas), 0._kind_phys)) enddo call check_error_msg('lw_gas_optics_init',lw_gas_props%load(gas_concentrations, gas_names, & key_species, band2gpt, band_lims, press_ref, press_ref_trop, temp_ref, temp_ref_p, & diff --git a/physics/rrtmgp_sw_clrallsky_driver.F90 b/physics/rrtmgp_sw_clrallsky_driver.F90 index 249975783..df45c1a6b 100644 --- a/physics/rrtmgp_sw_clrallsky_driver.F90 +++ b/physics/rrtmgp_sw_clrallsky_driver.F90 @@ -133,8 +133,8 @@ subroutine rrtmgp_sw_clrallsky_driver_run(Model, Radtend, ncol, sw_gas_props, p_ ! Similarly, subset the gas concentrations. do iGas=1,Model%nGases - call check_error_msg('rrtmgp_sw_clrallsky_driver_run',gas_concentrations%get_vmr(trim(Radtend%active_gases(iGas,1)),vmrTemp)) - call check_error_msg('rrtmgp_sw_clrallsky_driver_run',gas_concentrations_daylit%set_vmr(trim(Radtend%active_gases(iGas,1)),vmrTemp(idxday,:))) + call check_error_msg('rrtmgp_sw_clrallsky_driver_run',gas_concentrations%get_vmr(trim(Model%active_gases_array(iGas)),vmrTemp)) + call check_error_msg('rrtmgp_sw_clrallsky_driver_run',gas_concentrations_daylit%set_vmr(trim(Model%active_gases_array(iGas)),vmrTemp(idxday,:))) enddo ! Initialize RRTMGP DDT containing 2D(3D) fluxes diff --git a/physics/rrtmgp_sw_gas_optics.F90 b/physics/rrtmgp_sw_gas_optics.F90 index 8e73d42b1..049ab03d4 100644 --- a/physics/rrtmgp_sw_gas_optics.F90 +++ b/physics/rrtmgp_sw_gas_optics.F90 @@ -408,7 +408,7 @@ subroutine rrtmgp_sw_gas_optics_init(Model, Radtend, mpicomm, mpirank, mpiroot, ! Initialize gas concentrations and gas optics class with data do iGas=1,Model%nGases - call check_error_msg('sw_gas_optics_init',gas_concentrations%set_vmr(Radtend%active_gases(iGas,1), 0._kind_phys)) + call check_error_msg('sw_gas_optics_init',gas_concentrations%set_vmr(Model%active_gases_array(iGas), 0._kind_phys)) enddo call check_error_msg('sw_gas_optics_init',sw_gas_props%load(gas_concentrations, gas_names_sw, & key_species_sw, band2gpt_sw, band_lims_sw, press_ref_sw, press_ref_trop_sw, temp_ref_sw, & diff --git a/physics/rrtmgp_sw_rte.F90 b/physics/rrtmgp_sw_rte.F90 index f7d8f8fc9..56d846845 100644 --- a/physics/rrtmgp_sw_rte.F90 +++ b/physics/rrtmgp_sw_rte.F90 @@ -154,8 +154,8 @@ subroutine rrtmgp_sw_rte_run(Model, Radtend, Statein, ncol, sw_gas_props, p_lay, ! Similarly, subset the gas concentrations. do iGas=1,Model%nGases - call check_error_msg('rrtmgp_sw_rte_run',gas_concentrations%get_vmr(trim(Radtend%active_gases(iGas,1)),vmrTemp)) - call check_error_msg('rrtmgp_sw_rte_run',gas_concentrations_daylit%set_vmr(trim(Radtend%active_gases(iGas,1)),vmrTemp(idxday,:))) + call check_error_msg('rrtmgp_sw_rte_run',gas_concentrations%get_vmr(trim(Model%active_gases_array(iGas)),vmrTemp)) + call check_error_msg('rrtmgp_sw_rte_run',gas_concentrations_daylit%set_vmr(trim(Model%active_gases_array(iGas)),vmrTemp(idxday,:))) enddo ! Initialize RRTMGP DDT containing 2D(3D) fluxes From 78a8ed263f43955704f43cdc84f985b4451d074a Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Mon, 4 Nov 2019 23:19:06 +0000 Subject: [PATCH 063/167] Made some changes. Moved fields into Interstitial type. Results still differ from baseline RRTMG. --- physics/GFS_rrtmgp_lw_post.F90 | 54 ++++++++-------- physics/GFS_rrtmgp_lw_post.meta | 25 -------- physics/GFS_rrtmgp_lw_pre.F90 | 9 ++- physics/GFS_rrtmgp_lw_pre.meta | 8 +++ physics/GFS_rrtmgp_pre.F90 | 7 ++- physics/GFS_rrtmgp_sw_post.F90 | 82 +++++++++++++------------ physics/GFS_rrtmgp_sw_post.meta | 33 +++------- physics/GFS_rrtmgp_sw_pre.F90 | 17 ++--- physics/GFS_rrtmgp_sw_pre.meta | 8 +++ physics/rrtmgp_lw_clrallsky_driver.F90 | 10 +-- physics/rrtmgp_lw_clrallsky_driver.meta | 8 +-- physics/rrtmgp_lw_gas_optics.F90 | 43 ++----------- physics/rrtmgp_lw_gas_optics.meta | 16 ----- physics/rrtmgp_lw_rte.F90 | 12 ++-- physics/rrtmgp_lw_rte.meta | 8 +-- physics/rrtmgp_sw_clrallsky_driver.F90 | 9 +-- physics/rrtmgp_sw_clrallsky_driver.meta | 8 +++ physics/rrtmgp_sw_gas_optics.F90 | 47 +++----------- physics/rrtmgp_sw_gas_optics.meta | 18 ++---- physics/rrtmgp_sw_rte.F90 | 23 ++++--- physics/rrtmgp_sw_rte.meta | 8 +++ 21 files changed, 186 insertions(+), 267 deletions(-) diff --git a/physics/GFS_rrtmgp_lw_post.F90 b/physics/GFS_rrtmgp_lw_post.F90 index b423e4d22..769478e6d 100644 --- a/physics/GFS_rrtmgp_lw_post.F90 +++ b/physics/GFS_rrtmgp_lw_post.F90 @@ -29,8 +29,8 @@ end subroutine GFS_rrtmgp_lw_post_init !! subroutine GFS_rrtmgp_lw_post_run (Model, Grid, Radtend, Coupling, Diag, Statein, im, & p_lev, tsfa, fluxlwUP_allsky, fluxlwDOWN_allsky, fluxlwUP_clrsky, fluxlwDOWN_clrsky,& - raddt, aerodp, cldsa, mtopa, mbota, cld_frac, cldtaulw, hlwc, topflx_lw, & - sfcflx_lw, flxprf_lw, hlw0, errmsg, errflg) + raddt, aerodp, cldsa, mtopa, mbota, cld_frac, cldtaulw, & + flxprf_lw, hlw0, errmsg, errflg) ! Inputs type(GFS_control_type), intent(in) :: & @@ -68,24 +68,26 @@ subroutine GFS_rrtmgp_lw_post_run (Model, Grid, Radtend, Coupling, Diag, Statei real(kind_phys), dimension(im,Model%levs), intent(in) :: & cld_frac, & ! Total cloud fraction in each layer cldtaulw ! approx 10.mu band layer cloud optical depth + real(kind_phys),dimension(size(Grid%xlon,1), Model%levs) :: & + hlwc ! Longwave all-sky heating-rate (K/sec) ! Outputs (mandatory) character(len=*), intent(out) :: & errmsg integer, intent(out) :: & errflg - real(kind_phys),dimension(size(Grid%xlon,1), Model%levs),intent(out) :: & - hlwc ! Longwave all-sky heating-rate (K/sec) - type(topflw_type), dimension(size(Grid%xlon,1)), intent(inout) :: & - topflx_lw ! radiation fluxes at top, components: - ! upfxc - total sky upward flux at top (w/m2) - ! upfx0 - clear sky upward flux at top (w/m2) - type(sfcflw_type), dimension(size(Grid%xlon,1)), intent(inout) :: & - sfcflx_lw ! radiation fluxes at sfc, components: - ! upfxc - total sky upward flux at sfc (w/m2) - ! upfx0 - clear sky upward flux at sfc (w/m2) - ! dnfxc - total sky downward flux at sfc (w/m2) - ! dnfx0 - clear sky downward flux at sfc (w/m2) +! real(kind_phys),dimension(size(Grid%xlon,1), Model%levs),intent(out) :: & +! hlwc ! Longwave all-sky heating-rate (K/sec) +! type(topflw_type), dimension(size(Grid%xlon,1)), intent(inout) :: & +! topflx_lw ! radiation fluxes at top, components: +! ! upfxc - total sky upward flux at top (w/m2) +! ! upfx0 - clear sky upward flux at top (w/m2) +! type(sfcflw_type), dimension(size(Grid%xlon,1)), intent(inout) :: & +! sfcflx_lw ! radiation fluxes at sfc, components: +! ! upfxc - total sky upward flux at sfc (w/m2) +! ! upfx0 - clear sky upward flux at sfc (w/m2) +! ! dnfxc - total sky downward flux at sfc (w/m2) +! ! dnfx0 - clear sky downward flux at sfc (w/m2) ! Outputs (optional) real(kind_phys), dimension(size(Grid%xlon,1), Model%levs), optional, intent(inout) :: & @@ -145,12 +147,12 @@ subroutine GFS_rrtmgp_lw_post_run (Model, Grid, Radtend, Coupling, Diag, Statei ! Copy fluxes from RRTGMP types into model radiation types. ! Mandatory outputs - topflx_lw%upfxc = fluxlwUP_allsky(:,iTOA) - topflx_lw%upfx0 = fluxlwUP_clrsky(:,iTOA) - sfcflx_lw%upfxc = fluxlwUP_allsky(:,iSFC) - sfcflx_lw%upfx0 = fluxlwUP_clrsky(:,iSFC) - sfcflx_lw%dnfxc = fluxlwDOWN_allsky(:,iSFC) - sfcflx_lw%dnfx0 = fluxlwDOWN_clrsky(:,iSFC) + Diag%topflw(:)%upfxc = fluxlwUP_allsky(:,iTOA) + Diag%topflw(:)%upfx0 = fluxlwUP_clrsky(:,iTOA) + Radtend%sfcflw(:)%upfxc = fluxlwUP_allsky(:,iSFC) + Radtend%sfcflw(:)%upfx0 = fluxlwUP_clrsky(:,iSFC) + Radtend%sfcflw(:)%dnfxc = fluxlwDOWN_allsky(:,iSFC) + Radtend%sfcflw(:)%dnfx0 = fluxlwDOWN_clrsky(:,iSFC) ! Optional outputs if(l_fluxeslw2d) then @@ -194,13 +196,13 @@ subroutine GFS_rrtmgp_lw_post_run (Model, Grid, Radtend, Coupling, Diag, Statei if (Model%lslwr) then do i=1,im ! LW all-sky fluxes - Diag%fluxr(i,1 ) = Diag%fluxr(i,1 ) + Model%fhlwr * Diag%topflw(i)%upfxc ! total sky top lw up - Diag%fluxr(i,19) = Diag%fluxr(i,19) + Model%fhlwr * Radtend%sfcflw(i)%dnfxc ! total sky sfc lw dn - Diag%fluxr(i,20) = Diag%fluxr(i,20) + Model%fhlwr * Radtend%sfcflw(i)%upfxc ! total sky sfc lw up + Diag%fluxr(i,1 ) = Diag%fluxr(i,1 ) + Model%fhlwr * fluxlwUP_allsky( i,iTOA) ! total sky top lw up + Diag%fluxr(i,19) = Diag%fluxr(i,19) + Model%fhlwr * fluxlwDOWN_allsky(i,iSFC) ! total sky sfc lw dn + Diag%fluxr(i,20) = Diag%fluxr(i,20) + Model%fhlwr * fluxlwUP_allsky( i,iSFC) ! total sky sfc lw up ! LW clear-sky fluxes - Diag%fluxr(i,28) = Diag%fluxr(i,28) + Model%fhlwr * Diag%topflw(i)%upfx0 ! clear sky top lw up - Diag%fluxr(i,30) = Diag%fluxr(i,30) + Model%fhlwr * Radtend%sfcflw(i)%dnfx0 ! clear sky sfc lw dn - Diag%fluxr(i,33) = Diag%fluxr(i,33) + Model%fhlwr * Radtend%sfcflw(i)%upfx0 ! clear sky sfc lw up + Diag%fluxr(i,28) = Diag%fluxr(i,28) + Model%fhlwr * fluxlwUP_clrsky( i,iTOA) ! clear sky top lw up + Diag%fluxr(i,30) = Diag%fluxr(i,30) + Model%fhlwr * fluxlwDOWN_clrsky(i,iSFC) ! clear sky sfc lw dn + Diag%fluxr(i,33) = Diag%fluxr(i,33) + Model%fhlwr * fluxlwUP_clrsky( i,iSFC) ! clear sky sfc lw up enddo do i=1,im diff --git a/physics/GFS_rrtmgp_lw_post.meta b/physics/GFS_rrtmgp_lw_post.meta index c159b9ae9..3eb1e0953 100644 --- a/physics/GFS_rrtmgp_lw_post.meta +++ b/physics/GFS_rrtmgp_lw_post.meta @@ -172,31 +172,6 @@ kind = kind_phys intent = in optional = F -[hlwc] - standard_name = RRTMGP_lw_heating_rate_all_sky - long_name = RRTMGP longwave all sky heating rate - units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = out - optional = F -[topflx_lw] - standard_name = lw_fluxes_top_atmosphere - long_name = longwave total sky fluxes at the top of the atm - units = W m-2 - dimensions = (horizontal_dimension) - type = topflw_type - intent = inout - optional = F -[sfcflx_lw] - standard_name = lw_fluxes_sfc - long_name = longwave total sky fluxes at the Earth surface - units = W m-2 - dimensions = (horizontal_dimension) - type = sfcflw_type - intent = inout - optional = F [flxprf_lw] standard_name = RRTMGP_lw_fluxes long_name = lw fluxes total sky / csk and up / down at levels diff --git a/physics/GFS_rrtmgp_lw_pre.F90 b/physics/GFS_rrtmgp_lw_pre.F90 index deddc7013..e78301585 100644 --- a/physics/GFS_rrtmgp_lw_pre.F90 +++ b/physics/GFS_rrtmgp_lw_pre.F90 @@ -9,6 +9,7 @@ module GFS_rrtmgp_lw_pre GFS_sfcprop_type, & ! Surface fields GFS_grid_type, & ! Grid and interpolation related data GFS_statein_type, & ! + GFS_Interstitial_type, & ! GFS_radtend_type ! Radiation tendencies needed in physics use module_radiation_surface, only: & setemis ! Routine to compute surface-emissivity @@ -31,7 +32,7 @@ end subroutine GFS_rrtmgp_lw_pre_init !! \htmlinclude GFS_rrtmgp_lw_pre.html !! subroutine GFS_rrtmgp_lw_pre_run (Model, Grid, Sfcprop, Statein, ncol, p_lay, p_lev, & - tv_lay, relhum, tracer, lw_gas_props, Radtend, aerosolslw, aerodp, errmsg, errflg) + tv_lay, relhum, tracer, lw_gas_props, Radtend, Interstitial, aerosolslw, aerodp, errmsg, errflg) ! Inputs type(GFS_control_type), intent(in) :: & @@ -58,6 +59,8 @@ subroutine GFS_rrtmgp_lw_pre_run (Model, Grid, Sfcprop, Statein, ncol, p_lay, ! Outputs type(GFS_radtend_type), intent(inout) :: & Radtend ! Fortran DDT containing FV3-GFS radiation tendencies + type(GFS_interstitial_type), intent(inout) :: & + Interstitial real(kind_phys), dimension(ncol,Model%levs,lw_gas_props%get_nband(),NF_AELW), intent(out) ::& aerosolslw ! Aerosol radiative properties in each SW band. real(kind_phys), dimension(ncol,NSPC1), intent(inout) :: & @@ -97,7 +100,7 @@ subroutine GFS_rrtmgp_lw_pre_run (Model, Grid, Sfcprop, Statein, ncol, p_lay, Sfcprop%zorl, Sfcprop%tsfc,Sfcprop%tsfc, Sfcprop%hprime(:,1), NCOL, & Radtend%semis) do iBand=1,lw_gas_props%get_nband() - Radtend%sfc_emiss_byband(iBand,1:NCOL) = Radtend%semis(1:NCOL) + Interstitial%sfc_emiss_byband(iBand,1:NCOL) = Radtend%semis(1:NCOL) enddo ! ####################################################################################### @@ -105,7 +108,7 @@ subroutine GFS_rrtmgp_lw_pre_run (Model, Grid, Sfcprop, Statein, ncol, p_lay, ! ####################################################################################### call setaer(p_lev, p_lay, Statein%prslk(1:NCOL,iSFC:iTOA), tv_lay, relhum, & Sfcprop%slmsk, tracer, Grid%xlon, Grid%xlat, ncol, Model%levs, Model%levs+1, & - .false., Model%lslwr, aerosolssw2, aerosolslw, aerodp) + .true., Model%lslwr, aerosolssw2, aerosolslw, aerodp) end subroutine GFS_rrtmgp_lw_pre_run diff --git a/physics/GFS_rrtmgp_lw_pre.meta b/physics/GFS_rrtmgp_lw_pre.meta index e7954f4ec..2ea7c6e54 100644 --- a/physics/GFS_rrtmgp_lw_pre.meta +++ b/physics/GFS_rrtmgp_lw_pre.meta @@ -9,6 +9,14 @@ type = GFS_control_type intent = in optional = F +[Interstitial] + standard_name = GFS_interstitial_type_instance + long_name = derived type GFS_interstitial_type in FV3 + units = DDT + dimensions = () + type = GFS_interstitial_type + intent = inout + optional = F [Grid] standard_name = GFS_grid_type_instance long_name = instance of derived type GFS_grid_type diff --git a/physics/GFS_rrtmgp_pre.F90 b/physics/GFS_rrtmgp_pre.F90 index a501b196b..c38b8b99a 100644 --- a/physics/GFS_rrtmgp_pre.F90 +++ b/physics/GFS_rrtmgp_pre.F90 @@ -232,15 +232,16 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, do iLay=iSFC+1,iTOA t_lev(iCol,iLay) = (t_lay(iCol,iLay)+t_lay(iCol,iLay-1))/2._kind_phys enddo - t_lev(iCol,iTOA+1) = t_lev(iCol,iTOA) + (p_lev(iCol,iTOA+1)-p_lev(iCOL,iTOA))*& - (t_lev(iCol,iTOA)-t_lay(iCOL,iTOA))/(p_lev(iCol,iTOA)-p_lay(iCOL,iTOA)) + t_lev(iCol,iTOA+1) = t_lay(iCol,iTOA) + !t_lev(iCol,iTOA+1) = t_lev(iCol,iTOA) + (p_lev(iCol,iTOA+1)-p_lev(iCOL,iTOA))*& + ! (t_lev(iCol,iTOA)-t_lay(iCOL,iTOA))/(p_lev(iCol,iTOA)-p_lay(iCOL,iTOA)) enddo ! Guard against case when model uppermost model layer higher than rrtmgp allows. where(p_lev(1:nCol,iTOA+1) .lt. rrtmgp_minP) ! Set to RRTMGP min(pressure/temperature) p_lev(1:nCol,iTOA+1) = spread(rrtmgp_minP, dim=1,ncopies=ncol) - t_lev(1:nCol,iTOA+1) = spread(rrtmgp_minT, dim=1,ncopies=ncol) +! t_lev(1:nCol,iTOA+1) = spread(rrtmgp_minT, dim=1,ncopies=ncol) ! Recompute layer pressure/temperature. p_lay(1:NCOL,iTOA) = 0.5_kind_phys*(p_lev(1:NCOL,iTOA) + p_lev(1:NCOL,iTOA+1)) t_lay(1:NCOL,iTOA) = 0.5_kind_phys*(t_lev(1:NCOL,iTOA) + t_lev(1:NCOL,iTOA+1)) diff --git a/physics/GFS_rrtmgp_sw_post.F90 b/physics/GFS_rrtmgp_sw_post.F90 index ed272f530..56d063641 100644 --- a/physics/GFS_rrtmgp_sw_post.F90 +++ b/physics/GFS_rrtmgp_sw_post.F90 @@ -7,7 +7,8 @@ module GFS_rrtmgp_sw_post GFS_grid_type, & GFS_radtend_type, & GFS_diag_type, & - GFS_statein_type + GFS_statein_type, & + GFS_interstitial_type use module_radiation_aerosols, only: NSPC1 use module_radsw_parameters, only: topfsw_type, sfcfsw_type, profsw_type, cmpfsw_type ! RRTMGP DDT's @@ -27,14 +28,16 @@ end subroutine GFS_rrtmgp_sw_post_init !> \section arg_table_GFS_rrtmgp_sw_post_run !! \htmlinclude GFS_rrtmgp_sw_post.html !! - subroutine GFS_rrtmgp_sw_post_run (Model, Grid, Diag, Radtend, Coupling, Statein, & + subroutine GFS_rrtmgp_sw_post_run (Model, Interstitial, Grid, Diag, Radtend, Coupling, Statein, & scmpsw, im, p_lev, sw_gas_props, nday, idxday, fluxswUP_allsky, fluxswDOWN_allsky,& fluxswUP_clrsky, fluxswDOWN_clrsky, raddt, aerodp, cldsa, mbota, mtopa, cld_frac, & - cldtausw, hswc, topflx_sw, sfcflx_sw, flxprf_sw, hsw0, errmsg, errflg) + cldtausw, flxprf_sw, hsw0, errmsg, errflg) ! Inputs type(GFS_control_type), intent(in) :: & Model ! Fortran DDT containing FV3-GFS model control parameters + type(GFS_Interstitial_type), intent(in) :: & + Interstitial type(GFS_grid_type), intent(in) :: & Grid ! Fortran DDT containing FV3-GFS grid and interpolation related data type(GFS_coupling_type), intent(inout) :: & @@ -71,24 +74,26 @@ subroutine GFS_rrtmgp_sw_post_run (Model, Grid, Diag, Radtend, Coupling, Statein real(kind_phys), dimension(im,Model%levs), intent(in) :: & cld_frac, & ! Total cloud fraction in each layer cldtausw ! approx .55mu band layer cloud optical depth + real(kind_phys),dimension(size(Grid%xlon,1), Model%levs) :: & + hswc ! Outputs (mandatory) character(len=*), intent(out) :: & errmsg integer, intent(out) :: & errflg - real(kind_phys),dimension(size(Grid%xlon,1), Model%levs),intent(out) :: & - hswc ! Shortwave all-sky heating-rate (K/sec) - type(topfsw_type), dimension(size(Grid%xlon,1)), intent(inout) :: & - topflx_sw ! radiation fluxes at top, components: - ! upfxc - total sky upward flux at top (w/m2) - ! upfx0 - clear sky upward flux at top (w/m2) - type(sfcfsw_type), dimension(size(Grid%xlon,1)), intent(inout) :: & - sfcflx_sw ! radiation fluxes at sfc, components: - ! upfxc - total sky upward flux at sfc (w/m2) - ! upfx0 - clear sky upward flux at sfc (w/m2) - ! dnfxc - total sky downward flux at sfc (w/m2) - ! dnfx0 - clear sky downward flux at sfc (w/m2) +! real(kind_phys),dimension(size(Grid%xlon,1), Model%levs),intent(out) :: & +! hswc ! Shortwave all-sky heating-rate (K/sec) +! type(topfsw_type), dimension(size(Grid%xlon,1)), intent(inout) :: & +! topflx_sw ! radiation fluxes at top, components: +! ! upfxc - total sky upward flux at top (w/m2) +! ! upfx0 - clear sky upward flux at top (w/m2) +! type(sfcfsw_type), dimension(size(Grid%xlon,1)), intent(inout) :: & +! sfcflx_sw ! radiation fluxes at sfc, components: +! ! upfxc - total sky upward flux at sfc (w/m2) +! ! upfx0 - clear sky upward flux at sfc (w/m2) +! ! dnfxc - total sky downward flux at sfc (w/m2) +! ! dnfx0 - clear sky downward flux at sfc (w/m2) ! Outputs (optional) real(kind_phys), dimension(size(Grid%xlon,1), Model%levs), optional, intent(inout) :: & @@ -127,18 +132,19 @@ subroutine GFS_rrtmgp_sw_post_run (Model, Grid, Diag, Radtend, Coupling, Statein ! ####################################################################################### top_at_1 = (p_lev(1,1) .lt. p_lev(1, Model%levs)) if (top_at_1) then - iSFC = Model%levs + iSFC = Model%levs+1 iTOA = 1 else iSFC = 1 - iTOA = Model%levs + iTOA = Model%levs+1 endif + ! ####################################################################################### ! Compute SW heating-rates ! ####################################################################################### - ! Initialize outputs - hswc(:,:) = 0. - topflx_sw = topfsw_type ( 0., 0., 0. ) + ! Initialize + hswc = 0 + Diag%topfsw = topfsw_type ( 0., 0., 0. ) ! sfcflx_sw = sfcfsw_type ( 0., 0., 0., 0. ) if (l_clrskysw_hr) then hsw0(:,:) = 0. @@ -170,13 +176,13 @@ subroutine GFS_rrtmgp_sw_post_run (Model, Grid, Diag, Radtend, Coupling, Statein ! Copy fluxes from RRTGMP types into model radiation types. ! Mandatory outputs - topflx_sw(idxday)%upfxc = fluxswUP_allsky(idxday,iTOA) - topflx_sw(idxday)%upfx0 = fluxswUP_clrsky(idxday,iTOA) - topflx_sw(idxday)%dnfxc = fluxswDOWN_allsky(idxday,iTOA) - sfcflx_sw(idxday)%upfxc = fluxswUP_allsky(idxday,iSFC) - sfcflx_sw(idxday)%upfx0 = fluxswUP_clrsky(idxday,iSFC) - sfcflx_sw(idxday)%dnfxc = fluxswDOWN_allsky(idxday,iSFC) - sfcflx_sw(idxday)%dnfx0 = fluxswDOWN_clrsky(idxday,iSFC) + Diag%topfsw(idxday)%upfxc = fluxswUP_allsky(idxday,iTOA) + Diag%topfsw(idxday)%upfx0 = fluxswUP_clrsky(idxday,iTOA) + Diag%topfsw(idxday)%dnfxc = fluxswDOWN_allsky(idxday,iTOA) + Radtend%sfcfsw(idxday)%upfxc = fluxswUP_allsky(idxday,iSFC) + Radtend%sfcfsw(idxday)%upfx0 = fluxswUP_clrsky(idxday,iSFC) + Radtend%sfcfsw(idxday)%dnfxc = fluxswDOWN_allsky(idxday,iSFC) + Radtend%sfcfsw(idxday)%dnfx0 = fluxswDOWN_clrsky(idxday,iSFC) ! Optional output if(l_fluxessw2D) then @@ -211,10 +217,10 @@ subroutine GFS_rrtmgp_sw_post_run (Model, Grid, Diag, Radtend, Coupling, Statein Coupling%visbmdi(i) = scmpsw(i)%visbm Coupling%visdfdi(i) = scmpsw(i)%visdf - Coupling%nirbmui(i) = scmpsw(i)%nirbm * Radtend%sfc_alb_nir_dir(1,i) - Coupling%nirdfui(i) = scmpsw(i)%nirdf * Radtend%sfc_alb_nir_dif(1,i) - Coupling%visbmui(i) = scmpsw(i)%visbm * Radtend%sfc_alb_uvvis_dir(1,i) - Coupling%visdfui(i) = scmpsw(i)%visdf * Radtend%sfc_alb_uvvis_dif(1,i) + Coupling%nirbmui(i) = scmpsw(i)%nirbm * Interstitial%sfc_alb_nir_dir(1,i) + Coupling%nirdfui(i) = scmpsw(i)%nirdf * Interstitial%sfc_alb_nir_dif(1,i) + Coupling%visbmui(i) = scmpsw(i)%visbm * Interstitial%sfc_alb_uvvis_dir(1,i) + Coupling%visdfui(i) = scmpsw(i)%visdf * Interstitial%sfc_alb_uvvis_dif(1,i) enddo else ! if_nday_block Radtend%htrsw(:,:) = 0.0 @@ -266,23 +272,23 @@ subroutine GFS_rrtmgp_sw_post_run (Model, Grid, Diag, Radtend, Coupling, Statein if (Radtend%coszen(i) > 0.) then ! SW all-sky fluxes tem0d = Model%fhswr * Radtend%coszdg(i) / Radtend%coszen(i) - Diag%fluxr(i,2 ) = Diag%fluxr(i,2) + Diag%topfsw(i)%upfxc * tem0d ! total sky top sw up - Diag%fluxr(i,3 ) = Diag%fluxr(i,3) + Radtend%sfcfsw(i)%upfxc * tem0d ! total sky sfc sw up - Diag%fluxr(i,4 ) = Diag%fluxr(i,4) + Radtend%sfcfsw(i)%dnfxc * tem0d ! total sky sfc sw dn + Diag%fluxr(i,2 ) = Diag%fluxr(i,2) + fluxswUP_allsky( idxday(i),iTOA) * tem0d ! total sky top sw up + Diag%fluxr(i,3 ) = Diag%fluxr(i,3) + fluxswUP_allsky( idxday(i),iSFC) * tem0d ! total sky sfc sw up + Diag%fluxr(i,4 ) = Diag%fluxr(i,4) + fluxswDOWN_allsky(idxday(i),iSFC) * tem0d ! total sky sfc sw dn ! SW uv-b fluxes Diag%fluxr(i,21) = Diag%fluxr(i,21) + scmpsw(i)%uvbfc * tem0d ! total sky uv-b sw dn Diag%fluxr(i,22) = Diag%fluxr(i,22) + scmpsw(i)%uvbf0 * tem0d ! clear sky uv-b sw dn ! SW TOA incoming fluxes - Diag%fluxr(i,23) = Diag%fluxr(i,23) + Diag%topfsw(i)%dnfxc * tem0d ! top sw dn + Diag%fluxr(i,23) = Diag%fluxr(i,23) + fluxswDOWN_allsky(idxday(i),iTOA) * tem0d ! top sw dn ! SW SFC flux components Diag%fluxr(i,24) = Diag%fluxr(i,24) + scmpsw(i)%visbm * tem0d ! uv/vis beam sw dn Diag%fluxr(i,25) = Diag%fluxr(i,25) + scmpsw(i)%visdf * tem0d ! uv/vis diff sw dn Diag%fluxr(i,26) = Diag%fluxr(i,26) + scmpsw(i)%nirbm * tem0d ! nir beam sw dn Diag%fluxr(i,27) = Diag%fluxr(i,27) + scmpsw(i)%nirdf * tem0d ! nir diff sw dn ! SW clear-sky fluxes - Diag%fluxr(i,29) = Diag%fluxr(i,29) + Diag%topfsw(i)%upfx0 * tem0d ! clear sky top sw up - Diag%fluxr(i,31) = Diag%fluxr(i,31) + Radtend%sfcfsw(i)%upfx0 * tem0d ! clear sky sfc sw up - Diag%fluxr(i,32) = Diag%fluxr(i,32) + Radtend%sfcfsw(i)%dnfx0 * tem0d ! clear sky sfc sw dn + Diag%fluxr(i,29) = Diag%fluxr(i,29) + fluxswUP_clrsky( idxday(i),iTOA) * tem0d ! clear sky top sw up + Diag%fluxr(i,31) = Diag%fluxr(i,31) + fluxswUP_clrsky( idxday(i),iSFC) * tem0d ! clear sky sfc sw up + Diag%fluxr(i,32) = Diag%fluxr(i,32) + fluxswDOWN_clrsky(idxday(i),iSFC) * tem0d ! clear sky sfc sw dn endif enddo diff --git a/physics/GFS_rrtmgp_sw_post.meta b/physics/GFS_rrtmgp_sw_post.meta index 83f1deaad..bff311cb7 100644 --- a/physics/GFS_rrtmgp_sw_post.meta +++ b/physics/GFS_rrtmgp_sw_post.meta @@ -9,6 +9,14 @@ type = GFS_control_type intent = in optional = F +[Interstitial] + standard_name = GFS_interstitial_type_instance + long_name = derived type GFS_interstitial_type in FV3 + units = DDT + dimensions = () + type = GFS_interstitial_type + intent = in + optional = F [Grid] standard_name = GFS_grid_type_instance long_name = instance of derived type GFS_grid_type @@ -195,31 +203,6 @@ type = ty_gas_optics_rrtmgp intent = in optional = F -[hswc] - standard_name = RRTMGP_sw_heating_rate_all_sky - long_name = RRTMGP shortwave all sky heating rate - units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - optional = F - intent = out -[topflx_sw] - standard_name = sw_fluxes_top_atmosphere - long_name = shortwave total sky fluxes at the top of the atm - units = W m-2 - dimensions = (horizontal_dimension) - type = topfsw_type - intent = inout - optional = F -[sfcflx_sw] - standard_name = sw_fluxes_sfc - long_name = shortwave total sky fluxes at the Earth surface - units = W m-2 - dimensions = (horizontal_dimension) - type = sfcfsw_type - intent = inout - optional = F [flxprf_sw] standard_name = RRTMGP_sw_fluxes long_name = sw fluxes total sky / csk and up / down at levels diff --git a/physics/GFS_rrtmgp_sw_pre.F90 b/physics/GFS_rrtmgp_sw_pre.F90 index 1bbf0d3f1..6c30a288e 100644 --- a/physics/GFS_rrtmgp_sw_pre.F90 +++ b/physics/GFS_rrtmgp_sw_pre.F90 @@ -10,7 +10,8 @@ module GFS_rrtmgp_sw_pre GFS_grid_type, & ! Grid and interpolation related data GFS_coupling_type, & ! GFS_statein_type, & ! - GFS_radtend_type ! Radiation tendencies needed in physics + GFS_radtend_type, & ! Radiation tendencies needed in physics + GFS_interstitial_type use module_radiation_astronomy,only: & coszmn ! Function to compute cos(SZA) use module_radiation_surface, only: & @@ -37,13 +38,15 @@ end subroutine GFS_rrtmgp_sw_pre_init !> \section arg_table_GFS_rrtmgp_sw_pre_run !! \htmlinclude GFS_rrtmgp_sw_pre.html !! - subroutine GFS_rrtmgp_sw_pre_run (Model, Grid, Sfcprop, Statein, ncol, p_lay, & + subroutine GFS_rrtmgp_sw_pre_run (Model, Interstitial, Grid, Sfcprop, Statein, ncol, p_lay, & p_lev, tv_lay, relhum, tracer, sw_gas_props, nday, idxday, alb1d, RadTend, & Coupling, aerosolssw, aerodp, errmsg, errflg) ! Inputs type(GFS_control_type), intent(in) :: & Model ! Fortran DDT containing FV3-GFS model control parameters + type(GFS_Interstitial_type),intent(inout) :: & + Interstitial type(GFS_grid_type), intent(in) :: & Grid ! Fortran DDT containing FV3-GFS grid and interpolation related data type(GFS_sfcprop_type), intent(in) :: & @@ -154,10 +157,10 @@ subroutine GFS_rrtmgp_sw_pre_run (Model, Grid, Sfcprop, Statein, ncol, p_lay, ! Spread across all SW bands do iBand=1,sw_gas_props%get_nband() - Radtend%sfc_alb_nir_dir(iBand,1:NCOL) = sfcalb(1:NCOL,1) - Radtend%sfc_alb_nir_dif(iBand,1:NCOL) = sfcalb(1:NCOL,2) - Radtend%sfc_alb_uvvis_dir(iBand,1:NCOL) = sfcalb(1:NCOL,3) - Radtend%sfc_alb_uvvis_dif(iBand,1:NCOL) = sfcalb(1:NCOL,4) + Interstitial%sfc_alb_nir_dir(iBand,1:NCOL) = sfcalb(1:NCOL,1) + Interstitial%sfc_alb_nir_dif(iBand,1:NCOL) = sfcalb(1:NCOL,2) + Interstitial%sfc_alb_uvvis_dir(iBand,1:NCOL) = sfcalb(1:NCOL,3) + Interstitial%sfc_alb_uvvis_dif(iBand,1:NCOL) = sfcalb(1:NCOL,4) enddo ! ####################################################################################### @@ -165,7 +168,7 @@ subroutine GFS_rrtmgp_sw_pre_run (Model, Grid, Sfcprop, Statein, ncol, p_lay, ! ####################################################################################### call setaer(p_lev, p_lay, Statein%prslk(1:NCOL,iSFC:iTOA), tv_lay, relhum, & Sfcprop%slmsk, tracer, Grid%xlon, Grid%xlat, NCOL, Model%levs, Model%levs+1, & - Model%lsswr, .false., aerosolssw2, aerosolslw, aerodp) + Model%lsswr, .true., aerosolssw2, aerosolslw, aerodp) ! Store aerosol optical properties ! SW. diff --git a/physics/GFS_rrtmgp_sw_pre.meta b/physics/GFS_rrtmgp_sw_pre.meta index 05a76151b..91c6a8670 100644 --- a/physics/GFS_rrtmgp_sw_pre.meta +++ b/physics/GFS_rrtmgp_sw_pre.meta @@ -9,6 +9,14 @@ type = GFS_control_type intent = in optional = F +[Interstitial] + standard_name = GFS_interstitial_type_instance + long_name = derived type GFS_interstitial_type in FV3 + units = DDT + dimensions = () + type = GFS_interstitial_type + intent = inout + optional = F [Grid] standard_name = GFS_grid_type_instance long_name = instance of derived type GFS_grid_type diff --git a/physics/rrtmgp_lw_clrallsky_driver.F90 b/physics/rrtmgp_lw_clrallsky_driver.F90 index 004a3fb90..e27a008bf 100644 --- a/physics/rrtmgp_lw_clrallsky_driver.F90 +++ b/physics/rrtmgp_lw_clrallsky_driver.F90 @@ -2,7 +2,7 @@ ! ########################################################################################### module rrtmgp_lw_clrallsky_driver use machine, only: kind_phys - use GFS_typedefs, only: GFS_control_type, GFS_radtend_type + use GFS_typedefs, only: GFS_control_type, GFS_Interstitial_type use mo_rte_kind, only: wl use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp use mo_cloud_optics, only: ty_cloud_optics @@ -27,7 +27,7 @@ end subroutine rrtmgp_lw_clrallsky_driver_init !! \section arg_table_rrtmgp_lw_clrallsky_driver_run !! \htmlinclude rrtmgp_lw_clrallsky_driver.html !! - subroutine rrtmgp_lw_clrallsky_driver_run(Model, Radtend, ncol, lw_gas_props, p_lay, t_lay,& + subroutine rrtmgp_lw_clrallsky_driver_run(Model, Interstitial, ncol, lw_gas_props, p_lay, t_lay,& p_lev, skt, gas_concentrations, lw_optical_props_clouds, lw_optical_props_aerosol, & lslwr, fluxlwUP_allsky, fluxlwDOWN_allsky, fluxlwUP_clrsky, fluxlwDOWN_clrsky, hlw0, & hlwb, errmsg, errflg) @@ -35,8 +35,8 @@ subroutine rrtmgp_lw_clrallsky_driver_run(Model, Radtend, ncol, lw_gas_props, p_ ! Inputs type(GFS_control_type), intent(in) :: & Model - type(GFS_radtend_type), intent(in) :: & - Radtend ! Fortran DDT containing FV3-GFS radiation tendencies + type(GFS_Interstitial_type), intent(in) :: & + Interstitial ! Fortran DDT containing FV3-GFS radiation tendencies integer, intent(in) :: & ncol ! Number of horizontal gridpoints real(kind_phys), dimension(ncol,model%levs), intent(in) :: & @@ -109,7 +109,7 @@ subroutine rrtmgp_lw_clrallsky_driver_run(Model, Radtend, ncol, lw_gas_props, p_ t_lay, & ! IN - temperature at layer interfaes (K) p_lev, & ! IN - pressure at layer centers (Pa) skt, & ! IN - skin temperature (K) - Radtend%sfc_emiss_byband, & ! IN - surface emissivity in each LW band + Interstitial%sfc_emiss_byband, & ! IN - surface emissivity in each LW band lw_optical_props_clouds, & ! IN - DDT containing cloud optical information flux_allsky, & ! OUT - Fluxes, all-sky, 3D (nCol,model%levs,nBand) flux_clrsky, & ! OUT - Fluxes, clear-sky, 3D (nCol,model%levs,nBand) diff --git a/physics/rrtmgp_lw_clrallsky_driver.meta b/physics/rrtmgp_lw_clrallsky_driver.meta index c72d2b11f..eea012c87 100644 --- a/physics/rrtmgp_lw_clrallsky_driver.meta +++ b/physics/rrtmgp_lw_clrallsky_driver.meta @@ -9,12 +9,12 @@ type = GFS_control_type intent = in optional = F -[Radtend] - standard_name = GFS_radtend_type_instance - long_name = instance of derived type GFS_radtend_type +[Interstitial] + standard_name = GFS_interstitial_type_instance + long_name = derived type GFS_interstitial_type in FV3 units = DDT dimensions = () - type = GFS_radtend_type + type = GFS_interstitial_type intent = in optional = F [ncol] diff --git a/physics/rrtmgp_lw_gas_optics.F90 b/physics/rrtmgp_lw_gas_optics.F90 index 3ae94dea1..9e1387ed8 100644 --- a/physics/rrtmgp_lw_gas_optics.F90 +++ b/physics/rrtmgp_lw_gas_optics.F90 @@ -1,6 +1,6 @@ module rrtmgp_lw_gas_optics use machine, only: kind_phys - use GFS_typedefs, only: GFS_control_type, GFS_radtend_type + use GFS_typedefs, only: GFS_control_type use mo_rte_kind, only: wl use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp use mo_gas_concentrations, only: ty_gas_concs @@ -21,7 +21,7 @@ module rrtmgp_lw_gas_optics !! \section arg_table_rrtmgp_lw_gas_optics_init !! \htmlinclude rrtmgp_lw_gas_optics.html !! - subroutine rrtmgp_lw_gas_optics_init(Model, Radtend, mpicomm, mpirank, mpiroot, lw_gas_props, & + subroutine rrtmgp_lw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, lw_gas_props, & ipsdlw0, errmsg, errflg) use netcdf @@ -32,8 +32,6 @@ subroutine rrtmgp_lw_gas_optics_init(Model, Radtend, mpicomm, mpirank, mpiroot, ! Inputs type(GFS_control_type), intent(in) :: & Model ! DDT containing model control parameters - type(GFS_radtend_type), intent(in) :: & - Radtend ! DDT containing FV3-GFS radiation tendencies integer,intent(in) :: & mpicomm, & ! MPI communicator mpirank, & ! Current MPI rank @@ -376,37 +374,6 @@ subroutine rrtmgp_lw_gas_optics_init(Model, Radtend, mpicomm, mpirank, mpiroot, call MPI_BCAST(scale_by_complement_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, ierr) call MPI_BCAST(minor_scales_with_density_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, ierr) call MPI_BCAST(scale_by_complement_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, ierr) - !allocate(temp_log_array1(nminor_absorber_intervals_lower)) - !where(minor_scales_with_density_lower) - ! temp_log_array1 = 1 - !elsewhere - ! temp_log_array1 = 0 - !end where - !call MPI_BCAST(temp_log_array1, size(temp_log_array1), MPI_INTEGER, mpiroot, mpicomm, ierr) - ! - !allocate(temp_log_array2(nminor_absorber_intervals_lower)) - !where(scale_by_complement_lower) - ! temp_log_array2 = 1 - !elsewhere - ! temp_log_array2 = 0 - !end where - !call MPI_BCAST(temp_log_array2, size(temp_log_array2), MPI_INTEGER, mpiroot, mpicomm, ierr) - ! - !allocate(temp_log_array3(nminor_absorber_intervals_upper)) - !where(minor_scales_with_density_upper) - ! temp_log_array3 = 1 - !elsewhere - ! temp_log_array3 = 0 - !end where - !call MPI_BCAST(temp_log_array3, size(temp_log_array3), MPI_INTEGER, mpiroot, mpicomm, ierr) - ! - !allocate(temp_log_array4(nminor_absorber_intervals_upper)) - !where(scale_by_complement_upper) - ! temp_log_array4 = 1 - !elsewhere - ! temp_log_array4 = 0 - !end where - !call MPI_BCAST(temp_log_array4, size(temp_log_array4), MPI_INTEGER, mpiroot, mpicomm, ierr) #endif ! Initialize gas concentrations and gas optics class with data @@ -441,15 +408,13 @@ end subroutine rrtmgp_lw_gas_optics_init !! \section arg_table_rrtmgp_lw_gas_optics_run !! \htmlinclude rrtmgp_lw_gas_optics.html !! - subroutine rrtmgp_lw_gas_optics_run(Model, Radtend, lw_gas_props, ncol, p_lay, p_lev, t_lay,& + subroutine rrtmgp_lw_gas_optics_run(Model, lw_gas_props, ncol, p_lay, p_lev, t_lay,& t_lev, skt, gas_concentrations, lslwr, lw_optical_props_clrsky, sources, & errmsg, errflg) ! Inputs type(GFS_control_type), intent(in) :: & Model ! DDT containing model control parameters - type(GFS_radtend_type), intent(in) :: & - Radtend type(ty_gas_optics_rrtmgp),intent(in) :: & lw_gas_props ! DDT containing spectral information for RRTMGP LW radiation scheme @@ -496,7 +461,7 @@ subroutine rrtmgp_lw_gas_optics_run(Model, Radtend, lw_gas_props, ncol, p_lay, p ! p_lev, & ! IN - ! t_lay, & ! IN - ! gas_concentrations, & ! IN - - ! Radtend%toa_src_lw)) ! OUT - + ! Interstitial%toa_src_lw)) ! OUT - ! Gas-optics (djs asks pincus: I think it makes sense to have a generic gas_optics interface in ! ty_gas_optics_rrtmgp, just as in ty_gas_optics. diff --git a/physics/rrtmgp_lw_gas_optics.meta b/physics/rrtmgp_lw_gas_optics.meta index 027fa7e58..ee15ca3bf 100644 --- a/physics/rrtmgp_lw_gas_optics.meta +++ b/physics/rrtmgp_lw_gas_optics.meta @@ -9,14 +9,6 @@ type = GFS_control_type intent = in optional = F -[Radtend] - standard_name = GFS_radtend_type_instance - long_name = instance of derived type GFS_radtend_type - units = DDT - dimensions = () - type = GFS_radtend_type - intent = in - optional = F [mpirank] standard_name = mpi_rank long_name = current MPI rank @@ -87,14 +79,6 @@ type = GFS_control_type intent = in optional = F -[Radtend] - standard_name = GFS_radtend_type_instance - long_name = instance of derived type GFS_radtend_type - units = DDT - dimensions = () - type = GFS_radtend_type - intent = in - optional = F [lw_gas_props] standard_name = coefficients_for_lw_gas_optics long_name = DDT containing spectral information for RRTMGP LW radiation scheme diff --git a/physics/rrtmgp_lw_rte.F90 b/physics/rrtmgp_lw_rte.F90 index ce2ef93fd..30d7cbf06 100644 --- a/physics/rrtmgp_lw_rte.F90 +++ b/physics/rrtmgp_lw_rte.F90 @@ -2,7 +2,7 @@ ! ########################################################################################### module rrtmgp_lw_rte use machine, only: kind_phys - use GFS_typedefs, only: GFS_control_type, GFS_radtend_type, GFS_statein_type + use GFS_typedefs, only: GFS_control_type, GFS_interstitial_type, GFS_statein_type use mo_rte_kind, only: wl use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp use mo_cloud_optics, only: ty_cloud_optics @@ -27,15 +27,15 @@ end subroutine rrtmgp_lw_rte_init !! \section arg_table_rrtmgp_lw_rte_run !! \htmlinclude rrtmgp_lw_rte.html !! - subroutine rrtmgp_lw_rte_run(Model, Statein, Radtend, ncol, lw_gas_props, p_lay, t_lay, p_lev, & + subroutine rrtmgp_lw_rte_run(Model, Statein, Interstitial, ncol, lw_gas_props, p_lay, t_lay, p_lev, & skt, sources, lw_optical_props_clrsky, lw_optical_props_clouds, lw_optical_props_aerosol, lslwr,& fluxlwUP_allsky, fluxlwDOWN_allsky, fluxlwUP_clrsky, fluxlwDOWN_clrsky, hlw0, hlwb, errmsg, errflg) ! Inputs type(GFS_control_type), intent(in) :: & Model ! Fortran DDT containing FV3-GFS model control parameters - type(GFS_radtend_type), intent(in) :: & - Radtend ! Fortran DDT containing FV3-GFS radiation tendencies + type(GFS_Interstitial_type), intent(in) :: & + Interstitial ! Fortran DDT containing FV3-GFS radiation tendencies type(GFS_statein_type), intent(in) :: & Statein ! Fortran DDT containing FV3-GFS prognostic state data in from dycore integer, intent(in) :: & @@ -117,7 +117,7 @@ subroutine rrtmgp_lw_rte_run(Model, Statein, Radtend, ncol, lw_gas_props, p_lay, lw_optical_props_clrsky, & ! IN - optical-properties top_at_1, & ! IN - veritcal ordering flag sources, & ! IN - source function - Radtend%sfc_emiss_byband, & ! IN - surface emissivity in each LW band + Interstitial%sfc_emiss_byband, & ! IN - surface emissivity in each LW band flux_clrsky)) ! Store fluxes fluxlwUP_clrsky = flux_clrsky%flux_up @@ -131,7 +131,7 @@ subroutine rrtmgp_lw_rte_run(Model, Statein, Radtend, ncol, lw_gas_props, p_lay, lw_optical_props_clrsky, & ! IN - optical-properties top_at_1, & ! IN - veritcal ordering flag sources, & ! IN - source function - Radtend%sfc_emiss_byband, & ! IN - surface emissivity in each LW band + Interstitial%sfc_emiss_byband, & ! IN - surface emissivity in each LW band flux_allsky)) ! Store fluxes fluxlwUP_allsky = flux_allsky%flux_up diff --git a/physics/rrtmgp_lw_rte.meta b/physics/rrtmgp_lw_rte.meta index 25beee51d..d60ed545b 100644 --- a/physics/rrtmgp_lw_rte.meta +++ b/physics/rrtmgp_lw_rte.meta @@ -9,12 +9,12 @@ type = GFS_control_type intent = in optional = F -[Radtend] - standard_name = GFS_radtend_type_instance - long_name = instance of derived type GFS_radtend_type +[Interstitial] + standard_name = GFS_interstitial_type_instance + long_name = derived type GFS_interstitial_type in FV3 units = DDT dimensions = () - type = GFS_radtend_type + type = GFS_interstitial_type intent = in optional = F [Statein] diff --git a/physics/rrtmgp_sw_clrallsky_driver.F90 b/physics/rrtmgp_sw_clrallsky_driver.F90 index df45c1a6b..3e7b94640 100644 --- a/physics/rrtmgp_sw_clrallsky_driver.F90 +++ b/physics/rrtmgp_sw_clrallsky_driver.F90 @@ -2,7 +2,7 @@ ! ########################################################################################### module rrtmgp_sw_clrallsky_driver use machine, only: kind_phys - use GFS_typedefs, only: GFS_control_type, GFS_radtend_type + use GFS_typedefs, only: GFS_control_type, GFS_radtend_type, GFS_interstitial_type use mo_rte_kind, only: wl use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp use mo_cloud_optics, only: ty_cloud_optics @@ -29,13 +29,14 @@ end subroutine rrtmgp_sw_clrallsky_driver_init !! \section arg_table_rrtmgp_sw_clrallsky_driver_run !! \htmlinclude rrtmgp_sw_clrallsky_driver.html !! - subroutine rrtmgp_sw_clrallsky_driver_run(Model, Radtend, ncol, sw_gas_props, p_lay, t_lay,& + subroutine rrtmgp_sw_clrallsky_driver_run(Model, Interstitial, Radtend, ncol, sw_gas_props, p_lay, t_lay,& p_lev, gas_concentrations,sw_optical_props_clouds, sw_optical_props_aerosol, lsswr, & nday, idxday, hsw0, hswb, scmpsw, & fluxswUP_allsky, fluxswDOWN_allsky, fluxswUP_clrsky, fluxswDOWN_clrsky, errmsg, errflg) ! Inputs type(GFS_control_type), intent(in) :: Model + type(GFS_interstitial_type), intent(in) :: Interstitial type(GFS_radtend_type), intent(in) :: Radtend integer, intent(in) :: & ncol, & ! Number of horizontal gridpoints @@ -156,8 +157,8 @@ subroutine rrtmgp_sw_clrallsky_driver_run(Model, Radtend, ncol, sw_gas_props, p_ t_lay(idxday,1:Model%levs), & ! IN - temperature at layer interfaes (K) p_lev(idxday,1:Model%levs+1), & ! IN - pressure at layer centers (Pa) Radtend%coszen(idxday), & ! IN - Cosine of solar zenith angle - Radtend%sfc_alb_nir_dir(:,idxday), & ! IN - Shortwave surface albedo (direct) - Radtend%sfc_alb_nir_dif(:,idxday), & ! IN - Shortwave surface albedo (diffuse) + Interstitial%sfc_alb_nir_dir(:,idxday), & ! IN - Shortwave surface albedo (direct) + Interstitial%sfc_alb_nir_dif(:,idxday), & ! IN - Shortwave surface albedo (diffuse) sw_optical_props_clouds_daylit, & ! IN - DDT containing cloud optical information flux_allsky, & ! OUT - Fluxes, all-sky, 3D (nCol,Model%levs,nBand) flux_clrsky, & ! OUT - Fluxes, clear-sky, 3D (nCol,Model%levs,nBand) diff --git a/physics/rrtmgp_sw_clrallsky_driver.meta b/physics/rrtmgp_sw_clrallsky_driver.meta index 888179efd..092bdb417 100644 --- a/physics/rrtmgp_sw_clrallsky_driver.meta +++ b/physics/rrtmgp_sw_clrallsky_driver.meta @@ -9,6 +9,14 @@ type = GFS_control_type intent = in optional = F +[Interstitial] + standard_name = GFS_interstitial_type_instance + long_name = derived type GFS_interstitial_type in FV3 + units = DDT + dimensions = () + type = GFS_interstitial_type + intent = in + optional = F [Radtend] standard_name = GFS_radtend_type_instance long_name = instance of derived type GFS_radtend_type diff --git a/physics/rrtmgp_sw_gas_optics.F90 b/physics/rrtmgp_sw_gas_optics.F90 index 049ab03d4..022661016 100644 --- a/physics/rrtmgp_sw_gas_optics.F90 +++ b/physics/rrtmgp_sw_gas_optics.F90 @@ -1,6 +1,6 @@ module rrtmgp_sw_gas_optics use machine, only: kind_phys - use GFS_typedefs, only: GFS_control_type, GFS_radtend_type + use GFS_typedefs, only: GFS_control_type, GFS_interstitial_type use module_radiation_gases, only: NF_VGAS use mo_rte_kind, only: wl use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp @@ -18,7 +18,7 @@ module rrtmgp_sw_gas_optics !! \section arg_table_rrtmgp_sw_gas_optics_init !! \htmlinclude rrtmgp_sw_gas_optics.html !! - subroutine rrtmgp_sw_gas_optics_init(Model, Radtend, mpicomm, mpirank, mpiroot, sw_gas_props, & + subroutine rrtmgp_sw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, sw_gas_props, & ipsdsw0, errmsg, errflg) use netcdf #ifdef MPI @@ -28,8 +28,6 @@ subroutine rrtmgp_sw_gas_optics_init(Model, Radtend, mpicomm, mpirank, mpiroot, ! Inputs type(GFS_control_type), intent(in) :: & Model ! DDT containing model control parameters - type(GFS_radtend_type), intent(in) :: & - Radtend integer,intent(in) :: & mpicomm, & ! MPI communicator mpirank, & ! Current MPI rank @@ -373,37 +371,6 @@ subroutine rrtmgp_sw_gas_optics_init(Model, Radtend, mpicomm, mpirank, mpiroot, call MPI_BCAST(scale_by_complement_lower_sw, nminor_absorber_intervals_lower_sw, MPI_LOGICAL, mpiroot, mpicomm, ierr) call MPI_BCAST(minor_scales_with_density_upper_sw, nminor_absorber_intervals_upper_sw, MPI_LOGICAL, mpiroot, mpicomm, ierr) call MPI_BCAST(scale_by_complement_upper_sw, nminor_absorber_intervals_upper_sw, MPI_LOGICAL, mpiroot, mpicomm, ierr) - !allocate(temp_log_array1(nminor_absorber_intervals_lower_sw)) - !where(minor_scales_with_density_lower_sw) - ! temp_log_array1 = 1 - !elsewhere - ! temp_log_array1 = 0 - !end where - !call MPI_BCAST(temp_log_array1, size(temp_log_array1), MPI_INTEGER, mpiroot, mpicomm, ierr) - ! - !allocate(temp_log_array2(nminor_absorber_intervals_lower_sw)) - !where(scale_by_complement_lower_sw) - ! temp_log_array2 = 1 - !elsewhere - ! temp_log_array2 = 0 - !end where - !call MPI_BCAST(temp_log_array2, size(temp_log_array2), MPI_INTEGER, mpiroot, mpicomm, ierr) - ! - !allocate(temp_log_array3(nminor_absorber_intervals_upper_sw)) - !where(minor_scales_with_density_upper_sw) - ! temp_log_array3 = 1 - !elsewhere - ! temp_log_array3 = 0 - !end where - !call MPI_BCAST(temp_log_array3, size(temp_log_array3), MPI_INTEGER, mpiroot, mpicomm, ierr) - !! - !allocate(temp_log_array4(nminor_absorber_intervals_upper_sw)) - !where(scale_by_complement_upper_sw) - ! temp_log_array4 = 1 - !elsewhere - ! temp_log_array4 = 0 - !end where - !call MPI_BCAST(temp_log_array4, size(temp_log_array4), MPI_INTEGER, mpiroot, mpicomm, ierr) #endif ! Initialize gas concentrations and gas optics class with data @@ -440,14 +407,14 @@ end subroutine rrtmgp_sw_gas_optics_init !! \section arg_table_rrtmgp_sw_gas_optics_run !! \htmlinclude rrtmgp_sw_gas_optics.html !! - subroutine rrtmgp_sw_gas_optics_run(Model, Radtend, sw_gas_props, ncol, p_lay, p_lev, t_lay, t_lev, & + subroutine rrtmgp_sw_gas_optics_run(Model, Interstitial, sw_gas_props, ncol, p_lay, p_lev, t_lay, t_lev, & gas_concentrations, lsswr, sw_optical_props_clrsky, errmsg, errflg) ! Inputs type(GFS_control_type), intent(in) :: & Model ! DDT containing model control parameters - type(GFS_radtend_type), intent(in) :: & - Radtend + type(GFS_Interstitial_type),intent(inout) :: & + Interstitial type(ty_gas_optics_rrtmgp),intent(in) :: & sw_gas_props ! DDT containing spectral information for RRTMGP SW radiation scheme @@ -489,7 +456,7 @@ subroutine rrtmgp_sw_gas_optics_run(Model, Radtend, sw_gas_props, ncol, p_lay, p t_lay, & ! gas_concentrations, & ! sw_optical_props_clrsky, & ! - Radtend%toa_src_sw)) ! + Interstitial%toa_src_sw)) ! ! Compute boundary-condition (only for low ceiling models, set in GFS_typedefs.F90) !call check_error_msg('rrtmgp_sw_gas_optics_run',compute_bc(& @@ -498,7 +465,7 @@ subroutine rrtmgp_sw_gas_optics_run(Model, Radtend, sw_gas_props, ncol, p_lay, p ! p_lev, & ! IN - ! t_lay, & ! IN - ! gas_concentrations, & ! IN - - ! Radtend%toa_src_sw & ! OUT - + ! Interstitial%toa_src_sw & ! OUT - ! mu0 = Radtend%coszen)) end subroutine rrtmgp_sw_gas_optics_run diff --git a/physics/rrtmgp_sw_gas_optics.meta b/physics/rrtmgp_sw_gas_optics.meta index b18f1490b..b509b267a 100644 --- a/physics/rrtmgp_sw_gas_optics.meta +++ b/physics/rrtmgp_sw_gas_optics.meta @@ -9,14 +9,6 @@ type = GFS_control_type intent = in optional = F -[Radtend] - standard_name = GFS_radtend_type_instance - long_name = instance of derived type GFS_radtend_type - units = DDT - dimensions = () - type = GFS_radtend_type - intent = in - optional = F [mpirank] standard_name = mpi_rank long_name = current MPI rank @@ -87,13 +79,13 @@ type = GFS_control_type intent = in optional = F -[Radtend] - standard_name = GFS_radtend_type_instance - long_name = instance of derived type GFS_radtend_type +[Interstitial] + standard_name = GFS_interstitial_type_instance + long_name = derived type GFS_interstitial_type in FV3 units = DDT dimensions = () - type = GFS_radtend_type - intent = in + type = GFS_interstitial_type + intent = inout optional = F [sw_gas_props] standard_name = coefficients_for_sw_gas_optics diff --git a/physics/rrtmgp_sw_rte.F90 b/physics/rrtmgp_sw_rte.F90 index 56d846845..29e9fa4de 100644 --- a/physics/rrtmgp_sw_rte.F90 +++ b/physics/rrtmgp_sw_rte.F90 @@ -2,7 +2,7 @@ ! ########################################################################################### module rrtmgp_sw_rte use machine, only: kind_phys - use GFS_typedefs, only: GFS_control_type, GFS_radtend_type, GFS_statein_type + use GFS_typedefs, only: GFS_control_type, GFS_radtend_type, GFS_statein_type, GFS_interstitial_type use mo_rte_kind, only: wl use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp use mo_cloud_optics, only: ty_cloud_optics @@ -29,7 +29,7 @@ end subroutine rrtmgp_sw_rte_init !! \section arg_table_rrtmgp_sw_rte_run !! \htmlinclude rrtmgp_sw_rte.html !! - subroutine rrtmgp_sw_rte_run(Model, Radtend, Statein, ncol, sw_gas_props, p_lay, t_lay, & + subroutine rrtmgp_sw_rte_run(Model, Interstitial, Radtend, Statein, ncol, sw_gas_props, p_lay, t_lay, & p_lev, gas_concentrations, sw_optical_props_clrsky, sw_optical_props_clouds, & sw_optical_props_aerosol, lsswr, nday, idxday, hsw0, hswb, scmpsw, & fluxswUP_allsky, fluxswDOWN_allsky, fluxswUP_clrsky, fluxswDOWN_clrsky, errmsg, errflg) @@ -37,6 +37,8 @@ subroutine rrtmgp_sw_rte_run(Model, Radtend, Statein, ncol, sw_gas_props, p_lay, ! Inputs type(GFS_control_type), intent(in) :: & Model + type(GFS_interstitial_type), intent(in) :: & + Interstitial type(GFS_radtend_type), intent(in) :: & Radtend type(GFS_statein_type), intent(in) :: & @@ -178,9 +180,9 @@ subroutine rrtmgp_sw_rte_run(Model, Radtend, Statein, ncol, sw_gas_props, p_lay, sw_optical_props_clrsky_daylit, & ! IN - optical-properties top_at_1, & ! IN - veritcal ordering flag Radtend%coszen(idxday), & ! IN - Cosine of solar zenith angle - Radtend%toa_src_sw(idxday,:), & ! IN - incident solar flux at TOA - Radtend%sfc_alb_nir_dir(:,idxday), & ! IN - Shortwave surface albedo (direct) - Radtend%sfc_alb_nir_dif(:,idxday), & ! IN - Shortwave surface albedo (diffuse) + Interstitial%toa_src_sw(idxday,:), & ! IN - incident solar flux at TOA + Interstitial%sfc_alb_nir_dir(:,idxday), & ! IN - Shortwave surface albedo (direct) + Interstitial%sfc_alb_nir_dif(:,idxday), & ! IN - Shortwave surface albedo (diffuse) flux_clrsky)) ! OUT - Fluxes, clear-sky, 3D (nCol,Model%levs,nBand) ! Store fluxes fluxswUP_clrsky(idxday,:) = flux_clrsky%flux_up @@ -193,14 +195,17 @@ subroutine rrtmgp_sw_rte_run(Model, Radtend, Statein, ncol, sw_gas_props, p_lay, sw_optical_props_clrsky_daylit, & ! IN - optical-properties top_at_1, & ! IN - veritcal ordering flag Radtend%coszen(idxday), & ! IN - Cosine of solar zenith angle - Radtend%toa_src_sw(idxday,:), & ! IN - incident solar flux at TOA - Radtend%sfc_alb_nir_dir(:,idxday), & ! IN - Shortwave surface albedo (direct) - Radtend%sfc_alb_nir_dif(:,idxday), & ! IN - Shortwave surface albedo (diffuse) + Interstitial%toa_src_sw(idxday,:), & ! IN - incident solar flux at TOA + Interstitial%sfc_alb_nir_dir(:,idxday), & ! IN - Shortwave surface albedo (direct) + Interstitial%sfc_alb_nir_dif(:,idxday), & ! IN - Shortwave surface albedo (diffuse) flux_allsky)) ! OUT - Fluxes, clear-sky, 3D (nCol,Model%levs,nBand) ! Store fluxes fluxswUP_allsky(idxday,:) = flux_allsky%flux_up fluxswDOWN_allsky(idxday,:) = flux_allsky%flux_dn - scmpsw(idxday)%nirbm = flux_allsky%flux_dn_dir(:,iSFC) + if ( l_scmpsw ) then + scmpsw(idxday)%nirbm = flux_allsky%flux_dn_dir(idxday,iSFC) !Interstitial%sfc_alb_nir_dir(iSFC,idxday) + scmpsw(idxday)%nirdf = flux_allsky%flux_dn(idxday,iSFC) - flux_allsky%flux_dn_dir(idxday,iSFC) !Interstitial%sfc_alb_nir_dif(iSFC,idxday) + endif endif end subroutine rrtmgp_sw_rte_run diff --git a/physics/rrtmgp_sw_rte.meta b/physics/rrtmgp_sw_rte.meta index 1e320ce0a..c1c098400 100644 --- a/physics/rrtmgp_sw_rte.meta +++ b/physics/rrtmgp_sw_rte.meta @@ -9,6 +9,14 @@ type = GFS_control_type intent = in optional = F +[Interstitial] + standard_name = GFS_interstitial_type_instance + long_name = derived type GFS_interstitial_type in FV3 + units = DDT + dimensions = () + type = GFS_interstitial_type + intent = in + optional = F [Radtend] standard_name = GFS_radtend_type_instance long_name = instance of derived type GFS_radtend_type From 54e00662f4af5abb518cd3b526438258b58dc6b0 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Thu, 7 Nov 2019 10:59:19 -0700 Subject: [PATCH 064/167] Added solar constant adjustment factor to incident SW TOA flux. GP SW downward fluxes now agree with baseline G downward fluxes. --- physics/GFS_rrtmgp_pre.F90 | 19 ++----------------- physics/GFS_rrtmgp_pre.meta | 16 ---------------- physics/rrtmgp_lw_gas_optics.F90 | 6 +----- physics/rrtmgp_sw_gas_optics.F90 | 19 +++++++++---------- physics/rrtmgp_sw_gas_optics.meta | 9 +++++++++ 5 files changed, 21 insertions(+), 48 deletions(-) diff --git a/physics/GFS_rrtmgp_pre.F90 b/physics/GFS_rrtmgp_pre.F90 index c38b8b99a..bdae5cdfd 100644 --- a/physics/GFS_rrtmgp_pre.F90 +++ b/physics/GFS_rrtmgp_pre.F90 @@ -50,7 +50,7 @@ module GFS_rrtmgp_pre ! RRTMGP types use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp use mo_gas_concentrations, only: ty_gas_concs - use rrtmgp_aux, only: check_error_msg, rrtmgp_minP, rrtmgp_minT + use rrtmgp_aux, only: check_error_msg!, rrtmgp_minP, rrtmgp_minT real(kind_phys), parameter :: & amd = 28.9644_kind_phys, & ! Molecular weight of dry-air (g/mol) @@ -117,7 +117,7 @@ end subroutine GFS_rrtmgp_pre_init !! \htmlinclude GFS_rrtmgp_pre.html !! subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, Tbd, & ! IN - ncol, lw_gas_props, sw_gas_props, & ! IN + ncol, & ! IN raddt, p_lay, t_lay, p_lev, t_lev, tsfg, tsfa, cld_frac, cld_lwp, & ! OUT cld_reliq, cld_iwp, cld_reice, cld_swp, cld_resnow, cld_rwp, cld_rerain, & ! OUT tv_lay, relhum, tracer, cldsa, mtopa, mbota, de_lgth, gas_concentrations, & ! OUT @@ -140,9 +140,6 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, Tbd ! Fortran DDT containing FV3-GFS data not yet assigned to a defined container integer, intent(in) :: & ncol ! Number of horizontal grid points - type(ty_gas_optics_rrtmgp),intent(in) :: & - lw_gas_props, & ! RRTMGP DDT containing spectral information for LW calculation - sw_gas_props ! RRTMGP DDT containing spectral information for SW calculation ! Outputs real(kind_phys), dimension(ncol,Model%levs), intent(out) :: & @@ -233,20 +230,8 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, t_lev(iCol,iLay) = (t_lay(iCol,iLay)+t_lay(iCol,iLay-1))/2._kind_phys enddo t_lev(iCol,iTOA+1) = t_lay(iCol,iTOA) - !t_lev(iCol,iTOA+1) = t_lev(iCol,iTOA) + (p_lev(iCol,iTOA+1)-p_lev(iCOL,iTOA))*& - ! (t_lev(iCol,iTOA)-t_lay(iCOL,iTOA))/(p_lev(iCol,iTOA)-p_lay(iCOL,iTOA)) enddo - ! Guard against case when model uppermost model layer higher than rrtmgp allows. - where(p_lev(1:nCol,iTOA+1) .lt. rrtmgp_minP) - ! Set to RRTMGP min(pressure/temperature) - p_lev(1:nCol,iTOA+1) = spread(rrtmgp_minP, dim=1,ncopies=ncol) -! t_lev(1:nCol,iTOA+1) = spread(rrtmgp_minT, dim=1,ncopies=ncol) - ! Recompute layer pressure/temperature. - p_lay(1:NCOL,iTOA) = 0.5_kind_phys*(p_lev(1:NCOL,iTOA) + p_lev(1:NCOL,iTOA+1)) - t_lay(1:NCOL,iTOA) = 0.5_kind_phys*(t_lev(1:NCOL,iTOA) + t_lev(1:NCOL,iTOA+1)) - end where - ! Compute layer pressure thicknes deltaP = p_lev(:,iSFC:iTOA)-p_lev(:,iSFC+1:iTOA+1) diff --git a/physics/GFS_rrtmgp_pre.meta b/physics/GFS_rrtmgp_pre.meta index e70d7400c..84fe20907 100644 --- a/physics/GFS_rrtmgp_pre.meta +++ b/physics/GFS_rrtmgp_pre.meta @@ -103,22 +103,6 @@ type = integer intent = in optional = F -[lw_gas_props] - standard_name = coefficients_for_lw_gas_optics - long_name = DDT containing spectral information for RRTMGP LW radiation scheme - units = DDT - dimensions = () - type = ty_gas_optics_rrtmgp - intent = in - optional = F -[sw_gas_props] - standard_name = coefficients_for_sw_gas_optics - long_name = DDT containing spectral information for RRTMGP SW radiation scheme - units = DDT - dimensions = () - type = ty_gas_optics_rrtmgp - intent = in - optional = F [raddt] standard_name = time_step_for_radiation long_name = radiation time step diff --git a/physics/rrtmgp_lw_gas_optics.F90 b/physics/rrtmgp_lw_gas_optics.F90 index 9e1387ed8..45910376f 100644 --- a/physics/rrtmgp_lw_gas_optics.F90 +++ b/physics/rrtmgp_lw_gas_optics.F90 @@ -7,7 +7,7 @@ module rrtmgp_lw_gas_optics use mo_source_functions, only: ty_source_func_lw use mo_optical_props, only: ty_optical_props_1scl use mo_compute_bc, only: compute_bc - use rrtmgp_aux, only: check_error_msg, rrtmgp_minP, rrtmgp_minT + use rrtmgp_aux, only: check_error_msg use netcdf ! Parameters @@ -391,10 +391,6 @@ subroutine rrtmgp_lw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, lw_gas_pr ! Set initial permutation seed for McICA, initially set to number of G-points ipsdlw0 = lw_gas_props%get_ngpt() - ! Store minimum pressure/temperature allowed by RRTMGP - rrtmgp_minP = lw_gas_props%get_press_min() - rrtmgp_minT = lw_gas_props%get_temp_min() - end subroutine rrtmgp_lw_gas_optics_init ! ######################################################################################### diff --git a/physics/rrtmgp_sw_gas_optics.F90 b/physics/rrtmgp_sw_gas_optics.F90 index 022661016..3e56f9201 100644 --- a/physics/rrtmgp_sw_gas_optics.F90 +++ b/physics/rrtmgp_sw_gas_optics.F90 @@ -5,7 +5,7 @@ module rrtmgp_sw_gas_optics use mo_rte_kind, only: wl use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp use mo_gas_concentrations, only: ty_gas_concs - use rrtmgp_aux, only: check_error_msg, rrtmgp_minP, rrtmgp_minT + use rrtmgp_aux, only: check_error_msg use mo_optical_props, only: ty_optical_props_2str use mo_compute_bc, only: compute_bc use netcdf @@ -106,7 +106,7 @@ subroutine rrtmgp_sw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, sw_gas_p ! Local variables integer :: status,ncid_sw,dimid,varID,iGas - integer,dimension(:),allocatable :: temp1,temp2,temp3,temp4, temp_log_array1, temp_log_array2, temp_log_array3, temp_log_array4 + integer,dimension(:),allocatable :: temp1,temp2,temp3,temp4 character(len=264) :: sw_gas_props_file ! Initialize @@ -390,10 +390,6 @@ subroutine rrtmgp_sw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, sw_gas_p ! Set initial permutation seed for McICA, initially set to number of G-points ipsdsw0 = sw_gas_props%get_ngpt() - ! Store minimum pressure/temperature allowed by RRTMGP - rrtmgp_minP = sw_gas_props%get_press_min() - rrtmgp_minT = sw_gas_props%get_temp_min() - end subroutine rrtmgp_sw_gas_optics_init ! ######################################################################################### @@ -408,14 +404,13 @@ end subroutine rrtmgp_sw_gas_optics_init !! \htmlinclude rrtmgp_sw_gas_optics.html !! subroutine rrtmgp_sw_gas_optics_run(Model, Interstitial, sw_gas_props, ncol, p_lay, p_lev, t_lay, t_lev, & - gas_concentrations, lsswr, sw_optical_props_clrsky, errmsg, errflg) + gas_concentrations, lsswr, solcon, sw_optical_props_clrsky, errmsg, errflg) ! Inputs type(GFS_control_type), intent(in) :: & Model ! DDT containing model control parameters type(GFS_Interstitial_type),intent(inout) :: & Interstitial - type(ty_gas_optics_rrtmgp),intent(in) :: & sw_gas_props ! DDT containing spectral information for RRTMGP SW radiation scheme integer,intent(in) :: & @@ -430,7 +425,8 @@ subroutine rrtmgp_sw_gas_optics_run(Model, Interstitial, sw_gas_props, ncol, p_l gas_concentrations ! RRTMGP DDT: trace gas concentrations (vmr) logical, intent(in) :: & lsswr ! Flag to calculate SW irradiances - + real(kind_phys), intent(in) :: & + solcon ! Solar constant ! Output character(len=*), intent(out) :: & errmsg ! Error message @@ -450,7 +446,7 @@ subroutine rrtmgp_sw_gas_optics_run(Model, Interstitial, sw_gas_props, ncol, p_l ! Gas-optics (djs asks pincus: I think it makes sense to have a generic gas_optics interface in ! ty_gas_optics_rrtmgp, just as in ty_gas_optics. - call check_error_msg('rrtmgp_sw_gas_optics_run',sw_gas_props%gas_optics_ext(& + call check_error_msg('rrtmgp_sw_gas_optics_run',sw_gas_props%gas_optics(& p_lay, & ! p_lev, & ! t_lay, & ! @@ -458,6 +454,9 @@ subroutine rrtmgp_sw_gas_optics_run(Model, Interstitial, sw_gas_props, ncol, p_l sw_optical_props_clrsky, & ! Interstitial%toa_src_sw)) ! + ! Scale incident flux + Interstitial%toa_src_sw = Interstitial%toa_src_sw*solcon/sum(Interstitial%toa_src_sw) + ! Compute boundary-condition (only for low ceiling models, set in GFS_typedefs.F90) !call check_error_msg('rrtmgp_sw_gas_optics_run',compute_bc(& ! sw_gas_props, & ! IN - diff --git a/physics/rrtmgp_sw_gas_optics.meta b/physics/rrtmgp_sw_gas_optics.meta index b509b267a..129f278e6 100644 --- a/physics/rrtmgp_sw_gas_optics.meta +++ b/physics/rrtmgp_sw_gas_optics.meta @@ -155,6 +155,15 @@ type = logical intent = in optional = F +[solcon] + standard_name = solar_constant + long_name = solar constant + units = W m-2 + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP From 50b82a57dc0b660adf1825f4f5982172c70104ae Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Wed, 20 Nov 2019 10:50:34 -0700 Subject: [PATCH 065/167] Delta-scaling added to SW calculation. --- physics/rrtmgp_sw_rte.F90 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/physics/rrtmgp_sw_rte.F90 b/physics/rrtmgp_sw_rte.F90 index 29e9fa4de..a01c9cb70 100644 --- a/physics/rrtmgp_sw_rte.F90 +++ b/physics/rrtmgp_sw_rte.F90 @@ -175,6 +175,7 @@ subroutine rrtmgp_sw_rte_run(Model, Interstitial, Radtend, Statein, ncol, sw_gas ! Compute clear-sky fluxes (if requested) ! Clear-sky fluxes are gas+aerosol call check_error_msg('rrtmgp_sw_rte_run',sw_optical_props_aerosol_daylit%increment(sw_optical_props_clrsky_daylit)) + call check_error_msg('rrtmgp_sw_rte_run',sw_optical_props_clrsky_daylit%delta_scale()) if (l_ClrSky_HR) then call check_error_msg('rrtmgp_sw_rte_run',rte_sw( & sw_optical_props_clrsky_daylit, & ! IN - optical-properties @@ -190,6 +191,7 @@ subroutine rrtmgp_sw_rte_run(Model, Interstitial, Radtend, Statein, ncol, sw_gas endif ! Compute all-sky fluxes + call check_error_msg('rrtmgp_sw_rte_run',sw_optical_props_clouds_daylit%delta_scale()) call check_error_msg('rrtmgp_sw_rte_run',sw_optical_props_clouds_daylit%increment(sw_optical_props_clrsky_daylit)) call check_error_msg('rrtmgp_sw_rte_run',rte_sw( & sw_optical_props_clrsky_daylit, & ! IN - optical-properties From 2752142a09002b57da48c8f21e94e7e1c9a8a0d9 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Tue, 3 Dec 2019 19:03:57 +0000 Subject: [PATCH 066/167] Cleaned up a tad. Added some diagnostics for debuggind in SCM. --- physics/GFS_rrtmgp_lw_pre.F90 | 17 ++--------- physics/GFS_rrtmgp_pre.F90 | 53 +++++++++++++++++++--------------- physics/GFS_rrtmgp_sw_post.F90 | 44 ++++++++++++++++++---------- physics/GFS_rrtmgp_sw_pre.F90 | 31 ++++++-------------- physics/rrtmgp_lw_rte.F90 | 32 ++++++++++---------- physics/rrtmgp_sw_rte.F90 | 38 ++++++++++++------------ 6 files changed, 104 insertions(+), 111 deletions(-) diff --git a/physics/GFS_rrtmgp_lw_pre.F90 b/physics/GFS_rrtmgp_lw_pre.F90 index e78301585..5300b21b5 100644 --- a/physics/GFS_rrtmgp_lw_pre.F90 +++ b/physics/GFS_rrtmgp_lw_pre.F90 @@ -71,28 +71,15 @@ subroutine GFS_rrtmgp_lw_pre_run (Model, Grid, Sfcprop, Statein, ncol, p_lay, errflg ! Error flag ! Local - integer :: iSFC, iTOA - logical :: top_at_1 real(kind_phys), dimension(ncol, Model%levs, Model%rrtmgp_nBandsSW, NF_AESW) :: & aerosolssw2 + ! Initialize CCPP error handling variables errmsg = '' errflg = 0 if (.not. Model%lslwr) return - ! ####################################################################################### - ! What is vertical ordering? - ! ####################################################################################### - top_at_1 = (Statein%prsi(1,1) .lt. Statein%prsi(1, Model%levs)) - if (top_at_1) then - iSFC = Model%levs - iTOA = 1 - else - iSFC = 1 - iTOA = Model%levs - endif - ! ####################################################################################### ! Call module_radiation_surface::setemis(),to setup surface emissivity for LW radiation. ! ####################################################################################### @@ -106,7 +93,7 @@ subroutine GFS_rrtmgp_lw_pre_run (Model, Grid, Sfcprop, Statein, ncol, p_lay, ! ####################################################################################### ! Call module_radiation_aerosols::setaer(),to setup aerosols property profile ! ####################################################################################### - call setaer(p_lev, p_lay, Statein%prslk(1:NCOL,iSFC:iTOA), tv_lay, relhum, & + call setaer(p_lev, p_lay, Statein%prslk(1:NCOL,:), tv_lay, relhum, & Sfcprop%slmsk, tracer, Grid%xlon, Grid%xlat, ncol, Model%levs, Model%levs+1, & .true., Model%lslwr, aerosolssw2, aerosolslw, aerodp) diff --git a/physics/GFS_rrtmgp_pre.F90 b/physics/GFS_rrtmgp_pre.F90 index bdae5cdfd..aa0d2c007 100644 --- a/physics/GFS_rrtmgp_pre.F90 +++ b/physics/GFS_rrtmgp_pre.F90 @@ -213,38 +213,43 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, ! ####################################################################################### ! Compute some fields needed by RRTMGP ! ####################################################################################### - + + ! Water-vapor mixing-ratio + q_lay(1:ncol,:) = max( 1.e-6, Statein%qgrs(:,:,1)) + ! Pressure at layer-interface - p_lev(1:NCOL,iSFC:iTOA+1) = Statein%prsi(1:NCOL,1:Model%levs+1) - ! + p_lev(1:NCOL,:) = Statein%prsi(1:NCOL,:) + ! Pressure at layer-center - p_lay(1:NCOL,iSFC:iTOA) = Statein%prsl(1:NCOL,1:Model%levs) - ! + p_lay(1:NCOL,:) = Statein%prsl(1:NCOL,:) + ! Temperature at layer-center - t_lay(1:NCOL,iSFC:iTOA) = Statein%tgrs(1:NCOL,1:Model%levs) + t_lay(1:NCOL,:) = Statein%tgrs(1:NCOL,:) + ! ! Temperature at layer-interfaces - t_lev(1:NCOL,iSFC) = Sfcprop%tsfc(1:NCOL) - do iCol=1,NCOL - do iLay=iSFC+1,iTOA - t_lev(iCol,iLay) = (t_lay(iCol,iLay)+t_lay(iCol,iLay-1))/2._kind_phys - enddo - t_lev(iCol,iTOA+1) = t_lay(iCol,iTOA) - enddo - + if (top_at_1) then + t_lev(1:NCOL,1) = t_lay(1:NCOL,iTOA) + t_lev(1:NCOL,2:iSFC) = (t_lay(1:NCOL,2:iSFC)+t_lay(1:NCOL,1:iSFC-1))/2._kind_phys + t_lev(1:NCOL,iSFC+1) = Sfcprop%tsfc(1:NCOL) + else + t_lev(1:NCOL,1) = Sfcprop%tsfc(1:NCOL) + t_lev(1:NCOL,2:iTOA) = (t_lay(1:NCOL,2:iTOA)+t_lay(1:NCOL,1:iTOA-1))/2._kind_phys + t_lev(1:NCOL,iTOA+1) = t_lay(1:NCOL,iTOA) + endif + ! Compute layer pressure thicknes - deltaP = p_lev(:,iSFC:iTOA)-p_lev(:,iSFC+1:iTOA+1) + deltaP = abs(p_lev(:,2:model%levs+1)-p_lev(:,1:model%levs)) ! Compute a bunch of thermodynamic fields needed by the macrophysics schemes. Relative humidity, ! saturation mixing-ratio, vapor mixing-ratio, virtual temperature, layer thickness,... do iCol=1,NCOL - do iLay=iSFC,iTOA - es = min( Statein%prsl(iCol,iLay), fpvs( Statein%tgrs(iCol,iLay) ) ) ! fpvs and prsl in pa - qs = max( QMIN, eps * es / (Statein%prsl(iCol,iLay) + epsm1*es) ) - relhum(iCol,iLay) = max( 0._kind_phys, min( 1._kind_phys, max(QMIN, Statein%qgrs(iCol,iLay,1))/qs ) ) + do iLay=1,Model%levs + es = min( p_lay(iCol,iLay), fpvs( t_lay(iCol,iLay) ) ) ! fpvs and prsl in pa + qs = max( QMIN, eps * es / (p_lay(iCol,iLay) + epsm1*es) ) + relhum(iCol,iLay) = max( 0._kind_phys, min( 1._kind_phys, max(QMIN, q_lay(iCol,iLay))/qs ) ) qs_lay(iCol,iLay) = qs - q_lay(iCol,iLay) = max( 1.e-6, Statein%qgrs(iCol,iLay,1) ) - tv_lay(iCol,iLay) = Statein%tgrs(iCol,iLay) * (1._kind_phys + fvirt*q_lay(iCol,iLay)) + tv_lay(iCol,iLay) = t_lay(iCol,iLay) * (1._kind_phys + fvirt*q_lay(iCol,iLay)) deltaZ(iCol,iLay) = (rog*0.001) * (log(p_lev(iCol,iLay)) - log(p_lev(iCol,iLay+1))) * tv_lay(iCol,iLay) enddo enddo @@ -254,18 +259,18 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, ! ####################################################################################### ! First recast remaining all tracers (except sphum) forcing them all to be positive do j = 2, model%NTRAC - tracer(1:NCOL,1:Model%levs,j) = max(0.0, Statein%qgrs(1:NCOL,1:Model%levs,j)) + tracer(1:NCOL,:,j) = max(0.0, Statein%qgrs(1:NCOL,:,j)) enddo if (Model%ntoz > 0) then - do iLay=iSFC,iTOA + do iLay=1,Model%levs do iCol=1,NCOL o3_lay(iCol,iLay) = max( QMIN, tracer(iCol,iLay,Model%ntoz) ) enddo enddo ! OR Use climatological ozone data else - call getozn (Statein%prslk(1:NCOL,iSFC:iTOA), Grid%xlat, NCOL, Model%levs, o3_lay) + call getozn (Statein%prslk(1:NCOL,:), Grid%xlat, NCOL, Model%levs, o3_lay) endif ! ####################################################################################### diff --git a/physics/GFS_rrtmgp_sw_post.F90 b/physics/GFS_rrtmgp_sw_post.F90 index 56d063641..ab08087a6 100644 --- a/physics/GFS_rrtmgp_sw_post.F90 +++ b/physics/GFS_rrtmgp_sw_post.F90 @@ -144,17 +144,17 @@ subroutine GFS_rrtmgp_sw_post_run (Model, Interstitial, Grid, Diag, Radtend, Cou ! ####################################################################################### ! Initialize hswc = 0 - Diag%topfsw = topfsw_type ( 0., 0., 0. ) - ! sfcflx_sw = sfcfsw_type ( 0., 0., 0., 0. ) + Diag%topfsw = topfsw_type ( 0., 0., 0. ) + Radtend%sfcfsw = sfcfsw_type ( 0., 0., 0., 0. ) if (l_clrskysw_hr) then hsw0(:,:) = 0. endif if (l_fluxessw2D) then flxprf_sw = profsw_type ( 0., 0., 0., 0. ) endif - !if (l_sfcfluxessw1D) then - ! scmpsw = cmpfsw_type (0.,0.,0.,0.,0.,0.) - !endif + if (l_sfcfluxessw1D) then + scmpsw = cmpfsw_type (0.,0.,0.,0.,0.,0.) + endif if (Model%lsswr .and. nDay .gt. 0) then ! Clear-sky heating-rate (optional) @@ -162,7 +162,7 @@ subroutine GFS_rrtmgp_sw_post_run (Model, Interstitial, Grid, Diag, Radtend, Cou call check_error_msg('GFS_rrtmgp_post',compute_heating_rate( & fluxswUP_clrsky(idxday,:), & fluxswDOWN_clrsky(idxday,:), & - p_lev(idxday,1:Model%levs+1), & + p_lev(idxday,:), & thetaTendClrSky)) hsw0(idxday,:)=thetaTendClrSky endif @@ -170,12 +170,15 @@ subroutine GFS_rrtmgp_sw_post_run (Model, Interstitial, Grid, Diag, Radtend, Cou call check_error_msg('GFS_rrtmgp_post',compute_heating_rate( & fluxswUP_allsky(idxday,:), & fluxswDOWN_allsky(idxday,:), & - p_lev(idxday,1:Model%levs+1), & + p_lev(idxday,:), & thetaTendAllSky)) hswc(idxday,:) = thetaTendAllSky ! Copy fluxes from RRTGMP types into model radiation types. ! Mandatory outputs + write(*,"(a11,2i8)") "iTOA/iSFC: ",iTOA,iSFC + write(*,*) "fluxswDOWN_allsky: ",fluxswDOWN_allsky(idxday,:) + write(*,*) "fluxswDOWN_clrsky: ",fluxswDOWN_clrsky(idxday,:) Diag%topfsw(idxday)%upfxc = fluxswUP_allsky(idxday,iTOA) Diag%topfsw(idxday)%upfx0 = fluxswUP_clrsky(idxday,iTOA) Diag%topfsw(idxday)%dnfxc = fluxswDOWN_allsky(idxday,iTOA) @@ -202,7 +205,7 @@ subroutine GFS_rrtmgp_sw_post_run (Model, Interstitial, Grid, Diag, Radtend, Cou do k = 1, Model%levs Radtend%htrsw(1:im,k) = hswc(1:im,k) enddo - ! Clear-sk heating rate + ! Clear-sky heating rate if (Model%swhtr) then do k = 1, Model%levs Radtend%swhc(1:im,k) = hsw0(1:im,k) @@ -272,23 +275,34 @@ subroutine GFS_rrtmgp_sw_post_run (Model, Interstitial, Grid, Diag, Radtend, Cou if (Radtend%coszen(i) > 0.) then ! SW all-sky fluxes tem0d = Model%fhswr * Radtend%coszdg(i) / Radtend%coszen(i) - Diag%fluxr(i,2 ) = Diag%fluxr(i,2) + fluxswUP_allsky( idxday(i),iTOA) * tem0d ! total sky top sw up - Diag%fluxr(i,3 ) = Diag%fluxr(i,3) + fluxswUP_allsky( idxday(i),iSFC) * tem0d ! total sky sfc sw up - Diag%fluxr(i,4 ) = Diag%fluxr(i,4) + fluxswDOWN_allsky(idxday(i),iSFC) * tem0d ! total sky sfc sw dn + !write(*,"(a23,3f10.6)") 'In GFS_rrtmgp_sw_post: ',Diag%topfsw(i)%dnfxc, tem0d,Diag%fluxr(i,23) + !write(*,"(a23,f20.15)") 'In GFS_rrtmgp_sw_post: ',Model%fhswr + !Diagfluxr(i,2 ) = Diag%fluxr(i,2) + fluxswUP_allsky( i,iTOA) * tem0d ! total sky top sw up + !Diag%fluxr(i,3 ) = Diag%fluxr(i,3) + fluxswUP_allsky( i,iSFC) * tem0d ! total sky sfc sw up + !Diag%fluxr(i,4 ) = Diag%fluxr(i,4) + fluxswDOWN_allsky(i,iSFC) * tem0d ! total sky sfc sw dn + Diag%fluxr(i,2 ) = Diag%fluxr(i,2) + Diag%topfsw(i)%upfxc * tem0d ! total sky top sw up + Diag%fluxr(i,3 ) = Diag%fluxr(i,3) + Radtend%sfcfsw(i)%upfxc * tem0d + Diag%fluxr(i,4 ) = Diag%fluxr(i,4) + Radtend%sfcfsw(i)%dnfxc * tem0d ! total sky sfc sw dn ! SW uv-b fluxes Diag%fluxr(i,21) = Diag%fluxr(i,21) + scmpsw(i)%uvbfc * tem0d ! total sky uv-b sw dn Diag%fluxr(i,22) = Diag%fluxr(i,22) + scmpsw(i)%uvbf0 * tem0d ! clear sky uv-b sw dn ! SW TOA incoming fluxes - Diag%fluxr(i,23) = Diag%fluxr(i,23) + fluxswDOWN_allsky(idxday(i),iTOA) * tem0d ! top sw dn + !temiag%fluxr(i,23) = Diag%fluxr(i,23) + fluxswDOWN_allsky(i,iTOA) * tem0d ! top sw dn + Diag%fluxr(i,23) = Diag%fluxr(i,23) + Diag%topfsw(i)%dnfxc * tem0d ! top sw dn + write(*,"(a23,3f10.6)") 'In GFS_rrtmgp_sw_post: ',Diag%topfsw(i)%dnfxc, tem0d,Diag%fluxr(i,23) ! SW SFC flux components Diag%fluxr(i,24) = Diag%fluxr(i,24) + scmpsw(i)%visbm * tem0d ! uv/vis beam sw dn Diag%fluxr(i,25) = Diag%fluxr(i,25) + scmpsw(i)%visdf * tem0d ! uv/vis diff sw dn Diag%fluxr(i,26) = Diag%fluxr(i,26) + scmpsw(i)%nirbm * tem0d ! nir beam sw dn Diag%fluxr(i,27) = Diag%fluxr(i,27) + scmpsw(i)%nirdf * tem0d ! nir diff sw dn ! SW clear-sky fluxes - Diag%fluxr(i,29) = Diag%fluxr(i,29) + fluxswUP_clrsky( idxday(i),iTOA) * tem0d ! clear sky top sw up - Diag%fluxr(i,31) = Diag%fluxr(i,31) + fluxswUP_clrsky( idxday(i),iSFC) * tem0d ! clear sky sfc sw up - Diag%fluxr(i,32) = Diag%fluxr(i,32) + fluxswDOWN_clrsky(idxday(i),iSFC) * tem0d ! clear sky sfc sw dn + !Diag%fluxr(i,29) = Diag%fluxr(i,29) + fluxswUP_clrsky( i,iTOA) * tem0d ! clear sky top sw up + !Diag%fluxr(i,31) = Diag%fluxr(i,31) + fluxswUP_clrsky( i,iSFC) * tem0d ! clear sky sfc sw up + !Diag%fluxr(i,32) = Diag%fluxr(i,32) + fluxswDOWN_clrsky(i,iSFC) * tem0d ! clear sky sfc sw dn + Diag%fluxr(i,29) = Diag%fluxr(i,29) + Diag%topfsw(i)%upfx0 * tem0d + Diag%fluxr(i,31) = Diag%fluxr(i,31) + Radtend%sfcfsw(i)%upfx0 * tem0d + Diag%fluxr(i,32) = Diag%fluxr(i,32) + Radtend%sfcfsw(i)%dnfx0 * tem0d + endif enddo diff --git a/physics/GFS_rrtmgp_sw_pre.F90 b/physics/GFS_rrtmgp_sw_pre.F90 index 6c30a288e..ee3a69720 100644 --- a/physics/GFS_rrtmgp_sw_pre.F90 +++ b/physics/GFS_rrtmgp_sw_pre.F90 @@ -87,31 +87,18 @@ subroutine GFS_rrtmgp_sw_pre_run (Model, Interstitial, Grid, Sfcprop, Statein, errflg ! Error flag ! Local variables - integer :: i, j, iCol, iBand, iSFC, iTOA, iLay + integer :: i, j, iCol, iBand, iLay real(kind_phys), dimension(ncol, NF_ALBD) :: sfcalb real(kind_phys), dimension(ncol, Model%levs, sw_gas_props%get_nband(), NF_AESW) :: & aerosolssw2 real(kind_phys), dimension(ncol, Model%levs, Model%rrtmgp_nBandsLW, NF_AELW) :: & aerosolslw - logical :: top_at_1 ! Initialize CCPP error handling variables errmsg = '' errflg = 0 if (.not. Model%lsswr) return - - ! ####################################################################################### - ! What is vertical ordering? - ! ####################################################################################### - top_at_1 = (Statein%prsi(1,1) .lt. Statein%prsi(1, Model%levs)) - if (top_at_1) then - iSFC = Model%levs - iTOA = 1 - else - iSFC = 1 - iTOA = Model%levs - endif ! ####################################################################################### ! Compute cosine of zenith angle (only when SW is called) @@ -166,20 +153,20 @@ subroutine GFS_rrtmgp_sw_pre_run (Model, Interstitial, Grid, Sfcprop, Statein, ! ####################################################################################### ! Call module_radiation_aerosols::setaer(),to setup aerosols property profile ! ####################################################################################### - call setaer(p_lev, p_lay, Statein%prslk(1:NCOL,iSFC:iTOA), tv_lay, relhum, & + call setaer(p_lev, p_lay, Statein%prslk(1:NCOL,:), tv_lay, relhum, & Sfcprop%slmsk, tracer, Grid%xlon, Grid%xlat, NCOL, Model%levs, Model%levs+1, & Model%lsswr, .true., aerosolssw2, aerosolslw, aerodp) - + ! Store aerosol optical properties ! SW. ! For RRTMGP SW the bands are now ordered from [IR(band) -> nIR -> UV], in RRTMG the ! band ordering was [nIR -> UV -> IR(band)] - aerosolssw(1:NCOL,1:Model%levs,1,1) = aerosolssw2(1:NCOL,1:Model%levs,sw_gas_props%get_nband(),1) - aerosolssw(1:NCOL,1:Model%levs,1,2) = aerosolssw2(1:NCOL,1:Model%levs,sw_gas_props%get_nband(),2) - aerosolssw(1:NCOL,1:Model%levs,1,3) = aerosolssw2(1:NCOL,1:Model%levs,sw_gas_props%get_nband(),3) - aerosolssw(1:NCOL,1:Model%levs,2:sw_gas_props%get_nband(),1) = aerosolssw2(1:NCOL,1:Model%levs,1:sw_gas_props%get_nband()-1,1) - aerosolssw(1:NCOL,1:Model%levs,2:sw_gas_props%get_nband(),2) = aerosolssw2(1:NCOL,1:Model%levs,1:sw_gas_props%get_nband()-1,2) - aerosolssw(1:NCOL,1:Model%levs,2:sw_gas_props%get_nband(),3) = aerosolssw2(1:NCOL,1:Model%levs,1:sw_gas_props%get_nband()-1,3) + aerosolssw(1:NCOL,:,1,1) = aerosolssw2(1:NCOL,:,sw_gas_props%get_nband(),1) + aerosolssw(1:NCOL,:,1,2) = aerosolssw2(1:NCOL,:,sw_gas_props%get_nband(),2) + aerosolssw(1:NCOL,:,1,3) = aerosolssw2(1:NCOL,:,sw_gas_props%get_nband(),3) + aerosolssw(1:NCOL,:,2:sw_gas_props%get_nband(),1) = aerosolssw2(1:NCOL,:,1:sw_gas_props%get_nband()-1,1) + aerosolssw(1:NCOL,:,2:sw_gas_props%get_nband(),2) = aerosolssw2(1:NCOL,:,1:sw_gas_props%get_nband()-1,2) + aerosolssw(1:NCOL,:,2:sw_gas_props%get_nband(),3) = aerosolssw2(1:NCOL,:,1:sw_gas_props%get_nband()-1,3) end subroutine GFS_rrtmgp_sw_pre_run diff --git a/physics/rrtmgp_lw_rte.F90 b/physics/rrtmgp_lw_rte.F90 index 30d7cbf06..7265da45b 100644 --- a/physics/rrtmgp_lw_rte.F90 +++ b/physics/rrtmgp_lw_rte.F90 @@ -79,10 +79,10 @@ subroutine rrtmgp_lw_rte_run(Model, Statein, Interstitial, ncol, lw_gas_props, p ! Local variables type(ty_fluxes_byband) :: & flux_allsky, flux_clrsky - real(kind_phys), dimension(ncol,model%levs+1),target :: & - fluxLW_up_allsky, fluxLW_up_clrsky, fluxLW_dn_allsky, fluxLW_dn_clrsky real(kind_phys), dimension(ncol,model%levs+1,lw_gas_props%get_nband()),target :: & - fluxLWBB_up_allsky, fluxLWBB_dn_allsky + fluxLW_up_allsky, fluxLW_up_clrsky, fluxLW_dn_allsky, fluxLW_dn_clrsky +! real(kind_phys), dimension(ncol,model%levs+1,lw_gas_props%get_nband()),target :: & +! fluxLWBB_up_allsky, fluxLWBB_dn_allsky logical :: & l_ClrSky_HR, l_AllSky_HR_byband, top_at_1 @@ -92,22 +92,22 @@ subroutine rrtmgp_lw_rte_run(Model, Statein, Interstitial, ncol, lw_gas_props, p if (.not. lslwr) return ! Vertical ordering? - top_at_1 = (Statein%prsi(1,1) .lt. Statein%prsi(1, Model%levs)) + top_at_1 = (p_lev(1,1) .lt. p_lev(1, Model%levs)) ! Are any optional outputs requested? Need to know now to compute correct fluxes. l_ClrSky_HR = present(hlw0) l_AllSky_HR_byband = present(hlwb) ! Initialize RRTMGP DDT containing 2D(3D) fluxes - flux_allsky%flux_up => fluxLW_up_allsky - flux_allsky%flux_dn => fluxLW_dn_allsky - flux_clrsky%flux_up => fluxLW_up_clrsky - flux_clrsky%flux_dn => fluxLW_dn_clrsky + flux_allsky%bnd_flux_up => fluxLW_up_allsky + flux_allsky%bnd_flux_dn => fluxLW_dn_allsky + flux_clrsky%bnd_flux_up => fluxLW_up_clrsky + flux_clrsky%bnd_flux_dn => fluxLW_dn_clrsky ! Only calculate fluxes by-band, only when heating-rate profiles by band are requested. - if (l_AllSky_HR_byband) then - flux_allsky%bnd_flux_up => fluxLWBB_up_allsky - flux_allsky%bnd_flux_dn => fluxLWBB_dn_allsky - endif + !if (l_AllSky_HR_byband) then + ! flux_allsky%bnd_flux_up => fluxLWBB_up_allsky + ! flux_allsky%bnd_flux_dn => fluxLWBB_dn_allsky + !endif ! Compute clear-sky fluxes (if requested) ! Clear-sky fluxes are gas+aerosol @@ -120,8 +120,8 @@ subroutine rrtmgp_lw_rte_run(Model, Statein, Interstitial, ncol, lw_gas_props, p Interstitial%sfc_emiss_byband, & ! IN - surface emissivity in each LW band flux_clrsky)) ! Store fluxes - fluxlwUP_clrsky = flux_clrsky%flux_up - fluxlwDOWN_clrsky = flux_clrsky%flux_dn + fluxlwUP_clrsky = sum(flux_clrsky%bnd_flux_up,dim=3) + fluxlwDOWN_clrsky = sum(flux_clrsky%bnd_flux_dn,dim=3) endif ! All-sky fluxes @@ -134,8 +134,8 @@ subroutine rrtmgp_lw_rte_run(Model, Statein, Interstitial, ncol, lw_gas_props, p Interstitial%sfc_emiss_byband, & ! IN - surface emissivity in each LW band flux_allsky)) ! Store fluxes - fluxlwUP_allsky = flux_allsky%flux_up - fluxlwDOWN_allsky = flux_allsky%flux_dn + fluxlwUP_allsky = sum(flux_allsky%bnd_flux_up,dim=3) + fluxlwDOWN_allsky = sum(flux_allsky%bnd_flux_dn,dim=3) end subroutine rrtmgp_lw_rte_run diff --git a/physics/rrtmgp_sw_rte.F90 b/physics/rrtmgp_sw_rte.F90 index a01c9cb70..e0950950f 100644 --- a/physics/rrtmgp_sw_rte.F90 +++ b/physics/rrtmgp_sw_rte.F90 @@ -93,10 +93,10 @@ subroutine rrtmgp_sw_rte_run(Model, Interstitial, Radtend, Statein, ncol, sw_gas type(ty_fluxes_byband) :: & flux_allsky, & ! All-sky flux (W/m2) flux_clrsky ! Clear-sky flux (W/m2) - real(kind_phys), dimension(nday,Model%levs+1),target :: & - fluxSW_up_allsky, fluxSW_up_clrsky, fluxSW_dn_allsky, fluxSW_dn_clrsky, fluxSW_dn_dir_allsky real(kind_phys), dimension(nday,Model%levs+1,sw_gas_props%get_nband()),target :: & - fluxSWBB_up_allsky, fluxSWBB_dn_allsky + fluxSW_up_allsky, fluxSW_up_clrsky, fluxSW_dn_allsky, fluxSW_dn_clrsky, fluxSW_dn_dir_allsky +! real(kind_phys), dimension(nday,Model%levs+1,sw_gas_props%get_nband()),target :: & +! fluxSWBB_up_allsky, fluxSWBB_dn_allsky real(kind_phys), dimension(ncol,Model%levs) :: vmrTemp logical :: l_ClrSky_HR=.false., l_AllSky_HR_byband=.false., l_scmpsw=.false., top_at_1 integer :: iGas,iSFC,iTOA @@ -114,7 +114,7 @@ subroutine rrtmgp_sw_rte_run(Model, Interstitial, Radtend, Statein, ncol, sw_gas if (.not. lsswr) return ! Vertical ordering? - top_at_1 = (Statein%prsi(1,1) .lt. Statein%prsi(1, Model%levs)) + top_at_1 = (p_lev(1,1) .lt. p_lev(1, Model%levs)) if (top_at_1) then iSFC = Model%levs+1 iTOA = 1 @@ -161,16 +161,16 @@ subroutine rrtmgp_sw_rte_run(Model, Interstitial, Radtend, Statein, ncol, sw_gas enddo ! Initialize RRTMGP DDT containing 2D(3D) fluxes - flux_allsky%flux_up => fluxSW_up_allsky - flux_allsky%flux_dn => fluxSW_dn_allsky - flux_allsky%flux_dn_dir => fluxSW_dn_dir_allsky - flux_clrsky%flux_up => fluxSW_up_clrsky - flux_clrsky%flux_dn => fluxSW_dn_clrsky + flux_allsky%bnd_flux_up => fluxSW_up_allsky + flux_allsky%bnd_flux_dn => fluxSW_dn_allsky + flux_allsky%bnd_flux_dn_dir => fluxSW_dn_dir_allsky + flux_clrsky%bnd_flux_up => fluxSW_up_clrsky + flux_clrsky%bnd_flux_dn => fluxSW_dn_clrsky ! Only calculate fluxes by-band, only when heating-rate profiles by band are requested. - if (l_AllSky_HR_byband) then - flux_allsky%bnd_flux_up => fluxSWBB_up_allsky - flux_allsky%bnd_flux_dn => fluxSWBB_dn_allsky - endif + !if (l_AllSky_HR_byband) then + ! flux_allsky%bnd_flux_up => fluxSWBB_up_allsky + ! flux_allsky%bnd_flux_dn => fluxSWBB_dn_allsky + !endif ! Compute clear-sky fluxes (if requested) ! Clear-sky fluxes are gas+aerosol @@ -186,8 +186,8 @@ subroutine rrtmgp_sw_rte_run(Model, Interstitial, Radtend, Statein, ncol, sw_gas Interstitial%sfc_alb_nir_dif(:,idxday), & ! IN - Shortwave surface albedo (diffuse) flux_clrsky)) ! OUT - Fluxes, clear-sky, 3D (nCol,Model%levs,nBand) ! Store fluxes - fluxswUP_clrsky(idxday,:) = flux_clrsky%flux_up - fluxswDOWN_clrsky(idxday,:) = flux_clrsky%flux_dn + fluxswUP_clrsky(idxday,:) = sum(flux_clrsky%bnd_flux_up,dim=3) + fluxswDOWN_clrsky(idxday,:) = sum(flux_clrsky%bnd_flux_dn,dim=3) endif ! Compute all-sky fluxes @@ -202,11 +202,11 @@ subroutine rrtmgp_sw_rte_run(Model, Interstitial, Radtend, Statein, ncol, sw_gas Interstitial%sfc_alb_nir_dif(:,idxday), & ! IN - Shortwave surface albedo (diffuse) flux_allsky)) ! OUT - Fluxes, clear-sky, 3D (nCol,Model%levs,nBand) ! Store fluxes - fluxswUP_allsky(idxday,:) = flux_allsky%flux_up - fluxswDOWN_allsky(idxday,:) = flux_allsky%flux_dn + fluxswUP_allsky(idxday,:) = sum(flux_allsky%bnd_flux_up,dim=3) + fluxswDOWN_allsky(idxday,:) = sum(flux_allsky%bnd_flux_dn,dim=3) if ( l_scmpsw ) then - scmpsw(idxday)%nirbm = flux_allsky%flux_dn_dir(idxday,iSFC) !Interstitial%sfc_alb_nir_dir(iSFC,idxday) - scmpsw(idxday)%nirdf = flux_allsky%flux_dn(idxday,iSFC) - flux_allsky%flux_dn_dir(idxday,iSFC) !Interstitial%sfc_alb_nir_dif(iSFC,idxday) + scmpsw(idxday)%nirbm = sum(flux_allsky%bnd_flux_dn_dir(idxday,iSFC,:),dim=2) + scmpsw(idxday)%nirdf = sum(flux_allsky%bnd_flux_dn(idxday,iSFC,:),dim=2) - sum(flux_allsky%bnd_flux_dn_dir(idxday,iSFC,:),dim=2) endif endif end subroutine rrtmgp_sw_rte_run From 71b6a374f9ee1133576aa3f89a37f0e4248f5b70 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Wed, 4 Dec 2019 12:43:32 -0700 Subject: [PATCH 067/167] Change to diagnostic outputs for RRTMGP. --- physics/GFS_rrtmgp_sw_post.F90 | 60 +++++++++++++++++++--------------- physics/rrtmgp_sw_rte.F90 | 2 +- physics/rrtmgp_sw_rte.meta | 8 ++--- 3 files changed, 38 insertions(+), 32 deletions(-) diff --git a/physics/GFS_rrtmgp_sw_post.F90 b/physics/GFS_rrtmgp_sw_post.F90 index ab08087a6..e3f9d1810 100644 --- a/physics/GFS_rrtmgp_sw_post.F90 +++ b/physics/GFS_rrtmgp_sw_post.F90 @@ -143,18 +143,18 @@ subroutine GFS_rrtmgp_sw_post_run (Model, Interstitial, Grid, Diag, Radtend, Cou ! Compute SW heating-rates ! ####################################################################################### ! Initialize - hswc = 0 - Diag%topfsw = topfsw_type ( 0., 0., 0. ) - Radtend%sfcfsw = sfcfsw_type ( 0., 0., 0., 0. ) - if (l_clrskysw_hr) then - hsw0(:,:) = 0. - endif - if (l_fluxessw2D) then - flxprf_sw = profsw_type ( 0., 0., 0., 0. ) - endif - if (l_sfcfluxessw1D) then - scmpsw = cmpfsw_type (0.,0.,0.,0.,0.,0.) - endif +! hswc = 0 +! Diag%topfsw = topfsw_type ( 0., 0., 0. ) +! Radtend%sfcfsw = sfcfsw_type ( 0., 0., 0., 0. ) +! if (l_clrskysw_hr) then +! hsw0(:,:) = 0. +! endif +! if (l_fluxessw2D) then +! flxprf_sw = profsw_type ( 0., 0., 0., 0. ) +! endif +! if (l_sfcfluxessw1D) then +! scmpsw = cmpfsw_type (0.,0.,0.,0.,0.,0.) +! endif if (Model%lsswr .and. nDay .gt. 0) then ! Clear-sky heating-rate (optional) @@ -173,29 +173,35 @@ subroutine GFS_rrtmgp_sw_post_run (Model, Interstitial, Grid, Diag, Radtend, Cou p_lev(idxday,:), & thetaTendAllSky)) hswc(idxday,:) = thetaTendAllSky - + ! Copy fluxes from RRTGMP types into model radiation types. ! Mandatory outputs write(*,"(a11,2i8)") "iTOA/iSFC: ",iTOA,iSFC write(*,*) "fluxswDOWN_allsky: ",fluxswDOWN_allsky(idxday,:) - write(*,*) "fluxswDOWN_clrsky: ",fluxswDOWN_clrsky(idxday,:) - Diag%topfsw(idxday)%upfxc = fluxswUP_allsky(idxday,iTOA) - Diag%topfsw(idxday)%upfx0 = fluxswUP_clrsky(idxday,iTOA) - Diag%topfsw(idxday)%dnfxc = fluxswDOWN_allsky(idxday,iTOA) - Radtend%sfcfsw(idxday)%upfxc = fluxswUP_allsky(idxday,iSFC) - Radtend%sfcfsw(idxday)%upfx0 = fluxswUP_clrsky(idxday,iSFC) - Radtend%sfcfsw(idxday)%dnfxc = fluxswDOWN_allsky(idxday,iSFC) - Radtend%sfcfsw(idxday)%dnfx0 = fluxswDOWN_clrsky(idxday,iSFC) - + write(*,*) "fluxswDOWN_clrsky: ",fluxswDOWN_clrsky(:,:) + Diag%topfsw(:)%upfxc = fluxswUP_allsky(:,iTOA) + Diag%topfsw(:)%upfx0 = fluxswUP_clrsky(:,iTOA) + Diag%topfsw(:)%dnfxc = fluxswDOWN_allsky(:,iTOA) + Radtend%sfcfsw(:)%upfxc = fluxswUP_allsky(:,iSFC) + Radtend%sfcfsw(:)%upfx0 = fluxswUP_clrsky(:,iSFC) + Radtend%sfcfsw(:)%dnfxc = fluxswDOWN_allsky(:,iSFC) + Radtend%sfcfsw(:)%dnfx0 = fluxswDOWN_clrsky(:,iSFC) + !Diag%topfsw(idxday)%upfxc = fluxswUP_allsky(idxday,iTOA) + !Diag%topfsw(idxday)%upfx0 = fluxswUP_clrsky(idxday,iTOA) + !Diag%topfsw(idxday)%dnfxc = fluxswDOWN_allsky(idxday,iTOA) + !Radtend%sfcfsw(idxday)%upfxc = fluxswUP_allsky(idxday,iSFC) + !Radtend%sfcfsw(idxday)%upfx0 = fluxswUP_clrsky(idxday,iSFC) + !Radtend%sfcfsw(idxday)%dnfxc = fluxswDOWN_allsky(idxday,iSFC) + !Radtend%sfcfsw(idxday)%dnfx0 = fluxswDOWN_clrsky(idxday,iSFC) + ! Optional output if(l_fluxessw2D) then - flxprf_sw(idxday,:)%upfxc = fluxswUP_allsky(idxday,:) - flxprf_sw(idxday,:)%dnfxc = fluxswDOWN_allsky(idxday,:) - flxprf_sw(idxday,:)%upfx0 = fluxswUP_clrsky(idxday,:) - flxprf_sw(idxday,:)%dnfx0 = fluxswDOWN_clrsky(idxday,:) + flxprf_sw(:,:)%upfxc = fluxswUP_allsky(:,:) + flxprf_sw(:,:)%dnfxc = fluxswDOWN_allsky(:,:) + flxprf_sw(:,:)%upfx0 = fluxswUP_clrsky(:,:) + flxprf_sw(:,:)%dnfx0 = fluxswDOWN_clrsky(:,:) endif endif - ! ####################################################################################### ! Save SW outputs ! ####################################################################################### diff --git a/physics/rrtmgp_sw_rte.F90 b/physics/rrtmgp_sw_rte.F90 index e0950950f..bfa94a062 100644 --- a/physics/rrtmgp_sw_rte.F90 +++ b/physics/rrtmgp_sw_rte.F90 @@ -68,7 +68,7 @@ subroutine rrtmgp_sw_rte_run(Model, Interstitial, Radtend, Statein, ncol, sw_gas ! Outputs character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg - real(kind_phys), dimension(ncol,Model%levs+1), intent(out) :: & + real(kind_phys), dimension(ncol,Model%levs+1), intent(inout) :: & fluxswUP_allsky, & ! All-sky flux (W/m2) fluxswDOWN_allsky, & ! All-sky flux (W/m2) fluxswUP_clrsky, & ! Clear-sky flux (W/m2) diff --git a/physics/rrtmgp_sw_rte.meta b/physics/rrtmgp_sw_rte.meta index c1c098400..197824495 100644 --- a/physics/rrtmgp_sw_rte.meta +++ b/physics/rrtmgp_sw_rte.meta @@ -165,7 +165,7 @@ dimensions = (horizontal_dimension,vertical_dimension_plus_one) type = real kind = kind_phys - intent = out + intent = inout optional = F [fluxswDOWN_allsky] standard_name = RRTMGP_sw_flux_profile_downward_allsky @@ -174,7 +174,7 @@ dimensions = (horizontal_dimension,vertical_dimension_plus_one) type = real kind = kind_phys - intent = out + intent = inout optional = F [fluxswUP_clrsky] standard_name = RRTMGP_sw_flux_profile_upward_clrsky @@ -183,7 +183,7 @@ dimensions = (horizontal_dimension,vertical_dimension_plus_one) type = real kind = kind_phys - intent = out + intent = inout optional = F [fluxswDOWN_clrsky] standard_name = RRTMGP_sw_flux_profile_downward_clrsky @@ -192,7 +192,7 @@ dimensions = (horizontal_dimension,vertical_dimension_plus_one) type = real kind = kind_phys - intent = out + intent = inout optional = F [errmsg] standard_name = ccpp_error_message From e905e96a10c1d07997f32486daee29545a6049d9 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Thu, 5 Dec 2019 13:59:49 -0700 Subject: [PATCH 068/167] Add loop over solar scaling --- physics/GFS_rrtmgp_sw_post.F90 | 117 ++++++++++++----------------- physics/rrtmgp_sw_cloud_optics.F90 | 56 ++++++++------ physics/rrtmgp_sw_gas_optics.F90 | 43 +++++------ 3 files changed, 95 insertions(+), 121 deletions(-) diff --git a/physics/GFS_rrtmgp_sw_post.F90 b/physics/GFS_rrtmgp_sw_post.F90 index e3f9d1810..27edd06b7 100644 --- a/physics/GFS_rrtmgp_sw_post.F90 +++ b/physics/GFS_rrtmgp_sw_post.F90 @@ -22,79 +22,73 @@ module GFS_rrtmgp_sw_post contains + ! ######################################################################################### + ! SUBROUTINE GFS_rrtmgp_sw_post_init + ! ######################################################################################### subroutine GFS_rrtmgp_sw_post_init() end subroutine GFS_rrtmgp_sw_post_init + ! ######################################################################################### + ! SUBROUTINE GFS_rrtmgp_sw_post_run + ! ######################################################################################### !> \section arg_table_GFS_rrtmgp_sw_post_run !! \htmlinclude GFS_rrtmgp_sw_post.html !! - subroutine GFS_rrtmgp_sw_post_run (Model, Interstitial, Grid, Diag, Radtend, Coupling, Statein, & - scmpsw, im, p_lev, sw_gas_props, nday, idxday, fluxswUP_allsky, fluxswDOWN_allsky,& - fluxswUP_clrsky, fluxswDOWN_clrsky, raddt, aerodp, cldsa, mbota, mtopa, cld_frac, & - cldtausw, flxprf_sw, hsw0, errmsg, errflg) + subroutine GFS_rrtmgp_sw_post_run (Model, Interstitial, Grid, Diag, Radtend, Coupling, & + Statein, scmpsw, im, p_lev, sw_gas_props, nday, idxday, fluxswUP_allsky, & + fluxswDOWN_allsky, fluxswUP_clrsky, fluxswDOWN_clrsky, raddt, aerodp, cldsa, mbota, & + mtopa, cld_frac, cldtausw, flxprf_sw, hsw0, errmsg, errflg) ! Inputs type(GFS_control_type), intent(in) :: & - Model ! Fortran DDT containing FV3-GFS model control parameters + Model ! Fortran DDT: FV3-GFS model control parameters type(GFS_Interstitial_type), intent(in) :: & - Interstitial + Interstitial ! Fortran DDT: FV3-GFS interstitial arrays type(GFS_grid_type), intent(in) :: & - Grid ! Fortran DDT containing FV3-GFS grid and interpolation related data + Grid ! Fortran DDT: FV3-GFS grid and interpolation related data type(GFS_coupling_type), intent(inout) :: & - Coupling ! Fortran DDT containing FV3-GFS fields to/from coupling with other components + Coupling ! Fortran DDT: FV3-GFS fields to/from coupling with other components type(GFS_radtend_type), intent(inout) :: & - Radtend ! Fortran DDT containing FV3-GFS radiation tendencies + Radtend ! Fortran DDT: FV3-GFS radiation tendencies type(GFS_diag_type), intent(inout) :: & - Diag ! Fortran DDT containing FV3-GFS diagnotics data + Diag ! Fortran DDT: FV3-GFS diagnotics data type(GFS_statein_type), intent(in) :: & - Statein ! Fortran DDT containing FV3-GFS prognostic state data in from dycore + Statein ! Fortran DDT: FV3-GFS prognostic state data in from dycore integer, intent(in) :: & - im, & ! Horizontal loop extent - nDay ! Number of daylit columns + im, & ! Horizontal loop extent + nDay ! Number of daylit columns integer, intent(in), dimension(nday) :: & - idxday ! Index array for daytime points + idxday ! Index array for daytime points type(ty_gas_optics_rrtmgp),intent(in) :: & - sw_gas_props ! DDT containing SW spectral information + sw_gas_props ! DDT containing SW spectral information real(kind_phys), dimension(size(Grid%xlon,1), Model%levs+1), intent(in) :: & - p_lev ! Pressure @ model layer-interfaces (hPa) + p_lev ! Pressure @ model layer-interfaces (hPa) real(kind_phys), dimension(size(Grid%xlon,1), Model%levs+1), intent(in) :: & fluxswUP_allsky, & ! SW All-sky flux (W/m2) fluxswDOWN_allsky, & ! SW All-sky flux (W/m2) fluxswUP_clrsky, & ! SW Clear-sky flux (W/m2) fluxswDOWN_clrsky ! SW All-sky flux (W/m2) real(kind_phys), intent(in) :: & - raddt ! Radiation time step + raddt ! Radiation time step real(kind_phys), dimension(im,NSPC1), intent(in) :: & - aerodp ! Vertical integrated optical depth for various aerosol species + aerodp ! Vertical integrated optical depth for various aerosol species real(kind_phys), dimension(im,5), intent(in) :: & - cldsa ! Fraction of clouds for low, middle, high, total and BL + cldsa ! Fraction of clouds for low, middle, high, total and BL integer, dimension(im,3), intent(in) ::& - mbota, & ! vertical indices for low, middle and high cloud tops - mtopa ! vertical indices for low, middle and high cloud bases + mbota, & ! vertical indices for low, middle and high cloud tops + mtopa ! vertical indices for low, middle and high cloud bases real(kind_phys), dimension(im,Model%levs), intent(in) :: & - cld_frac, & ! Total cloud fraction in each layer - cldtausw ! approx .55mu band layer cloud optical depth + cld_frac, & ! Total cloud fraction in each layer + cldtausw ! approx .55mu band layer cloud optical depth real(kind_phys),dimension(size(Grid%xlon,1), Model%levs) :: & - hswc + hswc ! All-sky heating rates (K/s) ! Outputs (mandatory) character(len=*), intent(out) :: & errmsg integer, intent(out) :: & errflg -! real(kind_phys),dimension(size(Grid%xlon,1), Model%levs),intent(out) :: & -! hswc ! Shortwave all-sky heating-rate (K/sec) -! type(topfsw_type), dimension(size(Grid%xlon,1)), intent(inout) :: & -! topflx_sw ! radiation fluxes at top, components: -! ! upfxc - total sky upward flux at top (w/m2) -! ! upfx0 - clear sky upward flux at top (w/m2) -! type(sfcfsw_type), dimension(size(Grid%xlon,1)), intent(inout) :: & -! sfcflx_sw ! radiation fluxes at sfc, components: -! ! upfxc - total sky upward flux at sfc (w/m2) -! ! upfx0 - clear sky upward flux at sfc (w/m2) -! ! dnfxc - total sky downward flux at sfc (w/m2) -! ! dnfx0 - clear sky downward flux at sfc (w/m2) - + ! Outputs (optional) real(kind_phys), dimension(size(Grid%xlon,1), Model%levs), optional, intent(inout) :: & hsw0 ! Shortwave clear-sky heating-rate (K/sec) @@ -143,18 +137,18 @@ subroutine GFS_rrtmgp_sw_post_run (Model, Interstitial, Grid, Diag, Radtend, Cou ! Compute SW heating-rates ! ####################################################################################### ! Initialize -! hswc = 0 -! Diag%topfsw = topfsw_type ( 0., 0., 0. ) -! Radtend%sfcfsw = sfcfsw_type ( 0., 0., 0., 0. ) -! if (l_clrskysw_hr) then -! hsw0(:,:) = 0. -! endif -! if (l_fluxessw2D) then -! flxprf_sw = profsw_type ( 0., 0., 0., 0. ) -! endif -! if (l_sfcfluxessw1D) then -! scmpsw = cmpfsw_type (0.,0.,0.,0.,0.,0.) -! endif + hswc = 0 + Diag%topfsw = topfsw_type ( 0., 0., 0. ) + Radtend%sfcfsw = sfcfsw_type ( 0., 0., 0., 0. ) + if (l_clrskysw_hr) then + hsw0(:,:) = 0. + endif + if (l_fluxessw2D) then + flxprf_sw = profsw_type ( 0., 0., 0., 0. ) + endif + if (l_sfcfluxessw1D) then + scmpsw = cmpfsw_type (0.,0.,0.,0.,0.,0.) + endif if (Model%lsswr .and. nDay .gt. 0) then ! Clear-sky heating-rate (optional) @@ -176,9 +170,6 @@ subroutine GFS_rrtmgp_sw_post_run (Model, Interstitial, Grid, Diag, Radtend, Cou ! Copy fluxes from RRTGMP types into model radiation types. ! Mandatory outputs - write(*,"(a11,2i8)") "iTOA/iSFC: ",iTOA,iSFC - write(*,*) "fluxswDOWN_allsky: ",fluxswDOWN_allsky(idxday,:) - write(*,*) "fluxswDOWN_clrsky: ",fluxswDOWN_clrsky(:,:) Diag%topfsw(:)%upfxc = fluxswUP_allsky(:,iTOA) Diag%topfsw(:)%upfx0 = fluxswUP_clrsky(:,iTOA) Diag%topfsw(:)%dnfxc = fluxswDOWN_allsky(:,iTOA) @@ -186,14 +177,7 @@ subroutine GFS_rrtmgp_sw_post_run (Model, Interstitial, Grid, Diag, Radtend, Cou Radtend%sfcfsw(:)%upfx0 = fluxswUP_clrsky(:,iSFC) Radtend%sfcfsw(:)%dnfxc = fluxswDOWN_allsky(:,iSFC) Radtend%sfcfsw(:)%dnfx0 = fluxswDOWN_clrsky(:,iSFC) - !Diag%topfsw(idxday)%upfxc = fluxswUP_allsky(idxday,iTOA) - !Diag%topfsw(idxday)%upfx0 = fluxswUP_clrsky(idxday,iTOA) - !Diag%topfsw(idxday)%dnfxc = fluxswDOWN_allsky(idxday,iTOA) - !Radtend%sfcfsw(idxday)%upfxc = fluxswUP_allsky(idxday,iSFC) - !Radtend%sfcfsw(idxday)%upfx0 = fluxswUP_clrsky(idxday,iSFC) - !Radtend%sfcfsw(idxday)%dnfxc = fluxswDOWN_allsky(idxday,iSFC) - !Radtend%sfcfsw(idxday)%dnfx0 = fluxswDOWN_clrsky(idxday,iSFC) - + ! Optional output if(l_fluxessw2D) then flxprf_sw(:,:)%upfxc = fluxswUP_allsky(:,:) @@ -281,11 +265,6 @@ subroutine GFS_rrtmgp_sw_post_run (Model, Interstitial, Grid, Diag, Radtend, Cou if (Radtend%coszen(i) > 0.) then ! SW all-sky fluxes tem0d = Model%fhswr * Radtend%coszdg(i) / Radtend%coszen(i) - !write(*,"(a23,3f10.6)") 'In GFS_rrtmgp_sw_post: ',Diag%topfsw(i)%dnfxc, tem0d,Diag%fluxr(i,23) - !write(*,"(a23,f20.15)") 'In GFS_rrtmgp_sw_post: ',Model%fhswr - !Diagfluxr(i,2 ) = Diag%fluxr(i,2) + fluxswUP_allsky( i,iTOA) * tem0d ! total sky top sw up - !Diag%fluxr(i,3 ) = Diag%fluxr(i,3) + fluxswUP_allsky( i,iSFC) * tem0d ! total sky sfc sw up - !Diag%fluxr(i,4 ) = Diag%fluxr(i,4) + fluxswDOWN_allsky(i,iSFC) * tem0d ! total sky sfc sw dn Diag%fluxr(i,2 ) = Diag%fluxr(i,2) + Diag%topfsw(i)%upfxc * tem0d ! total sky top sw up Diag%fluxr(i,3 ) = Diag%fluxr(i,3) + Radtend%sfcfsw(i)%upfxc * tem0d Diag%fluxr(i,4 ) = Diag%fluxr(i,4) + Radtend%sfcfsw(i)%dnfxc * tem0d ! total sky sfc sw dn @@ -293,18 +272,13 @@ subroutine GFS_rrtmgp_sw_post_run (Model, Interstitial, Grid, Diag, Radtend, Cou Diag%fluxr(i,21) = Diag%fluxr(i,21) + scmpsw(i)%uvbfc * tem0d ! total sky uv-b sw dn Diag%fluxr(i,22) = Diag%fluxr(i,22) + scmpsw(i)%uvbf0 * tem0d ! clear sky uv-b sw dn ! SW TOA incoming fluxes - !temiag%fluxr(i,23) = Diag%fluxr(i,23) + fluxswDOWN_allsky(i,iTOA) * tem0d ! top sw dn Diag%fluxr(i,23) = Diag%fluxr(i,23) + Diag%topfsw(i)%dnfxc * tem0d ! top sw dn - write(*,"(a23,3f10.6)") 'In GFS_rrtmgp_sw_post: ',Diag%topfsw(i)%dnfxc, tem0d,Diag%fluxr(i,23) ! SW SFC flux components Diag%fluxr(i,24) = Diag%fluxr(i,24) + scmpsw(i)%visbm * tem0d ! uv/vis beam sw dn Diag%fluxr(i,25) = Diag%fluxr(i,25) + scmpsw(i)%visdf * tem0d ! uv/vis diff sw dn Diag%fluxr(i,26) = Diag%fluxr(i,26) + scmpsw(i)%nirbm * tem0d ! nir beam sw dn Diag%fluxr(i,27) = Diag%fluxr(i,27) + scmpsw(i)%nirdf * tem0d ! nir diff sw dn ! SW clear-sky fluxes - !Diag%fluxr(i,29) = Diag%fluxr(i,29) + fluxswUP_clrsky( i,iTOA) * tem0d ! clear sky top sw up - !Diag%fluxr(i,31) = Diag%fluxr(i,31) + fluxswUP_clrsky( i,iSFC) * tem0d ! clear sky sfc sw up - !Diag%fluxr(i,32) = Diag%fluxr(i,32) + fluxswDOWN_clrsky(i,iSFC) * tem0d ! clear sky sfc sw dn Diag%fluxr(i,29) = Diag%fluxr(i,29) + Diag%topfsw(i)%upfx0 * tem0d Diag%fluxr(i,31) = Diag%fluxr(i,31) + Radtend%sfcfsw(i)%upfx0 * tem0d Diag%fluxr(i,32) = Diag%fluxr(i,32) + Radtend%sfcfsw(i)%dnfx0 * tem0d @@ -344,6 +318,9 @@ subroutine GFS_rrtmgp_sw_post_run (Model, Interstitial, Grid, Diag, Radtend, Cou end subroutine GFS_rrtmgp_sw_post_run + ! ######################################################################################### + ! SUBROUTINE GFS_rrtmgp_sw_post_finalize + ! ######################################################################################### subroutine GFS_rrtmgp_sw_post_finalize () end subroutine GFS_rrtmgp_sw_post_finalize diff --git a/physics/rrtmgp_sw_cloud_optics.F90 b/physics/rrtmgp_sw_cloud_optics.F90 index 3d721ff12..48dde613d 100644 --- a/physics/rrtmgp_sw_cloud_optics.F90 +++ b/physics/rrtmgp_sw_cloud_optics.F90 @@ -343,10 +343,10 @@ end subroutine rrtmgp_sw_cloud_optics_init ! ######################################################################################### ! SUBROTUINE rrtmgp_sw_cloud_optics_run() ! ######################################################################################### - subroutine rrtmgp_sw_cloud_optics_run(Model, ncol, icseed_sw, cld_frac, cld_lwp, cld_reliq,& - cld_iwp, cld_reice, cld_swp, cld_resnow, cld_rwp, cld_rerain, aerosolssw, & - sw_cloud_props, sw_gas_props, ipsdsw0, nday, idxday, & ! IN - sw_optical_props_clouds, sw_optical_props_aerosol, cldtausw, errmsg, errflg) ! OUT + subroutine rrtmgp_sw_cloud_optics_run(Model, ncol, icseed_sw, cld_frac, cld_lwp, & + cld_reliq, cld_iwp, cld_reice, cld_swp, cld_resnow, cld_rwp, cld_rerain, aerosolssw, & + sw_cloud_props, sw_gas_props, ipsdsw0, nday, idxday, sw_optical_props_clouds, & + sw_optical_props_aerosol, cldtausw, errmsg, errflg) ! Inputs type(GFS_control_type), intent(in) :: & @@ -373,20 +373,22 @@ subroutine rrtmgp_sw_cloud_optics_run(Model, ncol, icseed_sw, cld_frac, cld_lwp, cld_rwp, & ! Cloud rain water path cld_rerain ! Cloud rain effective radius type(ty_cloud_optics),intent(in) :: & - sw_cloud_props ! + sw_cloud_props ! RRTMGP DDT: type(ty_gas_optics_rrtmgp),intent(in) :: & - sw_gas_props + sw_gas_props ! RRTMGP DDT: K-distribution data real(kind_phys), intent(in),dimension(ncol, model%levs, sw_gas_props%get_nband(),3) :: & - aerosolssw ! + aerosolssw ! Shortwave aerosol optical properties, by band (tau,ssa,g) ! Outputs + character(len=*), intent(out) :: & + errmsg ! Error message + integer, intent(out) :: & + errflg ! Error code type(ty_optical_props_2str),intent(out) :: & - sw_optical_props_clouds, & - sw_optical_props_aerosol + sw_optical_props_clouds, & ! RRTMGP DDT: Shortwave optical properties (cloudy atmosphere) + sw_optical_props_aerosol ! RRTMGP DDT: Shortwave optical properties (aerosols) real(kind_phys), dimension(ncol,Model%levs), intent(out) :: & - cldtausw ! approx 10.mu band layer cloud optical depth - integer, intent(out) :: errflg - character(len=*), intent(out) :: errmsg + cldtausw ! approx 10.mu band layer cloud optical depth ! Local variables integer :: iCol @@ -451,18 +453,18 @@ subroutine rrtmgp_sw_cloud_optics_run(Model, ncol, icseed_sw, cld_frac, cld_lwp, if (Model%rrtmgp_cld_optics .gt. 0) then ! RRTMGP cloud-optics. call check_error_msg('rrtmgp_sw_cloud_optics_run',sw_cloud_props%cloud_optics(& - ncol, & ! IN - Number of daylit gridpoints - model%levs, & ! IN - Number of vertical layers - sw_cloud_props%get_nband(), & ! IN - Number of SW bands - Model%rrtmgp_nrghice, & ! IN - Number of ice-roughness categories - liqmask, & ! IN - Liquid-cloud mask - icemask, & ! IN - Ice-cloud mask - cld_lwp, & ! IN - Cloud liquid water path - cld_iwp, & ! IN - Cloud ice water path - cld_reliq, & ! IN - Cloud liquid effective radius - cld_reice, & ! IN - Cloud ice effective radius - sw_optical_props_cloudsByBand)) ! OUT - RRTMGP DDT containing cloud radiative properties - ! in each band + ncol, & ! IN - Number of daylit gridpoints + model%levs, & ! IN - Number of vertical layers + sw_cloud_props%get_nband(), & ! IN - Number of SW bands + Model%rrtmgp_nrghice, & ! IN - Number of ice-roughness categories + liqmask, & ! IN - Liquid-cloud mask + icemask, & ! IN - Ice-cloud mask + cld_lwp, & ! IN - Cloud liquid water path + cld_iwp, & ! IN - Cloud ice water path + cld_reliq, & ! IN - Cloud liquid effective radius + cld_reice, & ! IN - Cloud ice effective radius + sw_optical_props_cloudsByBand)) ! OUT - RRTMGP DDT: Shortwave optical properties, + ! in each band (tau,ssa,g) else ! RRTMG cloud-optics if (any(cld_frac .gt. 0)) then @@ -503,7 +505,11 @@ subroutine rrtmgp_sw_cloud_optics_run(Model, ncol, icseed_sw, cld_frac, cld_lwp, cldtausw = sw_optical_props_cloudsByBand%tau(:,:,11) end subroutine rrtmgp_sw_cloud_optics_run - + + ! ######################################################################################### + ! SUBROTUINE rrtmgp_sw_cloud_optics_finalize() + ! ######################################################################################### subroutine rrtmgp_sw_cloud_optics_finalize() end subroutine rrtmgp_sw_cloud_optics_finalize + end module rrtmgp_sw_cloud_optics diff --git a/physics/rrtmgp_sw_gas_optics.F90 b/physics/rrtmgp_sw_gas_optics.F90 index 3e56f9201..8ab4ae9e2 100644 --- a/physics/rrtmgp_sw_gas_optics.F90 +++ b/physics/rrtmgp_sw_gas_optics.F90 @@ -394,17 +394,12 @@ end subroutine rrtmgp_sw_gas_optics_init ! ######################################################################################### ! SUBROUTINE rrtmgp_sw_gas_optics_run - ! *NOTE* The computation of the optical properties for a gaseous (+aerosols) atmosphere are - ! handled internally by the rte-rrtmgp/extensions/mo_rrtmgp_clr_all_sky.F90:rte_sw() - ! driver. - ! If calling rte/mo_rte_sw.F90:rte_sw() directly, place calls to compute source - ! function and gas_optics() here. ! ######################################################################################### !! \section arg_table_rrtmgp_sw_gas_optics_run !! \htmlinclude rrtmgp_sw_gas_optics.html !! - subroutine rrtmgp_sw_gas_optics_run(Model, Interstitial, sw_gas_props, ncol, p_lay, p_lev, t_lay, t_lev, & - gas_concentrations, lsswr, solcon, sw_optical_props_clrsky, errmsg, errflg) + subroutine rrtmgp_sw_gas_optics_run(Model, Interstitial, sw_gas_props, ncol, p_lay, p_lev, & + t_lay, t_lev, gas_concentrations, lsswr, solcon, sw_optical_props_clrsky, errmsg, errflg) ! Inputs type(GFS_control_type), intent(in) :: & @@ -427,6 +422,7 @@ subroutine rrtmgp_sw_gas_optics_run(Model, Interstitial, sw_gas_props, ncol, p_l lsswr ! Flag to calculate SW irradiances real(kind_phys), intent(in) :: & solcon ! Solar constant + ! Output character(len=*), intent(out) :: & errmsg ! Error message @@ -435,6 +431,9 @@ subroutine rrtmgp_sw_gas_optics_run(Model, Interstitial, sw_gas_props, ncol, p_l type(ty_optical_props_2str),intent(out) :: & sw_optical_props_clrsky ! + ! Local variables + integer :: ij + ! Initialize CCPP error handling variables errmsg = '' errflg = 0 @@ -444,28 +443,20 @@ subroutine rrtmgp_sw_gas_optics_run(Model, Interstitial, sw_gas_props, ncol, p_l ! Allocate space call check_error_msg('rrtmgp_sw_gas_optics_run',sw_optical_props_clrsky%alloc_2str(ncol, model%levs, sw_gas_props)) - ! Gas-optics (djs asks pincus: I think it makes sense to have a generic gas_optics interface in - ! ty_gas_optics_rrtmgp, just as in ty_gas_optics. + ! Gas-optics call check_error_msg('rrtmgp_sw_gas_optics_run',sw_gas_props%gas_optics(& - p_lay, & ! - p_lev, & ! - t_lay, & ! - gas_concentrations, & ! - sw_optical_props_clrsky, & ! - Interstitial%toa_src_sw)) ! + p_lay, & ! IN - Pressure @ layer-centers (Pa) + p_lev, & ! IN - Pressure @ layer-interfaces (Pa) + t_lay, & ! IN - Temperature @ layer-centers (K) + gas_concentrations, & ! IN - RRTMGP DDT: trace gas volumne mixing-ratios + sw_optical_props_clrsky, & ! OUT - RRTMGP DDT: Shortwave optical properties, by + ! spectral point (tau,ssa,g) + Interstitial%toa_src_sw)) ! OUT - TOA incident shortwave radiation (spectral) ! Scale incident flux - Interstitial%toa_src_sw = Interstitial%toa_src_sw*solcon/sum(Interstitial%toa_src_sw) - - ! Compute boundary-condition (only for low ceiling models, set in GFS_typedefs.F90) - !call check_error_msg('rrtmgp_sw_gas_optics_run',compute_bc(& - ! sw_gas_props, & ! IN - - ! p_lay, & ! IN - - ! p_lev, & ! IN - - ! t_lay, & ! IN - - ! gas_concentrations, & ! IN - - ! Interstitial%toa_src_sw & ! OUT - - ! mu0 = Radtend%coszen)) + do ij=1,ncol + Interstitial%toa_src_sw(ij,:) = Interstitial%toa_src_sw(ij,:)*solcon/sum(Interstitial%toa_src_sw(ij,:)) + enddo end subroutine rrtmgp_sw_gas_optics_run From e93fc1b647df2d7f2575d76ecc6e09dc6c858396 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Thu, 5 Dec 2019 15:05:11 -0700 Subject: [PATCH 069/167] Some housekeeping --- physics/GFS_rrtmgp_gas_optics.F90 | 23 ++++--- physics/GFS_rrtmgp_lw_post.F90 | 102 +++++++++++++--------------- physics/GFS_rrtmgp_lw_pre.F90 | 43 +++++++----- physics/GFS_rrtmgp_pre.F90 | 91 +++++++++++++------------ physics/GFS_rrtmgp_sw_pre.F90 | 43 ++++++------ physics/rrtmgp_sw_gas_optics.F90 | 8 +-- physics/rrtmgp_sw_rte.F90 | 108 ++++++++++++++---------------- 7 files changed, 213 insertions(+), 205 deletions(-) diff --git a/physics/GFS_rrtmgp_gas_optics.F90 b/physics/GFS_rrtmgp_gas_optics.F90 index 1054c0908..9eff6567c 100644 --- a/physics/GFS_rrtmgp_gas_optics.F90 +++ b/physics/GFS_rrtmgp_gas_optics.F90 @@ -1,5 +1,3 @@ -!> \file GFS_rrtmgp_gas_optics.f90 -!! This file contains module GFS_rrtmgp_gas_optics use machine, only: kind_phys use GFS_typedefs, only: GFS_control_type,GFS_radtend_type @@ -7,13 +5,12 @@ module GFS_rrtmgp_gas_optics public GFS_rrtmgp_gas_optics_init,GFS_rrtmgp_gas_optics_run,GFS_rrtmgp_gas_optics_finalize contains -!! \section arg_table_GFS_rrtmgp_gas_optics_init -!! \htmlinclude GFS_rrtmgp_gas_optics.html -!! - ! ######################################################################################### ! SUBROUTINE GFS_rrtmgp_gas_optics_init() ! ######################################################################################### +!! \section arg_table_GFS_rrtmgp_gas_optics_init +!! \htmlinclude GFS_rrtmgp_gas_optics.html +!! subroutine GFS_rrtmgp_gas_optics_init(Model, Radtend, errmsg, errflg) ! Inputs type(GFS_control_type), intent(in) :: & @@ -57,13 +54,17 @@ subroutine GFS_rrtmgp_gas_optics_init(Model, Radtend, errmsg, errflg) enddo endif end subroutine GFS_rrtmgp_gas_optics_init - ! - subroutine GFS_rrtmgp_gas_optics_run() - + ! ######################################################################################### + ! SUBROUTINE GFS_rrtmgp_gas_optics_run + ! ######################################################################################### + subroutine GFS_rrtmgp_gas_optics_run() end subroutine GFS_rrtmgp_gas_optics_run - ! + + ! ######################################################################################### + ! SUBROUTINE GFS_rrtmgp_gas_optics_finalize + ! ######################################################################################### subroutine GFS_rrtmgp_gas_optics_finalize() end subroutine GFS_rrtmgp_gas_optics_finalize - ! + end module GFS_rrtmgp_gas_optics diff --git a/physics/GFS_rrtmgp_lw_post.F90 b/physics/GFS_rrtmgp_lw_post.F90 index 769478e6d..38b9530b0 100644 --- a/physics/GFS_rrtmgp_lw_post.F90 +++ b/physics/GFS_rrtmgp_lw_post.F90 @@ -1,5 +1,3 @@ -!>\file GFS_rrtmgp_lw_post -!!This file contains module GFS_rrtmgp_lw_post use machine, only: kind_phys use GFS_typedefs, only: GFS_coupling_type, & @@ -20,10 +18,15 @@ module GFS_rrtmgp_lw_post public GFS_rrtmgp_lw_post_init,GFS_rrtmgp_lw_post_run,GFS_rrtmgp_lw_post_finalize contains - + ! ######################################################################################### + ! SUBROUTINE GFS_rrtmgp_lw_post_init + ! ######################################################################################### subroutine GFS_rrtmgp_lw_post_init() end subroutine GFS_rrtmgp_lw_post_init + ! ######################################################################################### + ! SUBROUTINE GFS_rrtmgp_lw_post_run + ! ######################################################################################### !> \section arg_table_GFS_rrtmgp_lw_post_run !! \htmlinclude GFS_rrtmgp_lw_post.html !! @@ -34,70 +37,58 @@ subroutine GFS_rrtmgp_lw_post_run (Model, Grid, Radtend, Coupling, Diag, Statei ! Inputs type(GFS_control_type), intent(in) :: & - Model ! Fortran DDT containing FV3-GFS model control parameters + Model ! Fortran DDT: FV3-GFS model control parameters type(GFS_grid_type), intent(in) :: & - Grid ! Fortran DDT containing FV3-GFS grid and interpolation related data - type(GFS_coupling_type), intent(inout) :: & - Coupling ! Fortran DDT containing FV3-GFS fields to/from coupling with other components - type(GFS_radtend_type), intent(inout) :: & - Radtend ! Fortran DDT containing FV3-GFS radiation tendencies - type(GFS_diag_type), intent(inout) :: & - Diag ! Fortran DDT containing FV3-GFS diagnotics data + Grid ! Fortran DDT: FV3-GFS grid and interpolation related data type(GFS_statein_type), intent(in) :: & - Statein ! Fortran DDT containing FV3-GFS prognostic state data in from dycore + Statein ! Fortran DDT: FV3-GFS prognostic state data in from dycore integer, intent(in) :: & - im ! Horizontal loop extent + im ! Horizontal loop extent real(kind_phys), dimension(size(Grid%xlon,1)), intent(in) :: & - tsfa ! Lowest model layer air temperature for radiation + tsfa ! Lowest model layer air temperature for radiation (K) real(kind_phys), dimension(size(Grid%xlon,1), Model%levs+1), intent(in) :: & - p_lev ! Pressure @ model layer-interfaces (hPa) + p_lev ! Pressure @ model layer-interfaces (hPa) real(kind_phys), dimension(size(Grid%xlon,1), Model%levs+1), intent(in) :: & - fluxlwUP_allsky, & ! LW All-sky flux (W/m2) - fluxlwDOWN_allsky, & ! LW All-sky flux (W/m2) - fluxlwUP_clrsky, & ! LW Clear-sky flux (W/m2) - fluxlwDOWN_clrsky ! LW All-sky flux (W/m2) + fluxlwUP_allsky, & ! RRTMGP longwave all-sky flux (W/m2) + fluxlwDOWN_allsky, & ! RRTMGP longwave all-sky flux (W/m2) + fluxlwUP_clrsky, & ! RRTMGP longwave clear-sky flux (W/m2) + fluxlwDOWN_clrsky ! RRTMGP longwave clear-sky flux (W/m2) real(kind_phys), intent(in) :: & - raddt ! Radiation time step + raddt ! Radiation time step real(kind_phys), dimension(im,NSPC1), intent(in) :: & - aerodp ! Vertical integrated optical depth for various aerosol species + aerodp ! Vertical integrated optical depth for various aerosol species real(kind_phys), dimension(im,5), intent(in) :: & - cldsa ! Fraction of clouds for low, middle, high, total and BL + cldsa ! Fraction of clouds for low, middle, high, total and BL integer, dimension(im,3), intent(in) ::& - mbota, & ! vertical indices for low, middle and high cloud tops - mtopa ! vertical indices for low, middle and high cloud bases + mbota, & ! vertical indices for low, middle and high cloud tops + mtopa ! vertical indices for low, middle and high cloud bases real(kind_phys), dimension(im,Model%levs), intent(in) :: & - cld_frac, & ! Total cloud fraction in each layer - cldtaulw ! approx 10.mu band layer cloud optical depth + cld_frac, & ! Total cloud fraction in each layer + cldtaulw ! approx 10.mu band layer cloud optical depth real(kind_phys),dimension(size(Grid%xlon,1), Model%levs) :: & - hlwc ! Longwave all-sky heating-rate (K/sec) + hlwc ! Longwave all-sky heating-rate (K/sec) ! Outputs (mandatory) character(len=*), intent(out) :: & errmsg integer, intent(out) :: & errflg -! real(kind_phys),dimension(size(Grid%xlon,1), Model%levs),intent(out) :: & -! hlwc ! Longwave all-sky heating-rate (K/sec) -! type(topflw_type), dimension(size(Grid%xlon,1)), intent(inout) :: & -! topflx_lw ! radiation fluxes at top, components: -! ! upfxc - total sky upward flux at top (w/m2) -! ! upfx0 - clear sky upward flux at top (w/m2) -! type(sfcflw_type), dimension(size(Grid%xlon,1)), intent(inout) :: & -! sfcflx_lw ! radiation fluxes at sfc, components: -! ! upfxc - total sky upward flux at sfc (w/m2) -! ! upfx0 - clear sky upward flux at sfc (w/m2) -! ! dnfxc - total sky downward flux at sfc (w/m2) -! ! dnfx0 - clear sky downward flux at sfc (w/m2) - + type(GFS_coupling_type), intent(inout) :: & + Coupling ! Fortran DDT: FV3-GFS fields to/from coupling with other components + type(GFS_radtend_type), intent(inout) :: & + Radtend ! Fortran DDT: FV3-GFS radiation tendencies + type(GFS_diag_type), intent(inout) :: & + Diag ! Fortran DDT: FV3-GFS diagnotics data + ! Outputs (optional) real(kind_phys), dimension(size(Grid%xlon,1), Model%levs), optional, intent(inout) :: & - hlw0 ! Longwave clear-sky heating rate (K/sec) + hlw0 ! Longwave clear-sky heating rate (K/sec) type(proflw_type), dimension(size(Grid%xlon,1), Model%levs+1), optional, intent(inout) :: & - flxprf_lw ! 2D radiative fluxes, components: - ! upfxc - total sky upward flux (W/m2) - ! dnfxc - total sky dnward flux (W/m2) - ! upfx0 - clear sky upward flux (W/m2) - ! dnfx0 - clear sky dnward flux (W/m2) + flxprf_lw ! 2D radiative fluxes, components: + ! upfxc - total sky upward flux (W/m2) + ! dnfxc - total sky dnward flux (W/m2) + ! upfx0 - clear sky upward flux (W/m2) + ! dnfx0 - clear sky dnward flux (W/m2) ! Local variables integer :: i, j, k, iSFC, iTOA, itop, ibtc @@ -133,17 +124,17 @@ subroutine GFS_rrtmgp_lw_post_run (Model, Grid, Radtend, Coupling, Diag, Statei ! Clear-sky heating-rate (optional) if (l_clrskylw_hr) then call check_error_msg('GFS_rrtmgp_post',compute_heating_rate( & - fluxlwUP_clrsky, & - fluxlwDOWN_clrsky, & - p_lev, & - hlw0)) + fluxlwUP_clrsky, & ! IN - RRTMGP upward longwave clear-sky flux profiles (W/m2) + fluxlwDOWN_clrsky, & ! IN - RRTMGP downward longwave clear-sky flux profiles (W/m2) + p_lev, & ! IN - Pressure @ layer-interfaces (Pa) + hlw0)) ! OUT - Longwave clear-sky heating rate (K/sec) endif ! All-sky heating-rate (mandatory) call check_error_msg('GFS_rrtmgp_post',compute_heating_rate( & - fluxlwUP_allsky, & - fluxlwDOWN_allsky, & - p_lev, & - hlwc)) + fluxlwUP_allsky, & ! IN - RRTMGP upward longwave all-sky flux profiles (W/m2) + fluxlwDOWN_allsky, & ! IN - RRTMGP downward longwave all-sky flux profiles (W/m2) + p_lev, & ! IN - Pressure @ layer-interfaces (Pa) + hlwc)) ! OUT - Longwave all-sky heating rate (K/sec) ! Copy fluxes from RRTGMP types into model radiation types. ! Mandatory outputs @@ -235,6 +226,9 @@ subroutine GFS_rrtmgp_lw_post_run (Model, Grid, Radtend, Coupling, Diag, Statei end subroutine GFS_rrtmgp_lw_post_run + ! ######################################################################################### + ! SUBROUTINE GFS_rrtmgp_lw_post_finalize + ! ######################################################################################### subroutine GFS_rrtmgp_lw_post_finalize () end subroutine GFS_rrtmgp_lw_post_finalize diff --git a/physics/GFS_rrtmgp_lw_pre.F90 b/physics/GFS_rrtmgp_lw_pre.F90 index 5300b21b5..aef812246 100644 --- a/physics/GFS_rrtmgp_lw_pre.F90 +++ b/physics/GFS_rrtmgp_lw_pre.F90 @@ -1,5 +1,3 @@ -!> \file GFS_rrtmgp_lw_pre.f90 -!! This file contains module GFS_rrtmgp_lw_pre use physparam use machine, only: & @@ -25,24 +23,31 @@ module GFS_rrtmgp_lw_pre contains + ! ######################################################################################### + ! SUBROUTINE GFS_rrtmgp_lw_pre_init + ! ######################################################################################### subroutine GFS_rrtmgp_lw_pre_init () end subroutine GFS_rrtmgp_lw_pre_init + ! ######################################################################################### + ! SUBROUTINE GFS_rrtmgp_lw_pre_run + ! ######################################################################################### !> \section arg_table_GFS_rrtmgp_lw_pre_run !! \htmlinclude GFS_rrtmgp_lw_pre.html !! - subroutine GFS_rrtmgp_lw_pre_run (Model, Grid, Sfcprop, Statein, ncol, p_lay, p_lev, & - tv_lay, relhum, tracer, lw_gas_props, Radtend, Interstitial, aerosolslw, aerodp, errmsg, errflg) + subroutine GFS_rrtmgp_lw_pre_run (Model, Grid, Sfcprop, Statein, ncol, p_lay, p_lev, & + tv_lay, relhum, tracer, lw_gas_props, Radtend, Interstitial, aerosolslw, aerodp, & + errmsg, errflg) ! Inputs type(GFS_control_type), intent(in) :: & - Model ! Fortran DDT containing FV3-GFS model control parameters + Model ! DDT: FV3-GFS model control parameters type(GFS_grid_type), intent(in) :: & - Grid ! Fortran DDT containing FV3-GFS grid and interpolation related data + Grid ! DDT: FV3-GFS grid and interpolation related data type(GFS_sfcprop_type), intent(in) :: & - Sfcprop ! Fortran DDT containing FV3-GFS surface fields + Sfcprop ! DDT: FV3-GFS surface fields type(GFS_statein_type), intent(in) :: & - Statein ! Fortran DDT containing FV3-GFS prognostic state data in from dycore + Statein ! DDT: FV3-GFS prognostic state data in from dycore integer, intent(in) :: & ncol ! Number of horizontal grid points real(kind_phys), dimension(ncol,Model%levs),intent(in) :: & @@ -50,19 +55,19 @@ subroutine GFS_rrtmgp_lw_pre_run (Model, Grid, Sfcprop, Statein, ncol, p_lay, tv_lay, & ! Layer virtual-temperature relhum ! Layer relative-humidity real(kind_phys), dimension(ncol, Model%levs, 2:Model%ntrac),intent(in) :: & - tracer + tracer ! trace gas concentrations real(kind_phys), dimension(ncol,Model%levs+1),intent(in) :: & p_lev ! Interface (level) pressure type(ty_gas_optics_rrtmgp),intent(in) :: & - lw_gas_props ! RRTMGP DDT containing spectral information for LW calculation + lw_gas_props ! RRTMGP DDT: spectral information for LW calculation ! Outputs type(GFS_radtend_type), intent(inout) :: & - Radtend ! Fortran DDT containing FV3-GFS radiation tendencies + Radtend ! DDT: FV3-GFS radiation tendencies type(GFS_interstitial_type), intent(inout) :: & - Interstitial + Interstitial ! DDT: FV3-GFS Interstitial arrays real(kind_phys), dimension(ncol,Model%levs,lw_gas_props%get_nband(),NF_AELW), intent(out) ::& - aerosolslw ! Aerosol radiative properties in each SW band. + aerosolslw ! Aerosol radiative properties in each SW band. real(kind_phys), dimension(ncol,NSPC1), intent(inout) :: & aerodp ! Vertical integrated optical depth for various aerosol species character(len=*), intent(out) :: & @@ -83,9 +88,10 @@ subroutine GFS_rrtmgp_lw_pre_run (Model, Grid, Sfcprop, Statein, ncol, p_lay, ! ####################################################################################### ! Call module_radiation_surface::setemis(),to setup surface emissivity for LW radiation. ! ####################################################################################### - call setemis (Grid%xlon, Grid%xlat, Sfcprop%slmsk, Sfcprop%snowd, Sfcprop%sncovr, & - Sfcprop%zorl, Sfcprop%tsfc,Sfcprop%tsfc, Sfcprop%hprime(:,1), NCOL, & - Radtend%semis) + call setemis (Grid%xlon, Grid%xlat, Sfcprop%slmsk, Sfcprop%snowd, Sfcprop%sncovr, & + Sfcprop%zorl, Sfcprop%tsfc,Sfcprop%tsfc, Sfcprop%hprime(:,1), NCOL, Radtend%semis) + + ! Assign same emissivity to all bands do iBand=1,lw_gas_props%get_nband() Interstitial%sfc_emiss_byband(iBand,1:NCOL) = Radtend%semis(1:NCOL) enddo @@ -100,8 +106,9 @@ subroutine GFS_rrtmgp_lw_pre_run (Model, Grid, Sfcprop, Statein, ncol, p_lay, end subroutine GFS_rrtmgp_lw_pre_run -!> \section arg_table_GFS_rrtmgp_lw_pre_finalize Argument Table -!! + ! ######################################################################################### + ! SUBROUTINE GFS_rrtmgp_lw_pre_finalize + ! ######################################################################################### subroutine GFS_rrtmgp_lw_pre_finalize () end subroutine GFS_rrtmgp_lw_pre_finalize diff --git a/physics/GFS_rrtmgp_pre.F90 b/physics/GFS_rrtmgp_pre.F90 index aa0d2c007..4584fe2ac 100644 --- a/physics/GFS_rrtmgp_pre.F90 +++ b/physics/GFS_rrtmgp_pre.F90 @@ -1,5 +1,3 @@ -!> \file GFS_rrtmgp_pre.f90 -!! This file contains module GFS_rrtmgp_pre use physparam use machine, only: & @@ -63,18 +61,18 @@ module GFS_rrtmgp_pre contains + ! ######################################################################################### + ! SUBROUTINE GFS_rrtmgp_pre_init + ! ######################################################################################### !! \section arg_table_GFS_rrtmgp_pre_init !! \htmlinclude GFS_rrtmgp_pre_init.html !! - ! ######################################################################################### - ! SUBROUTINE GFS_rrtmgp_pre_init() - ! ######################################################################################### subroutine GFS_rrtmgp_pre_init(Model, Radtend, errmsg, errflg) ! Inputs type(GFS_control_type), intent(inout) :: & - Model ! DDT containing model control parameters - type(GFS_radtend_type), intent(inout) :: & - Radtend ! Fortran DDT containing FV3-GFS radiation tendencies + Model ! DDT: FV3-GFS model control parameters + type(GFS_radtend_type), intent(inout) :: & + Radtend ! DDT: FV3-GFS radiation tendencies ! Outputs character(len=*), intent(out) :: & errmsg ! Error message @@ -113,6 +111,9 @@ subroutine GFS_rrtmgp_pre_init(Model, Radtend, errmsg, errflg) endif end subroutine GFS_rrtmgp_pre_init + ! ######################################################################################### + ! SUBROUTINE GFS_rrtmgp_pre_run + ! ######################################################################################### !> \section arg_table_GFS_rrtmgp_pre_run !! \htmlinclude GFS_rrtmgp_pre.html !! @@ -125,19 +126,19 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, ! Inputs type(GFS_control_type), intent(in) :: & - Model ! Fortran DDT containing FV3-GFS model control parameters + Model ! DDT: FV3-GFS model control parameters type(GFS_grid_type), intent(in) :: & - Grid ! Fortran DDT containing FV3-GFS grid and interpolation related data + Grid ! DDT: FV3-GFS grid and interpolation related data type(GFS_statein_type), intent(in) :: & - Statein ! Fortran DDT containing FV3-GFS prognostic state data in from dycore + Statein ! DDT: FV3-GFS prognostic state data in from dycore type(GFS_coupling_type), intent(in) :: & - Coupling ! Fortran DDT containing FV3-GFS fields to/from coupling with other components + Coupling ! DDT: FV3-GFS fields to/from coupling with other components type(GFS_radtend_type), intent(inout) :: & - Radtend ! Fortran DDT containing FV3-GFS radiation tendencies + Radtend ! DDT: FV3-GFS radiation tendencies type(GFS_sfcprop_type), intent(in) :: & - Sfcprop ! Fortran DDT containing FV3-GFS surface fields + Sfcprop ! DDT: FV3-GFS surface fields type(GFS_tbd_type), intent(in) :: & - Tbd ! Fortran DDT containing FV3-GFS data not yet assigned to a defined container + Tbd ! DDT: FV3-GFS data not yet assigned to a defined container integer, intent(in) :: & ncol ! Number of horizontal grid points @@ -154,7 +155,7 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, tsfg, & ! Ground temperature tsfa ! Skin temperature type(ty_gas_concs),intent(out) :: & - gas_concentrations ! RRTMGP DDT containing gas volumne mixing ratios + gas_concentrations ! RRTMGP DDT: gas volumne mixing ratios character(len=*), intent(out) :: & errmsg ! Error message integer, intent(out) :: & @@ -170,17 +171,17 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, cld_rwp, & ! Cloud rain water path cld_rerain ! Cloud rain effective radius real(kind_phys), dimension(ncol,Model%levs),intent(out) :: & - tv_lay, & ! - relhum + tv_lay, & ! Virtual temperatue at model-layers + relhum ! Relative-humidity at model-layers real(kind_phys), dimension(ncol, Model%levs, 2:Model%ntrac),intent(out) :: & - tracer + tracer ! Array containing trace gases integer,dimension(ncol,3),intent(out) :: & mbota, & ! Vertical indices for cloud tops mtopa ! Vertical indices for cloud bases real(kind_phys), dimension(ncol,5), intent(out) :: & cldsa ! Fraction of clouds for low, middle, high, total and BL real(kind_phys), dimension(ncol), intent(out) :: & - de_lgth ! + de_lgth ! Decorrelation length ! Local variables integer :: i, j, iCol, iBand, iSFC, iTOA, iLay @@ -215,7 +216,7 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, ! ####################################################################################### ! Water-vapor mixing-ratio - q_lay(1:ncol,:) = max( 1.e-6, Statein%qgrs(:,:,1)) + q_lay(1:ncol,:) = max( 1.e-6, Statein%qgrs(1:NCOL,:,1)) ! Pressure at layer-interface p_lev(1:NCOL,:) = Statein%prsi(1:NCOL,:) @@ -305,9 +306,8 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, ! ####################################################################################### ! Cloud microphysics ! ####################################################################################### - call cloud_microphysics(Model, Tbd, Grid, Sfcprop, ncol, tracer, p_lay, t_lay, & - p_lev, tv_lay, relhum, qs_lay, q_lay, deltaZ, deltaP, & - clouds, cldsa, mbota, mtopa, de_lgth) + call cloud_microphysics(Model, Tbd, Grid, Sfcprop, ncol, tracer, p_lay, t_lay, p_lev, & + tv_lay, relhum, qs_lay, q_lay, deltaZ, deltaP, clouds, cldsa, mbota, mtopa, de_lgth) ! Copy output cloud fields cld_frac = clouds(:,:,1) @@ -322,28 +322,29 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, end subroutine GFS_rrtmgp_pre_run -!> \section arg_table_GFS_rrtmgp_pre_finalize Argument Table -!! + ! ######################################################################################### + ! SUBROUTINE GFS_rrtmgp_pre_finalize + ! ######################################################################################### subroutine GFS_rrtmgp_pre_finalize () end subroutine GFS_rrtmgp_pre_finalize - ! ####################################################################################### + ! ######################################################################################### ! Subroutine cloud_microphysics() - ! ####################################################################################### - subroutine cloud_microphysics(Model, Tbd, Grid, Sfcprop, ncol, tracer, p_lay, t_lay, & - p_lev, tv_lay, relhum, qs_lay, q_lay, deltaZ, deltaP, & - clouds, cldsa, mbota, mtopa, de_lgth) + ! ######################################################################################### + subroutine cloud_microphysics(Model, Tbd, Grid, Sfcprop, ncol, tracer, p_lay, t_lay, p_lev,& + tv_lay, relhum, qs_lay, q_lay, deltaZ, deltaP, clouds, cldsa, mbota, mtopa, de_lgth) + ! Inputs type(GFS_control_type), intent(in) :: & - Model ! Fortran DDT containing FV3-GFS model control parameters + Model ! DDT: FV3-GFS model control parameters type(GFS_tbd_type), intent(in) :: & - Tbd ! Fortran DDT containing FV3-GFS data not yet assigned to a defined container + Tbd ! DDT: FV3-GFS data not yet assigned to a defined container type(GFS_grid_type), intent(in) :: & - Grid ! Fortran DDT containing FV3-GFS grid and interpolation related data + Grid ! DDT: FV3-GFS grid and interpolation related data type(GFS_sfcprop_type), intent(in) :: & - Sfcprop ! Fortran DDT containing FV3-GFS surface fields + Sfcprop ! DDT: FV3-GFS surface fields integer, intent(in) :: & - ncol ! Number of horizontal gridpoints + ncol ! Number of horizontal gridpoints real(kind_phys), dimension(ncol, Model%levs, 2:Model%ntrac),intent(in) :: & tracer ! real(kind_phys), dimension(ncol,Model%levs), intent(in) :: & @@ -359,16 +360,22 @@ subroutine cloud_microphysics(Model, Tbd, Grid, Sfcprop, ncol, tracer, p_lay, t_ p_lev ! ! Outputs - real(kind_phys), dimension(ncol, Model%levs, NF_CLDS),intent(out) :: clouds - integer,dimension(ncol,3), intent(out) :: mbota, mtopa - real(kind_phys), dimension(ncol), intent(out) :: de_lgth - real(kind_phys), dimension(ncol, 5), intent(out) :: cldsa + real(kind_phys), dimension(ncol, Model%levs, NF_CLDS),intent(out) :: & + clouds ! + integer,dimension(ncol,3), intent(out) :: & + mbota, & ! + mtopa ! + real(kind_phys), dimension(ncol), intent(out) ::& + de_lgth ! + real(kind_phys), dimension(ncol, 5), intent(out) :: & + cldsa ! ! Local variables real(kind_phys), dimension(ncol, Model%levs, Model%ncnd) :: cld_condensate integer :: i,k real(kind_phys), parameter :: xrc3 = 100. - real(kind_phys), dimension(ncol, Model%levs) :: delta_q, cnv_w, cnv_c, effr_l, effr_i, effr_r, effr_s, cldcov + real(kind_phys), dimension(ncol, Model%levs) :: delta_q, cnv_w, cnv_c, effr_l, & + effr_i, effr_r, effr_s, cldcov ! ####################################################################################### ! Obtain cloud information for radiation calculations @@ -665,6 +672,6 @@ subroutine cloud_microphysics(Model, Tbd, Grid, Sfcprop, ncol, tracer, p_lay, t_ mbota, & ! OUT - vertical indices for low, mid, hi cloud bases (NCOL,3) de_lgth) ! OUT - clouds decorrelation length (km) endif ! end if_imp_physics - end subroutine cloud_microphysics + ! end module GFS_rrtmgp_pre diff --git a/physics/GFS_rrtmgp_sw_pre.F90 b/physics/GFS_rrtmgp_sw_pre.F90 index ee3a69720..8c4b5b7fd 100644 --- a/physics/GFS_rrtmgp_sw_pre.F90 +++ b/physics/GFS_rrtmgp_sw_pre.F90 @@ -1,5 +1,3 @@ -!> \file GFS_rrtmgp_sw_pre.f90 -!! This file contains module GFS_rrtmgp_sw_pre use physparam use machine, only: & @@ -32,27 +30,33 @@ module GFS_rrtmgp_sw_pre contains + ! ######################################################################################### + ! SUBROUTINE GFS_rrtmgp_sw_pre_init + ! ######################################################################################### subroutine GFS_rrtmgp_sw_pre_init () end subroutine GFS_rrtmgp_sw_pre_init + ! ######################################################################################### + ! SUBROUTINE GFS_rrtmgp_sw_pre_run + ! ######################################################################################### !> \section arg_table_GFS_rrtmgp_sw_pre_run !! \htmlinclude GFS_rrtmgp_sw_pre.html !! - subroutine GFS_rrtmgp_sw_pre_run (Model, Interstitial, Grid, Sfcprop, Statein, ncol, p_lay, & - p_lev, tv_lay, relhum, tracer, sw_gas_props, nday, idxday, alb1d, RadTend, & + subroutine GFS_rrtmgp_sw_pre_run(Model, Interstitial, Grid, Sfcprop, Statein, ncol, p_lay,& + p_lev, tv_lay, relhum, tracer, sw_gas_props, nday, idxday, alb1d, RadTend, & Coupling, aerosolssw, aerodp, errmsg, errflg) ! Inputs type(GFS_control_type), intent(in) :: & - Model ! Fortran DDT containing FV3-GFS model control parameters + Model ! DDT: FV3-GFS model control parameters type(GFS_Interstitial_type),intent(inout) :: & Interstitial type(GFS_grid_type), intent(in) :: & - Grid ! Fortran DDT containing FV3-GFS grid and interpolation related data + Grid ! DDT: FV3-GFS grid and interpolation related data type(GFS_sfcprop_type), intent(in) :: & - Sfcprop ! Fortran DDT containing FV3-GFS surface fields + Sfcprop ! DDT: FV3-GFS surface fields type(GFS_statein_type), intent(in) :: & - Statein ! Fortran DDT containing FV3-GFS prognostic state data in from dycore + Statein ! DDT: FV3-GFS prognostic state data in from dycore integer, intent(in) :: & ncol ! Number of horizontal grid points real(kind_phys), dimension(ncol,Model%levs),intent(in) :: & @@ -62,9 +66,9 @@ subroutine GFS_rrtmgp_sw_pre_run (Model, Interstitial, Grid, Sfcprop, Statein, real(kind_phys), dimension(ncol, Model%levs, 2:Model%ntrac),intent(in) :: & tracer real(kind_phys), dimension(ncol,Model%levs+1),intent(in) :: & - p_lev ! Interface (level) pressure + p_lev ! Pressure @ layer interfaces (Pa) type(ty_gas_optics_rrtmgp),intent(in) :: & - sw_gas_props ! RRTMGP DDT containing spectral information for SW calculation + sw_gas_props ! RRTMGP DDT: spectral information for SW calculation ! Outputs integer, intent(out) :: & @@ -74,11 +78,11 @@ subroutine GFS_rrtmgp_sw_pre_run (Model, Interstitial, Grid, Sfcprop, Statein, real(kind_phys), dimension(ncol), intent(out) :: & alb1d ! Surface albedo pertubation type(GFS_radtend_type), intent(inout) :: & - Radtend ! Fortran DDT containing FV3-GFS radiation tendencies + Radtend ! DDT: FV3-GFS radiation tendencies type(GFS_coupling_type), intent(inout) :: & - Coupling + Coupling ! DDT: FV3-GFS coupling arrays real(kind_phys), dimension(ncol,Model%levs,sw_gas_props%get_nband(),NF_AESW), intent(out) ::& - aerosolssw ! Aerosol radiative properties in each SW band. + aerosolssw ! Aerosol radiative properties in each SW band. real(kind_phys), dimension(ncol,NSPC1), intent(inout) :: & aerodp ! Vertical integrated optical depth for various aerosol species character(len=*), intent(out) :: & @@ -135,7 +139,7 @@ subroutine GFS_rrtmgp_sw_pre_run (Model, Interstitial, Grid, Sfcprop, Statein, ! Call module_radiation_surface::setalb() to setup surface albedo. call setalb (Sfcprop%slmsk, Sfcprop%snowd, Sfcprop%sncovr, Sfcprop%snoalb, Sfcprop%zorl, & - Radtend%coszen, Sfcprop%tsfc, Sfcprop%tsfc, Sfcprop%hprime(:,1), Sfcprop%alvsf, & + Radtend%coszen, Sfcprop%tsfc, Sfcprop%tsfc, Sfcprop%hprime(:,1), Sfcprop%alvsf, & Sfcprop%alnsf, Sfcprop%alvwf, Sfcprop%alnwf, Sfcprop%facsf, Sfcprop%facwf, & Sfcprop%fice, Sfcprop%tisfc, NCOL, alb1d, Model%pertalb, sfcalb) @@ -153,9 +157,9 @@ subroutine GFS_rrtmgp_sw_pre_run (Model, Interstitial, Grid, Sfcprop, Statein, ! ####################################################################################### ! Call module_radiation_aerosols::setaer(),to setup aerosols property profile ! ####################################################################################### - call setaer(p_lev, p_lay, Statein%prslk(1:NCOL,:), tv_lay, relhum, & - Sfcprop%slmsk, tracer, Grid%xlon, Grid%xlat, NCOL, Model%levs, Model%levs+1, & - Model%lsswr, .true., aerosolssw2, aerosolslw, aerodp) + call setaer(p_lev, p_lay, Statein%prslk(1:NCOL,:), tv_lay, relhum, Sfcprop%slmsk, tracer, & + Grid%xlon, Grid%xlat, NCOL, Model%levs, Model%levs+1, Model%lsswr, .true., & + aerosolssw2, aerosolslw, aerodp) ! Store aerosol optical properties ! SW. @@ -170,8 +174,9 @@ subroutine GFS_rrtmgp_sw_pre_run (Model, Interstitial, Grid, Sfcprop, Statein, end subroutine GFS_rrtmgp_sw_pre_run -!> \section arg_table_GFS_rrtmgp_sw_pre_finalize Argument Table -!! + ! ######################################################################################### + ! SUBROUTINE GFS_rrtmgp_sw_pre_finalize + ! ######################################################################################### subroutine GFS_rrtmgp_sw_pre_finalize () end subroutine GFS_rrtmgp_sw_pre_finalize diff --git a/physics/rrtmgp_sw_gas_optics.F90 b/physics/rrtmgp_sw_gas_optics.F90 index 8ab4ae9e2..f235b8d02 100644 --- a/physics/rrtmgp_sw_gas_optics.F90 +++ b/physics/rrtmgp_sw_gas_optics.F90 @@ -403,11 +403,11 @@ subroutine rrtmgp_sw_gas_optics_run(Model, Interstitial, sw_gas_props, ncol, p_l ! Inputs type(GFS_control_type), intent(in) :: & - Model ! DDT containing model control parameters + Model ! DDT: FV3-GFS model control parameters type(GFS_Interstitial_type),intent(inout) :: & - Interstitial + Interstitial ! DDT: FV3-GFS Interstitial arrays type(ty_gas_optics_rrtmgp),intent(in) :: & - sw_gas_props ! DDT containing spectral information for RRTMGP SW radiation scheme + sw_gas_props ! RRTMGP DDT: spectral information for RRTMGP SW radiation scheme integer,intent(in) :: & ncol ! Number of horizontal points real(kind_phys), dimension(ncol,model%levs), intent(in) :: & @@ -429,7 +429,7 @@ subroutine rrtmgp_sw_gas_optics_run(Model, Interstitial, sw_gas_props, ncol, p_l integer, intent(out) :: & errflg ! Error code type(ty_optical_props_2str),intent(out) :: & - sw_optical_props_clrsky ! + sw_optical_props_clrsky ! RRTMGP DDT: clear-sky shortwave optical properties, spectral (tau,ssa,g) ! Local variables integer :: ij diff --git a/physics/rrtmgp_sw_rte.F90 b/physics/rrtmgp_sw_rte.F90 index bfa94a062..ca2c0248a 100644 --- a/physics/rrtmgp_sw_rte.F90 +++ b/physics/rrtmgp_sw_rte.F90 @@ -1,5 +1,3 @@ -! ########################################################################################### -! ########################################################################################### module rrtmgp_sw_rte use machine, only: kind_phys use GFS_typedefs, only: GFS_control_type, GFS_radtend_type, GFS_statein_type, GFS_interstitial_type @@ -29,74 +27,72 @@ end subroutine rrtmgp_sw_rte_init !! \section arg_table_rrtmgp_sw_rte_run !! \htmlinclude rrtmgp_sw_rte.html !! - subroutine rrtmgp_sw_rte_run(Model, Interstitial, Radtend, Statein, ncol, sw_gas_props, p_lay, t_lay, & - p_lev, gas_concentrations, sw_optical_props_clrsky, sw_optical_props_clouds, & - sw_optical_props_aerosol, lsswr, nday, idxday, hsw0, hswb, scmpsw, & - fluxswUP_allsky, fluxswDOWN_allsky, fluxswUP_clrsky, fluxswDOWN_clrsky, errmsg, errflg) + subroutine rrtmgp_sw_rte_run(Model, Interstitial, Radtend, Statein, ncol, sw_gas_props, & + p_lay, t_lay, p_lev, gas_concentrations, sw_optical_props_clrsky, & + sw_optical_props_clouds, sw_optical_props_aerosol, lsswr, nday, idxday, hsw0, hswb, & + scmpsw, fluxswUP_allsky, fluxswDOWN_allsky, fluxswUP_clrsky, fluxswDOWN_clrsky, & + errmsg, errflg) ! Inputs - type(GFS_control_type), intent(in) :: & + type(GFS_control_type), intent(in) :: & Model type(GFS_interstitial_type), intent(in) :: & Interstitial type(GFS_radtend_type), intent(in) :: & Radtend type(GFS_statein_type), intent(in) :: & - Statein ! Fortran DDT containing FV3-GFS prognostic state data in from dycore + Statein ! DDT: FV3-GFS prognostic state data in from dycore integer, intent(in) :: & - ncol, & ! Number of horizontal gridpoints - nday ! Number of daytime points + ncol, & ! Number of horizontal gridpoints + nday ! Number of daytime points integer, intent(in), dimension(nday) :: & - idxday ! Index array for daytime points + idxday ! Index array for daytime points real(kind_phys), dimension(ncol,Model%levs), intent(in) :: & - p_lay, & ! Pressure @ model layer-centers (hPa) - t_lay ! Temperature (K) + p_lay, & ! Pressure @ model layer-centers (Pa) + t_lay ! Temperature (K) real(kind_phys), dimension(ncol,Model%levs+1), intent(in) :: & - p_lev ! Pressure @ model layer-interfaces (hPa) + p_lev ! Pressure @ model layer-interfaces (Pa) type(ty_gas_optics_rrtmgp),intent(in) :: & - sw_gas_props ! DDT containing SW spectral information + sw_gas_props ! RRTMGP DDT: SW spectral information type(ty_optical_props_2str),intent(in) :: & sw_optical_props_clrsky, & ! RRTMGP DDT: longwave clear-sky radiative properties sw_optical_props_clouds, & ! RRTMGP DDT: longwave cloud radiative properties - sw_optical_props_aerosol ! RRTMGP DDT: longwave aerosol radiative properties - + sw_optical_props_aerosol ! RRTMGP DDT: longwave aerosol radiative properties type(ty_gas_concs),intent(in) :: & - gas_concentrations ! RRTMGP DDT: trace gas concentrations (vmr) + gas_concentrations ! RRTMGP DDT: trace gas concentrations (vmr) logical, intent(in) :: & - lsswr ! Flag to calculate SW irradiances + lsswr ! Flag to calculate SW irradiances ! Outputs character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg real(kind_phys), dimension(ncol,Model%levs+1), intent(inout) :: & - fluxswUP_allsky, & ! All-sky flux (W/m2) - fluxswDOWN_allsky, & ! All-sky flux (W/m2) - fluxswUP_clrsky, & ! Clear-sky flux (W/m2) - fluxswDOWN_clrsky ! All-sky flux (W/m2) + fluxswUP_allsky, & ! RRTMGP upward all-sky flux profiles (W/m2) + fluxswDOWN_allsky, & ! RRTMGP downward all-sky flux profiles (W/m2) + fluxswUP_clrsky, & ! RRTMGP upward clear-sky flux profiles (W/m2) + fluxswDOWN_clrsky ! RRTMGP downward clear-sky flux profiles (W/m2) ! Inputs (optional) (NOTE. We only need the optional arguments to know what fluxes to output, HR's are computed later) real(kind_phys), dimension(ncol,Model%levs), optional, intent(inout) :: & - hsw0 ! Clear-sky heating rate (K/sec) + hsw0 ! Clear-sky heating rate (K/sec) real(kind_phys), dimension(ncol,Model%levs,sw_gas_props%get_nband()), intent(inout), optional :: & - hswb ! All-sky heating rate, by band (K/sec) + hswb ! All-sky heating rate, by band (K/sec) ! Outputs (optional) type(cmpfsw_type), dimension(ncol), intent(inout),optional :: & - scmpsw ! 2D surface fluxes, components: - ! uvbfc - total sky downward uv-b flux at (W/m2) - ! uvbf0 - clear sky downward uv-b flux at (W/m2) - ! nirbm - downward nir direct beam flux (W/m2) - ! nirdf - downward nir diffused flux (W/m2) - ! visbm - downward uv+vis direct beam flux (W/m2) - ! visdf - downward uv+vis diffused flux (W/m2) + scmpsw ! 2D surface fluxes, components: + ! uvbfc - total sky downward uv-b flux (W/m2) + ! uvbf0 - clear sky downward uv-b flux (W/m2) + ! nirbm - downward nir direct beam flux (W/m2) + ! nirdf - downward nir diffused flux (W/m2) + ! visbm - downward uv+vis direct beam flux (W/m2) + ! visdf - downward uv+vis diffused flux (W/m2) ! Local variables type(ty_fluxes_byband) :: & - flux_allsky, & ! All-sky flux (W/m2) - flux_clrsky ! Clear-sky flux (W/m2) + flux_allsky, & ! All-sky flux (W/m2) + flux_clrsky ! Clear-sky flux (W/m2) real(kind_phys), dimension(nday,Model%levs+1,sw_gas_props%get_nband()),target :: & fluxSW_up_allsky, fluxSW_up_clrsky, fluxSW_dn_allsky, fluxSW_dn_clrsky, fluxSW_dn_dir_allsky -! real(kind_phys), dimension(nday,Model%levs+1,sw_gas_props%get_nband()),target :: & -! fluxSWBB_up_allsky, fluxSWBB_dn_allsky real(kind_phys), dimension(ncol,Model%levs) :: vmrTemp logical :: l_ClrSky_HR=.false., l_AllSky_HR_byband=.false., l_scmpsw=.false., top_at_1 integer :: iGas,iSFC,iTOA @@ -166,41 +162,39 @@ subroutine rrtmgp_sw_rte_run(Model, Interstitial, Radtend, Statein, ncol, sw_gas flux_allsky%bnd_flux_dn_dir => fluxSW_dn_dir_allsky flux_clrsky%bnd_flux_up => fluxSW_up_clrsky flux_clrsky%bnd_flux_dn => fluxSW_dn_clrsky - ! Only calculate fluxes by-band, only when heating-rate profiles by band are requested. - !if (l_AllSky_HR_byband) then - ! flux_allsky%bnd_flux_up => fluxSWBB_up_allsky - ! flux_allsky%bnd_flux_dn => fluxSWBB_dn_allsky - !endif ! Compute clear-sky fluxes (if requested) - ! Clear-sky fluxes are gas+aerosol + ! Clear-sky fluxes (gas+aerosol) call check_error_msg('rrtmgp_sw_rte_run',sw_optical_props_aerosol_daylit%increment(sw_optical_props_clrsky_daylit)) + ! Delta-scale optical properties call check_error_msg('rrtmgp_sw_rte_run',sw_optical_props_clrsky_daylit%delta_scale()) if (l_ClrSky_HR) then call check_error_msg('rrtmgp_sw_rte_run',rte_sw( & - sw_optical_props_clrsky_daylit, & ! IN - optical-properties - top_at_1, & ! IN - veritcal ordering flag - Radtend%coszen(idxday), & ! IN - Cosine of solar zenith angle - Interstitial%toa_src_sw(idxday,:), & ! IN - incident solar flux at TOA - Interstitial%sfc_alb_nir_dir(:,idxday), & ! IN - Shortwave surface albedo (direct) - Interstitial%sfc_alb_nir_dif(:,idxday), & ! IN - Shortwave surface albedo (diffuse) - flux_clrsky)) ! OUT - Fluxes, clear-sky, 3D (nCol,Model%levs,nBand) + sw_optical_props_clrsky_daylit, & ! IN - optical-properties + top_at_1, & ! IN - veritcal ordering flag + Radtend%coszen(idxday), & ! IN - Cosine of solar zenith angle + Interstitial%toa_src_sw(idxday,:), & ! IN - incident solar flux at TOA + Interstitial%sfc_alb_nir_dir(:,idxday), & ! IN - Shortwave surface albedo (direct) + Interstitial%sfc_alb_nir_dif(:,idxday), & ! IN - Shortwave surface albedo (diffuse) + flux_clrsky)) ! OUT - Fluxes, clear-sky, 3D (nCol,Model%levs,nBand) ! Store fluxes fluxswUP_clrsky(idxday,:) = sum(flux_clrsky%bnd_flux_up,dim=3) fluxswDOWN_clrsky(idxday,:) = sum(flux_clrsky%bnd_flux_dn,dim=3) endif ! Compute all-sky fluxes - call check_error_msg('rrtmgp_sw_rte_run',sw_optical_props_clouds_daylit%delta_scale()) + ! All-sky fluxes (clear-sky + clouds) call check_error_msg('rrtmgp_sw_rte_run',sw_optical_props_clouds_daylit%increment(sw_optical_props_clrsky_daylit)) + ! Delta-scale optical properties + call check_error_msg('rrtmgp_sw_rte_run',sw_optical_props_clouds_daylit%delta_scale()) call check_error_msg('rrtmgp_sw_rte_run',rte_sw( & - sw_optical_props_clrsky_daylit, & ! IN - optical-properties - top_at_1, & ! IN - veritcal ordering flag - Radtend%coszen(idxday), & ! IN - Cosine of solar zenith angle - Interstitial%toa_src_sw(idxday,:), & ! IN - incident solar flux at TOA - Interstitial%sfc_alb_nir_dir(:,idxday), & ! IN - Shortwave surface albedo (direct) - Interstitial%sfc_alb_nir_dif(:,idxday), & ! IN - Shortwave surface albedo (diffuse) - flux_allsky)) ! OUT - Fluxes, clear-sky, 3D (nCol,Model%levs,nBand) + sw_optical_props_clrsky_daylit, & ! IN - optical-properties + top_at_1, & ! IN - veritcal ordering flag + Radtend%coszen(idxday), & ! IN - Cosine of solar zenith angle + Interstitial%toa_src_sw(idxday,:), & ! IN - incident solar flux at TOA + Interstitial%sfc_alb_nir_dir(:,idxday), & ! IN - Shortwave surface albedo (direct) + Interstitial%sfc_alb_nir_dif(:,idxday), & ! IN - Shortwave surface albedo (diffuse) + flux_allsky)) ! OUT - Fluxes, clear-sky, 3D (nCol,Model%levs,nBand) ! Store fluxes fluxswUP_allsky(idxday,:) = sum(flux_allsky%bnd_flux_up,dim=3) fluxswDOWN_allsky(idxday,:) = sum(flux_allsky%bnd_flux_dn,dim=3) From 26cc6b1340dd7bec3bf85f79c30ded2faf6a024a Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Fri, 6 Dec 2019 11:00:33 -0700 Subject: [PATCH 070/167] Cleaned up daytime masking in SW calculation --- physics/GFS_rrtmgp_pre.F90 | 7 +- physics/GFS_rrtmgp_sw_post.F90 | 337 ++++++++++++++--------------- physics/GFS_rrtmgp_sw_post.meta | 2 +- physics/GFS_rrtmgp_sw_pre.F90 | 7 +- physics/rrtmgp_sw_cloud_optics.F90 | 208 +++++++++--------- physics/rrtmgp_sw_gas_optics.F90 | 60 +++-- physics/rrtmgp_sw_gas_optics.meta | 16 ++ physics/rrtmgp_sw_rte.F90 | 129 +++++------ physics/rrtmgp_sw_rte.meta | 2 +- 9 files changed, 388 insertions(+), 380 deletions(-) diff --git a/physics/GFS_rrtmgp_pre.F90 b/physics/GFS_rrtmgp_pre.F90 index 4584fe2ac..a80c4b5a6 100644 --- a/physics/GFS_rrtmgp_pre.F90 +++ b/physics/GFS_rrtmgp_pre.F90 @@ -216,7 +216,8 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, ! ####################################################################################### ! Water-vapor mixing-ratio - q_lay(1:ncol,:) = max( 1.e-6, Statein%qgrs(1:NCOL,:,1)) + q_lay(1:ncol,:) = Statein%qgrs(1:NCOL,:,1) + where(q_lay .lt. 1.e-6) q_lay = 1.e-6 ! Pressure at layer-interface p_lev(1:NCOL,:) = Statein%prsi(1:NCOL,:) @@ -227,7 +228,6 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, ! Temperature at layer-center t_lay(1:NCOL,:) = Statein%tgrs(1:NCOL,:) - ! ! Temperature at layer-interfaces if (top_at_1) then t_lev(1:NCOL,1) = t_lay(1:NCOL,iTOA) @@ -260,7 +260,8 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, ! ####################################################################################### ! First recast remaining all tracers (except sphum) forcing them all to be positive do j = 2, model%NTRAC - tracer(1:NCOL,:,j) = max(0.0, Statein%qgrs(1:NCOL,:,j)) + tracer(1:NCOL,:,j) = Statein%qgrs(1:NCOL,:,j) + where(tracer(:,:,j) .lt. 0.0) tracer(:,:,j) = 0._kind_phys enddo if (Model%ntoz > 0) then diff --git a/physics/GFS_rrtmgp_sw_post.F90 b/physics/GFS_rrtmgp_sw_post.F90 index 27edd06b7..72e841b07 100644 --- a/physics/GFS_rrtmgp_sw_post.F90 +++ b/physics/GFS_rrtmgp_sw_post.F90 @@ -1,17 +1,10 @@ -!>\file GFS_rrtmgp_sw_post -!!This file contains module GFS_rrtmgp_sw_post - use machine, only: kind_phys - use GFS_typedefs, only: GFS_coupling_type, & - GFS_control_type, & - GFS_grid_type, & - GFS_radtend_type, & - GFS_diag_type, & - GFS_statein_type, & - GFS_interstitial_type + use machine, only: kind_phys + use GFS_typedefs, only: GFS_coupling_type, GFS_control_type, GFS_grid_type, & + GFS_radtend_type, GFS_diag_type, GFS_statein_type, & + GFS_interstitial_type use module_radiation_aerosols, only: NSPC1 use module_radsw_parameters, only: topfsw_type, sfcfsw_type, profsw_type, cmpfsw_type - ! RRTMGP DDT's use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp use mo_fluxes_byband, only: ty_fluxes_byband use mo_heating_rates, only: compute_heating_rate @@ -35,7 +28,7 @@ end subroutine GFS_rrtmgp_sw_post_init !! \htmlinclude GFS_rrtmgp_sw_post.html !! subroutine GFS_rrtmgp_sw_post_run (Model, Interstitial, Grid, Diag, Radtend, Coupling, & - Statein, scmpsw, im, p_lev, sw_gas_props, nday, idxday, fluxswUP_allsky, & + Statein, scmpsw, nCol, p_lev, sw_gas_props, nday, idxday, fluxswUP_allsky, & fluxswDOWN_allsky, fluxswUP_clrsky, fluxswDOWN_clrsky, raddt, aerodp, cldsa, mbota, & mtopa, cld_frac, cldtausw, flxprf_sw, hsw0, errmsg, errflg) @@ -55,32 +48,32 @@ subroutine GFS_rrtmgp_sw_post_run (Model, Interstitial, Grid, Diag, Radtend, Cou type(GFS_statein_type), intent(in) :: & Statein ! Fortran DDT: FV3-GFS prognostic state data in from dycore integer, intent(in) :: & - im, & ! Horizontal loop extent + nCol, & ! Horizontal loop extent nDay ! Number of daylit columns integer, intent(in), dimension(nday) :: & idxday ! Index array for daytime points type(ty_gas_optics_rrtmgp),intent(in) :: & sw_gas_props ! DDT containing SW spectral information - real(kind_phys), dimension(size(Grid%xlon,1), Model%levs+1), intent(in) :: & + real(kind_phys), dimension(nCol, Model%levs+1), intent(in) :: & p_lev ! Pressure @ model layer-interfaces (hPa) - real(kind_phys), dimension(size(Grid%xlon,1), Model%levs+1), intent(in) :: & + real(kind_phys), dimension(nCol, Model%levs+1), intent(in) :: & fluxswUP_allsky, & ! SW All-sky flux (W/m2) fluxswDOWN_allsky, & ! SW All-sky flux (W/m2) fluxswUP_clrsky, & ! SW Clear-sky flux (W/m2) fluxswDOWN_clrsky ! SW All-sky flux (W/m2) real(kind_phys), intent(in) :: & raddt ! Radiation time step - real(kind_phys), dimension(im,NSPC1), intent(in) :: & + real(kind_phys), dimension(nCol,NSPC1), intent(in) :: & aerodp ! Vertical integrated optical depth for various aerosol species - real(kind_phys), dimension(im,5), intent(in) :: & + real(kind_phys), dimension(nCol,5), intent(in) :: & cldsa ! Fraction of clouds for low, middle, high, total and BL - integer, dimension(im,3), intent(in) ::& + integer, dimension(nCol,3), intent(in) ::& mbota, & ! vertical indices for low, middle and high cloud tops mtopa ! vertical indices for low, middle and high cloud bases - real(kind_phys), dimension(im,Model%levs), intent(in) :: & + real(kind_phys), dimension(nCol,Model%levs), intent(in) :: & cld_frac, & ! Total cloud fraction in each layer cldtausw ! approx .55mu band layer cloud optical depth - real(kind_phys),dimension(size(Grid%xlon,1), Model%levs) :: & + real(kind_phys),dimension(nCol, Model%levs) :: & hswc ! All-sky heating rates (K/s) ! Outputs (mandatory) @@ -90,15 +83,15 @@ subroutine GFS_rrtmgp_sw_post_run (Model, Interstitial, Grid, Diag, Radtend, Cou errflg ! Outputs (optional) - real(kind_phys), dimension(size(Grid%xlon,1), Model%levs), optional, intent(inout) :: & + real(kind_phys), dimension(nCol, Model%levs), optional, intent(inout) :: & hsw0 ! Shortwave clear-sky heating-rate (K/sec) - type(profsw_type), dimension(size(Grid%xlon,1), Model%levs+1), intent(inout), optional :: & + type(profsw_type), dimension(nCol, Model%levs+1), intent(inout), optional :: & flxprf_sw ! 2D radiative fluxes, components: ! upfxc - total sky upward flux (W/m2) ! dnfxc - total sky dnward flux (W/m2) ! upfx0 - clear sky upward flux (W/m2) ! dnfx0 - clear sky dnward flux (W/m2) - type(cmpfsw_type), dimension(size(Grid%xlon,1)), intent(inout), optional :: & + type(cmpfsw_type), dimension(nCol), intent(inout), optional :: & scmpsw ! 2D surface fluxes, components: ! uvbfc - total sky downward uv-b flux at (W/m2) ! uvbf0 - clear sky downward uv-b flux at (W/m2) @@ -112,61 +105,50 @@ subroutine GFS_rrtmgp_sw_post_run (Model, Interstitial, Grid, Diag, Radtend, Cou real(kind_phys), dimension(nDay, Model%levs) :: thetaTendClrSky, thetaTendAllSky logical :: l_clrskysw_hr, l_fluxessw2d, top_at_1, l_sfcFluxessw1D - ! Initialize CCPP error handling variables + ! Initialize CCPP error handling variables errmsg = '' errflg = 0 - ! Are any optional outputs requested? - l_clrskysw_hr = present(hsw0) - l_fluxessw2d = present(flxprf_sw) - l_sfcfluxessw1D = present(scmpsw) + if (.not. Model%lsswr) return + if (nDay .gt. 0) then - ! ####################################################################################### - ! What is vertical ordering? - ! ####################################################################################### - top_at_1 = (p_lev(1,1) .lt. p_lev(1, Model%levs)) - if (top_at_1) then - iSFC = Model%levs+1 - iTOA = 1 - else - iSFC = 1 - iTOA = Model%levs+1 - endif - - ! ####################################################################################### - ! Compute SW heating-rates - ! ####################################################################################### - ! Initialize - hswc = 0 - Diag%topfsw = topfsw_type ( 0., 0., 0. ) - Radtend%sfcfsw = sfcfsw_type ( 0., 0., 0., 0. ) - if (l_clrskysw_hr) then - hsw0(:,:) = 0. - endif - if (l_fluxessw2D) then - flxprf_sw = profsw_type ( 0., 0., 0., 0. ) - endif - if (l_sfcfluxessw1D) then - scmpsw = cmpfsw_type (0.,0.,0.,0.,0.,0.) - endif + ! Are any optional outputs requested? + l_clrskysw_hr = present(hsw0) + l_fluxessw2d = present(flxprf_sw) + l_sfcfluxessw1D = present(scmpsw) - if (Model%lsswr .and. nDay .gt. 0) then + ! ####################################################################################### + ! What is vertical ordering? + ! ####################################################################################### + top_at_1 = (p_lev(1,1) .lt. p_lev(1, Model%levs)) + if (top_at_1) then + iSFC = Model%levs+1 + iTOA = 1 + else + iSFC = 1 + iTOA = Model%levs+1 + endif + + ! ####################################################################################### + ! Compute SW heating-rates + ! ####################################################################################### ! Clear-sky heating-rate (optional) if (l_clrskysw_HR) then call check_error_msg('GFS_rrtmgp_post',compute_heating_rate( & - fluxswUP_clrsky(idxday,:), & - fluxswDOWN_clrsky(idxday,:), & - p_lev(idxday,:), & - thetaTendClrSky)) - hsw0(idxday,:)=thetaTendClrSky + fluxswUP_clrsky(idxday(1:nDay),:), & ! IN - Shortwave upward clear-sky flux profiles (W/m2) + fluxswDOWN_clrsky(idxday(1:nDay),:), & ! IN - Shortwave downward clear-sky flux profiles (W/m2) + p_lev(idxday(1:nDay),:), & ! IN - Pressure at model-interface (Pa) + thetaTendClrSky)) ! OUT - Clear-sky heating-rate (K/sec) + hsw0(idxday(1:nDay),:)=thetaTendClrSky endif + ! All-sky heating-rate (mandatory) call check_error_msg('GFS_rrtmgp_post',compute_heating_rate( & - fluxswUP_allsky(idxday,:), & - fluxswDOWN_allsky(idxday,:), & - p_lev(idxday,:), & - thetaTendAllSky)) - hswc(idxday,:) = thetaTendAllSky + fluxswUP_allsky(idxday(1:nDay),:), & ! IN - Shortwave upward all-sky flux profiles (W/m2) + fluxswDOWN_allsky(idxday(1:nDay),:), & ! IN - Shortwave downward all-sky flux profiles (W/m2) + p_lev(idxday(1:nDay),:), & ! IN - Pressure at model-interface (Pa) + thetaTendAllSky)) ! OUT - All-sky heating-rate (K/sec) + hswc(idxday(1:nDay),:) = thetaTendAllSky ! Copy fluxes from RRTGMP types into model radiation types. ! Mandatory outputs @@ -185,65 +167,65 @@ subroutine GFS_rrtmgp_sw_post_run (Model, Interstitial, Grid, Diag, Radtend, Cou flxprf_sw(:,:)%upfx0 = fluxswUP_clrsky(:,:) flxprf_sw(:,:)%dnfx0 = fluxswDOWN_clrsky(:,:) endif - endif - ! ####################################################################################### - ! Save SW outputs - ! ####################################################################################### - if (Model%lsswr) then - if (nday > 0) then - ! All-sky heating rate + + ! ####################################################################################### + ! Save SW outputs + ! ####################################################################################### + ! All-sky heating rate + do k = 1, Model%levs + Radtend%htrsw(1:nCol,k) = hswc(1:nCol,k) + enddo + ! Clear-sky heating rate + if (Model%swhtr) then do k = 1, Model%levs - Radtend%htrsw(1:im,k) = hswc(1:im,k) - enddo - ! Clear-sky heating rate - if (Model%swhtr) then - do k = 1, Model%levs - Radtend%swhc(1:im,k) = hsw0(1:im,k) - enddo - endif - - ! Surface down and up spectral component fluxes - ! - Save two spectral bands' surface downward and upward fluxes for output. - do i=1,im - Coupling%nirbmdi(i) = scmpsw(i)%nirbm - Coupling%nirdfdi(i) = scmpsw(i)%nirdf - Coupling%visbmdi(i) = scmpsw(i)%visbm - Coupling%visdfdi(i) = scmpsw(i)%visdf - - Coupling%nirbmui(i) = scmpsw(i)%nirbm * Interstitial%sfc_alb_nir_dir(1,i) - Coupling%nirdfui(i) = scmpsw(i)%nirdf * Interstitial%sfc_alb_nir_dif(1,i) - Coupling%visbmui(i) = scmpsw(i)%visbm * Interstitial%sfc_alb_uvvis_dir(1,i) - Coupling%visdfui(i) = scmpsw(i)%visdf * Interstitial%sfc_alb_uvvis_dif(1,i) + Radtend%swhc(1:nCol,k) = hsw0(1:nCol,k) enddo - else ! if_nday_block - Radtend%htrsw(:,:) = 0.0 - Radtend%sfcfsw = sfcfsw_type( 0.0, 0.0, 0.0, 0.0 ) - Diag%topfsw = topfsw_type( 0.0, 0.0, 0.0 ) - scmpsw = cmpfsw_type( 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ) + endif + + ! Surface down and up spectral component fluxes + ! - Save two spectral bands' surface downward and upward fluxes for output. + do i=1,nCol + Coupling%nirbmdi(i) = scmpsw(i)%nirbm + Coupling%nirdfdi(i) = scmpsw(i)%nirdf + Coupling%visbmdi(i) = scmpsw(i)%visbm + Coupling%visdfdi(i) = scmpsw(i)%visdf - do i=1,im - Coupling%nirbmdi(i) = 0.0 - Coupling%nirdfdi(i) = 0.0 - Coupling%visbmdi(i) = 0.0 - Coupling%visdfdi(i) = 0.0 - - Coupling%nirbmui(i) = 0.0 - Coupling%nirdfui(i) = 0.0 - Coupling%visbmui(i) = 0.0 - Coupling%visdfui(i) = 0.0 - enddo + Coupling%nirbmui(i) = scmpsw(i)%nirbm * Interstitial%sfc_alb_nir_dir(1,i) + Coupling%nirdfui(i) = scmpsw(i)%nirdf * Interstitial%sfc_alb_nir_dif(1,i) + Coupling%visbmui(i) = scmpsw(i)%visbm * Interstitial%sfc_alb_uvvis_dir(1,i) + Coupling%visdfui(i) = scmpsw(i)%visdf * Interstitial%sfc_alb_uvvis_dif(1,i) + enddo + else ! if_nday_block + ! ####################################################################################### + ! Save SW outputs + ! ####################################################################################### + Radtend%htrsw(:,:) = 0.0 + Radtend%sfcfsw = sfcfsw_type( 0.0, 0.0, 0.0, 0.0 ) + Diag%topfsw = topfsw_type( 0.0, 0.0, 0.0 ) + scmpsw = cmpfsw_type( 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ) + + do i=1,nCol + Coupling%nirbmdi(i) = 0.0 + Coupling%nirdfdi(i) = 0.0 + Coupling%visbmdi(i) = 0.0 + Coupling%visdfdi(i) = 0.0 - if (Model%swhtr) then - Radtend%swhc(:,:) = 0 - endif - endif ! end_if_nday + Coupling%nirbmui(i) = 0.0 + Coupling%nirdfui(i) = 0.0 + Coupling%visbmui(i) = 0.0 + Coupling%visdfui(i) = 0.0 + enddo - ! Radiation fluxes for other physics processes - do i=1,im - Coupling%sfcnsw(i) = Radtend%sfcfsw(i)%dnfxc - Radtend%sfcfsw(i)%upfxc - Coupling%sfcdsw(i) = Radtend%sfcfsw(i)%dnfxc - enddo - endif ! end_if_lsswr + if (Model%swhtr) then + Radtend%swhc(:,:) = 0 + endif + endif ! end_if_nday + + ! Radiation fluxes for other physics processes + do i=1,nCol + Coupling%sfcnsw(i) = Radtend%sfcfsw(i)%dnfxc - Radtend%sfcfsw(i)%upfxc + Coupling%sfcdsw(i) = Radtend%sfcfsw(i)%dnfxc + enddo ! ####################################################################################### ! Save SW diagnostics @@ -254,68 +236,63 @@ subroutine GFS_rrtmgp_sw_post_run (Model, Interstitial, Grid, Diag, Radtend, Cou ! - Collect the fluxr data for wrtsfc ! ####################################################################################### if (Model%lssav) then - if (Model%lsswr) then - do i=1,im - Diag%fluxr(i,34) = Diag%fluxr(i,34) + Model%fhswr*aerodp(i,1) ! total aod at 550nm - Diag%fluxr(i,35) = Diag%fluxr(i,35) + Model%fhswr*aerodp(i,2) ! DU aod at 550nm - Diag%fluxr(i,36) = Diag%fluxr(i,36) + Model%fhswr*aerodp(i,3) ! BC aod at 550nm - Diag%fluxr(i,37) = Diag%fluxr(i,37) + Model%fhswr*aerodp(i,4) ! OC aod at 550nm - Diag%fluxr(i,38) = Diag%fluxr(i,38) + Model%fhswr*aerodp(i,5) ! SU aod at 550nm - Diag%fluxr(i,39) = Diag%fluxr(i,39) + Model%fhswr*aerodp(i,6) ! SS aod at 550nm - if (Radtend%coszen(i) > 0.) then - ! SW all-sky fluxes - tem0d = Model%fhswr * Radtend%coszdg(i) / Radtend%coszen(i) - Diag%fluxr(i,2 ) = Diag%fluxr(i,2) + Diag%topfsw(i)%upfxc * tem0d ! total sky top sw up - Diag%fluxr(i,3 ) = Diag%fluxr(i,3) + Radtend%sfcfsw(i)%upfxc * tem0d - Diag%fluxr(i,4 ) = Diag%fluxr(i,4) + Radtend%sfcfsw(i)%dnfxc * tem0d ! total sky sfc sw dn - ! SW uv-b fluxes - Diag%fluxr(i,21) = Diag%fluxr(i,21) + scmpsw(i)%uvbfc * tem0d ! total sky uv-b sw dn - Diag%fluxr(i,22) = Diag%fluxr(i,22) + scmpsw(i)%uvbf0 * tem0d ! clear sky uv-b sw dn - ! SW TOA incoming fluxes - Diag%fluxr(i,23) = Diag%fluxr(i,23) + Diag%topfsw(i)%dnfxc * tem0d ! top sw dn - ! SW SFC flux components - Diag%fluxr(i,24) = Diag%fluxr(i,24) + scmpsw(i)%visbm * tem0d ! uv/vis beam sw dn - Diag%fluxr(i,25) = Diag%fluxr(i,25) + scmpsw(i)%visdf * tem0d ! uv/vis diff sw dn - Diag%fluxr(i,26) = Diag%fluxr(i,26) + scmpsw(i)%nirbm * tem0d ! nir beam sw dn - Diag%fluxr(i,27) = Diag%fluxr(i,27) + scmpsw(i)%nirdf * tem0d ! nir diff sw dn - ! SW clear-sky fluxes - Diag%fluxr(i,29) = Diag%fluxr(i,29) + Diag%topfsw(i)%upfx0 * tem0d - Diag%fluxr(i,31) = Diag%fluxr(i,31) + Radtend%sfcfsw(i)%upfx0 * tem0d - Diag%fluxr(i,32) = Diag%fluxr(i,32) + Radtend%sfcfsw(i)%dnfx0 * tem0d - - endif - enddo - - ! Save total and boundary-layer clouds - do i=1,im - Diag%fluxr(i,17) = Diag%fluxr(i,17) + raddt * cldsa(i,4) - Diag%fluxr(i,18) = Diag%fluxr(i,18) + raddt * cldsa(i,5) - enddo - - ! Save cld frac,toplyr,botlyr and top temp, note that the order of h,m,l cloud - ! is reversed for the fluxr output. save interface pressure (pa) of top/bot - do j = 1, 3 - do i = 1, im - tem0d = raddt * cldsa(i,j) - itop = mtopa(i,j) - ibtc = mbota(i,j) - Diag%fluxr(i, 8-j) = Diag%fluxr(i, 8-j) + tem0d - Diag%fluxr(i,11-j) = Diag%fluxr(i,11-j) + tem0d * Statein%prsi(i,itop) - Diag%fluxr(i,14-j) = Diag%fluxr(i,14-j) + tem0d * Statein%prsi(i,ibtc) - Diag%fluxr(i,17-j) = Diag%fluxr(i,17-j) + tem0d * Statein%tgrs(i,itop) - - ! Add optical depth and emissivity output - tem1 = 0. - do k=ibtc,itop - tem1 = tem1 + cldtausw(i,k) ! approx .55 mu channel - enddo - Diag%fluxr(i,43-j) = Diag%fluxr(i,43-j) + tem0d * tem1 + do i=1,nCol + Diag%fluxr(i,34) = Diag%fluxr(i,34) + Model%fhswr*aerodp(i,1) ! total aod at 550nm + Diag%fluxr(i,35) = Diag%fluxr(i,35) + Model%fhswr*aerodp(i,2) ! DU aod at 550nm + Diag%fluxr(i,36) = Diag%fluxr(i,36) + Model%fhswr*aerodp(i,3) ! BC aod at 550nm + Diag%fluxr(i,37) = Diag%fluxr(i,37) + Model%fhswr*aerodp(i,4) ! OC aod at 550nm + Diag%fluxr(i,38) = Diag%fluxr(i,38) + Model%fhswr*aerodp(i,5) ! SU aod at 550nm + Diag%fluxr(i,39) = Diag%fluxr(i,39) + Model%fhswr*aerodp(i,6) ! SS aod at 550nm + if (Radtend%coszen(i) > 0.) then + ! SW all-sky fluxes + tem0d = Model%fhswr * Radtend%coszdg(i) / Radtend%coszen(i) + Diag%fluxr(i,2 ) = Diag%fluxr(i,2) + Diag%topfsw(i)%upfxc * tem0d ! total sky top sw up + Diag%fluxr(i,3 ) = Diag%fluxr(i,3) + Radtend%sfcfsw(i)%upfxc * tem0d + Diag%fluxr(i,4 ) = Diag%fluxr(i,4) + Radtend%sfcfsw(i)%dnfxc * tem0d ! total sky sfc sw dn + ! SW uv-b fluxes + Diag%fluxr(i,21) = Diag%fluxr(i,21) + scmpsw(i)%uvbfc * tem0d ! total sky uv-b sw dn + Diag%fluxr(i,22) = Diag%fluxr(i,22) + scmpsw(i)%uvbf0 * tem0d ! clear sky uv-b sw dn + ! SW TOA incoming fluxes + Diag%fluxr(i,23) = Diag%fluxr(i,23) + Diag%topfsw(i)%dnfxc * tem0d ! top sw dn + ! SW SFC flux components + Diag%fluxr(i,24) = Diag%fluxr(i,24) + scmpsw(i)%visbm * tem0d ! uv/vis beam sw dn + Diag%fluxr(i,25) = Diag%fluxr(i,25) + scmpsw(i)%visdf * tem0d ! uv/vis diff sw dn + Diag%fluxr(i,26) = Diag%fluxr(i,26) + scmpsw(i)%nirbm * tem0d ! nir beam sw dn + Diag%fluxr(i,27) = Diag%fluxr(i,27) + scmpsw(i)%nirdf * tem0d ! nir diff sw dn + ! SW clear-sky fluxes + Diag%fluxr(i,29) = Diag%fluxr(i,29) + Diag%topfsw(i)%upfx0 * tem0d + Diag%fluxr(i,31) = Diag%fluxr(i,31) + Radtend%sfcfsw(i)%upfx0 * tem0d + Diag%fluxr(i,32) = Diag%fluxr(i,32) + Radtend%sfcfsw(i)%dnfx0 * tem0d + endif + enddo + + ! Save total and boundary-layer clouds + do i=1,nCol + Diag%fluxr(i,17) = Diag%fluxr(i,17) + raddt * cldsa(i,4) + Diag%fluxr(i,18) = Diag%fluxr(i,18) + raddt * cldsa(i,5) + enddo + + ! Save cld frac,toplyr,botlyr and top temp, note that the order of h,m,l cloud + ! is reversed for the fluxr output. save interface pressure (pa) of top/bot + do j = 1, 3 + do i = 1, nCol + tem0d = raddt * cldsa(i,j) + itop = mtopa(i,j) + ibtc = mbota(i,j) + Diag%fluxr(i, 8-j) = Diag%fluxr(i, 8-j) + tem0d + Diag%fluxr(i,11-j) = Diag%fluxr(i,11-j) + tem0d * Statein%prsi(i,itop) + Diag%fluxr(i,14-j) = Diag%fluxr(i,14-j) + tem0d * Statein%prsi(i,ibtc) + Diag%fluxr(i,17-j) = Diag%fluxr(i,17-j) + tem0d * Statein%tgrs(i,itop) + + ! Add optical depth and emissivity output + tem1 = 0. + do k=ibtc,itop + tem1 = tem1 + cldtausw(i,k) ! approx .55 mu channel enddo + Diag%fluxr(i,43-j) = Diag%fluxr(i,43-j) + tem0d * tem1 enddo - endif + enddo endif - - end subroutine GFS_rrtmgp_sw_post_run ! ######################################################################################### diff --git a/physics/GFS_rrtmgp_sw_post.meta b/physics/GFS_rrtmgp_sw_post.meta index bff311cb7..bf71798bd 100644 --- a/physics/GFS_rrtmgp_sw_post.meta +++ b/physics/GFS_rrtmgp_sw_post.meta @@ -65,7 +65,7 @@ type = cmpfsw_type intent = inout optional = T -[im] +[ncol] standard_name = horizontal_loop_extent long_name = horizontal loop extent units = count diff --git a/physics/GFS_rrtmgp_sw_pre.F90 b/physics/GFS_rrtmgp_sw_pre.F90 index 8c4b5b7fd..e20f8224f 100644 --- a/physics/GFS_rrtmgp_sw_pre.F90 +++ b/physics/GFS_rrtmgp_sw_pre.F90 @@ -111,10 +111,9 @@ subroutine GFS_rrtmgp_sw_pre_run(Model, Interstitial, Grid, Sfcprop, Statein, nc Radtend%coszen, Radtend%coszdg) ! ####################################################################################### - ! For SW, gather daylit points, compute surface albedo in each band, + ! For SW gather daylit points ! ####################################################################################### - ! Check for daytime points for SW radiation. - nday = 0 + nday = 0 idxday = 0 do i = 1, NCOL if (Radtend%coszen(i) >= 0.0001) then @@ -137,7 +136,9 @@ subroutine GFS_rrtmgp_sw_pre_run(Model, Interstitial, Grid, Sfcprop, Statein, nc endif endif + ! ####################################################################################### ! Call module_radiation_surface::setalb() to setup surface albedo. + ! ####################################################################################### call setalb (Sfcprop%slmsk, Sfcprop%snowd, Sfcprop%sncovr, Sfcprop%snoalb, Sfcprop%zorl, & Radtend%coszen, Sfcprop%tsfc, Sfcprop%tsfc, Sfcprop%hprime(:,1), Sfcprop%alvsf, & Sfcprop%alnsf, Sfcprop%alvwf, Sfcprop%alnwf, Sfcprop%facsf, Sfcprop%facwf, & diff --git a/physics/rrtmgp_sw_cloud_optics.F90 b/physics/rrtmgp_sw_cloud_optics.F90 index 48dde613d..c29bb2142 100644 --- a/physics/rrtmgp_sw_cloud_optics.F90 +++ b/physics/rrtmgp_sw_cloud_optics.F90 @@ -14,12 +14,12 @@ module rrtmgp_sw_cloud_optics contains -!! \section arg_table_rrtmgp_sw_cloud_optics_init -!! \htmlinclude rrtmgp_lw_cloud_optics.html -!! ! ######################################################################################### ! SUBROUTINE sw_cloud_optics_init ! ######################################################################################### +!! \section arg_table_rrtmgp_sw_cloud_optics_init +!! \htmlinclude rrtmgp_lw_cloud_optics.html +!! subroutine rrtmgp_sw_cloud_optics_init(Model,mpicomm, mpirank, mpiroot, sw_cloud_props, & errmsg, errflg) use netcdf @@ -337,12 +337,12 @@ subroutine rrtmgp_sw_cloud_optics_init(Model,mpicomm, mpirank, mpiroot, sw_cloud endif end subroutine rrtmgp_sw_cloud_optics_init -!! \section arg_table_rrtmgp_sw_cloud_optics_run -!! \htmlinclude rrtmgp_sw_cloud_optics.html -!! ! ######################################################################################### ! SUBROTUINE rrtmgp_sw_cloud_optics_run() ! ######################################################################################### +!! \section arg_table_rrtmgp_sw_cloud_optics_run +!! \htmlinclude rrtmgp_sw_cloud_optics.html +!! subroutine rrtmgp_sw_cloud_optics_run(Model, ncol, icseed_sw, cld_frac, cld_lwp, & cld_reliq, cld_iwp, cld_reice, cld_swp, cld_resnow, cld_rwp, cld_rerain, aerosolssw, & sw_cloud_props, sw_gas_props, ipsdsw0, nday, idxday, sw_optical_props_clouds, & @@ -355,7 +355,7 @@ subroutine rrtmgp_sw_cloud_optics_run(Model, ncol, icseed_sw, cld_frac, cld_lwp, ncol, & ! Number of horizontal gridpoints nday, & ! Number of daylit points. ipsdsw0 ! Initial permutation seed for McICA - integer,intent(in),dimension(nday) :: & + integer,intent(in),dimension(ncol) :: & idxday ! Indices for daylit points. integer,intent(in),dimension(ncol) :: & icseed_sw ! auxiliary special cloud related array when module @@ -393,7 +393,7 @@ subroutine rrtmgp_sw_cloud_optics_run(Model, ncol, icseed_sw, cld_frac, cld_lwp, ! Local variables integer :: iCol integer,dimension(ncol) :: ipseed_sw - logical,dimension(ncol,model%levs) :: liqmask, icemask + logical,dimension(nday,model%levs) :: liqmask, icemask type(ty_optical_props_2str) :: sw_optical_props_cloudsByBand type(random_stat) :: rng_stat real(kind_phys), dimension(sw_gas_props%get_ngpt(),model%levs,ncol) :: rng3D @@ -407,102 +407,108 @@ subroutine rrtmgp_sw_cloud_optics_run(Model, ncol, icseed_sw, cld_frac, cld_lwp, errflg = 0 if (.not. Model%lsswr) return + if (nDay .gt. 0) then + + ! ####################################################################################### + ! Compute ice/liquid cloud masks, needed by rrtmgp_cloud_optics + ! ####################################################################################### + liqmask = (cld_frac(idxday(1:nday),:) .gt. 0 .and. cld_lwp(idxday(1:nday),:) .gt. 0) + icemask = (cld_frac(idxday(1:nday),:) .gt. 0 .and. cld_iwp(idxday(1:nday),:) .gt. 0) + + ! ####################################################################################### + ! Allocate space for RRTMGP DDTs containing cloud and aerosol radiative properties + ! ####################################################################################### + ! Cloud optics [nday,model%levs,nBands] + call check_error_msg('rrtmgp_sw_cloud_optics_run',sw_optical_props_cloudsByBand%alloc_2str(& + nday, model%levs, sw_gas_props%get_band_lims_wavenumber())) + ! Aerosol optics [nday,model%levs,nBands] + call check_error_msg('rrtmgp_sw_cloud_optics_run',sw_optical_props_aerosol%alloc_2str( & + nday, model%levs, sw_gas_props%get_band_lims_wavenumber())) + ! Cloud optics [nday,model%levs,nGpt] + call check_error_msg('rrtmgp_sw_cloud_optics_run',sw_optical_props_clouds%alloc_2str( & + nday, model%levs, sw_gas_props)) + + ! ####################################################################################### + ! Copy aerosol optical information to RRTMGP DDT + ! ####################################################################################### + sw_optical_props_aerosol%tau = aerosolssw(idxday(1:nday),:,:,1) + sw_optical_props_aerosol%ssa = aerosolssw(idxday(1:nday),:,:,2) + sw_optical_props_aerosol%g = aerosolssw(idxday(1:nday),:,:,3) + + ! ####################################################################################### + ! Compute cloud-optics for RTE. + ! ####################################################################################### + if (Model%rrtmgp_cld_optics .gt. 0) then + ! RRTMGP cloud-optics. + call check_error_msg('rrtmgp_sw_cloud_optics_run',sw_cloud_props%cloud_optics(& + nday, & ! IN - Number of daylit gridpoints + model%levs, & ! IN - Number of vertical layers + sw_cloud_props%get_nband(), & ! IN - Number of SW bands + Model%rrtmgp_nrghice, & ! IN - Number of ice-roughness categories + liqmask, & ! IN - Liquid-cloud mask + icemask, & ! IN - Ice-cloud mask + cld_lwp(idxday(1:nday),:), & ! IN - Cloud liquid water path + cld_iwp(idxday(1:nday),:), & ! IN - Cloud ice water path + cld_reliq(idxday(1:nday),:), & ! IN - Cloud liquid effective radius + cld_reice(idxday(1:nday),:), & ! IN - Cloud ice effective radius + sw_optical_props_cloudsByBand)) ! OUT - RRTMGP DDT: Shortwave optical properties, + ! in each band (tau,ssa,g) + else + ! RRTMG cloud-optics + if (any(cld_frac .gt. 0)) then + sw_optical_props_cloudsByBand%tau(:,:,:) = 0._kind_phys + sw_optical_props_cloudsByBand%ssa(:,:,:) = 0._kind_phys + sw_optical_props_cloudsByBand%g(:,:,:) = 0._kind_phys + call rrtmg_sw_cloud_optics(nday, model%levs, sw_gas_props%get_nband(), & + cld_lwp(idxday(1:nday),:), cld_reliq(idxday(1:nday),:), & + cld_iwp(idxday(1:nday),:), cld_reice(idxday(1:nday),:), & + cld_rwp(idxday(1:nday),:), cld_rerain(idxday(1:nday),:), & + cld_swp(idxday(1:nday),:), cld_resnow(idxday(1:nday),:), & + cld_frac(idxday(1:nday),:), tau_cld, ssa_cld, asy_cld) + sw_optical_props_cloudsByBand%tau(:,:,:) = tau_cld + sw_optical_props_cloudsByBand%ssa(:,:,:) = ssa_cld + sw_optical_props_cloudsByBand%g(:,:,:) = asy_cld + endif + endif - ! ####################################################################################### - ! Change random number seed value for each radiation invocation (isubcsw =1 or 2). - ! ####################################################################################### - if(isubcsw == 1) then ! advance prescribed permutation seed - do iCol = 1, ncol - ipseed_sw(iCol) = ipsdsw0 + iCol - enddo - elseif (isubcsw == 2) then ! use input array of permutaion seeds - do iCol = 1, ncol - ipseed_sw(iCol) = icseed_sw(iCol) - enddo - endif - - ! ####################################################################################### - ! Compute ice/liquid cloud masks, needed by rrtmgp_cloud_optics - ! ####################################################################################### - liqmask = (cld_frac .gt. 0 .and. cld_lwp .gt. 0) - icemask = (cld_frac .gt. 0 .and. cld_iwp .gt. 0) - - ! ####################################################################################### - ! Allocate space for RRTMGP DDTs containing cloud and aerosol radiative properties - ! ####################################################################################### - ! Cloud optics [ncol,model%levs,nBands] - call check_error_msg('rrtmgp_sw_cloud_optics_run',sw_optical_props_cloudsByBand%alloc_2str(& - ncol, model%levs, sw_gas_props%get_band_lims_wavenumber())) - ! Aerosol optics [ncol,model%levs,nBands] - call check_error_msg('rrtmgp_sw_cloud_optics_run',sw_optical_props_aerosol%alloc_2str( & - ncol, model%levs, sw_gas_props%get_band_lims_wavenumber())) - ! Cloud optics [ncol,model%levs,nGpt] - call check_error_msg('rrtmgp_sw_cloud_optics_run',sw_optical_props_clouds%alloc_2str( & - ncol, model%levs, sw_gas_props)) - - ! ####################################################################################### - ! Copy aerosol optical information to RRTMGP DDT - ! ####################################################################################### - sw_optical_props_aerosol%tau = aerosolssw(:,:,:,1) - sw_optical_props_aerosol%ssa = aerosolssw(:,:,:,2) - sw_optical_props_aerosol%g = aerosolssw(:,:,:,3) - - ! ####################################################################################### - ! Compute cloud-optics for RTE. - ! ####################################################################################### - if (Model%rrtmgp_cld_optics .gt. 0) then - ! RRTMGP cloud-optics. - call check_error_msg('rrtmgp_sw_cloud_optics_run',sw_cloud_props%cloud_optics(& - ncol, & ! IN - Number of daylit gridpoints - model%levs, & ! IN - Number of vertical layers - sw_cloud_props%get_nband(), & ! IN - Number of SW bands - Model%rrtmgp_nrghice, & ! IN - Number of ice-roughness categories - liqmask, & ! IN - Liquid-cloud mask - icemask, & ! IN - Ice-cloud mask - cld_lwp, & ! IN - Cloud liquid water path - cld_iwp, & ! IN - Cloud ice water path - cld_reliq, & ! IN - Cloud liquid effective radius - cld_reice, & ! IN - Cloud ice effective radius - sw_optical_props_cloudsByBand)) ! OUT - RRTMGP DDT: Shortwave optical properties, - ! in each band (tau,ssa,g) - else - ! RRTMG cloud-optics - if (any(cld_frac .gt. 0)) then - sw_optical_props_cloudsByBand%tau(:,:,:) = 0._kind_phys - sw_optical_props_cloudsByBand%ssa(:,:,:) = 0._kind_phys - sw_optical_props_cloudsByBand%g(:,:,:) = 0._kind_phys - call rrtmg_sw_cloud_optics(nday, model%levs, sw_gas_props%get_nband(), cld_lwp(idxday,:), & - cld_reliq(idxday,:), cld_iwp(idxday,:), cld_reice(idxday,:), cld_rwp(idxday,:), & - cld_rerain(idxday,:), cld_swp(idxday,:), cld_resnow(idxday,:), cld_frac(idxday,:),& - tau_cld, ssa_cld, asy_cld) - sw_optical_props_cloudsByBand%tau(idxday,:,:) = tau_cld - sw_optical_props_cloudsByBand%ssa(idxday,:,:) = ssa_cld - sw_optical_props_cloudsByBand%g(idxday,:,:) = asy_cld + ! ####################################################################################### + ! Change random number seed value for each radiation invocation (isubcsw =1 or 2). + ! ####################################################################################### + if(isubcsw == 1) then ! advance prescribed permutation seed + do iCol = 1, ncol + ipseed_sw(iCol) = ipsdsw0 + iCol + enddo + elseif (isubcsw == 2) then ! use input array of permutaion seeds + do iCol = 1, ncol + ipseed_sw(iCol) = icseed_sw(iCol) + enddo endif - endif - ! ####################################################################################### - ! Call McICA to generate subcolumns. - ! ####################################################################################### - ! Call RNG. Mersennse Twister accepts 1D array, so loop over columns and collapse along G-points - ! and layers. ([nGpts,model%levs,nColumn]-> [nGpts*model%levs]*nColumn) - do iCol=1,ncol - call random_setseed(ipseed_sw(icol),rng_stat) - call random_number(rng1D,rng_stat) - rng3D(:,:,iCol) = reshape(source = rng1D,shape=[sw_gas_props%get_ngpt(),model%levs]) - enddo - - ! Call McICA - select case ( iovrsw ) - ! Maximumn-random - case(1) - call check_error_msg('rrtmgp_sw_cloud_optics_run',sampled_mask_max_ran(rng3D,cld_frac,cldfracMCICA)) - end select - - ! Map band optical depth to each g-point using McICA - call check_error_msg('rrtmgp_sw_cloud_optics_run',draw_samples(cldfracMCICA,sw_optical_props_cloudsByBand,sw_optical_props_clouds)) - ! GFS_RRTMGP_POST_RUN() requires the SW optical depth ~0.55microns - cldtausw = sw_optical_props_cloudsByBand%tau(:,:,11) + ! ####################################################################################### + ! Call McICA to generate subcolumns. + ! ####################################################################################### + ! Call RNG. Mersennse Twister accepts 1D array, so loop over columns and collapse along G-points + ! and layers. ([nGpts,model%levs,nColumn]-> [nGpts*model%levs]*nColumn) + do iCol=1,ncol + call random_setseed(ipseed_sw(icol),rng_stat) + call random_number(rng1D,rng_stat) + rng3D(:,:,iCol) = reshape(source = rng1D,shape=[sw_gas_props%get_ngpt(),model%levs]) + enddo + + ! Call McICA + select case ( iovrsw ) + ! Maximumn-random + case(1) + call check_error_msg('rrtmgp_sw_cloud_optics_run',sampled_mask_max_ran(rng3D,cld_frac,cldfracMCICA)) + end select + + ! Map band optical depth to each g-point using McICA + call check_error_msg('rrtmgp_sw_cloud_optics_run',draw_samples(& + cldfracMCICA(idxday(1:nDay),:,:),sw_optical_props_cloudsByBand,sw_optical_props_clouds)) + + ! GFS_RRTMGP_POST_RUN() requires the SW optical depth ~0.55microns + cldtausw(idxday(1:nDay),:) = sw_optical_props_cloudsByBand%tau(:,:,11) + endif end subroutine rrtmgp_sw_cloud_optics_run diff --git a/physics/rrtmgp_sw_gas_optics.F90 b/physics/rrtmgp_sw_gas_optics.F90 index f235b8d02..de1bfecb1 100644 --- a/physics/rrtmgp_sw_gas_optics.F90 +++ b/physics/rrtmgp_sw_gas_optics.F90 @@ -398,8 +398,9 @@ end subroutine rrtmgp_sw_gas_optics_init !! \section arg_table_rrtmgp_sw_gas_optics_run !! \htmlinclude rrtmgp_sw_gas_optics.html !! - subroutine rrtmgp_sw_gas_optics_run(Model, Interstitial, sw_gas_props, ncol, p_lay, p_lev, & - t_lay, t_lev, gas_concentrations, lsswr, solcon, sw_optical_props_clrsky, errmsg, errflg) + subroutine rrtmgp_sw_gas_optics_run(Model, Interstitial, sw_gas_props, ncol, nday, idxday,& + p_lay, p_lev, t_lay, t_lev, gas_concentrations, lsswr, solcon, & + sw_optical_props_clrsky, errmsg, errflg) ! Inputs type(GFS_control_type), intent(in) :: & @@ -409,7 +410,10 @@ subroutine rrtmgp_sw_gas_optics_run(Model, Interstitial, sw_gas_props, ncol, p_l type(ty_gas_optics_rrtmgp),intent(in) :: & sw_gas_props ! RRTMGP DDT: spectral information for RRTMGP SW radiation scheme integer,intent(in) :: & + nday, & ! Number of daylit points. ncol ! Number of horizontal points + integer,intent(in),dimension(ncol) :: & + idxday ! Indices for daylit points. real(kind_phys), dimension(ncol,model%levs), intent(in) :: & p_lay, & ! Pressure @ model layer-centers (hPa) t_lay ! Temperature (K) @@ -432,7 +436,11 @@ subroutine rrtmgp_sw_gas_optics_run(Model, Interstitial, sw_gas_props, ncol, p_l sw_optical_props_clrsky ! RRTMGP DDT: clear-sky shortwave optical properties, spectral (tau,ssa,g) ! Local variables - integer :: ij + integer :: ij,iGas + real(kind_phys), dimension(ncol,Model%levs) :: vmrTemp + real(kind_phys), dimension(nday,sw_gas_props%get_ngpt()) :: toa_src_sw_temp + type(ty_gas_concs) :: & + gas_concentrations_daylit ! RRTMGP DDT: trace gas concentrations (vmr) ! Initialize CCPP error handling variables errmsg = '' @@ -440,23 +448,35 @@ subroutine rrtmgp_sw_gas_optics_run(Model, Interstitial, sw_gas_props, ncol, p_l if (.not. Model%lsswr) return - ! Allocate space - call check_error_msg('rrtmgp_sw_gas_optics_run',sw_optical_props_clrsky%alloc_2str(ncol, model%levs, sw_gas_props)) - - ! Gas-optics - call check_error_msg('rrtmgp_sw_gas_optics_run',sw_gas_props%gas_optics(& - p_lay, & ! IN - Pressure @ layer-centers (Pa) - p_lev, & ! IN - Pressure @ layer-interfaces (Pa) - t_lay, & ! IN - Temperature @ layer-centers (K) - gas_concentrations, & ! IN - RRTMGP DDT: trace gas volumne mixing-ratios - sw_optical_props_clrsky, & ! OUT - RRTMGP DDT: Shortwave optical properties, by - ! spectral point (tau,ssa,g) - Interstitial%toa_src_sw)) ! OUT - TOA incident shortwave radiation (spectral) - - ! Scale incident flux - do ij=1,ncol - Interstitial%toa_src_sw(ij,:) = Interstitial%toa_src_sw(ij,:)*solcon/sum(Interstitial%toa_src_sw(ij,:)) - enddo + if (nDay .gt. 0) then + ! Allocate space + call check_error_msg('rrtmgp_sw_gas_optics_run',sw_optical_props_clrsky%alloc_2str(nday, model%levs, sw_gas_props)) + + ! Subset the gas concentrations, only need daylit points. + do iGas=1,Model%nGases + call check_error_msg('rrtmgp_sw_rte_run',& + gas_concentrations%get_vmr(trim(Model%active_gases_array(iGas)),vmrTemp)) + call check_error_msg('rrtmgp_sw_rte_run',& + gas_concentrations_daylit%set_vmr(trim(Model%active_gases_array(iGas)),vmrTemp(idxday(1:nday),:))) + enddo + + ! Gas-optics + call check_error_msg('rrtmgp_sw_gas_optics_run',sw_gas_props%gas_optics(& + p_lay(idxday(1:nday),:), & ! IN - Pressure @ layer-centers (Pa) + p_lev(idxday(1:nday),:), & ! IN - Pressure @ layer-interfaces (Pa) + t_lay(idxday(1:nday),:), & ! IN - Temperature @ layer-centers (K) + gas_concentrations_daylit, & ! IN - RRTMGP DDT: trace gas volumne mixing-ratios + sw_optical_props_clrsky, & ! OUT - RRTMGP DDT: Shortwave optical properties, by + ! spectral point (tau,ssa,g) + toa_src_sw_temp)) ! OUT - TOA incident shortwave radiation (spectral) + Interstitial%toa_src_sw(idxday(1:nday),:) = toa_src_sw_temp + ! Scale incident flux + do ij=1,nday + Interstitial%toa_src_sw(idxday(ij),:) = Interstitial%toa_src_sw(idxday(ij),:)*solcon/ & + sum(Interstitial%toa_src_sw(idxday(ij),:)) + enddo + endif + end subroutine rrtmgp_sw_gas_optics_run diff --git a/physics/rrtmgp_sw_gas_optics.meta b/physics/rrtmgp_sw_gas_optics.meta index 129f278e6..1ec914d63 100644 --- a/physics/rrtmgp_sw_gas_optics.meta +++ b/physics/rrtmgp_sw_gas_optics.meta @@ -103,6 +103,22 @@ type = integer intent = in optional = F +[nday] + standard_name = daytime_points_dimension + long_name = daytime points dimension + units = count + dimensions = () + type = integer + intent = in + optional = F +[idxday] + standard_name = daytime_points + long_name = daytime points + units = index + dimensions = (horizontal_dimension) + type = integer + intent = in + optional = F [p_lay] standard_name = air_pressure_at_layer_for_RRTMGP_in_hPa long_name = air pressure layer diff --git a/physics/rrtmgp_sw_rte.F90 b/physics/rrtmgp_sw_rte.F90 index ca2c0248a..426826fb7 100644 --- a/physics/rrtmgp_sw_rte.F90 +++ b/physics/rrtmgp_sw_rte.F90 @@ -45,7 +45,7 @@ subroutine rrtmgp_sw_rte_run(Model, Interstitial, Radtend, Statein, ncol, sw_gas integer, intent(in) :: & ncol, & ! Number of horizontal gridpoints nday ! Number of daytime points - integer, intent(in), dimension(nday) :: & + integer, intent(in), dimension(ncol) :: & idxday ! Index array for daytime points real(kind_phys), dimension(ncol,Model%levs), intent(in) :: & p_lay, & ! Pressure @ model layer-centers (Pa) @@ -54,7 +54,7 @@ subroutine rrtmgp_sw_rte_run(Model, Interstitial, Radtend, Statein, ncol, sw_gas p_lev ! Pressure @ model layer-interfaces (Pa) type(ty_gas_optics_rrtmgp),intent(in) :: & sw_gas_props ! RRTMGP DDT: SW spectral information - type(ty_optical_props_2str),intent(in) :: & + type(ty_optical_props_2str),intent(inout) :: & sw_optical_props_clrsky, & ! RRTMGP DDT: longwave clear-sky radiative properties sw_optical_props_clouds, & ! RRTMGP DDT: longwave cloud radiative properties sw_optical_props_aerosol ! RRTMGP DDT: longwave aerosol radiative properties @@ -108,52 +108,38 @@ subroutine rrtmgp_sw_rte_run(Model, Interstitial, Radtend, Statein, ncol, sw_gas errflg = 0 if (.not. lsswr) return - - ! Vertical ordering? - top_at_1 = (p_lev(1,1) .lt. p_lev(1, Model%levs)) - if (top_at_1) then - iSFC = Model%levs+1 - iTOA = 1 - else - iSFC = 1 - iTOA = Model%levs+1 - endif - - ! Are any optional outputs requested? Need to know now to compute correct fluxes. - l_ClrSky_HR = present(hsw0) - l_AllSky_HR_byband = present(hswb) - l_scmpsw = present(scmpsw) - if ( l_scmpsw ) then - scmpsw = cmpfsw_type (0., 0., 0., 0., 0., 0.) - endif - fluxswUP_allsky(:,:) = 0._kind_phys - fluxswDOWN_allsky(:,:) = 0._kind_phys - fluxswUP_clrsky(:,:) = 0._kind_phys - fluxswDOWN_clrsky(:,:) = 0._kind_phys - if (nDay .gt. 0) then - ! Subset the cloud and aerosol radiative properties over daylit points. - ! Cloud optics [nDay,Model%levs,nGpts] - call check_error_msg('rrtmgp_sw_rte_run',sw_optical_props_clouds_daylit%alloc_2str(nday, Model%levs, sw_gas_props)) - sw_optical_props_clouds_daylit%tau = sw_optical_props_clouds%tau(idxday,:,:) - sw_optical_props_clouds_daylit%ssa = sw_optical_props_clouds%ssa(idxday,:,:) - sw_optical_props_clouds_daylit%g = sw_optical_props_clouds%g(idxday,:,:) - ! Aerosol optics [nDay,Model%levs,nBands] - call check_error_msg('rrtmgp_sw_rte_run',sw_optical_props_aerosol_daylit%alloc_2str(nday, Model%levs, sw_gas_props%get_band_lims_wavenumber())) - sw_optical_props_aerosol_daylit%tau = sw_optical_props_aerosol%tau(idxday,:,:) - sw_optical_props_aerosol_daylit%ssa = sw_optical_props_aerosol%ssa(idxday,:,:) - sw_optical_props_aerosol_daylit%g = sw_optical_props_aerosol%g(idxday,:,:) - ! Clear-sky optics [nDay,Model%levs,nGpts] - call check_error_msg('rrtmgp_sw_rte_run',sw_optical_props_clrsky_daylit%alloc_2str(nday, Model%levs, sw_gas_props)) - sw_optical_props_clrsky_daylit%tau = sw_optical_props_clrsky%tau(idxday,:,:) - sw_optical_props_clrsky_daylit%ssa = sw_optical_props_clrsky%ssa(idxday,:,:) - sw_optical_props_clrsky_daylit%g = sw_optical_props_clrsky%g(idxday,:,:) - - ! Similarly, subset the gas concentrations. + ! Vertical ordering? + top_at_1 = (p_lev(1,1) .lt. p_lev(1, Model%levs)) + if (top_at_1) then + iSFC = Model%levs+1 + iTOA = 1 + else + iSFC = 1 + iTOA = Model%levs+1 + endif + + ! Are any optional outputs requested? Need to know now to compute correct fluxes. + l_ClrSky_HR = present(hsw0) + l_AllSky_HR_byband = present(hswb) + l_scmpsw = present(scmpsw) + if ( l_scmpsw ) then + scmpsw = cmpfsw_type (0., 0., 0., 0., 0., 0.) + endif + + ! Initialize fluxes + fluxswUP_allsky(:,:) = 0._kind_phys + fluxswDOWN_allsky(:,:) = 0._kind_phys + fluxswUP_clrsky(:,:) = 0._kind_phys + fluxswDOWN_clrsky(:,:) = 0._kind_phys + + ! Subset the gas concentrations, only need daylit points. do iGas=1,Model%nGases - call check_error_msg('rrtmgp_sw_rte_run',gas_concentrations%get_vmr(trim(Model%active_gases_array(iGas)),vmrTemp)) - call check_error_msg('rrtmgp_sw_rte_run',gas_concentrations_daylit%set_vmr(trim(Model%active_gases_array(iGas)),vmrTemp(idxday,:))) + call check_error_msg('rrtmgp_sw_rte_run',& + gas_concentrations%get_vmr(trim(Model%active_gases_array(iGas)),vmrTemp)) + call check_error_msg('rrtmgp_sw_rte_run',& + gas_concentrations_daylit%set_vmr(trim(Model%active_gases_array(iGas)),vmrTemp(idxday(1:nday),:))) enddo ! Initialize RRTMGP DDT containing 2D(3D) fluxes @@ -165,42 +151,43 @@ subroutine rrtmgp_sw_rte_run(Model, Interstitial, Radtend, Statein, ncol, sw_gas ! Compute clear-sky fluxes (if requested) ! Clear-sky fluxes (gas+aerosol) - call check_error_msg('rrtmgp_sw_rte_run',sw_optical_props_aerosol_daylit%increment(sw_optical_props_clrsky_daylit)) + call check_error_msg('rrtmgp_sw_rte_run',sw_optical_props_aerosol%increment(sw_optical_props_clrsky)) ! Delta-scale optical properties - call check_error_msg('rrtmgp_sw_rte_run',sw_optical_props_clrsky_daylit%delta_scale()) + call check_error_msg('rrtmgp_sw_rte_run',sw_optical_props_clrsky%delta_scale()) if (l_ClrSky_HR) then - call check_error_msg('rrtmgp_sw_rte_run',rte_sw( & - sw_optical_props_clrsky_daylit, & ! IN - optical-properties - top_at_1, & ! IN - veritcal ordering flag - Radtend%coszen(idxday), & ! IN - Cosine of solar zenith angle - Interstitial%toa_src_sw(idxday,:), & ! IN - incident solar flux at TOA - Interstitial%sfc_alb_nir_dir(:,idxday), & ! IN - Shortwave surface albedo (direct) - Interstitial%sfc_alb_nir_dif(:,idxday), & ! IN - Shortwave surface albedo (diffuse) - flux_clrsky)) ! OUT - Fluxes, clear-sky, 3D (nCol,Model%levs,nBand) + call check_error_msg('rrtmgp_sw_rte_run',rte_sw( & + sw_optical_props_clrsky, & ! IN - optical-properties + top_at_1, & ! IN - veritcal ordering flag + Radtend%coszen(idxday(1:nday)), & ! IN - Cosine of solar zenith angle + Interstitial%toa_src_sw(idxday(1:nday),:), & ! IN - incident solar flux at TOA + Interstitial%sfc_alb_nir_dir(:,idxday(1:nday)), & ! IN - Shortwave surface albedo (direct) + Interstitial%sfc_alb_nir_dif(:,idxday(1:nday)), & ! IN - Shortwave surface albedo (diffuse) + flux_clrsky)) ! OUT - Fluxes, clear-sky, 3D (nCol,Model%levs,nBand) ! Store fluxes - fluxswUP_clrsky(idxday,:) = sum(flux_clrsky%bnd_flux_up,dim=3) - fluxswDOWN_clrsky(idxday,:) = sum(flux_clrsky%bnd_flux_dn,dim=3) + fluxswUP_clrsky(idxday(1:nday),:) = sum(flux_clrsky%bnd_flux_up,dim=3) + fluxswDOWN_clrsky(idxday(1:nday),:) = sum(flux_clrsky%bnd_flux_dn,dim=3) endif ! Compute all-sky fluxes ! All-sky fluxes (clear-sky + clouds) - call check_error_msg('rrtmgp_sw_rte_run',sw_optical_props_clouds_daylit%increment(sw_optical_props_clrsky_daylit)) + call check_error_msg('rrtmgp_sw_rte_run',sw_optical_props_clouds%increment(sw_optical_props_clrsky)) ! Delta-scale optical properties - call check_error_msg('rrtmgp_sw_rte_run',sw_optical_props_clouds_daylit%delta_scale()) - call check_error_msg('rrtmgp_sw_rte_run',rte_sw( & - sw_optical_props_clrsky_daylit, & ! IN - optical-properties - top_at_1, & ! IN - veritcal ordering flag - Radtend%coszen(idxday), & ! IN - Cosine of solar zenith angle - Interstitial%toa_src_sw(idxday,:), & ! IN - incident solar flux at TOA - Interstitial%sfc_alb_nir_dir(:,idxday), & ! IN - Shortwave surface albedo (direct) - Interstitial%sfc_alb_nir_dif(:,idxday), & ! IN - Shortwave surface albedo (diffuse) - flux_allsky)) ! OUT - Fluxes, clear-sky, 3D (nCol,Model%levs,nBand) + call check_error_msg('rrtmgp_sw_rte_run',sw_optical_props_clouds%delta_scale()) + call check_error_msg('rrtmgp_sw_rte_run',rte_sw( & + sw_optical_props_clrsky, & ! IN - optical-properties + top_at_1, & ! IN - veritcal ordering flag + Radtend%coszen(idxday(1:nday)), & ! IN - Cosine of solar zenith angle + Interstitial%toa_src_sw(idxday(1:nday),:), & ! IN - incident solar flux at TOA + Interstitial%sfc_alb_nir_dir(:,idxday(1:nday)), & ! IN - Shortwave surface albedo (direct) + Interstitial%sfc_alb_nir_dif(:,idxday(1:nday)), & ! IN - Shortwave surface albedo (diffuse) + flux_allsky)) ! OUT - Fluxes, clear-sky, 3D (nCol,Model%levs,nBand) ! Store fluxes - fluxswUP_allsky(idxday,:) = sum(flux_allsky%bnd_flux_up,dim=3) - fluxswDOWN_allsky(idxday,:) = sum(flux_allsky%bnd_flux_dn,dim=3) + fluxswUP_allsky(idxday(1:nday),:) = sum(flux_allsky%bnd_flux_up,dim=3) + fluxswDOWN_allsky(idxday(1:nday),:) = sum(flux_allsky%bnd_flux_dn,dim=3) if ( l_scmpsw ) then - scmpsw(idxday)%nirbm = sum(flux_allsky%bnd_flux_dn_dir(idxday,iSFC,:),dim=2) - scmpsw(idxday)%nirdf = sum(flux_allsky%bnd_flux_dn(idxday,iSFC,:),dim=2) - sum(flux_allsky%bnd_flux_dn_dir(idxday,iSFC,:),dim=2) + scmpsw(idxday(1:nday))%nirbm = sum(flux_allsky%bnd_flux_dn_dir(idxday(1:nday),iSFC,:),dim=2) + scmpsw(idxday(1:nday))%nirdf = sum(flux_allsky%bnd_flux_dn(idxday(1:nday),iSFC,:),dim=2) - & + sum(flux_allsky%bnd_flux_dn_dir(idxday(1:nday),iSFC,:),dim=2) endif endif end subroutine rrtmgp_sw_rte_run diff --git a/physics/rrtmgp_sw_rte.meta b/physics/rrtmgp_sw_rte.meta index 197824495..b677f15a6 100644 --- a/physics/rrtmgp_sw_rte.meta +++ b/physics/rrtmgp_sw_rte.meta @@ -82,7 +82,7 @@ units = DDT dimensions = () type = ty_optical_props_2str - intent = in + intent = inout optional = F [sw_optical_props_clouds] standard_name = shortwave_optical_properties_for_cloudy_atmosphere From f471f795b9013ca224319ec94cb027aa7dc91e5b Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Mon, 9 Dec 2019 11:49:32 -0700 Subject: [PATCH 071/167] Added some print statements to diagnose MPI init. --- physics/rrtmgp_sw_gas_optics.F90 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/physics/rrtmgp_sw_gas_optics.F90 b/physics/rrtmgp_sw_gas_optics.F90 index de1bfecb1..f75b7aca3 100644 --- a/physics/rrtmgp_sw_gas_optics.F90 +++ b/physics/rrtmgp_sw_gas_optics.F90 @@ -153,6 +153,8 @@ subroutine rrtmgp_sw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, sw_gas_p ! Broadcast dimensions to all processors #ifdef MPI + write(*,*) "mpiroot: ",mpiroot + write(*,*) "mpicomm: ",mpicomm call MPI_BCAST(ntemps_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) call MPI_BCAST(npress_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) call MPI_BCAST(nabsorbers_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) @@ -204,6 +206,7 @@ subroutine rrtmgp_sw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, sw_gas_p ! On master processor, read in fields, broadcast to all processors if (mpirank .eq. mpiroot) then + write (*,*) 'Reading RRTMGP shortwave k-distribution data ... ' ! Read in fields from file if(nf90_open(trim(sw_gas_props_file), NF90_WRITE, ncid_sw) .eq. NF90_NOERR) then status = nf90_inq_varid(ncid_sw,'gas_names',varID) @@ -312,6 +315,7 @@ subroutine rrtmgp_sw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, sw_gas_p ! Broadcast arrays to all processors #ifdef MPI + write (*,*) 'Broadcasting RRTMGP shortwave k-distribution data ... ' call MPI_BCAST(minor_limits_gpt_upper_sw, size(minor_limits_gpt_upper_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) call MPI_BCAST(minor_limits_gpt_lower_sw, size(minor_limits_gpt_lower_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) call MPI_BCAST(kminor_start_upper_sw, size(kminor_start_upper_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) From 1bc898da3e2e6628a7551f973ed041b28073a881 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Mon, 9 Dec 2019 11:56:26 -0700 Subject: [PATCH 072/167] Added some print statements to diagnose MPI init. --- physics/rrtmgp_sw_gas_optics.F90 | 58 ++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/physics/rrtmgp_sw_gas_optics.F90 b/physics/rrtmgp_sw_gas_optics.F90 index f75b7aca3..07329e430 100644 --- a/physics/rrtmgp_sw_gas_optics.F90 +++ b/physics/rrtmgp_sw_gas_optics.F90 @@ -156,19 +156,33 @@ subroutine rrtmgp_sw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, sw_gas_p write(*,*) "mpiroot: ",mpiroot write(*,*) "mpicomm: ",mpicomm call MPI_BCAST(ntemps_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + write(*,*) "ierr1: ",ierr call MPI_BCAST(npress_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + write(*,*) "ierr2: ",ierr call MPI_BCAST(nabsorbers_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + write(*,*) "ierr3: ",ierr call MPI_BCAST(nminorabsorbers_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + write(*,*) "ierr4: ",ierr call MPI_BCAST(nextrabsorbers_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + write(*,*) "ierr5: ",ierr call MPI_BCAST(nmixingfracs_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + write(*,*) "ierr6: ",ierr call MPI_BCAST(nlayers_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + write(*,*) "ierr7: ",ierr call MPI_BCAST(nbnds_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + write(*,*) "ierr8: ",ierr call MPI_BCAST(ngpts_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + write(*,*) "ierr9: ",ierr call MPI_BCAST(npairs_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + write(*,*) "ierr10: ",ierr call MPI_BCAST(ncontributors_lower_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + write(*,*) "ierr11: ",ierr call MPI_BCAST(ncontributors_upper_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + write(*,*) "ierr12: ",ierr call MPI_BCAST(nminor_absorber_intervals_lower_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + write(*,*) "ierr13: ",ierr call MPI_BCAST(nminor_absorber_intervals_upper_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + write(*,*) "ierr14: ",ierr #endif ! Allocate space for arrays @@ -317,64 +331,108 @@ subroutine rrtmgp_sw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, sw_gas_p #ifdef MPI write (*,*) 'Broadcasting RRTMGP shortwave k-distribution data ... ' call MPI_BCAST(minor_limits_gpt_upper_sw, size(minor_limits_gpt_upper_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) + write(*,*) "ierr15: ",ierr call MPI_BCAST(minor_limits_gpt_lower_sw, size(minor_limits_gpt_lower_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) + write(*,*) "ierr16: ",ierr call MPI_BCAST(kminor_start_upper_sw, size(kminor_start_upper_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) + write(*,*) "ierr17: ",ierr call MPI_BCAST(kminor_start_lower_sw, size(kminor_start_lower_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) + write(*,*) "ierr18: ",ierr call MPI_BCAST(key_species_sw, size(key_species_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) + write(*,*) "ierr19: ",ierr call MPI_BCAST(band2gpt_sw, size(band2gpt_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) + write(*,*) "ierr20: ",ierr #ifndef SINGLE_PREC call MPI_BCAST(band_lims_sw, size(band_lims_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + write(*,*) "ierr21: ",ierr call MPI_BCAST(press_ref_sw, size(press_ref_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + write(*,*) "ierr22: ",ierr call MPI_BCAST(temp_ref_sw, size(temp_ref_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + write(*,*) "ierr23: ",ierr call MPI_BCAST(kminor_lower_sw, size(kminor_lower_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + write(*,*) "ierr24: ",ierr call MPI_BCAST(kminor_upper_sw, size(kminor_upper_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + write(*,*) "ierr25: ",ierr call MPI_BCAST(scaling_gas_lower_sw, size(scaling_gas_lower_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + write(*,*) "ierr26: ",ierr call MPI_BCAST(scaling_gas_upper_sw, size(scaling_gas_upper_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + write(*,*) "ierr27: ",ierr call MPI_BCAST(vmr_ref_sw, size(vmr_ref_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + write(*,*) "ierr28: ",ierr call MPI_BCAST(kmajor_sw, size(kmajor_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + write(*,*) "ierr29: ",ierr call MPI_BCAST(temp_ref_p_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + write(*,*) "ierr30: ",ierr call MPI_BCAST(temp_ref_t_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + write(*,*) "ierr31: ",ierr call MPI_BCAST(press_ref_trop_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + write(*,*) "ierr32: ",ierr call MPI_BCAST(solar_source_sw, size(solar_source_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + write(*,*) "ierr33: ",ierr call MPI_BCAST(rayl_lower_sw, size(rayl_lower_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + write(*,*) "ierr34: ",ierr call MPI_BCAST(rayl_upper_sw, size(rayl_upper_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + write(*,*) "ierr35: ",ierr #else call MPI_BCAST(band_lims_sw, size(band_lims_sw), MPI_REAL, mpiroot, mpicomm, ierr) + write(*,*) "ierr36: ",ierr call MPI_BCAST(press_ref_sw, size(press_ref_sw), MPI_REAL, mpiroot, mpicomm, ierr) + write(*,*) "ierr37: ",ierr call MPI_BCAST(temp_ref_sw, size(temp_ref_sw), MPI_REAL, mpiroot, mpicomm, ierr) + write(*,*) "ierr38: ",ierr call MPI_BCAST(kminor_lower_sw, size(kminor_lower_sw), MPI_REAL, mpiroot, mpicomm, ierr) + write(*,*) "ierr39: ",ierr call MPI_BCAST(kminor_upper_sw, size(kminor_upper_sw), MPI_REAL, mpiroot, mpicomm, ierr) + write(*,*) "ierr40: ",ierr call MPI_BCAST(scaling_gas_lower_sw, size(scaling_gas_lower_sw), MPI_REAL, mpiroot, mpicomm, ierr) + write(*,*) "ierr41: ",ierr call MPI_BCAST(scaling_gas_upper_sw, size(scaling_gas_upper_sw), MPI_REAL, mpiroot, mpicomm, ierr) + write(*,*) "ierr42: ",ierr call MPI_BCAST(vmr_ref_sw, size(vmr_ref_sw), MPI_REAL, mpiroot, mpicomm, ierr) + write(*,*) "ierr43: ",ierr call MPI_BCAST(kmajor_sw, size(kmajor_sw), MPI_REAL, mpiroot, mpicomm, ierr) + write(*,*) "ierr44: ",ierr call MPI_BCAST(temp_ref_p_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) + write(*,*) "ierr45: ",ierr call MPI_BCAST(temp_ref_t_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) + write(*,*) "ierr46: ",ierr call MPI_BCAST(press_ref_trop_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) + write(*,*) "ierr47: ",ierr call MPI_BCAST(solar_source_sw, size(solar_source_sw), MPI_REAL, mpiroot, mpicomm, ierr) + write(*,*) "ierr48: ",ierr call MPI_BCAST(rayl_lower_sw, size(rayl_lower_sw), MPI_REAL, mpiroot, mpicomm, ierr) + write(*,*) "ierr49: ",ierr call MPI_BCAST(rayl_upper_sw, size(rayl_upper_sw), MPI_REAL, mpiroot, mpicomm, ierr) + write(*,*) "ierr50: ",ierr #endif ! Character arrays do ij=1,nabsorbers_sw call MPI_BCAST(gas_names_sw(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) enddo + write(*,*) "ierr51: ",ierr do ij=1,nminorabsorbers_sw call MPI_BCAST(gas_minor_sw(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) call MPI_BCAST(identifier_minor_sw(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) enddo + write(*,*) "ierr52: ",ierr do ij=1,nminor_absorber_intervals_lower_sw call MPI_BCAST(minor_gases_lower_sw(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) enddo + write(*,*) "ierr53: ",ierr do ij=1,nminor_absorber_intervals_upper_sw call MPI_BCAST(minor_gases_upper_sw(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) enddo + write(*,*) "ierr54: ",ierr ! Logical arrays (First convert to integer-array, then broadcast) ! call MPI_BCAST(minor_scales_with_density_lower_sw, nminor_absorber_intervals_lower_sw, MPI_LOGICAL, mpiroot, mpicomm, ierr) + write(*,*) "ierr55: ",ierr call MPI_BCAST(scale_by_complement_lower_sw, nminor_absorber_intervals_lower_sw, MPI_LOGICAL, mpiroot, mpicomm, ierr) + write(*,*) "ierr56: ",ierr call MPI_BCAST(minor_scales_with_density_upper_sw, nminor_absorber_intervals_upper_sw, MPI_LOGICAL, mpiroot, mpicomm, ierr) + write(*,*) "ierr57: ",ierr call MPI_BCAST(scale_by_complement_upper_sw, nminor_absorber_intervals_upper_sw, MPI_LOGICAL, mpiroot, mpicomm, ierr) + write(*,*) "ierr58: ",ierr #endif ! Initialize gas concentrations and gas optics class with data From fbd398f361fc86fd15e053936f567936bf70d70a Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Mon, 9 Dec 2019 12:17:02 -0700 Subject: [PATCH 073/167] Added ifdef(mpi) around declaration in initialization routines. --- physics/rrtmgp_lw_cloud_optics.F90 | 5 ++++- physics/rrtmgp_lw_gas_optics.F90 | 3 +++ physics/rrtmgp_sw_cloud_optics.F90 | 4 +++- physics/rrtmgp_sw_gas_optics.F90 | 3 +++ 4 files changed, 13 insertions(+), 2 deletions(-) diff --git a/physics/rrtmgp_lw_cloud_optics.F90 b/physics/rrtmgp_lw_cloud_optics.F90 index b3d36b070..6bdfc7b6e 100644 --- a/physics/rrtmgp_lw_cloud_optics.F90 +++ b/physics/rrtmgp_lw_cloud_optics.F90 @@ -90,9 +90,12 @@ subroutine rrtmgp_lw_cloud_optics_init(Model, mpicomm, mpirank, mpiroot, lw_clou npairsLWcldy ! ! Local variables - integer :: dimID,varID,status,ierr,ncid_lw_clds + integer :: dimID,varID,status,ncid_lw_clds character(len=264) :: lw_cloud_props_file integer,parameter :: max_strlen=256 +#ifdef MPI + integer :: ierr +#ebdif ! Initialize errmsg = '' diff --git a/physics/rrtmgp_lw_gas_optics.F90 b/physics/rrtmgp_lw_gas_optics.F90 index 45910376f..80ab8f0e2 100644 --- a/physics/rrtmgp_lw_gas_optics.F90 +++ b/physics/rrtmgp_lw_gas_optics.F90 @@ -114,6 +114,9 @@ subroutine rrtmgp_lw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, lw_gas_pr integer,dimension(:),allocatable :: temp1,temp2,temp3,temp4, temp_log_array1, temp_log_array2, temp_log_array3, temp_log_array4 character(len=264) :: lw_gas_props_file integer,parameter :: max_strlen=256 +#ifdef MPI + integer :: ierr +#ebdif ! Initialize errmsg = '' diff --git a/physics/rrtmgp_sw_cloud_optics.F90 b/physics/rrtmgp_sw_cloud_optics.F90 index c29bb2142..aa6888cbc 100644 --- a/physics/rrtmgp_sw_cloud_optics.F90 +++ b/physics/rrtmgp_sw_cloud_optics.F90 @@ -91,7 +91,9 @@ subroutine rrtmgp_sw_cloud_optics_init(Model,mpicomm, mpirank, mpiroot, sw_cloud ! Local variables integer :: status,ncid_sw_clds,dimid,varID character(len=264) :: sw_cloud_props_file - +#ifdef MPI + integer :: ierr +#ebdif ! Initialize errmsg = '' errflg = 0 diff --git a/physics/rrtmgp_sw_gas_optics.F90 b/physics/rrtmgp_sw_gas_optics.F90 index 07329e430..a4080a837 100644 --- a/physics/rrtmgp_sw_gas_optics.F90 +++ b/physics/rrtmgp_sw_gas_optics.F90 @@ -108,6 +108,9 @@ subroutine rrtmgp_sw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, sw_gas_p integer :: status,ncid_sw,dimid,varID,iGas integer,dimension(:),allocatable :: temp1,temp2,temp3,temp4 character(len=264) :: sw_gas_props_file +#ifdef MPI + integer :: ierr +#ebdif ! Initialize errmsg = '' From e858d73db6a8434b502d16b866df0bcb38b849d9 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Mon, 9 Dec 2019 13:39:57 -0700 Subject: [PATCH 074/167] Add mpi_barrier() calls to SW gas optics initialization routine --- physics/rrtmgp_lw_cloud_optics.F90 | 2 +- physics/rrtmgp_lw_gas_optics.F90 | 2 +- physics/rrtmgp_sw_cloud_optics.F90 | 2 +- physics/rrtmgp_sw_gas_optics.F90 | 8 ++++++-- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/physics/rrtmgp_lw_cloud_optics.F90 b/physics/rrtmgp_lw_cloud_optics.F90 index 6bdfc7b6e..821135b4f 100644 --- a/physics/rrtmgp_lw_cloud_optics.F90 +++ b/physics/rrtmgp_lw_cloud_optics.F90 @@ -95,7 +95,7 @@ subroutine rrtmgp_lw_cloud_optics_init(Model, mpicomm, mpirank, mpiroot, lw_clou integer,parameter :: max_strlen=256 #ifdef MPI integer :: ierr -#ebdif +#endif ! Initialize errmsg = '' diff --git a/physics/rrtmgp_lw_gas_optics.F90 b/physics/rrtmgp_lw_gas_optics.F90 index 80ab8f0e2..b8e4ca145 100644 --- a/physics/rrtmgp_lw_gas_optics.F90 +++ b/physics/rrtmgp_lw_gas_optics.F90 @@ -116,7 +116,7 @@ subroutine rrtmgp_lw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, lw_gas_pr integer,parameter :: max_strlen=256 #ifdef MPI integer :: ierr -#ebdif +#endif ! Initialize errmsg = '' diff --git a/physics/rrtmgp_sw_cloud_optics.F90 b/physics/rrtmgp_sw_cloud_optics.F90 index aa6888cbc..54696cb54 100644 --- a/physics/rrtmgp_sw_cloud_optics.F90 +++ b/physics/rrtmgp_sw_cloud_optics.F90 @@ -93,7 +93,7 @@ subroutine rrtmgp_sw_cloud_optics_init(Model,mpicomm, mpirank, mpiroot, sw_cloud character(len=264) :: sw_cloud_props_file #ifdef MPI integer :: ierr -#ebdif +#endif ! Initialize errmsg = '' errflg = 0 diff --git a/physics/rrtmgp_sw_gas_optics.F90 b/physics/rrtmgp_sw_gas_optics.F90 index a4080a837..a6a5a844b 100644 --- a/physics/rrtmgp_sw_gas_optics.F90 +++ b/physics/rrtmgp_sw_gas_optics.F90 @@ -110,7 +110,7 @@ subroutine rrtmgp_sw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, sw_gas_p character(len=264) :: sw_gas_props_file #ifdef MPI integer :: ierr -#ebdif +#endif ! Initialize errmsg = '' @@ -153,9 +153,11 @@ subroutine rrtmgp_sw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, sw_gas_p status = nf90_close(ncid_sw) endif endif - + ! Broadcast dimensions to all processors #ifdef MPI + call MPI_BARRIER(mpicomm, ierr) + write(*,*) "ierr0a: ",ierr write(*,*) "mpiroot: ",mpiroot write(*,*) "mpicomm: ",mpicomm call MPI_BCAST(ntemps_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) @@ -332,6 +334,8 @@ subroutine rrtmgp_sw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, sw_gas_p ! Broadcast arrays to all processors #ifdef MPI + call MPI_BARRIER(mpicomm, ierr) + write(*,*) "ierr0b: ",ierr write (*,*) 'Broadcasting RRTMGP shortwave k-distribution data ... ' call MPI_BCAST(minor_limits_gpt_upper_sw, size(minor_limits_gpt_upper_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) write(*,*) "ierr15: ",ierr From 72093456eb9f67a8b875100766befeeb6380ae6e Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Mon, 9 Dec 2019 14:34:52 -0700 Subject: [PATCH 075/167] Add mpi_barrier() calls to all initialization routines --- physics/rrtmgp_lw_cloud_optics.F90 | 14 ++++++ physics/rrtmgp_lw_gas_optics.F90 | 12 +++++ physics/rrtmgp_sw_cloud_optics.F90 | 14 ++++++ physics/rrtmgp_sw_gas_optics.F90 | 80 ++++++------------------------ 4 files changed, 55 insertions(+), 65 deletions(-) diff --git a/physics/rrtmgp_lw_cloud_optics.F90 b/physics/rrtmgp_lw_cloud_optics.F90 index 821135b4f..f8849c43b 100644 --- a/physics/rrtmgp_lw_cloud_optics.F90 +++ b/physics/rrtmgp_lw_cloud_optics.F90 @@ -136,6 +136,11 @@ subroutine rrtmgp_lw_cloud_optics_init(Model, mpicomm, mpirank, mpiroot, lw_clou endif endif + ! Sync processes before broadcasting +#ifdef MPI + call MPI_BARRIER(mpicomm, ierr) +#endif + ! Broadcast dimensions to all processors #ifdef MPI if (Model%rrtmgp_cld_optics .eq. 1 .or. Model%rrtmgp_cld_optics .eq. 2) then @@ -180,6 +185,7 @@ subroutine rrtmgp_lw_cloud_optics_init(Model, mpicomm, mpirank, mpiroot, lw_clou if (mpirank .eq. mpiroot) then ! if (Model%rrtmgp_cld_optics .eq. 1) then + write (*,*) 'Reading RRTMGP longwave cloud data (LUT) ... ' ! if(nf90_open(trim(lw_cloud_props_file), NF90_WRITE, ncid_lw_clds) == NF90_NOERR) then status = nf90_inq_varid(ncid_lw_clds,'radliq_lwr',varID) @@ -213,6 +219,7 @@ subroutine rrtmgp_lw_cloud_optics_init(Model, mpicomm, mpirank, mpiroot, lw_clou endif ! if (Model%rrtmgp_cld_optics .eq. 2) then + write (*,*) 'Reading RRTMGP longwave cloud data (PADE) ... ' ! if(nf90_open(trim(lw_cloud_props_file), NF90_WRITE, ncid_lw_clds) == NF90_NOERR) then status = nf90_inq_varid(ncid_lw_clds,'radliq_lwr',varID) @@ -258,9 +265,15 @@ subroutine rrtmgp_lw_cloud_optics_init(Model, mpicomm, mpirank, mpiroot, lw_clou endif endif + ! Sync processes before broadcasting +#ifdef MPI + call MPI_BARRIER(mpicomm, ierr) +#endif + ! Broadcast arrays to all processors #ifdef MPI if (Model%rrtmgp_cld_optics .eq. 1) then + write (*,*) 'Broadcasting RRTMGP longwave cloud data (LUT) ... ' #ifndef SINGLE_PREC call MPI_BCAST(radliq_lwr, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) call MPI_BCAST(radliq_upr, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) @@ -292,6 +305,7 @@ subroutine rrtmgp_lw_cloud_optics_init(Model, mpicomm, mpirank, mpiroot, lw_clou #endif endif if (Model%rrtmgp_cld_optics .eq. 2) then + write (*,*) 'Broadcasting RRTMGP longwave cloud data (PADE) ... ' #ifndef SINGLE_PREC call MPI_BCAST(pade_extliq, size(pade_extliq), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) call MPI_BCAST(pade_ssaliq, size(pade_ssaliq), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) diff --git a/physics/rrtmgp_lw_gas_optics.F90 b/physics/rrtmgp_lw_gas_optics.F90 index b8e4ca145..fc4f06115 100644 --- a/physics/rrtmgp_lw_gas_optics.F90 +++ b/physics/rrtmgp_lw_gas_optics.F90 @@ -161,6 +161,11 @@ subroutine rrtmgp_lw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, lw_gas_pr status = nf90_close(ncid_lw) endif endif + + ! Sync processes before broadcasting +#ifdef MPI + call MPI_BARRIER(mpicomm, ierr) +#endif ! Broadcast dimensions to all processors #ifdef MPI @@ -215,6 +220,7 @@ subroutine rrtmgp_lw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, lw_gas_pr allocate(planck_frac(ngpts_lw, nmixingfracs, npress+1, ntemps)) if (mpirank .eq. mpiroot) then + write (*,*) 'Reading RRTMGP longwave k-distribution data ... ' ! Read in fields from file if(nf90_open(trim(lw_gas_props_file), NF90_WRITE, ncid_lw) .eq. NF90_NOERR) then status = nf90_inq_varid(ncid_lw,'gas_names',varID) @@ -318,8 +324,14 @@ subroutine rrtmgp_lw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, lw_gas_pr endif endif + ! Sync processes before broadcasting +#ifdef MPI + call MPI_BARRIER(mpicomm, ierr) +#endif + ! Broadcast arrays to all processors #ifdef MPI + write (*,*) 'Broadcasting RRTMGP longwave k-distribution data ... ' call MPI_BCAST(minor_limits_gpt_upper, size(minor_limits_gpt_upper), MPI_INTEGER, mpiroot, mpicomm, ierr) call MPI_BCAST(minor_limits_gpt_lower, size(minor_limits_gpt_lower), MPI_INTEGER, mpiroot, mpicomm, ierr) call MPI_BCAST(kminor_start_upper, size(kminor_start_upper), MPI_INTEGER, mpiroot, mpicomm, ierr) diff --git a/physics/rrtmgp_sw_cloud_optics.F90 b/physics/rrtmgp_sw_cloud_optics.F90 index 54696cb54..64b937b8d 100644 --- a/physics/rrtmgp_sw_cloud_optics.F90 +++ b/physics/rrtmgp_sw_cloud_optics.F90 @@ -133,6 +133,11 @@ subroutine rrtmgp_sw_cloud_optics_init(Model,mpicomm, mpirank, mpiroot, sw_cloud endif endif + ! Sync processes before broadcasting +#ifdef MPI + call MPI_BARRIER(mpicomm, ierr) +#endif + ! Broadcast dimensions to all processors #ifdef MPI if (Model%rrtmgp_cld_optics .eq. 1 .or. Model%rrtmgp_cld_optics .eq. 2) then @@ -177,6 +182,7 @@ subroutine rrtmgp_sw_cloud_optics_init(Model,mpicomm, mpirank, mpiroot, sw_cloud if (mpirank .eq. mpiroot) then ! if (Model%rrtmgp_cld_optics .eq. 1) then + write (*,*) 'Reading RRTMGP shortwave cloud data (LUT) ... ' ! if(nf90_open(trim(sw_cloud_props_file), NF90_WRITE, ncid_sw_clds) == NF90_NOERR) then status = nf90_inq_varid(ncid_sw_clds,'radliq_lwr',varID) @@ -210,6 +216,7 @@ subroutine rrtmgp_sw_cloud_optics_init(Model,mpicomm, mpirank, mpiroot, sw_cloud endif ! if (Model%rrtmgp_cld_optics .eq. 2) then + write (*,*) 'Reading RRTMGP shortwave cloud data (PADE) ... ' ! if(nf90_open(trim(sw_cloud_props_file), NF90_WRITE, ncid_sw_clds) == NF90_NOERR) then status = nf90_inq_varid(ncid_sw_clds,'radliq_lwr',varID) @@ -255,9 +262,15 @@ subroutine rrtmgp_sw_cloud_optics_init(Model,mpicomm, mpirank, mpiroot, sw_cloud endif endif + ! Sync processes before broadcasting +#ifdef MPI + call MPI_BARRIER(mpicomm, ierr) +#endif + ! Broadcast arrays to all processors #ifdef MPI if (Model%rrtmgp_cld_optics .eq. 1) then + write (*,*) 'Broadcasting RRTMGP shortwave cloud data (LUT) ... ' #ifndef SINGLE_PREC call MPI_BCAST(radliq_lwr_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) call MPI_BCAST(radliq_upr_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) @@ -289,6 +302,7 @@ subroutine rrtmgp_sw_cloud_optics_init(Model,mpicomm, mpirank, mpiroot, sw_cloud #endif endif if (Model%rrtmgp_cld_optics .eq. 2) then + write (*,*) 'Broadcasting RRTMGP shortwave cloud data (PADE) ... ' #ifndef SINGLE_PREC call MPI_BCAST(pade_extliq_sw, size(pade_extliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) call MPI_BCAST(pade_ssaliq_sw, size(pade_ssaliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) diff --git a/physics/rrtmgp_sw_gas_optics.F90 b/physics/rrtmgp_sw_gas_optics.F90 index a6a5a844b..4fa7070c9 100644 --- a/physics/rrtmgp_sw_gas_optics.F90 +++ b/physics/rrtmgp_sw_gas_optics.F90 @@ -153,41 +153,28 @@ subroutine rrtmgp_sw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, sw_gas_p status = nf90_close(ncid_sw) endif endif - - ! Broadcast dimensions to all processors + + ! Sync processes before broadcasting #ifdef MPI call MPI_BARRIER(mpicomm, ierr) - write(*,*) "ierr0a: ",ierr - write(*,*) "mpiroot: ",mpiroot - write(*,*) "mpicomm: ",mpicomm +#endif + + ! Broadcast dimensions to all processors +#ifdef MPI call MPI_BCAST(ntemps_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - write(*,*) "ierr1: ",ierr call MPI_BCAST(npress_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - write(*,*) "ierr2: ",ierr call MPI_BCAST(nabsorbers_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - write(*,*) "ierr3: ",ierr call MPI_BCAST(nminorabsorbers_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - write(*,*) "ierr4: ",ierr call MPI_BCAST(nextrabsorbers_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - write(*,*) "ierr5: ",ierr call MPI_BCAST(nmixingfracs_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - write(*,*) "ierr6: ",ierr call MPI_BCAST(nlayers_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - write(*,*) "ierr7: ",ierr call MPI_BCAST(nbnds_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - write(*,*) "ierr8: ",ierr call MPI_BCAST(ngpts_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - write(*,*) "ierr9: ",ierr call MPI_BCAST(npairs_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - write(*,*) "ierr10: ",ierr call MPI_BCAST(ncontributors_lower_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - write(*,*) "ierr11: ",ierr call MPI_BCAST(ncontributors_upper_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - write(*,*) "ierr12: ",ierr call MPI_BCAST(nminor_absorber_intervals_lower_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - write(*,*) "ierr13: ",ierr call MPI_BCAST(nminor_absorber_intervals_upper_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - write(*,*) "ierr14: ",ierr #endif ! Allocate space for arrays @@ -223,6 +210,10 @@ subroutine rrtmgp_sw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, sw_gas_p allocate(temp3(nminor_absorber_intervals_lower_sw)) allocate(temp4(nminor_absorber_intervals_upper_sw)) +#ifdef MPI + call MPI_BARRIER(mpicomm, ierr) +#endif + ! On master processor, read in fields, broadcast to all processors if (mpirank .eq. mpiroot) then write (*,*) 'Reading RRTMGP shortwave k-distribution data ... ' @@ -332,114 +323,73 @@ subroutine rrtmgp_sw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, sw_gas_p endif endif - ! Broadcast arrays to all processors + ! Sync processes before broadcasting #ifdef MPI call MPI_BARRIER(mpicomm, ierr) - write(*,*) "ierr0b: ",ierr +#endif + + ! Broadcast arrays to all processors +#ifdef MPI write (*,*) 'Broadcasting RRTMGP shortwave k-distribution data ... ' call MPI_BCAST(minor_limits_gpt_upper_sw, size(minor_limits_gpt_upper_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) - write(*,*) "ierr15: ",ierr call MPI_BCAST(minor_limits_gpt_lower_sw, size(minor_limits_gpt_lower_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) - write(*,*) "ierr16: ",ierr call MPI_BCAST(kminor_start_upper_sw, size(kminor_start_upper_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) - write(*,*) "ierr17: ",ierr call MPI_BCAST(kminor_start_lower_sw, size(kminor_start_lower_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) - write(*,*) "ierr18: ",ierr call MPI_BCAST(key_species_sw, size(key_species_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) - write(*,*) "ierr19: ",ierr call MPI_BCAST(band2gpt_sw, size(band2gpt_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) - write(*,*) "ierr20: ",ierr #ifndef SINGLE_PREC call MPI_BCAST(band_lims_sw, size(band_lims_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - write(*,*) "ierr21: ",ierr call MPI_BCAST(press_ref_sw, size(press_ref_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - write(*,*) "ierr22: ",ierr call MPI_BCAST(temp_ref_sw, size(temp_ref_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - write(*,*) "ierr23: ",ierr call MPI_BCAST(kminor_lower_sw, size(kminor_lower_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - write(*,*) "ierr24: ",ierr call MPI_BCAST(kminor_upper_sw, size(kminor_upper_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - write(*,*) "ierr25: ",ierr call MPI_BCAST(scaling_gas_lower_sw, size(scaling_gas_lower_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - write(*,*) "ierr26: ",ierr call MPI_BCAST(scaling_gas_upper_sw, size(scaling_gas_upper_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - write(*,*) "ierr27: ",ierr call MPI_BCAST(vmr_ref_sw, size(vmr_ref_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - write(*,*) "ierr28: ",ierr call MPI_BCAST(kmajor_sw, size(kmajor_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - write(*,*) "ierr29: ",ierr call MPI_BCAST(temp_ref_p_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - write(*,*) "ierr30: ",ierr call MPI_BCAST(temp_ref_t_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - write(*,*) "ierr31: ",ierr call MPI_BCAST(press_ref_trop_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - write(*,*) "ierr32: ",ierr call MPI_BCAST(solar_source_sw, size(solar_source_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - write(*,*) "ierr33: ",ierr call MPI_BCAST(rayl_lower_sw, size(rayl_lower_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - write(*,*) "ierr34: ",ierr call MPI_BCAST(rayl_upper_sw, size(rayl_upper_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - write(*,*) "ierr35: ",ierr #else call MPI_BCAST(band_lims_sw, size(band_lims_sw), MPI_REAL, mpiroot, mpicomm, ierr) - write(*,*) "ierr36: ",ierr call MPI_BCAST(press_ref_sw, size(press_ref_sw), MPI_REAL, mpiroot, mpicomm, ierr) - write(*,*) "ierr37: ",ierr call MPI_BCAST(temp_ref_sw, size(temp_ref_sw), MPI_REAL, mpiroot, mpicomm, ierr) - write(*,*) "ierr38: ",ierr call MPI_BCAST(kminor_lower_sw, size(kminor_lower_sw), MPI_REAL, mpiroot, mpicomm, ierr) - write(*,*) "ierr39: ",ierr call MPI_BCAST(kminor_upper_sw, size(kminor_upper_sw), MPI_REAL, mpiroot, mpicomm, ierr) - write(*,*) "ierr40: ",ierr call MPI_BCAST(scaling_gas_lower_sw, size(scaling_gas_lower_sw), MPI_REAL, mpiroot, mpicomm, ierr) - write(*,*) "ierr41: ",ierr call MPI_BCAST(scaling_gas_upper_sw, size(scaling_gas_upper_sw), MPI_REAL, mpiroot, mpicomm, ierr) - write(*,*) "ierr42: ",ierr call MPI_BCAST(vmr_ref_sw, size(vmr_ref_sw), MPI_REAL, mpiroot, mpicomm, ierr) - write(*,*) "ierr43: ",ierr call MPI_BCAST(kmajor_sw, size(kmajor_sw), MPI_REAL, mpiroot, mpicomm, ierr) - write(*,*) "ierr44: ",ierr call MPI_BCAST(temp_ref_p_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) - write(*,*) "ierr45: ",ierr call MPI_BCAST(temp_ref_t_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) - write(*,*) "ierr46: ",ierr call MPI_BCAST(press_ref_trop_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) - write(*,*) "ierr47: ",ierr call MPI_BCAST(solar_source_sw, size(solar_source_sw), MPI_REAL, mpiroot, mpicomm, ierr) - write(*,*) "ierr48: ",ierr call MPI_BCAST(rayl_lower_sw, size(rayl_lower_sw), MPI_REAL, mpiroot, mpicomm, ierr) - write(*,*) "ierr49: ",ierr call MPI_BCAST(rayl_upper_sw, size(rayl_upper_sw), MPI_REAL, mpiroot, mpicomm, ierr) - write(*,*) "ierr50: ",ierr #endif ! Character arrays do ij=1,nabsorbers_sw call MPI_BCAST(gas_names_sw(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) enddo - write(*,*) "ierr51: ",ierr do ij=1,nminorabsorbers_sw call MPI_BCAST(gas_minor_sw(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) call MPI_BCAST(identifier_minor_sw(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) enddo - write(*,*) "ierr52: ",ierr do ij=1,nminor_absorber_intervals_lower_sw call MPI_BCAST(minor_gases_lower_sw(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) enddo - write(*,*) "ierr53: ",ierr do ij=1,nminor_absorber_intervals_upper_sw call MPI_BCAST(minor_gases_upper_sw(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) enddo - write(*,*) "ierr54: ",ierr ! Logical arrays (First convert to integer-array, then broadcast) ! call MPI_BCAST(minor_scales_with_density_lower_sw, nminor_absorber_intervals_lower_sw, MPI_LOGICAL, mpiroot, mpicomm, ierr) - write(*,*) "ierr55: ",ierr call MPI_BCAST(scale_by_complement_lower_sw, nminor_absorber_intervals_lower_sw, MPI_LOGICAL, mpiroot, mpicomm, ierr) - write(*,*) "ierr56: ",ierr call MPI_BCAST(minor_scales_with_density_upper_sw, nminor_absorber_intervals_upper_sw, MPI_LOGICAL, mpiroot, mpicomm, ierr) - write(*,*) "ierr57: ",ierr call MPI_BCAST(scale_by_complement_upper_sw, nminor_absorber_intervals_upper_sw, MPI_LOGICAL, mpiroot, mpicomm, ierr) - write(*,*) "ierr58: ",ierr #endif ! Initialize gas concentrations and gas optics class with data From a25d7142c7f200b57e73fe18a091bcb4c4179668 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Mon, 9 Dec 2019 15:21:43 -0700 Subject: [PATCH 076/167] Changed MPI_BCAST() for character arrays. --- physics/rrtmgp_lw_gas_optics.F90 | 21 ++++++--------------- physics/rrtmgp_sw_gas_optics.F90 | 23 +++++++---------------- 2 files changed, 13 insertions(+), 31 deletions(-) diff --git a/physics/rrtmgp_lw_gas_optics.F90 b/physics/rrtmgp_lw_gas_optics.F90 index fc4f06115..31cf78196 100644 --- a/physics/rrtmgp_lw_gas_optics.F90 +++ b/physics/rrtmgp_lw_gas_optics.F90 @@ -370,21 +370,12 @@ subroutine rrtmgp_lw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, lw_gas_pr call MPI_BCAST(planck_frac, size(planck_frac), MPI_REAL, mpiroot, mpicomm, ierr) #endif ! Character arrays - do ij=1,nabsorbers - call MPI_BCAST(gas_names(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) - enddo - do ij=1,nminorabsorbers - call MPI_BCAST(gas_minor(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) - call MPI_BCAST(identifier_minor(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) - enddo - do ij=1,nminor_absorber_intervals_lower - call MPI_BCAST(minor_gases_lower(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) - enddo - do ij=1,nminor_absorber_intervals_upper - call MPI_BCAST(minor_gases_upper(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) - enddo - ! Logical arrays (First convert to integer-array, then broadcast) - ! + call MPI_BCAST(gas_names, size(gas_names), MPI_CHAR, mpiroot, mpicomm, ierr) + call MPI_BCAST(gas_minor, size(gas_minor), MPI_CHAR, mpiroot, mpicomm, ierr) + call MPI_BCAST(identifier_minor, size(identifier_minor), MPI_CHAR, mpiroot, mpicomm, ierr) + call MPI_BCAST(minor_gases_lower, size(minor_gases_lower), MPI_CHAR, mpiroot, mpicomm, ierr) + call MPI_BCAST(minor_gases_upper, size(minor_gases_upper), MPI_CHAR, mpiroot, mpicomm, ierr) + ! Logical arrays call MPI_BCAST(minor_scales_with_density_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, ierr) call MPI_BCAST(scale_by_complement_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, ierr) call MPI_BCAST(minor_scales_with_density_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, ierr) diff --git a/physics/rrtmgp_sw_gas_optics.F90 b/physics/rrtmgp_sw_gas_optics.F90 index 4fa7070c9..5994cf5d0 100644 --- a/physics/rrtmgp_sw_gas_optics.F90 +++ b/physics/rrtmgp_sw_gas_optics.F90 @@ -370,22 +370,13 @@ subroutine rrtmgp_sw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, sw_gas_p call MPI_BCAST(rayl_lower_sw, size(rayl_lower_sw), MPI_REAL, mpiroot, mpicomm, ierr) call MPI_BCAST(rayl_upper_sw, size(rayl_upper_sw), MPI_REAL, mpiroot, mpicomm, ierr) #endif - ! Character arrays - do ij=1,nabsorbers_sw - call MPI_BCAST(gas_names_sw(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) - enddo - do ij=1,nminorabsorbers_sw - call MPI_BCAST(gas_minor_sw(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) - call MPI_BCAST(identifier_minor_sw(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) - enddo - do ij=1,nminor_absorber_intervals_lower_sw - call MPI_BCAST(minor_gases_lower_sw(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) - enddo - do ij=1,nminor_absorber_intervals_upper_sw - call MPI_BCAST(minor_gases_upper_sw(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) - enddo - ! Logical arrays (First convert to integer-array, then broadcast) - ! + ! Character arrays + call MPI_BCAST(gas_names_sw, size(gas_names_sw), MPI_CHAR, mpiroot, mpicomm, ierr) + call MPI_BCAST(gas_minor_sw, size(gas_minor_sw), MPI_CHAR, mpiroot, mpicomm, ierr) + call MPI_BCAST(identifier_minor_sw, size(identifier_minor_sw), MPI_CHAR, mpiroot, mpicomm, ierr) + call MPI_BCAST(minor_gases_lower_sw, size(minor_gases_lower_sw), MPI_CHAR, mpiroot, mpicomm, ierr) + call MPI_BCAST(minor_gases_upper_sw, size(minor_gases_upper_sw), MPI_CHAR, mpiroot, mpicomm, ierr) + ! Logical arrays call MPI_BCAST(minor_scales_with_density_lower_sw, nminor_absorber_intervals_lower_sw, MPI_LOGICAL, mpiroot, mpicomm, ierr) call MPI_BCAST(scale_by_complement_lower_sw, nminor_absorber_intervals_lower_sw, MPI_LOGICAL, mpiroot, mpicomm, ierr) call MPI_BCAST(minor_scales_with_density_upper_sw, nminor_absorber_intervals_upper_sw, MPI_LOGICAL, mpiroot, mpicomm, ierr) From 0a726fd3c3a46b68ec76eee40bd847b22b8bfef5 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Mon, 9 Dec 2019 16:02:30 -0700 Subject: [PATCH 077/167] Try using string length provided in file for broadcsting strings. --- physics/rrtmgp_lw_gas_optics.F90 | 14 +++++++++----- physics/rrtmgp_sw_gas_optics.F90 | 13 ++++++++----- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/physics/rrtmgp_lw_gas_optics.F90 b/physics/rrtmgp_lw_gas_optics.F90 index 31cf78196..c36b795a4 100644 --- a/physics/rrtmgp_lw_gas_optics.F90 +++ b/physics/rrtmgp_lw_gas_optics.F90 @@ -93,6 +93,7 @@ subroutine rrtmgp_lw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, lw_gas_pr ! Dimensions (to be broadcast across all processors) integer :: & + str_len, & ! ntemps, & ! npress, & ! ngpts_lw, & ! @@ -297,6 +298,9 @@ subroutine rrtmgp_lw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, lw_gas_pr ! status = nf90_inq_varid(ncid_lw,'plank_fraction',varID) status = nf90_get_var(ncid_lw,varID,planck_frac) + ! + status = nf90_inq_varid(ncid_lw,'str_len',varID) + status = nf90_get_var(ncid_lw,varID,str_len) ! Logical fields are read in as integers and then converted to logicals. status = nf90_inq_varid(ncid_lw,'minor_scales_with_density_lower',varID) @@ -370,11 +374,11 @@ subroutine rrtmgp_lw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, lw_gas_pr call MPI_BCAST(planck_frac, size(planck_frac), MPI_REAL, mpiroot, mpicomm, ierr) #endif ! Character arrays - call MPI_BCAST(gas_names, size(gas_names), MPI_CHAR, mpiroot, mpicomm, ierr) - call MPI_BCAST(gas_minor, size(gas_minor), MPI_CHAR, mpiroot, mpicomm, ierr) - call MPI_BCAST(identifier_minor, size(identifier_minor), MPI_CHAR, mpiroot, mpicomm, ierr) - call MPI_BCAST(minor_gases_lower, size(minor_gases_lower), MPI_CHAR, mpiroot, mpicomm, ierr) - call MPI_BCAST(minor_gases_upper, size(minor_gases_upper), MPI_CHAR, mpiroot, mpicomm, ierr) + call MPI_BCAST(gas_names, size(gas_names)*str_len, MPI_CHAR, mpiroot, mpicomm, ierr) + call MPI_BCAST(gas_minor, size(gas_minor)*str_len, MPI_CHAR, mpiroot, mpicomm, ierr) + call MPI_BCAST(identifier_minor, size(identifier_minor)*str_len, MPI_CHAR, mpiroot, mpicomm, ierr) + call MPI_BCAST(minor_gases_lower, size(minor_gases_lower)*str_len, MPI_CHAR, mpiroot, mpicomm, ierr) + call MPI_BCAST(minor_gases_upper, size(minor_gases_upper)*str_len, MPI_CHAR, mpiroot, mpicomm, ierr) ! Logical arrays call MPI_BCAST(minor_scales_with_density_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, ierr) call MPI_BCAST(scale_by_complement_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, ierr) diff --git a/physics/rrtmgp_sw_gas_optics.F90 b/physics/rrtmgp_sw_gas_optics.F90 index 5994cf5d0..0f0349cd3 100644 --- a/physics/rrtmgp_sw_gas_optics.F90 +++ b/physics/rrtmgp_sw_gas_optics.F90 @@ -89,6 +89,7 @@ subroutine rrtmgp_sw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, sw_gas_p scale_by_complement_upper_sw ! ! Dimensions (to be broadcast across all processors) integer :: & + str_len, & ! ntemps_sw, & ! npress_sw, & ! ngpts_sw, & ! @@ -150,6 +151,8 @@ subroutine rrtmgp_sw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, sw_gas_p status = nf90_inquire_dimension(ncid_sw, dimid, len=nminor_absorber_intervals_lower_sw) status = nf90_inq_dimid(ncid_sw, 'minor_absorber_intervals_upper', dimid) status = nf90_inquire_dimension(ncid_sw, dimid, len=nminor_absorber_intervals_upper_sw) + status = nf90_inq_varid(ncid_lw,'str_len',varID) + status = nf90_get_var(ncid_lw,varID,str_len) status = nf90_close(ncid_sw) endif endif @@ -371,11 +374,11 @@ subroutine rrtmgp_sw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, sw_gas_p call MPI_BCAST(rayl_upper_sw, size(rayl_upper_sw), MPI_REAL, mpiroot, mpicomm, ierr) #endif ! Character arrays - call MPI_BCAST(gas_names_sw, size(gas_names_sw), MPI_CHAR, mpiroot, mpicomm, ierr) - call MPI_BCAST(gas_minor_sw, size(gas_minor_sw), MPI_CHAR, mpiroot, mpicomm, ierr) - call MPI_BCAST(identifier_minor_sw, size(identifier_minor_sw), MPI_CHAR, mpiroot, mpicomm, ierr) - call MPI_BCAST(minor_gases_lower_sw, size(minor_gases_lower_sw), MPI_CHAR, mpiroot, mpicomm, ierr) - call MPI_BCAST(minor_gases_upper_sw, size(minor_gases_upper_sw), MPI_CHAR, mpiroot, mpicomm, ierr) + call MPI_BCAST(gas_names_sw, size(gas_names_sw)*str_len, MPI_CHAR, mpiroot, mpicomm, ierr) + call MPI_BCAST(gas_minor_sw, size(gas_minor_sw)*str_len, MPI_CHAR, mpiroot, mpicomm, ierr) + call MPI_BCAST(identifier_minor_sw, size(identifier_minor_sw)*str_len, MPI_CHAR, mpiroot, mpicomm, ierr) + call MPI_BCAST(minor_gases_lower_sw, size(minor_gases_lower_sw)*str_len, MPI_CHAR, mpiroot, mpicomm, ierr) + call MPI_BCAST(minor_gases_upper_sw, size(minor_gases_upper_sw)*str_len, MPI_CHAR, mpiroot, mpicomm, ierr) ! Logical arrays call MPI_BCAST(minor_scales_with_density_lower_sw, nminor_absorber_intervals_lower_sw, MPI_LOGICAL, mpiroot, mpicomm, ierr) call MPI_BCAST(scale_by_complement_lower_sw, nminor_absorber_intervals_lower_sw, MPI_LOGICAL, mpiroot, mpicomm, ierr) From 229ca5905567b6ee3224be17db89ab054d881ec8 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Mon, 9 Dec 2019 16:25:31 -0700 Subject: [PATCH 078/167] Revert to original mpi_bcast for character arrays. --- physics/rrtmgp_lw_gas_optics.F90 | 23 ++++++++++++++--------- physics/rrtmgp_sw_gas_optics.F90 | 24 +++++++++++++++--------- 2 files changed, 29 insertions(+), 18 deletions(-) diff --git a/physics/rrtmgp_lw_gas_optics.F90 b/physics/rrtmgp_lw_gas_optics.F90 index c36b795a4..15967dd57 100644 --- a/physics/rrtmgp_lw_gas_optics.F90 +++ b/physics/rrtmgp_lw_gas_optics.F90 @@ -93,7 +93,6 @@ subroutine rrtmgp_lw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, lw_gas_pr ! Dimensions (to be broadcast across all processors) integer :: & - str_len, & ! ntemps, & ! npress, & ! ngpts_lw, & ! @@ -298,9 +297,6 @@ subroutine rrtmgp_lw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, lw_gas_pr ! status = nf90_inq_varid(ncid_lw,'plank_fraction',varID) status = nf90_get_var(ncid_lw,varID,planck_frac) - ! - status = nf90_inq_varid(ncid_lw,'str_len',varID) - status = nf90_get_var(ncid_lw,varID,str_len) ! Logical fields are read in as integers and then converted to logicals. status = nf90_inq_varid(ncid_lw,'minor_scales_with_density_lower',varID) @@ -374,12 +370,21 @@ subroutine rrtmgp_lw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, lw_gas_pr call MPI_BCAST(planck_frac, size(planck_frac), MPI_REAL, mpiroot, mpicomm, ierr) #endif ! Character arrays - call MPI_BCAST(gas_names, size(gas_names)*str_len, MPI_CHAR, mpiroot, mpicomm, ierr) - call MPI_BCAST(gas_minor, size(gas_minor)*str_len, MPI_CHAR, mpiroot, mpicomm, ierr) - call MPI_BCAST(identifier_minor, size(identifier_minor)*str_len, MPI_CHAR, mpiroot, mpicomm, ierr) - call MPI_BCAST(minor_gases_lower, size(minor_gases_lower)*str_len, MPI_CHAR, mpiroot, mpicomm, ierr) - call MPI_BCAST(minor_gases_upper, size(minor_gases_upper)*str_len, MPI_CHAR, mpiroot, mpicomm, ierr) + do ij=1,nabsorbers + call MPI_BCAST(gas_names(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) + enddo + do ij=1,nminorabsorbers + call MPI_BCAST(gas_minor(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) + call MPI_BCAST(identifier_minor(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) + enddo + do ij=1,nminor_absorber_intervals_lower + call MPI_BCAST(minor_gases_lower(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) + enddo + do ij=1,nminor_absorber_intervals_upper + call MPI_BCAST(minor_gases_upper(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) + enddo ! Logical arrays + ! call MPI_BCAST(minor_scales_with_density_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, ierr) call MPI_BCAST(scale_by_complement_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, ierr) call MPI_BCAST(minor_scales_with_density_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, ierr) diff --git a/physics/rrtmgp_sw_gas_optics.F90 b/physics/rrtmgp_sw_gas_optics.F90 index 0f0349cd3..e9046ac34 100644 --- a/physics/rrtmgp_sw_gas_optics.F90 +++ b/physics/rrtmgp_sw_gas_optics.F90 @@ -89,7 +89,6 @@ subroutine rrtmgp_sw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, sw_gas_p scale_by_complement_upper_sw ! ! Dimensions (to be broadcast across all processors) integer :: & - str_len, & ! ntemps_sw, & ! npress_sw, & ! ngpts_sw, & ! @@ -151,8 +150,6 @@ subroutine rrtmgp_sw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, sw_gas_p status = nf90_inquire_dimension(ncid_sw, dimid, len=nminor_absorber_intervals_lower_sw) status = nf90_inq_dimid(ncid_sw, 'minor_absorber_intervals_upper', dimid) status = nf90_inquire_dimension(ncid_sw, dimid, len=nminor_absorber_intervals_upper_sw) - status = nf90_inq_varid(ncid_lw,'str_len',varID) - status = nf90_get_var(ncid_lw,varID,str_len) status = nf90_close(ncid_sw) endif endif @@ -373,13 +370,22 @@ subroutine rrtmgp_sw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, sw_gas_p call MPI_BCAST(rayl_lower_sw, size(rayl_lower_sw), MPI_REAL, mpiroot, mpicomm, ierr) call MPI_BCAST(rayl_upper_sw, size(rayl_upper_sw), MPI_REAL, mpiroot, mpicomm, ierr) #endif - ! Character arrays - call MPI_BCAST(gas_names_sw, size(gas_names_sw)*str_len, MPI_CHAR, mpiroot, mpicomm, ierr) - call MPI_BCAST(gas_minor_sw, size(gas_minor_sw)*str_len, MPI_CHAR, mpiroot, mpicomm, ierr) - call MPI_BCAST(identifier_minor_sw, size(identifier_minor_sw)*str_len, MPI_CHAR, mpiroot, mpicomm, ierr) - call MPI_BCAST(minor_gases_lower_sw, size(minor_gases_lower_sw)*str_len, MPI_CHAR, mpiroot, mpicomm, ierr) - call MPI_BCAST(minor_gases_upper_sw, size(minor_gases_upper_sw)*str_len, MPI_CHAR, mpiroot, mpicomm, ierr) + ! Character arrays + do ij=1,nabsorbers_sw + call MPI_BCAST(gas_names_sw(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) + enddo + do ij=1,nminorabsorbers_sw + call MPI_BCAST(gas_minor_sw(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) + call MPI_BCAST(identifier_minor_sw(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) + enddo + do ij=1,nminor_absorber_intervals_lower_sw + call MPI_BCAST(minor_gases_lower_sw(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) + enddo + do ij=1,nminor_absorber_intervals_upper_sw + call MPI_BCAST(minor_gases_upper_sw(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) + enddo ! Logical arrays + ! call MPI_BCAST(minor_scales_with_density_lower_sw, nminor_absorber_intervals_lower_sw, MPI_LOGICAL, mpiroot, mpicomm, ierr) call MPI_BCAST(scale_by_complement_lower_sw, nminor_absorber_intervals_lower_sw, MPI_LOGICAL, mpiroot, mpicomm, ierr) call MPI_BCAST(minor_scales_with_density_upper_sw, nminor_absorber_intervals_upper_sw, MPI_LOGICAL, mpiroot, mpicomm, ierr) From 25974eb2fb2a0de4f5935d3bd862da353cc9c618 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Tue, 10 Dec 2019 09:49:32 -0700 Subject: [PATCH 079/167] Cleaned up, added some diagnostics to test MPI in UFS. --- physics/rrtmgp_lw_gas_optics.F90 | 160 ++++++++++++++----------------- physics/rrtmgp_sw_gas_optics.F90 | 130 ++++++++++++------------- 2 files changed, 132 insertions(+), 158 deletions(-) diff --git a/physics/rrtmgp_lw_gas_optics.F90 b/physics/rrtmgp_lw_gas_optics.F90 index 15967dd57..1d87e955b 100644 --- a/physics/rrtmgp_lw_gas_optics.F90 +++ b/physics/rrtmgp_lw_gas_optics.F90 @@ -162,28 +162,24 @@ subroutine rrtmgp_lw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, lw_gas_pr endif endif - ! Sync processes before broadcasting -#ifdef MPI - call MPI_BARRIER(mpicomm, ierr) -#endif - ! Broadcast dimensions to all processors #ifdef MPI - call MPI_BCAST(ntemps, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(npress, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nminorabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nextrabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nmixingfracs, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nlayers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nbnds, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(ngpts_lw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(npairs, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(ncontributors_lower, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(ncontributors_upper, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nminor_absorber_intervals_lower, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nminor_absorber_intervals_upper, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(ninternalSourcetemps, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BARRIER(mpicomm, ierr) + call MPI_BCAST(ntemps, size(ntemps), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(npress, size(npress), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nabsorbers, size(nabsorbers), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nminorabsorbers, size(nminorabsorbers), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nextrabsorbers, size(nextrabsorbers), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nmixingfracs, size(nmixingfracs), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nlayers, size(nlayers), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nbnds, size(nbnds), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(ngpts_lw, size(ngpts_lw), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(npairs, size(npairs), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(ncontributors_lower, size(ncontributors_lower), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(ncontributors_upper, size(ncontributors_upper), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nminor_absorber_intervals_lower, size(nminor_absorber_intervals_lower), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nminor_absorber_intervals_upper, size(nminor_absorber_intervals_upper), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(ninternalSourcetemps, size(ninternalSourcetemps), MPI_INTEGER, mpiroot, mpicomm, ierr) #endif !if (mpirank .eq. mpiroot) then @@ -324,64 +320,61 @@ subroutine rrtmgp_lw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, lw_gas_pr endif endif - ! Sync processes before broadcasting -#ifdef MPI - call MPI_BARRIER(mpicomm, ierr) -#endif ! Broadcast arrays to all processors #ifdef MPI + call MPI_BARRIER(mpicomm, ierr) write (*,*) 'Broadcasting RRTMGP longwave k-distribution data ... ' - call MPI_BCAST(minor_limits_gpt_upper, size(minor_limits_gpt_upper), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(minor_limits_gpt_lower, size(minor_limits_gpt_lower), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(kminor_start_upper, size(kminor_start_upper), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(kminor_start_lower, size(kminor_start_lower), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(key_species, size(key_species), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(band2gpt, size(band2gpt), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(minor_limits_gpt_upper, size(minor_limits_gpt_upper), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(minor_limits_gpt_lower, size(minor_limits_gpt_lower), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(kminor_start_upper, size(kminor_start_upper), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(kminor_start_lower, size(kminor_start_lower), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(key_species, size(key_species), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(band2gpt, size(band2gpt), MPI_INTEGER, mpiroot, mpicomm, ierr) #ifndef SINGLE_PREC - call MPI_BCAST(band_lims, size(band_lims), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(press_ref, size(press_ref), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(temp_ref, size(temp_ref), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(kminor_lower, size(kminor_lower), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(kminor_upper, size(kminor_upper), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(scaling_gas_lower, size(scaling_gas_lower), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(scaling_gas_upper, size(scaling_gas_upper), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(vmr_ref, size(vmr_ref), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(kmajor, size(kmajor), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(temp_ref_p, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(temp_ref_t, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(press_ref_trop, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(totplnk, size(totplnk), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(planck_frac, size(planck_frac), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(band_lims, size(band_lims), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(press_ref, size(press_ref), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(temp_ref, size(temp_ref), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(kminor_lower, size(kminor_lower), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(kminor_upper, size(kminor_upper), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(scaling_gas_lower, size(scaling_gas_lower), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(scaling_gas_upper, size(scaling_gas_upper), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(vmr_ref, size(vmr_ref), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(kmajor, size(kmajor), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(temp_ref_p, size(temp_ref_p), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(temp_ref_t, size(temp_ref_t), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(press_ref_trop, size(press_ref_trop), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(totplnk, size(totplnk), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(planck_frac, size(planck_frac), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) #else - call MPI_BCAST(band_lims, size(band_lims), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(press_ref, size(press_ref), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(temp_ref, size(temp_ref), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(kminor_lower, size(kminor_lower), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(kminor_upper, size(kminor_upper), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(scaling_gas_lower, size(scaling_gas_lower), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(scaling_gas_upper, size(scaling_gas_upper), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(vmr_ref, size(vmr_ref), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(kmajor, size(kmajor), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(temp_ref_p, 1, MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(temp_ref_t, 1, MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(press_ref_trop, 1, MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(totplnk, size(totplnk), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(planck_frac, size(planck_frac), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(band_lims, size(band_lims), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(press_ref, size(press_ref), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(temp_ref, size(temp_ref), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(kminor_lower, size(kminor_lower), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(kminor_upper, size(kminor_upper), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(scaling_gas_lower, size(scaling_gas_lower), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(scaling_gas_upper, size(scaling_gas_upper), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(vmr_ref, size(vmr_ref), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(kmajor, size(kmajor), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(temp_ref_p, size(temp_ref_p), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(temp_ref_t, size(temp_ref_t), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(press_ref_trop, size(press_ref_trop), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(totplnk, size(totplnk), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(planck_frac, size(planck_frac), MPI_REAL, mpiroot, mpicomm, ierr) #endif ! Character arrays do ij=1,nabsorbers - call MPI_BCAST(gas_names(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) + call MPI_BCAST(gas_names(ij), len(gas_names(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) enddo do ij=1,nminorabsorbers - call MPI_BCAST(gas_minor(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) - call MPI_BCAST(identifier_minor(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) + call MPI_BCAST(gas_minor(ij), len(gas_minor(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) + call MPI_BCAST(identifier_minor(ij), len(identifier_minor(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) enddo do ij=1,nminor_absorber_intervals_lower - call MPI_BCAST(minor_gases_lower(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) + call MPI_BCAST(minor_gases_lower(ij), len(minor_gases_lower(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) enddo do ij=1,nminor_absorber_intervals_upper - call MPI_BCAST(minor_gases_upper(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) + call MPI_BCAST(minor_gases_upper(ij), len(minor_gases_upper(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) enddo ! Logical arrays ! @@ -410,11 +403,6 @@ end subroutine rrtmgp_lw_gas_optics_init ! ######################################################################################### ! SUBROUTINE rrtmgp_lw_gas_optics_run - ! *NOTE* The computation of the optical properties for a gaseous (+aerosols) atmosphere are - ! handled internally by the rte-rrtmgp/extensions/mo_rrtmgp_clr_all_sky.F90:rte_sw() - ! driver. - ! If calling rte/mo_rte_sw.F90:rte_sw() directly, place calls to compute source - ! function and gas_optics() here. ! ######################################################################################### !! \section arg_table_rrtmgp_lw_gas_optics_run !! \htmlinclude rrtmgp_lw_gas_optics.html @@ -465,26 +453,24 @@ subroutine rrtmgp_lw_gas_optics_run(Model, lw_gas_props, ncol, p_lay, p_lev, t_l call check_error_msg('rrtmgp_lw_gas_optics_run',sources%init(lw_gas_props)) call check_error_msg('rrtmgp_lw_gas_optics_run',sources%alloc(ncol, Model%levs)) - ! Compute boundary-condition (Only do for low-ceiling models) - !call check_error_msg('rrtmgp_lw_gas_optics_run',compute_bc(& - ! lw_gas_props, & ! IN - - ! p_lay, & ! IN - - ! p_lev, & ! IN - - ! t_lay, & ! IN - - ! gas_concentrations, & ! IN - - ! Interstitial%toa_src_lw)) ! OUT - + ! Print some diagnostics to test MPI + write(*,*) "lw_gas_props%get_ngas(): ", lw_gas_props%get_ngas() + write(*,*) "lw_gas_props%get_gases(): ", lw_gas_props%get_gases() + write(*,*) "lw_gas_props%get_press_min(): ", lw_gas_props%get_press_min() + write(*,*) "lw_gas_props%get_press_max(): ", lw_gas_props%get_press_max() + write(*,*) "lw_gas_props%get_temp_min(): ", lw_gas_props%get_temp_min() + write(*,*) "lw_gas_props%get_temp_max(): ", lw_gas_props%get_temp_max() - ! Gas-optics (djs asks pincus: I think it makes sense to have a generic gas_optics interface in - ! ty_gas_optics_rrtmgp, just as in ty_gas_optics. - call check_error_msg('rrtmgp_lw_gas_optics_run',lw_gas_props%gas_optics_int(& - p_lay, & ! IN - - p_lev, & ! IN - - t_lay, & ! IN - - skt, & ! IN - - gas_concentrations, & ! IN - - lw_optical_props_clrsky, & ! OUT - - sources, & ! OUT - - tlev=t_lev)) ! IN - + ! Gas-optics + call check_error_msg('rrtmgp_lw_gas_optics_run',lw_gas_props%gas_optics(& + p_lay, & ! IN - Pressure @ layer-centers (Pa) + p_lev, & ! IN - Pressure @ layer-interfaces (Pa) + t_lay, & ! IN - Temperature @ layer-centers (K) + skt, & ! IN - Skin-temperature (K) + gas_concentrations, & ! IN - RRTMGP DDT: trace gas volumne mixing-ratios + lw_optical_props_clrsky, & ! OUT - RRTMGP DDT: longwave optical properties + sources, & ! OUT - RRTMGP DDT: source functions + tlev=t_lev)) ! IN - Temperature @ layer-interfaces (K) (optional) end subroutine rrtmgp_lw_gas_optics_run diff --git a/physics/rrtmgp_sw_gas_optics.F90 b/physics/rrtmgp_sw_gas_optics.F90 index e9046ac34..a02409b00 100644 --- a/physics/rrtmgp_sw_gas_optics.F90 +++ b/physics/rrtmgp_sw_gas_optics.F90 @@ -116,7 +116,7 @@ subroutine rrtmgp_sw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, sw_gas_p errmsg = '' errflg = 0 - ! Filenames are set in the gfs_physics_nml (scm/src/GFS_typedefs.F90) + ! Filenames are set in the gfs_physics_nml (GFS_typedefs.F90) sw_gas_props_file = trim(Model%rrtmgp_root)//trim(Model%sw_file_gas) ! Read dimensions for k-distribution fields (only on master processor(0)) @@ -154,27 +154,23 @@ subroutine rrtmgp_sw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, sw_gas_p endif endif - ! Sync processes before broadcasting -#ifdef MPI - call MPI_BARRIER(mpicomm, ierr) -#endif - ! Broadcast dimensions to all processors #ifdef MPI - call MPI_BCAST(ntemps_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(npress_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nabsorbers_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nminorabsorbers_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nextrabsorbers_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nmixingfracs_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nlayers_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nbnds_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(ngpts_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(npairs_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(ncontributors_lower_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(ncontributors_upper_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nminor_absorber_intervals_lower_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nminor_absorber_intervals_upper_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BARRIER(mpicomm, ierr) + call MPI_BCAST(ntemps_sw, size(ntemps_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(npress_sw, size(npress_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nabsorbers_sw, size(nabsorbers_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nminorabsorbers_sw, size(nminorabsorbers_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nextrabsorbers_sw, size(nextrabsorbers_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nmixingfracs_sw, size(nmixingfracs_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nlayers_sw, size(nlayers_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nbnds_sw, size(nbnds_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(ngpts_sw, size(ngpts_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(npairs_sw, size(npairs_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(ncontributors_lower_sw, size(ncontributors_lower_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(ncontributors_upper_sw, size(ncontributors_upper_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nminor_absorber_intervals_lower_sw, size(nminor_absorber_intervals_lower_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nminor_absorber_intervals_upper_sw, size(nminor_absorber_intervals_upper_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) #endif ! Allocate space for arrays @@ -210,10 +206,6 @@ subroutine rrtmgp_sw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, sw_gas_p allocate(temp3(nminor_absorber_intervals_lower_sw)) allocate(temp4(nminor_absorber_intervals_upper_sw)) -#ifdef MPI - call MPI_BARRIER(mpicomm, ierr) -#endif - ! On master processor, read in fields, broadcast to all processors if (mpirank .eq. mpiroot) then write (*,*) 'Reading RRTMGP shortwave k-distribution data ... ' @@ -323,69 +315,65 @@ subroutine rrtmgp_sw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, sw_gas_p endif endif - ! Sync processes before broadcasting -#ifdef MPI - call MPI_BARRIER(mpicomm, ierr) -#endif - ! Broadcast arrays to all processors #ifdef MPI + call MPI_BARRIER(mpicomm, ierr) write (*,*) 'Broadcasting RRTMGP shortwave k-distribution data ... ' - call MPI_BCAST(minor_limits_gpt_upper_sw, size(minor_limits_gpt_upper_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(minor_limits_gpt_lower_sw, size(minor_limits_gpt_lower_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(kminor_start_upper_sw, size(kminor_start_upper_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(kminor_start_lower_sw, size(kminor_start_lower_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(key_species_sw, size(key_species_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(band2gpt_sw, size(band2gpt_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(minor_limits_gpt_upper_sw, size(minor_limits_gpt_upper_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(minor_limits_gpt_lower_sw, size(minor_limits_gpt_lower_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(kminor_start_upper_sw, size(kminor_start_upper_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(kminor_start_lower_sw, size(kminor_start_lower_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(key_species_sw, size(key_species_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(band2gpt_sw, size(band2gpt_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) #ifndef SINGLE_PREC - call MPI_BCAST(band_lims_sw, size(band_lims_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(press_ref_sw, size(press_ref_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(temp_ref_sw, size(temp_ref_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(kminor_lower_sw, size(kminor_lower_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(kminor_upper_sw, size(kminor_upper_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(scaling_gas_lower_sw, size(scaling_gas_lower_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(scaling_gas_upper_sw, size(scaling_gas_upper_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(vmr_ref_sw, size(vmr_ref_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(kmajor_sw, size(kmajor_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(temp_ref_p_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(temp_ref_t_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(press_ref_trop_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(solar_source_sw, size(solar_source_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(rayl_lower_sw, size(rayl_lower_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(rayl_upper_sw, size(rayl_upper_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(band_lims_sw, size(band_lims_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(press_ref_sw, size(press_ref_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(temp_ref_sw, size(temp_ref_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(kminor_lower_sw, size(kminor_lower_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(kminor_upper_sw, size(kminor_upper_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(scaling_gas_lower_sw, size(scaling_gas_lower_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(scaling_gas_upper_sw, size(scaling_gas_upper_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(vmr_ref_sw, size(vmr_ref_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(kmajor_sw, size(kmajor_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(temp_ref_p_sw, size(temp_ref_p_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(temp_ref_t_sw, size(temp_ref_t_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(press_ref_trop_sw, size(press_ref_trop_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(solar_source_sw, size(solar_source_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(rayl_lower_sw, size(rayl_lower_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(rayl_upper_sw, size(rayl_upper_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) #else - call MPI_BCAST(band_lims_sw, size(band_lims_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(press_ref_sw, size(press_ref_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(temp_ref_sw, size(temp_ref_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(kminor_lower_sw, size(kminor_lower_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(kminor_upper_sw, size(kminor_upper_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(scaling_gas_lower_sw, size(scaling_gas_lower_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(scaling_gas_upper_sw, size(scaling_gas_upper_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(vmr_ref_sw, size(vmr_ref_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(kmajor_sw, size(kmajor_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(temp_ref_p_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(temp_ref_t_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(press_ref_trop_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(solar_source_sw, size(solar_source_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(rayl_lower_sw, size(rayl_lower_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(rayl_upper_sw, size(rayl_upper_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(band_lims_sw, size(band_lims_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(press_ref_sw, size(press_ref_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(temp_ref_sw, size(temp_ref_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(kminor_lower_sw, size(kminor_lower_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(kminor_upper_sw, size(kminor_upper_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(scaling_gas_lower_sw, size(scaling_gas_lower_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(scaling_gas_upper_sw, size(scaling_gas_upper_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(vmr_ref_sw, size(vmr_ref_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(kmajor_sw, size(kmajor_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(temp_ref_p_sw, size(temp_ref_p_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(temp_ref_t_sw, size(temp_ref_t_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(press_ref_trop_sw, size(press_ref_trop_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(solar_source_sw, size(solar_source_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(rayl_lower_sw, size(rayl_lower_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(rayl_upper_sw, size(rayl_upper_sw), MPI_REAL, mpiroot, mpicomm, ierr) #endif ! Character arrays do ij=1,nabsorbers_sw - call MPI_BCAST(gas_names_sw(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) + call MPI_BCAST(gas_names_sw(ij), len(gas_names_sw(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) enddo do ij=1,nminorabsorbers_sw - call MPI_BCAST(gas_minor_sw(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) - call MPI_BCAST(identifier_minor_sw(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) + call MPI_BCAST(gas_minor_sw(ij), len(gas_minor_sw(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) + call MPI_BCAST(identifier_minor_sw(ij), len(identifier_minor_sw(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) enddo do ij=1,nminor_absorber_intervals_lower_sw - call MPI_BCAST(minor_gases_lower_sw(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) + call MPI_BCAST(minor_gases_lower_sw(ij), len(minor_gases_lower_sw(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) enddo do ij=1,nminor_absorber_intervals_upper_sw - call MPI_BCAST(minor_gases_upper_sw(ij), 32, MPI_CHAR, mpiroot, mpicomm, ierr) + call MPI_BCAST(minor_gases_upper_sw(ij), len(minor_gases_upper_sw(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) enddo + ! Logical arrays - ! call MPI_BCAST(minor_scales_with_density_lower_sw, nminor_absorber_intervals_lower_sw, MPI_LOGICAL, mpiroot, mpicomm, ierr) call MPI_BCAST(scale_by_complement_lower_sw, nminor_absorber_intervals_lower_sw, MPI_LOGICAL, mpiroot, mpicomm, ierr) call MPI_BCAST(minor_scales_with_density_upper_sw, nminor_absorber_intervals_upper_sw, MPI_LOGICAL, mpiroot, mpicomm, ierr) From 782ecb0bfff3f97736c2c5a4c8676f8afb9d718a Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Tue, 10 Dec 2019 10:12:41 -0700 Subject: [PATCH 080/167] Reverted broadcast call for scalars --- physics/rrtmgp_lw_gas_optics.F90 | 42 ++++++++++++++++---------------- physics/rrtmgp_sw_gas_optics.F90 | 40 +++++++++++++++--------------- 2 files changed, 41 insertions(+), 41 deletions(-) diff --git a/physics/rrtmgp_lw_gas_optics.F90 b/physics/rrtmgp_lw_gas_optics.F90 index 1d87e955b..45902b967 100644 --- a/physics/rrtmgp_lw_gas_optics.F90 +++ b/physics/rrtmgp_lw_gas_optics.F90 @@ -165,21 +165,21 @@ subroutine rrtmgp_lw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, lw_gas_pr ! Broadcast dimensions to all processors #ifdef MPI call MPI_BARRIER(mpicomm, ierr) - call MPI_BCAST(ntemps, size(ntemps), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(npress, size(npress), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nabsorbers, size(nabsorbers), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nminorabsorbers, size(nminorabsorbers), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nextrabsorbers, size(nextrabsorbers), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nmixingfracs, size(nmixingfracs), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nlayers, size(nlayers), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nbnds, size(nbnds), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(ngpts_lw, size(ngpts_lw), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(npairs, size(npairs), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(ncontributors_lower, size(ncontributors_lower), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(ncontributors_upper, size(ncontributors_upper), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nminor_absorber_intervals_lower, size(nminor_absorber_intervals_lower), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nminor_absorber_intervals_upper, size(nminor_absorber_intervals_upper), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(ninternalSourcetemps, size(ninternalSourcetemps), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(ntemps, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(npress, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nminorabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nextrabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nmixingfracs, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nlayers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nbnds, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(ngpts_lw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(npairs, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(ncontributors_lower, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(ncontributors_upper, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nminor_absorber_intervals_lower, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nminor_absorber_intervals_upper, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(ninternalSourcetemps, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) #endif !if (mpirank .eq. mpiroot) then @@ -341,9 +341,9 @@ subroutine rrtmgp_lw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, lw_gas_pr call MPI_BCAST(scaling_gas_upper, size(scaling_gas_upper), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) call MPI_BCAST(vmr_ref, size(vmr_ref), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) call MPI_BCAST(kmajor, size(kmajor), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(temp_ref_p, size(temp_ref_p), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(temp_ref_t, size(temp_ref_t), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(press_ref_trop, size(press_ref_trop), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(temp_ref_p, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(temp_ref_t, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(press_ref_trop, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) call MPI_BCAST(totplnk, size(totplnk), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) call MPI_BCAST(planck_frac, size(planck_frac), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) #else @@ -356,9 +356,9 @@ subroutine rrtmgp_lw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, lw_gas_pr call MPI_BCAST(scaling_gas_upper, size(scaling_gas_upper), MPI_REAL, mpiroot, mpicomm, ierr) call MPI_BCAST(vmr_ref, size(vmr_ref), MPI_REAL, mpiroot, mpicomm, ierr) call MPI_BCAST(kmajor, size(kmajor), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(temp_ref_p, size(temp_ref_p), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(temp_ref_t, size(temp_ref_t), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(press_ref_trop, size(press_ref_trop), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(temp_ref_p, 1, MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(temp_ref_t, 1, MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(press_ref_trop, 1, MPI_REAL, mpiroot, mpicomm, ierr) call MPI_BCAST(totplnk, size(totplnk), MPI_REAL, mpiroot, mpicomm, ierr) call MPI_BCAST(planck_frac, size(planck_frac), MPI_REAL, mpiroot, mpicomm, ierr) #endif diff --git a/physics/rrtmgp_sw_gas_optics.F90 b/physics/rrtmgp_sw_gas_optics.F90 index a02409b00..94d319517 100644 --- a/physics/rrtmgp_sw_gas_optics.F90 +++ b/physics/rrtmgp_sw_gas_optics.F90 @@ -157,20 +157,20 @@ subroutine rrtmgp_sw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, sw_gas_p ! Broadcast dimensions to all processors #ifdef MPI call MPI_BARRIER(mpicomm, ierr) - call MPI_BCAST(ntemps_sw, size(ntemps_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(npress_sw, size(npress_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nabsorbers_sw, size(nabsorbers_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nminorabsorbers_sw, size(nminorabsorbers_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nextrabsorbers_sw, size(nextrabsorbers_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nmixingfracs_sw, size(nmixingfracs_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nlayers_sw, size(nlayers_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nbnds_sw, size(nbnds_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(ngpts_sw, size(ngpts_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(npairs_sw, size(npairs_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(ncontributors_lower_sw, size(ncontributors_lower_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(ncontributors_upper_sw, size(ncontributors_upper_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nminor_absorber_intervals_lower_sw, size(nminor_absorber_intervals_lower_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nminor_absorber_intervals_upper_sw, size(nminor_absorber_intervals_upper_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(ntemps_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(npress_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nabsorbers_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nminorabsorbers_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nextrabsorbers_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nmixingfracs_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nlayers_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nbnds_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(ngpts_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(npairs_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(ncontributors_lower_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(ncontributors_upper_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nminor_absorber_intervals_lower_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nminor_absorber_intervals_upper_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) #endif ! Allocate space for arrays @@ -335,9 +335,9 @@ subroutine rrtmgp_sw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, sw_gas_p call MPI_BCAST(scaling_gas_upper_sw, size(scaling_gas_upper_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) call MPI_BCAST(vmr_ref_sw, size(vmr_ref_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) call MPI_BCAST(kmajor_sw, size(kmajor_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(temp_ref_p_sw, size(temp_ref_p_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(temp_ref_t_sw, size(temp_ref_t_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(press_ref_trop_sw, size(press_ref_trop_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(temp_ref_p_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(temp_ref_t_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(press_ref_trop_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) call MPI_BCAST(solar_source_sw, size(solar_source_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) call MPI_BCAST(rayl_lower_sw, size(rayl_lower_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) call MPI_BCAST(rayl_upper_sw, size(rayl_upper_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) @@ -351,9 +351,9 @@ subroutine rrtmgp_sw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, sw_gas_p call MPI_BCAST(scaling_gas_upper_sw, size(scaling_gas_upper_sw), MPI_REAL, mpiroot, mpicomm, ierr) call MPI_BCAST(vmr_ref_sw, size(vmr_ref_sw), MPI_REAL, mpiroot, mpicomm, ierr) call MPI_BCAST(kmajor_sw, size(kmajor_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(temp_ref_p_sw, size(temp_ref_p_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(temp_ref_t_sw, size(temp_ref_t_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(press_ref_trop_sw, size(press_ref_trop_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(temp_ref_p_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(temp_ref_t_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(press_ref_trop_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) call MPI_BCAST(solar_source_sw, size(solar_source_sw), MPI_REAL, mpiroot, mpicomm, ierr) call MPI_BCAST(rayl_lower_sw, size(rayl_lower_sw), MPI_REAL, mpiroot, mpicomm, ierr) call MPI_BCAST(rayl_upper_sw, size(rayl_upper_sw), MPI_REAL, mpiroot, mpicomm, ierr) From dcb8e4643479ef2d6c7c8427e1cc171a1ac1d69e Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Tue, 10 Dec 2019 11:05:25 -0700 Subject: [PATCH 081/167] Add print statements, check LW optical-depth on all processors. --- physics/rrtmgp_lw_gas_optics.F90 | 13 ++----------- physics/rrtmgp_lw_rte.F90 | 2 ++ 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/physics/rrtmgp_lw_gas_optics.F90 b/physics/rrtmgp_lw_gas_optics.F90 index 45902b967..12fcb4552 100644 --- a/physics/rrtmgp_lw_gas_optics.F90 +++ b/physics/rrtmgp_lw_gas_optics.F90 @@ -10,9 +10,6 @@ module rrtmgp_lw_gas_optics use rrtmgp_aux, only: check_error_msg use netcdf - ! Parameters - - contains ! ######################################################################################### @@ -453,14 +450,6 @@ subroutine rrtmgp_lw_gas_optics_run(Model, lw_gas_props, ncol, p_lay, p_lev, t_l call check_error_msg('rrtmgp_lw_gas_optics_run',sources%init(lw_gas_props)) call check_error_msg('rrtmgp_lw_gas_optics_run',sources%alloc(ncol, Model%levs)) - ! Print some diagnostics to test MPI - write(*,*) "lw_gas_props%get_ngas(): ", lw_gas_props%get_ngas() - write(*,*) "lw_gas_props%get_gases(): ", lw_gas_props%get_gases() - write(*,*) "lw_gas_props%get_press_min(): ", lw_gas_props%get_press_min() - write(*,*) "lw_gas_props%get_press_max(): ", lw_gas_props%get_press_max() - write(*,*) "lw_gas_props%get_temp_min(): ", lw_gas_props%get_temp_min() - write(*,*) "lw_gas_props%get_temp_max(): ", lw_gas_props%get_temp_max() - ! Gas-optics call check_error_msg('rrtmgp_lw_gas_optics_run',lw_gas_props%gas_optics(& p_lay, & ! IN - Pressure @ layer-centers (Pa) @@ -472,6 +461,8 @@ subroutine rrtmgp_lw_gas_optics_run(Model, lw_gas_props, ncol, p_lay, p_lev, t_l sources, & ! OUT - RRTMGP DDT: source functions tlev=t_lev)) ! IN - Temperature @ layer-interfaces (K) (optional) + write(*,*) "lw_optical_props_clrsky(gas_optics): ",lw_optical_props_clrsky%tau(:,:,1) + end subroutine rrtmgp_lw_gas_optics_run ! ######################################################################################### diff --git a/physics/rrtmgp_lw_rte.F90 b/physics/rrtmgp_lw_rte.F90 index 7265da45b..9864da635 100644 --- a/physics/rrtmgp_lw_rte.F90 +++ b/physics/rrtmgp_lw_rte.F90 @@ -109,6 +109,8 @@ subroutine rrtmgp_lw_rte_run(Model, Statein, Interstitial, ncol, lw_gas_props, p ! flux_allsky%bnd_flux_dn => fluxLWBB_dn_allsky !endif + write(*,*) "lw_optical_props_clrsky(rte_lw): ",lw_optical_props_clrsky%tau(:,:,1) + ! Compute clear-sky fluxes (if requested) ! Clear-sky fluxes are gas+aerosol call check_error_msg('rrtmgp_lw_rte_run',lw_optical_props_aerosol%increment(lw_optical_props_clrsky)) From 92817d25049588af50f7c750e80af3885d9c0698 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Tue, 10 Dec 2019 13:56:38 -0700 Subject: [PATCH 082/167] Removed mpi calls in lw gas optics. Test reading in data on all processors. --- physics/rrtmgp_lw_gas_optics.F90 | 175 +++++++++++++++---------------- physics/rrtmgp_lw_rte.F90 | 2 - 2 files changed, 86 insertions(+), 91 deletions(-) diff --git a/physics/rrtmgp_lw_gas_optics.F90 b/physics/rrtmgp_lw_gas_optics.F90 index 12fcb4552..2ac96f4ba 100644 --- a/physics/rrtmgp_lw_gas_optics.F90 +++ b/physics/rrtmgp_lw_gas_optics.F90 @@ -22,9 +22,9 @@ subroutine rrtmgp_lw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, lw_gas_pr ipsdlw0, errmsg, errflg) use netcdf -#ifdef MPI - use mpi -#endif +!#ifdef MPI +! use mpi +!#endif ! Inputs type(GFS_control_type), intent(in) :: & @@ -111,9 +111,9 @@ subroutine rrtmgp_lw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, lw_gas_pr integer,dimension(:),allocatable :: temp1,temp2,temp3,temp4, temp_log_array1, temp_log_array2, temp_log_array3, temp_log_array4 character(len=264) :: lw_gas_props_file integer,parameter :: max_strlen=256 -#ifdef MPI +!#ifdef MPI integer :: ierr -#endif +!#endif ! Initialize errmsg = '' @@ -123,7 +123,7 @@ subroutine rrtmgp_lw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, lw_gas_pr lw_gas_props_file = trim(Model%rrtmgp_root)//trim(Model%lw_file_gas) ! Read dimensions for k-distribution fields (only on master processor(0)) - if (mpirank .eq. mpiroot) then +! if (mpirank .eq. mpiroot) then if(nf90_open(trim(lw_gas_props_file), NF90_WRITE, ncid_lw) .eq. NF90_NOERR) then status = nf90_inq_dimid(ncid_lw, 'temperature', dimid) status = nf90_inquire_dimension(ncid_lw, dimid, len=ntemps) @@ -157,29 +157,28 @@ subroutine rrtmgp_lw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, lw_gas_pr status = nf90_inquire_dimension(ncid_lw, dimid, len=ninternalSourcetemps) status = nf90_close(ncid_lw) endif - endif +! endif ! Broadcast dimensions to all processors -#ifdef MPI - call MPI_BARRIER(mpicomm, ierr) - call MPI_BCAST(ntemps, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(npress, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nminorabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nextrabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nmixingfracs, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nlayers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nbnds, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(ngpts_lw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(npairs, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(ncontributors_lower, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(ncontributors_upper, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nminor_absorber_intervals_lower, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nminor_absorber_intervals_upper, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(ninternalSourcetemps, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -#endif +!#ifdef MPI +! call MPI_BARRIER(mpicomm, ierr) +! call MPI_BCAST(ntemps, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(npress, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(nabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(nminorabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(nextrabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(nmixingfracs, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(nlayers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(nbnds, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(ngpts_lw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(npairs, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(ncontributors_lower, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(ncontributors_upper, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(nminor_absorber_intervals_lower, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(nminor_absorber_intervals_upper, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(ninternalSourcetemps, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +!#endif - !if (mpirank .eq. mpiroot) then ! Allocate space for arrays allocate(gas_names(nabsorbers)) allocate(scaling_gas_lower(nminor_absorber_intervals_lower)) @@ -212,7 +211,7 @@ subroutine rrtmgp_lw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, lw_gas_pr allocate(totplnk(ninternalSourcetemps, nbnds)) allocate(planck_frac(ngpts_lw, nmixingfracs, npress+1, ntemps)) - if (mpirank .eq. mpiroot) then +! if (mpirank .eq. mpiroot) then write (*,*) 'Reading RRTMGP longwave k-distribution data ... ' ! Read in fields from file if(nf90_open(trim(lw_gas_props_file), NF90_WRITE, ncid_lw) .eq. NF90_NOERR) then @@ -315,71 +314,71 @@ subroutine rrtmgp_lw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, lw_gas_pr ! Close status = nf90_close(ncid_lw) endif - endif +! endif ! Broadcast arrays to all processors -#ifdef MPI - call MPI_BARRIER(mpicomm, ierr) - write (*,*) 'Broadcasting RRTMGP longwave k-distribution data ... ' - call MPI_BCAST(minor_limits_gpt_upper, size(minor_limits_gpt_upper), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(minor_limits_gpt_lower, size(minor_limits_gpt_lower), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(kminor_start_upper, size(kminor_start_upper), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(kminor_start_lower, size(kminor_start_lower), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(key_species, size(key_species), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(band2gpt, size(band2gpt), MPI_INTEGER, mpiroot, mpicomm, ierr) -#ifndef SINGLE_PREC - call MPI_BCAST(band_lims, size(band_lims), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(press_ref, size(press_ref), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(temp_ref, size(temp_ref), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(kminor_lower, size(kminor_lower), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(kminor_upper, size(kminor_upper), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(scaling_gas_lower, size(scaling_gas_lower), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(scaling_gas_upper, size(scaling_gas_upper), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(vmr_ref, size(vmr_ref), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(kmajor, size(kmajor), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(temp_ref_p, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(temp_ref_t, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(press_ref_trop, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(totplnk, size(totplnk), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(planck_frac, size(planck_frac), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -#else - call MPI_BCAST(band_lims, size(band_lims), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(press_ref, size(press_ref), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(temp_ref, size(temp_ref), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(kminor_lower, size(kminor_lower), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(kminor_upper, size(kminor_upper), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(scaling_gas_lower, size(scaling_gas_lower), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(scaling_gas_upper, size(scaling_gas_upper), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(vmr_ref, size(vmr_ref), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(kmajor, size(kmajor), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(temp_ref_p, 1, MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(temp_ref_t, 1, MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(press_ref_trop, 1, MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(totplnk, size(totplnk), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(planck_frac, size(planck_frac), MPI_REAL, mpiroot, mpicomm, ierr) -#endif - ! Character arrays - do ij=1,nabsorbers - call MPI_BCAST(gas_names(ij), len(gas_names(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) - enddo - do ij=1,nminorabsorbers - call MPI_BCAST(gas_minor(ij), len(gas_minor(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) - call MPI_BCAST(identifier_minor(ij), len(identifier_minor(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) - enddo - do ij=1,nminor_absorber_intervals_lower - call MPI_BCAST(minor_gases_lower(ij), len(minor_gases_lower(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) - enddo - do ij=1,nminor_absorber_intervals_upper - call MPI_BCAST(minor_gases_upper(ij), len(minor_gases_upper(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) - enddo +!#ifdef MPI +! call MPI_BARRIER(mpicomm, ierr) +! write (*,*) 'Broadcasting RRTMGP longwave k-distribution data ... ' +! call MPI_BCAST(minor_limits_gpt_upper, size(minor_limits_gpt_upper), MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(minor_limits_gpt_lower, size(minor_limits_gpt_lower), MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(kminor_start_upper, size(kminor_start_upper), MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(kminor_start_lower, size(kminor_start_lower), MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(key_species, size(key_species), MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(band2gpt, size(band2gpt), MPI_INTEGER, mpiroot, mpicomm, ierr) +!#ifndef SINGLE_PREC +! call MPI_BCAST(band_lims, size(band_lims), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(press_ref, size(press_ref), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(temp_ref, size(temp_ref), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(kminor_lower, size(kminor_lower), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(kminor_upper, size(kminor_upper), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(scaling_gas_lower, size(scaling_gas_lower), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(scaling_gas_upper, size(scaling_gas_upper), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(vmr_ref, size(vmr_ref), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(kmajor, size(kmajor), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(temp_ref_p, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(temp_ref_t, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(press_ref_trop, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(totplnk, size(totplnk), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(planck_frac, size(planck_frac), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +!#else +! call MPI_BCAST(band_lims, size(band_lims), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(press_ref, size(press_ref), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(temp_ref, size(temp_ref), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(kminor_lower, size(kminor_lower), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(kminor_upper, size(kminor_upper), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(scaling_gas_lower, size(scaling_gas_lower), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(scaling_gas_upper, size(scaling_gas_upper), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(vmr_ref, size(vmr_ref), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(kmajor, size(kmajor), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(temp_ref_p, 1, MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(temp_ref_t, 1, MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(press_ref_trop, 1, MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(totplnk, size(totplnk), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(planck_frac, size(planck_frac), MPI_REAL, mpiroot, mpicomm, ierr) +!#endif +! ! Character arrays +! do ij=1,nabsorbers +! call MPI_BCAST(gas_names(ij), len(gas_names(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) +! enddo +! do ij=1,nminorabsorbers +! call MPI_BCAST(gas_minor(ij), len(gas_minor(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) +! call MPI_BCAST(identifier_minor(ij), len(identifier_minor(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) +! enddo +! do ij=1,nminor_absorber_intervals_lower +! call MPI_BCAST(minor_gases_lower(ij), len(minor_gases_lower(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) +! enddo +! do ij=1,nminor_absorber_intervals_upper +! call MPI_BCAST(minor_gases_upper(ij), len(minor_gases_upper(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) +! enddo ! Logical arrays ! - call MPI_BCAST(minor_scales_with_density_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(scale_by_complement_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(minor_scales_with_density_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(scale_by_complement_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, ierr) -#endif +! call MPI_BCAST(minor_scales_with_density_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(scale_by_complement_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(minor_scales_with_density_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(scale_by_complement_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, ierr) +!#endif ! Initialize gas concentrations and gas optics class with data do iGas=1,Model%nGases @@ -461,8 +460,6 @@ subroutine rrtmgp_lw_gas_optics_run(Model, lw_gas_props, ncol, p_lay, p_lev, t_l sources, & ! OUT - RRTMGP DDT: source functions tlev=t_lev)) ! IN - Temperature @ layer-interfaces (K) (optional) - write(*,*) "lw_optical_props_clrsky(gas_optics): ",lw_optical_props_clrsky%tau(:,:,1) - end subroutine rrtmgp_lw_gas_optics_run ! ######################################################################################### diff --git a/physics/rrtmgp_lw_rte.F90 b/physics/rrtmgp_lw_rte.F90 index 9864da635..7265da45b 100644 --- a/physics/rrtmgp_lw_rte.F90 +++ b/physics/rrtmgp_lw_rte.F90 @@ -109,8 +109,6 @@ subroutine rrtmgp_lw_rte_run(Model, Statein, Interstitial, ncol, lw_gas_props, p ! flux_allsky%bnd_flux_dn => fluxLWBB_dn_allsky !endif - write(*,*) "lw_optical_props_clrsky(rte_lw): ",lw_optical_props_clrsky%tau(:,:,1) - ! Compute clear-sky fluxes (if requested) ! Clear-sky fluxes are gas+aerosol call check_error_msg('rrtmgp_lw_rte_run',lw_optical_props_aerosol%increment(lw_optical_props_clrsky)) From a59b8981e618851303fe224ea8d803a14b101e64 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Tue, 10 Dec 2019 14:46:50 -0700 Subject: [PATCH 083/167] Added some print statements --- physics/rrtmgp_lw_gas_optics.F90 | 216 ++++++++++++++++++------------- 1 file changed, 129 insertions(+), 87 deletions(-) diff --git a/physics/rrtmgp_lw_gas_optics.F90 b/physics/rrtmgp_lw_gas_optics.F90 index 2ac96f4ba..bfa525bd1 100644 --- a/physics/rrtmgp_lw_gas_optics.F90 +++ b/physics/rrtmgp_lw_gas_optics.F90 @@ -21,10 +21,9 @@ module rrtmgp_lw_gas_optics subroutine rrtmgp_lw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, lw_gas_props, & ipsdlw0, errmsg, errflg) use netcdf - -!#ifdef MPI -! use mpi -!#endif +#ifdef MPI + use mpi +#endif ! Inputs type(GFS_control_type), intent(in) :: & @@ -111,9 +110,9 @@ subroutine rrtmgp_lw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, lw_gas_pr integer,dimension(:),allocatable :: temp1,temp2,temp3,temp4, temp_log_array1, temp_log_array2, temp_log_array3, temp_log_array4 character(len=264) :: lw_gas_props_file integer,parameter :: max_strlen=256 -!#ifdef MPI +#ifdef MPI integer :: ierr -!#endif +#endif ! Initialize errmsg = '' @@ -123,7 +122,7 @@ subroutine rrtmgp_lw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, lw_gas_pr lw_gas_props_file = trim(Model%rrtmgp_root)//trim(Model%lw_file_gas) ! Read dimensions for k-distribution fields (only on master processor(0)) -! if (mpirank .eq. mpiroot) then + if (mpirank .eq. mpiroot) then if(nf90_open(trim(lw_gas_props_file), NF90_WRITE, ncid_lw) .eq. NF90_NOERR) then status = nf90_inq_dimid(ncid_lw, 'temperature', dimid) status = nf90_inquire_dimension(ncid_lw, dimid, len=ntemps) @@ -157,28 +156,29 @@ subroutine rrtmgp_lw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, lw_gas_pr status = nf90_inquire_dimension(ncid_lw, dimid, len=ninternalSourcetemps) status = nf90_close(ncid_lw) endif -! endif + endif ! Broadcast dimensions to all processors -!#ifdef MPI -! call MPI_BARRIER(mpicomm, ierr) -! call MPI_BCAST(ntemps, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(npress, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(nabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(nminorabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(nextrabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(nmixingfracs, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(nlayers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(nbnds, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(ngpts_lw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(npairs, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(ncontributors_lower, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(ncontributors_upper, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(nminor_absorber_intervals_lower, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(nminor_absorber_intervals_upper, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(ninternalSourcetemps, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -!#endif +#ifdef MPI + call MPI_BARRIER(mpicomm, ierr) + call MPI_BCAST(ntemps, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(npress, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nminorabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nextrabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nmixingfracs, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nlayers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nbnds, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(ngpts_lw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(npairs, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(ncontributors_lower, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(ncontributors_upper, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nminor_absorber_intervals_lower, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nminor_absorber_intervals_upper, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(ninternalSourcetemps, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +#endif + !if (mpirank .eq. mpiroot) then ! Allocate space for arrays allocate(gas_names(nabsorbers)) allocate(scaling_gas_lower(nminor_absorber_intervals_lower)) @@ -211,7 +211,7 @@ subroutine rrtmgp_lw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, lw_gas_pr allocate(totplnk(ninternalSourcetemps, nbnds)) allocate(planck_frac(ngpts_lw, nmixingfracs, npress+1, ntemps)) -! if (mpirank .eq. mpiroot) then + if (mpirank .eq. mpiroot) then write (*,*) 'Reading RRTMGP longwave k-distribution data ... ' ! Read in fields from file if(nf90_open(trim(lw_gas_props_file), NF90_WRITE, ncid_lw) .eq. NF90_NOERR) then @@ -314,71 +314,113 @@ subroutine rrtmgp_lw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, lw_gas_pr ! Close status = nf90_close(ncid_lw) endif -! endif + endif ! Broadcast arrays to all processors -!#ifdef MPI -! call MPI_BARRIER(mpicomm, ierr) -! write (*,*) 'Broadcasting RRTMGP longwave k-distribution data ... ' -! call MPI_BCAST(minor_limits_gpt_upper, size(minor_limits_gpt_upper), MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(minor_limits_gpt_lower, size(minor_limits_gpt_lower), MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(kminor_start_upper, size(kminor_start_upper), MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(kminor_start_lower, size(kminor_start_lower), MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(key_species, size(key_species), MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(band2gpt, size(band2gpt), MPI_INTEGER, mpiroot, mpicomm, ierr) -!#ifndef SINGLE_PREC -! call MPI_BCAST(band_lims, size(band_lims), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(press_ref, size(press_ref), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(temp_ref, size(temp_ref), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(kminor_lower, size(kminor_lower), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(kminor_upper, size(kminor_upper), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(scaling_gas_lower, size(scaling_gas_lower), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(scaling_gas_upper, size(scaling_gas_upper), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(vmr_ref, size(vmr_ref), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(kmajor, size(kmajor), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(temp_ref_p, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(temp_ref_t, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(press_ref_trop, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(totplnk, size(totplnk), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(planck_frac, size(planck_frac), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -!#else -! call MPI_BCAST(band_lims, size(band_lims), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(press_ref, size(press_ref), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(temp_ref, size(temp_ref), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(kminor_lower, size(kminor_lower), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(kminor_upper, size(kminor_upper), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(scaling_gas_lower, size(scaling_gas_lower), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(scaling_gas_upper, size(scaling_gas_upper), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(vmr_ref, size(vmr_ref), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(kmajor, size(kmajor), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(temp_ref_p, 1, MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(temp_ref_t, 1, MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(press_ref_trop, 1, MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(totplnk, size(totplnk), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(planck_frac, size(planck_frac), MPI_REAL, mpiroot, mpicomm, ierr) -!#endif -! ! Character arrays -! do ij=1,nabsorbers -! call MPI_BCAST(gas_names(ij), len(gas_names(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) -! enddo -! do ij=1,nminorabsorbers -! call MPI_BCAST(gas_minor(ij), len(gas_minor(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) -! call MPI_BCAST(identifier_minor(ij), len(identifier_minor(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) -! enddo -! do ij=1,nminor_absorber_intervals_lower -! call MPI_BCAST(minor_gases_lower(ij), len(minor_gases_lower(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) -! enddo -! do ij=1,nminor_absorber_intervals_upper -! call MPI_BCAST(minor_gases_upper(ij), len(minor_gases_upper(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) -! enddo +#ifdef MPI + call MPI_BARRIER(mpicomm, ierr) + write (*,*) 'Broadcasting RRTMGP longwave k-distribution data ... ' + call MPI_BCAST(minor_limits_gpt_upper, size(minor_limits_gpt_upper), MPI_INTEGER, mpiroot, mpicomm, ierr) + write(*,*) "MPI_1: ",mpicomm,mpiroot,ierr + call MPI_BCAST(minor_limits_gpt_lower, size(minor_limits_gpt_lower), MPI_INTEGER, mpiroot, mpicomm, ierr) + write(*,*) "MPI_2: ",mpicomm,mpiroot,ierr + call MPI_BCAST(kminor_start_upper, size(kminor_start_upper), MPI_INTEGER, mpiroot, mpicomm, ierr) + write(*,*) "MPI_3: ",mpicomm,mpiroot,ierr + call MPI_BCAST(kminor_start_lower, size(kminor_start_lower), MPI_INTEGER, mpiroot, mpicomm, ierr) + write(*,*) "MPI_4: ",mpicomm,mpiroot,ierr + call MPI_BCAST(key_species, size(key_species), MPI_INTEGER, mpiroot, mpicomm, ierr) + write(*,*) "MPI_5: ",mpicomm,mpiroot,ierr + call MPI_BCAST(band2gpt, size(band2gpt), MPI_INTEGER, mpiroot, mpicomm, ierr) +#ifndef SINGLE_PREC + call MPI_BCAST(band_lims, size(band_lims), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + write(*,*) "MPI_6: ",mpicomm,mpiroot,ierr + call MPI_BCAST(press_ref, size(press_ref), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + write(*,*) "MPI_7: ",mpicomm,mpiroot,ierr + call MPI_BCAST(temp_ref, size(temp_ref), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + write(*,*) "MPI_8: ",mpicomm,mpiroot,ierr + call MPI_BCAST(kminor_lower, size(kminor_lower), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + write(*,*) "MPI_9: ",mpicomm,mpiroot,ierr + call MPI_BCAST(kminor_upper, size(kminor_upper), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + write(*,*) "MPI_10: ",mpicomm,mpiroot,ierr + call MPI_BCAST(scaling_gas_lower, size(scaling_gas_lower), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + write(*,*) "MPI_11: ",mpicomm,mpiroot,ierr + call MPI_BCAST(scaling_gas_upper, size(scaling_gas_upper), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + write(*,*) "MPI_12: ",mpicomm,mpiroot,ierr + call MPI_BCAST(vmr_ref, size(vmr_ref), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + write(*,*) "MPI_13: ",mpicomm,mpiroot,ierr + call MPI_BCAST(kmajor, size(kmajor), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + write(*,*) "MPI_14: ",mpicomm,mpiroot,ierr + call MPI_BCAST(temp_ref_p, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + write(*,*) "MPI_15: ",mpicomm,mpiroot,ierr + call MPI_BCAST(temp_ref_t, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + write(*,*) "MPI_16: ",mpicomm,mpiroot,ierr + call MPI_BCAST(press_ref_trop, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + write(*,*) "MPI_17: ",mpicomm,mpiroot,ierr + call MPI_BCAST(totplnk, size(totplnk), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + write(*,*) "MPI_18: ",mpicomm,mpiroot,ierr + call MPI_BCAST(planck_frac, size(planck_frac), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + write(*,*) "MPI_19: ",mpicomm,mpiroot,ierr +#else + call MPI_BCAST(band_lims, size(band_lims), MPI_REAL, mpiroot, mpicomm, ierr) + write(*,*) "MPI_20: ",mpicomm,mpiroot,ierr + call MPI_BCAST(press_ref, size(press_ref), MPI_REAL, mpiroot, mpicomm, ierr) + write(*,*) "MPI_21: ",mpicomm,mpiroot,ierr + call MPI_BCAST(temp_ref, size(temp_ref), MPI_REAL, mpiroot, mpicomm, ierr) + write(*,*) "MPI_22: ",mpicomm,mpiroot,ierr + call MPI_BCAST(kminor_lower, size(kminor_lower), MPI_REAL, mpiroot, mpicomm, ierr) + write(*,*) "MPI_23: ",mpicomm,mpiroot,ierr + call MPI_BCAST(kminor_upper, size(kminor_upper), MPI_REAL, mpiroot, mpicomm, ierr) + write(*,*) "MPI_24: ",mpicomm,mpiroot,ierr + call MPI_BCAST(scaling_gas_lower, size(scaling_gas_lower), MPI_REAL, mpiroot, mpicomm, ierr) + write(*,*) "MPI_25: ",mpicomm,mpiroot,ierr + call MPI_BCAST(scaling_gas_upper, size(scaling_gas_upper), MPI_REAL, mpiroot, mpicomm, ierr) + write(*,*) "MPI_26: ",mpicomm,mpiroot,ierr + call MPI_BCAST(vmr_ref, size(vmr_ref), MPI_REAL, mpiroot, mpicomm, ierr) + write(*,*) "MPI_27: ",mpicomm,mpiroot,ierr + call MPI_BCAST(kmajor, size(kmajor), MPI_REAL, mpiroot, mpicomm, ierr) + write(*,*) "MPI_28: ",mpicomm,mpiroot,ierr + call MPI_BCAST(temp_ref_p, 1, MPI_REAL, mpiroot, mpicomm, ierr) + write(*,*) "MPI_29: ",mpicomm,mpiroot,ierr + call MPI_BCAST(temp_ref_t, 1, MPI_REAL, mpiroot, mpicomm, ierr) + write(*,*) "MPI_30: ",mpicomm,mpiroot,ierr + call MPI_BCAST(press_ref_trop, 1, MPI_REAL, mpiroot, mpicomm, ierr) + write(*,*) "MPI_31: ",mpicomm,mpiroot,ierr + call MPI_BCAST(totplnk, size(totplnk), MPI_REAL, mpiroot, mpicomm, ierr) + write(*,*) "MPI_32: ",mpicomm,mpiroot,ierr + call MPI_BCAST(planck_frac, size(planck_frac), MPI_REAL, mpiroot, mpicomm, ierr) + write(*,*) "MPI_33: ",mpicomm,mpiroot,ierr +#endif + ! Character arrays + do ij=1,nabsorbers + call MPI_BCAST(gas_names(ij), len(gas_names(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) + write(*,*) "MPI_34: ",ij,mpicomm,mpiroot,ierr + enddo + do ij=1,nminorabsorbers + call MPI_BCAST(gas_minor(ij), len(gas_minor(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) + write(*,*) "MPI_35: ",ijmpicomm,mpiroot,ierr + call MPI_BCAST(identifier_minor(ij), len(identifier_minor(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) + write(*,*) "MPI_36: ",ij,mpicomm,mpiroot,ierr + enddo + do ij=1,nminor_absorber_intervals_lower + call MPI_BCAST(minor_gases_lower(ij), len(minor_gases_lower(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) + write(*,*) "MPI_37: ",ij,mpicomm,mpiroot,ierr + enddo + do ij=1,nminor_absorber_intervals_upper + call MPI_BCAST(minor_gases_upper(ij), len(minor_gases_upper(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) + write(*,*) "MPI_38: ",ij,mpicomm,mpiroot,ierr + enddo ! Logical arrays ! -! call MPI_BCAST(minor_scales_with_density_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(scale_by_complement_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(minor_scales_with_density_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(scale_by_complement_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, ierr) -!#endif + call MPI_BCAST(minor_scales_with_density_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, ierr) + write(*,*) "MPI_39: ",mpicomm,mpiroot,ierr + call MPI_BCAST(scale_by_complement_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, ierr) + write(*,*) "MPI_40: ",mpicomm,mpiroot,ierr + call MPI_BCAST(minor_scales_with_density_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, ierr) + write(*,*) "MPI_41: ",mpicomm,mpiroot,ierr + call MPI_BCAST(scale_by_complement_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, ierr) + write(*,*) "MPI_42: ",mpicomm,mpiroot,ierr +#endif ! Initialize gas concentrations and gas optics class with data do iGas=1,Model%nGases From 6cdd545a425f717a1fed528eaef31c48509f2dcb Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Tue, 10 Dec 2019 15:25:31 -0700 Subject: [PATCH 084/167] Try calling mpi_barrier just before gas_optics%load --- physics/rrtmgp_lw_gas_optics.F90 | 46 +++----------------------------- 1 file changed, 3 insertions(+), 43 deletions(-) diff --git a/physics/rrtmgp_lw_gas_optics.F90 b/physics/rrtmgp_lw_gas_optics.F90 index bfa525bd1..de8ba92e2 100644 --- a/physics/rrtmgp_lw_gas_optics.F90 +++ b/physics/rrtmgp_lw_gas_optics.F90 @@ -21,6 +21,7 @@ module rrtmgp_lw_gas_optics subroutine rrtmgp_lw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, lw_gas_props, & ipsdlw0, errmsg, errflg) use netcdf + #ifdef MPI use mpi #endif @@ -87,7 +88,7 @@ subroutine rrtmgp_lw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, lw_gas_pr scale_by_complement_lower, & ! scale_by_complement_upper ! - ! Dimensions (to be broadcast across all processors) + ! Dimensions integer :: & ntemps, & ! npress, & ! @@ -322,104 +323,63 @@ subroutine rrtmgp_lw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, lw_gas_pr call MPI_BARRIER(mpicomm, ierr) write (*,*) 'Broadcasting RRTMGP longwave k-distribution data ... ' call MPI_BCAST(minor_limits_gpt_upper, size(minor_limits_gpt_upper), MPI_INTEGER, mpiroot, mpicomm, ierr) - write(*,*) "MPI_1: ",mpicomm,mpiroot,ierr call MPI_BCAST(minor_limits_gpt_lower, size(minor_limits_gpt_lower), MPI_INTEGER, mpiroot, mpicomm, ierr) - write(*,*) "MPI_2: ",mpicomm,mpiroot,ierr call MPI_BCAST(kminor_start_upper, size(kminor_start_upper), MPI_INTEGER, mpiroot, mpicomm, ierr) - write(*,*) "MPI_3: ",mpicomm,mpiroot,ierr call MPI_BCAST(kminor_start_lower, size(kminor_start_lower), MPI_INTEGER, mpiroot, mpicomm, ierr) - write(*,*) "MPI_4: ",mpicomm,mpiroot,ierr call MPI_BCAST(key_species, size(key_species), MPI_INTEGER, mpiroot, mpicomm, ierr) - write(*,*) "MPI_5: ",mpicomm,mpiroot,ierr call MPI_BCAST(band2gpt, size(band2gpt), MPI_INTEGER, mpiroot, mpicomm, ierr) #ifndef SINGLE_PREC call MPI_BCAST(band_lims, size(band_lims), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - write(*,*) "MPI_6: ",mpicomm,mpiroot,ierr call MPI_BCAST(press_ref, size(press_ref), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - write(*,*) "MPI_7: ",mpicomm,mpiroot,ierr call MPI_BCAST(temp_ref, size(temp_ref), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - write(*,*) "MPI_8: ",mpicomm,mpiroot,ierr call MPI_BCAST(kminor_lower, size(kminor_lower), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - write(*,*) "MPI_9: ",mpicomm,mpiroot,ierr call MPI_BCAST(kminor_upper, size(kminor_upper), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - write(*,*) "MPI_10: ",mpicomm,mpiroot,ierr call MPI_BCAST(scaling_gas_lower, size(scaling_gas_lower), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - write(*,*) "MPI_11: ",mpicomm,mpiroot,ierr call MPI_BCAST(scaling_gas_upper, size(scaling_gas_upper), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - write(*,*) "MPI_12: ",mpicomm,mpiroot,ierr call MPI_BCAST(vmr_ref, size(vmr_ref), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - write(*,*) "MPI_13: ",mpicomm,mpiroot,ierr call MPI_BCAST(kmajor, size(kmajor), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - write(*,*) "MPI_14: ",mpicomm,mpiroot,ierr call MPI_BCAST(temp_ref_p, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - write(*,*) "MPI_15: ",mpicomm,mpiroot,ierr call MPI_BCAST(temp_ref_t, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - write(*,*) "MPI_16: ",mpicomm,mpiroot,ierr call MPI_BCAST(press_ref_trop, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - write(*,*) "MPI_17: ",mpicomm,mpiroot,ierr call MPI_BCAST(totplnk, size(totplnk), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - write(*,*) "MPI_18: ",mpicomm,mpiroot,ierr call MPI_BCAST(planck_frac, size(planck_frac), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - write(*,*) "MPI_19: ",mpicomm,mpiroot,ierr #else call MPI_BCAST(band_lims, size(band_lims), MPI_REAL, mpiroot, mpicomm, ierr) - write(*,*) "MPI_20: ",mpicomm,mpiroot,ierr call MPI_BCAST(press_ref, size(press_ref), MPI_REAL, mpiroot, mpicomm, ierr) - write(*,*) "MPI_21: ",mpicomm,mpiroot,ierr call MPI_BCAST(temp_ref, size(temp_ref), MPI_REAL, mpiroot, mpicomm, ierr) - write(*,*) "MPI_22: ",mpicomm,mpiroot,ierr call MPI_BCAST(kminor_lower, size(kminor_lower), MPI_REAL, mpiroot, mpicomm, ierr) - write(*,*) "MPI_23: ",mpicomm,mpiroot,ierr call MPI_BCAST(kminor_upper, size(kminor_upper), MPI_REAL, mpiroot, mpicomm, ierr) - write(*,*) "MPI_24: ",mpicomm,mpiroot,ierr call MPI_BCAST(scaling_gas_lower, size(scaling_gas_lower), MPI_REAL, mpiroot, mpicomm, ierr) - write(*,*) "MPI_25: ",mpicomm,mpiroot,ierr call MPI_BCAST(scaling_gas_upper, size(scaling_gas_upper), MPI_REAL, mpiroot, mpicomm, ierr) - write(*,*) "MPI_26: ",mpicomm,mpiroot,ierr call MPI_BCAST(vmr_ref, size(vmr_ref), MPI_REAL, mpiroot, mpicomm, ierr) - write(*,*) "MPI_27: ",mpicomm,mpiroot,ierr call MPI_BCAST(kmajor, size(kmajor), MPI_REAL, mpiroot, mpicomm, ierr) - write(*,*) "MPI_28: ",mpicomm,mpiroot,ierr call MPI_BCAST(temp_ref_p, 1, MPI_REAL, mpiroot, mpicomm, ierr) - write(*,*) "MPI_29: ",mpicomm,mpiroot,ierr call MPI_BCAST(temp_ref_t, 1, MPI_REAL, mpiroot, mpicomm, ierr) - write(*,*) "MPI_30: ",mpicomm,mpiroot,ierr call MPI_BCAST(press_ref_trop, 1, MPI_REAL, mpiroot, mpicomm, ierr) - write(*,*) "MPI_31: ",mpicomm,mpiroot,ierr call MPI_BCAST(totplnk, size(totplnk), MPI_REAL, mpiroot, mpicomm, ierr) - write(*,*) "MPI_32: ",mpicomm,mpiroot,ierr call MPI_BCAST(planck_frac, size(planck_frac), MPI_REAL, mpiroot, mpicomm, ierr) - write(*,*) "MPI_33: ",mpicomm,mpiroot,ierr #endif ! Character arrays do ij=1,nabsorbers call MPI_BCAST(gas_names(ij), len(gas_names(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) - write(*,*) "MPI_34: ",ij,mpicomm,mpiroot,ierr enddo do ij=1,nminorabsorbers call MPI_BCAST(gas_minor(ij), len(gas_minor(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) - write(*,*) "MPI_35: ",ijmpicomm,mpiroot,ierr call MPI_BCAST(identifier_minor(ij), len(identifier_minor(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) - write(*,*) "MPI_36: ",ij,mpicomm,mpiroot,ierr enddo do ij=1,nminor_absorber_intervals_lower call MPI_BCAST(minor_gases_lower(ij), len(minor_gases_lower(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) - write(*,*) "MPI_37: ",ij,mpicomm,mpiroot,ierr enddo do ij=1,nminor_absorber_intervals_upper call MPI_BCAST(minor_gases_upper(ij), len(minor_gases_upper(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) - write(*,*) "MPI_38: ",ij,mpicomm,mpiroot,ierr enddo ! Logical arrays ! call MPI_BCAST(minor_scales_with_density_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, ierr) - write(*,*) "MPI_39: ",mpicomm,mpiroot,ierr call MPI_BCAST(scale_by_complement_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, ierr) - write(*,*) "MPI_40: ",mpicomm,mpiroot,ierr call MPI_BCAST(minor_scales_with_density_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, ierr) - write(*,*) "MPI_41: ",mpicomm,mpiroot,ierr call MPI_BCAST(scale_by_complement_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, ierr) - write(*,*) "MPI_42: ",mpicomm,mpiroot,ierr + call MPI_BARRIER(mpicomm, ierr) #endif ! Initialize gas concentrations and gas optics class with data From b16c6c76f4db31453ecf621e66211d33d37f0d8d Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Wed, 11 Dec 2019 09:19:43 -0700 Subject: [PATCH 085/167] Removed MPI calls. --- physics/rrtmgp_lw_cloud_optics.F90 | 192 ++++++++++++++--------------- physics/rrtmgp_lw_gas_optics.F90 | 183 ++++++++++++++------------- physics/rrtmgp_sw_cloud_optics.F90 | 190 ++++++++++++++-------------- physics/rrtmgp_sw_gas_optics.F90 | 180 +++++++++++++-------------- 4 files changed, 362 insertions(+), 383 deletions(-) diff --git a/physics/rrtmgp_lw_cloud_optics.F90 b/physics/rrtmgp_lw_cloud_optics.F90 index f8849c43b..f30f540a5 100644 --- a/physics/rrtmgp_lw_cloud_optics.F90 +++ b/physics/rrtmgp_lw_cloud_optics.F90 @@ -25,9 +25,9 @@ module rrtmgp_lw_cloud_optics ! ######################################################################################### subroutine rrtmgp_lw_cloud_optics_init(Model, mpicomm, mpirank, mpiroot, lw_cloud_props, & errmsg, errflg) -#ifdef MPI - use mpi -#endif +!#ifdef MPI +! use mpi +!#endif ! Inputs type(GFS_control_type), intent(in) :: & @@ -93,9 +93,9 @@ subroutine rrtmgp_lw_cloud_optics_init(Model, mpicomm, mpirank, mpiroot, lw_clou integer :: dimID,varID,status,ncid_lw_clds character(len=264) :: lw_cloud_props_file integer,parameter :: max_strlen=256 -#ifdef MPI - integer :: ierr -#endif +!#ifdef MPI +! integer :: ierr +!#endif ! Initialize errmsg = '' @@ -107,7 +107,7 @@ subroutine rrtmgp_lw_cloud_optics_init(Model, mpicomm, mpirank, mpiroot, lw_clou lw_cloud_props_file = trim(Model%rrtmgp_root)//trim(Model%lw_file_clouds) ! Read dimensions for k-distribution fields (only on master processor(0)) - if (mpirank .eq. mpiroot) then +! if (mpirank .eq. mpiroot) then if(nf90_open(trim(lw_cloud_props_file), NF90_WRITE, ncid_lw_clds) == NF90_NOERR) then status = nf90_inq_dimid(ncid_lw_clds, 'nband', dimid) status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=nbandLWcldy) @@ -134,27 +134,22 @@ subroutine rrtmgp_lw_cloud_optics_init(Model, mpicomm, mpirank, mpiroot, lw_clou if (Model%rrtmgp_nrghice .gt. nrghice_lw) then errmsg = 'Number of RRTMGP ice-roughness categories requested in namelist file is not allowed' endif - endif - - ! Sync processes before broadcasting -#ifdef MPI - call MPI_BARRIER(mpicomm, ierr) -#endif +! endif - ! Broadcast dimensions to all processors -#ifdef MPI - if (Model%rrtmgp_cld_optics .eq. 1 .or. Model%rrtmgp_cld_optics .eq. 2) then - call MPI_BCAST(nbandLWcldy, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nrghice_lw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nsize_liq, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nsize_ice, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nsizereg, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(ncoeff_ext, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(ncoeff_ssa_g, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nbound, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(npairsLWcldy, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - endif -#endif +! ! Broadcast dimensions to all processors +!#ifdef MPI +! if (Model%rrtmgp_cld_optics .eq. 1 .or. Model%rrtmgp_cld_optics .eq. 2) then +! call MPI_BCAST(nbandLWcldy, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(nrghice_lw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(nsize_liq, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(nsize_ice, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(nsizereg, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(ncoeff_ext, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(ncoeff_ssa_g, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(nbound, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(npairsLWcldy, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! endif +!#endif if (Model%rrtmgp_cld_optics .eq. 1) then allocate(lut_extliq(nsize_liq, nBandLWcldy)) @@ -182,7 +177,7 @@ subroutine rrtmgp_lw_cloud_optics_init(Model, mpicomm, mpirank, mpiroot, lw_clou endif ! On master processor, allocate space, read in fields, broadcast to all processors - if (mpirank .eq. mpiroot) then +! if (mpirank .eq. mpiroot) then ! if (Model%rrtmgp_cld_optics .eq. 1) then write (*,*) 'Reading RRTMGP longwave cloud data (LUT) ... ' @@ -263,80 +258,75 @@ subroutine rrtmgp_lw_cloud_optics_init(Model, mpicomm, mpirank, mpiroot, lw_clou status = nf90_close(ncid_lw_clds) endif endif - endif - - ! Sync processes before broadcasting -#ifdef MPI - call MPI_BARRIER(mpicomm, ierr) -#endif +! endif - ! Broadcast arrays to all processors -#ifdef MPI - if (Model%rrtmgp_cld_optics .eq. 1) then - write (*,*) 'Broadcasting RRTMGP longwave cloud data (LUT) ... ' -#ifndef SINGLE_PREC - call MPI_BCAST(radliq_lwr, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(radliq_upr, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(radliq_fac, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(radice_lwr, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(radice_upr, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(radice_fac, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_extliq, size(lut_extliq), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_ssaliq, size(lut_ssaliq), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_asyliq, size(lut_asyliq), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_extice, size(lut_extice), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_ssaice, size(lut_ssaice), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_asyice, size(lut_asyice), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(band_lims_cldy , size(band_lims_cldy), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -#else - call MPI_BCAST(radliq_lwr, 1, MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(radliq_upr, 1, MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(radliq_fac, 1, MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(radice_lwr, 1, MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(radice_upr, 1, MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(radice_fac, 1, MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_extliq, size(lut_extliq), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_ssaliq, size(lut_ssaliq), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_asyliq, size(lut_asyliq), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_extice, size(lut_extice), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_ssaice, size(lut_ssaice), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_asyice, size(lut_asyice), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(band_lims_cldy , size(band_lims_cldy), MPI_REAL, mpiroot, mpicomm, ierr) -#endif - endif - if (Model%rrtmgp_cld_optics .eq. 2) then - write (*,*) 'Broadcasting RRTMGP longwave cloud data (PADE) ... ' -#ifndef SINGLE_PREC - call MPI_BCAST(pade_extliq, size(pade_extliq), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_ssaliq, size(pade_ssaliq), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_asyliq, size(pade_asyliq), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_extice, size(pade_extice), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_ssaice, size(pade_ssaice), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_asyice, size(pade_asyice), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_extliq, size(pade_sizereg_extliq), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_ssaliq, size(pade_sizereg_ssaliq), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_asyliq, size(pade_sizereg_asyliq), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_extice, size(pade_sizereg_extice), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_ssaice, size(pade_sizereg_ssaice), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_asyice, size(pade_sizereg_asyice), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(band_lims_cldy, size(band_lims_cldy), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -#else - call MPI_BCAST(pade_extliq, size(pade_extliq), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_ssaliq, size(pade_ssaliq), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_asyliq, size(pade_asyliq), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_extice, size(pade_extice), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_ssaice, size(pade_ssaice), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_asyice, size(pade_asyice), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_extliq, size(pade_sizereg_extliq), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_ssaliq, size(pade_sizereg_ssaliq), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_asyliq, size(pade_sizereg_asyliq), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_extice, size(pade_sizereg_extice), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_ssaice, size(pade_sizereg_ssaice), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_asyice, size(pade_sizereg_asyice), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(band_lims_cldy, size(band_lims_cldy), MPI_REAL, mpiroot, mpicomm, ierr) -#endif - endif -#endif +! ! Broadcast arrays to all processors +!#ifdef MPI +! if (Model%rrtmgp_cld_optics .eq. 1) then +! write (*,*) 'Broadcasting RRTMGP longwave cloud data (LUT) ... ' +!#ifndef SINGLE_PREC +! call MPI_BCAST(radliq_lwr, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(radliq_upr, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(radliq_fac, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(radice_lwr, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(radice_upr, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(radice_fac, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(lut_extliq, size(lut_extliq), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(lut_ssaliq, size(lut_ssaliq), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(lut_asyliq, size(lut_asyliq), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(lut_extice, size(lut_extice), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(lut_ssaice, size(lut_ssaice), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(lut_asyice, size(lut_asyice), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(band_lims_cldy , size(band_lims_cldy), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +!#else +! call MPI_BCAST(radliq_lwr, 1, MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(radliq_upr, 1, MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(radliq_fac, 1, MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(radice_lwr, 1, MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(radice_upr, 1, MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(radice_fac, 1, MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(lut_extliq, size(lut_extliq), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(lut_ssaliq, size(lut_ssaliq), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(lut_asyliq, size(lut_asyliq), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(lut_extice, size(lut_extice), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(lut_ssaice, size(lut_ssaice), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(lut_asyice, size(lut_asyice), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(band_lims_cldy , size(band_lims_cldy), MPI_REAL, mpiroot, mpicomm, ierr) +!#endif +! endif +! if (Model%rrtmgp_cld_optics .eq. 2) then +! write (*,*) 'Broadcasting RRTMGP longwave cloud data (PADE) ... ' +!#ifndef SINGLE_PREC +! call MPI_BCAST(pade_extliq, size(pade_extliq), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(pade_ssaliq, size(pade_ssaliq), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(pade_asyliq, size(pade_asyliq), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(pade_extice, size(pade_extice), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(pade_ssaice, size(pade_ssaice), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(pade_asyice, size(pade_asyice), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(pade_sizereg_extliq, size(pade_sizereg_extliq), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(pade_sizereg_ssaliq, size(pade_sizereg_ssaliq), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(pade_sizereg_asyliq, size(pade_sizereg_asyliq), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(pade_sizereg_extice, size(pade_sizereg_extice), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(pade_sizereg_ssaice, size(pade_sizereg_ssaice), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(pade_sizereg_asyice, size(pade_sizereg_asyice), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(band_lims_cldy, size(band_lims_cldy), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +!#else +! call MPI_BCAST(pade_extliq, size(pade_extliq), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(pade_ssaliq, size(pade_ssaliq), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(pade_asyliq, size(pade_asyliq), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(pade_extice, size(pade_extice), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(pade_ssaice, size(pade_ssaice), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(pade_asyice, size(pade_asyice), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(pade_sizereg_extliq, size(pade_sizereg_extliq), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(pade_sizereg_ssaliq, size(pade_sizereg_ssaliq), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(pade_sizereg_asyliq, size(pade_sizereg_asyliq), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(pade_sizereg_extice, size(pade_sizereg_extice), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(pade_sizereg_ssaice, size(pade_sizereg_ssaice), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(pade_sizereg_asyice, size(pade_sizereg_asyice), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(band_lims_cldy, size(band_lims_cldy), MPI_REAL, mpiroot, mpicomm, ierr) +!#endif +! endif +!#endif ! Load tables data for RRTMGP cloud-optics if (Model%rrtmgp_cld_optics .eq. 1) then diff --git a/physics/rrtmgp_lw_gas_optics.F90 b/physics/rrtmgp_lw_gas_optics.F90 index de8ba92e2..a5854fe37 100644 --- a/physics/rrtmgp_lw_gas_optics.F90 +++ b/physics/rrtmgp_lw_gas_optics.F90 @@ -22,9 +22,9 @@ subroutine rrtmgp_lw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, lw_gas_pr ipsdlw0, errmsg, errflg) use netcdf -#ifdef MPI - use mpi -#endif +!#ifdef MPI +! use mpi +!#endif ! Inputs type(GFS_control_type), intent(in) :: & @@ -111,9 +111,9 @@ subroutine rrtmgp_lw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, lw_gas_pr integer,dimension(:),allocatable :: temp1,temp2,temp3,temp4, temp_log_array1, temp_log_array2, temp_log_array3, temp_log_array4 character(len=264) :: lw_gas_props_file integer,parameter :: max_strlen=256 -#ifdef MPI - integer :: ierr -#endif +!#ifdef MPI +! integer :: ierr +!#endif ! Initialize errmsg = '' @@ -123,7 +123,7 @@ subroutine rrtmgp_lw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, lw_gas_pr lw_gas_props_file = trim(Model%rrtmgp_root)//trim(Model%lw_file_gas) ! Read dimensions for k-distribution fields (only on master processor(0)) - if (mpirank .eq. mpiroot) then +! if (mpirank .eq. mpiroot) then if(nf90_open(trim(lw_gas_props_file), NF90_WRITE, ncid_lw) .eq. NF90_NOERR) then status = nf90_inq_dimid(ncid_lw, 'temperature', dimid) status = nf90_inquire_dimension(ncid_lw, dimid, len=ntemps) @@ -157,29 +157,28 @@ subroutine rrtmgp_lw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, lw_gas_pr status = nf90_inquire_dimension(ncid_lw, dimid, len=ninternalSourcetemps) status = nf90_close(ncid_lw) endif - endif +! endif ! Broadcast dimensions to all processors -#ifdef MPI - call MPI_BARRIER(mpicomm, ierr) - call MPI_BCAST(ntemps, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(npress, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nminorabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nextrabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nmixingfracs, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nlayers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nbnds, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(ngpts_lw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(npairs, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(ncontributors_lower, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(ncontributors_upper, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nminor_absorber_intervals_lower, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nminor_absorber_intervals_upper, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(ninternalSourcetemps, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -#endif +!#ifdef MPI +! call MPI_BARRIER(mpicomm, ierr) +! call MPI_BCAST(ntemps, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(npress, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(nabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(nminorabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(nextrabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(nmixingfracs, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(nlayers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(nbnds, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(ngpts_lw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(npairs, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(ncontributors_lower, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(ncontributors_upper, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(nminor_absorber_intervals_lower, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(nminor_absorber_intervals_upper, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(ninternalSourcetemps, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +!#endif - !if (mpirank .eq. mpiroot) then ! Allocate space for arrays allocate(gas_names(nabsorbers)) allocate(scaling_gas_lower(nminor_absorber_intervals_lower)) @@ -212,7 +211,7 @@ subroutine rrtmgp_lw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, lw_gas_pr allocate(totplnk(ninternalSourcetemps, nbnds)) allocate(planck_frac(ngpts_lw, nmixingfracs, npress+1, ntemps)) - if (mpirank .eq. mpiroot) then +! if (mpirank .eq. mpiroot) then write (*,*) 'Reading RRTMGP longwave k-distribution data ... ' ! Read in fields from file if(nf90_open(trim(lw_gas_props_file), NF90_WRITE, ncid_lw) .eq. NF90_NOERR) then @@ -315,72 +314,72 @@ subroutine rrtmgp_lw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, lw_gas_pr ! Close status = nf90_close(ncid_lw) endif - endif +! endif - ! Broadcast arrays to all processors -#ifdef MPI - call MPI_BARRIER(mpicomm, ierr) - write (*,*) 'Broadcasting RRTMGP longwave k-distribution data ... ' - call MPI_BCAST(minor_limits_gpt_upper, size(minor_limits_gpt_upper), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(minor_limits_gpt_lower, size(minor_limits_gpt_lower), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(kminor_start_upper, size(kminor_start_upper), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(kminor_start_lower, size(kminor_start_lower), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(key_species, size(key_species), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(band2gpt, size(band2gpt), MPI_INTEGER, mpiroot, mpicomm, ierr) -#ifndef SINGLE_PREC - call MPI_BCAST(band_lims, size(band_lims), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(press_ref, size(press_ref), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(temp_ref, size(temp_ref), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(kminor_lower, size(kminor_lower), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(kminor_upper, size(kminor_upper), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(scaling_gas_lower, size(scaling_gas_lower), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(scaling_gas_upper, size(scaling_gas_upper), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(vmr_ref, size(vmr_ref), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(kmajor, size(kmajor), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(temp_ref_p, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(temp_ref_t, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(press_ref_trop, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(totplnk, size(totplnk), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(planck_frac, size(planck_frac), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -#else - call MPI_BCAST(band_lims, size(band_lims), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(press_ref, size(press_ref), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(temp_ref, size(temp_ref), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(kminor_lower, size(kminor_lower), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(kminor_upper, size(kminor_upper), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(scaling_gas_lower, size(scaling_gas_lower), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(scaling_gas_upper, size(scaling_gas_upper), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(vmr_ref, size(vmr_ref), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(kmajor, size(kmajor), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(temp_ref_p, 1, MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(temp_ref_t, 1, MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(press_ref_trop, 1, MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(totplnk, size(totplnk), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(planck_frac, size(planck_frac), MPI_REAL, mpiroot, mpicomm, ierr) -#endif - ! Character arrays - do ij=1,nabsorbers - call MPI_BCAST(gas_names(ij), len(gas_names(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) - enddo - do ij=1,nminorabsorbers - call MPI_BCAST(gas_minor(ij), len(gas_minor(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) - call MPI_BCAST(identifier_minor(ij), len(identifier_minor(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) - enddo - do ij=1,nminor_absorber_intervals_lower - call MPI_BCAST(minor_gases_lower(ij), len(minor_gases_lower(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) - enddo - do ij=1,nminor_absorber_intervals_upper - call MPI_BCAST(minor_gases_upper(ij), len(minor_gases_upper(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) - enddo - ! Logical arrays - ! - call MPI_BCAST(minor_scales_with_density_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(scale_by_complement_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(minor_scales_with_density_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(scale_by_complement_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, ierr) - call MPI_BARRIER(mpicomm, ierr) -#endif +! ! Broadcast arrays to all processors +!#ifdef MPI +! call MPI_BARRIER(mpicomm, ierr) +! write (*,*) 'Broadcasting RRTMGP longwave k-distribution data ... ' +! call MPI_BCAST(minor_limits_gpt_upper, size(minor_limits_gpt_upper), MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(minor_limits_gpt_lower, size(minor_limits_gpt_lower), MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(kminor_start_upper, size(kminor_start_upper), MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(kminor_start_lower, size(kminor_start_lower), MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(key_species, size(key_species), MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(band2gpt, size(band2gpt), MPI_INTEGER, mpiroot, mpicomm, ierr) +!#ifndef SINGLE_PREC +! call MPI_BCAST(band_lims, size(band_lims), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(press_ref, size(press_ref), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(temp_ref, size(temp_ref), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(kminor_lower, size(kminor_lower), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(kminor_upper, size(kminor_upper), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(scaling_gas_lower, size(scaling_gas_lower), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(scaling_gas_upper, size(scaling_gas_upper), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(vmr_ref, size(vmr_ref), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(kmajor, size(kmajor), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(temp_ref_p, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(temp_ref_t, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(press_ref_trop, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(totplnk, size(totplnk), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(planck_frac, size(planck_frac), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +!#else +! call MPI_BCAST(band_lims, size(band_lims), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(press_ref, size(press_ref), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(temp_ref, size(temp_ref), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(kminor_lower, size(kminor_lower), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(kminor_upper, size(kminor_upper), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(scaling_gas_lower, size(scaling_gas_lower), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(scaling_gas_upper, size(scaling_gas_upper), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(vmr_ref, size(vmr_ref), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(kmajor, size(kmajor), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(temp_ref_p, 1, MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(temp_ref_t, 1, MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(press_ref_trop, 1, MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(totplnk, size(totplnk), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(planck_frac, size(planck_frac), MPI_REAL, mpiroot, mpicomm, ierr) +!#endif +! ! Character arrays +! do ij=1,nabsorbers +! call MPI_BCAST(gas_names(ij), len(gas_names(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) +! enddo +! do ij=1,nminorabsorbers +! call MPI_BCAST(gas_minor(ij), len(gas_minor(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) +! call MPI_BCAST(identifier_minor(ij), len(identifier_minor(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) +! enddo +! do ij=1,nminor_absorber_intervals_lower +! call MPI_BCAST(minor_gases_lower(ij), len(minor_gases_lower(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) +! enddo +! do ij=1,nminor_absorber_intervals_upper +! call MPI_BCAST(minor_gases_upper(ij), len(minor_gases_upper(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) +! enddo +! ! Logical arrays +! ! +! call MPI_BCAST(minor_scales_with_density_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(scale_by_complement_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(minor_scales_with_density_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(scale_by_complement_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, ierr) +! call MPI_BARRIER(mpicomm, ierr) +!#endif ! Initialize gas concentrations and gas optics class with data do iGas=1,Model%nGases diff --git a/physics/rrtmgp_sw_cloud_optics.F90 b/physics/rrtmgp_sw_cloud_optics.F90 index 64b937b8d..2f09d7859 100644 --- a/physics/rrtmgp_sw_cloud_optics.F90 +++ b/physics/rrtmgp_sw_cloud_optics.F90 @@ -23,9 +23,9 @@ module rrtmgp_sw_cloud_optics subroutine rrtmgp_sw_cloud_optics_init(Model,mpicomm, mpirank, mpiroot, sw_cloud_props, & errmsg, errflg) use netcdf -#ifdef MPI - use mpi -#endif +!#ifdef MPI +! use mpi +!#endif ! Inputs type(GFS_control_type), intent(in) :: & @@ -91,9 +91,9 @@ subroutine rrtmgp_sw_cloud_optics_init(Model,mpicomm, mpirank, mpiroot, sw_cloud ! Local variables integer :: status,ncid_sw_clds,dimid,varID character(len=264) :: sw_cloud_props_file -#ifdef MPI - integer :: ierr -#endif +!#ifdef MPI +! integer :: ierr +!#endif ! Initialize errmsg = '' errflg = 0 @@ -104,7 +104,7 @@ subroutine rrtmgp_sw_cloud_optics_init(Model,mpicomm, mpirank, mpiroot, sw_cloud sw_cloud_props_file = trim(Model%rrtmgp_root)//trim(Model%sw_file_clouds) ! Read dimensions for k-distribution fields (only on master processor(0)) - if (mpirank .eq. mpiroot) then +! if (mpirank .eq. mpiroot) then if(nf90_open(trim(sw_cloud_props_file), NF90_WRITE, ncid_sw_clds) == NF90_NOERR) then status = nf90_inq_dimid(ncid_sw_clds, 'nband', dimid) status = nf90_inquire_dimension(ncid_sw_clds, dimid, len=nbandSWcldy_sw) @@ -131,27 +131,22 @@ subroutine rrtmgp_sw_cloud_optics_init(Model,mpicomm, mpirank, mpiroot, sw_cloud if (Model%rrtmgp_nrghice .gt. nrghice_sw) then errmsg = 'Number of RRTMGP ice-roughness categories requested in namelist file is not allowed' endif - endif - - ! Sync processes before broadcasting -#ifdef MPI - call MPI_BARRIER(mpicomm, ierr) -#endif +! endif - ! Broadcast dimensions to all processors -#ifdef MPI - if (Model%rrtmgp_cld_optics .eq. 1 .or. Model%rrtmgp_cld_optics .eq. 2) then - call MPI_BCAST(nbandSWcldy_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nrghice_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nsize_liq_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nsize_ice_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nsizereg_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(ncoeff_ext_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(ncoeff_ssa_g_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nbound_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(npairsSWcldy_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - endif -#endif +! ! Broadcast dimensions to all processors +!#ifdef MPI +! if (Model%rrtmgp_cld_optics .eq. 1 .or. Model%rrtmgp_cld_optics .eq. 2) then +! call MPI_BCAST(nbandSWcldy_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(nrghice_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(nsize_liq_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(nsize_ice_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(nsizereg_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(ncoeff_ext_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(ncoeff_ssa_g_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(nbound_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(npairsSWcldy_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! endif +!#endif if (Model%rrtmgp_cld_optics .eq. 1) then allocate(lut_extliq_sw(nsize_liq_sw, nBandSWcldy_sw)) @@ -179,7 +174,7 @@ subroutine rrtmgp_sw_cloud_optics_init(Model,mpicomm, mpirank, mpiroot, sw_cloud endif ! On master processor, allocate space, read in fields, broadcast to all processors - if (mpirank .eq. mpiroot) then +! if (mpirank .eq. mpiroot) then ! if (Model%rrtmgp_cld_optics .eq. 1) then write (*,*) 'Reading RRTMGP shortwave cloud data (LUT) ... ' @@ -260,80 +255,75 @@ subroutine rrtmgp_sw_cloud_optics_init(Model,mpicomm, mpirank, mpiroot, sw_cloud status = nf90_close(ncid_sw_clds) endif endif - endif - - ! Sync processes before broadcasting -#ifdef MPI - call MPI_BARRIER(mpicomm, ierr) -#endif + !endif ! Broadcast arrays to all processors -#ifdef MPI - if (Model%rrtmgp_cld_optics .eq. 1) then - write (*,*) 'Broadcasting RRTMGP shortwave cloud data (LUT) ... ' -#ifndef SINGLE_PREC - call MPI_BCAST(radliq_lwr_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(radliq_upr_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(radliq_fac_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(radice_lwr_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(radice_upr_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(radice_fac_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_extliq_sw, size(lut_extliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_ssaliq_sw, size(lut_ssaliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_asyliq_sw, size(lut_asyliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_extice_sw, size(lut_extice_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_ssaice_sw, size(lut_ssaice_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_asyice_sw, size(lut_asyice_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(band_lims_cldy_sw, size(band_lims_cldy_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -#else - call MPI_BCAST(radliq_lwr_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(radliq_upr_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(radliq_fac_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(radice_lwr_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(radice_upr_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(radice_fac_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_extliq_sw, size(lut_extliq_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_ssaliq_sw, size(lut_ssaliq_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_asyliq_sw, size(lut_asyliq_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_extice_sw, size(lut_extice_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_ssaice_sw, size(lut_ssaice_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_asyice_sw, size(lut_asyice_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(band_lims_cldy_sw, size(band_lims_cldy_sw), MPI_REAL, mpiroot, mpicomm, ierr) -#endif - endif - if (Model%rrtmgp_cld_optics .eq. 2) then - write (*,*) 'Broadcasting RRTMGP shortwave cloud data (PADE) ... ' -#ifndef SINGLE_PREC - call MPI_BCAST(pade_extliq_sw, size(pade_extliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_ssaliq_sw, size(pade_ssaliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_asyliq_sw, size(pade_asyliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_extice_sw, size(pade_extice_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_ssaice_sw, size(pade_ssaice_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_asyice_sw, size(pade_asyice_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_extliq_sw, size(pade_sizereg_extliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_ssaliq_sw, size(pade_sizereg_ssaliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_asyliq_sw, size(pade_sizereg_asyliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_extice_sw, size(pade_sizereg_extice_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_ssaice_sw, size(pade_sizereg_ssaice_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_asyice_sw, size(pade_sizereg_asyice_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(band_lims_cldy_sw, size(band_lims_cldy_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -#else - call MPI_BCAST(pade_extliq_sw, size(pade_extliq_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_ssaliq_sw, size(pade_ssaliq_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_asyliq_sw, size(pade_asyliq_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_extice_sw, size(pade_extice_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_ssaice_sw, size(pade_ssaice_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_asyice_sw, size(pade_asyice_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_extliq_sw, size(pade_sizereg_extliq_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_ssaliq_sw, size(pade_sizereg_ssaliq_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_asyliq_sw, size(pade_sizereg_asyliq_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_extice_sw, size(pade_sizereg_extice_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_ssaice_sw, size(pade_sizereg_ssaice_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_asyice_sw, size(pade_sizereg_asyice_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(band_lims_cldy_sw, size(band_lims_cldy_sw), MPI_REAL, mpiroot, mpicomm, ierr) -#endif - endif -#endif +!#ifdef MPI +! if (Model%rrtmgp_cld_optics .eq. 1) then +! write (*,*) 'Broadcasting RRTMGP shortwave cloud data (LUT) ... ' +!#ifndef SINGLE_PREC +! call MPI_BCAST(radliq_lwr_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(radliq_upr_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(radliq_fac_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(radice_lwr_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(radice_upr_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(radice_fac_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(lut_extliq_sw, size(lut_extliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(lut_ssaliq_sw, size(lut_ssaliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(lut_asyliq_sw, size(lut_asyliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(lut_extice_sw, size(lut_extice_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(lut_ssaice_sw, size(lut_ssaice_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(lut_asyice_sw, size(lut_asyice_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(band_lims_cldy_sw, size(band_lims_cldy_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +!#else +! call MPI_BCAST(radliq_lwr_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(radliq_upr_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(radliq_fac_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(radice_lwr_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(radice_upr_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(radice_fac_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(lut_extliq_sw, size(lut_extliq_sw), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(lut_ssaliq_sw, size(lut_ssaliq_sw), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(lut_asyliq_sw, size(lut_asyliq_sw), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(lut_extice_sw, size(lut_extice_sw), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(lut_ssaice_sw, size(lut_ssaice_sw), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(lut_asyice_sw, size(lut_asyice_sw), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(band_lims_cldy_sw, size(band_lims_cldy_sw), MPI_REAL, mpiroot, mpicomm, ierr) +!#endif +! endif +! if (Model%rrtmgp_cld_optics .eq. 2) then +! write (*,*) 'Broadcasting RRTMGP shortwave cloud data (PADE) ... ' +!#ifndef SINGLE_PREC +! call MPI_BCAST(pade_extliq_sw, size(pade_extliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(pade_ssaliq_sw, size(pade_ssaliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(pade_asyliq_sw, size(pade_asyliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(pade_extice_sw, size(pade_extice_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(pade_ssaice_sw, size(pade_ssaice_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(pade_asyice_sw, size(pade_asyice_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(pade_sizereg_extliq_sw, size(pade_sizereg_extliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(pade_sizereg_ssaliq_sw, size(pade_sizereg_ssaliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(pade_sizereg_asyliq_sw, size(pade_sizereg_asyliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(pade_sizereg_extice_sw, size(pade_sizereg_extice_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(pade_sizereg_ssaice_sw, size(pade_sizereg_ssaice_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(pade_sizereg_asyice_sw, size(pade_sizereg_asyice_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(band_lims_cldy_sw, size(band_lims_cldy_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +!#else +! call MPI_BCAST(pade_extliq_sw, size(pade_extliq_sw), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(pade_ssaliq_sw, size(pade_ssaliq_sw), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(pade_asyliq_sw, size(pade_asyliq_sw), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(pade_extice_sw, size(pade_extice_sw), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(pade_ssaice_sw, size(pade_ssaice_sw), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(pade_asyice_sw, size(pade_asyice_sw), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(pade_sizereg_extliq_sw, size(pade_sizereg_extliq_sw), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(pade_sizereg_ssaliq_sw, size(pade_sizereg_ssaliq_sw), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(pade_sizereg_asyliq_sw, size(pade_sizereg_asyliq_sw), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(pade_sizereg_extice_sw, size(pade_sizereg_extice_sw), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(pade_sizereg_ssaice_sw, size(pade_sizereg_ssaice_sw), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(pade_sizereg_asyice_sw, size(pade_sizereg_asyice_sw), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(band_lims_cldy_sw, size(band_lims_cldy_sw), MPI_REAL, mpiroot, mpicomm, ierr) +!#endif +! endif +!#endif ! Load tables data for RRTMGP cloud-optics if (Model%rrtmgp_cld_optics .eq. 1) then diff --git a/physics/rrtmgp_sw_gas_optics.F90 b/physics/rrtmgp_sw_gas_optics.F90 index 94d319517..d4db0d2d7 100644 --- a/physics/rrtmgp_sw_gas_optics.F90 +++ b/physics/rrtmgp_sw_gas_optics.F90 @@ -21,9 +21,9 @@ module rrtmgp_sw_gas_optics subroutine rrtmgp_sw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, sw_gas_props, & ipsdsw0, errmsg, errflg) use netcdf -#ifdef MPI - use mpi -#endif +!#ifdef MPI +! use mpi +!#endif ! Inputs type(GFS_control_type), intent(in) :: & @@ -108,9 +108,9 @@ subroutine rrtmgp_sw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, sw_gas_p integer :: status,ncid_sw,dimid,varID,iGas integer,dimension(:),allocatable :: temp1,temp2,temp3,temp4 character(len=264) :: sw_gas_props_file -#ifdef MPI - integer :: ierr -#endif +!#ifdef MPI +! integer :: ierr +!#endif ! Initialize errmsg = '' @@ -120,7 +120,7 @@ subroutine rrtmgp_sw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, sw_gas_p sw_gas_props_file = trim(Model%rrtmgp_root)//trim(Model%sw_file_gas) ! Read dimensions for k-distribution fields (only on master processor(0)) - if (mpirank .eq. mpiroot) then +! if (mpirank .eq. mpiroot) then if(nf90_open(trim(sw_gas_props_file), NF90_WRITE, ncid_sw) .eq. NF90_NOERR) then status = nf90_inq_dimid(ncid_sw, 'temperature', dimid) status = nf90_inquire_dimension(ncid_sw, dimid, len=ntemps_sw) @@ -152,26 +152,26 @@ subroutine rrtmgp_sw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, sw_gas_p status = nf90_inquire_dimension(ncid_sw, dimid, len=nminor_absorber_intervals_upper_sw) status = nf90_close(ncid_sw) endif - endif +! endif ! Broadcast dimensions to all processors -#ifdef MPI - call MPI_BARRIER(mpicomm, ierr) - call MPI_BCAST(ntemps_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(npress_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nabsorbers_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nminorabsorbers_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nextrabsorbers_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nmixingfracs_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nlayers_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nbnds_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(ngpts_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(npairs_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(ncontributors_lower_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(ncontributors_upper_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nminor_absorber_intervals_lower_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nminor_absorber_intervals_upper_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -#endif +!#ifdef MPI +! call MPI_BARRIER(mpicomm, ierr) +! call MPI_BCAST(ntemps_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(npress_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(nabsorbers_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(nminorabsorbers_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(nextrabsorbers_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(nmixingfracs_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(nlayers_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(nbnds_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(ngpts_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(npairs_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(ncontributors_lower_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(ncontributors_upper_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(nminor_absorber_intervals_lower_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(nminor_absorber_intervals_upper_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +!#endif ! Allocate space for arrays allocate(gas_names_sw(nabsorbers_sw)) @@ -207,7 +207,7 @@ subroutine rrtmgp_sw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, sw_gas_p allocate(temp4(nminor_absorber_intervals_upper_sw)) ! On master processor, read in fields, broadcast to all processors - if (mpirank .eq. mpiroot) then +! if (mpirank .eq. mpiroot) then write (*,*) 'Reading RRTMGP shortwave k-distribution data ... ' ! Read in fields from file if(nf90_open(trim(sw_gas_props_file), NF90_WRITE, ncid_sw) .eq. NF90_NOERR) then @@ -313,72 +313,72 @@ subroutine rrtmgp_sw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, sw_gas_p ! Close status = nf90_close(ncid_sw) endif - endif +! endif ! Broadcast arrays to all processors -#ifdef MPI - call MPI_BARRIER(mpicomm, ierr) - write (*,*) 'Broadcasting RRTMGP shortwave k-distribution data ... ' - call MPI_BCAST(minor_limits_gpt_upper_sw, size(minor_limits_gpt_upper_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(minor_limits_gpt_lower_sw, size(minor_limits_gpt_lower_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(kminor_start_upper_sw, size(kminor_start_upper_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(kminor_start_lower_sw, size(kminor_start_lower_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(key_species_sw, size(key_species_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(band2gpt_sw, size(band2gpt_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) -#ifndef SINGLE_PREC - call MPI_BCAST(band_lims_sw, size(band_lims_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(press_ref_sw, size(press_ref_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(temp_ref_sw, size(temp_ref_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(kminor_lower_sw, size(kminor_lower_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(kminor_upper_sw, size(kminor_upper_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(scaling_gas_lower_sw, size(scaling_gas_lower_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(scaling_gas_upper_sw, size(scaling_gas_upper_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(vmr_ref_sw, size(vmr_ref_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(kmajor_sw, size(kmajor_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(temp_ref_p_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(temp_ref_t_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(press_ref_trop_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(solar_source_sw, size(solar_source_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(rayl_lower_sw, size(rayl_lower_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(rayl_upper_sw, size(rayl_upper_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -#else - call MPI_BCAST(band_lims_sw, size(band_lims_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(press_ref_sw, size(press_ref_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(temp_ref_sw, size(temp_ref_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(kminor_lower_sw, size(kminor_lower_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(kminor_upper_sw, size(kminor_upper_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(scaling_gas_lower_sw, size(scaling_gas_lower_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(scaling_gas_upper_sw, size(scaling_gas_upper_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(vmr_ref_sw, size(vmr_ref_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(kmajor_sw, size(kmajor_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(temp_ref_p_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(temp_ref_t_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(press_ref_trop_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(solar_source_sw, size(solar_source_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(rayl_lower_sw, size(rayl_lower_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(rayl_upper_sw, size(rayl_upper_sw), MPI_REAL, mpiroot, mpicomm, ierr) -#endif - ! Character arrays - do ij=1,nabsorbers_sw - call MPI_BCAST(gas_names_sw(ij), len(gas_names_sw(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) - enddo - do ij=1,nminorabsorbers_sw - call MPI_BCAST(gas_minor_sw(ij), len(gas_minor_sw(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) - call MPI_BCAST(identifier_minor_sw(ij), len(identifier_minor_sw(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) - enddo - do ij=1,nminor_absorber_intervals_lower_sw - call MPI_BCAST(minor_gases_lower_sw(ij), len(minor_gases_lower_sw(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) - enddo - do ij=1,nminor_absorber_intervals_upper_sw - call MPI_BCAST(minor_gases_upper_sw(ij), len(minor_gases_upper_sw(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) - enddo - - ! Logical arrays - call MPI_BCAST(minor_scales_with_density_lower_sw, nminor_absorber_intervals_lower_sw, MPI_LOGICAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(scale_by_complement_lower_sw, nminor_absorber_intervals_lower_sw, MPI_LOGICAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(minor_scales_with_density_upper_sw, nminor_absorber_intervals_upper_sw, MPI_LOGICAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(scale_by_complement_upper_sw, nminor_absorber_intervals_upper_sw, MPI_LOGICAL, mpiroot, mpicomm, ierr) -#endif +!#ifdef MPI +! call MPI_BARRIER(mpicomm, ierr) +! write (*,*) 'Broadcasting RRTMGP shortwave k-distribution data ... ' +! call MPI_BCAST(minor_limits_gpt_upper_sw, size(minor_limits_gpt_upper_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(minor_limits_gpt_lower_sw, size(minor_limits_gpt_lower_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(kminor_start_upper_sw, size(kminor_start_upper_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(kminor_start_lower_sw, size(kminor_start_lower_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(key_species_sw, size(key_species_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(band2gpt_sw, size(band2gpt_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) +!#ifndef SINGLE_PREC +! call MPI_BCAST(band_lims_sw, size(band_lims_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(press_ref_sw, size(press_ref_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(temp_ref_sw, size(temp_ref_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(kminor_lower_sw, size(kminor_lower_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(kminor_upper_sw, size(kminor_upper_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(scaling_gas_lower_sw, size(scaling_gas_lower_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(scaling_gas_upper_sw, size(scaling_gas_upper_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(vmr_ref_sw, size(vmr_ref_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(kmajor_sw, size(kmajor_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(temp_ref_p_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(temp_ref_t_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(press_ref_trop_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(solar_source_sw, size(solar_source_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(rayl_lower_sw, size(rayl_lower_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(rayl_upper_sw, size(rayl_upper_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +!#else +! call MPI_BCAST(band_lims_sw, size(band_lims_sw), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(press_ref_sw, size(press_ref_sw), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(temp_ref_sw, size(temp_ref_sw), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(kminor_lower_sw, size(kminor_lower_sw), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(kminor_upper_sw, size(kminor_upper_sw), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(scaling_gas_lower_sw, size(scaling_gas_lower_sw), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(scaling_gas_upper_sw, size(scaling_gas_upper_sw), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(vmr_ref_sw, size(vmr_ref_sw), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(kmajor_sw, size(kmajor_sw), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(temp_ref_p_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(temp_ref_t_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(press_ref_trop_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(solar_source_sw, size(solar_source_sw), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(rayl_lower_sw, size(rayl_lower_sw), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(rayl_upper_sw, size(rayl_upper_sw), MPI_REAL, mpiroot, mpicomm, ierr) +!#endif +! ! Character arrays +! do ij=1,nabsorbers_sw +! call MPI_BCAST(gas_names_sw(ij), len(gas_names_sw(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) +! enddo +! do ij=1,nminorabsorbers_sw +! call MPI_BCAST(gas_minor_sw(ij), len(gas_minor_sw(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) +! call MPI_BCAST(identifier_minor_sw(ij), len(identifier_minor_sw(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) +! enddo +! do ij=1,nminor_absorber_intervals_lower_sw +! call MPI_BCAST(minor_gases_lower_sw(ij), len(minor_gases_lower_sw(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) +! enddo +! do ij=1,nminor_absorber_intervals_upper_sw +! call MPI_BCAST(minor_gases_upper_sw(ij), len(minor_gases_upper_sw(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) +! enddo +! +! ! Logical arrays +! call MPI_BCAST(minor_scales_with_density_lower_sw, nminor_absorber_intervals_lower_sw, MPI_LOGICAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(scale_by_complement_lower_sw, nminor_absorber_intervals_lower_sw, MPI_LOGICAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(minor_scales_with_density_upper_sw, nminor_absorber_intervals_upper_sw, MPI_LOGICAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(scale_by_complement_upper_sw, nminor_absorber_intervals_upper_sw, MPI_LOGICAL, mpiroot, mpicomm, ierr) +!#endif ! Initialize gas concentrations and gas optics class with data do iGas=1,Model%nGases From ac6d7a5cc33ecc8e04727ccc54a519649e6ce991 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Wed, 11 Dec 2019 10:38:43 -0700 Subject: [PATCH 086/167] Moved some interstitial firelds out of GFS_interstitial_type into flat fields. --- physics/GFS_rrtmgp_lw_pre.F90 | 9 +++--- physics/GFS_rrtmgp_lw_pre.meta | 17 ++++++----- physics/GFS_rrtmgp_sw_post.F90 | 27 +++++++++-------- physics/GFS_rrtmgp_sw_post.meta | 44 ++++++++++++++++++++++----- physics/GFS_rrtmgp_sw_pre.F90 | 22 ++++++++------ physics/GFS_rrtmgp_sw_pre.meta | 44 ++++++++++++++++++++++----- physics/rrtmgp_lw_rte.F90 | 29 +++++++++--------- physics/rrtmgp_lw_rte.meta | 17 ++++++----- physics/rrtmgp_sw_rte.F90 | 51 +++++++++++++++++-------------- physics/rrtmgp_sw_rte.meta | 53 ++++++++++++++++++++++++++++----- 10 files changed, 210 insertions(+), 103 deletions(-) diff --git a/physics/GFS_rrtmgp_lw_pre.F90 b/physics/GFS_rrtmgp_lw_pre.F90 index aef812246..04c75ba5f 100644 --- a/physics/GFS_rrtmgp_lw_pre.F90 +++ b/physics/GFS_rrtmgp_lw_pre.F90 @@ -7,7 +7,6 @@ module GFS_rrtmgp_lw_pre GFS_sfcprop_type, & ! Surface fields GFS_grid_type, & ! Grid and interpolation related data GFS_statein_type, & ! - GFS_Interstitial_type, & ! GFS_radtend_type ! Radiation tendencies needed in physics use module_radiation_surface, only: & setemis ! Routine to compute surface-emissivity @@ -36,7 +35,7 @@ end subroutine GFS_rrtmgp_lw_pre_init !! \htmlinclude GFS_rrtmgp_lw_pre.html !! subroutine GFS_rrtmgp_lw_pre_run (Model, Grid, Sfcprop, Statein, ncol, p_lay, p_lev, & - tv_lay, relhum, tracer, lw_gas_props, Radtend, Interstitial, aerosolslw, aerodp, & + tv_lay, relhum, tracer, lw_gas_props, Radtend, aerosolslw, aerodp, sfc_emiss_byband, & errmsg, errflg) ! Inputs @@ -64,12 +63,12 @@ subroutine GFS_rrtmgp_lw_pre_run (Model, Grid, Sfcprop, Statein, ncol, p_lay, ! Outputs type(GFS_radtend_type), intent(inout) :: & Radtend ! DDT: FV3-GFS radiation tendencies - type(GFS_interstitial_type), intent(inout) :: & - Interstitial ! DDT: FV3-GFS Interstitial arrays real(kind_phys), dimension(ncol,Model%levs,lw_gas_props%get_nband(),NF_AELW), intent(out) ::& aerosolslw ! Aerosol radiative properties in each SW band. real(kind_phys), dimension(ncol,NSPC1), intent(inout) :: & aerodp ! Vertical integrated optical depth for various aerosol species + real(kind_phys), dimension(lw_gas_props%get_nband(),ncol), intent(out) :: & + sfc_emiss_byband ! Surface emissivity in each band character(len=*), intent(out) :: & errmsg ! Error message integer, intent(out) :: & @@ -93,7 +92,7 @@ subroutine GFS_rrtmgp_lw_pre_run (Model, Grid, Sfcprop, Statein, ncol, p_lay, ! Assign same emissivity to all bands do iBand=1,lw_gas_props%get_nband() - Interstitial%sfc_emiss_byband(iBand,1:NCOL) = Radtend%semis(1:NCOL) + sfc_emiss_byband(iBand,1:NCOL) = Radtend%semis(1:NCOL) enddo ! ####################################################################################### diff --git a/physics/GFS_rrtmgp_lw_pre.meta b/physics/GFS_rrtmgp_lw_pre.meta index 2ea7c6e54..aed2b1a6c 100644 --- a/physics/GFS_rrtmgp_lw_pre.meta +++ b/physics/GFS_rrtmgp_lw_pre.meta @@ -9,14 +9,6 @@ type = GFS_control_type intent = in optional = F -[Interstitial] - standard_name = GFS_interstitial_type_instance - long_name = derived type GFS_interstitial_type in FV3 - units = DDT - dimensions = () - type = GFS_interstitial_type - intent = inout - optional = F [Grid] standard_name = GFS_grid_type_instance long_name = instance of derived type GFS_grid_type @@ -128,6 +120,15 @@ kind = kind_phys intent = out optional = F +[sfc_emiss_byband] + standard_name = surface_emissivity_in_each_RRTMGP_LW_band + long_name = surface emissivity in each RRTMGP LW band + units = none + dimensions = (number_of_lw_bands_rrtmgp,horizontal_dimension) + type = real + kind = kind_phys + intent = out + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP diff --git a/physics/GFS_rrtmgp_sw_post.F90 b/physics/GFS_rrtmgp_sw_post.F90 index 72e841b07..7d4e6ba6b 100644 --- a/physics/GFS_rrtmgp_sw_post.F90 +++ b/physics/GFS_rrtmgp_sw_post.F90 @@ -1,8 +1,7 @@ module GFS_rrtmgp_sw_post use machine, only: kind_phys use GFS_typedefs, only: GFS_coupling_type, GFS_control_type, GFS_grid_type, & - GFS_radtend_type, GFS_diag_type, GFS_statein_type, & - GFS_interstitial_type + GFS_radtend_type, GFS_diag_type, GFS_statein_type use module_radiation_aerosols, only: NSPC1 use module_radsw_parameters, only: topfsw_type, sfcfsw_type, profsw_type, cmpfsw_type use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp @@ -27,16 +26,15 @@ end subroutine GFS_rrtmgp_sw_post_init !> \section arg_table_GFS_rrtmgp_sw_post_run !! \htmlinclude GFS_rrtmgp_sw_post.html !! - subroutine GFS_rrtmgp_sw_post_run (Model, Interstitial, Grid, Diag, Radtend, Coupling, & - Statein, scmpsw, nCol, p_lev, sw_gas_props, nday, idxday, fluxswUP_allsky, & - fluxswDOWN_allsky, fluxswUP_clrsky, fluxswDOWN_clrsky, raddt, aerodp, cldsa, mbota, & - mtopa, cld_frac, cldtausw, flxprf_sw, hsw0, errmsg, errflg) + subroutine GFS_rrtmgp_sw_post_run (Model, Grid, Diag, Radtend, Coupling, Statein, scmpsw, & + nCol, p_lev, sfc_alb_nir_dir, sfc_alb_nir_dif, sfc_alb_uvvis_dir, sfc_alb_uvvis_dif, & + sw_gas_props, nday, idxday, fluxswUP_allsky, fluxswDOWN_allsky, fluxswUP_clrsky, & + fluxswDOWN_clrsky, raddt, aerodp, cldsa, mbota, mtopa, cld_frac, cldtausw, flxprf_sw,& + hsw0, errmsg, errflg) ! Inputs type(GFS_control_type), intent(in) :: & Model ! Fortran DDT: FV3-GFS model control parameters - type(GFS_Interstitial_type), intent(in) :: & - Interstitial ! Fortran DDT: FV3-GFS interstitial arrays type(GFS_grid_type), intent(in) :: & Grid ! Fortran DDT: FV3-GFS grid and interpolation related data type(GFS_coupling_type), intent(inout) :: & @@ -56,6 +54,11 @@ subroutine GFS_rrtmgp_sw_post_run (Model, Interstitial, Grid, Diag, Radtend, Cou sw_gas_props ! DDT containing SW spectral information real(kind_phys), dimension(nCol, Model%levs+1), intent(in) :: & p_lev ! Pressure @ model layer-interfaces (hPa) + real(kind_phys), dimension(sw_gas_props%get_nband(),ncol), intent(in) :: & + sfc_alb_nir_dir, & ! Surface albedo (direct) + sfc_alb_nir_dif, & ! Surface albedo (diffuse) + sfc_alb_uvvis_dir, & ! Surface albedo (direct) + sfc_alb_uvvis_dif ! Surface albedo (diffuse) real(kind_phys), dimension(nCol, Model%levs+1), intent(in) :: & fluxswUP_allsky, & ! SW All-sky flux (W/m2) fluxswDOWN_allsky, & ! SW All-sky flux (W/m2) @@ -190,10 +193,10 @@ subroutine GFS_rrtmgp_sw_post_run (Model, Interstitial, Grid, Diag, Radtend, Cou Coupling%visbmdi(i) = scmpsw(i)%visbm Coupling%visdfdi(i) = scmpsw(i)%visdf - Coupling%nirbmui(i) = scmpsw(i)%nirbm * Interstitial%sfc_alb_nir_dir(1,i) - Coupling%nirdfui(i) = scmpsw(i)%nirdf * Interstitial%sfc_alb_nir_dif(1,i) - Coupling%visbmui(i) = scmpsw(i)%visbm * Interstitial%sfc_alb_uvvis_dir(1,i) - Coupling%visdfui(i) = scmpsw(i)%visdf * Interstitial%sfc_alb_uvvis_dif(1,i) + Coupling%nirbmui(i) = scmpsw(i)%nirbm * sfc_alb_nir_dir(1,i) + Coupling%nirdfui(i) = scmpsw(i)%nirdf * sfc_alb_nir_dif(1,i) + Coupling%visbmui(i) = scmpsw(i)%visbm * sfc_alb_uvvis_dir(1,i) + Coupling%visdfui(i) = scmpsw(i)%visdf * sfc_alb_uvvis_dif(1,i) enddo else ! if_nday_block ! ####################################################################################### diff --git a/physics/GFS_rrtmgp_sw_post.meta b/physics/GFS_rrtmgp_sw_post.meta index bf71798bd..a933cba89 100644 --- a/physics/GFS_rrtmgp_sw_post.meta +++ b/physics/GFS_rrtmgp_sw_post.meta @@ -9,14 +9,6 @@ type = GFS_control_type intent = in optional = F -[Interstitial] - standard_name = GFS_interstitial_type_instance - long_name = derived type GFS_interstitial_type in FV3 - units = DDT - dimensions = () - type = GFS_interstitial_type - intent = in - optional = F [Grid] standard_name = GFS_grid_type_instance long_name = instance of derived type GFS_grid_type @@ -82,6 +74,42 @@ kind = kind_phys intent = in optional = F +[sfc_alb_nir_dir] + standard_name = surface_albedo_nearIR_direct + long_name = near-IR (direct) surface albedo (sfc_alb_nir_dir) + units = none + dimensions = (number_of_sw_bands_rrtmgp,horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[sfc_alb_nir_dif] + standard_name = surface_albedo_nearIR_diffuse + long_name = near-IR (diffuse) surface albedo (sfc_alb_nir_dif) + units = none + dimensions = (number_of_sw_bands_rrtmgp,horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[sfc_alb_uvvis_dir] + standard_name = surface_albedo_uvvis_dir + long_name = UVVIS (direct) surface albedo (sfc_alb_uvvis_dir) + units = none + dimensions = (number_of_sw_bands_rrtmgp,horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[sfc_alb_uvvis_dif] + standard_name = surface_albedo_uvvis_dif + long_name = UVVIS (diffuse) surface albedo (sfc_alb_uvvis_dif) + units = none + dimensions = (number_of_sw_bands_rrtmgp,horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F [nday] standard_name = daytime_points_dimension long_name = daytime points dimension diff --git a/physics/GFS_rrtmgp_sw_pre.F90 b/physics/GFS_rrtmgp_sw_pre.F90 index e20f8224f..613322bf7 100644 --- a/physics/GFS_rrtmgp_sw_pre.F90 +++ b/physics/GFS_rrtmgp_sw_pre.F90 @@ -42,15 +42,14 @@ end subroutine GFS_rrtmgp_sw_pre_init !> \section arg_table_GFS_rrtmgp_sw_pre_run !! \htmlinclude GFS_rrtmgp_sw_pre.html !! - subroutine GFS_rrtmgp_sw_pre_run(Model, Interstitial, Grid, Sfcprop, Statein, ncol, p_lay,& - p_lev, tv_lay, relhum, tracer, sw_gas_props, nday, idxday, alb1d, RadTend, & - Coupling, aerosolssw, aerodp, errmsg, errflg) + subroutine GFS_rrtmgp_sw_pre_run(Model, Grid, Sfcprop, Statein, ncol, p_lay, p_lev, & + tv_lay, relhum, tracer, sw_gas_props, nday, idxday, alb1d, sfc_alb_nir_dir, & + sfc_alb_nir_dif, sfc_alb_uvvis_dir, sfc_alb_uvvis_dif, RadTend, Coupling, aerosolssw,& + aerodp, errmsg, errflg) ! Inputs type(GFS_control_type), intent(in) :: & Model ! DDT: FV3-GFS model control parameters - type(GFS_Interstitial_type),intent(inout) :: & - Interstitial type(GFS_grid_type), intent(in) :: & Grid ! DDT: FV3-GFS grid and interpolation related data type(GFS_sfcprop_type), intent(in) :: & @@ -77,6 +76,11 @@ subroutine GFS_rrtmgp_sw_pre_run(Model, Interstitial, Grid, Sfcprop, Statein, nc idxday ! Indices for daylit points real(kind_phys), dimension(ncol), intent(out) :: & alb1d ! Surface albedo pertubation + real(kind_phys), dimension(sw_gas_props%get_nband(),ncol), intent(out) :: & + sfc_alb_nir_dir, & ! Surface albedo (direct) + sfc_alb_nir_dif, & ! Surface albedo (diffuse) + sfc_alb_uvvis_dir, & ! Surface albedo (direct) + sfc_alb_uvvis_dif ! Surface albedo (diffuse) type(GFS_radtend_type), intent(inout) :: & Radtend ! DDT: FV3-GFS radiation tendencies type(GFS_coupling_type), intent(inout) :: & @@ -149,10 +153,10 @@ subroutine GFS_rrtmgp_sw_pre_run(Model, Interstitial, Grid, Sfcprop, Statein, nc ! Spread across all SW bands do iBand=1,sw_gas_props%get_nband() - Interstitial%sfc_alb_nir_dir(iBand,1:NCOL) = sfcalb(1:NCOL,1) - Interstitial%sfc_alb_nir_dif(iBand,1:NCOL) = sfcalb(1:NCOL,2) - Interstitial%sfc_alb_uvvis_dir(iBand,1:NCOL) = sfcalb(1:NCOL,3) - Interstitial%sfc_alb_uvvis_dif(iBand,1:NCOL) = sfcalb(1:NCOL,4) + sfc_alb_nir_dir(iBand,1:NCOL) = sfcalb(1:NCOL,1) + sfc_alb_nir_dif(iBand,1:NCOL) = sfcalb(1:NCOL,2) + sfc_alb_uvvis_dir(iBand,1:NCOL) = sfcalb(1:NCOL,3) + sfc_alb_uvvis_dif(iBand,1:NCOL) = sfcalb(1:NCOL,4) enddo ! ####################################################################################### diff --git a/physics/GFS_rrtmgp_sw_pre.meta b/physics/GFS_rrtmgp_sw_pre.meta index 91c6a8670..c377abe9d 100644 --- a/physics/GFS_rrtmgp_sw_pre.meta +++ b/physics/GFS_rrtmgp_sw_pre.meta @@ -9,14 +9,6 @@ type = GFS_control_type intent = in optional = F -[Interstitial] - standard_name = GFS_interstitial_type_instance - long_name = derived type GFS_interstitial_type in FV3 - units = DDT - dimensions = () - type = GFS_interstitial_type - intent = inout - optional = F [Grid] standard_name = GFS_grid_type_instance long_name = instance of derived type GFS_grid_type @@ -127,6 +119,42 @@ kind = kind_phys intent = out optional = F +[sfc_alb_nir_dir] + standard_name = surface_albedo_nearIR_direct + long_name = near-IR (direct) surface albedo (sfc_alb_nir_dir) + units = none + dimensions = (number_of_sw_bands_rrtmgp,horizontal_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[sfc_alb_nir_dif] + standard_name = surface_albedo_nearIR_diffuse + long_name = near-IR (diffuse) surface albedo (sfc_alb_nir_dif) + units = none + dimensions = (number_of_sw_bands_rrtmgp,horizontal_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[sfc_alb_uvvis_dir] + standard_name = surface_albedo_uvvis_dir + long_name = UVVIS (direct) surface albedo (sfc_alb_uvvis_dir) + units = none + dimensions = (number_of_sw_bands_rrtmgp,horizontal_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[sfc_alb_uvvis_dif] + standard_name = surface_albedo_uvvis_dif + long_name = UVVIS (diffuse) surface albedo (sfc_alb_uvvis_dif) + units = none + dimensions = (number_of_sw_bands_rrtmgp,horizontal_dimension) + type = real + kind = kind_phys + intent = out + optional = F [nday] standard_name = daytime_points_dimension long_name = daytime points dimension diff --git a/physics/rrtmgp_lw_rte.F90 b/physics/rrtmgp_lw_rte.F90 index 7265da45b..51d18ce4b 100644 --- a/physics/rrtmgp_lw_rte.F90 +++ b/physics/rrtmgp_lw_rte.F90 @@ -2,7 +2,7 @@ ! ########################################################################################### module rrtmgp_lw_rte use machine, only: kind_phys - use GFS_typedefs, only: GFS_control_type, GFS_interstitial_type, GFS_statein_type + use GFS_typedefs, only: GFS_control_type, GFS_statein_type use mo_rte_kind, only: wl use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp use mo_cloud_optics, only: ty_cloud_optics @@ -27,15 +27,14 @@ end subroutine rrtmgp_lw_rte_init !! \section arg_table_rrtmgp_lw_rte_run !! \htmlinclude rrtmgp_lw_rte.html !! - subroutine rrtmgp_lw_rte_run(Model, Statein, Interstitial, ncol, lw_gas_props, p_lay, t_lay, p_lev, & - skt, sources, lw_optical_props_clrsky, lw_optical_props_clouds, lw_optical_props_aerosol, lslwr,& - fluxlwUP_allsky, fluxlwDOWN_allsky, fluxlwUP_clrsky, fluxlwDOWN_clrsky, hlw0, hlwb, errmsg, errflg) + subroutine rrtmgp_lw_rte_run(Model, Statein, ncol, lw_gas_props, p_lay, t_lay, p_lev, skt,& + sfc_emiss_byband, sources, lw_optical_props_clrsky, lw_optical_props_clouds, & + lw_optical_props_aerosol, lslwr, fluxlwUP_allsky, fluxlwDOWN_allsky, fluxlwUP_clrsky,& + fluxlwDOWN_clrsky, hlw0, hlwb, errmsg, errflg) ! Inputs type(GFS_control_type), intent(in) :: & Model ! Fortran DDT containing FV3-GFS model control parameters - type(GFS_Interstitial_type), intent(in) :: & - Interstitial ! Fortran DDT containing FV3-GFS radiation tendencies type(GFS_statein_type), intent(in) :: & Statein ! Fortran DDT containing FV3-GFS prognostic state data in from dycore integer, intent(in) :: & @@ -58,6 +57,8 @@ subroutine rrtmgp_lw_rte_run(Model, Statein, Interstitial, ncol, lw_gas_props, p sources logical, intent(in) :: & lslwr ! Flag to calculate LW irradiances + real(kind_phys), dimension(lw_gas_props%get_nband(),ncol), intent(in) :: & + sfc_emiss_byband ! Surface emissivity in each band ! Outputs character(len=*), intent(out) :: & @@ -114,10 +115,10 @@ subroutine rrtmgp_lw_rte_run(Model, Statein, Interstitial, ncol, lw_gas_props, p call check_error_msg('rrtmgp_lw_rte_run',lw_optical_props_aerosol%increment(lw_optical_props_clrsky)) if (l_ClrSky_HR) then call check_error_msg('rrtmgp_lw_rte_run',rte_lw( & - lw_optical_props_clrsky, & ! IN - optical-properties - top_at_1, & ! IN - veritcal ordering flag - sources, & ! IN - source function - Interstitial%sfc_emiss_byband, & ! IN - surface emissivity in each LW band + lw_optical_props_clrsky, & ! IN - optical-properties + top_at_1, & ! IN - veritcal ordering flag + sources, & ! IN - source function + sfc_emiss_byband, & ! IN - surface emissivity in each LW band flux_clrsky)) ! Store fluxes fluxlwUP_clrsky = sum(flux_clrsky%bnd_flux_up,dim=3) @@ -128,10 +129,10 @@ subroutine rrtmgp_lw_rte_run(Model, Statein, Interstitial, ncol, lw_gas_props, p ! Clear-sky fluxes are (gas+aerosol)+clouds call check_error_msg('rrtmgp_lw_rte_run',lw_optical_props_clouds%increment(lw_optical_props_clrsky)) call check_error_msg('rrtmgp_lw_rte_run',rte_lw( & - lw_optical_props_clrsky, & ! IN - optical-properties - top_at_1, & ! IN - veritcal ordering flag - sources, & ! IN - source function - Interstitial%sfc_emiss_byband, & ! IN - surface emissivity in each LW band + lw_optical_props_clrsky, & ! IN - optical-properties + top_at_1, & ! IN - veritcal ordering flag + sources, & ! IN - source function + sfc_emiss_byband, & ! IN - surface emissivity in each LW band flux_allsky)) ! Store fluxes fluxlwUP_allsky = sum(flux_allsky%bnd_flux_up,dim=3) diff --git a/physics/rrtmgp_lw_rte.meta b/physics/rrtmgp_lw_rte.meta index d60ed545b..afd31d38c 100644 --- a/physics/rrtmgp_lw_rte.meta +++ b/physics/rrtmgp_lw_rte.meta @@ -9,14 +9,6 @@ type = GFS_control_type intent = in optional = F -[Interstitial] - standard_name = GFS_interstitial_type_instance - long_name = derived type GFS_interstitial_type in FV3 - units = DDT - dimensions = () - type = GFS_interstitial_type - intent = in - optional = F [Statein] standard_name = GFS_statein_type_instance long_name = instance of derived type GFS_statein_type @@ -69,6 +61,15 @@ kind = kind_phys intent = in optional = F +[sfc_emiss_byband] + standard_name = surface_emissivity_in_each_RRTMGP_LW_band + long_name = surface emissivity in each RRTMGP LW band + units = none + dimensions = (number_of_lw_bands_rrtmgp,horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F [lw_gas_props] standard_name = coefficients_for_lw_gas_optics long_name = DDT containing spectral information for RRTMGP LW radiation scheme diff --git a/physics/rrtmgp_sw_rte.F90 b/physics/rrtmgp_sw_rte.F90 index 426826fb7..a88f4eda9 100644 --- a/physics/rrtmgp_sw_rte.F90 +++ b/physics/rrtmgp_sw_rte.F90 @@ -1,6 +1,6 @@ module rrtmgp_sw_rte use machine, only: kind_phys - use GFS_typedefs, only: GFS_control_type, GFS_radtend_type, GFS_statein_type, GFS_interstitial_type + use GFS_typedefs, only: GFS_control_type, GFS_radtend_type, GFS_statein_type use mo_rte_kind, only: wl use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp use mo_cloud_optics, only: ty_cloud_optics @@ -27,18 +27,16 @@ end subroutine rrtmgp_sw_rte_init !! \section arg_table_rrtmgp_sw_rte_run !! \htmlinclude rrtmgp_sw_rte.html !! - subroutine rrtmgp_sw_rte_run(Model, Interstitial, Radtend, Statein, ncol, sw_gas_props, & - p_lay, t_lay, p_lev, gas_concentrations, sw_optical_props_clrsky, & - sw_optical_props_clouds, sw_optical_props_aerosol, lsswr, nday, idxday, hsw0, hswb, & - scmpsw, fluxswUP_allsky, fluxswDOWN_allsky, fluxswUP_clrsky, fluxswDOWN_clrsky, & - errmsg, errflg) + subroutine rrtmgp_sw_rte_run(Model, Radtend, Statein, ncol, sw_gas_props, p_lay, t_lay, & + p_lev, gas_concentrations, sw_optical_props_clrsky, sfc_alb_nir_dir, sfc_alb_nir_dif,& + sfc_alb_uvvis_dir, sfc_alb_uvvis_dif, toa_src_sw, sw_optical_props_clouds, & + sw_optical_props_aerosol, lsswr, nday, idxday, hsw0, hswb, scmpsw, fluxswUP_allsky, & + fluxswDOWN_allsky, fluxswUP_clrsky, fluxswDOWN_clrsky, errmsg, errflg) ! Inputs type(GFS_control_type), intent(in) :: & Model - type(GFS_interstitial_type), intent(in) :: & - Interstitial - type(GFS_radtend_type), intent(in) :: & + type(GFS_radtend_type), intent(in) :: & Radtend type(GFS_statein_type), intent(in) :: & Statein ! DDT: FV3-GFS prognostic state data in from dycore @@ -54,6 +52,13 @@ subroutine rrtmgp_sw_rte_run(Model, Interstitial, Radtend, Statein, ncol, sw_gas p_lev ! Pressure @ model layer-interfaces (Pa) type(ty_gas_optics_rrtmgp),intent(in) :: & sw_gas_props ! RRTMGP DDT: SW spectral information + real(kind_phys), dimension(sw_gas_props%get_nband(),ncol), intent(in) :: & + sfc_alb_nir_dir, & ! Surface albedo (direct) + sfc_alb_nir_dif, & ! Surface albedo (diffuse) + sfc_alb_uvvis_dir, & ! Surface albedo (direct) + sfc_alb_uvvis_dif ! Surface albedo (diffuse) + real(kind_phys), dimension(ncol,sw_gas_props%get_ngpt()), intent(in) :: & + toa_src_sw ! TOA incident spectral flux (W/m2) type(ty_optical_props_2str),intent(inout) :: & sw_optical_props_clrsky, & ! RRTMGP DDT: longwave clear-sky radiative properties sw_optical_props_clouds, & ! RRTMGP DDT: longwave cloud radiative properties @@ -156,13 +161,13 @@ subroutine rrtmgp_sw_rte_run(Model, Interstitial, Radtend, Statein, ncol, sw_gas call check_error_msg('rrtmgp_sw_rte_run',sw_optical_props_clrsky%delta_scale()) if (l_ClrSky_HR) then call check_error_msg('rrtmgp_sw_rte_run',rte_sw( & - sw_optical_props_clrsky, & ! IN - optical-properties - top_at_1, & ! IN - veritcal ordering flag - Radtend%coszen(idxday(1:nday)), & ! IN - Cosine of solar zenith angle - Interstitial%toa_src_sw(idxday(1:nday),:), & ! IN - incident solar flux at TOA - Interstitial%sfc_alb_nir_dir(:,idxday(1:nday)), & ! IN - Shortwave surface albedo (direct) - Interstitial%sfc_alb_nir_dif(:,idxday(1:nday)), & ! IN - Shortwave surface albedo (diffuse) - flux_clrsky)) ! OUT - Fluxes, clear-sky, 3D (nCol,Model%levs,nBand) + sw_optical_props_clrsky, & ! IN - optical-properties + top_at_1, & ! IN - veritcal ordering flag + Radtend%coszen(idxday(1:nday)), & ! IN - Cosine of solar zenith angle + toa_src_sw(idxday(1:nday),:), & ! IN - incident solar flux at TOA + sfc_alb_nir_dir(:,idxday(1:nday)), & ! IN - Shortwave surface albedo (direct) + sfc_alb_nir_dif(:,idxday(1:nday)), & ! IN - Shortwave surface albedo (diffuse) + flux_clrsky)) ! OUT - Fluxes, clear-sky, 3D (nCol,Model%levs,nBand) ! Store fluxes fluxswUP_clrsky(idxday(1:nday),:) = sum(flux_clrsky%bnd_flux_up,dim=3) fluxswDOWN_clrsky(idxday(1:nday),:) = sum(flux_clrsky%bnd_flux_dn,dim=3) @@ -174,13 +179,13 @@ subroutine rrtmgp_sw_rte_run(Model, Interstitial, Radtend, Statein, ncol, sw_gas ! Delta-scale optical properties call check_error_msg('rrtmgp_sw_rte_run',sw_optical_props_clouds%delta_scale()) call check_error_msg('rrtmgp_sw_rte_run',rte_sw( & - sw_optical_props_clrsky, & ! IN - optical-properties - top_at_1, & ! IN - veritcal ordering flag - Radtend%coszen(idxday(1:nday)), & ! IN - Cosine of solar zenith angle - Interstitial%toa_src_sw(idxday(1:nday),:), & ! IN - incident solar flux at TOA - Interstitial%sfc_alb_nir_dir(:,idxday(1:nday)), & ! IN - Shortwave surface albedo (direct) - Interstitial%sfc_alb_nir_dif(:,idxday(1:nday)), & ! IN - Shortwave surface albedo (diffuse) - flux_allsky)) ! OUT - Fluxes, clear-sky, 3D (nCol,Model%levs,nBand) + sw_optical_props_clrsky, & ! IN - optical-properties + top_at_1, & ! IN - veritcal ordering flag + Radtend%coszen(idxday(1:nday)), & ! IN - Cosine of solar zenith angle + toa_src_sw(idxday(1:nday),:), & ! IN - incident solar flux at TOA + sfc_alb_nir_dir(:,idxday(1:nday)), & ! IN - Shortwave surface albedo (direct) + sfc_alb_nir_dif(:,idxday(1:nday)), & ! IN - Shortwave surface albedo (diffuse) + flux_allsky)) ! OUT - Fluxes, clear-sky, 3D (nCol,Model%levs,nBand) ! Store fluxes fluxswUP_allsky(idxday(1:nday),:) = sum(flux_allsky%bnd_flux_up,dim=3) fluxswDOWN_allsky(idxday(1:nday),:) = sum(flux_allsky%bnd_flux_dn,dim=3) diff --git a/physics/rrtmgp_sw_rte.meta b/physics/rrtmgp_sw_rte.meta index b677f15a6..2509cf0c6 100644 --- a/physics/rrtmgp_sw_rte.meta +++ b/physics/rrtmgp_sw_rte.meta @@ -9,14 +9,6 @@ type = GFS_control_type intent = in optional = F -[Interstitial] - standard_name = GFS_interstitial_type_instance - long_name = derived type GFS_interstitial_type in FV3 - units = DDT - dimensions = () - type = GFS_interstitial_type - intent = in - optional = F [Radtend] standard_name = GFS_radtend_type_instance long_name = instance of derived type GFS_radtend_type @@ -108,6 +100,51 @@ type = ty_gas_concs intent = in optional = F +[sfc_alb_nir_dir] + standard_name = surface_albedo_nearIR_direct + long_name = near-IR (direct) surface albedo (sfc_alb_nir_dir) + units = none + dimensions = (number_of_sw_bands_rrtmgp,horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[sfc_alb_nir_dif] + standard_name = surface_albedo_nearIR_diffuse + long_name = near-IR (diffuse) surface albedo (sfc_alb_nir_dif) + units = none + dimensions = (number_of_sw_bands_rrtmgp,horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[sfc_alb_uvvis_dir] + standard_name = surface_albedo_uvvis_dir + long_name = UVVIS (direct) surface albedo (sfc_alb_uvvis_dir) + units = none + dimensions = (number_of_sw_bands_rrtmgp,horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[sfc_alb_uvvis_dif] + standard_name = surface_albedo_uvvis_dif + long_name = UVVIS (diffuse) surface albedo (sfc_alb_uvvis_dif) + units = none + dimensions = (number_of_sw_bands_rrtmgp,horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[toa_src_sw] + standard_name = toa_incident_sw_flux_by_spectral_point + long_name = TOA shortwave incident flux at each spectral points (Radtend%toa_src_sw) + units = W m-2 + dimensions = (horizontal_dimension,number_of_sw_spectral_points_rrtmgp) + type = real + kind = kind_phys + intent = in + optional = F [lsswr] standard_name = flag_to_calc_sw long_name = flag to calculate SW irradiances From ddebe4554926ddae4f74b406b5e743f400b63a49 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Wed, 11 Dec 2019 14:33:40 -0700 Subject: [PATCH 087/167] Alebdos (nIR and uvvis) are being averaged in rrtmg, did same in rrtmgp. Sneaky --- physics/rrtmgp_sw_gas_optics.F90 | 18 +++++++++--------- physics/rrtmgp_sw_gas_optics.meta | 17 +++++++++-------- physics/rrtmgp_sw_rte.F90 | 14 ++++++++++---- physics/rrtmgp_sw_rte.meta | 2 +- 4 files changed, 29 insertions(+), 22 deletions(-) diff --git a/physics/rrtmgp_sw_gas_optics.F90 b/physics/rrtmgp_sw_gas_optics.F90 index d4db0d2d7..506fd47c3 100644 --- a/physics/rrtmgp_sw_gas_optics.F90 +++ b/physics/rrtmgp_sw_gas_optics.F90 @@ -1,6 +1,6 @@ module rrtmgp_sw_gas_optics use machine, only: kind_phys - use GFS_typedefs, only: GFS_control_type, GFS_interstitial_type + use GFS_typedefs, only: GFS_control_type use module_radiation_gases, only: NF_VGAS use mo_rte_kind, only: wl use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp @@ -405,15 +405,13 @@ end subroutine rrtmgp_sw_gas_optics_init !! \section arg_table_rrtmgp_sw_gas_optics_run !! \htmlinclude rrtmgp_sw_gas_optics.html !! - subroutine rrtmgp_sw_gas_optics_run(Model, Interstitial, sw_gas_props, ncol, nday, idxday,& - p_lay, p_lev, t_lay, t_lev, gas_concentrations, lsswr, solcon, & - sw_optical_props_clrsky, errmsg, errflg) + subroutine rrtmgp_sw_gas_optics_run(Model, sw_gas_props, ncol, nday, idxday, p_lay, p_lev,& + toa_src_sw, t_lay, t_lev, gas_concentrations, lsswr, solcon, sw_optical_props_clrsky,& + errmsg, errflg) ! Inputs type(GFS_control_type), intent(in) :: & Model ! DDT: FV3-GFS model control parameters - type(GFS_Interstitial_type),intent(inout) :: & - Interstitial ! DDT: FV3-GFS Interstitial arrays type(ty_gas_optics_rrtmgp),intent(in) :: & sw_gas_props ! RRTMGP DDT: spectral information for RRTMGP SW radiation scheme integer,intent(in) :: & @@ -441,6 +439,8 @@ subroutine rrtmgp_sw_gas_optics_run(Model, Interstitial, sw_gas_props, ncol, nda errflg ! Error code type(ty_optical_props_2str),intent(out) :: & sw_optical_props_clrsky ! RRTMGP DDT: clear-sky shortwave optical properties, spectral (tau,ssa,g) + real(kind_phys), dimension(ncol,sw_gas_props%get_ngpt()), intent(out) :: & + toa_src_sw ! TOA incident spectral flux (W/m2) ! Local variables integer :: ij,iGas @@ -476,11 +476,11 @@ subroutine rrtmgp_sw_gas_optics_run(Model, Interstitial, sw_gas_props, ncol, nda sw_optical_props_clrsky, & ! OUT - RRTMGP DDT: Shortwave optical properties, by ! spectral point (tau,ssa,g) toa_src_sw_temp)) ! OUT - TOA incident shortwave radiation (spectral) - Interstitial%toa_src_sw(idxday(1:nday),:) = toa_src_sw_temp + toa_src_sw(idxday(1:nday),:) = toa_src_sw_temp ! Scale incident flux do ij=1,nday - Interstitial%toa_src_sw(idxday(ij),:) = Interstitial%toa_src_sw(idxday(ij),:)*solcon/ & - sum(Interstitial%toa_src_sw(idxday(ij),:)) + toa_src_sw(idxday(ij),:) = toa_src_sw(idxday(ij),:)*solcon/ & + sum(toa_src_sw(idxday(ij),:)) enddo endif diff --git a/physics/rrtmgp_sw_gas_optics.meta b/physics/rrtmgp_sw_gas_optics.meta index 1ec914d63..7ee8e9edc 100644 --- a/physics/rrtmgp_sw_gas_optics.meta +++ b/physics/rrtmgp_sw_gas_optics.meta @@ -79,14 +79,6 @@ type = GFS_control_type intent = in optional = F -[Interstitial] - standard_name = GFS_interstitial_type_instance - long_name = derived type GFS_interstitial_type in FV3 - units = DDT - dimensions = () - type = GFS_interstitial_type - intent = inout - optional = F [sw_gas_props] standard_name = coefficients_for_sw_gas_optics long_name = DDT containing spectral information for RRTMGP SW radiation scheme @@ -119,6 +111,15 @@ type = integer intent = in optional = F +[toa_src_sw] + standard_name = toa_incident_sw_flux_by_spectral_point + long_name = TOA shortwave incident flux at each spectral points + units = W m-2 + dimensions = (horizontal_dimension,number_of_sw_spectral_points_rrtmgp) + type = real + kind = kind_phys + intent = out + optional = F [p_lay] standard_name = air_pressure_at_layer_for_RRTMGP_in_hPa long_name = air pressure layer diff --git a/physics/rrtmgp_sw_rte.F90 b/physics/rrtmgp_sw_rte.F90 index a88f4eda9..4a612ccce 100644 --- a/physics/rrtmgp_sw_rte.F90 +++ b/physics/rrtmgp_sw_rte.F90 @@ -93,6 +93,8 @@ subroutine rrtmgp_sw_rte_run(Model, Radtend, Statein, ncol, sw_gas_props, p_lay, ! visdf - downward uv+vis diffused flux (W/m2) ! Local variables + real(kind_phys), dimension(sw_gas_props%get_nband(),nday) :: & + sfc_alb_dir,sfc_alb_dif type(ty_fluxes_byband) :: & flux_allsky, & ! All-sky flux (W/m2) flux_clrsky ! Clear-sky flux (W/m2) @@ -154,6 +156,10 @@ subroutine rrtmgp_sw_rte_run(Model, Radtend, Statein, ncol, sw_gas_props, p_lay, flux_clrsky%bnd_flux_up => fluxSW_up_clrsky flux_clrsky%bnd_flux_dn => fluxSW_dn_clrsky + ! In RRTMG, the near-IR and uv-visible surface albedos are averaged. + sfc_alb_dir = 0.5_kind_phys*(sfc_alb_nir_dir(:,idxday(1:nday)) + sfc_alb_uvvis_dir(:,idxday(1:nday))) + sfc_alb_dif = 0.5_kind_phys*(sfc_alb_nir_dif(:,idxday(1:nday)) + sfc_alb_uvvis_dif(:,idxday(1:nday))) + ! Compute clear-sky fluxes (if requested) ! Clear-sky fluxes (gas+aerosol) call check_error_msg('rrtmgp_sw_rte_run',sw_optical_props_aerosol%increment(sw_optical_props_clrsky)) @@ -165,8 +171,8 @@ subroutine rrtmgp_sw_rte_run(Model, Radtend, Statein, ncol, sw_gas_props, p_lay, top_at_1, & ! IN - veritcal ordering flag Radtend%coszen(idxday(1:nday)), & ! IN - Cosine of solar zenith angle toa_src_sw(idxday(1:nday),:), & ! IN - incident solar flux at TOA - sfc_alb_nir_dir(:,idxday(1:nday)), & ! IN - Shortwave surface albedo (direct) - sfc_alb_nir_dif(:,idxday(1:nday)), & ! IN - Shortwave surface albedo (diffuse) + sfc_alb_dir, & ! IN - Shortwave surface albedo (direct) + sfc_alb_dif, & ! IN - Shortwave surface albedo (diffuse) flux_clrsky)) ! OUT - Fluxes, clear-sky, 3D (nCol,Model%levs,nBand) ! Store fluxes fluxswUP_clrsky(idxday(1:nday),:) = sum(flux_clrsky%bnd_flux_up,dim=3) @@ -183,8 +189,8 @@ subroutine rrtmgp_sw_rte_run(Model, Radtend, Statein, ncol, sw_gas_props, p_lay, top_at_1, & ! IN - veritcal ordering flag Radtend%coszen(idxday(1:nday)), & ! IN - Cosine of solar zenith angle toa_src_sw(idxday(1:nday),:), & ! IN - incident solar flux at TOA - sfc_alb_nir_dir(:,idxday(1:nday)), & ! IN - Shortwave surface albedo (direct) - sfc_alb_nir_dif(:,idxday(1:nday)), & ! IN - Shortwave surface albedo (diffuse) + sfc_alb_dir, & ! IN - Shortwave surface albedo (direct) + sfc_alb_dif, & ! IN - Shortwave surface albedo (diffuse) flux_allsky)) ! OUT - Fluxes, clear-sky, 3D (nCol,Model%levs,nBand) ! Store fluxes fluxswUP_allsky(idxday(1:nday),:) = sum(flux_allsky%bnd_flux_up,dim=3) diff --git a/physics/rrtmgp_sw_rte.meta b/physics/rrtmgp_sw_rte.meta index 2509cf0c6..81575e6f4 100644 --- a/physics/rrtmgp_sw_rte.meta +++ b/physics/rrtmgp_sw_rte.meta @@ -138,7 +138,7 @@ optional = F [toa_src_sw] standard_name = toa_incident_sw_flux_by_spectral_point - long_name = TOA shortwave incident flux at each spectral points (Radtend%toa_src_sw) + long_name = TOA shortwave incident flux at each spectral points units = W m-2 dimensions = (horizontal_dimension,number_of_sw_spectral_points_rrtmgp) type = real From 9bd2dbb122546d1367e286b4c500e1f9ced702f4 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Wed, 11 Dec 2019 16:07:46 -0700 Subject: [PATCH 088/167] Express layer-thinkness in meters? --- physics/GFS_rrtmgp_pre.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/physics/GFS_rrtmgp_pre.F90 b/physics/GFS_rrtmgp_pre.F90 index a80c4b5a6..f75e251e7 100644 --- a/physics/GFS_rrtmgp_pre.F90 +++ b/physics/GFS_rrtmgp_pre.F90 @@ -251,7 +251,7 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, relhum(iCol,iLay) = max( 0._kind_phys, min( 1._kind_phys, max(QMIN, q_lay(iCol,iLay))/qs ) ) qs_lay(iCol,iLay) = qs tv_lay(iCol,iLay) = t_lay(iCol,iLay) * (1._kind_phys + fvirt*q_lay(iCol,iLay)) - deltaZ(iCol,iLay) = (rog*0.001) * (log(p_lev(iCol,iLay)) - log(p_lev(iCol,iLay+1))) * tv_lay(iCol,iLay) + deltaZ(iCol,iLay) = (rog) * abs(log(p_lev(iCol,iLay)) - log(p_lev(iCol,iLay+1))) * tv_lay(iCol,iLay) enddo enddo From 9a47ad3fe56cdc479d644df6f1d8a9dc51a468c9 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Thu, 12 Dec 2019 14:19:48 -0700 Subject: [PATCH 089/167] Added aerosol and cloud-sampling schemes. --- physics/GFS_rrtmgp_lw_pre.F90 | 24 +--- physics/GFS_rrtmgp_lw_pre.meta | 18 --- physics/GFS_rrtmgp_pre.F90 | 44 +++---- physics/GFS_rrtmgp_sw_pre.F90 | 37 +----- physics/GFS_rrtmgp_sw_pre.meta | 17 --- physics/rrtmgp_lw_aerosol_optics.F90 | 97 ++++++++++++++ physics/rrtmgp_lw_aerosol_optics.meta | 166 +++++++++++++++++++++++ physics/rrtmgp_lw_cloud_optics.F90 | 80 ++--------- physics/rrtmgp_lw_cloud_optics.meta | 37 +----- physics/rrtmgp_lw_cloud_sampling.F90 | 112 ++++++++++++++++ physics/rrtmgp_lw_cloud_sampling.meta | 93 +++++++++++++ physics/rrtmgp_sw_aerosol_optics.F90 | 115 ++++++++++++++++ physics/rrtmgp_sw_aerosol_optics.meta | 182 ++++++++++++++++++++++++++ physics/rrtmgp_sw_cloud_optics.F90 | 83 ++---------- physics/rrtmgp_sw_cloud_optics.meta | 37 +----- physics/rrtmgp_sw_cloud_sampling.F90 | 119 +++++++++++++++++ physics/rrtmgp_sw_cloud_sampling.meta | 109 +++++++++++++++ 17 files changed, 1039 insertions(+), 331 deletions(-) create mode 100644 physics/rrtmgp_lw_aerosol_optics.F90 create mode 100644 physics/rrtmgp_lw_aerosol_optics.meta create mode 100644 physics/rrtmgp_lw_cloud_sampling.F90 create mode 100644 physics/rrtmgp_lw_cloud_sampling.meta create mode 100644 physics/rrtmgp_sw_aerosol_optics.F90 create mode 100644 physics/rrtmgp_sw_aerosol_optics.meta create mode 100644 physics/rrtmgp_sw_cloud_sampling.F90 create mode 100644 physics/rrtmgp_sw_cloud_sampling.meta diff --git a/physics/GFS_rrtmgp_lw_pre.F90 b/physics/GFS_rrtmgp_lw_pre.F90 index 04c75ba5f..34f9e5b53 100644 --- a/physics/GFS_rrtmgp_lw_pre.F90 +++ b/physics/GFS_rrtmgp_lw_pre.F90 @@ -10,11 +10,6 @@ module GFS_rrtmgp_lw_pre GFS_radtend_type ! Radiation tendencies needed in physics use module_radiation_surface, only: & setemis ! Routine to compute surface-emissivity - use module_radiation_aerosols, only: & - NF_AESW, & ! Number of optical-fields in SW output (3=tau+g+omega) - NF_AELW, & ! Number of optical-fields in LW output (3=tau+g+omega) - setaer, & ! Routine to compute aerosol radiative properties (tau,g,omega) - NSPC1 ! Number of species for vertically integrated aerosol optical-depth use mo_gas_optics_rrtmgp, only: & ty_gas_optics_rrtmgp @@ -35,8 +30,7 @@ end subroutine GFS_rrtmgp_lw_pre_init !! \htmlinclude GFS_rrtmgp_lw_pre.html !! subroutine GFS_rrtmgp_lw_pre_run (Model, Grid, Sfcprop, Statein, ncol, p_lay, p_lev, & - tv_lay, relhum, tracer, lw_gas_props, Radtend, aerosolslw, aerodp, sfc_emiss_byband, & - errmsg, errflg) + tv_lay, relhum, tracer, lw_gas_props, Radtend, sfc_emiss_byband, errmsg, errflg) ! Inputs type(GFS_control_type), intent(in) :: & @@ -63,10 +57,6 @@ subroutine GFS_rrtmgp_lw_pre_run (Model, Grid, Sfcprop, Statein, ncol, p_lay, ! Outputs type(GFS_radtend_type), intent(inout) :: & Radtend ! DDT: FV3-GFS radiation tendencies - real(kind_phys), dimension(ncol,Model%levs,lw_gas_props%get_nband(),NF_AELW), intent(out) ::& - aerosolslw ! Aerosol radiative properties in each SW band. - real(kind_phys), dimension(ncol,NSPC1), intent(inout) :: & - aerodp ! Vertical integrated optical depth for various aerosol species real(kind_phys), dimension(lw_gas_props%get_nband(),ncol), intent(out) :: & sfc_emiss_byband ! Surface emissivity in each band character(len=*), intent(out) :: & @@ -74,10 +64,6 @@ subroutine GFS_rrtmgp_lw_pre_run (Model, Grid, Sfcprop, Statein, ncol, p_lay, integer, intent(out) :: & errflg ! Error flag - ! Local - real(kind_phys), dimension(ncol, Model%levs, Model%rrtmgp_nBandsSW, NF_AESW) :: & - aerosolssw2 - ! Initialize CCPP error handling variables errmsg = '' errflg = 0 @@ -95,14 +81,6 @@ subroutine GFS_rrtmgp_lw_pre_run (Model, Grid, Sfcprop, Statein, ncol, p_lay, sfc_emiss_byband(iBand,1:NCOL) = Radtend%semis(1:NCOL) enddo - ! ####################################################################################### - ! Call module_radiation_aerosols::setaer(),to setup aerosols property profile - ! ####################################################################################### - call setaer(p_lev, p_lay, Statein%prslk(1:NCOL,:), tv_lay, relhum, & - Sfcprop%slmsk, tracer, Grid%xlon, Grid%xlat, ncol, Model%levs, Model%levs+1, & - .true., Model%lslwr, aerosolssw2, aerosolslw, aerodp) - - end subroutine GFS_rrtmgp_lw_pre_run ! ######################################################################################### diff --git a/physics/GFS_rrtmgp_lw_pre.meta b/physics/GFS_rrtmgp_lw_pre.meta index aed2b1a6c..78cdfa2d4 100644 --- a/physics/GFS_rrtmgp_lw_pre.meta +++ b/physics/GFS_rrtmgp_lw_pre.meta @@ -102,24 +102,6 @@ type = ty_gas_optics_rrtmgp intent = in optional = F -[aerodp] - standard_name = atmosphere_optical_thickness_due_to_ambient_aerosol_particles - long_name = vertical integrated optical depth for various aerosol species - units = none - dimensions = (horizontal_dimension,number_of_species_for_aerosol_optical_depth) - type = real - kind = kind_phys - intent = inout - optional = F -[aerosolslw] - standard_name = RRTMGP_aerosol_optical_properties_for_longwave_bands_01_16 - long_name = aerosol optical properties for longwave bands 01-16 - units = various - dimensions = (horizontal_dimension,vertical_dimension, number_of_lw_bands_rrtmgp,number_of_aerosol_output_fields_for_longwave_radiation) - type = real - kind = kind_phys - intent = out - optional = F [sfc_emiss_byband] standard_name = surface_emissivity_in_each_RRTMGP_LW_band long_name = surface emissivity in each RRTMGP LW band diff --git a/physics/GFS_rrtmgp_pre.F90 b/physics/GFS_rrtmgp_pre.F90 index f75e251e7..05c853fd3 100644 --- a/physics/GFS_rrtmgp_pre.F90 +++ b/physics/GFS_rrtmgp_pre.F90 @@ -251,7 +251,7 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, relhum(iCol,iLay) = max( 0._kind_phys, min( 1._kind_phys, max(QMIN, q_lay(iCol,iLay))/qs ) ) qs_lay(iCol,iLay) = qs tv_lay(iCol,iLay) = t_lay(iCol,iLay) * (1._kind_phys + fvirt*q_lay(iCol,iLay)) - deltaZ(iCol,iLay) = (rog) * abs(log(p_lev(iCol,iLay)) - log(p_lev(iCol,iLay+1))) * tv_lay(iCol,iLay) + deltaZ(iCol,iLay) = (rog*0.001) * abs(log(p_lev(iCol,iLay)) - log(p_lev(iCol,iLay+1))) * tv_lay(iCol,iLay) enddo enddo @@ -347,29 +347,29 @@ subroutine cloud_microphysics(Model, Tbd, Grid, Sfcprop, ncol, tracer, p_lay, t_ integer, intent(in) :: & ncol ! Number of horizontal gridpoints real(kind_phys), dimension(ncol, Model%levs, 2:Model%ntrac),intent(in) :: & - tracer ! + tracer ! Cloud condensate amount in layer by type () real(kind_phys), dimension(ncol,Model%levs), intent(in) :: & - p_lay, & ! - t_lay, & ! - tv_lay, & ! - relhum, & ! - qs_lay, & ! - q_lay, & ! - deltaZ, & ! - deltaP + p_lay, & ! Pressure @ model layer centers (Pa) + t_lay, & ! Temperature @ layer centers (K) + tv_lay, & ! Virtual temperature @ layer centers (K) + relhum, & ! Relative humidity @ layer centers(1) + qs_lay, & ! Saturation specific humidity @ layer center (kg/kg) + q_lay, & ! Specific humidity @ layer centers(kg/kg) + deltaZ, & ! Layer thickness (km) + deltaP ! Layer thickness (Pa) real(kind_phys), dimension(ncol,Model%levs+1), intent(in) :: & - p_lev ! + p_lev ! Pressure @ model layer interface (Pa) ! Outputs real(kind_phys), dimension(ncol, Model%levs, NF_CLDS),intent(out) :: & - clouds ! + clouds ! Cloud properties (NCOL,Model%levs,NF_CLDS) integer,dimension(ncol,3), intent(out) :: & - mbota, & ! - mtopa ! + mbota, & ! Vertical indices for low, mid, hi cloud bases (NCOL,3) + mtopa ! Vertical indices for low, mid, hi cloud tops (NCOL,3) real(kind_phys), dimension(ncol), intent(out) ::& - de_lgth ! + de_lgth ! Clouds decorrelation length (km) real(kind_phys), dimension(ncol, 5), intent(out) :: & - cldsa ! + cldsa ! Fraction of clouds for low, mid, hi, tot, bl (NCOL,5) ! Local variables real(kind_phys), dimension(ncol, Model%levs, Model%ncnd) :: cld_condensate @@ -499,7 +499,7 @@ subroutine cloud_microphysics(Model, Tbd, Grid, Sfcprop, ncol, tracer, p_lay, t_ Grid%xlat, & ! IN - Latitude (radians) Grid%xlon, & ! IN - Longitude (radians) Sfcprop%slmsk, & ! IN - Land/Sea mask () - deltaZ, & ! IN - Layer thickness (m) + deltaZ, & ! IN - Layer thickness (km) deltaP/100., & ! IN - Layer thickness (hPa) NCOL, & ! IN - Number of horizontal gridpoints MODEL%LEVS, & ! IN - Number of model layers @@ -529,7 +529,7 @@ subroutine cloud_microphysics(Model, Tbd, Grid, Sfcprop, ncol, tracer, p_lay, t_ Grid%xlat, & ! IN - Latitude (radians) Grid%xlon, & ! IN - Longitude (radians) Sfcprop%slmsk, & ! IN - Land/Sea mask () - deltaZ, & ! IN - Layer thickness (m) + deltaZ, & ! IN - Layer thickness (km) deltaP/100., & ! IN - Layer thickness (hPa) NCOL, & ! IN - Number of horizontal gridpoints MODEL%LEVS, & ! IN - Number of model layers @@ -565,7 +565,7 @@ subroutine cloud_microphysics(Model, Tbd, Grid, Sfcprop, ncol, tracer, p_lay, t_ Grid%xlat, & ! IN - Latitude (radians) Grid%xlon, & ! IN - Longitude (radians) Sfcprop%slmsk, & ! IN - Land/Sea mask () - deltaZ, & ! IN - Layer thickness (m) + deltaZ, & ! IN - Layer thickness (km) deltaP/100., & ! IN - Layer thickness (hPa) NCOL, & ! IN - Number of horizontal gridpoints MODEL%LEVS, & ! IN - Number of model layers @@ -597,7 +597,7 @@ subroutine cloud_microphysics(Model, Tbd, Grid, Sfcprop, ncol, tracer, p_lay, t_ Grid%xlon, & ! IN - Longitude (radians) Sfcprop%slmsk, & ! IN - Land/Sea mask () cldcov, & ! IN - Layer cloud fraction (used if uni_cld=.true.) - deltaZ, & ! IN - Layer thickness (m) + deltaZ, & ! IN - Layer thickness (km) deltaP/100., & ! IN - Layer thickness (hPa) NCOL, & ! IN - Number of horizontal gridpoints MODEL%LEVS, & ! IN - Number of model layers @@ -618,7 +618,7 @@ subroutine cloud_microphysics(Model, Tbd, Grid, Sfcprop, ncol, tracer, p_lay, t_ Grid%xlat, & ! IN - Latitude (radians) Grid%xlon, & ! IN - Longitude (radians) Sfcprop%slmsk, & ! IN - Land/Sea mask () - deltaZ, & ! IN - Layer thickness (m) + deltaZ, & ! IN - Layer thickness (km) deltaP/100., & ! IN - Layer thickness (hPa) NCOL, & ! IN - Number of horizontal gridpoints MODEL%LEVS, & ! IN - Number of model layers @@ -649,7 +649,7 @@ subroutine cloud_microphysics(Model, Tbd, Grid, Sfcprop, ncol, tracer, p_lay, t_ Grid%xlat, & ! IN - Latitude (radians) Grid%xlon, & ! IN - Longitude (radians) Sfcprop%slmsk, & ! IN - Land/Sea mask () - deltaZ, & ! IN - Layer thickness (m) + deltaZ, & ! IN - Layer thickness (km) deltaP/100., & ! IN - Layer thickness (hPa) Model%ntrac-1, & ! IN - Number of tracers Model%ntcw-1, & ! IN - Tracer index for cloud condensate (or liquid water) diff --git a/physics/GFS_rrtmgp_sw_pre.F90 b/physics/GFS_rrtmgp_sw_pre.F90 index 613322bf7..6987c3e4a 100644 --- a/physics/GFS_rrtmgp_sw_pre.F90 +++ b/physics/GFS_rrtmgp_sw_pre.F90 @@ -15,13 +15,6 @@ module GFS_rrtmgp_sw_pre use module_radiation_surface, only: & NF_ALBD, & ! Number of surface albedo categories (4; nir-direct, nir-diffuse, uvvis-direct, uvvis-diffuse) setalb ! Routine to compute surface albedo - ! DJS2019: This radiation_aerosols_module is a whole-lotta mess that needs some love. As it stands now, it's - ! entirely dependent on RRTMG legacy code. - use module_radiation_aerosols, only: & - NF_AESW, & ! Number of optical-fields in SW output (3=tau+g+omega) - NF_AELW, & ! Number of optical-fields in LW output (3=tau+g+omega) - setaer, & ! Routine to compute aerosol radiative properties (tau,g,omega) - NSPC1 ! Number of species for vertically integrated aerosol optical-depth use surface_perturbation, only: & cdfnor ! Routine to compute CDF (used to compute percentiles) use mo_gas_optics_rrtmgp, only: & @@ -44,8 +37,8 @@ end subroutine GFS_rrtmgp_sw_pre_init !! subroutine GFS_rrtmgp_sw_pre_run(Model, Grid, Sfcprop, Statein, ncol, p_lay, p_lev, & tv_lay, relhum, tracer, sw_gas_props, nday, idxday, alb1d, sfc_alb_nir_dir, & - sfc_alb_nir_dif, sfc_alb_uvvis_dir, sfc_alb_uvvis_dif, RadTend, Coupling, aerosolssw,& - aerodp, errmsg, errflg) + sfc_alb_nir_dif, sfc_alb_uvvis_dir, sfc_alb_uvvis_dif, RadTend, Coupling, & + errmsg, errflg) ! Inputs type(GFS_control_type), intent(in) :: & @@ -85,10 +78,6 @@ subroutine GFS_rrtmgp_sw_pre_run(Model, Grid, Sfcprop, Statein, ncol, p_lay, p_ Radtend ! DDT: FV3-GFS radiation tendencies type(GFS_coupling_type), intent(inout) :: & Coupling ! DDT: FV3-GFS coupling arrays - real(kind_phys), dimension(ncol,Model%levs,sw_gas_props%get_nband(),NF_AESW), intent(out) ::& - aerosolssw ! Aerosol radiative properties in each SW band. - real(kind_phys), dimension(ncol,NSPC1), intent(inout) :: & - aerodp ! Vertical integrated optical depth for various aerosol species character(len=*), intent(out) :: & errmsg ! Error message integer, intent(out) :: & @@ -97,10 +86,6 @@ subroutine GFS_rrtmgp_sw_pre_run(Model, Grid, Sfcprop, Statein, ncol, p_lay, p_ ! Local variables integer :: i, j, iCol, iBand, iLay real(kind_phys), dimension(ncol, NF_ALBD) :: sfcalb - real(kind_phys), dimension(ncol, Model%levs, sw_gas_props%get_nband(), NF_AESW) :: & - aerosolssw2 - real(kind_phys), dimension(ncol, Model%levs, Model%rrtmgp_nBandsLW, NF_AELW) :: & - aerosolslw ! Initialize CCPP error handling variables errmsg = '' @@ -159,24 +144,6 @@ subroutine GFS_rrtmgp_sw_pre_run(Model, Grid, Sfcprop, Statein, ncol, p_lay, p_ sfc_alb_uvvis_dif(iBand,1:NCOL) = sfcalb(1:NCOL,4) enddo - ! ####################################################################################### - ! Call module_radiation_aerosols::setaer(),to setup aerosols property profile - ! ####################################################################################### - call setaer(p_lev, p_lay, Statein%prslk(1:NCOL,:), tv_lay, relhum, Sfcprop%slmsk, tracer, & - Grid%xlon, Grid%xlat, NCOL, Model%levs, Model%levs+1, Model%lsswr, .true., & - aerosolssw2, aerosolslw, aerodp) - - ! Store aerosol optical properties - ! SW. - ! For RRTMGP SW the bands are now ordered from [IR(band) -> nIR -> UV], in RRTMG the - ! band ordering was [nIR -> UV -> IR(band)] - aerosolssw(1:NCOL,:,1,1) = aerosolssw2(1:NCOL,:,sw_gas_props%get_nband(),1) - aerosolssw(1:NCOL,:,1,2) = aerosolssw2(1:NCOL,:,sw_gas_props%get_nband(),2) - aerosolssw(1:NCOL,:,1,3) = aerosolssw2(1:NCOL,:,sw_gas_props%get_nband(),3) - aerosolssw(1:NCOL,:,2:sw_gas_props%get_nband(),1) = aerosolssw2(1:NCOL,:,1:sw_gas_props%get_nband()-1,1) - aerosolssw(1:NCOL,:,2:sw_gas_props%get_nband(),2) = aerosolssw2(1:NCOL,:,1:sw_gas_props%get_nband()-1,2) - aerosolssw(1:NCOL,:,2:sw_gas_props%get_nband(),3) = aerosolssw2(1:NCOL,:,1:sw_gas_props%get_nband()-1,3) - end subroutine GFS_rrtmgp_sw_pre_run ! ######################################################################################### diff --git a/physics/GFS_rrtmgp_sw_pre.meta b/physics/GFS_rrtmgp_sw_pre.meta index c377abe9d..73df740e1 100644 --- a/physics/GFS_rrtmgp_sw_pre.meta +++ b/physics/GFS_rrtmgp_sw_pre.meta @@ -171,23 +171,6 @@ type = integer intent = out optional = F -[aerosolssw] - standard_name = RRTMGP_aerosol_optical_properties_for_shortwave_bands_01_16 - long_name = aerosol optical properties for shortwave bands 01-16 - units = various - dimensions = (horizontal_dimension,vertical_dimension, number_of_sw_bands_rrtmgp, number_of_aerosol_output_fields_for_shortwave_radiation) - type = real - intent = out - kind = kind_phys -[aerodp] - standard_name = atmosphere_optical_thickness_due_to_ambient_aerosol_particles - long_name = vertical integrated optical depth for various aerosol species - units = none - dimensions = (horizontal_dimension,number_of_species_for_aerosol_optical_depth) - type = real - kind = kind_phys - intent = inout - optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP diff --git a/physics/rrtmgp_lw_aerosol_optics.F90 b/physics/rrtmgp_lw_aerosol_optics.F90 new file mode 100644 index 000000000..bc6295e44 --- /dev/null +++ b/physics/rrtmgp_lw_aerosol_optics.F90 @@ -0,0 +1,97 @@ +module rrtmgp_lw_aerosol_optics + use machine, only: kind_phys + use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp + use mo_optical_props, only: ty_optical_props_1scl + use rrtmgp_aux, only: check_error_msg + use module_radiation_aerosols, only: & + NF_AESW, & ! Number of optical-fields in SW output (3=tau+g+omega) + NF_AELW, & ! Number of optical-fields in LW output (3=tau+g+omega) + setaer, & ! Routine to compute aerosol radiative properties (tau,g,omega) + NSPC1 ! Number of species for vertically integrated aerosol optical-depth + use netcdf + + public rrtmgp_lw_aerosol_optics_init, rrtmgp_lw_aerosol_optics_run, rrtmgp_lw_aerosol_optics_finalize +contains + + ! ######################################################################################### + ! SUBROUTINE rrtmgp_lw_aerosol_optics_init() + ! ######################################################################################### + subroutine rrtmgp_lw_aerosol_optics_init() + end subroutine rrtmgp_lw_aerosol_optics_init + + ! ######################################################################################### + ! SUBROUTINE rrtmgp_lw_aerosol_optics_run() + ! ######################################################################################### +!! \section arg_table_rrtmgp_lw_aerosol_optics_run +!! \htmlinclude rrtmgp_lw_aerosol_optics.html +!! + subroutine rrtmgp_lw_aerosol_optics_run(doLWrad, nCol, nLev, nTracer, p_lev, p_lay, p_lk, & + tv_lay, relhum, lsmask, tracer, lon, lat, lw_gas_props, sw_gas_props, & + aerodp, lw_optical_props_aerosol, errmsg, errflg) + + ! Inputs + logical, intent(in) :: & + doLWrad ! Logical flag for longwave radiation call + integer, intent(in) :: & + nCol, & ! Number of horizontal grid points + nLev, & ! Number of vertical layers + nTracer ! Number of tracers + real(kind_phys), dimension(nCol), intent(in) :: & + lon, & ! Longitude + lat, & ! Latitude + lsmask ! Land/sea/sea-ice mask + real(kind_phys), dimension(nCol,Nlev),intent(in) :: & + p_lay, & ! Pressure @ layer-centers (Pa) + tv_lay, & ! Virtual-temperature @ layer-centers (K) + relhum, & ! Relative-humidity @ layer-centers + p_lk ! Exner function @ layer-centers (1) + real(kind_phys), dimension(nCol, nLev, nTracer),intent(in) :: & + tracer ! trace gas concentrations + real(kind_phys), dimension(nCol,nLev+1),intent(in) :: & + p_lev ! Pressure @ layer-interfaces (Pa) + type(ty_gas_optics_rrtmgp),intent(in) :: & + sw_gas_props ! RRTMGP DDT: spectral information for SW calculation + type(ty_gas_optics_rrtmgp),intent(in) :: & + lw_gas_props ! RRTMGP DDT: spectral information for LW calculation + + ! Outputs + real(kind_phys), dimension(nCol,NSPC1), intent(inout) :: & + aerodp ! Vertical integrated optical depth for various aerosol species + type(ty_optical_props_1scl),intent(out) :: & + lw_optical_props_aerosol ! RRTMGP DDT: Longwave aerosol optical properties (tau) + integer, intent(out) :: & + errflg ! + character(len=*), intent(out) :: & + errmsg ! + + ! Local variables + real(kind_phys), dimension(nCol, nLev, lw_gas_props%get_nband(), NF_AELW) :: & + aerosolslw ! + real(kind_phys), dimension(nCol, nLev, sw_gas_props%get_nband(), NF_AESW) :: & + aerosolssw + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + + if (.not. doLWrad) return + + ! Call module_radiation_aerosols::setaer(),to setup aerosols property profile + call setaer(p_lev, p_lay, p_lk, tv_lay, relhum, lsmask, tracer, lon, lat, ncol, nLev, & + nLev+1, .true., .true., aerosolssw, aerosolslw, aerodp) + + ! Allocate RRTMGP DDT: Aerosol optics [nCol,nlev,nBands] + call check_error_msg('rrtmgp_lw_aerosol_optics_run',lw_optical_props_aerosol%alloc_1scl( & + ncol, nlev, lw_gas_props%get_band_lims_wavenumber())) + + ! Copy aerosol optical information to RRTMGP DDT + lw_optical_props_aerosol%tau = aerosolslw(:,:,:,1) * (1. - aerosolslw(:,:,:,2)) + + end subroutine rrtmgp_lw_aerosol_optics_run + + ! ######################################################################################### + ! SUBROUTINE rrtmgp_lw_aerosol_optics_finalize() + ! ######################################################################################### + subroutine rrtmgp_lw_aerosol_optics_finalize() + end subroutine rrtmgp_lw_aerosol_optics_finalize +end module rrtmgp_lw_aerosol_optics diff --git a/physics/rrtmgp_lw_aerosol_optics.meta b/physics/rrtmgp_lw_aerosol_optics.meta new file mode 100644 index 000000000..ea123e236 --- /dev/null +++ b/physics/rrtmgp_lw_aerosol_optics.meta @@ -0,0 +1,166 @@ +[ccpp-arg-table] + name = rrtmgp_lw_aerosol_optics_run + type = scheme +[doLWrad] + standard_name = flag_to_calc_lw + long_name = logical flags for lw radiation calls + units = flag + dimensions = () + type = logical + intent = in + optional = F +[ncol] + standard_name = horizontal_loop_extent + long_name = horizontal dimension + units = count + dimensions = () + type = integer + intent = in + optional = F +[nLev] + standard_name = vertical_dimension + long_name = number of vertical levels + units = count + dimensions = () + type = integer + intent = in + optional = F +[nTracer] + standard_name = number_of_tracers + long_name = number of tracers + units = count + dimensions = () + type = integer + intent = in + optional = F +[p_lev] + standard_name = air_pressure_at_interface_for_RRTMGP_in_hPa + long_name = air pressure at vertical interface for radiation calculation + units = hPa + dimensions = (horizontal_dimension,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = in + optional = F +[p_lay] + standard_name = air_pressure_at_layer_for_RRTMGP_in_hPa + long_name = air pressure at vertical layer for radiation calculation + units = hPa + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[p_lk] + standard_name = dimensionless_exner_function_at_model_layers + long_name = dimensionless Exner function at model layer centers + units = none + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[tv_lay] + standard_name = virtual_temperature + long_name = layer virtual temperature + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[relhum] + standard_name = relative_humidity + long_name = layer relative humidity + units = frac + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[lsmask] + standard_name = sea_land_ice_mask_real + long_name = landmask: sea/land/ice=0/1/2 + units = flag + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[tracer] + standard_name = chemical_tracers + long_name = chemical tracers + units = g g-1 + dimensions = (horizontal_dimension,vertical_dimension,number_of_tracers) + type = real + kind = kind_phys + intent = in + optional = F +[lon] + standard_name = longitude + long_name = longitude + units = radians + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[lat] + standard_name = latitude + long_name = latitude + units = radians + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[lw_gas_props] + standard_name = coefficients_for_lw_gas_optics + long_name = DDT containing spectral information for RRTMGP LW radiation scheme + units = DDT + dimensions = () + intent = in + type = ty_gas_optics_rrtmgp + optional = F +[sw_gas_props] + standard_name = coefficients_for_sw_gas_optics + long_name = DDT containing spectral information for RRTMGP SW radiation scheme + units = DDT + dimensions = () + type = ty_gas_optics_rrtmgp + intent = in + optional = F +[aerodp] + standard_name = atmosphere_optical_thickness_due_to_ambient_aerosol_particles + long_name = vertical integrated optical depth for various aerosol species + units = none + dimensions = (horizontal_dimension,number_of_species_for_aerosol_optical_depth) + type = real + kind = kind_phys + intent = inout + optional = F +[lw_optical_props_aerosol] + standard_name = longwave_optical_properties_for_aerosols + long_name = Fortran DDT containing RRTMGP optical properties + units = DDT + dimensions = () + type = ty_optical_props_1scl + intent = out + optional = F +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out + optional = F +[errflg] + standard_name = ccpp_error_flag + long_name = error flag for error handling in CCPP + units = flag + dimensions = () + type = integer + intent = out + optional = F \ No newline at end of file diff --git a/physics/rrtmgp_lw_cloud_optics.F90 b/physics/rrtmgp_lw_cloud_optics.F90 index f30f540a5..794b679ef 100644 --- a/physics/rrtmgp_lw_cloud_optics.F90 +++ b/physics/rrtmgp_lw_cloud_optics.F90 @@ -351,22 +351,15 @@ end subroutine rrtmgp_lw_cloud_optics_init ! ######################################################################################### ! SUBROUTINE rrtmgp_lw_cloud_optics_run() ! ######################################################################################### - subroutine rrtmgp_lw_cloud_optics_run(Model, ncol, ipsdlw0, icseed_lw, cld_frac, cld_lwp, & - cld_reliq, cld_iwp, cld_reice, cld_swp, cld_resnow, cld_rwp, cld_rerain, & - lw_cloud_props, lw_gas_props, aerosolslw, & - cldtaulw, lw_optical_props_clouds, lw_optical_props_aerosol, errmsg, errflg) + subroutine rrtmgp_lw_cloud_optics_run(Model, ncol, cld_frac, cld_lwp, cld_reliq, cld_iwp, & + cld_reice, cld_swp, cld_resnow, cld_rwp, cld_rerain, lw_cloud_props, lw_gas_props, & + cldtaulw, lw_optical_props_cloudsByBand, errmsg, errflg) ! Inputs type(GFS_control_type), intent(in) :: & Model ! DDT containing FV3-GFS model control parameters integer, intent(in) :: & - ncol, & ! Number of horizontal gridpoints - ipsdlw0 ! Initial permutation seed for McICA - integer,intent(in),dimension(ncol) :: & - icseed_lw ! auxiliary special cloud related array when module - ! variable isubclw=2, it provides permutation seed - ! for each column profile that are used for generating - ! random numbers. when isubclw /=2, it will not be used. + ncol ! Number of horizontal gridpoints real(kind_phys), dimension(ncol,model%levs),intent(in) :: & cld_frac, & ! Total cloud fraction by layer cld_lwp, & ! Cloud liquid water path @@ -381,29 +374,19 @@ subroutine rrtmgp_lw_cloud_optics_run(Model, ncol, ipsdlw0, icseed_lw, cld_frac, lw_cloud_props ! type(ty_gas_optics_rrtmgp),intent(in) :: & lw_gas_props - real(kind_phys), intent(in),dimension(ncol, model%levs, lw_gas_props%get_nband(),3) :: & - aerosolslw ! ! Outputs real(kind_phys), dimension(ncol,Model%levs), intent(out) :: & - cldtaulw ! approx 10.mu band layer cloud optical depth + cldtaulw ! approx 10.mu band layer cloud optical depth type(ty_optical_props_1scl),intent(out) :: & - lw_optical_props_clouds, & ! - lw_optical_props_aerosol ! + lw_optical_props_cloudsByBand ! integer, intent(out) :: & - errflg ! + errflg ! character(len=*), intent(out) :: & - errmsg ! + errmsg ! ! Local variables - integer :: iCol - integer,dimension(ncol) :: ipseed_lw logical,dimension(ncol,model%levs) :: liqmask, icemask - type(ty_optical_props_1scl) :: lw_optical_props_cloudsByBand - type(random_stat) :: rng_stat - real(kind_phys), dimension(lw_gas_props%get_ngpt(),model%levs,ncol) :: rng3D - real(kind_phys), dimension(lw_gas_props%get_ngpt()*model%levs) :: rng1D - logical, dimension(ncol,model%levs,lw_gas_props%get_ngpt()) :: cldfracMCICA real(kind_phys), dimension(ncol,model%levs,lw_gas_props%get_nband()) :: & tau_cld @@ -412,19 +395,6 @@ subroutine rrtmgp_lw_cloud_optics_run(Model, ncol, ipsdlw0, icseed_lw, cld_frac, errflg = 0 if (.not. Model%lslwr) return - - ! ####################################################################################### - ! Change random number seed value for each radiation invocation (isubclw =1 or 2). - ! ####################################################################################### - if(isubclw == 1) then ! advance prescribed permutation seed - do iCol = 1, nCol - ipseed_lw(iCol) = ipsdlw0 + iCol - enddo - elseif (isubclw == 2) then ! use input array of permutaion seeds - do iCol = 1, nCol - ipseed_lw(iCol) = icseed_lw(iCol) - enddo - endif ! ####################################################################################### ! Compute ice/liquid cloud masks, needed by rrtmgp_cloud_optics @@ -433,22 +403,11 @@ subroutine rrtmgp_lw_cloud_optics_run(Model, ncol, ipsdlw0, icseed_lw, cld_frac, icemask = (cld_frac .gt. 0 .and. cld_iwp .gt. 0) ! ####################################################################################### - ! Allocate space for RRTMGP DDTs containing cloud and aerosol radiative properties + ! Allocate space for RRTMGP DDTs containing cloud radiative properties ! ####################################################################################### ! Cloud optics [nCol,model%levs,nBands] call check_error_msg('rrtmgp_lw_cloud_optics_run',lw_optical_props_cloudsByBand%alloc_1scl(& ncol, model%levs, lw_gas_props%get_band_lims_wavenumber())) - ! Aerosol optics [nCol,model%levs,nBands] - call check_error_msg('rrtmgp_lw_cloud_optics_run',lw_optical_props_aerosol%alloc_1scl( & - ncol, model%levs, lw_gas_props%get_band_lims_wavenumber())) - ! Cloud optics [nCol,model%levs,nGpts] - call check_error_msg('rrtmgp_lw_cloud_optics_run',lw_optical_props_clouds%alloc_1scl( & - ncol, model%levs, lw_gas_props)) - - ! ####################################################################################### - ! Copy aerosol optical information to RRTMGP DDT - ! ####################################################################################### - lw_optical_props_aerosol%tau = aerosolslw(:,:,:,1) * (1. - aerosolslw(:,:,:,2)) ! ####################################################################################### ! Compute cloud-optics for RTE. @@ -478,27 +437,6 @@ subroutine rrtmgp_lw_cloud_optics_run(Model, ncol, ipsdlw0, icseed_lw, cld_frac, endif endif - ! ####################################################################################### - ! Call McICA to generate subcolumns. - ! ####################################################################################### - ! Call RNG. Mersennse Twister accepts 1D array, so loop over columns and collapse along G-points - ! and layers. ([nGpts,model%levs,nColumn]-> [nGpts*model%levs]*nColumn) - do iCol=1,ncol - call random_setseed(ipseed_lw(icol),rng_stat) - call random_number(rng1D,rng_stat) - rng3D(:,:,iCol) = reshape(source = rng1D,shape=[lw_gas_props%get_ngpt(),model%levs]) - enddo - - ! Call McICA - select case ( iovrlw ) - ! Maximumn-random - case(1) - call check_error_msg('rrtmgp_lw_cloud_optics_run',sampled_mask_max_ran(rng3D,cld_frac,cldfracMCICA)) - end select - - ! Map band optical depth to each g-point using McICA - call check_error_msg('rrtmgp_lw_cloud_optics_run',draw_samples(cldfracMCICA,lw_optical_props_cloudsByBand,lw_optical_props_clouds)) - ! GFS_RRTMGP_POST_RUN() requires the LW optical depth ~10microns cldtaulw = lw_optical_props_cloudsByBand%tau(:,:,7) diff --git a/physics/rrtmgp_lw_cloud_optics.meta b/physics/rrtmgp_lw_cloud_optics.meta index 53ea2bb2a..60daf2666 100644 --- a/physics/rrtmgp_lw_cloud_optics.meta +++ b/physics/rrtmgp_lw_cloud_optics.meta @@ -79,22 +79,6 @@ type = integer intent = in optional = F -[ipsdlw0] - standard_name = initial_permutation_seed_lw - long_name = initial seed for McICA LW - units = none - dimensions = () - type = integer - intent = in - optional = F -[icseed_lw] - standard_name = seed_random_numbers_lw_for_RRTMGP - long_name = seed for random number generation for longwave radiation - units = none - dimensions = (horizontal_dimension) - type = integer - intent = in - optional = F [cld_frac] standard_name = total_cloud_fraction long_name = layer total cloud fraction @@ -183,15 +167,6 @@ intent = in type = ty_cloud_optics optional = F -[aerosolslw] - standard_name = RRTMGP_aerosol_optical_properties_for_longwave_bands_01_16 - long_name = aerosol optical properties for longwave bands 01-16 - units = various - dimensions = (horizontal_dimension,vertical_dimension, number_of_lw_bands_rrtmgp,number_of_aerosol_output_fields_for_longwave_radiation) - type = real - kind = kind_phys - intent = in - optional = F [cldtaulw] standard_name = RRTMGP_cloud_optical_depth_layers_at_10mu_band long_name = approx 10mu band layer cloud optical depth @@ -201,16 +176,8 @@ kind = kind_phys intent = out optional = F -[lw_optical_props_clouds] - standard_name = longwave_optical_properties_for_cloudy_atmosphere - long_name = Fortran DDT containing RRTMGP optical properties - units = DDT - dimensions = () - type = ty_optical_props_1scl - intent = out - optional = F -[lw_optical_props_aerosol] - standard_name = longwave_optical_properties_for_aerosols +[lw_optical_props_cloudsByBand] + standard_name = longwave_optical_properties_for_cloudy_atmosphere_by_band long_name = Fortran DDT containing RRTMGP optical properties units = DDT dimensions = () diff --git a/physics/rrtmgp_lw_cloud_sampling.F90 b/physics/rrtmgp_lw_cloud_sampling.F90 new file mode 100644 index 000000000..60d13e6f1 --- /dev/null +++ b/physics/rrtmgp_lw_cloud_sampling.F90 @@ -0,0 +1,112 @@ +module rrtmgp_lw_cloud_sampling + use machine, only: kind_phys + use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp + use physparam, only: isubcsw, iovrsw + use mo_optical_props, only: ty_optical_props_1scl + use mo_cloud_sampling, only: sampled_mask_max_ran, sampled_mask_exp_ran, draw_samples + use mersenne_twister, only: random_setseed, random_number, random_stat + use rrtmgp_aux, only: check_error_msg + use netcdf + +contains + + ! ######################################################################################### + ! SUBROUTINE mcica_init + ! ######################################################################################### + subroutine rrtmgp_lw_cloud_sampling_init() + end subroutine rrtmgp_lw_cloud_sampling_init + + ! ######################################################################################### + ! SUBROTUINE rrtmgp_lw_cloud_sampling_run() + ! ######################################################################################### +!! \section arg_table_rrtmgp_lw_cloud_sampling_run +!! \htmlinclude rrtmgp_lw_cloud_sampling.html +!! + subroutine rrtmgp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, icseed_lw, cld_frac,& + lw_gas_props, lw_optical_props_cloudsByBand, lw_optical_props_clouds, errmsg, errflg) + + ! Inputs + logical, intent(in) :: & + doLWrad ! Logical flag for shortwave radiation call + integer, intent(in) :: & + nCol, & ! Number of horizontal gridpoints + nLev, & ! Number of vertical layers + ipsdlw0 ! Initial permutation seed for McICA + integer,intent(in),dimension(ncol) :: & + icseed_lw ! auxiliary special cloud related array when module + ! variable isubclw=2, it provides permutation seed + ! for each column profile that are used for generating + ! random numbers. when isubclw /=2, it will not be used. + real(kind_phys), dimension(ncol,nLev),intent(in) :: & + cld_frac ! Total cloud fraction by layer + type(ty_gas_optics_rrtmgp),intent(in) :: & + lw_gas_props ! RRTMGP DDT: K-distribution data + type(ty_optical_props_1scl),intent(in) :: & + lw_optical_props_cloudsByBand ! RRTMGP DDT: Shortwave optical properties (cloudy atmosphere) + + ! Outputs + character(len=*), intent(out) :: & + errmsg ! Error message + integer, intent(out) :: & + errflg ! Error code + type(ty_optical_props_1scl),intent(out) :: & + lw_optical_props_clouds ! RRTMGP DDT: Shortwave optical properties (cloudy atmosphere) + + ! Local variables + integer :: iCol + integer,dimension(ncol) :: ipseed_lw + type(random_stat) :: rng_stat + real(kind_phys), dimension(lw_gas_props%get_ngpt(),nLev,ncol) :: rng3D + real(kind_phys), dimension(lw_gas_props%get_ngpt()*nLev) :: rng1D + logical, dimension(ncol,nLev,lw_gas_props%get_ngpt()) :: cldfracMCICA + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + + if (.not. doLWrad) return + + ! Allocate space RRTMGP DDTs [nCol,nLev,nGpt] + call check_error_msg('rrtmgp_lw_cloud_sampling_run',& + lw_optical_props_clouds%alloc_1scl(nCol, nLev, lw_gas_props)) + + ! Change random number seed value for each radiation invocation (isubclw =1 or 2). + if(isubclw == 1) then ! advance prescribed permutation seed + do iCol = 1, ncol + ipseed_lw(iCol) = ipsdlw0 + iCol + enddo + elseif (isubclw == 2) then ! use input array of permutaion seeds + do iCol = 1, ncol + ipseed_lw(iCol) = icseed_lw(iCol) + enddo + endif + + ! Call McICA to generate subcolumns. + ! Call RNG. Mersennse Twister accepts 1D array, so loop over columns and collapse along G-points + ! and layers. ([nGpts,nLev,nColumn]-> [nGpts*nLev]*nColumn) + do iCol=1,ncol + call random_setseed(ipseed_lw(icol),rng_stat) + call random_number(rng1D,rng_stat) + rng3D(:,:,iCol) = reshape(source = rng1D,shape=[lw_gas_props%get_ngpt(),nLev]) + enddo + + ! Call McICA + select case ( iovrlw ) + ! Maximumn-random + case(1) + call check_error_msg('rrtmgp_lw_cloud_sampling_run',sampled_mask_max_ran(rng3D,cld_frac,cldfracMCICA)) + end select + + ! Map band optical depth to each g-point using McICA + call check_error_msg('rrtmgp_lw_cloud_sampling_run',draw_samples(& + cldfracMCICA,lw_optical_props_cloudsByBand,lw_optical_props_clouds)) + + end subroutine rrtmgp_lw_cloud_sampling_run + + ! ######################################################################################### + ! SUBROTUINE rrtmgp_lw_cloud_sampling_finalize() + ! ######################################################################################### + subroutine rrtmgp_lw_cloud_sampling_finalize() + end subroutine rrtmgp_lw_cloud_sampling_finalize + +end module rrtmgp_lw_cloud_sampling diff --git a/physics/rrtmgp_lw_cloud_sampling.meta b/physics/rrtmgp_lw_cloud_sampling.meta new file mode 100644 index 000000000..79d28d929 --- /dev/null +++ b/physics/rrtmgp_lw_cloud_sampling.meta @@ -0,0 +1,93 @@ +[ccpp-arg-table] + name = rrtmgp_lw_cloud_sampling_run + type = scheme +[doLWrad] + standard_name = flag_to_calc_lw + long_name = logical flags for lw radiation calls + units = flag + dimensions = () + type = logical + intent = in + optional = F +[ncol] + standard_name = horizontal_loop_extent + long_name = horizontal dimension + units = count + dimensions = () + type = integer + intent = in + optional = F +[nLev] + standard_name = vertical_dimension + long_name = number of vertical levels + units = count + dimensions = () + type = integer + intent = in + optional = F +[ipsdlw0] + standard_name = initial_permutation_seed_lw + long_name = initial seed for McICA LW + units = none + dimensions = () + type = integer + intent = in + optional = F +[icseed_lw] + standard_name = seed_random_numbers_lw_for_RRTMGP + long_name = seed for random number generation for longwave radiation + units = none + dimensions = (horizontal_dimension) + type = integer + intent = in + optional = F +[cld_frac] + standard_name = total_cloud_fraction + long_name = layer total cloud fraction + units = frac + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[lw_gas_props] + standard_name = coefficients_for_lw_gas_optics + long_name = DDT containing spectral information for RRTMGP LW radiation scheme + units = DDT + dimensions = () + type = ty_gas_optics_rrtmgp + intent = in + optional = F +[lw_optical_props_cloudsByBand] + standard_name = longwave_optical_properties_for_cloudy_atmosphere_by_band + long_name = Fortran DDT containing RRTMGP optical properties + units = DDT + dimensions = () + type = ty_optical_props_1scl + intent = in + optional = F +[lw_optical_props_clouds] + standard_name = longwave_optical_properties_for_cloudy_atmosphere + long_name = Fortran DDT containing RRTMGP optical properties + units = DDT + dimensions = () + type = ty_optical_props_1scl + intent = out + optional = F +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out + optional = F +[errflg] + standard_name = ccpp_error_flag + long_name = error flag for error handling in CCPP + units = flag + dimensions = () + type = integer + intent = out + optional = F \ No newline at end of file diff --git a/physics/rrtmgp_sw_aerosol_optics.F90 b/physics/rrtmgp_sw_aerosol_optics.F90 new file mode 100644 index 000000000..566ecba68 --- /dev/null +++ b/physics/rrtmgp_sw_aerosol_optics.F90 @@ -0,0 +1,115 @@ +module rrtmgp_sw_aerosol_optics + use machine, only: kind_phys + use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp + use mo_optical_props, only: ty_optical_props_2str + use rrtmgp_aux, only: check_error_msg + use module_radiation_aerosols, only: & + NF_AESW, & ! Number of optical-fields in SW output (3=tau+g+omega) + NF_AELW, & ! Number of optical-fields in LW output (3=tau+g+omega) + setaer, & ! Routine to compute aerosol radiative properties (tau,g,omega) + NSPC1 ! Number of species for vertically integrated aerosol optical-depth + use netcdf + + public rrtmgp_sw_aerosol_optics_init, rrtmgp_sw_aerosol_optics_run, rrtmgp_sw_aerosol_optics_finalize +contains + + ! ######################################################################################### + ! SUBROUTINE rrtmgp_sw_aerosol_optics_init() + ! ######################################################################################### + subroutine rrtmgp_sw_aerosol_optics_init() + end subroutine rrtmgp_sw_aerosol_optics_init + + ! ######################################################################################### + ! SUBROUTINE rrtmgp_sw_aerosol_optics_run() + ! ######################################################################################### +!! \section arg_table_rrtmgp_sw_aerosol_optics_run +!! \htmlinclude rrtmgp_sw_aerosol_optics.html +!! + subroutine rrtmgp_sw_aerosol_optics_run(doSWrad, nCol, nLev, nTracer, nDay, idxday, p_lev,& + p_lay, p_lk, tv_lay, relhum, lsmask, tracer, lon, lat, lw_gas_props, sw_gas_props, & + aerodp, sw_optical_props_aerosol, errmsg, errflg) + + ! Inputs + logical, intent(in) :: & + doSWrad ! Logical flag for shortwave radiation call + integer, intent(in) :: & + nCol, & ! Number of horizontal grid points + nDay, & ! Number of daylit points + nLev, & ! Number of vertical layers + nTracer ! Number of tracers + integer,intent(in),dimension(nCol) :: & + idxday ! Indices for daylit points. + real(kind_phys), dimension(nCol), intent(in) :: & + lon, & ! Longitude + lat, & ! Latitude + lsmask ! Land/sea/sea-ice mask + real(kind_phys), dimension(nCol,Nlev),intent(in) :: & + p_lay, & ! Pressure @ layer-centers (Pa) + tv_lay, & ! Virtual-temperature @ layer-centers (K) + relhum, & ! Relative-humidity @ layer-centers + p_lk ! Exner function @ layer-centers (1) + real(kind_phys), dimension(nCol, nLev, nTracer),intent(in) :: & + tracer ! trace gas concentrations + real(kind_phys), dimension(nCol,nLev+1),intent(in) :: & + p_lev ! Pressure @ layer-interfaces (Pa) + type(ty_gas_optics_rrtmgp),intent(in) :: & + sw_gas_props ! RRTMGP DDT: spectral information for SW calculation + type(ty_gas_optics_rrtmgp),intent(in) :: & + lw_gas_props ! RRTMGP DDT: spectral information for LW calculation + + ! Outputs + real(kind_phys), dimension(nCol,NSPC1), intent(inout) :: & + aerodp ! Vertical integrated optical depth for various aerosol species + type(ty_optical_props_2str),intent(out) :: & + sw_optical_props_aerosol ! RRTMGP DDT: Longwave aerosol optical properties (tau) + integer, intent(out) :: & + errflg ! + character(len=*), intent(out) :: & + errmsg ! + + ! Local variables + real(kind_phys), dimension(nCol, nLev, lw_gas_props%get_nband(), NF_AELW) :: & + aerosolslw ! + real(kind_phys), dimension(nCol, nLev, sw_gas_props%get_nband(), NF_AESW) :: & + aerosolssw, aerosolssw2 + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + + if (.not. doSWrad) return + if (nDay .gt. 0) then + + ! Call module_radiation_aerosols::setaer(),to setup aerosols property profile + call setaer(p_lev, p_lay, p_lk, tv_lay, relhum, lsmask, tracer, lon, lat, nCol, nLev, & + nLev+1, .true., .true., aerosolssw2, aerosolslw, aerodp) + + ! Store aerosol optical properties + ! SW. + ! For RRTMGP SW the bands are now ordered from [IR(band) -> nIR -> UV], in RRTMG the + ! band ordering was [nIR -> UV -> IR(band)] + aerosolssw(1:nCol,:,1,1) = aerosolssw2(1:nCol,:,sw_gas_props%get_nband(),1) + aerosolssw(1:nCol,:,1,2) = aerosolssw2(1:nCol,:,sw_gas_props%get_nband(),2) + aerosolssw(1:nCol,:,1,3) = aerosolssw2(1:nCol,:,sw_gas_props%get_nband(),3) + aerosolssw(1:nCol,:,2:sw_gas_props%get_nband(),1) = aerosolssw2(1:nCol,:,1:sw_gas_props%get_nband()-1,1) + aerosolssw(1:nCol,:,2:sw_gas_props%get_nband(),2) = aerosolssw2(1:nCol,:,1:sw_gas_props%get_nband()-1,2) + aerosolssw(1:nCol,:,2:sw_gas_props%get_nband(),3) = aerosolssw2(1:nCol,:,1:sw_gas_props%get_nband()-1,3) + + ! Allocate RRTMGP DDT: Aerosol optics [nCol,nlev,nBands] + call check_error_msg('rrtmgp_sw_aerosol_optics_run',sw_optical_props_aerosol%alloc_2str( & + nDay, nlev, sw_gas_props%get_band_lims_wavenumber())) + + ! Copy aerosol optical information to RRTMGP DDT + sw_optical_props_aerosol%tau = aerosolssw(idxday(1:nday),:,:,1) + sw_optical_props_aerosol%ssa = aerosolssw(idxday(1:nday),:,:,2) + sw_optical_props_aerosol%g = aerosolssw(idxday(1:nday),:,:,3) + endif + + end subroutine rrtmgp_sw_aerosol_optics_run + + ! ######################################################################################### + ! SUBROUTINE rrtmgp_sw_aerosol_optics_finalize() + ! ######################################################################################### + subroutine rrtmgp_sw_aerosol_optics_finalize() + end subroutine rrtmgp_sw_aerosol_optics_finalize +end module rrtmgp_sw_aerosol_optics diff --git a/physics/rrtmgp_sw_aerosol_optics.meta b/physics/rrtmgp_sw_aerosol_optics.meta new file mode 100644 index 000000000..20240327f --- /dev/null +++ b/physics/rrtmgp_sw_aerosol_optics.meta @@ -0,0 +1,182 @@ +[ccpp-arg-table] + name = rrtmgp_sw_aerosol_optics_run + type = scheme +[doSWrad] + standard_name = flag_to_calc_sw + long_name = logical flags for sw radiation calls + units = flag + dimensions = () + type = logical + intent = in + optional = F +[ncol] + standard_name = horizontal_loop_extent + long_name = horizontal dimension + units = count + dimensions = () + type = integer + intent = in + optional = F +[nLev] + standard_name = vertical_dimension + long_name = number of vertical levels + units = count + dimensions = () + type = integer + intent = in + optional = F +[nTracer] + standard_name = number_of_tracers + long_name = number of tracers + units = count + dimensions = () + type = integer + intent = in + optional = F +[nday] + standard_name = daytime_points_dimension + long_name = daytime points dimension + units = count + dimensions = () + type = integer + intent = in + optional = F +[idxday] + standard_name = daytime_points + long_name = daytime points + units = index + dimensions = (horizontal_dimension) + type = integer + intent = in + optional = F +[p_lev] + standard_name = air_pressure_at_interface_for_RRTMGP_in_hPa + long_name = air pressure at vertical interface for radiation calculation + units = hPa + dimensions = (horizontal_dimension,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = in + optional = F +[p_lay] + standard_name = air_pressure_at_layer_for_RRTMGP_in_hPa + long_name = air pressure at vertical layer for radiation calculation + units = hPa + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[p_lk] + standard_name = dimensionless_exner_function_at_model_layers + long_name = dimensionless Exner function at model layer centers + units = none + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[tv_lay] + standard_name = virtual_temperature + long_name = layer virtual temperature + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[relhum] + standard_name = relative_humidity + long_name = layer relative humidity + units = frac + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[lsmask] + standard_name = sea_land_ice_mask_real + long_name = landmask: sea/land/ice=0/1/2 + units = flag + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[tracer] + standard_name = chemical_tracers + long_name = chemical tracers + units = g g-1 + dimensions = (horizontal_dimension,vertical_dimension,number_of_tracers) + type = real + kind = kind_phys + intent = in + optional = F +[lon] + standard_name = longitude + long_name = longitude + units = radians + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[lat] + standard_name = latitude + long_name = latitude + units = radians + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[lw_gas_props] + standard_name = coefficients_for_lw_gas_optics + long_name = DDT containing spectral information for RRTMGP LW radiation scheme + units = DDT + dimensions = () + intent = in + type = ty_gas_optics_rrtmgp + optional = F +[sw_gas_props] + standard_name = coefficients_for_sw_gas_optics + long_name = DDT containing spectral information for RRTMGP SW radiation scheme + units = DDT + dimensions = () + type = ty_gas_optics_rrtmgp + intent = in + optional = F +[aerodp] + standard_name = atmosphere_optical_thickness_due_to_ambient_aerosol_particles + long_name = vertical integrated optical depth for various aerosol species + units = none + dimensions = (horizontal_dimension,number_of_species_for_aerosol_optical_depth) + type = real + kind = kind_phys + intent = inout + optional = F +[sw_optical_props_aerosol] + standard_name = shortwave_optical_properties_for_aerosols + long_name = Fortran DDT containing RRTMGP optical properties + units = DDT + dimensions = () + type = ty_optical_props_2str + intent = out + optional = F +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out + optional = F +[errflg] + standard_name = ccpp_error_flag + long_name = error flag for error handling in CCPP + units = flag + dimensions = () + type = integer + intent = out + optional = F \ No newline at end of file diff --git a/physics/rrtmgp_sw_cloud_optics.F90 b/physics/rrtmgp_sw_cloud_optics.F90 index 2f09d7859..10c837622 100644 --- a/physics/rrtmgp_sw_cloud_optics.F90 +++ b/physics/rrtmgp_sw_cloud_optics.F90 @@ -6,8 +6,6 @@ module rrtmgp_sw_cloud_optics use mo_cloud_optics, only: ty_cloud_optics use physparam, only: isubcsw, iovrsw use mo_optical_props, only: ty_optical_props_2str - use mo_cloud_sampling, only: sampled_mask_max_ran, sampled_mask_exp_ran, draw_samples - use mersenne_twister, only: random_setseed, random_number, random_stat use mo_rrtmg_sw_cloud_optics, only: rrtmg_sw_cloud_optics use rrtmgp_aux, only: check_error_msg use netcdf @@ -349,25 +347,18 @@ end subroutine rrtmgp_sw_cloud_optics_init !! \section arg_table_rrtmgp_sw_cloud_optics_run !! \htmlinclude rrtmgp_sw_cloud_optics.html !! - subroutine rrtmgp_sw_cloud_optics_run(Model, ncol, icseed_sw, cld_frac, cld_lwp, & - cld_reliq, cld_iwp, cld_reice, cld_swp, cld_resnow, cld_rwp, cld_rerain, aerosolssw, & - sw_cloud_props, sw_gas_props, ipsdsw0, nday, idxday, sw_optical_props_clouds, & - sw_optical_props_aerosol, cldtausw, errmsg, errflg) + subroutine rrtmgp_sw_cloud_optics_run(Model, ncol, cld_frac, cld_lwp, cld_reliq, cld_iwp, & + cld_reice, cld_swp, cld_resnow, cld_rwp, cld_rerain, sw_cloud_props, sw_gas_props, & + nday, idxday, sw_optical_props_cloudsByBand, cldtausw, errmsg, errflg) ! Inputs type(GFS_control_type), intent(in) :: & Model integer, intent(in) :: & ncol, & ! Number of horizontal gridpoints - nday, & ! Number of daylit points. - ipsdsw0 ! Initial permutation seed for McICA + nday ! Number of daylit points. integer,intent(in),dimension(ncol) :: & idxday ! Indices for daylit points. - integer,intent(in),dimension(ncol) :: & - icseed_sw ! auxiliary special cloud related array when module - ! variable isubcsw=2, it provides permutation seed - ! for each column profile that are used for generating - ! random numbers. when isubcsw /=2, it will not be used. real(kind_phys), dimension(ncol,model%levs),intent(in) :: & cld_frac, & ! Total cloud fraction by layer cld_lwp, & ! Cloud liquid water path @@ -382,8 +373,6 @@ subroutine rrtmgp_sw_cloud_optics_run(Model, ncol, icseed_sw, cld_frac, cld_lwp, sw_cloud_props ! RRTMGP DDT: type(ty_gas_optics_rrtmgp),intent(in) :: & sw_gas_props ! RRTMGP DDT: K-distribution data - real(kind_phys), intent(in),dimension(ncol, model%levs, sw_gas_props%get_nband(),3) :: & - aerosolssw ! Shortwave aerosol optical properties, by band (tau,ssa,g) ! Outputs character(len=*), intent(out) :: & @@ -391,20 +380,12 @@ subroutine rrtmgp_sw_cloud_optics_run(Model, ncol, icseed_sw, cld_frac, cld_lwp, integer, intent(out) :: & errflg ! Error code type(ty_optical_props_2str),intent(out) :: & - sw_optical_props_clouds, & ! RRTMGP DDT: Shortwave optical properties (cloudy atmosphere) - sw_optical_props_aerosol ! RRTMGP DDT: Shortwave optical properties (aerosols) + sw_optical_props_cloudsByBand ! RRTMGP DDT: Shortwave optical properties (cloudy atmosphere) real(kind_phys), dimension(ncol,Model%levs), intent(out) :: & cldtausw ! approx 10.mu band layer cloud optical depth ! Local variables - integer :: iCol - integer,dimension(ncol) :: ipseed_sw logical,dimension(nday,model%levs) :: liqmask, icemask - type(ty_optical_props_2str) :: sw_optical_props_cloudsByBand - type(random_stat) :: rng_stat - real(kind_phys), dimension(sw_gas_props%get_ngpt(),model%levs,ncol) :: rng3D - real(kind_phys), dimension(sw_gas_props%get_ngpt()*model%levs) :: rng1D - logical, dimension(ncol,model%levs,sw_gas_props%get_ngpt()) :: cldfracMCICA real(kind_phys), dimension(nday,model%levs,sw_gas_props%get_nband()) :: & tau_cld, ssa_cld, asy_cld @@ -422,25 +403,12 @@ subroutine rrtmgp_sw_cloud_optics_run(Model, ncol, icseed_sw, cld_frac, cld_lwp, icemask = (cld_frac(idxday(1:nday),:) .gt. 0 .and. cld_iwp(idxday(1:nday),:) .gt. 0) ! ####################################################################################### - ! Allocate space for RRTMGP DDTs containing cloud and aerosol radiative properties + ! Allocate space for RRTMGP DDTs containing cloud radiative properties ! ####################################################################################### ! Cloud optics [nday,model%levs,nBands] call check_error_msg('rrtmgp_sw_cloud_optics_run',sw_optical_props_cloudsByBand%alloc_2str(& nday, model%levs, sw_gas_props%get_band_lims_wavenumber())) - ! Aerosol optics [nday,model%levs,nBands] - call check_error_msg('rrtmgp_sw_cloud_optics_run',sw_optical_props_aerosol%alloc_2str( & - nday, model%levs, sw_gas_props%get_band_lims_wavenumber())) - ! Cloud optics [nday,model%levs,nGpt] - call check_error_msg('rrtmgp_sw_cloud_optics_run',sw_optical_props_clouds%alloc_2str( & - nday, model%levs, sw_gas_props)) - - ! ####################################################################################### - ! Copy aerosol optical information to RRTMGP DDT - ! ####################################################################################### - sw_optical_props_aerosol%tau = aerosolssw(idxday(1:nday),:,:,1) - sw_optical_props_aerosol%ssa = aerosolssw(idxday(1:nday),:,:,2) - sw_optical_props_aerosol%g = aerosolssw(idxday(1:nday),:,:,3) - + ! ####################################################################################### ! Compute cloud-optics for RTE. ! ####################################################################################### @@ -458,7 +426,7 @@ subroutine rrtmgp_sw_cloud_optics_run(Model, ncol, icseed_sw, cld_frac, cld_lwp, cld_reliq(idxday(1:nday),:), & ! IN - Cloud liquid effective radius cld_reice(idxday(1:nday),:), & ! IN - Cloud ice effective radius sw_optical_props_cloudsByBand)) ! OUT - RRTMGP DDT: Shortwave optical properties, - ! in each band (tau,ssa,g) + ! in each band (tau,ssa,g) else ! RRTMG cloud-optics if (any(cld_frac .gt. 0)) then @@ -477,41 +445,6 @@ subroutine rrtmgp_sw_cloud_optics_run(Model, ncol, icseed_sw, cld_frac, cld_lwp, endif endif - ! ####################################################################################### - ! Change random number seed value for each radiation invocation (isubcsw =1 or 2). - ! ####################################################################################### - if(isubcsw == 1) then ! advance prescribed permutation seed - do iCol = 1, ncol - ipseed_sw(iCol) = ipsdsw0 + iCol - enddo - elseif (isubcsw == 2) then ! use input array of permutaion seeds - do iCol = 1, ncol - ipseed_sw(iCol) = icseed_sw(iCol) - enddo - endif - - ! ####################################################################################### - ! Call McICA to generate subcolumns. - ! ####################################################################################### - ! Call RNG. Mersennse Twister accepts 1D array, so loop over columns and collapse along G-points - ! and layers. ([nGpts,model%levs,nColumn]-> [nGpts*model%levs]*nColumn) - do iCol=1,ncol - call random_setseed(ipseed_sw(icol),rng_stat) - call random_number(rng1D,rng_stat) - rng3D(:,:,iCol) = reshape(source = rng1D,shape=[sw_gas_props%get_ngpt(),model%levs]) - enddo - - ! Call McICA - select case ( iovrsw ) - ! Maximumn-random - case(1) - call check_error_msg('rrtmgp_sw_cloud_optics_run',sampled_mask_max_ran(rng3D,cld_frac,cldfracMCICA)) - end select - - ! Map band optical depth to each g-point using McICA - call check_error_msg('rrtmgp_sw_cloud_optics_run',draw_samples(& - cldfracMCICA(idxday(1:nDay),:,:),sw_optical_props_cloudsByBand,sw_optical_props_clouds)) - ! GFS_RRTMGP_POST_RUN() requires the SW optical depth ~0.55microns cldtausw(idxday(1:nDay),:) = sw_optical_props_cloudsByBand%tau(:,:,11) endif diff --git a/physics/rrtmgp_sw_cloud_optics.meta b/physics/rrtmgp_sw_cloud_optics.meta index 0e0e968ab..283270081 100644 --- a/physics/rrtmgp_sw_cloud_optics.meta +++ b/physics/rrtmgp_sw_cloud_optics.meta @@ -160,23 +160,6 @@ kind = kind_phys intent = in optional = F -[icseed_sw] - standard_name = seed_random_numbers_sw_for_RRTMGP - long_name = seed for random number generation for shortwave radiation - units = none - dimensions = (horizontal_dimension) - type = integer - intent = in - optional = F -[aerosolssw] - standard_name = RRTMGP_aerosol_optical_properties_for_shortwave_bands_01_16 - long_name = aerosol optical properties for shortwave bands 01-16 - units = various - dimensions = (horizontal_dimension,vertical_dimension,number_of_lw_bands_rrtmgp,number_of_aerosol_output_fields_for_shortwave_radiation) - type = real - kind = kind_phys - intent = in - optional = F [sw_cloud_props] standard_name = coefficients_for_sw_cloud_optics long_name = DDT containing spectral information for cloudy RRTMGP SW radiation scheme @@ -193,14 +176,6 @@ type = ty_gas_optics_rrtmgp intent = in optional = F -[ipsdsw0] - standard_name = initial_permutation_seed_sw - long_name = initial seed for McICA SW - units = none - dimensions = () - type = integer - intent = in - optional = F [nday] standard_name = daytime_points_dimension long_name = daytime points dimension @@ -217,16 +192,8 @@ type = integer intent = in optional = F -[sw_optical_props_clouds] - standard_name = shortwave_optical_properties_for_cloudy_atmosphere - long_name = Fortran DDT containing RRTMGP optical properties - units = DDT - dimensions = () - type = ty_optical_props_2str - intent = out - optional = F -[sw_optical_props_aerosol] - standard_name = shortwave_optical_properties_for_aerosols +[sw_optical_props_cloudsByBand] + standard_name = shortwave_optical_properties_for_cloudy_atmosphere_by_band long_name = Fortran DDT containing RRTMGP optical properties units = DDT dimensions = () diff --git a/physics/rrtmgp_sw_cloud_sampling.F90 b/physics/rrtmgp_sw_cloud_sampling.F90 new file mode 100644 index 000000000..504e5f733 --- /dev/null +++ b/physics/rrtmgp_sw_cloud_sampling.F90 @@ -0,0 +1,119 @@ +module rrtmgp_sw_cloud_sampling + use machine, only: kind_phys + use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp + use physparam, only: isubcsw, iovrsw + use mo_optical_props, only: ty_optical_props_2str + use mo_cloud_sampling, only: sampled_mask_max_ran, sampled_mask_exp_ran, draw_samples + use mersenne_twister, only: random_setseed, random_number, random_stat + use rrtmgp_aux, only: check_error_msg + use netcdf + +contains + + ! ######################################################################################### + ! SUBROUTINE mcica_init + ! ######################################################################################### + subroutine rrtmgp_sw_cloud_sampling_init() + end subroutine rrtmgp_sw_cloud_sampling_init + + ! ######################################################################################### + ! SUBROTUINE rrtmgp_sw_cloud_sampling_run() + ! ######################################################################################### +!! \section arg_table_rrtmgp_sw_cloud_sampling_run +!! \htmlinclude rrtmgp_sw_cloud_sampling.html +!! + subroutine rrtmgp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw0, idxday, & + icseed_sw, cld_frac, sw_gas_props, sw_optical_props_cloudsByBand, & + sw_optical_props_clouds, errmsg, errflg) + + ! Inputs + logical, intent(in) :: & + doSWrad ! Logical flag for shortwave radiation call + integer, intent(in) :: & + nCol, & ! Number of horizontal gridpoints + nDay, & ! Number of daylit points. + nLev, & ! Number of vertical layers + ipsdsw0 ! Initial permutation seed for McICA + integer,intent(in),dimension(ncol) :: & + idxday ! Indices for daylit points. + integer,intent(in),dimension(ncol) :: & + icseed_sw ! auxiliary special cloud related array when module + ! variable isubcsw=2, it provides permutation seed + ! for each column profile that are used for generating + ! random numbers. when isubcsw /=2, it will not be used. + real(kind_phys), dimension(ncol,nLev),intent(in) :: & + cld_frac ! Total cloud fraction by layer + type(ty_gas_optics_rrtmgp),intent(in) :: & + sw_gas_props ! RRTMGP DDT: K-distribution data + type(ty_optical_props_2str),intent(in) :: & + sw_optical_props_cloudsByBand ! RRTMGP DDT: Shortwave optical properties (cloudy atmosphere) + + ! Outputs + character(len=*), intent(out) :: & + errmsg ! Error message + integer, intent(out) :: & + errflg ! Error code + type(ty_optical_props_2str),intent(out) :: & + sw_optical_props_clouds ! RRTMGP DDT: Shortwave optical properties (cloudy atmosphere) + + ! Local variables + integer :: iCol + integer,dimension(ncol) :: ipseed_sw + type(random_stat) :: rng_stat + real(kind_phys), dimension(sw_gas_props%get_ngpt(),nLev,ncol) :: rng3D + real(kind_phys), dimension(sw_gas_props%get_ngpt()*nLev) :: rng1D + logical, dimension(ncol,nLev,sw_gas_props%get_ngpt()) :: cldfracMCICA + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + + if (.not. doSWrad) return + if (nDay .gt. 0) then + + ! Allocate space RRTMGP DDTs [nday,nLev,nGpt] + call check_error_msg('rrtmgp_sw_cloud_sampling_run',sw_optical_props_clouds%alloc_2str( & + nday, nLev, sw_gas_props)) + + ! Change random number seed value for each radiation invocation (isubcsw =1 or 2). + if(isubcsw == 1) then ! advance prescribed permutation seed + do iCol = 1, ncol + ipseed_sw(iCol) = ipsdsw0 + iCol + enddo + elseif (isubcsw == 2) then ! use input array of permutaion seeds + do iCol = 1, ncol + ipseed_sw(iCol) = icseed_sw(iCol) + enddo + endif + + ! Call McICA to generate subcolumns. + ! Call RNG. Mersennse Twister accepts 1D array, so loop over columns and collapse along G-points + ! and layers. ([nGpts,nLev,nColumn]-> [nGpts*nLev]*nColumn) + do iCol=1,ncol + call random_setseed(ipseed_sw(icol),rng_stat) + call random_number(rng1D,rng_stat) + rng3D(:,:,iCol) = reshape(source = rng1D,shape=[sw_gas_props%get_ngpt(),nLev]) + enddo + + ! Call McICA + select case ( iovrsw ) + ! Maximumn-random + case(1) + call check_error_msg('rrtmgp_sw_cloud_sampling_run',sampled_mask_max_ran(rng3D,cld_frac,cldfracMCICA)) + end select + + ! Map band optical depth to each g-point using McICA + call check_error_msg('rrtmgp_sw_cloud_sampling_run',draw_samples(& + cldfracMCICA(idxday(1:nDay),:,:),sw_optical_props_cloudsByBand,sw_optical_props_clouds)) + + endif + + end subroutine rrtmgp_sw_cloud_sampling_run + + ! ######################################################################################### + ! SUBROTUINE rrtmgp_sw_cloud_sampling_finalize() + ! ######################################################################################### + subroutine rrtmgp_sw_cloud_sampling_finalize() + end subroutine rrtmgp_sw_cloud_sampling_finalize + +end module rrtmgp_sw_cloud_sampling diff --git a/physics/rrtmgp_sw_cloud_sampling.meta b/physics/rrtmgp_sw_cloud_sampling.meta new file mode 100644 index 000000000..1ffe9ba84 --- /dev/null +++ b/physics/rrtmgp_sw_cloud_sampling.meta @@ -0,0 +1,109 @@ +[ccpp-arg-table] + name = rrtmgp_sw_cloud_sampling_run + type = scheme +[doSWrad] + standard_name = flag_to_calc_sw + long_name = logical flags for sw radiation calls + units = flag + dimensions = () + type = logical + intent = in + optional = F +[ncol] + standard_name = horizontal_loop_extent + long_name = horizontal dimension + units = count + dimensions = () + type = integer + intent = in + optional = F +[nday] + standard_name = daytime_points_dimension + long_name = daytime points dimension + units = count + dimensions = () + type = integer + intent = in + optional = F +[nLev] + standard_name = vertical_dimension + long_name = number of vertical levels + units = count + dimensions = () + type = integer + intent = in + optional = F +[ipsdsw0] + standard_name = initial_permutation_seed_sw + long_name = initial seed for McICA SW + units = none + dimensions = () + type = integer + intent = in + optional = F +[idxday] + standard_name = daytime_points + long_name = daytime points + units = index + dimensions = (horizontal_dimension) + type = integer + intent = in + optional = F +[icseed_sw] + standard_name = seed_random_numbers_sw_for_RRTMGP + long_name = seed for random number generation for shortwave radiation + units = none + dimensions = (horizontal_dimension) + type = integer + intent = in + optional = F +[cld_frac] + standard_name = total_cloud_fraction + long_name = layer total cloud fraction + units = frac + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[sw_gas_props] + standard_name = coefficients_for_sw_gas_optics + long_name = DDT containing spectral information for RRTMGP SW radiation scheme + units = DDT + dimensions = () + type = ty_gas_optics_rrtmgp + intent = in + optional = F +[sw_optical_props_cloudsByBand] + standard_name = shortwave_optical_properties_for_cloudy_atmosphere_by_band + long_name = Fortran DDT containing RRTMGP optical properties + units = DDT + dimensions = () + type = ty_optical_props_2str + intent = in + optional = F +[sw_optical_props_clouds] + standard_name = shortwave_optical_properties_for_cloudy_atmosphere + long_name = Fortran DDT containing RRTMGP optical properties + units = DDT + dimensions = () + type = ty_optical_props_2str + intent = out + optional = F +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out + optional = F +[errflg] + standard_name = ccpp_error_flag + long_name = error flag for error handling in CCPP + units = flag + dimensions = () + type = integer + intent = out + optional = F \ No newline at end of file From def30ce6634e68ccfc8e6e188f11b748e7fb6fb1 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Thu, 12 Dec 2019 17:09:10 -0700 Subject: [PATCH 090/167] Started removing GFS DDTs from RRTMGP scheme. --- physics/GFS_rrtmgp_pre.F90 | 9 +- physics/GFS_rrtmgp_pre.meta | 9 ++ physics/rrtmgp_lw_cloud_optics.F90 | 124 ++++++++++++++-------------- physics/rrtmgp_lw_cloud_optics.meta | 72 +++++++++++++--- physics/rrtmgp_lw_gas_optics.F90 | 77 ++++++++--------- physics/rrtmgp_lw_gas_optics.meta | 109 +++++++++++++++--------- physics/rrtmgp_sw_gas_optics.F90 | 81 ++++++++++-------- physics/rrtmgp_sw_gas_optics.meta | 114 +++++++++++++++++-------- physics/rrtmgp_sw_rte.F90 | 14 +++- physics/rrtmgp_sw_rte.meta | 17 ++++ 10 files changed, 396 insertions(+), 230 deletions(-) diff --git a/physics/GFS_rrtmgp_pre.F90 b/physics/GFS_rrtmgp_pre.F90 index 05c853fd3..efc4312ae 100644 --- a/physics/GFS_rrtmgp_pre.F90 +++ b/physics/GFS_rrtmgp_pre.F90 @@ -67,13 +67,16 @@ module GFS_rrtmgp_pre !! \section arg_table_GFS_rrtmgp_pre_init !! \htmlinclude GFS_rrtmgp_pre_init.html !! - subroutine GFS_rrtmgp_pre_init(Model, Radtend, errmsg, errflg) + subroutine GFS_rrtmgp_pre_init(Model, Radtend, active_gases_array, errmsg, errflg) ! Inputs type(GFS_control_type), intent(inout) :: & Model ! DDT: FV3-GFS model control parameters type(GFS_radtend_type), intent(inout) :: & - Radtend ! DDT: FV3-GFS radiation tendencies + Radtend ! DDT: FV3-GFS radiation tendencies + ! Outputs + character(len=128),dimension(Model%ngases), intent(out) :: & + active_gases_array ! Character array containing trace gases to include in RRTMGP character(len=*), intent(out) :: & errmsg ! Error message integer, intent(out) :: & @@ -106,7 +109,7 @@ subroutine GFS_rrtmgp_pre_init(Model, Radtend, errmsg, errflg) gasIndices(Model%ngases,2)=len(trim(Model%active_gases)) ! Now extract the gas names do ij=1,Model%ngases - Model%active_gases_array(ij) = Model%active_gases(gasIndices(ij,1):gasIndices(ij,2)) + active_gases_array(ij) = Model%active_gases(gasIndices(ij,1):gasIndices(ij,2)) enddo endif end subroutine GFS_rrtmgp_pre_init diff --git a/physics/GFS_rrtmgp_pre.meta b/physics/GFS_rrtmgp_pre.meta index 84fe20907..87934aa24 100644 --- a/physics/GFS_rrtmgp_pre.meta +++ b/physics/GFS_rrtmgp_pre.meta @@ -17,6 +17,15 @@ type = GFS_radtend_type intent = inout optional = F +[active_gases_array] + standard_name = list_of_active_gases_used_by_RRTMGP + long_name = list of active gases used by RRTMGP + units = none + dimensions = (number_of_active_gases_used_by_RRTMGP) + type = character + kind = len=128 + intent = out + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP diff --git a/physics/rrtmgp_lw_cloud_optics.F90 b/physics/rrtmgp_lw_cloud_optics.F90 index 794b679ef..418fe8cbf 100644 --- a/physics/rrtmgp_lw_cloud_optics.F90 +++ b/physics/rrtmgp_lw_cloud_optics.F90 @@ -1,15 +1,9 @@ -!>\file rrtmgp_lw_cloud_optics.F90 -!! This file contains module rrtmgp_lw_cloud_optics use machine, only: kind_phys - use GFS_typedefs, only: GFS_control_type use mo_rte_kind, only: wl use mo_cloud_optics, only: ty_cloud_optics use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp - use physparam, only: isubclw, iovrlw use mo_optical_props, only: ty_optical_props_1scl - use mo_cloud_sampling, only: sampled_mask_max_ran, sampled_mask_exp_ran, draw_samples - use mersenne_twister, only: random_setseed, random_number, random_stat use mo_rrtmg_lw_cloud_optics, only: rrtmg_lw_cloud_optics use rrtmgp_aux, only: check_error_msg use netcdf @@ -17,33 +11,36 @@ module rrtmgp_lw_cloud_optics public rrtmgp_lw_cloud_optics_init, rrtmgp_lw_cloud_optics_run, rrtmgp_lw_cloud_optics_finalize contains -!! \section arg_table_rrtmgp_lw_cloud_optics_init -!! \htmlinclude rrtmgp_lw_cloud_optics.html -!! ! ######################################################################################### ! SUBROUTINE rrtmgp_lw_cloud_optics_init() ! ######################################################################################### - subroutine rrtmgp_lw_cloud_optics_init(Model, mpicomm, mpirank, mpiroot, lw_cloud_props, & - errmsg, errflg) +!! \section arg_table_rrtmgp_lw_cloud_optics_init +!! \htmlinclude rrtmgp_lw_cloud_optics.html +!! + subroutine rrtmgp_lw_cloud_optics_init(cld_optics_scheme, nrghice, rrtmgp_root_dir, & + rrtmgp_lw_file_clouds, mpicomm, mpirank, mpiroot, lw_cloud_props, errmsg, errflg) !#ifdef MPI ! use mpi !#endif ! Inputs - type(GFS_control_type), intent(in) :: & - Model ! DDT containing model control parameters - integer,intent(in) :: & - mpicomm, & ! MPI communicator - mpirank, & ! Current MPI rank - mpiroot ! Master MPI rank + integer, intent(in) :: & + nrghice, & ! Number of ice-roughness categories + cld_optics_scheme, & ! Cloud-optics scheme + mpicomm, & ! MPI communicator + mpirank, & ! Current MPI rank + mpiroot ! Master MPI rank + character(len=128),intent(in) :: & + rrtmgp_root_dir, & ! RTE-RRTMGP root directory + rrtmgp_lw_file_clouds ! RRTMGP file containing coefficients used to compute clouds optical properties ! Outputs type(ty_cloud_optics),intent(out) :: & - lw_cloud_props ! DDT containing spectral information for RRTMGP LW radiation scheme + lw_cloud_props ! RRTMGP DDT: spectral information for RRTMGP LW radiation scheme character(len=*), intent(out) :: & - errmsg ! Error message + errmsg ! Error message integer, intent(out) :: & - errflg ! Error code + errflg ! Error code ! Variables that will be passed to cloud_optics%load() real(kind_phys) :: & @@ -101,10 +98,10 @@ subroutine rrtmgp_lw_cloud_optics_init(Model, mpicomm, mpirank, mpiroot, lw_clou errmsg = '' errflg = 0 - if (Model%rrtmgp_cld_optics .eq. 0) return + if (cld_optics_scheme .eq. 0) return ! Filenames are set in the gfs_physics_nml (scm/src/GFS_typedefs.F90) - lw_cloud_props_file = trim(Model%rrtmgp_root)//trim(Model%lw_file_clouds) + lw_cloud_props_file = trim(rrtmgp_root_dir)//trim(rrtmgp_lw_file_clouds) ! Read dimensions for k-distribution fields (only on master processor(0)) ! if (mpirank .eq. mpiroot) then @@ -131,14 +128,14 @@ subroutine rrtmgp_lw_cloud_optics_init(Model, mpicomm, mpirank, mpiroot, lw_clou endif ! Check to ensure that number of ice-roughness categories is feasible. - if (Model%rrtmgp_nrghice .gt. nrghice_lw) then + if (nrghice .gt. nrghice_lw) then errmsg = 'Number of RRTMGP ice-roughness categories requested in namelist file is not allowed' endif ! endif ! ! Broadcast dimensions to all processors !#ifdef MPI -! if (Model%rrtmgp_cld_optics .eq. 1 .or. Model%rrtmgp_cld_optics .eq. 2) then +! if (Cld_optics_scheme .eq. 1 .or. Cld_optics_scheme .eq. 2) then ! call MPI_BCAST(nbandLWcldy, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) ! call MPI_BCAST(nrghice_lw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) ! call MPI_BCAST(nsize_liq, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) @@ -151,7 +148,7 @@ subroutine rrtmgp_lw_cloud_optics_init(Model, mpicomm, mpirank, mpiroot, lw_clou ! endif !#endif - if (Model%rrtmgp_cld_optics .eq. 1) then + if (Cld_optics_scheme .eq. 1) then allocate(lut_extliq(nsize_liq, nBandLWcldy)) allocate(lut_ssaliq(nsize_liq, nBandLWcldy)) allocate(lut_asyliq(nsize_liq, nBandLWcldy)) @@ -160,7 +157,7 @@ subroutine rrtmgp_lw_cloud_optics_init(Model, mpicomm, mpirank, mpiroot, lw_clou allocate(lut_asyice(nsize_ice, nBandLWcldy, nrghice_lw)) allocate(band_lims_cldy(2, nBandLWcldy)) endif - if (Model%rrtmgp_cld_optics .eq. 2) then + if (Cld_optics_scheme .eq. 2) then allocate(pade_extliq(nbandLWcldy, nsizereg, ncoeff_ext )) allocate(pade_ssaliq(nbandLWcldy, nsizereg, ncoeff_ssa_g)) allocate(pade_asyliq(nbandLWcldy, nsizereg, ncoeff_ssa_g)) @@ -179,7 +176,7 @@ subroutine rrtmgp_lw_cloud_optics_init(Model, mpicomm, mpirank, mpiroot, lw_clou ! On master processor, allocate space, read in fields, broadcast to all processors ! if (mpirank .eq. mpiroot) then ! - if (Model%rrtmgp_cld_optics .eq. 1) then + if (Cld_optics_scheme .eq. 1) then write (*,*) 'Reading RRTMGP longwave cloud data (LUT) ... ' ! if(nf90_open(trim(lw_cloud_props_file), NF90_WRITE, ncid_lw_clds) == NF90_NOERR) then @@ -213,7 +210,7 @@ subroutine rrtmgp_lw_cloud_optics_init(Model, mpicomm, mpirank, mpiroot, lw_clou endif endif ! - if (Model%rrtmgp_cld_optics .eq. 2) then + if (Cld_optics_scheme .eq. 2) then write (*,*) 'Reading RRTMGP longwave cloud data (PADE) ... ' ! if(nf90_open(trim(lw_cloud_props_file), NF90_WRITE, ncid_lw_clds) == NF90_NOERR) then @@ -262,7 +259,7 @@ subroutine rrtmgp_lw_cloud_optics_init(Model, mpicomm, mpirank, mpiroot, lw_clou ! ! Broadcast arrays to all processors !#ifdef MPI -! if (Model%rrtmgp_cld_optics .eq. 1) then +! if (Cld_optics_scheme .eq. 1) then ! write (*,*) 'Broadcasting RRTMGP longwave cloud data (LUT) ... ' !#ifndef SINGLE_PREC ! call MPI_BCAST(radliq_lwr, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) @@ -294,7 +291,7 @@ subroutine rrtmgp_lw_cloud_optics_init(Model, mpicomm, mpirank, mpiroot, lw_clou ! call MPI_BCAST(band_lims_cldy , size(band_lims_cldy), MPI_REAL, mpiroot, mpicomm, ierr) !#endif ! endif -! if (Model%rrtmgp_cld_optics .eq. 2) then +! if (Cld_optics_scheme .eq. 2) then ! write (*,*) 'Broadcasting RRTMGP longwave cloud data (PADE) ... ' !#ifndef SINGLE_PREC ! call MPI_BCAST(pade_extliq, size(pade_extliq), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) @@ -329,14 +326,14 @@ subroutine rrtmgp_lw_cloud_optics_init(Model, mpicomm, mpirank, mpiroot, lw_clou !#endif ! Load tables data for RRTMGP cloud-optics - if (Model%rrtmgp_cld_optics .eq. 1) then - call check_error_msg('lw_cloud_optics_init',lw_cloud_props%set_ice_roughness(Model%rrtmgp_nrghice)) + if (cld_optics_scheme .eq. 1) then + call check_error_msg('lw_cloud_optics_init',lw_cloud_props%set_ice_roughness(nrghice)) call check_error_msg('lw_cloud_optics_init',lw_cloud_props%load(band_lims_cldy, & radliq_lwr, radliq_upr, radliq_fac, radice_lwr, radice_upr, radice_fac, & lut_extliq, lut_ssaliq, lut_asyliq, lut_extice, lut_ssaice, lut_asyice)) endif - if (Model%rrtmgp_cld_optics .eq. 2) then - call check_error_msg('lw_cloud_optics_init',lw_cloud_props%set_ice_roughness(Model%rrtmgp_nrghice)) + if (cld_optics_scheme .eq. 2) then + call check_error_msg('lw_cloud_optics_init',lw_cloud_props%set_ice_roughness(nrghice)) call check_error_msg('lw_cloud_optics_init',lw_cloud_props%load(band_lims_cldy, & pade_extliq, pade_ssaliq, pade_asyliq, pade_extice, pade_ssaice, & pade_asyice, pade_sizereg_extliq, pade_sizereg_ssaliq, pade_sizereg_asyliq,& @@ -344,23 +341,26 @@ subroutine rrtmgp_lw_cloud_optics_init(Model, mpicomm, mpirank, mpiroot, lw_clou endif end subroutine rrtmgp_lw_cloud_optics_init - -!! \section arg_table_rrtmgp_lw_cloud_optics_run -!! \htmlinclude rrtmgp_lw_cloud_optics.html -!! ! ######################################################################################### ! SUBROUTINE rrtmgp_lw_cloud_optics_run() ! ######################################################################################### - subroutine rrtmgp_lw_cloud_optics_run(Model, ncol, cld_frac, cld_lwp, cld_reliq, cld_iwp, & - cld_reice, cld_swp, cld_resnow, cld_rwp, cld_rerain, lw_cloud_props, lw_gas_props, & - cldtaulw, lw_optical_props_cloudsByBand, errmsg, errflg) +!! \section arg_table_rrtmgp_lw_cloud_optics_run +!! \htmlinclude rrtmgp_lw_cloud_optics.html +!! + subroutine rrtmgp_lw_cloud_optics_run(doLWrad, nCol, nLev, cld_optics_scheme, nrghice, & + cld_frac, cld_lwp, cld_reliq, cld_iwp, cld_reice, cld_swp, cld_resnow, cld_rwp, & + cld_rerain, lw_cloud_props, lw_gas_props, cldtaulw, lw_optical_props_cloudsByBand, & + errmsg, errflg) ! Inputs - type(GFS_control_type), intent(in) :: & - Model ! DDT containing FV3-GFS model control parameters + logical, intent(in) :: & + doLWrad ! Logical flag for longwave radiation call integer, intent(in) :: & - ncol ! Number of horizontal gridpoints - real(kind_phys), dimension(ncol,model%levs),intent(in) :: & + nCol, & ! Number of horizontal gridpoints + nLev, & ! Number of vertical levels + nrghice, & ! Number of ice-roughness categories + cld_optics_scheme ! Cloud-optics scheme + real(kind_phys), dimension(ncol,nLev),intent(in) :: & cld_frac, & ! Total cloud fraction by layer cld_lwp, & ! Cloud liquid water path cld_reliq, & ! Cloud liquid effective radius @@ -371,30 +371,30 @@ subroutine rrtmgp_lw_cloud_optics_run(Model, ncol, cld_frac, cld_lwp, cld_reliq, cld_rwp, & ! Cloud rain water path (used only fro RRTMG scheme) cld_rerain ! Cloud rain effective radius (used only fro RRTMG scheme) type(ty_cloud_optics),intent(in) :: & - lw_cloud_props ! + lw_cloud_props ! RRTMGP DDT: spectral information for RRTMGP LW radiation scheme type(ty_gas_optics_rrtmgp),intent(in) :: & - lw_gas_props - + lw_gas_props ! RRTMGP DDT: spectral information for RRTMGP LW radiation scheme + ! Outputs - real(kind_phys), dimension(ncol,Model%levs), intent(out) :: & - cldtaulw ! approx 10.mu band layer cloud optical depth + real(kind_phys), dimension(ncol,nLev), intent(out) :: & + cldtaulw ! Approx. 10.mu band layer cloud optical depth type(ty_optical_props_1scl),intent(out) :: & - lw_optical_props_cloudsByBand ! + lw_optical_props_cloudsByBand ! RRTMGP DDT: longwave cloud optical properties in each band integer, intent(out) :: & - errflg ! + errflg ! Error flag character(len=*), intent(out) :: & - errmsg ! + errmsg ! Error message ! Local variables - logical,dimension(ncol,model%levs) :: liqmask, icemask - real(kind_phys), dimension(ncol,model%levs,lw_gas_props%get_nband()) :: & + logical,dimension(ncol,nLev) :: liqmask, icemask + real(kind_phys), dimension(ncol,nLev,lw_gas_props%get_nband()) :: & tau_cld ! Initialize CCPP error handling variables errmsg = '' errflg = 0 - if (.not. Model%lslwr) return + if (.not. doLWrad) return ! ####################################################################################### ! Compute ice/liquid cloud masks, needed by rrtmgp_cloud_optics @@ -405,20 +405,20 @@ subroutine rrtmgp_lw_cloud_optics_run(Model, ncol, cld_frac, cld_lwp, cld_reliq, ! ####################################################################################### ! Allocate space for RRTMGP DDTs containing cloud radiative properties ! ####################################################################################### - ! Cloud optics [nCol,model%levs,nBands] + ! Cloud optics [nCol,nLev,nBands] call check_error_msg('rrtmgp_lw_cloud_optics_run',lw_optical_props_cloudsByBand%alloc_1scl(& - ncol, model%levs, lw_gas_props%get_band_lims_wavenumber())) + ncol, nLev, lw_gas_props%get_band_lims_wavenumber())) ! ####################################################################################### ! Compute cloud-optics for RTE. ! ####################################################################################### - if (Model%rrtmgp_cld_optics .gt. 0) then + if (rrtmgp_cld_optics .gt. 0) then ! i) RRTMGP cloud-optics. call check_error_msg('rrtmgp_lw_cloud_optics_run',lw_cloud_props%cloud_optics(& ncol, & ! IN - Number of horizontal gridpoints - model%levs, & ! IN - Number of vertical layers + nLev, & ! IN - Number of vertical layers lw_cloud_props%get_nband(), & ! IN - Number of LW bands - Model%rrtmgp_nrghice, & ! IN - Number of ice-roughness categories + nrghice, & ! IN - Number of ice-roughness categories liqmask, & ! IN - Liquid-cloud mask icemask, & ! IN - Ice-cloud mask cld_lwp, & ! IN - Cloud liquid water path @@ -430,7 +430,7 @@ subroutine rrtmgp_lw_cloud_optics_run(Model, ncol, cld_frac, cld_lwp, cld_reliq, else ! ii) RRTMG cloud-optics. if (any(cld_frac .gt. 0)) then - call rrtmg_lw_cloud_optics(ncol, model%levs, lw_gas_props%get_nband(), cld_lwp, & + call rrtmg_lw_cloud_optics(ncol, nLev, lw_gas_props%get_nband(), cld_lwp, & cld_reliq, cld_iwp, cld_reice, cld_rwp, cld_rerain, cld_swp, cld_resnow, & cld_frac, tau_cld) lw_optical_props_cloudsByBand%tau = tau_cld diff --git a/physics/rrtmgp_lw_cloud_optics.meta b/physics/rrtmgp_lw_cloud_optics.meta index 60daf2666..81602c552 100644 --- a/physics/rrtmgp_lw_cloud_optics.meta +++ b/physics/rrtmgp_lw_cloud_optics.meta @@ -1,14 +1,40 @@ [ccpp-arg-table] name = rrtmgp_lw_cloud_optics_init type = scheme -[Model] - standard_name = GFS_control_type_instance - long_name = instance of derived type GFS_control_type - units = DDT - dimensions = () - type = GFS_control_type +[cld_optics_scheme] + standard_name = rrtmgp_cloud_optics_flag + long_name = Flag to control which RRTMGP cloud-optics scheme + units = flag + dimensions = () + type = integer + intent = in + optional = F +[nrghice] + standard_name = number_of_rrtmgp_ice_roughness + long_name = number of ice-roughness categories in RRTMGP calculation + units = count + dimensions = () + type = integer + intent = in + optional = F +[rrtmgp_root_dir] + standard_name = directory_for_rte_rrtmgp_source_code + long_name = directory for rte+rrtmgp source code + units = none + dimensions = () + type = character + intent = in + optional = F + kind = len=128 +[rrtmgp_lw_file_clouds] + standard_name = rrtmgp_coeff_lw_cloud_optics + long_name = file containing coefficients for RRTMGP LW cloud optics + units = none + dimensions = () + type = character intent = in optional = F + kind = len=128 [mpirank] standard_name = mpi_rank long_name = current MPI rank @@ -63,12 +89,12 @@ [ccpp-arg-table] name = rrtmgp_lw_cloud_optics_run type = scheme -[Model] - standard_name = GFS_control_type_instance - long_name = instance of derived type GFS_control_type - units = DDT +[doLWrad] + standard_name = flag_to_calc_lw + long_name = logical flags for lw radiation calls + units = flag dimensions = () - type = GFS_control_type + type = logical intent = in optional = F [ncol] @@ -79,6 +105,30 @@ type = integer intent = in optional = F +[nLev] + standard_name = vertical_dimension + long_name = number of vertical levels + units = count + dimensions = () + type = integer + intent = in + optional = F +[cld_optics_scheme] + standard_name = rrtmgp_cloud_optics_flag + long_name = Flag to control which RRTMGP cloud-optics scheme + units = flag + dimensions = () + type = integer + intent = in + optional = F +[nrghice] + standard_name = number_of_rrtmgp_ice_roughness + long_name = number of ice-roughness categories in RRTMGP calculation + units = count + dimensions = () + type = integer + intent = in + optional = F [cld_frac] standard_name = total_cloud_fraction long_name = layer total cloud fraction diff --git a/physics/rrtmgp_lw_gas_optics.F90 b/physics/rrtmgp_lw_gas_optics.F90 index a5854fe37..2adcdc8de 100644 --- a/physics/rrtmgp_lw_gas_optics.F90 +++ b/physics/rrtmgp_lw_gas_optics.F90 @@ -1,6 +1,5 @@ module rrtmgp_lw_gas_optics use machine, only: kind_phys - use GFS_typedefs, only: GFS_control_type use mo_rte_kind, only: wl use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp use mo_gas_concentrations, only: ty_gas_concs @@ -18,8 +17,8 @@ module rrtmgp_lw_gas_optics !! \section arg_table_rrtmgp_lw_gas_optics_init !! \htmlinclude rrtmgp_lw_gas_optics.html !! - subroutine rrtmgp_lw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, lw_gas_props, & - ipsdlw0, errmsg, errflg) + subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp_nGases, & + active_gases_array, mpicomm, mpirank, mpiroot, lw_gas_props, ipsdlw0, errmsg, errflg) use netcdf !#ifdef MPI @@ -27,25 +26,30 @@ subroutine rrtmgp_lw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, lw_gas_pr !#endif ! Inputs - type(GFS_control_type), intent(in) :: & - Model ! DDT containing model control parameters + character(len=128),intent(in) :: & + rrtmgp_root_dir, & ! RTE-RRTMGP root directory + rrtmgp_lw_file_gas ! RRTMGP file containing coefficients used to compute gaseous optical properties + integer, intent(in) :: & + rrtmgp_nGases ! Number of trace gases active in RRTMGP + character(len=128),dimension(rrtmgp_nGases), intent(in) :: & + active_gases_array ! Character array containing trace gases to include in RRTMGP integer,intent(in) :: & - mpicomm, & ! MPI communicator - mpirank, & ! Current MPI rank - mpiroot ! Master MPI rank + mpicomm, & ! MPI communicator + mpirank, & ! Current MPI rank + mpiroot ! Master MPI rank ! Outputs character(len=*), intent(out) :: & - errmsg ! Error message + errmsg ! Error message integer, intent(out) :: & - errflg, & ! Error code - ipsdlw0 + errflg, & ! Error code + ipsdlw0 ! type(ty_gas_optics_rrtmgp),intent(out) :: & - lw_gas_props ! DDT containing spectral information for RRTMGP LW radiation scheme + lw_gas_props ! RRTMGP DDT: ! Variables that will be passed to gas_optics%load() type(ty_gas_concs) :: & - gas_concentrations + gas_concentrations ! RRTMGP DDT: trace gas concentrations (vmr) integer, dimension(:), allocatable :: & kminor_start_lower, & ! kminor_start_upper ! @@ -120,7 +124,7 @@ subroutine rrtmgp_lw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, lw_gas_pr errflg = 0 ! Filenames are set in the gfs_physics_nml (scm/src/GFS_typedefs.F90) - lw_gas_props_file = trim(Model%rrtmgp_root)//trim(Model%lw_file_gas) + lw_gas_props_file = trim(rrtmgp_root_dir)//trim(rrtmgp_lw_file_gas) ! Read dimensions for k-distribution fields (only on master processor(0)) ! if (mpirank .eq. mpiroot) then @@ -382,8 +386,8 @@ subroutine rrtmgp_lw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, lw_gas_pr !#endif ! Initialize gas concentrations and gas optics class with data - do iGas=1,Model%nGases - call check_error_msg('lw_gas_optics_init',gas_concentrations%set_vmr(Model%active_gases_array(iGas), 0._kind_phys)) + do iGas=1,rrtmgp_nGases + call check_error_msg('lw_gas_optics_init',gas_concentrations%set_vmr(active_gases_array(iGas), 0._kind_phys)) enddo call check_error_msg('lw_gas_optics_init',lw_gas_props%load(gas_concentrations, gas_names, & key_species, band2gpt, band_lims, press_ref, press_ref_trop, temp_ref, temp_ref_p, & @@ -404,30 +408,27 @@ end subroutine rrtmgp_lw_gas_optics_init !! \section arg_table_rrtmgp_lw_gas_optics_run !! \htmlinclude rrtmgp_lw_gas_optics.html !! - subroutine rrtmgp_lw_gas_optics_run(Model, lw_gas_props, ncol, p_lay, p_lev, t_lay,& - t_lev, skt, gas_concentrations, lslwr, lw_optical_props_clrsky, sources, & - errmsg, errflg) + subroutine rrtmgp_lw_gas_optics_run(doLWrad, nCol, nLev, lw_gas_props, p_lay, p_lev, t_lay,& + t_lev, skt, gas_concentrations, lw_optical_props_clrsky, sources, errmsg, errflg) ! Inputs - type(GFS_control_type), intent(in) :: & - Model ! DDT containing model control parameters - - type(ty_gas_optics_rrtmgp),intent(in) :: & - lw_gas_props ! DDT containing spectral information for RRTMGP LW radiation scheme + logical, intent(in) :: & + doLWrad ! Flag to calculate LW irradiances integer,intent(in) :: & - ncol ! Number of horizontal points - real(kind_phys), dimension(ncol,model%levs), intent(in) :: & - p_lay, & ! Pressure @ model layer-centers (hPa) - t_lay ! Temperature (K) - real(kind_phys), dimension(ncol,model%levs+1), intent(in) :: & - p_lev, & ! Pressure @ model layer-interfaces (hPa) + ncol, & ! Number of horizontal points + nLev ! Number of vertical levels + type(ty_gas_optics_rrtmgp),intent(in) :: & + lw_gas_props ! RRTMGP DDT: + real(kind_phys), dimension(ncol,nLev), intent(in) :: & + p_lay, & ! Pressure @ model layer-centers (hPa) + t_lay ! Temperature (K) + real(kind_phys), dimension(ncol,nLev+1), intent(in) :: & + p_lev, & ! Pressure @ model layer-interfaces (hPa) t_lev ! Temperature @ model levels real(kind_phys), dimension(ncol), intent(in) :: & - skt ! Surface(skin) temperature (K) + skt ! Surface(skin) temperature (K) type(ty_gas_concs),intent(in) :: & gas_concentrations ! RRTMGP DDT: trace gas concentrations (vmr) - logical, intent(in) :: & - lslwr ! Flag to calculate LW irradiances ! Output character(len=*), intent(out) :: & @@ -435,20 +436,20 @@ subroutine rrtmgp_lw_gas_optics_run(Model, lw_gas_props, ncol, p_lay, p_lev, t_l integer, intent(out) :: & errflg ! Error code type(ty_optical_props_1scl),intent(out) :: & - lw_optical_props_clrsky ! + lw_optical_props_clrsky ! RRTMGP DDT: type(ty_source_func_lw),intent(out) :: & - sources + sources ! RRTMGP DDT: ! Initialize CCPP error handling variables errmsg = '' errflg = 0 - if (.not. Model%lslwr) return + if (.not. doLWrad) return ! Allocate space - call check_error_msg('rrtmgp_lw_gas_optics_run',lw_optical_props_clrsky%alloc_1scl(ncol, model%levs, lw_gas_props)) + call check_error_msg('rrtmgp_lw_gas_optics_run',lw_optical_props_clrsky%alloc_1scl(ncol, nLev, lw_gas_props)) call check_error_msg('rrtmgp_lw_gas_optics_run',sources%init(lw_gas_props)) - call check_error_msg('rrtmgp_lw_gas_optics_run',sources%alloc(ncol, Model%levs)) + call check_error_msg('rrtmgp_lw_gas_optics_run',sources%alloc(ncol, nLev)) ! Gas-optics call check_error_msg('rrtmgp_lw_gas_optics_run',lw_gas_props%gas_optics(& diff --git a/physics/rrtmgp_lw_gas_optics.meta b/physics/rrtmgp_lw_gas_optics.meta index ee15ca3bf..b6d2c3934 100644 --- a/physics/rrtmgp_lw_gas_optics.meta +++ b/physics/rrtmgp_lw_gas_optics.meta @@ -1,12 +1,39 @@ [ccpp-arg-table] name = rrtmgp_lw_gas_optics_init type = scheme -[Model] - standard_name = GFS_control_type_instance - long_name = instance of derived type GFS_control_type - units = DDT - dimensions = () - type = GFS_control_type +[rrtmgp_root_dir] + standard_name = directory_for_rte_rrtmgp_source_code + long_name = directory for rte+rrtmgp source code + units = none + dimensions = () + type = character + intent = in + optional = F + kind = len=128 +[rrtmgp_lw_file_gas] + standard_name = rrtmgp_kdistribution_lw + long_name = file containing RRTMGP LW k-distribution + units = none + dimensions = () + type = character + intent = in + optional = F + kind = len=128 +[rrtmgp_nGases] + standard_name = number_of_active_gases_used_by_RRTMGP + long_name = number of gases available used by RRTMGP + units = count + dimensions = () + type = integer + intent = in + optional = F +[active_gases_array] + standard_name = list_of_active_gases_used_by_RRTMGP + long_name = list of active gases used by RRTMGP + units = none + dimensions = (number_of_active_gases_used_by_RRTMGP) + type = character + kind = len=128 intent = in optional = F [mpirank] @@ -71,20 +98,12 @@ [ccpp-arg-table] name = rrtmgp_lw_gas_optics_run type = scheme -[Model] - standard_name = GFS_control_type_instance - long_name = instance of derived type GFS_control_type - units = DDT - dimensions = () - type = GFS_control_type - intent = in - optional = F -[lw_gas_props] - standard_name = coefficients_for_lw_gas_optics - long_name = DDT containing spectral information for RRTMGP LW radiation scheme - units = DDT +[doLWrad] + standard_name = flag_to_calc_lw + long_name = flag to calculate LW irradiances + units = flag dimensions = () - type = ty_gas_optics_rrtmgp + type = logical intent = in optional = F [ncol] @@ -95,6 +114,22 @@ type = integer intent = in optional = F +[nLev] + standard_name = vertical_dimension + long_name = number of vertical levels + units = count + dimensions = () + type = integer + intent = in + optional = F +[lw_gas_props] + standard_name = coefficients_for_lw_gas_optics + long_name = DDT containing spectral information for RRTMGP LW radiation scheme + units = DDT + dimensions = () + type = ty_gas_optics_rrtmgp + intent = in + optional = F [p_lay] standard_name = air_pressure_at_layer_for_RRTMGP_in_hPa long_name = air pressure layer @@ -148,13 +183,21 @@ type = ty_gas_concs intent = in optional = F -[lslwr] - standard_name = flag_to_calc_lw - long_name = flag to calculate LW irradiances - units = flag +[lw_optical_props_clrsky] + standard_name = longwave_optical_properties_for_clear_sky + long_name = Fortran DDT containing RRTMGP optical properties + units = DDT dimensions = () - type = logical - intent = in + type = ty_optical_props_1scl + intent = out + optional = F +[sources] + standard_name = longwave_source_function + long_name = Fortran DDT containing RRTMGP source functions + units = DDT + dimensions = () + type = ty_source_func_lw + intent = out optional = F [errmsg] standard_name = ccpp_error_message @@ -173,19 +216,3 @@ type = integer intent = out optional = F -[lw_optical_props_clrsky] - standard_name = longwave_optical_properties_for_clear_sky - long_name = Fortran DDT containing RRTMGP optical properties - units = DDT - dimensions = () - type = ty_optical_props_1scl - intent = out - optional = F -[sources] - standard_name = longwave_source_function - long_name = Fortran DDT containing RRTMGP source functions - units = DDT - dimensions = () - type = ty_source_func_lw - intent = out - optional = F diff --git a/physics/rrtmgp_sw_gas_optics.F90 b/physics/rrtmgp_sw_gas_optics.F90 index 506fd47c3..71fefa648 100644 --- a/physics/rrtmgp_sw_gas_optics.F90 +++ b/physics/rrtmgp_sw_gas_optics.F90 @@ -18,29 +18,34 @@ module rrtmgp_sw_gas_optics !! \section arg_table_rrtmgp_sw_gas_optics_init !! \htmlinclude rrtmgp_sw_gas_optics.html !! - subroutine rrtmgp_sw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, sw_gas_props, & - ipsdsw0, errmsg, errflg) + subroutine rrtmgp_sw_gas_optics_init(rrtmgp_root_dir, rrtmgp_sw_file_gas, rrtmgp_nGases, & + active_gases_array, mpicomm, mpirank, mpiroot, sw_gas_props, ipsdsw0, errmsg, errflg) use netcdf !#ifdef MPI ! use mpi !#endif ! Inputs - type(GFS_control_type), intent(in) :: & - Model ! DDT containing model control parameters + character(len=128),intent(in) :: & + rrtmgp_root_dir, & ! RTE-RRTMGP root directory + rrtmgp_sw_file_gas ! RRTMGP file containing coefficients used to compute gaseous optical properties + integer, intent(in) :: & + rrtmgp_nGases ! Number of trace gases active in RRTMGP + character(len=128),dimension(rrtmgp_nGases), intent(in) :: & + active_gases_array ! Character array containing trace gases to include in RRTMGP integer,intent(in) :: & - mpicomm, & ! MPI communicator - mpirank, & ! Current MPI rank - mpiroot ! Master MPI rank - + mpicomm, & ! MPI communicator + mpirank, & ! Current MPI rank + mpiroot ! Master MPI rank + ! Outputs character(len=*), intent(out) :: & - errmsg ! Error message + errmsg ! Error message integer, intent(out) :: & - errflg, & ! Error code - ipsdsw0 ! + errflg, & ! Error code + ipsdsw0 ! type(ty_gas_optics_rrtmgp),intent(out) :: & - sw_gas_props + sw_gas_props ! RRTMGP DDT: ! Fields from the K-distribution files ! Variables that will be passed to gas_optics%load() @@ -117,8 +122,10 @@ subroutine rrtmgp_sw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, sw_gas_p errflg = 0 ! Filenames are set in the gfs_physics_nml (GFS_typedefs.F90) - sw_gas_props_file = trim(Model%rrtmgp_root)//trim(Model%sw_file_gas) - + sw_gas_props_file = trim(rrtmgp_root_dir)//trim(rrtmgp_sw_file_gas) + print*,'sw_gas_props_file: ',sw_gas_props_file + print*,'1; ',rrtmgp_root_dir + print*,'2; ',rrtmgp_sw_file_gas ! Read dimensions for k-distribution fields (only on master processor(0)) ! if (mpirank .eq. mpiroot) then if(nf90_open(trim(sw_gas_props_file), NF90_WRITE, ncid_sw) .eq. NF90_NOERR) then @@ -381,8 +388,8 @@ subroutine rrtmgp_sw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, sw_gas_p !#endif ! Initialize gas concentrations and gas optics class with data - do iGas=1,Model%nGases - call check_error_msg('sw_gas_optics_init',gas_concentrations%set_vmr(Model%active_gases_array(iGas), 0._kind_phys)) + do iGas=1,rrtmgp_nGases + call check_error_msg('sw_gas_optics_init',gas_concentrations%set_vmr(active_gases_array(iGas), 0._kind_phys)) enddo call check_error_msg('sw_gas_optics_init',sw_gas_props%load(gas_concentrations, gas_names_sw, & key_species_sw, band2gpt_sw, band_lims_sw, press_ref_sw, press_ref_trop_sw, temp_ref_sw, & @@ -405,32 +412,35 @@ end subroutine rrtmgp_sw_gas_optics_init !! \section arg_table_rrtmgp_sw_gas_optics_run !! \htmlinclude rrtmgp_sw_gas_optics.html !! - subroutine rrtmgp_sw_gas_optics_run(Model, sw_gas_props, ncol, nday, idxday, p_lay, p_lev,& - toa_src_sw, t_lay, t_lev, gas_concentrations, lsswr, solcon, sw_optical_props_clrsky,& - errmsg, errflg) + subroutine rrtmgp_sw_gas_optics_run(doSWrad, nCol, nLev, nday, idxday, sw_gas_props, p_lay,& + p_lev, toa_src_sw, t_lay, t_lev, gas_concentrations, solcon, rrtmgp_nGases, & + active_gases_array, sw_optical_props_clrsky, errmsg, errflg) ! Inputs - type(GFS_control_type), intent(in) :: & - Model ! DDT: FV3-GFS model control parameters - type(ty_gas_optics_rrtmgp),intent(in) :: & - sw_gas_props ! RRTMGP DDT: spectral information for RRTMGP SW radiation scheme + logical, intent(in) :: & + doSWrad ! Flag to calculate SW irradiances integer,intent(in) :: & - nday, & ! Number of daylit points. - ncol ! Number of horizontal points + nDay, & ! Number of daylit points. + nCol, & ! Number of horizontal points + nLev ! Number of vertical levels integer,intent(in),dimension(ncol) :: & idxday ! Indices for daylit points. - real(kind_phys), dimension(ncol,model%levs), intent(in) :: & + type(ty_gas_optics_rrtmgp),intent(in) :: & + sw_gas_props ! RRTMGP DDT: spectral information for RRTMGP SW radiation scheme + real(kind_phys), dimension(ncol,nLev), intent(in) :: & p_lay, & ! Pressure @ model layer-centers (hPa) t_lay ! Temperature (K) - real(kind_phys), dimension(ncol,model%levs+1), intent(in) :: & + real(kind_phys), dimension(ncol,nLev+1), intent(in) :: & p_lev, & ! Pressure @ model layer-interfaces (hPa) t_lev ! Temperature @ model levels type(ty_gas_concs),intent(in) :: & gas_concentrations ! RRTMGP DDT: trace gas concentrations (vmr) - logical, intent(in) :: & - lsswr ! Flag to calculate SW irradiances real(kind_phys), intent(in) :: & solcon ! Solar constant + integer, intent(in) :: & + rrtmgp_nGases ! Number of trace gases active in RRTMGP + character(len=128),dimension(rrtmgp_nGases), intent(in) :: & + active_gases_array ! Character array containing trace gases to include in RRTMGP ! Output character(len=*), intent(out) :: & @@ -444,7 +454,7 @@ subroutine rrtmgp_sw_gas_optics_run(Model, sw_gas_props, ncol, nday, idxday, p_l ! Local variables integer :: ij,iGas - real(kind_phys), dimension(ncol,Model%levs) :: vmrTemp + real(kind_phys), dimension(ncol,nLev) :: vmrTemp real(kind_phys), dimension(nday,sw_gas_props%get_ngpt()) :: toa_src_sw_temp type(ty_gas_concs) :: & gas_concentrations_daylit ! RRTMGP DDT: trace gas concentrations (vmr) @@ -453,18 +463,18 @@ subroutine rrtmgp_sw_gas_optics_run(Model, sw_gas_props, ncol, nday, idxday, p_l errmsg = '' errflg = 0 - if (.not. Model%lsswr) return + if (.not. doSWrad) return if (nDay .gt. 0) then ! Allocate space - call check_error_msg('rrtmgp_sw_gas_optics_run',sw_optical_props_clrsky%alloc_2str(nday, model%levs, sw_gas_props)) + call check_error_msg('rrtmgp_sw_gas_optics_run',sw_optical_props_clrsky%alloc_2str(nday, nLev, sw_gas_props)) ! Subset the gas concentrations, only need daylit points. - do iGas=1,Model%nGases + do iGas=1,rrtmgp_nGases call check_error_msg('rrtmgp_sw_rte_run',& - gas_concentrations%get_vmr(trim(Model%active_gases_array(iGas)),vmrTemp)) + gas_concentrations%get_vmr(trim(active_gases_array(iGas)),vmrTemp)) call check_error_msg('rrtmgp_sw_rte_run',& - gas_concentrations_daylit%set_vmr(trim(Model%active_gases_array(iGas)),vmrTemp(idxday(1:nday),:))) + gas_concentrations_daylit%set_vmr(trim(active_gases_array(iGas)),vmrTemp(idxday(1:nday),:))) enddo ! Gas-optics @@ -484,7 +494,6 @@ subroutine rrtmgp_sw_gas_optics_run(Model, sw_gas_props, ncol, nday, idxday, p_l enddo endif - end subroutine rrtmgp_sw_gas_optics_run ! ######################################################################################### diff --git a/physics/rrtmgp_sw_gas_optics.meta b/physics/rrtmgp_sw_gas_optics.meta index 7ee8e9edc..6a2b87a9a 100644 --- a/physics/rrtmgp_sw_gas_optics.meta +++ b/physics/rrtmgp_sw_gas_optics.meta @@ -1,12 +1,39 @@ [ccpp-arg-table] name = rrtmgp_sw_gas_optics_init type = scheme -[Model] - standard_name = GFS_control_type_instance - long_name = instance of derived type GFS_control_type - units = DDT - dimensions = () - type = GFS_control_type +[rrtmgp_root_dir] + standard_name = directory_for_rte_rrtmgp_source_code + long_name = directory for rte+rrtmgp source code + units = none + dimensions = () + type = character + intent = in + optional = F + kind = len=128 +[rrtmgp_sw_file_gas] + standard_name = rrtmgp_kdistribution_sw + long_name = file containing RRTMGP SW k-distribution + units = none + dimensions = () + type = character + intent = in + optional = F + kind = len=128 +[rrtmgp_nGases] + standard_name = number_of_active_gases_used_by_RRTMGP + long_name = number of gases available used by RRTMGP + units = count + dimensions = () + type = integer + intent = in + optional = F +[active_gases_array] + standard_name = list_of_active_gases_used_by_RRTMGP + long_name = list of active gases used by RRTMGP + units = none + dimensions = (number_of_active_gases_used_by_RRTMGP) + type = character + kind = len=128 intent = in optional = F [mpirank] @@ -71,20 +98,12 @@ [ccpp-arg-table] name = rrtmgp_sw_gas_optics_run type = scheme -[Model] - standard_name = GFS_control_type_instance - long_name = instance of derived type GFS_control_type - units = DDT - dimensions = () - type = GFS_control_type - intent = in - optional = F -[sw_gas_props] - standard_name = coefficients_for_sw_gas_optics - long_name = DDT containing spectral information for RRTMGP SW radiation scheme - units = DDT +[doSWrad] + standard_name = flag_to_calc_sw + long_name = flag to calculate SW irradiances + units = flag dimensions = () - type = ty_gas_optics_rrtmgp + type = logical intent = in optional = F [ncol] @@ -95,6 +114,14 @@ type = integer intent = in optional = F +[nLev] + standard_name = vertical_dimension + long_name = number of vertical levels + units = count + dimensions = () + type = integer + intent = in + optional = F [nday] standard_name = daytime_points_dimension long_name = daytime points dimension @@ -111,14 +138,13 @@ type = integer intent = in optional = F -[toa_src_sw] - standard_name = toa_incident_sw_flux_by_spectral_point - long_name = TOA shortwave incident flux at each spectral points - units = W m-2 - dimensions = (horizontal_dimension,number_of_sw_spectral_points_rrtmgp) - type = real - kind = kind_phys - intent = out +[sw_gas_props] + standard_name = coefficients_for_sw_gas_optics + long_name = DDT containing spectral information for RRTMGP SW radiation scheme + units = DDT + dimensions = () + type = ty_gas_optics_rrtmgp + intent = in optional = F [p_lay] standard_name = air_pressure_at_layer_for_RRTMGP_in_hPa @@ -156,6 +182,15 @@ kind = kind_phys intent = in optional = F +[toa_src_sw] + standard_name = toa_incident_sw_flux_by_spectral_point + long_name = TOA shortwave incident flux at each spectral points + units = W m-2 + dimensions = (horizontal_dimension,number_of_sw_spectral_points_rrtmgp) + type = real + kind = kind_phys + intent = out + optional = F [gas_concentrations] standard_name = Gas_concentrations_for_RRTMGP_suite long_name = DDT containing gas concentrations for RRTMGP radiation scheme @@ -164,14 +199,6 @@ type = ty_gas_concs intent = in optional = F -[lsswr] - standard_name = flag_to_calc_sw - long_name = flag to calculate SW irradiances - units = flag - dimensions = () - type = logical - intent = in - optional = F [solcon] standard_name = solar_constant long_name = solar constant @@ -181,6 +208,23 @@ kind = kind_phys intent = in optional = F +[rrtmgp_nGases] + standard_name = number_of_active_gases_used_by_RRTMGP + long_name = number of gases available used by RRTMGP + units = count + dimensions = () + type = integer + intent = in + optional = F +[active_gases_array] + standard_name = list_of_active_gases_used_by_RRTMGP + long_name = list of active gases used by RRTMGP + units = none + dimensions = (number_of_active_gases_used_by_RRTMGP) + type = character + kind = len=128 + intent = in + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP diff --git a/physics/rrtmgp_sw_rte.F90 b/physics/rrtmgp_sw_rte.F90 index 4a612ccce..66e73516e 100644 --- a/physics/rrtmgp_sw_rte.F90 +++ b/physics/rrtmgp_sw_rte.F90 @@ -30,10 +30,16 @@ end subroutine rrtmgp_sw_rte_init subroutine rrtmgp_sw_rte_run(Model, Radtend, Statein, ncol, sw_gas_props, p_lay, t_lay, & p_lev, gas_concentrations, sw_optical_props_clrsky, sfc_alb_nir_dir, sfc_alb_nir_dif,& sfc_alb_uvvis_dir, sfc_alb_uvvis_dif, toa_src_sw, sw_optical_props_clouds, & - sw_optical_props_aerosol, lsswr, nday, idxday, hsw0, hswb, scmpsw, fluxswUP_allsky, & + sw_optical_props_aerosol, lsswr, nday, idxday, hsw0, hswb, rrtmgp_nGases, active_gases_array, scmpsw, fluxswUP_allsky, & fluxswDOWN_allsky, fluxswUP_clrsky, fluxswDOWN_clrsky, errmsg, errflg) ! Inputs + + integer, intent(in) :: & + rrtmgp_nGases ! Number of trace gases active in RRTMGP + character(len=*),dimension(rrtmgp_nGases), intent(in) :: & + active_gases_array ! Character array containing trace gases to include in RRTMGP + type(GFS_control_type), intent(in) :: & Model type(GFS_radtend_type), intent(in) :: & @@ -142,11 +148,11 @@ subroutine rrtmgp_sw_rte_run(Model, Radtend, Statein, ncol, sw_gas_props, p_lay, fluxswDOWN_clrsky(:,:) = 0._kind_phys ! Subset the gas concentrations, only need daylit points. - do iGas=1,Model%nGases + do iGas=1,rrtmgp_nGases call check_error_msg('rrtmgp_sw_rte_run',& - gas_concentrations%get_vmr(trim(Model%active_gases_array(iGas)),vmrTemp)) + gas_concentrations%get_vmr(trim(active_gases_array(iGas)),vmrTemp)) call check_error_msg('rrtmgp_sw_rte_run',& - gas_concentrations_daylit%set_vmr(trim(Model%active_gases_array(iGas)),vmrTemp(idxday(1:nday),:))) + gas_concentrations_daylit%set_vmr(trim(active_gases_array(iGas)),vmrTemp(idxday(1:nday),:))) enddo ! Initialize RRTMGP DDT containing 2D(3D) fluxes diff --git a/physics/rrtmgp_sw_rte.meta b/physics/rrtmgp_sw_rte.meta index 81575e6f4..e9dee8cc4 100644 --- a/physics/rrtmgp_sw_rte.meta +++ b/physics/rrtmgp_sw_rte.meta @@ -1,6 +1,23 @@ [ccpp-arg-table] name = rrtmgp_sw_rte_run type = scheme +[rrtmgp_nGases] + standard_name = number_of_active_gases_used_by_RRTMGP + long_name = number of gases available used by RRTMGP + units = count + dimensions = () + type = integer + intent = in + optional = F +[active_gases_array] + standard_name = list_of_active_gases_used_by_RRTMGP + long_name = list of active gases used by RRTMGP + units = none + dimensions = (number_of_active_gases_used_by_RRTMGP) + type = character + kind = len=128 + intent = in + optional = F [Model] standard_name = GFS_control_type_instance long_name = instance of derived type GFS_control_type From 1943d14264ac1623bd219a03b87ccc1f79297075 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Fri, 13 Dec 2019 09:53:55 -0700 Subject: [PATCH 091/167] Removed all instances of GFS derived data types from rrtmgp scheme level code. --- physics/rrtmgp_lw_cloud_optics.F90 | 4 +- physics/rrtmgp_lw_clrallsky_driver.F90 | 131 ---------------- physics/rrtmgp_lw_clrallsky_driver.meta | 175 --------------------- physics/rrtmgp_lw_gas_optics.F90 | 2 +- physics/rrtmgp_lw_rte.F90 | 82 +++++----- physics/rrtmgp_lw_rte.meta | 34 ++-- physics/rrtmgp_sw_cloud_optics.F90 | 122 ++++++++------- physics/rrtmgp_sw_cloud_optics.meta | 72 +++++++-- physics/rrtmgp_sw_clrallsky_driver.F90 | 179 --------------------- physics/rrtmgp_sw_clrallsky_driver.meta | 197 ------------------------ physics/rrtmgp_sw_gas_optics.F90 | 7 +- physics/rrtmgp_sw_rte.F90 | 114 +++++++------- physics/rrtmgp_sw_rte.meta | 135 ++++++++-------- 13 files changed, 301 insertions(+), 953 deletions(-) delete mode 100644 physics/rrtmgp_lw_clrallsky_driver.F90 delete mode 100644 physics/rrtmgp_lw_clrallsky_driver.meta delete mode 100644 physics/rrtmgp_sw_clrallsky_driver.F90 delete mode 100644 physics/rrtmgp_sw_clrallsky_driver.meta diff --git a/physics/rrtmgp_lw_cloud_optics.F90 b/physics/rrtmgp_lw_cloud_optics.F90 index 418fe8cbf..c8c7d8470 100644 --- a/physics/rrtmgp_lw_cloud_optics.F90 +++ b/physics/rrtmgp_lw_cloud_optics.F90 @@ -100,7 +100,7 @@ subroutine rrtmgp_lw_cloud_optics_init(cld_optics_scheme, nrghice, rrtmgp_root_d if (cld_optics_scheme .eq. 0) return - ! Filenames are set in the gfs_physics_nml (scm/src/GFS_typedefs.F90) + ! Filenames are set in the physics_nml lw_cloud_props_file = trim(rrtmgp_root_dir)//trim(rrtmgp_lw_file_clouds) ! Read dimensions for k-distribution fields (only on master processor(0)) @@ -437,7 +437,7 @@ subroutine rrtmgp_lw_cloud_optics_run(doLWrad, nCol, nLev, cld_optics_scheme, nr endif endif - ! GFS_RRTMGP_POST_RUN() requires the LW optical depth ~10microns + ! All-sky LW optical depth ~10microns cldtaulw = lw_optical_props_cloudsByBand%tau(:,:,7) end subroutine rrtmgp_lw_cloud_optics_run diff --git a/physics/rrtmgp_lw_clrallsky_driver.F90 b/physics/rrtmgp_lw_clrallsky_driver.F90 deleted file mode 100644 index e27a008bf..000000000 --- a/physics/rrtmgp_lw_clrallsky_driver.F90 +++ /dev/null @@ -1,131 +0,0 @@ -! ########################################################################################### -! ########################################################################################### -module rrtmgp_lw_clrallsky_driver - use machine, only: kind_phys - use GFS_typedefs, only: GFS_control_type, GFS_Interstitial_type - use mo_rte_kind, only: wl - use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp - use mo_cloud_optics, only: ty_cloud_optics - use mo_optical_props, only: ty_optical_props_1scl - use mo_rrtmgp_clr_all_sky, only: rte_lw - use mo_gas_concentrations, only: ty_gas_concs - use mo_fluxes_byband, only: ty_fluxes_byband - use rrtmgp_aux, only: check_error_msg - - public rrtmgp_lw_clrallsky_driver_init, rrtmgp_lw_clrallsky_driver_run, rrtmgp_lw_clrallsky_driver_finalize -contains - - ! ######################################################################################### - ! SUBROUTINE rrtmgp_lw_clrallsky_driver_init - ! ######################################################################################### - subroutine rrtmgp_lw_clrallsky_driver_init() - end subroutine rrtmgp_lw_clrallsky_driver_init - - ! ######################################################################################### - ! SUBROUTINE rrtmgp_lw_clrallsky_driver_run - ! ######################################################################################### -!! \section arg_table_rrtmgp_lw_clrallsky_driver_run -!! \htmlinclude rrtmgp_lw_clrallsky_driver.html -!! - subroutine rrtmgp_lw_clrallsky_driver_run(Model, Interstitial, ncol, lw_gas_props, p_lay, t_lay,& - p_lev, skt, gas_concentrations, lw_optical_props_clouds, lw_optical_props_aerosol, & - lslwr, fluxlwUP_allsky, fluxlwDOWN_allsky, fluxlwUP_clrsky, fluxlwDOWN_clrsky, hlw0, & - hlwb, errmsg, errflg) - - ! Inputs - type(GFS_control_type), intent(in) :: & - Model - type(GFS_Interstitial_type), intent(in) :: & - Interstitial ! Fortran DDT containing FV3-GFS radiation tendencies - integer, intent(in) :: & - ncol ! Number of horizontal gridpoints - real(kind_phys), dimension(ncol,model%levs), intent(in) :: & - p_lay, & ! Pressure @ model layer-centers (hPa) - t_lay ! Temperature (K) - real(kind_phys), dimension(ncol,model%levs+1), intent(in) :: & - p_lev ! Pressure @ model layer-interfaces (hPa) - real(kind_phys), dimension(ncol), intent(in) :: & - skt ! Surface(skin) temperature (K) - type(ty_gas_optics_rrtmgp),intent(in) :: & - lw_gas_props ! DDT containing LW spectral information - type(ty_optical_props_1scl),intent(in) :: & - lw_optical_props_clouds, & ! RRTMGP DDT: longwave cloud radiative properties - lw_optical_props_aerosol ! RRTMGP DDT: longwave aerosol radiative properties - type(ty_gas_concs),intent(in) :: & - gas_concentrations ! RRTMGP DDT: trace gas concentrations (vmr) - logical, intent(in) :: & - lslwr ! Flag to calculate LW irradiances - - ! Outputs - character(len=*), intent(out) :: errmsg - integer, intent(out) :: errflg - real(kind_phys), dimension(ncol,model%levs+1), intent(out) :: & - fluxlwUP_allsky, & ! All-sky flux (W/m2) - fluxlwDOWN_allsky, & ! All-sky flux (W/m2) - fluxlwUP_clrsky, & ! Clear-sky flux (W/m2) - fluxlwDOWN_clrsky ! All-sky flux (W/m2) - - ! Outputs (optional) - real(kind_phys), dimension(ncol,model%levs,lw_gas_props%get_nband()), optional, intent(inout) :: & - hlwb ! All-sky heating rate, by band (K/sec) - real(kind_phys), dimension(ncol,model%levs), optional, intent(inout) :: & - hlw0 ! Clear-sky heating rate (K/sec) - - ! Local variables - type(ty_fluxes_byband) :: & - flux_allsky, & ! All-sky flux (W/m2) - flux_clrsky ! Clear-sky flux (W/m2) - real(kind_phys), dimension(ncol,model%levs+1),target :: & - fluxLW_up_allsky, fluxLW_up_clrsky, fluxLW_dn_allsky, fluxLW_dn_clrsky - real(kind_phys), dimension(ncol,model%levs+1,lw_gas_props%get_nband()),target :: & - fluxLWBB_up_allsky, fluxLWBB_dn_allsky - logical :: l_ClrSky_HR, l_AllSky_HR_byband - - ! Initialize CCPP error handling variables - errmsg = '' - errflg = 0 - if (.not. lslwr) return - - ! Are any optional outputs requested? Need to know now to compute correct fluxes. - l_ClrSky_HR = present(hlw0) - l_AllSky_HR_byband = present(hlwb) - - ! Initialize RRTMGP DDT containing 2D(3D) fluxes - flux_allsky%flux_up => fluxLW_up_allsky - flux_allsky%flux_dn => fluxLW_dn_allsky - flux_clrsky%flux_up => fluxLW_up_clrsky - flux_clrsky%flux_dn => fluxLW_dn_clrsky - ! Only calculate fluxes by-band, only when heating-rate profiles by band are requested. - if (l_AllSky_HR_byband) then - flux_allsky%bnd_flux_up => fluxLWBB_up_allsky - flux_allsky%bnd_flux_dn => fluxLWBB_dn_allsky - endif - - ! Call RRTMGP LW scheme - call check_error_msg('rrtmgp_lw_clrallsky_driver_run',rte_lw( & - lw_gas_props, & ! IN - spectral information - gas_concentrations, & ! IN - gas concentrations (vmr) - p_lay, & ! IN - pressure at layer interfaces (Pa) - t_lay, & ! IN - temperature at layer interfaes (K) - p_lev, & ! IN - pressure at layer centers (Pa) - skt, & ! IN - skin temperature (K) - Interstitial%sfc_emiss_byband, & ! IN - surface emissivity in each LW band - lw_optical_props_clouds, & ! IN - DDT containing cloud optical information - flux_allsky, & ! OUT - Fluxes, all-sky, 3D (nCol,model%levs,nBand) - flux_clrsky, & ! OUT - Fluxes, clear-sky, 3D (nCol,model%levs,nBand) - aer_props = lw_optical_props_aerosol)) ! IN(optional) - DDT containing aerosol optical information - fluxlwUP_allsky = flux_allsky%flux_up - fluxlwDOWN_allsky = flux_allsky%flux_dn - fluxlwUP_clrsky = flux_clrsky%flux_up - fluxlwDOWN_clrsky = flux_clrsky%flux_dn - - end subroutine rrtmgp_lw_clrallsky_driver_run - - ! ######################################################################################### - ! SUBROUTINE rrtmgp_lw_clrallsky_driver_finalize - ! ######################################################################################### - subroutine rrtmgp_lw_clrallsky_driver_finalize() - end subroutine rrtmgp_lw_clrallsky_driver_finalize - - -end module rrtmgp_lw_clrallsky_driver diff --git a/physics/rrtmgp_lw_clrallsky_driver.meta b/physics/rrtmgp_lw_clrallsky_driver.meta deleted file mode 100644 index eea012c87..000000000 --- a/physics/rrtmgp_lw_clrallsky_driver.meta +++ /dev/null @@ -1,175 +0,0 @@ -[ccpp-arg-table] - name = rrtmgp_lw_clrallsky_driver_run - type = scheme -[Model] - standard_name = GFS_control_type_instance - long_name = instance of derived type GFS_control_type - units = DDT - dimensions = () - type = GFS_control_type - intent = in - optional = F -[Interstitial] - standard_name = GFS_interstitial_type_instance - long_name = derived type GFS_interstitial_type in FV3 - units = DDT - dimensions = () - type = GFS_interstitial_type - intent = in - optional = F -[ncol] - standard_name = horizontal_loop_extent - long_name = horizontal dimension - units = count - dimensions = () - type = integer - intent = in - optional = F -[p_lay] - standard_name = air_pressure_at_layer_for_RRTMGP_in_hPa - long_name = air pressure layer - units = hPa - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[p_lev] - standard_name = air_pressure_at_interface_for_RRTMGP_in_hPa - long_name = air pressure level - units = hPa - dimensions = (horizontal_dimension,vertical_dimension_plus_one) - type = real - kind = kind_phys - intent = in - optional = F -[t_lay] - standard_name = air_temperature_at_layer_for_RRTMGP - long_name = air temperature layer - units = K - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[skt] - standard_name = surface_ground_temperature_for_radiation - long_name = surface ground temperature for radiation - units = K - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[lw_gas_props] - standard_name = coefficients_for_lw_gas_optics - long_name = DDT containing spectral information for RRTMGP LW radiation scheme - units = DDT - dimensions = () - type = ty_gas_optics_rrtmgp - intent = in - optional = F -[lw_optical_props_clouds] - standard_name = longwave_optical_properties_for_cloudy_atmosphere - long_name = Fortran DDT containing RRTMGP optical properties - units = DDT - dimensions = () - type = ty_optical_props_1scl - intent = in - optional = F -[lw_optical_props_aerosol] - standard_name = longwave_optical_properties_for_aerosols - long_name = Fortran DDT containing RRTMGP optical properties - units = DDT - dimensions = () - type = ty_optical_props_1scl - intent = in - optional = F -[gas_concentrations] - standard_name = Gas_concentrations_for_RRTMGP_suite - long_name = DDT containing gas concentrations for RRTMGP radiation scheme - units = DDT - dimensions = () - type = ty_gas_concs - intent = in - optional = F -[lslwr] - standard_name = flag_to_calc_lw - long_name = flag to calculate LW irradiances - units = flag - dimensions = () - type = logical - intent = in - optional = F -[hlw0] - standard_name = RRTMGP_lw_heating_rate_clear_sky - long_name = RRTMGP longwave clear sky heating rate - units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - optional = T - intent = in -[hlwb] - standard_name = RRTMGP_lw_heating_rate_spectral - long_name = RRTMGP longwave total sky heating rate (spectral) - units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension,number_of_lw_spectral_points_rrtmgp) - type = real - kind = kind_phys - optional = T - kind = kind_phys - intent = in -[fluxlwUP_allsky] - standard_name = RRTMGP_lw_flux_profile_upward_allsky - long_name = RRTMGP upward longwave all-sky flux profile - units = W m-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) - type = real - kind = kind_phys - intent = out - optional = F -[fluxlwDOWN_allsky] - standard_name = RRTMGP_lw_flux_profile_downward_allsky - long_name = RRTMGP downward longwave all-sky flux profile - units = W m-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) - type = real - kind = kind_phys - intent = out - optional = F -[fluxlwUP_clrsky] - standard_name = RRTMGP_lw_flux_profile_upward_clrsky - long_name = RRTMGP upward longwave clr-sky flux profile - units = W m-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) - type = real - kind = kind_phys - intent = out - optional = F -[fluxlwDOWN_clrsky] - standard_name = RRTMGP_lw_flux_profile_downward_clrsky - long_name = RRTMGP downward longwave clr-sky flux profile - units = W m-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) - type = real - kind = kind_phys - intent = out - optional = F -[errmsg] - standard_name = ccpp_error_message - long_name = error message for error handling in CCPP - units = none - dimensions = () - type = character - kind = len=* - intent = out - optional = F -[errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag - dimensions = () - type = integer - intent = out - optional = F diff --git a/physics/rrtmgp_lw_gas_optics.F90 b/physics/rrtmgp_lw_gas_optics.F90 index 2adcdc8de..d15adbc23 100644 --- a/physics/rrtmgp_lw_gas_optics.F90 +++ b/physics/rrtmgp_lw_gas_optics.F90 @@ -123,7 +123,7 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp errmsg = '' errflg = 0 - ! Filenames are set in the gfs_physics_nml (scm/src/GFS_typedefs.F90) + ! Filenames are set in the physics_nml lw_gas_props_file = trim(rrtmgp_root_dir)//trim(rrtmgp_lw_file_gas) ! Read dimensions for k-distribution fields (only on master processor(0)) diff --git a/physics/rrtmgp_lw_rte.F90 b/physics/rrtmgp_lw_rte.F90 index 51d18ce4b..1728a6baf 100644 --- a/physics/rrtmgp_lw_rte.F90 +++ b/physics/rrtmgp_lw_rte.F90 @@ -2,7 +2,6 @@ ! ########################################################################################### module rrtmgp_lw_rte use machine, only: kind_phys - use GFS_typedefs, only: GFS_control_type, GFS_statein_type use mo_rte_kind, only: wl use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp use mo_cloud_optics, only: ty_cloud_optics @@ -27,73 +26,69 @@ end subroutine rrtmgp_lw_rte_init !! \section arg_table_rrtmgp_lw_rte_run !! \htmlinclude rrtmgp_lw_rte.html !! - subroutine rrtmgp_lw_rte_run(Model, Statein, ncol, lw_gas_props, p_lay, t_lay, p_lev, skt,& + subroutine rrtmgp_lw_rte_run(doLWrad, nCol, nLev, p_lay, t_lay, p_lev, skt, lw_gas_props, & sfc_emiss_byband, sources, lw_optical_props_clrsky, lw_optical_props_clouds, & - lw_optical_props_aerosol, lslwr, fluxlwUP_allsky, fluxlwDOWN_allsky, fluxlwUP_clrsky,& + lw_optical_props_aerosol, fluxlwUP_allsky, fluxlwDOWN_allsky, fluxlwUP_clrsky, & fluxlwDOWN_clrsky, hlw0, hlwb, errmsg, errflg) ! Inputs - type(GFS_control_type), intent(in) :: & - Model ! Fortran DDT containing FV3-GFS model control parameters - type(GFS_statein_type), intent(in) :: & - Statein ! Fortran DDT containing FV3-GFS prognostic state data in from dycore + logical, intent(in) :: & + doLWrad ! Logical flag for longwave radiation call integer, intent(in) :: & - ncol ! Number of horizontal gridpoints - real(kind_phys), dimension(ncol,model%levs), intent(in) :: & - p_lay, & ! Pressure @ model layer-centers (hPa) - t_lay ! Temperature (K) - real(kind_phys), dimension(ncol,model%levs+1), intent(in) :: & - p_lev ! Pressure @ model layer-interfaces (hPa) + nCol, & ! Number of horizontal gridpoints + nLev ! Number of vertical levels + real(kind_phys), dimension(ncol,nLev), intent(in) :: & + p_lay, & ! Pressure @ model layer-centers (hPa) + t_lay ! Temperature (K) + real(kind_phys), dimension(ncol,nLev+1), intent(in) :: & + p_lev ! Pressure @ model layer-interfaces (hPa) real(kind_phys), dimension(ncol), intent(in) :: & - skt ! Surface(skin) temperature (K) + skt ! Surface(skin) temperature (K) type(ty_gas_optics_rrtmgp),intent(in) :: & - lw_gas_props ! DDT containing LW spectral information + lw_gas_props ! DDT containing LW spectral information + real(kind_phys), dimension(lw_gas_props%get_nband(),ncol), intent(in) :: & + sfc_emiss_byband ! Surface emissivity in each band + type(ty_source_func_lw),intent(in) :: & + sources type(ty_optical_props_1scl),intent(inout) :: & lw_optical_props_clrsky ! RRTMGP DDT: longwave clear-sky radiative properties type(ty_optical_props_1scl),intent(in) :: & - lw_optical_props_clouds, & ! RRTMGP DDT: longwave cloud radiative properties + lw_optical_props_clouds, & ! RRTMGP DDT: longwave cloud radiative properties lw_optical_props_aerosol ! RRTMGP DDT: longwave aerosol radiative properties - type(ty_source_func_lw),intent(in) :: & - sources - logical, intent(in) :: & - lslwr ! Flag to calculate LW irradiances - real(kind_phys), dimension(lw_gas_props%get_nband(),ncol), intent(in) :: & - sfc_emiss_byband ! Surface emissivity in each band - + ! Outputs + real(kind_phys), dimension(ncol,nLev+1), intent(out) :: & + fluxlwUP_allsky, & ! All-sky flux (W/m2) + fluxlwDOWN_allsky, & ! All-sky flux (W/m2) + fluxlwUP_clrsky, & ! Clear-sky flux (W/m2) + fluxlwDOWN_clrsky ! All-sky flux (W/m2) character(len=*), intent(out) :: & - errmsg ! CCPP error message + errmsg ! CCPP error message integer, intent(out) :: & - errflg ! CCPP error flag - real(kind_phys), dimension(ncol,model%levs+1), intent(out) :: & - fluxlwUP_allsky, & ! All-sky flux (W/m2) - fluxlwDOWN_allsky, & ! All-sky flux (W/m2) - fluxlwUP_clrsky, & ! Clear-sky flux (W/m2) - fluxlwDOWN_clrsky ! All-sky flux (W/m2) + errflg ! CCPP error flag ! Outputs (optional) - real(kind_phys), dimension(ncol,model%levs,lw_gas_props%get_nband()), optional, intent(inout) :: & - hlwb ! All-sky heating rate, by band (K/sec) - real(kind_phys), dimension(ncol,model%levs), optional, intent(inout) :: & - hlw0 ! Clear-sky heating rate (K/sec) + real(kind_phys), dimension(ncol,nLev,lw_gas_props%get_nband()), optional, intent(inout) :: & + hlwb ! All-sky heating rate, by band (K/sec) + real(kind_phys), dimension(ncol,nLev), optional, intent(inout) :: & + hlw0 ! Clear-sky heating rate (K/sec) ! Local variables type(ty_fluxes_byband) :: & flux_allsky, flux_clrsky - real(kind_phys), dimension(ncol,model%levs+1,lw_gas_props%get_nband()),target :: & + real(kind_phys), dimension(ncol,nLev+1,lw_gas_props%get_nband()),target :: & fluxLW_up_allsky, fluxLW_up_clrsky, fluxLW_dn_allsky, fluxLW_dn_clrsky -! real(kind_phys), dimension(ncol,model%levs+1,lw_gas_props%get_nband()),target :: & -! fluxLWBB_up_allsky, fluxLWBB_dn_allsky logical :: & l_ClrSky_HR, l_AllSky_HR_byband, top_at_1 ! Initialize CCPP error handling variables errmsg = '' errflg = 0 - if (.not. lslwr) return + + if (.not. doLWrad) return ! Vertical ordering? - top_at_1 = (p_lev(1,1) .lt. p_lev(1, Model%levs)) + top_at_1 = (p_lev(1,1) .lt. p_lev(1, nLev)) ! Are any optional outputs requested? Need to know now to compute correct fluxes. l_ClrSky_HR = present(hlw0) @@ -104,11 +99,6 @@ subroutine rrtmgp_lw_rte_run(Model, Statein, ncol, lw_gas_props, p_lay, t_lay, p flux_allsky%bnd_flux_dn => fluxLW_dn_allsky flux_clrsky%bnd_flux_up => fluxLW_up_clrsky flux_clrsky%bnd_flux_dn => fluxLW_dn_clrsky - ! Only calculate fluxes by-band, only when heating-rate profiles by band are requested. - !if (l_AllSky_HR_byband) then - ! flux_allsky%bnd_flux_up => fluxLWBB_up_allsky - ! flux_allsky%bnd_flux_dn => fluxLWBB_dn_allsky - !endif ! Compute clear-sky fluxes (if requested) ! Clear-sky fluxes are gas+aerosol @@ -138,6 +128,10 @@ subroutine rrtmgp_lw_rte_run(Model, Statein, ncol, lw_gas_props, p_lay, t_lay, p fluxlwUP_allsky = sum(flux_allsky%bnd_flux_up,dim=3) fluxlwDOWN_allsky = sum(flux_allsky%bnd_flux_dn,dim=3) + ! Only output fluxes by-band when heating-rate profiles by band are requested. + !if (l_AllSky_HR_byband) then + !endif + end subroutine rrtmgp_lw_rte_run ! ######################################################################################### diff --git a/physics/rrtmgp_lw_rte.meta b/physics/rrtmgp_lw_rte.meta index afd31d38c..47168c75b 100644 --- a/physics/rrtmgp_lw_rte.meta +++ b/physics/rrtmgp_lw_rte.meta @@ -1,20 +1,12 @@ [ccpp-arg-table] name = rrtmgp_lw_rte_run type = scheme -[Model] - standard_name = GFS_control_type_instance - long_name = instance of derived type GFS_control_type - units = DDT - dimensions = () - type = GFS_control_type - intent = in - optional = F -[Statein] - standard_name = GFS_statein_type_instance - long_name = instance of derived type GFS_statein_type - units = DDT +[doLWrad] + standard_name = flag_to_calc_lw + long_name = logical flags for lw radiation calls + units = flag dimensions = () - type = GFS_statein_type + type = logical intent = in optional = F [ncol] @@ -25,6 +17,14 @@ type = integer intent = in optional = F +[nLev] + standard_name = vertical_dimension + long_name = number of vertical levels + units = count + dimensions = () + type = integer + intent = in + optional = F [p_lay] standard_name = air_pressure_at_layer_for_RRTMGP_in_hPa long_name = air pressure layer @@ -110,14 +110,6 @@ type = ty_source_func_lw intent = in optional = F -[lslwr] - standard_name = flag_to_calc_lw - long_name = flag to calculate LW irradiances - units = flag - dimensions = () - type = logical - intent = in - optional = F [hlw0] standard_name = RRTMGP_lw_heating_rate_clear_sky long_name = RRTMGP longwave clear sky heating rate diff --git a/physics/rrtmgp_sw_cloud_optics.F90 b/physics/rrtmgp_sw_cloud_optics.F90 index 10c837622..e994dd558 100644 --- a/physics/rrtmgp_sw_cloud_optics.F90 +++ b/physics/rrtmgp_sw_cloud_optics.F90 @@ -1,6 +1,5 @@ module rrtmgp_sw_cloud_optics use machine, only: kind_phys - use GFS_typedefs, only: GFS_control_type use mo_rte_kind, only: wl use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp use mo_cloud_optics, only: ty_cloud_optics @@ -18,20 +17,23 @@ module rrtmgp_sw_cloud_optics !! \section arg_table_rrtmgp_sw_cloud_optics_init !! \htmlinclude rrtmgp_lw_cloud_optics.html !! - subroutine rrtmgp_sw_cloud_optics_init(Model,mpicomm, mpirank, mpiroot, sw_cloud_props, & - errmsg, errflg) + subroutine rrtmgp_sw_cloud_optics_init(cld_optics_scheme, nrghice, rrtmgp_root_dir, & + rrtmgp_sw_file_clouds, mpicomm, mpirank, mpiroot, sw_cloud_props, errmsg, errflg) use netcdf !#ifdef MPI ! use mpi !#endif ! Inputs - type(GFS_control_type), intent(in) :: & - Model ! DDT containing model control parameters - integer,intent(in) :: & - mpicomm, & ! MPI communicator - mpirank, & ! Current MPI rank - mpiroot ! Master MPI rank + integer, intent(in) :: & + nrghice, & ! Number of ice-roughness categories + cld_optics_scheme, & ! Cloud-optics scheme + mpicomm, & ! MPI communicator + mpirank, & ! Current MPI rank + mpiroot ! Master MPI rank + character(len=128),intent(in) :: & + rrtmgp_root_dir, & ! RTE-RRTMGP root directory + rrtmgp_sw_file_clouds ! RRTMGP file containing coefficients used to compute clouds optical properties ! Outputs type(ty_cloud_optics),intent(out) :: & @@ -96,10 +98,10 @@ subroutine rrtmgp_sw_cloud_optics_init(Model,mpicomm, mpirank, mpiroot, sw_cloud errmsg = '' errflg = 0 - if (Model%rrtmgp_cld_optics .eq. 0) return + if (cld_optics_scheme .eq. 0) return - ! Filenames are set in the gfs_physics_nml (scm/src/GFS_typedefs.F90) - sw_cloud_props_file = trim(Model%rrtmgp_root)//trim(Model%sw_file_clouds) + ! Filenames are set in the physics_nml + sw_cloud_props_file = trim(rrtmgp_root_dir)//trim(rrtmgp_sw_file_clouds) ! Read dimensions for k-distribution fields (only on master processor(0)) ! if (mpirank .eq. mpiroot) then @@ -126,14 +128,14 @@ subroutine rrtmgp_sw_cloud_optics_init(Model,mpicomm, mpirank, mpiroot, sw_cloud endif ! Check to ensure that number of ice-roughness categories is feasible. - if (Model%rrtmgp_nrghice .gt. nrghice_sw) then + if (nrghice .gt. nrghice_sw) then errmsg = 'Number of RRTMGP ice-roughness categories requested in namelist file is not allowed' endif ! endif ! ! Broadcast dimensions to all processors !#ifdef MPI -! if (Model%rrtmgp_cld_optics .eq. 1 .or. Model%rrtmgp_cld_optics .eq. 2) then +! if (cld_optics_scheme .eq. 1 .or. cld_optics_scheme .eq. 2) then ! call MPI_BCAST(nbandSWcldy_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) ! call MPI_BCAST(nrghice_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) ! call MPI_BCAST(nsize_liq_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) @@ -146,7 +148,7 @@ subroutine rrtmgp_sw_cloud_optics_init(Model,mpicomm, mpirank, mpiroot, sw_cloud ! endif !#endif - if (Model%rrtmgp_cld_optics .eq. 1) then + if (cld_optics_scheme .eq. 1) then allocate(lut_extliq_sw(nsize_liq_sw, nBandSWcldy_sw)) allocate(lut_ssaliq_sw(nsize_liq_sw, nBandSWcldy_sw)) allocate(lut_asyliq_sw(nsize_liq_sw, nBandSWcldy_sw)) @@ -155,7 +157,7 @@ subroutine rrtmgp_sw_cloud_optics_init(Model,mpicomm, mpirank, mpiroot, sw_cloud allocate(lut_asyice_sw(nsize_ice_sw, nBandSWcldy_sw, nrghice_sw)) allocate(band_lims_cldy_sw(2, nBandSWcldy_sw)) endif - if (Model%rrtmgp_cld_optics .eq. 2) then + if (cld_optics_scheme .eq. 2) then allocate(pade_extliq_sw(nbandSWcldy_sw, nsizereg_sw, ncoeff_ext_sw )) allocate(pade_ssaliq_sw(nbandSWcldy_sw, nsizereg_sw, ncoeff_ssa_g_sw)) allocate(pade_asyliq_sw(nbandSWcldy_sw, nsizereg_sw, ncoeff_ssa_g_sw)) @@ -174,7 +176,7 @@ subroutine rrtmgp_sw_cloud_optics_init(Model,mpicomm, mpirank, mpiroot, sw_cloud ! On master processor, allocate space, read in fields, broadcast to all processors ! if (mpirank .eq. mpiroot) then ! - if (Model%rrtmgp_cld_optics .eq. 1) then + if (cld_optics_scheme .eq. 1) then write (*,*) 'Reading RRTMGP shortwave cloud data (LUT) ... ' ! if(nf90_open(trim(sw_cloud_props_file), NF90_WRITE, ncid_sw_clds) == NF90_NOERR) then @@ -208,7 +210,7 @@ subroutine rrtmgp_sw_cloud_optics_init(Model,mpicomm, mpirank, mpiroot, sw_cloud endif endif ! - if (Model%rrtmgp_cld_optics .eq. 2) then + if (cld_optics_scheme .eq. 2) then write (*,*) 'Reading RRTMGP shortwave cloud data (PADE) ... ' ! if(nf90_open(trim(sw_cloud_props_file), NF90_WRITE, ncid_sw_clds) == NF90_NOERR) then @@ -257,7 +259,7 @@ subroutine rrtmgp_sw_cloud_optics_init(Model,mpicomm, mpirank, mpiroot, sw_cloud ! Broadcast arrays to all processors !#ifdef MPI -! if (Model%rrtmgp_cld_optics .eq. 1) then +! if (cld_optics_scheme .eq. 1) then ! write (*,*) 'Broadcasting RRTMGP shortwave cloud data (LUT) ... ' !#ifndef SINGLE_PREC ! call MPI_BCAST(radliq_lwr_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) @@ -289,7 +291,7 @@ subroutine rrtmgp_sw_cloud_optics_init(Model,mpicomm, mpirank, mpiroot, sw_cloud ! call MPI_BCAST(band_lims_cldy_sw, size(band_lims_cldy_sw), MPI_REAL, mpiroot, mpicomm, ierr) !#endif ! endif -! if (Model%rrtmgp_cld_optics .eq. 2) then +! if (cld_optics_scheme .eq. 2) then ! write (*,*) 'Broadcasting RRTMGP shortwave cloud data (PADE) ... ' !#ifndef SINGLE_PREC ! call MPI_BCAST(pade_extliq_sw, size(pade_extliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) @@ -324,15 +326,15 @@ subroutine rrtmgp_sw_cloud_optics_init(Model,mpicomm, mpirank, mpiroot, sw_cloud !#endif ! Load tables data for RRTMGP cloud-optics - if (Model%rrtmgp_cld_optics .eq. 1) then - call check_error_msg('sw_cloud_optics_init',sw_cloud_props%set_ice_roughness(Model%rrtmgp_nrghice)) + if (cld_optics_scheme .eq. 1) then + call check_error_msg('sw_cloud_optics_init',sw_cloud_props%set_ice_roughness(nrghice)) call check_error_msg('sw_cloud_optics_init',sw_cloud_props%load(band_lims_cldy_sw, & radliq_lwr_sw, radliq_upr_sw, radliq_fac_sw, radice_lwr_sw, radice_upr_sw, & radice_fac_sw, lut_extliq_sw, lut_ssaliq_sw, lut_asyliq_sw, lut_extice_sw, & lut_ssaice_sw, lut_asyice_sw)) endif - if (Model%rrtmgp_cld_optics .eq. 2) then - call check_error_msg('sw_cloud_optics_init',sw_cloud_props%set_ice_roughness(Model%rrtmgp_nrghice)) + if (cld_optics_scheme .eq. 2) then + call check_error_msg('sw_cloud_optics_init',sw_cloud_props%set_ice_roughness(nrghice)) call check_error_msg('sw_cloud_optics_init', sw_cloud_props%load(band_lims_cldy_sw, & pade_extliq_sw, pade_ssaliq_sw, pade_asyliq_sw, pade_extice_sw, pade_ssaice_sw, & pade_asyice_sw, pade_sizereg_extliq_sw, pade_sizereg_ssaliq_sw, & @@ -347,53 +349,57 @@ end subroutine rrtmgp_sw_cloud_optics_init !! \section arg_table_rrtmgp_sw_cloud_optics_run !! \htmlinclude rrtmgp_sw_cloud_optics.html !! - subroutine rrtmgp_sw_cloud_optics_run(Model, ncol, cld_frac, cld_lwp, cld_reliq, cld_iwp, & - cld_reice, cld_swp, cld_resnow, cld_rwp, cld_rerain, sw_cloud_props, sw_gas_props, & - nday, idxday, sw_optical_props_cloudsByBand, cldtausw, errmsg, errflg) + subroutine rrtmgp_sw_cloud_optics_run(doSWrad, nCol, nLev, nDay, idxday, nrghice, & + cld_optics_scheme, cld_frac, cld_lwp, cld_reliq, cld_iwp, cld_reice, cld_swp, & + cld_resnow, cld_rwp, cld_rerain, sw_cloud_props, sw_gas_props, & + sw_optical_props_cloudsByBand, cldtausw, errmsg, errflg) ! Inputs - type(GFS_control_type), intent(in) :: & - Model + logical, intent(in) :: & + doSWrad ! Logical flag for shortwave radiation call integer, intent(in) :: & - ncol, & ! Number of horizontal gridpoints - nday ! Number of daylit points. + nCol, & ! Number of horizontal gridpoints + nLev, & ! Number of vertical levels + nday, & ! Number of daylit points. + nrghice, & ! Number of ice-roughness categories + cld_optics_scheme ! Cloud-optics scheme integer,intent(in),dimension(ncol) :: & - idxday ! Indices for daylit points. - real(kind_phys), dimension(ncol,model%levs),intent(in) :: & - cld_frac, & ! Total cloud fraction by layer - cld_lwp, & ! Cloud liquid water path - cld_reliq, & ! Cloud liquid effective radius - cld_iwp, & ! Cloud ice water path - cld_reice, & ! Cloud ice effective radius - cld_swp, & ! Cloud snow water path - cld_resnow, & ! Cloud snow effective radius - cld_rwp, & ! Cloud rain water path - cld_rerain ! Cloud rain effective radius + idxday ! Indices for daylit points. + real(kind_phys), dimension(ncol,nLev),intent(in) :: & + cld_frac, & ! Total cloud fraction by layer + cld_lwp, & ! Cloud liquid water path + cld_reliq, & ! Cloud liquid effective radius + cld_iwp, & ! Cloud ice water path + cld_reice, & ! Cloud ice effective radius + cld_swp, & ! Cloud snow water path + cld_resnow, & ! Cloud snow effective radius + cld_rwp, & ! Cloud rain water path + cld_rerain ! Cloud rain effective radius type(ty_cloud_optics),intent(in) :: & - sw_cloud_props ! RRTMGP DDT: + sw_cloud_props ! RRTMGP DDT: type(ty_gas_optics_rrtmgp),intent(in) :: & - sw_gas_props ! RRTMGP DDT: K-distribution data + sw_gas_props ! RRTMGP DDT: K-distribution data ! Outputs character(len=*), intent(out) :: & - errmsg ! Error message + errmsg ! Error message integer, intent(out) :: & - errflg ! Error code + errflg ! Error code type(ty_optical_props_2str),intent(out) :: & sw_optical_props_cloudsByBand ! RRTMGP DDT: Shortwave optical properties (cloudy atmosphere) - real(kind_phys), dimension(ncol,Model%levs), intent(out) :: & - cldtausw ! approx 10.mu band layer cloud optical depth + real(kind_phys), dimension(ncol,NLev), intent(out) :: & + cldtausw ! approx 10.mu band layer cloud optical depth ! Local variables - logical,dimension(nday,model%levs) :: liqmask, icemask - real(kind_phys), dimension(nday,model%levs,sw_gas_props%get_nband()) :: & + logical,dimension(nday,nLev) :: liqmask, icemask + real(kind_phys), dimension(nday,nLev,sw_gas_props%get_nband()) :: & tau_cld, ssa_cld, asy_cld ! Initialize CCPP error handling variables errmsg = '' errflg = 0 - if (.not. Model%lsswr) return + if (.not. doSWrad) return if (nDay .gt. 0) then ! ####################################################################################### @@ -405,20 +411,20 @@ subroutine rrtmgp_sw_cloud_optics_run(Model, ncol, cld_frac, cld_lwp, cld_reliq, ! ####################################################################################### ! Allocate space for RRTMGP DDTs containing cloud radiative properties ! ####################################################################################### - ! Cloud optics [nday,model%levs,nBands] + ! Cloud optics [nday,nLev,nBands] call check_error_msg('rrtmgp_sw_cloud_optics_run',sw_optical_props_cloudsByBand%alloc_2str(& - nday, model%levs, sw_gas_props%get_band_lims_wavenumber())) + nday, nLev, sw_gas_props%get_band_lims_wavenumber())) ! ####################################################################################### ! Compute cloud-optics for RTE. ! ####################################################################################### - if (Model%rrtmgp_cld_optics .gt. 0) then + if (cld_optics_scheme .gt. 0) then ! RRTMGP cloud-optics. call check_error_msg('rrtmgp_sw_cloud_optics_run',sw_cloud_props%cloud_optics(& nday, & ! IN - Number of daylit gridpoints - model%levs, & ! IN - Number of vertical layers + nLev, & ! IN - Number of vertical layers sw_cloud_props%get_nband(), & ! IN - Number of SW bands - Model%rrtmgp_nrghice, & ! IN - Number of ice-roughness categories + nrghice, & ! IN - Number of ice-roughness categories liqmask, & ! IN - Liquid-cloud mask icemask, & ! IN - Ice-cloud mask cld_lwp(idxday(1:nday),:), & ! IN - Cloud liquid water path @@ -433,7 +439,7 @@ subroutine rrtmgp_sw_cloud_optics_run(Model, ncol, cld_frac, cld_lwp, cld_reliq, sw_optical_props_cloudsByBand%tau(:,:,:) = 0._kind_phys sw_optical_props_cloudsByBand%ssa(:,:,:) = 0._kind_phys sw_optical_props_cloudsByBand%g(:,:,:) = 0._kind_phys - call rrtmg_sw_cloud_optics(nday, model%levs, sw_gas_props%get_nband(), & + call rrtmg_sw_cloud_optics(nday, nLev, sw_gas_props%get_nband(), & cld_lwp(idxday(1:nday),:), cld_reliq(idxday(1:nday),:), & cld_iwp(idxday(1:nday),:), cld_reice(idxday(1:nday),:), & cld_rwp(idxday(1:nday),:), cld_rerain(idxday(1:nday),:), & @@ -445,7 +451,7 @@ subroutine rrtmgp_sw_cloud_optics_run(Model, ncol, cld_frac, cld_lwp, cld_reliq, endif endif - ! GFS_RRTMGP_POST_RUN() requires the SW optical depth ~0.55microns + ! All-sky SW optical depth ~0.55microns cldtausw(idxday(1:nDay),:) = sw_optical_props_cloudsByBand%tau(:,:,11) endif diff --git a/physics/rrtmgp_sw_cloud_optics.meta b/physics/rrtmgp_sw_cloud_optics.meta index 283270081..e9450eb77 100644 --- a/physics/rrtmgp_sw_cloud_optics.meta +++ b/physics/rrtmgp_sw_cloud_optics.meta @@ -1,14 +1,40 @@ [ccpp-arg-table] name = rrtmgp_sw_cloud_optics_init type = scheme -[Model] - standard_name = GFS_control_type_instance - long_name = instance of derived type GFS_control_type - units = DDT - dimensions = () - type = GFS_control_type +[cld_optics_scheme] + standard_name = rrtmgp_cloud_optics_flag + long_name = Flag to control which RRTMGP cloud-optics scheme + units = flag + dimensions = () + type = integer + intent = in + optional = F +[nrghice] + standard_name = number_of_rrtmgp_ice_roughness + long_name = number of ice-roughness categories in RRTMGP calculation + units = count + dimensions = () + type = integer + intent = in + optional = F +[rrtmgp_root_dir] + standard_name = directory_for_rte_rrtmgp_source_code + long_name = directory for rte+rrtmgp source code + units = none + dimensions = () + type = character + intent = in + optional = F + kind = len=128 +[rrtmgp_sw_file_clouds] + standard_name = rrtmgp_coeff_sw_cloud_optics + long_name = file containing coefficients for RRTMGP SW cloud optics + units = none + dimensions = () + type = character intent = in optional = F + kind = len=128 [mpirank] standard_name = mpi_rank long_name = current MPI rank @@ -63,12 +89,12 @@ [ccpp-arg-table] name = rrtmgp_sw_cloud_optics_run type = scheme -[Model] - standard_name = GFS_control_type_instance - long_name = instance of derived type GFS_control_type - units = DDT +[doSWrad] + standard_name = flag_to_calc_sw + long_name = logical flags for sw radiation calls + units = flag dimensions = () - type = GFS_control_type + type = logical intent = in optional = F [ncol] @@ -79,6 +105,30 @@ type = integer intent = in optional = F +[nLev] + standard_name = vertical_dimension + long_name = number of vertical levels + units = count + dimensions = () + type = integer + intent = in + optional = F +[cld_optics_scheme] + standard_name = rrtmgp_cloud_optics_flag + long_name = Flag to control which RRTMGP cloud-optics scheme + units = flag + dimensions = () + type = integer + intent = in + optional = F +[nrghice] + standard_name = number_of_rrtmgp_ice_roughness + long_name = number of ice-roughness categories in RRTMGP calculation + units = count + dimensions = () + type = integer + intent = in + optional = F [cld_frac] standard_name = total_cloud_fraction long_name = layer total cloud fraction diff --git a/physics/rrtmgp_sw_clrallsky_driver.F90 b/physics/rrtmgp_sw_clrallsky_driver.F90 deleted file mode 100644 index 3e7b94640..000000000 --- a/physics/rrtmgp_sw_clrallsky_driver.F90 +++ /dev/null @@ -1,179 +0,0 @@ -! ########################################################################################### -! ########################################################################################### -module rrtmgp_sw_clrallsky_driver - use machine, only: kind_phys - use GFS_typedefs, only: GFS_control_type, GFS_radtend_type, GFS_interstitial_type - use mo_rte_kind, only: wl - use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp - use mo_cloud_optics, only: ty_cloud_optics - use mo_optical_props, only: ty_optical_props_2str - use mo_rrtmgp_clr_all_sky, only: rte_sw - use mo_gas_concentrations, only: ty_gas_concs - use mo_fluxes_byband, only: ty_fluxes_byband - use module_radsw_parameters, only: cmpfsw_type - use rrtmgp_aux, only: check_error_msg - - public rrtmgp_sw_clrallsky_driver_init, rrtmgp_sw_clrallsky_driver_run, rrtmgp_sw_clrallsky_driver_finalize - -contains - - ! ######################################################################################### - ! SUBROUTINE rrtmgp_sw_clrallsky_driver_init - ! ######################################################################################### - subroutine rrtmgp_sw_clrallsky_driver_init() - end subroutine rrtmgp_sw_clrallsky_driver_init - - ! ######################################################################################### - ! SUBROUTINE rrtmgp_sw_clrallsky_driver_run - ! ######################################################################################### -!! \section arg_table_rrtmgp_sw_clrallsky_driver_run -!! \htmlinclude rrtmgp_sw_clrallsky_driver.html -!! - subroutine rrtmgp_sw_clrallsky_driver_run(Model, Interstitial, Radtend, ncol, sw_gas_props, p_lay, t_lay,& - p_lev, gas_concentrations,sw_optical_props_clouds, sw_optical_props_aerosol, lsswr, & - nday, idxday, hsw0, hswb, scmpsw, & - fluxswUP_allsky, fluxswDOWN_allsky, fluxswUP_clrsky, fluxswDOWN_clrsky, errmsg, errflg) - - ! Inputs - type(GFS_control_type), intent(in) :: Model - type(GFS_interstitial_type), intent(in) :: Interstitial - type(GFS_radtend_type), intent(in) :: Radtend - integer, intent(in) :: & - ncol, & ! Number of horizontal gridpoints - nday ! Number of daytime points - integer, intent(in), dimension(nday) :: & - idxday ! Index array for daytime points - real(kind_phys), dimension(ncol,Model%levs), intent(in) :: & - p_lay, & ! Pressure @ model layer-centers (hPa) - t_lay ! Temperature (K) - real(kind_phys), dimension(ncol,Model%levs+1), intent(in) :: & - p_lev ! Pressure @ model layer-interfaces (hPa) - type(ty_gas_optics_rrtmgp),intent(in) :: & - sw_gas_props ! DDT containing SW spectral information - type(ty_optical_props_2str),intent(in) :: & - sw_optical_props_clouds, & ! RRTMGP DDT: longwave cloud radiative properties - sw_optical_props_aerosol ! RRTMGP DDT: longwave aerosol radiative properties - - type(ty_gas_concs),intent(in) :: & - gas_concentrations ! RRTMGP DDT: trace gas concentrations (vmr) - logical, intent(in) :: & - lsswr ! Flag to calculate SW irradiances - - ! Outputs - character(len=*), intent(out) :: errmsg - integer, intent(out) :: errflg - real(kind_phys), dimension(ncol,Model%levs+1), intent(out) :: & - fluxswUP_allsky, & ! All-sky flux (W/m2) - fluxswDOWN_allsky, & ! All-sky flux (W/m2) - fluxswUP_clrsky, & ! Clear-sky flux (W/m2) - fluxswDOWN_clrsky ! All-sky flux (W/m2) - - ! Inputs (optional) (NOTE. We only need the optional arguments to know what fluxes to output, HR's are computed later) - real(kind_phys), dimension(ncol,Model%levs), optional, intent(inout) :: & - hsw0 ! Clear-sky heating rate (K/sec) - real(kind_phys), dimension(ncol,Model%levs,sw_gas_props%get_nband()), intent(inout), optional :: & - hswb ! All-sky heating rate, by band (K/sec) - ! Outputs (optional) - type(cmpfsw_type), dimension(ncol), intent(inout),optional :: & - scmpsw ! 2D surface fluxes, components: - ! uvbfc - total sky downward uv-b flux at (W/m2) - ! uvbf0 - clear sky downward uv-b flux at (W/m2) - ! nirbm - downward nir direct beam flux (W/m2) - ! nirdf - downward nir diffused flux (W/m2) - ! visbm - downward uv+vis direct beam flux (W/m2) - ! visdf - downward uv+vis diffused flux (W/m2) - - ! Local variables - type(ty_fluxes_byband) :: & - flux_allsky, & ! All-sky flux (W/m2) - flux_clrsky ! Clear-sky flux (W/m2) - real(kind_phys), dimension(nday,Model%levs+1),target :: & - fluxSW_up_allsky, fluxSW_up_clrsky, fluxSW_dn_allsky, fluxSW_dn_clrsky - real(kind_phys), dimension(nday,Model%levs+1,sw_gas_props%get_nband()),target :: & - fluxSWBB_up_allsky, fluxSWBB_dn_allsky - real(kind_phys), dimension(ncol,Model%levs) :: vmrTemp - logical :: l_ClrSky_HR=.false., l_AllSky_HR_byband=.false., l_scmpsw=.false. - integer :: iGas - type(ty_optical_props_2str) :: & - sw_optical_props_clouds_daylit, & ! RRTMGP DDT: longwave cloud radiative properties - sw_optical_props_aerosol_daylit ! RRTMGP DDT: longwave aerosol radiative properties - type(ty_gas_concs) :: & - gas_concentrations_daylit ! RRTMGP DDT: trace gas concentrations (vmr) - - ! Initialize CCPP error handling variables - errmsg = '' - errflg = 0 - - if (.not. lsswr) return - - ! Are any optional outputs requested? Need to know now to compute correct fluxes. - l_ClrSky_HR = present(hsw0) - l_AllSky_HR_byband = present(hswb) - l_scmpsw = present(scmpsw) - if ( l_scmpsw ) then - scmpsw = cmpfsw_type (0., 0., 0., 0., 0., 0.) - endif - fluxswUP_allsky(:,:) = 0._kind_phys - fluxswDOWN_allsky(:,:) = 0._kind_phys - fluxswUP_clrsky(:,:) = 0._kind_phys - fluxswDOWN_clrsky(:,:) = 0._kind_phys - - if (nDay .gt. 0) then - - ! Subset the cloud and aerosol radiative properties over daylit points. - ! Cloud optics [nDay,Model%levs,nBands] - call check_error_msg('rrtmgp_sw_clrallsky_driver_run',sw_optical_props_clouds_daylit%alloc_2str(nday, Model%levs, sw_gas_props)) - sw_optical_props_clouds_daylit%tau = sw_optical_props_clouds%tau(idxday,:,:) - sw_optical_props_clouds_daylit%ssa = sw_optical_props_clouds%ssa(idxday,:,:) - sw_optical_props_clouds_daylit%g = sw_optical_props_clouds%g(idxday,:,:) - ! Aerosol optics [nDay,Model%levs,nBands] - call check_error_msg('rrtmgp_sw_clrallsky_driver_run',sw_optical_props_aerosol_daylit%alloc_2str(nday, Model%levs, sw_gas_props%get_band_lims_wavenumber())) - sw_optical_props_aerosol_daylit%tau = sw_optical_props_aerosol%tau(idxday,:,:) - sw_optical_props_aerosol_daylit%ssa = sw_optical_props_aerosol%ssa(idxday,:,:) - sw_optical_props_aerosol_daylit%g = sw_optical_props_aerosol%g(idxday,:,:) - - ! Similarly, subset the gas concentrations. - do iGas=1,Model%nGases - call check_error_msg('rrtmgp_sw_clrallsky_driver_run',gas_concentrations%get_vmr(trim(Model%active_gases_array(iGas)),vmrTemp)) - call check_error_msg('rrtmgp_sw_clrallsky_driver_run',gas_concentrations_daylit%set_vmr(trim(Model%active_gases_array(iGas)),vmrTemp(idxday,:))) - enddo - - ! Initialize RRTMGP DDT containing 2D(3D) fluxes - flux_allsky%flux_up => fluxSW_up_allsky - flux_allsky%flux_dn => fluxSW_dn_allsky - flux_clrsky%flux_up => fluxSW_up_clrsky - flux_clrsky%flux_dn => fluxSW_dn_clrsky - ! Only calculate fluxes by-band, only when heating-rate profiles by band are requested. - if (l_AllSky_HR_byband) then - flux_allsky%bnd_flux_up => fluxSWBB_up_allsky - flux_allsky%bnd_flux_dn => fluxSWBB_dn_allsky - endif - - ! Call RRTMGP SW scheme - call check_error_msg('rrtmgp_sw_clrallsky_driver_run',rte_sw( & - sw_gas_props, & ! IN - spectral information - gas_concentrations_daylit, & ! IN - gas concentrations (vmr) - p_lay(idxday,1:Model%levs), & ! IN - pressure at layer interfaces (Pa) - t_lay(idxday,1:Model%levs), & ! IN - temperature at layer interfaes (K) - p_lev(idxday,1:Model%levs+1), & ! IN - pressure at layer centers (Pa) - Radtend%coszen(idxday), & ! IN - Cosine of solar zenith angle - Interstitial%sfc_alb_nir_dir(:,idxday), & ! IN - Shortwave surface albedo (direct) - Interstitial%sfc_alb_nir_dif(:,idxday), & ! IN - Shortwave surface albedo (diffuse) - sw_optical_props_clouds_daylit, & ! IN - DDT containing cloud optical information - flux_allsky, & ! OUT - Fluxes, all-sky, 3D (nCol,Model%levs,nBand) - flux_clrsky, & ! OUT - Fluxes, clear-sky, 3D (nCol,Model%levs,nBand) - aer_props = sw_optical_props_aerosol_daylit)) ! IN(optional) - DDT containing aerosol optical information - fluxswUP_allsky(idxday,:) = flux_allsky%flux_up - fluxswDOWN_allsky(idxday,:) = flux_allsky%flux_dn - fluxswUP_clrsky(idxday,:) = flux_clrsky%flux_up - fluxswDOWN_clrsky(idxday,:) = flux_clrsky%flux_dn - endif - end subroutine rrtmgp_sw_clrallsky_driver_run - - ! ######################################################################################### - ! SUBROUTINE rrtmgp_sw_clrallsky_driver_finalize - ! ######################################################################################### - subroutine rrtmgp_sw_clrallsky_driver_finalize() - end subroutine rrtmgp_sw_clrallsky_driver_finalize - -end module rrtmgp_sw_clrallsky_driver diff --git a/physics/rrtmgp_sw_clrallsky_driver.meta b/physics/rrtmgp_sw_clrallsky_driver.meta deleted file mode 100644 index 092bdb417..000000000 --- a/physics/rrtmgp_sw_clrallsky_driver.meta +++ /dev/null @@ -1,197 +0,0 @@ -[ccpp-arg-table] - name = rrtmgp_sw_clrallsky_driver_run - type = scheme -[Model] - standard_name = GFS_control_type_instance - long_name = instance of derived type GFS_control_type - units = DDT - dimensions = () - type = GFS_control_type - intent = in - optional = F -[Interstitial] - standard_name = GFS_interstitial_type_instance - long_name = derived type GFS_interstitial_type in FV3 - units = DDT - dimensions = () - type = GFS_interstitial_type - intent = in - optional = F -[Radtend] - standard_name = GFS_radtend_type_instance - long_name = instance of derived type GFS_radtend_type - units = DDT - dimensions = () - type = GFS_radtend_type - intent = in - optional = F -[ncol] - standard_name = horizontal_loop_extent - long_name = horizontal dimension - units = count - dimensions = () - type = integer - intent = in - optional = F -[p_lay] - standard_name = air_pressure_at_layer_for_RRTMGP_in_hPa - long_name = air pressure layer - units = hPa - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[p_lev] - standard_name = air_pressure_at_interface_for_RRTMGP_in_hPa - long_name = air pressure level - units = hPa - dimensions = (horizontal_dimension,vertical_dimension_plus_one) - type = real - kind = kind_phys - intent = in - optional = F -[t_lay] - standard_name = air_temperature_at_layer_for_RRTMGP - long_name = air temperature layer - units = K - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[sw_gas_props] - standard_name = coefficients_for_sw_gas_optics - long_name = DDT containing spectral information for RRTMGP SW radiation scheme - units = DDT - dimensions = () - type = ty_gas_optics_rrtmgp - intent = in - optional = F -[sw_optical_props_clouds] - standard_name = shortwave_optical_properties_for_cloudy_atmosphere - long_name = Fortran DDT containing RRTMGP optical properties - units = DDT - dimensions = () - type = ty_optical_props_2str - intent = in - optional = F -[sw_optical_props_aerosol] - standard_name = shortwave_optical_properties_for_aerosols - long_name = Fortran DDT containing RRTMGP optical properties - units = DDT - dimensions = () - type = ty_optical_props_2str - intent = in - optional = F -[gas_concentrations] - standard_name = Gas_concentrations_for_RRTMGP_suite - long_name = DDT containing gas concentrations for RRTMGP radiation scheme - units = DDT - dimensions = () - type = ty_gas_concs - intent = in - optional = F -[lsswr] - standard_name = flag_to_calc_sw - long_name = flag to calculate SW irradiances - units = flag - dimensions = () - type = logical - intent = in - optional = F -[nday] - standard_name = daytime_points_dimension - long_name = daytime points dimension - units = count - dimensions = () - type = integer - intent = in - optional = F -[idxday] - standard_name = daytime_points - long_name = daytime points - units = index - dimensions = (horizontal_dimension) - type = integer - intent = in - optional = F -[hsw0] - standard_name = RRTMGP_sw_heating_rate_clear_sky - long_name = RRTMGP shortwave clear sky heating rate - units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = T -[hswb] - standard_name = RRTMGP_sw_heating_rate_spectral - long_name = RRTMGP shortwave total sky heating rate (spectral) - units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension,number_of_sw_spectral_points_rrtmgp) - type = real - kind = kind_phys - intent = inout - optional = T -[scmpsw] - standard_name = components_of_surface_downward_shortwave_fluxes - long_name = derived type for special components of surface downward shortwave fluxes - units = W m-2 - dimensions = (horizontal_dimension) - type = cmpfsw_type - intent = inout - optional = T -[fluxswUP_allsky] - standard_name = RRTMGP_sw_flux_profile_upward_allsky - long_name = RRTMGP upward shortwave all-sky flux profile - units = W m-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) - type = real - kind = kind_phys - intent = out - optional = F -[fluxswDOWN_allsky] - standard_name = RRTMGP_sw_flux_profile_downward_allsky - long_name = RRTMGP downward shortwave all-sky flux profile - units = W m-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) - type = real - kind = kind_phys - intent = out - optional = F -[fluxswUP_clrsky] - standard_name = RRTMGP_sw_flux_profile_upward_clrsky - long_name = RRTMGP upward shortwave clr-sky flux profile - units = W m-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) - type = real - kind = kind_phys - intent = out - optional = F -[fluxswDOWN_clrsky] - standard_name = RRTMGP_sw_flux_profile_downward_clrsky - long_name = RRTMGP downward shortwave clr-sky flux profile - units = W m-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) - type = real - kind = kind_phys - intent = out - optional = F -[errmsg] - standard_name = ccpp_error_message - long_name = error message for error handling in CCPP - units = none - dimensions = () - type = character - kind = len=* - intent = out - optional = F -[errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag - dimensions = () - type = integer - intent = out - optional = F diff --git a/physics/rrtmgp_sw_gas_optics.F90 b/physics/rrtmgp_sw_gas_optics.F90 index 71fefa648..b14f1501c 100644 --- a/physics/rrtmgp_sw_gas_optics.F90 +++ b/physics/rrtmgp_sw_gas_optics.F90 @@ -1,6 +1,5 @@ module rrtmgp_sw_gas_optics use machine, only: kind_phys - use GFS_typedefs, only: GFS_control_type use module_radiation_gases, only: NF_VGAS use mo_rte_kind, only: wl use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp @@ -121,11 +120,9 @@ subroutine rrtmgp_sw_gas_optics_init(rrtmgp_root_dir, rrtmgp_sw_file_gas, rrtmgp errmsg = '' errflg = 0 - ! Filenames are set in the gfs_physics_nml (GFS_typedefs.F90) + ! Filenames are set in the gphysics_nml sw_gas_props_file = trim(rrtmgp_root_dir)//trim(rrtmgp_sw_file_gas) - print*,'sw_gas_props_file: ',sw_gas_props_file - print*,'1; ',rrtmgp_root_dir - print*,'2; ',rrtmgp_sw_file_gas + ! Read dimensions for k-distribution fields (only on master processor(0)) ! if (mpirank .eq. mpiroot) then if(nf90_open(trim(sw_gas_props_file), NF90_WRITE, ncid_sw) .eq. NF90_NOERR) then diff --git a/physics/rrtmgp_sw_rte.F90 b/physics/rrtmgp_sw_rte.F90 index 66e73516e..5adf04bee 100644 --- a/physics/rrtmgp_sw_rte.F90 +++ b/physics/rrtmgp_sw_rte.F90 @@ -1,6 +1,5 @@ module rrtmgp_sw_rte use machine, only: kind_phys - use GFS_typedefs, only: GFS_control_type, GFS_radtend_type, GFS_statein_type use mo_rte_kind, only: wl use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp use mo_cloud_optics, only: ty_cloud_optics @@ -27,37 +26,37 @@ end subroutine rrtmgp_sw_rte_init !! \section arg_table_rrtmgp_sw_rte_run !! \htmlinclude rrtmgp_sw_rte.html !! - subroutine rrtmgp_sw_rte_run(Model, Radtend, Statein, ncol, sw_gas_props, p_lay, t_lay, & - p_lev, gas_concentrations, sw_optical_props_clrsky, sfc_alb_nir_dir, sfc_alb_nir_dif,& - sfc_alb_uvvis_dir, sfc_alb_uvvis_dif, toa_src_sw, sw_optical_props_clouds, & - sw_optical_props_aerosol, lsswr, nday, idxday, hsw0, hswb, rrtmgp_nGases, active_gases_array, scmpsw, fluxswUP_allsky, & - fluxswDOWN_allsky, fluxswUP_clrsky, fluxswDOWN_clrsky, errmsg, errflg) + subroutine rrtmgp_sw_rte_run(doSWrad, nCol, nLev, nDay, idxday, coszen, p_lay, t_lay, & + p_lev, sw_gas_props, gas_concentrations, sw_optical_props_clrsky, sfc_alb_nir_dir, & + sfc_alb_nir_dif, sfc_alb_uvvis_dir, sfc_alb_uvvis_dif, toa_src_sw, & + sw_optical_props_clouds, sw_optical_props_aerosol, rrtmgp_nGases, active_gases_array, & + scmpsw, fluxswUP_allsky, fluxswDOWN_allsky, fluxswUP_clrsky, fluxswDOWN_clrsky, & + hsw0, hswb, errmsg, errflg) ! Inputs - - integer, intent(in) :: & - rrtmgp_nGases ! Number of trace gases active in RRTMGP - character(len=*),dimension(rrtmgp_nGases), intent(in) :: & - active_gases_array ! Character array containing trace gases to include in RRTMGP - - type(GFS_control_type), intent(in) :: & - Model - type(GFS_radtend_type), intent(in) :: & - Radtend - type(GFS_statein_type), intent(in) :: & - Statein ! DDT: FV3-GFS prognostic state data in from dycore + logical, intent(in) :: & + doSWrad ! Flag to calculate SW irradiances integer, intent(in) :: & - ncol, & ! Number of horizontal gridpoints - nday ! Number of daytime points + nCol, & ! Number of horizontal gridpoints + nday, & ! Number of daytime points + nLev ! Number of vertical levels integer, intent(in), dimension(ncol) :: & idxday ! Index array for daytime points - real(kind_phys), dimension(ncol,Model%levs), intent(in) :: & + real(kind_phys),intent(in), dimension(ncol) :: & + coszen ! Cosize of SZA + real(kind_phys), dimension(ncol,NLev), intent(in) :: & p_lay, & ! Pressure @ model layer-centers (Pa) t_lay ! Temperature (K) - real(kind_phys), dimension(ncol,Model%levs+1), intent(in) :: & + real(kind_phys), dimension(ncol,NLev+1), intent(in) :: & p_lev ! Pressure @ model layer-interfaces (Pa) type(ty_gas_optics_rrtmgp),intent(in) :: & sw_gas_props ! RRTMGP DDT: SW spectral information + type(ty_gas_concs),intent(in) :: & + gas_concentrations ! RRTMGP DDT: trace gas concentrations (vmr) + type(ty_optical_props_2str),intent(inout) :: & + sw_optical_props_clrsky, & ! RRTMGP DDT: shortwave clear-sky radiative properties + sw_optical_props_clouds, & ! RRTMGP DDT: shortwave cloud radiative properties + sw_optical_props_aerosol ! RRTMGP DDT: shortwave aerosol radiative properties real(kind_phys), dimension(sw_gas_props%get_nband(),ncol), intent(in) :: & sfc_alb_nir_dir, & ! Surface albedo (direct) sfc_alb_nir_dif, & ! Surface albedo (diffuse) @@ -65,29 +64,28 @@ subroutine rrtmgp_sw_rte_run(Model, Radtend, Statein, ncol, sw_gas_props, p_lay, sfc_alb_uvvis_dif ! Surface albedo (diffuse) real(kind_phys), dimension(ncol,sw_gas_props%get_ngpt()), intent(in) :: & toa_src_sw ! TOA incident spectral flux (W/m2) - type(ty_optical_props_2str),intent(inout) :: & - sw_optical_props_clrsky, & ! RRTMGP DDT: longwave clear-sky radiative properties - sw_optical_props_clouds, & ! RRTMGP DDT: longwave cloud radiative properties - sw_optical_props_aerosol ! RRTMGP DDT: longwave aerosol radiative properties - type(ty_gas_concs),intent(in) :: & - gas_concentrations ! RRTMGP DDT: trace gas concentrations (vmr) - logical, intent(in) :: & - lsswr ! Flag to calculate SW irradiances + integer, intent(in) :: & + rrtmgp_nGases ! Number of trace gases active in RRTMGP + character(len=*),dimension(rrtmgp_nGases), intent(in) :: & + active_gases_array ! Character array containing trace gases to include in RRTMGP + + ! Inputs (optional) (NOTE. We only need the optional arguments to know what fluxes to output, HR's are computed later) + real(kind_phys), dimension(ncol,NLev), optional, intent(inout) :: & + hsw0 ! Clear-sky heating rate (K/sec) + real(kind_phys), dimension(ncol,NLev,sw_gas_props%get_nband()), intent(inout), optional :: & + hswb ! All-sky heating rate, by band (K/sec) ! Outputs - character(len=*), intent(out) :: errmsg - integer, intent(out) :: errflg - real(kind_phys), dimension(ncol,Model%levs+1), intent(inout) :: & + character(len=*), intent(out) :: & + errmsg ! CCPP error message + integer, intent(out) :: & + errflg ! CCPP error flag + real(kind_phys), dimension(ncol,NLev+1), intent(inout) :: & fluxswUP_allsky, & ! RRTMGP upward all-sky flux profiles (W/m2) fluxswDOWN_allsky, & ! RRTMGP downward all-sky flux profiles (W/m2) fluxswUP_clrsky, & ! RRTMGP upward clear-sky flux profiles (W/m2) fluxswDOWN_clrsky ! RRTMGP downward clear-sky flux profiles (W/m2) - ! Inputs (optional) (NOTE. We only need the optional arguments to know what fluxes to output, HR's are computed later) - real(kind_phys), dimension(ncol,Model%levs), optional, intent(inout) :: & - hsw0 ! Clear-sky heating rate (K/sec) - real(kind_phys), dimension(ncol,Model%levs,sw_gas_props%get_nband()), intent(inout), optional :: & - hswb ! All-sky heating rate, by band (K/sec) ! Outputs (optional) type(cmpfsw_type), dimension(ncol), intent(inout),optional :: & scmpsw ! 2D surface fluxes, components: @@ -104,9 +102,9 @@ subroutine rrtmgp_sw_rte_run(Model, Radtend, Statein, ncol, sw_gas_props, p_lay, type(ty_fluxes_byband) :: & flux_allsky, & ! All-sky flux (W/m2) flux_clrsky ! Clear-sky flux (W/m2) - real(kind_phys), dimension(nday,Model%levs+1,sw_gas_props%get_nband()),target :: & + real(kind_phys), dimension(nday,NLev+1,sw_gas_props%get_nband()),target :: & fluxSW_up_allsky, fluxSW_up_clrsky, fluxSW_dn_allsky, fluxSW_dn_clrsky, fluxSW_dn_dir_allsky - real(kind_phys), dimension(ncol,Model%levs) :: vmrTemp + real(kind_phys), dimension(ncol,NLev) :: vmrTemp logical :: l_ClrSky_HR=.false., l_AllSky_HR_byband=.false., l_scmpsw=.false., top_at_1 integer :: iGas,iSFC,iTOA type(ty_optical_props_2str) :: & @@ -120,17 +118,17 @@ subroutine rrtmgp_sw_rte_run(Model, Radtend, Statein, ncol, sw_gas_props, p_lay, errmsg = '' errflg = 0 - if (.not. lsswr) return + if (.not. doSWrad) return if (nDay .gt. 0) then ! Vertical ordering? - top_at_1 = (p_lev(1,1) .lt. p_lev(1, Model%levs)) + top_at_1 = (p_lev(1,1) .lt. p_lev(1, NLev)) if (top_at_1) then - iSFC = Model%levs+1 + iSFC = NLev+1 iTOA = 1 else iSFC = 1 - iTOA = Model%levs+1 + iTOA = NLev+1 endif ! Are any optional outputs requested? Need to know now to compute correct fluxes. @@ -173,13 +171,13 @@ subroutine rrtmgp_sw_rte_run(Model, Radtend, Statein, ncol, sw_gas_props, p_lay, call check_error_msg('rrtmgp_sw_rte_run',sw_optical_props_clrsky%delta_scale()) if (l_ClrSky_HR) then call check_error_msg('rrtmgp_sw_rte_run',rte_sw( & - sw_optical_props_clrsky, & ! IN - optical-properties - top_at_1, & ! IN - veritcal ordering flag - Radtend%coszen(idxday(1:nday)), & ! IN - Cosine of solar zenith angle - toa_src_sw(idxday(1:nday),:), & ! IN - incident solar flux at TOA - sfc_alb_dir, & ! IN - Shortwave surface albedo (direct) - sfc_alb_dif, & ! IN - Shortwave surface albedo (diffuse) - flux_clrsky)) ! OUT - Fluxes, clear-sky, 3D (nCol,Model%levs,nBand) + sw_optical_props_clrsky, & ! IN - optical-properties + top_at_1, & ! IN - veritcal ordering flag + coszen(idxday(1:nday)), & ! IN - Cosine of solar zenith angle + toa_src_sw(idxday(1:nday),:), & ! IN - incident solar flux at TOA + sfc_alb_dir, & ! IN - Shortwave surface albedo (direct) + sfc_alb_dif, & ! IN - Shortwave surface albedo (diffuse) + flux_clrsky)) ! OUT - Fluxes, clear-sky, 3D (nCol,NLev,nBand) ! Store fluxes fluxswUP_clrsky(idxday(1:nday),:) = sum(flux_clrsky%bnd_flux_up,dim=3) fluxswDOWN_clrsky(idxday(1:nday),:) = sum(flux_clrsky%bnd_flux_dn,dim=3) @@ -191,13 +189,13 @@ subroutine rrtmgp_sw_rte_run(Model, Radtend, Statein, ncol, sw_gas_props, p_lay, ! Delta-scale optical properties call check_error_msg('rrtmgp_sw_rte_run',sw_optical_props_clouds%delta_scale()) call check_error_msg('rrtmgp_sw_rte_run',rte_sw( & - sw_optical_props_clrsky, & ! IN - optical-properties - top_at_1, & ! IN - veritcal ordering flag - Radtend%coszen(idxday(1:nday)), & ! IN - Cosine of solar zenith angle - toa_src_sw(idxday(1:nday),:), & ! IN - incident solar flux at TOA - sfc_alb_dir, & ! IN - Shortwave surface albedo (direct) - sfc_alb_dif, & ! IN - Shortwave surface albedo (diffuse) - flux_allsky)) ! OUT - Fluxes, clear-sky, 3D (nCol,Model%levs,nBand) + sw_optical_props_clrsky, & ! IN - optical-properties + top_at_1, & ! IN - veritcal ordering flag + coszen(idxday(1:nday)), & ! IN - Cosine of solar zenith angle + toa_src_sw(idxday(1:nday),:), & ! IN - incident solar flux at TOA + sfc_alb_dir, & ! IN - Shortwave surface albedo (direct) + sfc_alb_dif, & ! IN - Shortwave surface albedo (diffuse) + flux_allsky)) ! OUT - Fluxes, clear-sky, 3D (nCol,NLev,nBand) ! Store fluxes fluxswUP_allsky(idxday(1:nday),:) = sum(flux_allsky%bnd_flux_up,dim=3) fluxswDOWN_allsky(idxday(1:nday),:) = sum(flux_allsky%bnd_flux_dn,dim=3) diff --git a/physics/rrtmgp_sw_rte.meta b/physics/rrtmgp_sw_rte.meta index e9dee8cc4..4722a70f8 100644 --- a/physics/rrtmgp_sw_rte.meta +++ b/physics/rrtmgp_sw_rte.meta @@ -1,55 +1,55 @@ [ccpp-arg-table] name = rrtmgp_sw_rte_run type = scheme -[rrtmgp_nGases] - standard_name = number_of_active_gases_used_by_RRTMGP - long_name = number of gases available used by RRTMGP - units = count - dimensions = () - type = integer - intent = in - optional = F -[active_gases_array] - standard_name = list_of_active_gases_used_by_RRTMGP - long_name = list of active gases used by RRTMGP - units = none - dimensions = (number_of_active_gases_used_by_RRTMGP) - type = character - kind = len=128 - intent = in - optional = F -[Model] - standard_name = GFS_control_type_instance - long_name = instance of derived type GFS_control_type - units = DDT +[doSWrad] + standard_name = flag_to_calc_sw + long_name = flag to calculate SW irradiances + units = flag dimensions = () - type = GFS_control_type + type = logical intent = in optional = F -[Radtend] - standard_name = GFS_radtend_type_instance - long_name = instance of derived type GFS_radtend_type - units = DDT +[ncol] + standard_name = horizontal_loop_extent + long_name = horizontal dimension + units = count dimensions = () - type = GFS_radtend_type + type = integer intent = in optional = F -[Statein] - standard_name = GFS_statein_type_instance - long_name = instance of derived type GFS_statein_type - units = DDT +[nLev] + standard_name = vertical_dimension + long_name = number of vertical levels + units = count dimensions = () - type = GFS_statein_type + type = integer intent = in optional = F -[ncol] - standard_name = horizontal_loop_extent - long_name = horizontal dimension +[nday] + standard_name = daytime_points_dimension + long_name = daytime points dimension units = count dimensions = () type = integer intent = in optional = F +[idxday] + standard_name = daytime_points + long_name = daytime points + units = index + dimensions = (horizontal_dimension) + type = integer + intent = in + optional = F +[coszen] + standard_name = cosine_of_zenith_angle + long_name = mean cos of zenith angle over rad call period + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F [p_lay] standard_name = air_pressure_at_layer_for_RRTMGP_in_hPa long_name = air pressure layer @@ -162,48 +162,23 @@ kind = kind_phys intent = in optional = F -[lsswr] - standard_name = flag_to_calc_sw - long_name = flag to calculate SW irradiances - units = flag - dimensions = () - type = logical - intent = in - optional = F -[nday] - standard_name = daytime_points_dimension - long_name = daytime points dimension +[rrtmgp_nGases] + standard_name = number_of_active_gases_used_by_RRTMGP + long_name = number of gases available used by RRTMGP units = count - dimensions = () + dimensions = () type = integer intent = in optional = F -[idxday] - standard_name = daytime_points - long_name = daytime points - units = index - dimensions = (horizontal_dimension) - type = integer +[active_gases_array] + standard_name = list_of_active_gases_used_by_RRTMGP + long_name = list of active gases used by RRTMGP + units = none + dimensions = (number_of_active_gases_used_by_RRTMGP) + type = character + kind = len=128 intent = in optional = F -[hsw0] - standard_name = RRTMGP_sw_heating_rate_clear_sky - long_name = shortwave clear sky heating rate - units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = T -[hswb] - standard_name = RRTMGP_sw_heating_rate_spectral - long_name = shortwave total sky heating rate (spectral) - units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension,number_of_sw_spectral_points_rrtmgp) - type = real - kind = kind_phys - intent = inout - optional = T [scmpsw] standard_name = components_of_surface_downward_shortwave_fluxes long_name = derived type for special components of surface downward shortwave fluxes @@ -248,6 +223,24 @@ kind = kind_phys intent = inout optional = F +[hsw0] + standard_name = RRTMGP_sw_heating_rate_clear_sky + long_name = shortwave clear sky heating rate + units = K s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = T +[hswb] + standard_name = RRTMGP_sw_heating_rate_spectral + long_name = shortwave total sky heating rate (spectral) + units = K s-1 + dimensions = (horizontal_dimension,vertical_dimension,number_of_sw_spectral_points_rrtmgp) + type = real + kind = kind_phys + intent = inout + optional = T [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP From 9ec9667452f6090c5fafc6ad8668e7bcfd011029 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Fri, 13 Dec 2019 13:05:16 -0700 Subject: [PATCH 092/167] Turned MPI on for rrtmgp gas-optics --- physics/rrtmgp_lw_gas_optics.F90 | 183 ++++++++++++++++--------------- 1 file changed, 92 insertions(+), 91 deletions(-) diff --git a/physics/rrtmgp_lw_gas_optics.F90 b/physics/rrtmgp_lw_gas_optics.F90 index d15adbc23..2fb910191 100644 --- a/physics/rrtmgp_lw_gas_optics.F90 +++ b/physics/rrtmgp_lw_gas_optics.F90 @@ -21,9 +21,9 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp active_gases_array, mpicomm, mpirank, mpiroot, lw_gas_props, ipsdlw0, errmsg, errflg) use netcdf -!#ifdef MPI -! use mpi -!#endif +#ifdef MPI + use mpi +#endif ! Inputs character(len=128),intent(in) :: & @@ -115,9 +115,9 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp integer,dimension(:),allocatable :: temp1,temp2,temp3,temp4, temp_log_array1, temp_log_array2, temp_log_array3, temp_log_array4 character(len=264) :: lw_gas_props_file integer,parameter :: max_strlen=256 -!#ifdef MPI -! integer :: ierr -!#endif +#ifdef MPI + integer :: ierr +#endif ! Initialize errmsg = '' @@ -127,7 +127,7 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp lw_gas_props_file = trim(rrtmgp_root_dir)//trim(rrtmgp_lw_file_gas) ! Read dimensions for k-distribution fields (only on master processor(0)) -! if (mpirank .eq. mpiroot) then + if (mpirank .eq. mpiroot) then if(nf90_open(trim(lw_gas_props_file), NF90_WRITE, ncid_lw) .eq. NF90_NOERR) then status = nf90_inq_dimid(ncid_lw, 'temperature', dimid) status = nf90_inquire_dimension(ncid_lw, dimid, len=ntemps) @@ -161,27 +161,28 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp status = nf90_inquire_dimension(ncid_lw, dimid, len=ninternalSourcetemps) status = nf90_close(ncid_lw) endif -! endif + endif ! Broadcast dimensions to all processors -!#ifdef MPI -! call MPI_BARRIER(mpicomm, ierr) -! call MPI_BCAST(ntemps, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(npress, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(nabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(nminorabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(nextrabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(nmixingfracs, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(nlayers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(nbnds, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(ngpts_lw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(npairs, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(ncontributors_lower, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(ncontributors_upper, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(nminor_absorber_intervals_lower, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(nminor_absorber_intervals_upper, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(ninternalSourcetemps, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -!#endif +#ifdef MPI + call MPI_BARRIER(mpicomm, ierr) + call MPI_BCAST(ntemps, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(npress, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nminorabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nextrabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nmixingfracs, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nlayers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nbnds, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(ngpts_lw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(npairs, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(ncontributors_lower, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(ncontributors_upper, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nminor_absorber_intervals_lower, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nminor_absorber_intervals_upper, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(ninternalSourcetemps, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BARRIER(mpicomm, ierr) +#endif ! Allocate space for arrays allocate(gas_names(nabsorbers)) @@ -215,7 +216,7 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp allocate(totplnk(ninternalSourcetemps, nbnds)) allocate(planck_frac(ngpts_lw, nmixingfracs, npress+1, ntemps)) -! if (mpirank .eq. mpiroot) then + if (mpirank .eq. mpiroot) then write (*,*) 'Reading RRTMGP longwave k-distribution data ... ' ! Read in fields from file if(nf90_open(trim(lw_gas_props_file), NF90_WRITE, ncid_lw) .eq. NF90_NOERR) then @@ -318,72 +319,72 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp ! Close status = nf90_close(ncid_lw) endif -! endif + endif -! ! Broadcast arrays to all processors -!#ifdef MPI -! call MPI_BARRIER(mpicomm, ierr) -! write (*,*) 'Broadcasting RRTMGP longwave k-distribution data ... ' -! call MPI_BCAST(minor_limits_gpt_upper, size(minor_limits_gpt_upper), MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(minor_limits_gpt_lower, size(minor_limits_gpt_lower), MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(kminor_start_upper, size(kminor_start_upper), MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(kminor_start_lower, size(kminor_start_lower), MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(key_species, size(key_species), MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(band2gpt, size(band2gpt), MPI_INTEGER, mpiroot, mpicomm, ierr) -!#ifndef SINGLE_PREC -! call MPI_BCAST(band_lims, size(band_lims), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(press_ref, size(press_ref), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(temp_ref, size(temp_ref), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(kminor_lower, size(kminor_lower), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(kminor_upper, size(kminor_upper), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(scaling_gas_lower, size(scaling_gas_lower), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(scaling_gas_upper, size(scaling_gas_upper), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(vmr_ref, size(vmr_ref), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(kmajor, size(kmajor), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(temp_ref_p, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(temp_ref_t, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(press_ref_trop, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(totplnk, size(totplnk), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(planck_frac, size(planck_frac), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -!#else -! call MPI_BCAST(band_lims, size(band_lims), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(press_ref, size(press_ref), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(temp_ref, size(temp_ref), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(kminor_lower, size(kminor_lower), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(kminor_upper, size(kminor_upper), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(scaling_gas_lower, size(scaling_gas_lower), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(scaling_gas_upper, size(scaling_gas_upper), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(vmr_ref, size(vmr_ref), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(kmajor, size(kmajor), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(temp_ref_p, 1, MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(temp_ref_t, 1, MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(press_ref_trop, 1, MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(totplnk, size(totplnk), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(planck_frac, size(planck_frac), MPI_REAL, mpiroot, mpicomm, ierr) -!#endif -! ! Character arrays -! do ij=1,nabsorbers -! call MPI_BCAST(gas_names(ij), len(gas_names(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) -! enddo -! do ij=1,nminorabsorbers -! call MPI_BCAST(gas_minor(ij), len(gas_minor(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) -! call MPI_BCAST(identifier_minor(ij), len(identifier_minor(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) -! enddo -! do ij=1,nminor_absorber_intervals_lower -! call MPI_BCAST(minor_gases_lower(ij), len(minor_gases_lower(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) -! enddo -! do ij=1,nminor_absorber_intervals_upper -! call MPI_BCAST(minor_gases_upper(ij), len(minor_gases_upper(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) -! enddo -! ! Logical arrays -! ! -! call MPI_BCAST(minor_scales_with_density_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(scale_by_complement_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(minor_scales_with_density_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(scale_by_complement_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, ierr) -! call MPI_BARRIER(mpicomm, ierr) -!#endif + ! Broadcast arrays to all processors +#ifdef MPI + call MPI_BARRIER(mpicomm, ierr) + write (*,*) 'Broadcasting RRTMGP longwave k-distribution data ... ' + call MPI_BCAST(minor_limits_gpt_upper, size(minor_limits_gpt_upper), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(minor_limits_gpt_lower, size(minor_limits_gpt_lower), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(kminor_start_upper, size(kminor_start_upper), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(kminor_start_lower, size(kminor_start_lower), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(key_species, size(key_species), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(band2gpt, size(band2gpt), MPI_INTEGER, mpiroot, mpicomm, ierr) +#ifndef SINGLE_PREC + call MPI_BCAST(band_lims, size(band_lims), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(press_ref, size(press_ref), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(temp_ref, size(temp_ref), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(kminor_lower, size(kminor_lower), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(kminor_upper, size(kminor_upper), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(scaling_gas_lower, size(scaling_gas_lower), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(scaling_gas_upper, size(scaling_gas_upper), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(vmr_ref, size(vmr_ref), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(kmajor, size(kmajor), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(temp_ref_p, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(temp_ref_t, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(press_ref_trop, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(totplnk, size(totplnk), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(planck_frac, size(planck_frac), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +#else + call MPI_BCAST(band_lims, size(band_lims), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(press_ref, size(press_ref), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(temp_ref, size(temp_ref), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(kminor_lower, size(kminor_lower), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(kminor_upper, size(kminor_upper), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(scaling_gas_lower, size(scaling_gas_lower), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(scaling_gas_upper, size(scaling_gas_upper), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(vmr_ref, size(vmr_ref), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(kmajor, size(kmajor), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(temp_ref_p, 1, MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(temp_ref_t, 1, MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(press_ref_trop, 1, MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(totplnk, size(totplnk), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(planck_frac, size(planck_frac), MPI_REAL, mpiroot, mpicomm, ierr) +#endif + ! Character arrays + do ij=1,nabsorbers + call MPI_BCAST(gas_names(ij), len(gas_names(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) + enddo + do ij=1,nminorabsorbers + call MPI_BCAST(gas_minor(ij), len(gas_minor(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) + call MPI_BCAST(identifier_minor(ij), len(identifier_minor(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) + enddo + do ij=1,nminor_absorber_intervals_lower + call MPI_BCAST(minor_gases_lower(ij), len(minor_gases_lower(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) + enddo + do ij=1,nminor_absorber_intervals_upper + call MPI_BCAST(minor_gases_upper(ij), len(minor_gases_upper(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) + enddo + ! Logical arrays + ! + call MPI_BCAST(minor_scales_with_density_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(scale_by_complement_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(minor_scales_with_density_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(scale_by_complement_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, ierr) + call MPI_BARRIER(mpicomm, ierr) +#endif ! Initialize gas concentrations and gas optics class with data do iGas=1,rrtmgp_nGases From 0ea0a12bae5e469095635c03e893a7135cf33967 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Fri, 13 Dec 2019 13:44:15 -0700 Subject: [PATCH 093/167] Turned MPI on for rrtmgp gas-optics, omission from last commit. --- physics/rrtmgp_lw_gas_optics.F90 | 68 ++++++------ physics/rrtmgp_sw_gas_optics.F90 | 182 ++++++++++++++++--------------- 2 files changed, 128 insertions(+), 122 deletions(-) diff --git a/physics/rrtmgp_lw_gas_optics.F90 b/physics/rrtmgp_lw_gas_optics.F90 index 2fb910191..92874edb3 100644 --- a/physics/rrtmgp_lw_gas_optics.F90 +++ b/physics/rrtmgp_lw_gas_optics.F90 @@ -51,46 +51,50 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp type(ty_gas_concs) :: & gas_concentrations ! RRTMGP DDT: trace gas concentrations (vmr) integer, dimension(:), allocatable :: & - kminor_start_lower, & ! - kminor_start_upper ! + kminor_start_lower, & ! Starting index in the [1, nContributors] vector for a contributor + ! given by \"minor_gases_lower\" (lower atmosphere) + kminor_start_upper ! Starting index in the [1, nContributors] vector for a contributor + ! given by \"minor_gases_upper\" (upper atmosphere) integer, dimension(:,:), allocatable :: & - band2gpt, & ! - minor_limits_gpt_lower, & ! - minor_limits_gpt_upper ! + band2gpt, & ! Beginning and ending gpoint for each band + minor_limits_gpt_lower, & ! Beginning and ending gpoint for each minor interval in lower atmosphere + minor_limits_gpt_upper ! Beginning and ending gpoint for each minor interval in upper atmosphere integer, dimension(:,:,:), allocatable :: & - key_species ! + key_species ! Key species pair for each band real(kind_phys) :: & - press_ref_trop, & ! - temp_ref_p, & ! - temp_ref_t ! + press_ref_trop, & ! Reference pressure separating the lower and upper atmosphere [Pa] + temp_ref_p, & ! Standard spectroscopic reference pressure [Pa] + temp_ref_t ! Standard spectroscopic reference temperature [K] real(kind_phys), dimension(:), allocatable :: & - press_ref, & ! - temp_ref ! + press_ref, & ! Pressures for reference atmosphere; press_ref(# reference layers) [Pa] + temp_ref ! Remperatures for reference atmosphere; temp_ref(# reference layers) [K] real(kind_phys), dimension(:,:), allocatable :: & - band_lims, & ! - totplnk ! + band_lims, & ! Beginning and ending wavenumber [cm -1] for each band + totplnk ! Integrated Planck function by band real(kind_phys), dimension(:,:,:), allocatable :: & - vmr_ref, & ! - kminor_lower, & ! - kminor_upper, & ! - rayl_lower, & ! - rayl_upper ! + vmr_ref, & ! volume mixing ratios for reference atmosphere + kminor_lower, & ! (transformed from [nTemp x nEta x nGpt x nAbsorbers] array to + ! [nTemp x nEta x nContributors] array) + kminor_upper, & ! (transformed from [nTemp x nEta x nGpt x nAbsorbers] array to + ! [nTemp x nEta x nContributors] array) + rayl_lower, & ! Not used in LW, rather allocated(rayl_lower) is used + rayl_upper ! Not used in LW, rather allocated(rayl_upper) is used real(kind_phys), dimension(:,:,:,:), allocatable :: & - kmajor, & ! - planck_frac ! + kmajor, & ! Stored absorption coefficients due to major absorbing gases + planck_frac ! Planck fractions character(len=32), dimension(:), allocatable :: & - gas_names, & ! - gas_minor, & ! - identifier_minor, & ! - minor_gases_lower, & ! - minor_gases_upper, & ! - scaling_gas_lower, & ! - scaling_gas_upper ! + gas_names, & ! Names of absorbing gases + gas_minor, & ! Name of absorbing minor gas + identifier_minor, & ! unique string identifying minor gas + minor_gases_lower, & ! names of minor absorbing gases in lower atmosphere + minor_gases_upper, & ! names of minor absorbing gases in upper atmosphere + scaling_gas_lower, & ! Absorption also depends on the concentration of this gas + scaling_gas_upper ! Absorption also depends on the concentration of this gas logical(wl), dimension(:), allocatable :: & - minor_scales_with_density_lower, & ! - minor_scales_with_density_upper, & ! - scale_by_complement_lower, & ! - scale_by_complement_upper ! + minor_scales_with_density_lower, & ! Density scaling is applied to minor absorption coefficients + minor_scales_with_density_upper, & ! Density scaling is applied to minor absorption coefficients + scale_by_complement_lower, & ! Absorption is scaled by concentration of scaling_gas (F) or its complement (T) + scale_by_complement_upper ! Absorption is scaled by concentration of scaling_gas (F) or its complement (T) ! Dimensions integer :: & @@ -325,7 +329,7 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp ! Broadcast arrays to all processors #ifdef MPI call MPI_BARRIER(mpicomm, ierr) - write (*,*) 'Broadcasting RRTMGP longwave k-distribution data ... ' + if (mpirank==mpiroot) write (*,*) 'Broadcasting RRTMGP longwave k-distribution data ... ' call MPI_BCAST(minor_limits_gpt_upper, size(minor_limits_gpt_upper), MPI_INTEGER, mpiroot, mpicomm, ierr) call MPI_BCAST(minor_limits_gpt_lower, size(minor_limits_gpt_lower), MPI_INTEGER, mpiroot, mpicomm, ierr) call MPI_BCAST(kminor_start_upper, size(kminor_start_upper), MPI_INTEGER, mpiroot, mpicomm, ierr) diff --git a/physics/rrtmgp_sw_gas_optics.F90 b/physics/rrtmgp_sw_gas_optics.F90 index b14f1501c..44aebde7d 100644 --- a/physics/rrtmgp_sw_gas_optics.F90 +++ b/physics/rrtmgp_sw_gas_optics.F90 @@ -20,9 +20,9 @@ module rrtmgp_sw_gas_optics subroutine rrtmgp_sw_gas_optics_init(rrtmgp_root_dir, rrtmgp_sw_file_gas, rrtmgp_nGases, & active_gases_array, mpicomm, mpirank, mpiroot, sw_gas_props, ipsdsw0, errmsg, errflg) use netcdf -!#ifdef MPI -! use mpi -!#endif +#ifdef MPI + use mpi +#endif ! Inputs character(len=128),intent(in) :: & @@ -112,9 +112,9 @@ subroutine rrtmgp_sw_gas_optics_init(rrtmgp_root_dir, rrtmgp_sw_file_gas, rrtmgp integer :: status,ncid_sw,dimid,varID,iGas integer,dimension(:),allocatable :: temp1,temp2,temp3,temp4 character(len=264) :: sw_gas_props_file -!#ifdef MPI -! integer :: ierr -!#endif +#ifdef MPI + integer :: ierr +#endif ! Initialize errmsg = '' @@ -124,7 +124,7 @@ subroutine rrtmgp_sw_gas_optics_init(rrtmgp_root_dir, rrtmgp_sw_file_gas, rrtmgp sw_gas_props_file = trim(rrtmgp_root_dir)//trim(rrtmgp_sw_file_gas) ! Read dimensions for k-distribution fields (only on master processor(0)) -! if (mpirank .eq. mpiroot) then + if (mpirank .eq. mpiroot) then if(nf90_open(trim(sw_gas_props_file), NF90_WRITE, ncid_sw) .eq. NF90_NOERR) then status = nf90_inq_dimid(ncid_sw, 'temperature', dimid) status = nf90_inquire_dimension(ncid_sw, dimid, len=ntemps_sw) @@ -156,26 +156,27 @@ subroutine rrtmgp_sw_gas_optics_init(rrtmgp_root_dir, rrtmgp_sw_file_gas, rrtmgp status = nf90_inquire_dimension(ncid_sw, dimid, len=nminor_absorber_intervals_upper_sw) status = nf90_close(ncid_sw) endif -! endif + endif ! Broadcast dimensions to all processors -!#ifdef MPI -! call MPI_BARRIER(mpicomm, ierr) -! call MPI_BCAST(ntemps_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(npress_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(nabsorbers_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(nminorabsorbers_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(nextrabsorbers_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(nmixingfracs_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(nlayers_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(nbnds_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(ngpts_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(npairs_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(ncontributors_lower_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(ncontributors_upper_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(nminor_absorber_intervals_lower_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(nminor_absorber_intervals_upper_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -!#endif +#ifdef MPI + call MPI_BARRIER(mpicomm, ierr) + call MPI_BCAST(ntemps_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(npress_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nabsorbers_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nminorabsorbers_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nextrabsorbers_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nmixingfracs_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nlayers_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nbnds_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(ngpts_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(npairs_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(ncontributors_lower_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(ncontributors_upper_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nminor_absorber_intervals_lower_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nminor_absorber_intervals_upper_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BARRIER(mpicomm, ierr) +#endif ! Allocate space for arrays allocate(gas_names_sw(nabsorbers_sw)) @@ -211,7 +212,7 @@ subroutine rrtmgp_sw_gas_optics_init(rrtmgp_root_dir, rrtmgp_sw_file_gas, rrtmgp allocate(temp4(nminor_absorber_intervals_upper_sw)) ! On master processor, read in fields, broadcast to all processors -! if (mpirank .eq. mpiroot) then + if (mpirank .eq. mpiroot) then write (*,*) 'Reading RRTMGP shortwave k-distribution data ... ' ! Read in fields from file if(nf90_open(trim(sw_gas_props_file), NF90_WRITE, ncid_sw) .eq. NF90_NOERR) then @@ -317,72 +318,73 @@ subroutine rrtmgp_sw_gas_optics_init(rrtmgp_root_dir, rrtmgp_sw_file_gas, rrtmgp ! Close status = nf90_close(ncid_sw) endif -! endif + endif ! Broadcast arrays to all processors -!#ifdef MPI -! call MPI_BARRIER(mpicomm, ierr) -! write (*,*) 'Broadcasting RRTMGP shortwave k-distribution data ... ' -! call MPI_BCAST(minor_limits_gpt_upper_sw, size(minor_limits_gpt_upper_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(minor_limits_gpt_lower_sw, size(minor_limits_gpt_lower_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(kminor_start_upper_sw, size(kminor_start_upper_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(kminor_start_lower_sw, size(kminor_start_lower_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(key_species_sw, size(key_species_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(band2gpt_sw, size(band2gpt_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) -!#ifndef SINGLE_PREC -! call MPI_BCAST(band_lims_sw, size(band_lims_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(press_ref_sw, size(press_ref_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(temp_ref_sw, size(temp_ref_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(kminor_lower_sw, size(kminor_lower_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(kminor_upper_sw, size(kminor_upper_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(scaling_gas_lower_sw, size(scaling_gas_lower_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(scaling_gas_upper_sw, size(scaling_gas_upper_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(vmr_ref_sw, size(vmr_ref_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(kmajor_sw, size(kmajor_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(temp_ref_p_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(temp_ref_t_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(press_ref_trop_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(solar_source_sw, size(solar_source_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(rayl_lower_sw, size(rayl_lower_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(rayl_upper_sw, size(rayl_upper_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -!#else -! call MPI_BCAST(band_lims_sw, size(band_lims_sw), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(press_ref_sw, size(press_ref_sw), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(temp_ref_sw, size(temp_ref_sw), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(kminor_lower_sw, size(kminor_lower_sw), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(kminor_upper_sw, size(kminor_upper_sw), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(scaling_gas_lower_sw, size(scaling_gas_lower_sw), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(scaling_gas_upper_sw, size(scaling_gas_upper_sw), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(vmr_ref_sw, size(vmr_ref_sw), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(kmajor_sw, size(kmajor_sw), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(temp_ref_p_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(temp_ref_t_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(press_ref_trop_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(solar_source_sw, size(solar_source_sw), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(rayl_lower_sw, size(rayl_lower_sw), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(rayl_upper_sw, size(rayl_upper_sw), MPI_REAL, mpiroot, mpicomm, ierr) -!#endif -! ! Character arrays -! do ij=1,nabsorbers_sw -! call MPI_BCAST(gas_names_sw(ij), len(gas_names_sw(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) -! enddo -! do ij=1,nminorabsorbers_sw -! call MPI_BCAST(gas_minor_sw(ij), len(gas_minor_sw(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) -! call MPI_BCAST(identifier_minor_sw(ij), len(identifier_minor_sw(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) -! enddo -! do ij=1,nminor_absorber_intervals_lower_sw -! call MPI_BCAST(minor_gases_lower_sw(ij), len(minor_gases_lower_sw(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) -! enddo -! do ij=1,nminor_absorber_intervals_upper_sw -! call MPI_BCAST(minor_gases_upper_sw(ij), len(minor_gases_upper_sw(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) -! enddo -! -! ! Logical arrays -! call MPI_BCAST(minor_scales_with_density_lower_sw, nminor_absorber_intervals_lower_sw, MPI_LOGICAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(scale_by_complement_lower_sw, nminor_absorber_intervals_lower_sw, MPI_LOGICAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(minor_scales_with_density_upper_sw, nminor_absorber_intervals_upper_sw, MPI_LOGICAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(scale_by_complement_upper_sw, nminor_absorber_intervals_upper_sw, MPI_LOGICAL, mpiroot, mpicomm, ierr) -!#endif +#ifdef MPI + call MPI_BARRIER(mpicomm, ierr) + if (mpirank==mpiroot) write (*,*) 'Broadcasting RRTMGP shortwave k-distribution data ... ' + call MPI_BCAST(minor_limits_gpt_upper_sw, size(minor_limits_gpt_upper_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(minor_limits_gpt_lower_sw, size(minor_limits_gpt_lower_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(kminor_start_upper_sw, size(kminor_start_upper_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(kminor_start_lower_sw, size(kminor_start_lower_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(key_species_sw, size(key_species_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(band2gpt_sw, size(band2gpt_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) +#ifndef SINGLE_PREC + call MPI_BCAST(band_lims_sw, size(band_lims_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(press_ref_sw, size(press_ref_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(temp_ref_sw, size(temp_ref_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(kminor_lower_sw, size(kminor_lower_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(kminor_upper_sw, size(kminor_upper_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(scaling_gas_lower_sw, size(scaling_gas_lower_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(scaling_gas_upper_sw, size(scaling_gas_upper_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(vmr_ref_sw, size(vmr_ref_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(kmajor_sw, size(kmajor_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(temp_ref_p_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(temp_ref_t_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(press_ref_trop_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(solar_source_sw, size(solar_source_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(rayl_lower_sw, size(rayl_lower_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(rayl_upper_sw, size(rayl_upper_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +#else + call MPI_BCAST(band_lims_sw, size(band_lims_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(press_ref_sw, size(press_ref_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(temp_ref_sw, size(temp_ref_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(kminor_lower_sw, size(kminor_lower_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(kminor_upper_sw, size(kminor_upper_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(scaling_gas_lower_sw, size(scaling_gas_lower_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(scaling_gas_upper_sw, size(scaling_gas_upper_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(vmr_ref_sw, size(vmr_ref_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(kmajor_sw, size(kmajor_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(temp_ref_p_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(temp_ref_t_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(press_ref_trop_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(solar_source_sw, size(solar_source_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(rayl_lower_sw, size(rayl_lower_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(rayl_upper_sw, size(rayl_upper_sw), MPI_REAL, mpiroot, mpicomm, ierr) +#endif + ! Character arrays + do ij=1,nabsorbers_sw + call MPI_BCAST(gas_names_sw(ij), len(gas_names_sw(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) + enddo + do ij=1,nminorabsorbers_sw + call MPI_BCAST(gas_minor_sw(ij), len(gas_minor_sw(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) + call MPI_BCAST(identifier_minor_sw(ij), len(identifier_minor_sw(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) + enddo + do ij=1,nminor_absorber_intervals_lower_sw + call MPI_BCAST(minor_gases_lower_sw(ij), len(minor_gases_lower_sw(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) + enddo + do ij=1,nminor_absorber_intervals_upper_sw + call MPI_BCAST(minor_gases_upper_sw(ij), len(minor_gases_upper_sw(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) + enddo + + ! Logical arrays + call MPI_BCAST(minor_scales_with_density_lower_sw, nminor_absorber_intervals_lower_sw, MPI_LOGICAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(scale_by_complement_lower_sw, nminor_absorber_intervals_lower_sw, MPI_LOGICAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(minor_scales_with_density_upper_sw, nminor_absorber_intervals_upper_sw, MPI_LOGICAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(scale_by_complement_upper_sw, nminor_absorber_intervals_upper_sw, MPI_LOGICAL, mpiroot, mpicomm, ierr) + call MPI_BARRIER(mpicomm, ierr) +#endif ! Initialize gas concentrations and gas optics class with data do iGas=1,rrtmgp_nGases From 8c46c345e8cfa24a5adc5708cad80392c62c6023 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Fri, 13 Dec 2019 15:10:42 -0700 Subject: [PATCH 094/167] Some more cleanup and documenting. Added initialization routine for cloud-sampling routines. --- physics/rrtmgp_lw_aerosol_optics.F90 | 4 +- physics/rrtmgp_lw_cloud_optics.F90 | 310 +++++++++++++------------- physics/rrtmgp_lw_cloud_sampling.F90 | 19 +- physics/rrtmgp_lw_cloud_sampling.meta | 21 ++ physics/rrtmgp_lw_gas_optics.F90 | 55 ++--- physics/rrtmgp_lw_gas_optics.meta | 8 - physics/rrtmgp_lw_rte.F90 | 4 +- physics/rrtmgp_sw_aerosol_optics.F90 | 4 +- physics/rrtmgp_sw_cloud_optics.F90 | 289 ++++++++++++------------ physics/rrtmgp_sw_cloud_sampling.F90 | 15 +- physics/rrtmgp_sw_cloud_sampling.meta | 21 ++ physics/rrtmgp_sw_gas_optics.F90 | 119 +++++----- physics/rrtmgp_sw_gas_optics.meta | 8 - 13 files changed, 452 insertions(+), 425 deletions(-) diff --git a/physics/rrtmgp_lw_aerosol_optics.F90 b/physics/rrtmgp_lw_aerosol_optics.F90 index bc6295e44..a77b00759 100644 --- a/physics/rrtmgp_lw_aerosol_optics.F90 +++ b/physics/rrtmgp_lw_aerosol_optics.F90 @@ -60,9 +60,9 @@ subroutine rrtmgp_lw_aerosol_optics_run(doLWrad, nCol, nLev, nTracer, p_lev, p_l type(ty_optical_props_1scl),intent(out) :: & lw_optical_props_aerosol ! RRTMGP DDT: Longwave aerosol optical properties (tau) integer, intent(out) :: & - errflg ! + errflg ! CCPP error flag character(len=*), intent(out) :: & - errmsg ! + errmsg ! CCPP error message ! Local variables real(kind_phys), dimension(nCol, nLev, lw_gas_props%get_nband(), NF_AELW) :: & diff --git a/physics/rrtmgp_lw_cloud_optics.F90 b/physics/rrtmgp_lw_cloud_optics.F90 index c8c7d8470..38a54ca4c 100644 --- a/physics/rrtmgp_lw_cloud_optics.F90 +++ b/physics/rrtmgp_lw_cloud_optics.F90 @@ -19,9 +19,9 @@ module rrtmgp_lw_cloud_optics !! subroutine rrtmgp_lw_cloud_optics_init(cld_optics_scheme, nrghice, rrtmgp_root_dir, & rrtmgp_lw_file_clouds, mpicomm, mpirank, mpiroot, lw_cloud_props, errmsg, errflg) -!#ifdef MPI -! use mpi -!#endif +#ifdef MPI + use mpi +#endif ! Inputs integer, intent(in) :: & @@ -43,56 +43,57 @@ subroutine rrtmgp_lw_cloud_optics_init(cld_optics_scheme, nrghice, rrtmgp_root_d errflg ! Error code ! Variables that will be passed to cloud_optics%load() + ! cld_optics_scheme = 1 real(kind_phys) :: & - radliq_lwr, & ! - radliq_upr, & ! - radliq_fac, & ! - radice_lwr, & ! - radice_upr, & ! - radice_fac ! - real(kind_phys), dimension(:), allocatable :: & - pade_sizereg_extliq, & ! - pade_sizereg_ssaliq, & ! - pade_sizereg_asyliq, & ! - pade_sizereg_extice, & ! - pade_sizereg_ssaice, & ! - pade_sizereg_asyice ! + radliq_lwr, & ! Liquid particle size lower bound for LUT interpolation + radliq_upr, & ! Liquid particle size upper bound for LUT interpolation + radliq_fac, & ! Factor for calculating LUT interpolation indices for liquid + radice_lwr, & ! Ice particle size upper bound for LUT interpolation + radice_upr, & ! Ice particle size lower bound for LUT interpolation + radice_fac ! Factor for calculating LUT interpolation indices for ice real(kind_phys), dimension(:,:), allocatable :: & - lut_extliq, & ! - lut_ssaliq, & ! - lut_asyliq, & ! - band_lims_cldy ! - + lut_extliq, & ! LUT shortwave liquid extinction coefficient + lut_ssaliq, & ! LUT shortwave liquid single scattering albedo + lut_asyliq, & ! LUT shortwave liquid asymmetry parameter + band_lims_cldy ! Beginning and ending wavenumber [cm -1] for each band + real(kind_phys), dimension(:,:,:), allocatable :: & + lut_extice, & ! LUT shortwave ice extinction coefficient + lut_ssaice, & ! LUT shortwave ice single scattering albedo + lut_asyice ! LUT shortwave ice asymmetry parameter + ! cld_optics_scheme = 2 + real(kind_phys), dimension(:), allocatable :: & + pade_sizereg_extliq, & ! Particle size regime boundaries for shortwave liquid extinction + ! coefficient for Pade interpolation + pade_sizereg_ssaliq, & ! Particle size regime boundaries for shortwave liquid single + ! scattering albedo for Pade interpolation + pade_sizereg_asyliq, & ! Particle size regime boundaries for shortwave liquid asymmetry + ! parameter for Pade interpolation + pade_sizereg_extice, & ! Particle size regime boundaries for shortwave ice extinction + ! coefficient for Pade interpolation + pade_sizereg_ssaice, & ! Particle size regime boundaries for shortwave ice single + ! scattering albedo for Pade interpolation + pade_sizereg_asyice ! Particle size regime boundaries for shortwave ice asymmetry + ! parameter for Pade interpolation real(kind_phys), dimension(:,:,:), allocatable :: & - lut_extice, & ! - lut_ssaice, & ! - lut_asyice, & ! - pade_extliq, & ! - pade_ssaliq, & ! - pade_asyliq ! + pade_extliq, & ! PADE coefficients for shortwave liquid extinction + pade_ssaliq, & ! PADE coefficients for shortwave liquid single scattering albedo + pade_asyliq ! PADE coefficients for shortwave liquid asymmetry parameter real(kind_phys), dimension(:,:,:,:), allocatable :: & - pade_extice, & ! - pade_ssaice, & ! - pade_asyice ! + pade_extice, & ! PADE coefficients for shortwave ice extinction + pade_ssaice, & ! PADE coefficients for shortwave ice single scattering albedo + pade_asyice ! PADE coefficients for shortwave ice asymmetry parameter ! Dimensions integer :: & - nrghice_lw, & ! Number of ice-roughness categories in file - nbandLWcldy, & ! - nsize_liq, & ! - nsize_ice, & ! - nsizereg, & ! - ncoeff_ext, & ! - ncoeff_ssa_g, & ! - nbound, & ! - npairsLWcldy ! + nrghice_lw, nbandLWcldy, nsize_liq, nsize_ice, nsizereg,& + ncoeff_ext, ncoeff_ssa_g, nbound, npairsLWcldy ! Local variables integer :: dimID,varID,status,ncid_lw_clds character(len=264) :: lw_cloud_props_file integer,parameter :: max_strlen=256 -!#ifdef MPI -! integer :: ierr -!#endif +#ifdef MPI + integer :: ierr +#endif ! Initialize errmsg = '' @@ -104,7 +105,7 @@ subroutine rrtmgp_lw_cloud_optics_init(cld_optics_scheme, nrghice, rrtmgp_root_d lw_cloud_props_file = trim(rrtmgp_root_dir)//trim(rrtmgp_lw_file_clouds) ! Read dimensions for k-distribution fields (only on master processor(0)) -! if (mpirank .eq. mpiroot) then + if (mpirank .eq. mpiroot) then if(nf90_open(trim(lw_cloud_props_file), NF90_WRITE, ncid_lw_clds) == NF90_NOERR) then status = nf90_inq_dimid(ncid_lw_clds, 'nband', dimid) status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=nbandLWcldy) @@ -131,22 +132,28 @@ subroutine rrtmgp_lw_cloud_optics_init(cld_optics_scheme, nrghice, rrtmgp_root_d if (nrghice .gt. nrghice_lw) then errmsg = 'Number of RRTMGP ice-roughness categories requested in namelist file is not allowed' endif -! endif + endif -! ! Broadcast dimensions to all processors -!#ifdef MPI -! if (Cld_optics_scheme .eq. 1 .or. Cld_optics_scheme .eq. 2) then -! call MPI_BCAST(nbandLWcldy, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(nrghice_lw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(nsize_liq, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(nsize_ice, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(nsizereg, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(ncoeff_ext, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(ncoeff_ssa_g, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(nbound, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(npairsLWcldy, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! endif -!#endif + ! Broadcast dimensions to all processors +#ifdef MPI + call MPI_BCAST(nbandSWcldy_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + if (cld_optics_scheme .eq. 1) then + call MPI_BARRIER(mpicomm, ierr) + call MPI_BCAST(nrghice_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nsize_liq_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nsize_ice_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BARRIER(mpicomm, ierr) + endif + if (cld_optics_scheme .eq. 2) then + call MPI_BARRIER(mpicomm, ierr) + call MPI_BCAST(nrghice_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nsizereg_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(ncoeff_ext_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(ncoeff_ssa_g_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nbound_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BARRIER(mpicomm, ierr) + endif +#endif if (Cld_optics_scheme .eq. 1) then allocate(lut_extliq(nsize_liq, nBandLWcldy)) @@ -174,11 +181,9 @@ subroutine rrtmgp_lw_cloud_optics_init(cld_optics_scheme, nrghice, rrtmgp_root_d endif ! On master processor, allocate space, read in fields, broadcast to all processors -! if (mpirank .eq. mpiroot) then - ! + if (mpirank .eq. mpiroot) then if (Cld_optics_scheme .eq. 1) then write (*,*) 'Reading RRTMGP longwave cloud data (LUT) ... ' - ! if(nf90_open(trim(lw_cloud_props_file), NF90_WRITE, ncid_lw_clds) == NF90_NOERR) then status = nf90_inq_varid(ncid_lw_clds,'radliq_lwr',varID) status = nf90_get_var(ncid_lw_clds,varID,radliq_lwr) @@ -212,7 +217,6 @@ subroutine rrtmgp_lw_cloud_optics_init(cld_optics_scheme, nrghice, rrtmgp_root_d ! if (Cld_optics_scheme .eq. 2) then write (*,*) 'Reading RRTMGP longwave cloud data (PADE) ... ' - ! if(nf90_open(trim(lw_cloud_props_file), NF90_WRITE, ncid_lw_clds) == NF90_NOERR) then status = nf90_inq_varid(ncid_lw_clds,'radliq_lwr',varID) status = nf90_get_var(ncid_lw_clds,varID,radliq_lwr) @@ -255,75 +259,79 @@ subroutine rrtmgp_lw_cloud_optics_init(cld_optics_scheme, nrghice, rrtmgp_root_d status = nf90_close(ncid_lw_clds) endif endif -! endif + endif -! ! Broadcast arrays to all processors -!#ifdef MPI -! if (Cld_optics_scheme .eq. 1) then -! write (*,*) 'Broadcasting RRTMGP longwave cloud data (LUT) ... ' -!#ifndef SINGLE_PREC -! call MPI_BCAST(radliq_lwr, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(radliq_upr, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(radliq_fac, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(radice_lwr, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(radice_upr, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(radice_fac, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(lut_extliq, size(lut_extliq), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(lut_ssaliq, size(lut_ssaliq), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(lut_asyliq, size(lut_asyliq), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(lut_extice, size(lut_extice), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(lut_ssaice, size(lut_ssaice), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(lut_asyice, size(lut_asyice), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(band_lims_cldy , size(band_lims_cldy), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -!#else -! call MPI_BCAST(radliq_lwr, 1, MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(radliq_upr, 1, MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(radliq_fac, 1, MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(radice_lwr, 1, MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(radice_upr, 1, MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(radice_fac, 1, MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(lut_extliq, size(lut_extliq), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(lut_ssaliq, size(lut_ssaliq), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(lut_asyliq, size(lut_asyliq), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(lut_extice, size(lut_extice), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(lut_ssaice, size(lut_ssaice), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(lut_asyice, size(lut_asyice), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(band_lims_cldy , size(band_lims_cldy), MPI_REAL, mpiroot, mpicomm, ierr) -!#endif -! endif -! if (Cld_optics_scheme .eq. 2) then -! write (*,*) 'Broadcasting RRTMGP longwave cloud data (PADE) ... ' -!#ifndef SINGLE_PREC -! call MPI_BCAST(pade_extliq, size(pade_extliq), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(pade_ssaliq, size(pade_ssaliq), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(pade_asyliq, size(pade_asyliq), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(pade_extice, size(pade_extice), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(pade_ssaice, size(pade_ssaice), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(pade_asyice, size(pade_asyice), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(pade_sizereg_extliq, size(pade_sizereg_extliq), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(pade_sizereg_ssaliq, size(pade_sizereg_ssaliq), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(pade_sizereg_asyliq, size(pade_sizereg_asyliq), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(pade_sizereg_extice, size(pade_sizereg_extice), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(pade_sizereg_ssaice, size(pade_sizereg_ssaice), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(pade_sizereg_asyice, size(pade_sizereg_asyice), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(band_lims_cldy, size(band_lims_cldy), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -!#else -! call MPI_BCAST(pade_extliq, size(pade_extliq), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(pade_ssaliq, size(pade_ssaliq), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(pade_asyliq, size(pade_asyliq), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(pade_extice, size(pade_extice), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(pade_ssaice, size(pade_ssaice), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(pade_asyice, size(pade_asyice), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(pade_sizereg_extliq, size(pade_sizereg_extliq), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(pade_sizereg_ssaliq, size(pade_sizereg_ssaliq), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(pade_sizereg_asyliq, size(pade_sizereg_asyliq), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(pade_sizereg_extice, size(pade_sizereg_extice), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(pade_sizereg_ssaice, size(pade_sizereg_ssaice), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(pade_sizereg_asyice, size(pade_sizereg_asyice), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(band_lims_cldy, size(band_lims_cldy), MPI_REAL, mpiroot, mpicomm, ierr) -!#endif -! endif -!#endif + ! Broadcast arrays to all processors +#ifdef MPI + if (cld_optics_scheme .eq. 1) then + if (mpirank==mpiroot) write (*,*) 'Broadcasting RRTMGP shortwave cloud data (LUT) ... ' + call MPI_BARRIER(mpicomm, ierr) +#ifndef SINGLE_PREC + call MPI_BCAST(radliq_lwr_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(radliq_upr_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(radliq_fac_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(radice_lwr_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(radice_upr_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(radice_fac_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_extliq_sw, size(lut_extliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_ssaliq_sw, size(lut_ssaliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_asyliq_sw, size(lut_asyliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_extice_sw, size(lut_extice_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_ssaice_sw, size(lut_ssaice_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_asyice_sw, size(lut_asyice_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(band_lims_cldy_sw, size(band_lims_cldy_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +#else + call MPI_BCAST(radliq_lwr_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(radliq_upr_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(radliq_fac_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(radice_lwr_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(radice_upr_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(radice_fac_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_extliq_sw, size(lut_extliq_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_ssaliq_sw, size(lut_ssaliq_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_asyliq_sw, size(lut_asyliq_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_extice_sw, size(lut_extice_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_ssaice_sw, size(lut_ssaice_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_asyice_sw, size(lut_asyice_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(band_lims_cldy_sw, size(band_lims_cldy_sw), MPI_REAL, mpiroot, mpicomm, ierr) +#endif + call MPI_BARRIER(mpicomm, ierr) + endif + if (cld_optics_scheme .eq. 2) then + if (mpirank==mpiroot) write (*,*) 'Broadcasting RRTMGP shortwave cloud data (PADE) ... ' + call MPI_BARRIER(mpicomm, ierr) +#ifndef SINGLE_PREC + call MPI_BCAST(pade_extliq_sw, size(pade_extliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_ssaliq_sw, size(pade_ssaliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_asyliq_sw, size(pade_asyliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_extice_sw, size(pade_extice_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_ssaice_sw, size(pade_ssaice_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_asyice_sw, size(pade_asyice_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_extliq_sw, size(pade_sizereg_extliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_ssaliq_sw, size(pade_sizereg_ssaliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_asyliq_sw, size(pade_sizereg_asyliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_extice_sw, size(pade_sizereg_extice_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_ssaice_sw, size(pade_sizereg_ssaice_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_asyice_sw, size(pade_sizereg_asyice_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(band_lims_cldy_sw, size(band_lims_cldy_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +#else + call MPI_BCAST(pade_extliq_sw, size(pade_extliq_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_ssaliq_sw, size(pade_ssaliq_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_asyliq_sw, size(pade_asyliq_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_extice_sw, size(pade_extice_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_ssaice_sw, size(pade_ssaice_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_asyice_sw, size(pade_asyice_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_extliq_sw, size(pade_sizereg_extliq_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_ssaliq_sw, size(pade_sizereg_ssaliq_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_asyliq_sw, size(pade_sizereg_asyliq_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_extice_sw, size(pade_sizereg_extice_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_ssaice_sw, size(pade_sizereg_ssaice_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_asyice_sw, size(pade_sizereg_asyice_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(band_lims_cldy_sw, size(band_lims_cldy_sw), MPI_REAL, mpiroot, mpicomm, ierr) +#endif + call MPI_BARRIER(mpicomm, ierr) + endif +#endif ! Load tables data for RRTMGP cloud-optics if (cld_optics_scheme .eq. 1) then @@ -366,10 +374,10 @@ subroutine rrtmgp_lw_cloud_optics_run(doLWrad, nCol, nLev, cld_optics_scheme, nr cld_reliq, & ! Cloud liquid effective radius cld_iwp, & ! Cloud ice water path cld_reice, & ! Cloud ice effective radius - cld_swp, & ! Cloud snow water path (used only fro RRTMG scheme) - cld_resnow, & ! Cloud snow effective radius (used only fro RRTMG scheme) - cld_rwp, & ! Cloud rain water path (used only fro RRTMG scheme) - cld_rerain ! Cloud rain effective radius (used only fro RRTMG scheme) + cld_swp, & ! Cloud snow water path (used only for RRTMG legacy scheme) + cld_resnow, & ! Cloud snow effective radius (used only for RRTMG legacy scheme) + cld_rwp, & ! Cloud rain water path (used only for RRTMG legacy scheme) + cld_rerain ! Cloud rain effective radius (used only for RRTMG legacy scheme) type(ty_cloud_optics),intent(in) :: & lw_cloud_props ! RRTMGP DDT: spectral information for RRTMGP LW radiation scheme type(ty_gas_optics_rrtmgp),intent(in) :: & @@ -381,9 +389,9 @@ subroutine rrtmgp_lw_cloud_optics_run(doLWrad, nCol, nLev, cld_optics_scheme, nr type(ty_optical_props_1scl),intent(out) :: & lw_optical_props_cloudsByBand ! RRTMGP DDT: longwave cloud optical properties in each band integer, intent(out) :: & - errflg ! Error flag + errflg ! CCPP error flag character(len=*), intent(out) :: & - errmsg ! Error message + errmsg ! CCPP error message ! Local variables logical,dimension(ncol,nLev) :: liqmask, icemask @@ -396,42 +404,36 @@ subroutine rrtmgp_lw_cloud_optics_run(doLWrad, nCol, nLev, cld_optics_scheme, nr if (.not. doLWrad) return - ! ####################################################################################### ! Compute ice/liquid cloud masks, needed by rrtmgp_cloud_optics - ! ####################################################################################### liqmask = (cld_frac .gt. 0 .and. cld_lwp .gt. 0) icemask = (cld_frac .gt. 0 .and. cld_iwp .gt. 0) - ! ####################################################################################### ! Allocate space for RRTMGP DDTs containing cloud radiative properties - ! ####################################################################################### ! Cloud optics [nCol,nLev,nBands] call check_error_msg('rrtmgp_lw_cloud_optics_run',lw_optical_props_cloudsByBand%alloc_1scl(& ncol, nLev, lw_gas_props%get_band_lims_wavenumber())) - ! ####################################################################################### ! Compute cloud-optics for RTE. - ! ####################################################################################### if (rrtmgp_cld_optics .gt. 0) then ! i) RRTMGP cloud-optics. call check_error_msg('rrtmgp_lw_cloud_optics_run',lw_cloud_props%cloud_optics(& - ncol, & ! IN - Number of horizontal gridpoints - nLev, & ! IN - Number of vertical layers - lw_cloud_props%get_nband(), & ! IN - Number of LW bands - nrghice, & ! IN - Number of ice-roughness categories - liqmask, & ! IN - Liquid-cloud mask - icemask, & ! IN - Ice-cloud mask - cld_lwp, & ! IN - Cloud liquid water path - cld_iwp, & ! IN - Cloud ice water path - cld_reliq, & ! IN - Cloud liquid effective radius - cld_reice, & ! IN - Cloud ice effective radius + ncol, & ! IN - Number of horizontal gridpoints + nLev, & ! IN - Number of vertical layers + lw_cloud_props%get_nband(), & ! IN - Number of LW bands + nrghice, & ! IN - Number of ice-roughness categories + liqmask, & ! IN - Liquid-cloud mask + icemask, & ! IN - Ice-cloud mask + cld_lwp, & ! IN - Cloud liquid water path + cld_iwp, & ! IN - Cloud ice water path + cld_reliq, & ! IN - Cloud liquid effective radius + cld_reice, & ! IN - Cloud ice effective radius lw_optical_props_cloudsByBand)) ! OUT - RRTMGP DDT containing cloud radiative properties - ! in each band + ! in each band else ! ii) RRTMG cloud-optics. if (any(cld_frac .gt. 0)) then call rrtmg_lw_cloud_optics(ncol, nLev, lw_gas_props%get_nband(), cld_lwp, & - cld_reliq, cld_iwp, cld_reice, cld_rwp, cld_rerain, cld_swp, cld_resnow, & + cld_reliq, cld_iwp, cld_reice, cld_rwp, cld_rerain, cld_swp, cld_resnow, & cld_frac, tau_cld) lw_optical_props_cloudsByBand%tau = tau_cld endif diff --git a/physics/rrtmgp_lw_cloud_sampling.F90 b/physics/rrtmgp_lw_cloud_sampling.F90 index 60d13e6f1..6bdf6b4ae 100644 --- a/physics/rrtmgp_lw_cloud_sampling.F90 +++ b/physics/rrtmgp_lw_cloud_sampling.F90 @@ -13,7 +13,20 @@ module rrtmgp_lw_cloud_sampling ! ######################################################################################### ! SUBROUTINE mcica_init ! ######################################################################################### - subroutine rrtmgp_lw_cloud_sampling_init() +!! \section arg_table_rrtmgp_lw_cloud_sampling_init +!! \htmlinclude rrtmgp_lw_cloud_sampling.html +!! + subroutine rrtmgp_lw_cloud_sampling_init(lw_gas_props, ipsdlw0) + ! Inputs + type(ty_gas_optics_rrtmgp),intent(in) :: & + lw_gas_props ! RRTMGP DDT: K-distribution data + ! Outputs + integer, intent(out) :: & + ipsdlw0 ! Initial permutation seed for McICA + + ! Set initial permutation seed for McICA, initially set to number of G-points + ipsdlw0 = lw_gas_props%get_ngpt() + end subroutine rrtmgp_lw_cloud_sampling_init ! ######################################################################################### @@ -46,9 +59,9 @@ subroutine rrtmgp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, icseed_lw, ! Outputs character(len=*), intent(out) :: & - errmsg ! Error message + errmsg ! CCPP error message integer, intent(out) :: & - errflg ! Error code + errflg ! CCPP error code type(ty_optical_props_1scl),intent(out) :: & lw_optical_props_clouds ! RRTMGP DDT: Shortwave optical properties (cloudy atmosphere) diff --git a/physics/rrtmgp_lw_cloud_sampling.meta b/physics/rrtmgp_lw_cloud_sampling.meta index 79d28d929..299a0fd09 100644 --- a/physics/rrtmgp_lw_cloud_sampling.meta +++ b/physics/rrtmgp_lw_cloud_sampling.meta @@ -1,3 +1,24 @@ +[ccpp-arg-table] + name = rrtmgp_lw_cloud_sampling_init + type = scheme +[lw_gas_props] + standard_name = coefficients_for_lw_gas_optics + long_name = DDT containing spectral information for RRTMGP LW radiation scheme + units = DDT + dimensions = () + type = ty_gas_optics_rrtmgp + intent = in + optional = F +[ipsdlw0] + standard_name = initial_permutation_seed_lw + long_name = initial seed for McICA LW + units = none + dimensions = () + type = integer + intent = out + optional = F + +###################################################### [ccpp-arg-table] name = rrtmgp_lw_cloud_sampling_run type = scheme diff --git a/physics/rrtmgp_lw_gas_optics.F90 b/physics/rrtmgp_lw_gas_optics.F90 index 92874edb3..07c6d6231 100644 --- a/physics/rrtmgp_lw_gas_optics.F90 +++ b/physics/rrtmgp_lw_gas_optics.F90 @@ -18,7 +18,7 @@ module rrtmgp_lw_gas_optics !! \htmlinclude rrtmgp_lw_gas_optics.html !! subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp_nGases, & - active_gases_array, mpicomm, mpirank, mpiroot, lw_gas_props, ipsdlw0, errmsg, errflg) + active_gases_array, mpicomm, mpirank, mpiroot, lw_gas_props, errmsg, errflg) use netcdf #ifdef MPI @@ -40,12 +40,11 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp ! Outputs character(len=*), intent(out) :: & - errmsg ! Error message + errmsg ! CCPP error message integer, intent(out) :: & - errflg, & ! Error code - ipsdlw0 ! + errflg ! CCPP error code type(ty_gas_optics_rrtmgp),intent(out) :: & - lw_gas_props ! RRTMGP DDT: + lw_gas_props ! RRTMGP DDT: longwave spectral information ! Variables that will be passed to gas_optics%load() type(ty_gas_concs) :: & @@ -67,7 +66,7 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp temp_ref_t ! Standard spectroscopic reference temperature [K] real(kind_phys), dimension(:), allocatable :: & press_ref, & ! Pressures for reference atmosphere; press_ref(# reference layers) [Pa] - temp_ref ! Remperatures for reference atmosphere; temp_ref(# reference layers) [K] + temp_ref ! Temperatures for reference atmosphere; temp_ref(# reference layers) [K] real(kind_phys), dimension(:,:), allocatable :: & band_lims, & ! Beginning and ending wavenumber [cm -1] for each band totplnk ! Integrated Planck function by band @@ -85,9 +84,9 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp character(len=32), dimension(:), allocatable :: & gas_names, & ! Names of absorbing gases gas_minor, & ! Name of absorbing minor gas - identifier_minor, & ! unique string identifying minor gas - minor_gases_lower, & ! names of minor absorbing gases in lower atmosphere - minor_gases_upper, & ! names of minor absorbing gases in upper atmosphere + identifier_minor, & ! Unique string identifying minor gas + minor_gases_lower, & ! Names of minor absorbing gases in lower atmosphere + minor_gases_upper, & ! Names of minor absorbing gases in upper atmosphere scaling_gas_lower, & ! Absorption also depends on the concentration of this gas scaling_gas_upper ! Absorption also depends on the concentration of this gas logical(wl), dimension(:), allocatable :: & @@ -98,27 +97,16 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp ! Dimensions integer :: & - ntemps, & ! - npress, & ! - ngpts_lw, & ! - nabsorbers, & ! - nextrabsorbers, & ! - nminorabsorbers, & ! - nmixingfracs, & ! - nlayers, & ! - nbnds, & ! - npairs, & ! - ninternalSourcetemps, & ! - nminor_absorber_intervals_lower, & ! - nminor_absorber_intervals_upper, & ! - ncontributors_lower, & ! - ncontributors_upper ! + ntemps, npress, ngpts_lw, nabsorbers, nextrabsorbers, nminorabsorbers,& + nmixingfracs, nlayers, nbnds, npairs, ninternalSourcetemps, & + nminor_absorber_intervals_lower, nminor_absorber_intervals_upper, & + ncontributors_lower, ncontributors_upper ! Local variables - integer :: ncid_lw,dimID,varID,status,iGas - integer,dimension(:),allocatable :: temp1,temp2,temp3,temp4, temp_log_array1, temp_log_array2, temp_log_array3, temp_log_array4 + integer :: ncid_lw, dimID, varID, status, iGas + integer,dimension(:),allocatable :: temp1, temp2, temp3, temp4, & + temp_log_array1, temp_log_array2, temp_log_array3, temp_log_array4 character(len=264) :: lw_gas_props_file - integer,parameter :: max_strlen=256 #ifdef MPI integer :: ierr #endif @@ -402,9 +390,6 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp scaling_gas_upper, scale_by_complement_lower, scale_by_complement_upper, & kminor_start_lower, kminor_start_upper, totplnk, planck_frac, rayl_lower, rayl_upper)) - ! Set initial permutation seed for McICA, initially set to number of G-points - ipsdlw0 = lw_gas_props%get_ngpt() - end subroutine rrtmgp_lw_gas_optics_init ! ######################################################################################### @@ -433,17 +418,17 @@ subroutine rrtmgp_lw_gas_optics_run(doLWrad, nCol, nLev, lw_gas_props, p_lay, p_ real(kind_phys), dimension(ncol), intent(in) :: & skt ! Surface(skin) temperature (K) type(ty_gas_concs),intent(in) :: & - gas_concentrations ! RRTMGP DDT: trace gas concentrations (vmr) + gas_concentrations ! RRTMGP DDT: trace gas concentrations (vmr) ! Output character(len=*), intent(out) :: & - errmsg ! Error message + errmsg ! CCPP error message integer, intent(out) :: & - errflg ! Error code + errflg ! CCPP error code type(ty_optical_props_1scl),intent(out) :: & - lw_optical_props_clrsky ! RRTMGP DDT: + lw_optical_props_clrsky ! RRTMGP DDT: longwave clear-sky radiative properties type(ty_source_func_lw),intent(out) :: & - sources ! RRTMGP DDT: + sources ! RRTMGP DDT: longwave source functions ! Initialize CCPP error handling variables errmsg = '' diff --git a/physics/rrtmgp_lw_gas_optics.meta b/physics/rrtmgp_lw_gas_optics.meta index b6d2c3934..cacda8c1c 100644 --- a/physics/rrtmgp_lw_gas_optics.meta +++ b/physics/rrtmgp_lw_gas_optics.meta @@ -77,14 +77,6 @@ type = integer intent = out optional = F -[ipsdlw0] - standard_name = initial_permutation_seed_lw - long_name = initial seed for McICA LW - units = none - dimensions = () - type = integer - intent = out - optional = F [lw_gas_props] standard_name = coefficients_for_lw_gas_optics long_name = DDT containing spectral information for RRTMGP LW radiation scheme diff --git a/physics/rrtmgp_lw_rte.F90 b/physics/rrtmgp_lw_rte.F90 index 1728a6baf..9a300df4f 100644 --- a/physics/rrtmgp_lw_rte.F90 +++ b/physics/rrtmgp_lw_rte.F90 @@ -45,11 +45,11 @@ subroutine rrtmgp_lw_rte_run(doLWrad, nCol, nLev, p_lay, t_lay, p_lev, skt, lw_g real(kind_phys), dimension(ncol), intent(in) :: & skt ! Surface(skin) temperature (K) type(ty_gas_optics_rrtmgp),intent(in) :: & - lw_gas_props ! DDT containing LW spectral information + lw_gas_props ! RRTMGP DDT: longwave spectral information real(kind_phys), dimension(lw_gas_props%get_nband(),ncol), intent(in) :: & sfc_emiss_byband ! Surface emissivity in each band type(ty_source_func_lw),intent(in) :: & - sources + sources ! RRTMGP DDT: longwave source functions type(ty_optical_props_1scl),intent(inout) :: & lw_optical_props_clrsky ! RRTMGP DDT: longwave clear-sky radiative properties type(ty_optical_props_1scl),intent(in) :: & diff --git a/physics/rrtmgp_sw_aerosol_optics.F90 b/physics/rrtmgp_sw_aerosol_optics.F90 index 566ecba68..d6413c368 100644 --- a/physics/rrtmgp_sw_aerosol_optics.F90 +++ b/physics/rrtmgp_sw_aerosol_optics.F90 @@ -63,9 +63,9 @@ subroutine rrtmgp_sw_aerosol_optics_run(doSWrad, nCol, nLev, nTracer, nDay, idxd type(ty_optical_props_2str),intent(out) :: & sw_optical_props_aerosol ! RRTMGP DDT: Longwave aerosol optical properties (tau) integer, intent(out) :: & - errflg ! + errflg ! CCPP error flag character(len=*), intent(out) :: & - errmsg ! + errmsg ! CCPP error message ! Local variables real(kind_phys), dimension(nCol, nLev, lw_gas_props%get_nband(), NF_AELW) :: & diff --git a/physics/rrtmgp_sw_cloud_optics.F90 b/physics/rrtmgp_sw_cloud_optics.F90 index e994dd558..377425a48 100644 --- a/physics/rrtmgp_sw_cloud_optics.F90 +++ b/physics/rrtmgp_sw_cloud_optics.F90 @@ -37,63 +37,63 @@ subroutine rrtmgp_sw_cloud_optics_init(cld_optics_scheme, nrghice, rrtmgp_root_d ! Outputs type(ty_cloud_optics),intent(out) :: & - sw_cloud_props ! DDT containing spectral information for RRTMGP SW radiation scheme + sw_cloud_props ! RRTMGP DDT: shortwave spectral information character(len=*), intent(out) :: & - errmsg ! Error message + errmsg ! CCPP error message integer, intent(out) :: & - errflg ! Error code + errflg ! CCPP error code ! Variables that will be passed to cloud_optics%load() + ! cld_optics_scheme = 1 real(kind_phys) :: & - radliq_lwr_sw, & ! - radliq_upr_sw, & ! - radliq_fac_sw, & ! - radice_lwr_sw, & ! - radice_upr_sw, & ! - radice_fac_sw ! - - real(kind_phys), dimension(:), allocatable :: & - pade_sizereg_extliq_sw, & ! - pade_sizereg_ssaliq_sw, & ! - pade_sizereg_asyliq_sw, & ! - pade_sizereg_extice_sw, & ! - pade_sizereg_ssaice_sw, & ! - pade_sizereg_asyice_sw ! + radliq_lwr_sw, & ! Liquid particle size lower bound for LUT interpolation + radliq_upr_sw, & ! Liquid particle size upper bound for LUT interpolation + radliq_fac_sw, & ! Factor for calculating LUT interpolation indices for liquid + radice_lwr_sw, & ! Ice particle size upper bound for LUT interpolation + radice_upr_sw, & ! Ice particle size lower bound for LUT interpolation + radice_fac_sw ! Factor for calculating LUT interpolation indices for ice real(kind_phys), dimension(:,:), allocatable :: & - lut_extliq_sw, & ! - lut_ssaliq_sw, & ! - lut_asyliq_sw, & ! - band_lims_cldy_sw ! - + lut_extliq_sw, & ! LUT shortwave liquid extinction coefficient + lut_ssaliq_sw, & ! LUT shortwave liquid single scattering albedo + lut_asyliq_sw, & ! LUT shortwave liquid asymmetry parameter + band_lims_cldy_sw ! Beginning and ending wavenumber [cm -1] for each band real(kind_phys), dimension(:,:,:), allocatable :: & - lut_extice_sw, & ! - lut_ssaice_sw, & ! - lut_asyice_sw, & ! - pade_extliq_sw, & ! - pade_ssaliq_sw, & ! - pade_asyliq_sw ! + lut_extice_sw, & ! LUT shortwave ice extinction coefficient + lut_ssaice_sw, & ! LUT shortwave ice single scattering albedo + lut_asyice_sw ! LUT shortwave ice asymmetry parameter + ! cld_optics_scheme = 2 + real(kind_phys), dimension(:), allocatable :: & + pade_sizereg_extliq_sw, & ! Particle size regime boundaries for shortwave liquid extinction + ! coefficient for Pade interpolation + pade_sizereg_ssaliq_sw, & ! Particle size regime boundaries for shortwave liquid single + ! scattering albedo for Pade interpolation + pade_sizereg_asyliq_sw, & ! Particle size regime boundaries for shortwave liquid asymmetry + ! parameter for Pade interpolation + pade_sizereg_extice_sw, & ! Particle size regime boundaries for shortwave ice extinction + ! coefficient for Pade interpolation + pade_sizereg_ssaice_sw, & ! Particle size regime boundaries for shortwave ice single + ! scattering albedo for Pade interpolation + pade_sizereg_asyice_sw ! Particle size regime boundaries for shortwave ice asymmetry + ! parameter for Pade interpolation + real(kind_phys), dimension(:,:,:), allocatable :: & + pade_extliq_sw, & ! PADE coefficients for shortwave liquid extinction + pade_ssaliq_sw, & ! PADE coefficients for shortwave liquid single scattering albedo + pade_asyliq_sw ! PADE coefficients for shortwave liquid asymmetry parameter real(kind_phys), dimension(:,:,:,:), allocatable :: & - pade_extice_sw, & ! - pade_ssaice_sw, & ! - pade_asyice_sw ! - ! Dimensions (to be broadcast across all processors) + pade_extice_sw, & ! PADE coefficients for shortwave ice extinction + pade_ssaice_sw, & ! PADE coefficients for shortwave ice single scattering albedo + pade_asyice_sw ! PADE coefficients for shortwave ice asymmetry parameter + ! Dimensions integer :: & - nrghice_sw, & ! Number of ice-roughness categories in file - nbandSWcldy_sw, & ! - nsize_liq_sw, & ! - nsize_ice_sw, & ! - nsizereg_sw, & ! - ncoeff_ext_sw, & ! - ncoeff_ssa_g_sw, & ! - nbound_sw, & ! - npairsSWcldy_sw ! + nrghice_sw, nbandSWcldy_sw, nsize_liq_sw, nsize_ice_sw, nsizereg_sw,& + ncoeff_ext_sw, ncoeff_ssa_g_sw, nbound_sw, npairsSWcldy_sw ! Local variables integer :: status,ncid_sw_clds,dimid,varID character(len=264) :: sw_cloud_props_file -!#ifdef MPI -! integer :: ierr -!#endif +#ifdef MPI + integer :: ierr +#endif ! Initialize errmsg = '' errflg = 0 @@ -104,7 +104,7 @@ subroutine rrtmgp_sw_cloud_optics_init(cld_optics_scheme, nrghice, rrtmgp_root_d sw_cloud_props_file = trim(rrtmgp_root_dir)//trim(rrtmgp_sw_file_clouds) ! Read dimensions for k-distribution fields (only on master processor(0)) -! if (mpirank .eq. mpiroot) then + if (mpirank .eq. mpiroot) then if(nf90_open(trim(sw_cloud_props_file), NF90_WRITE, ncid_sw_clds) == NF90_NOERR) then status = nf90_inq_dimid(ncid_sw_clds, 'nband', dimid) status = nf90_inquire_dimension(ncid_sw_clds, dimid, len=nbandSWcldy_sw) @@ -123,30 +123,35 @@ subroutine rrtmgp_sw_cloud_optics_init(cld_optics_scheme, nrghice, rrtmgp_root_d status = nf90_inq_dimid(ncid_sw_clds, 'nbound', dimid) status = nf90_inquire_dimension(ncid_sw_clds, dimid, len=nbound_sw) status = nf90_inq_dimid(ncid_sw_clds, 'pair', dimid) - status = nf90_inquire_dimension(ncid_sw_clds, dimid, len=npairsSWcldy_sw) - status = nf90_close(ncid_sw_clds) + endif ! Check to ensure that number of ice-roughness categories is feasible. if (nrghice .gt. nrghice_sw) then errmsg = 'Number of RRTMGP ice-roughness categories requested in namelist file is not allowed' endif -! endif + endif -! ! Broadcast dimensions to all processors -!#ifdef MPI -! if (cld_optics_scheme .eq. 1 .or. cld_optics_scheme .eq. 2) then -! call MPI_BCAST(nbandSWcldy_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(nrghice_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(nsize_liq_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(nsize_ice_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(nsizereg_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(ncoeff_ext_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(ncoeff_ssa_g_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(nbound_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(npairsSWcldy_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! endif -!#endif + ! Broadcast dimensions to all processors +#ifdef MPI + call MPI_BCAST(nbandSWcldy_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + if (cld_optics_scheme .eq. 1) then + call MPI_BARRIER(mpicomm, ierr) + call MPI_BCAST(nrghice_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nsize_liq_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nsize_ice_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BARRIER(mpicomm, ierr) + endif + if (cld_optics_scheme .eq. 2) then + call MPI_BARRIER(mpicomm, ierr) + call MPI_BCAST(nrghice_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nsizereg_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(ncoeff_ext_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(ncoeff_ssa_g_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nbound_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BARRIER(mpicomm, ierr) + endif +#endif if (cld_optics_scheme .eq. 1) then allocate(lut_extliq_sw(nsize_liq_sw, nBandSWcldy_sw)) @@ -155,7 +160,6 @@ subroutine rrtmgp_sw_cloud_optics_init(cld_optics_scheme, nrghice, rrtmgp_root_d allocate(lut_extice_sw(nsize_ice_sw, nBandSWcldy_sw, nrghice_sw)) allocate(lut_ssaice_sw(nsize_ice_sw, nBandSWcldy_sw, nrghice_sw)) allocate(lut_asyice_sw(nsize_ice_sw, nBandSWcldy_sw, nrghice_sw)) - allocate(band_lims_cldy_sw(2, nBandSWcldy_sw)) endif if (cld_optics_scheme .eq. 2) then allocate(pade_extliq_sw(nbandSWcldy_sw, nsizereg_sw, ncoeff_ext_sw )) @@ -170,15 +174,13 @@ subroutine rrtmgp_sw_cloud_optics_init(cld_optics_scheme, nrghice, rrtmgp_root_d allocate(pade_sizereg_extice_sw(nbound_sw)) allocate(pade_sizereg_ssaice_sw(nbound_sw)) allocate(pade_sizereg_asyice_sw(nbound_sw)) - allocate(band_lims_cldy_sw(2,nbandSWcldy_sw)) endif + allocate(band_lims_cldy_sw(2,nbandSWcldy_sw)) ! On master processor, allocate space, read in fields, broadcast to all processors -! if (mpirank .eq. mpiroot) then - ! + if (mpirank .eq. mpiroot) then if (cld_optics_scheme .eq. 1) then write (*,*) 'Reading RRTMGP shortwave cloud data (LUT) ... ' - ! if(nf90_open(trim(sw_cloud_props_file), NF90_WRITE, ncid_sw_clds) == NF90_NOERR) then status = nf90_inq_varid(ncid_sw_clds,'radliq_lwr',varID) status = nf90_get_var(ncid_sw_clds,varID,radliq_lwr_sw) @@ -212,7 +214,6 @@ subroutine rrtmgp_sw_cloud_optics_init(cld_optics_scheme, nrghice, rrtmgp_root_d ! if (cld_optics_scheme .eq. 2) then write (*,*) 'Reading RRTMGP shortwave cloud data (PADE) ... ' - ! if(nf90_open(trim(sw_cloud_props_file), NF90_WRITE, ncid_sw_clds) == NF90_NOERR) then status = nf90_inq_varid(ncid_sw_clds,'radliq_lwr',varID) status = nf90_get_var(ncid_sw_clds,varID,radliq_lwr_sw) @@ -255,75 +256,79 @@ subroutine rrtmgp_sw_cloud_optics_init(cld_optics_scheme, nrghice, rrtmgp_root_d status = nf90_close(ncid_sw_clds) endif endif - !endif + endif ! Broadcast arrays to all processors -!#ifdef MPI -! if (cld_optics_scheme .eq. 1) then -! write (*,*) 'Broadcasting RRTMGP shortwave cloud data (LUT) ... ' -!#ifndef SINGLE_PREC -! call MPI_BCAST(radliq_lwr_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(radliq_upr_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(radliq_fac_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(radice_lwr_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(radice_upr_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(radice_fac_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(lut_extliq_sw, size(lut_extliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(lut_ssaliq_sw, size(lut_ssaliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(lut_asyliq_sw, size(lut_asyliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(lut_extice_sw, size(lut_extice_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(lut_ssaice_sw, size(lut_ssaice_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(lut_asyice_sw, size(lut_asyice_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(band_lims_cldy_sw, size(band_lims_cldy_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -!#else -! call MPI_BCAST(radliq_lwr_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(radliq_upr_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(radliq_fac_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(radice_lwr_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(radice_upr_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(radice_fac_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(lut_extliq_sw, size(lut_extliq_sw), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(lut_ssaliq_sw, size(lut_ssaliq_sw), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(lut_asyliq_sw, size(lut_asyliq_sw), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(lut_extice_sw, size(lut_extice_sw), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(lut_ssaice_sw, size(lut_ssaice_sw), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(lut_asyice_sw, size(lut_asyice_sw), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(band_lims_cldy_sw, size(band_lims_cldy_sw), MPI_REAL, mpiroot, mpicomm, ierr) -!#endif -! endif -! if (cld_optics_scheme .eq. 2) then -! write (*,*) 'Broadcasting RRTMGP shortwave cloud data (PADE) ... ' -!#ifndef SINGLE_PREC -! call MPI_BCAST(pade_extliq_sw, size(pade_extliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(pade_ssaliq_sw, size(pade_ssaliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(pade_asyliq_sw, size(pade_asyliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(pade_extice_sw, size(pade_extice_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(pade_ssaice_sw, size(pade_ssaice_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(pade_asyice_sw, size(pade_asyice_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(pade_sizereg_extliq_sw, size(pade_sizereg_extliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(pade_sizereg_ssaliq_sw, size(pade_sizereg_ssaliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(pade_sizereg_asyliq_sw, size(pade_sizereg_asyliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(pade_sizereg_extice_sw, size(pade_sizereg_extice_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(pade_sizereg_ssaice_sw, size(pade_sizereg_ssaice_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(pade_sizereg_asyice_sw, size(pade_sizereg_asyice_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(band_lims_cldy_sw, size(band_lims_cldy_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -!#else -! call MPI_BCAST(pade_extliq_sw, size(pade_extliq_sw), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(pade_ssaliq_sw, size(pade_ssaliq_sw), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(pade_asyliq_sw, size(pade_asyliq_sw), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(pade_extice_sw, size(pade_extice_sw), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(pade_ssaice_sw, size(pade_ssaice_sw), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(pade_asyice_sw, size(pade_asyice_sw), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(pade_sizereg_extliq_sw, size(pade_sizereg_extliq_sw), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(pade_sizereg_ssaliq_sw, size(pade_sizereg_ssaliq_sw), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(pade_sizereg_asyliq_sw, size(pade_sizereg_asyliq_sw), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(pade_sizereg_extice_sw, size(pade_sizereg_extice_sw), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(pade_sizereg_ssaice_sw, size(pade_sizereg_ssaice_sw), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(pade_sizereg_asyice_sw, size(pade_sizereg_asyice_sw), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(band_lims_cldy_sw, size(band_lims_cldy_sw), MPI_REAL, mpiroot, mpicomm, ierr) -!#endif -! endif -!#endif +#ifdef MPI + if (cld_optics_scheme .eq. 1) then + if (mpirank==mpiroot) write (*,*) 'Broadcasting RRTMGP shortwave cloud data (LUT) ... ' + call MPI_BARRIER(mpicomm, ierr) +#ifndef SINGLE_PREC + call MPI_BCAST(radliq_lwr_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(radliq_upr_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(radliq_fac_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(radice_lwr_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(radice_upr_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(radice_fac_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_extliq_sw, size(lut_extliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_ssaliq_sw, size(lut_ssaliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_asyliq_sw, size(lut_asyliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_extice_sw, size(lut_extice_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_ssaice_sw, size(lut_ssaice_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_asyice_sw, size(lut_asyice_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(band_lims_cldy_sw, size(band_lims_cldy_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +#else + call MPI_BCAST(radliq_lwr_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(radliq_upr_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(radliq_fac_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(radice_lwr_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(radice_upr_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(radice_fac_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_extliq_sw, size(lut_extliq_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_ssaliq_sw, size(lut_ssaliq_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_asyliq_sw, size(lut_asyliq_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_extice_sw, size(lut_extice_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_ssaice_sw, size(lut_ssaice_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_asyice_sw, size(lut_asyice_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(band_lims_cldy_sw, size(band_lims_cldy_sw), MPI_REAL, mpiroot, mpicomm, ierr) +#endif + call MPI_BARRIER(mpicomm, ierr) + endif + if (cld_optics_scheme .eq. 2) then + if (mpirank==mpiroot) write (*,*) 'Broadcasting RRTMGP shortwave cloud data (PADE) ... ' + call MPI_BARRIER(mpicomm, ierr) +#ifndef SINGLE_PREC + call MPI_BCAST(pade_extliq_sw, size(pade_extliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_ssaliq_sw, size(pade_ssaliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_asyliq_sw, size(pade_asyliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_extice_sw, size(pade_extice_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_ssaice_sw, size(pade_ssaice_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_asyice_sw, size(pade_asyice_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_extliq_sw, size(pade_sizereg_extliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_ssaliq_sw, size(pade_sizereg_ssaliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_asyliq_sw, size(pade_sizereg_asyliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_extice_sw, size(pade_sizereg_extice_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_ssaice_sw, size(pade_sizereg_ssaice_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_asyice_sw, size(pade_sizereg_asyice_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(band_lims_cldy_sw, size(band_lims_cldy_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +#else + call MPI_BCAST(pade_extliq_sw, size(pade_extliq_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_ssaliq_sw, size(pade_ssaliq_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_asyliq_sw, size(pade_asyliq_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_extice_sw, size(pade_extice_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_ssaice_sw, size(pade_ssaice_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_asyice_sw, size(pade_asyice_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_extliq_sw, size(pade_sizereg_extliq_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_ssaliq_sw, size(pade_sizereg_ssaliq_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_asyliq_sw, size(pade_sizereg_asyliq_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_extice_sw, size(pade_sizereg_extice_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_ssaice_sw, size(pade_sizereg_ssaice_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_asyice_sw, size(pade_sizereg_asyice_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(band_lims_cldy_sw, size(band_lims_cldy_sw), MPI_REAL, mpiroot, mpicomm, ierr) +#endif + call MPI_BARRIER(mpicomm, ierr) + endif +#endif ! Load tables data for RRTMGP cloud-optics if (cld_optics_scheme .eq. 1) then @@ -376,15 +381,15 @@ subroutine rrtmgp_sw_cloud_optics_run(doSWrad, nCol, nLev, nDay, idxday, nrghice cld_rwp, & ! Cloud rain water path cld_rerain ! Cloud rain effective radius type(ty_cloud_optics),intent(in) :: & - sw_cloud_props ! RRTMGP DDT: + sw_cloud_props ! RRTMGP DDT: shortwave cloud properties type(ty_gas_optics_rrtmgp),intent(in) :: & - sw_gas_props ! RRTMGP DDT: K-distribution data + sw_gas_props ! RRTMGP DDT: shortwave K-distribution data ! Outputs character(len=*), intent(out) :: & - errmsg ! Error message + errmsg ! CCPP error message integer, intent(out) :: & - errflg ! Error code + errflg ! CCPP error code type(ty_optical_props_2str),intent(out) :: & sw_optical_props_cloudsByBand ! RRTMGP DDT: Shortwave optical properties (cloudy atmosphere) real(kind_phys), dimension(ncol,NLev), intent(out) :: & @@ -402,22 +407,16 @@ subroutine rrtmgp_sw_cloud_optics_run(doSWrad, nCol, nLev, nDay, idxday, nrghice if (.not. doSWrad) return if (nDay .gt. 0) then - ! ####################################################################################### ! Compute ice/liquid cloud masks, needed by rrtmgp_cloud_optics - ! ####################################################################################### liqmask = (cld_frac(idxday(1:nday),:) .gt. 0 .and. cld_lwp(idxday(1:nday),:) .gt. 0) icemask = (cld_frac(idxday(1:nday),:) .gt. 0 .and. cld_iwp(idxday(1:nday),:) .gt. 0) - ! ####################################################################################### ! Allocate space for RRTMGP DDTs containing cloud radiative properties - ! ####################################################################################### ! Cloud optics [nday,nLev,nBands] call check_error_msg('rrtmgp_sw_cloud_optics_run',sw_optical_props_cloudsByBand%alloc_2str(& nday, nLev, sw_gas_props%get_band_lims_wavenumber())) - ! ####################################################################################### ! Compute cloud-optics for RTE. - ! ####################################################################################### if (cld_optics_scheme .gt. 0) then ! RRTMGP cloud-optics. call check_error_msg('rrtmgp_sw_cloud_optics_run',sw_cloud_props%cloud_optics(& diff --git a/physics/rrtmgp_sw_cloud_sampling.F90 b/physics/rrtmgp_sw_cloud_sampling.F90 index 504e5f733..b290594ea 100644 --- a/physics/rrtmgp_sw_cloud_sampling.F90 +++ b/physics/rrtmgp_sw_cloud_sampling.F90 @@ -13,7 +13,20 @@ module rrtmgp_sw_cloud_sampling ! ######################################################################################### ! SUBROUTINE mcica_init ! ######################################################################################### - subroutine rrtmgp_sw_cloud_sampling_init() +!! \section arg_table_rrtmgp_sw_cloud_sampling_init +!! \htmlinclude rrtmgp_sw_cloud_sampling.html +!! + subroutine rrtmgp_sw_cloud_sampling_init(sw_gas_props, ipsdsw0) + ! Inputs + type(ty_gas_optics_rrtmgp),intent(in) :: & + sw_gas_props ! RRTMGP DDT: K-distribution data + ! Outputs + integer, intent(out) :: & + ipsdsw0 ! Initial permutation seed for McICA + + ! Set initial permutation seed for McICA, initially set to number of G-points + ipsdsw0 = sw_gas_props%get_ngpt() + end subroutine rrtmgp_sw_cloud_sampling_init ! ######################################################################################### diff --git a/physics/rrtmgp_sw_cloud_sampling.meta b/physics/rrtmgp_sw_cloud_sampling.meta index 1ffe9ba84..1243743a9 100644 --- a/physics/rrtmgp_sw_cloud_sampling.meta +++ b/physics/rrtmgp_sw_cloud_sampling.meta @@ -1,3 +1,24 @@ +[ccpp-arg-table] + name = rrtmgp_sw_cloud_sampling_init + type = scheme +[sw_gas_props] + standard_name = coefficients_for_sw_gas_optics + long_name = DDT containing spectral information for RRTMGP SW radiation scheme + units = DDT + dimensions = () + type = ty_gas_optics_rrtmgp + intent = in + optional = F +[ipsdsw0] + standard_name = initial_permutation_seed_sw + long_name = initial seed for McICA SW + units = none + dimensions = () + type = integer + intent = out + optional = F + +###################################################### [ccpp-arg-table] name = rrtmgp_sw_cloud_sampling_run type = scheme diff --git a/physics/rrtmgp_sw_gas_optics.F90 b/physics/rrtmgp_sw_gas_optics.F90 index 44aebde7d..c8f43d139 100644 --- a/physics/rrtmgp_sw_gas_optics.F90 +++ b/physics/rrtmgp_sw_gas_optics.F90 @@ -18,7 +18,7 @@ module rrtmgp_sw_gas_optics !! \htmlinclude rrtmgp_sw_gas_optics.html !! subroutine rrtmgp_sw_gas_optics_init(rrtmgp_root_dir, rrtmgp_sw_file_gas, rrtmgp_nGases, & - active_gases_array, mpicomm, mpirank, mpiroot, sw_gas_props, ipsdsw0, errmsg, errflg) + active_gases_array, mpicomm, mpirank, mpiroot, sw_gas_props, errmsg, errflg) use netcdf #ifdef MPI use mpi @@ -39,78 +39,70 @@ subroutine rrtmgp_sw_gas_optics_init(rrtmgp_root_dir, rrtmgp_sw_file_gas, rrtmgp ! Outputs character(len=*), intent(out) :: & - errmsg ! Error message + errmsg ! CCPP error message integer, intent(out) :: & - errflg, & ! Error code - ipsdsw0 ! + errflg ! CCPP error code type(ty_gas_optics_rrtmgp),intent(out) :: & - sw_gas_props ! RRTMGP DDT: + sw_gas_props ! RRTMGP DDT: shortwave spectral information - ! Fields from the K-distribution files ! Variables that will be passed to gas_optics%load() type(ty_gas_concs) :: & gas_concentrations integer, dimension(:), allocatable :: & - kminor_start_lower_sw, & ! - kminor_start_upper_sw ! + kminor_start_lower_sw, & ! Starting index in the [1, nContributors] vector for a contributor + ! given by \"minor_gases_lower\" (lower atmosphere) + kminor_start_upper_sw ! Starting index in the [1, nContributors] vector for a contributor + ! given by \"minor_gases_upper\" (upper atmosphere) integer, dimension(:,:), allocatable :: & - band2gpt_sw, & ! - minor_limits_gpt_lower_sw, & ! - minor_limits_gpt_upper_sw ! + band2gpt_sw, & ! Beginning and ending gpoint for each band + minor_limits_gpt_lower_sw, & ! Beginning and ending gpoint for each minor interval in lower atmosphere + minor_limits_gpt_upper_sw ! Beginning and ending gpoint for each minor interval in upper atmosphere integer, dimension(:,:,:), allocatable :: & - key_species_sw ! + key_species_sw ! Key species pair for each band real(kind_phys) :: & - press_ref_trop_sw, & ! - temp_ref_p_sw, & ! - temp_ref_t_sw ! + press_ref_trop_sw, & ! Reference pressure separating the lower and upper atmosphere [Pa] + temp_ref_p_sw, & ! Standard spectroscopic reference pressure [Pa] + temp_ref_t_sw ! Standard spectroscopic reference temperature [K] real(kind_phys), dimension(:), allocatable :: & - press_ref_sw, & ! - temp_ref_sw, & ! - solar_source_sw ! + press_ref_sw, & ! Pressures for reference atmosphere; press_ref(# reference layers) [Pa] + temp_ref_sw, & ! Temperatures for reference atmosphere; temp_ref(# reference layers) [K] + solar_source_sw ! Stored solar source function from original RRTM real(kind_phys), dimension(:,:), allocatable :: & - band_lims_sw ! + band_lims_sw ! Beginning and ending wavenumber [cm -1] for each band real(kind_phys), dimension(:,:,:), allocatable :: & - vmr_ref_sw, & ! - kminor_lower_sw, & ! - kminor_upper_sw, & ! - rayl_lower_sw, & ! - rayl_upper_sw ! + vmr_ref_sw, & ! Volume mixing ratios for reference atmosphere + kminor_lower_sw, & ! (transformed from [nTemp x nEta x nGpt x nAbsorbers] array to + ! [nTemp x nEta x nContributors] array) + kminor_upper_sw, & ! (transformed from [nTemp x nEta x nGpt x nAbsorbers] array to + ! [nTemp x nEta x nContributors] array) + rayl_lower_sw, & ! Stored coefficients due to rayleigh scattering contribution + rayl_upper_sw ! Stored coefficients due to rayleigh scattering contribution real(kind_phys), dimension(:,:,:,:), allocatable :: & - kmajor_sw ! + kmajor_sw ! Stored absorption coefficients due to major absorbing gases character(len=32), dimension(:), allocatable :: & - gas_names_sw, & ! - gas_minor_sw, & ! - identifier_minor_sw, & ! - minor_gases_lower_sw, & ! - minor_gases_upper_sw, & ! - scaling_gas_lower_sw, & ! - scaling_gas_upper_sw ! + gas_names_sw, & ! Names of absorbing gases + gas_minor_sw, & ! Name of absorbing minor gas + identifier_minor_sw, & ! Unique string identifying minor gas + minor_gases_lower_sw, & ! Names of minor absorbing gases in lower atmosphere + minor_gases_upper_sw, & ! Names of minor absorbing gases in upper atmosphere + scaling_gas_lower_sw, & ! Absorption also depends on the concentration of this gas + scaling_gas_upper_sw ! Absorption also depends on the concentration of this gas logical(wl), dimension(:), allocatable :: & - minor_scales_with_density_lower_sw, & ! - minor_scales_with_density_upper_sw, & ! - scale_by_complement_lower_sw, & ! - scale_by_complement_upper_sw ! - ! Dimensions (to be broadcast across all processors) + minor_scales_with_density_lower_sw, & ! Density scaling is applied to minor absorption coefficients + minor_scales_with_density_upper_sw, & ! Density scaling is applied to minor absorption coefficients + scale_by_complement_lower_sw, & ! Absorption is scaled by concentration of scaling_gas (F) or its complement (T) + scale_by_complement_upper_sw ! Absorption is scaled by concentration of scaling_gas (F) or its complement (T) + ! Dimensions integer :: & - ntemps_sw, & ! - npress_sw, & ! - ngpts_sw, & ! - nabsorbers_sw, & ! - nextrabsorbers_sw, & ! - nminorabsorbers_sw, & ! - nmixingfracs_sw, & ! - nlayers_sw, & ! - nbnds_sw, & ! - npairs_sw, & ! - nminor_absorber_intervals_lower_sw, & ! - nminor_absorber_intervals_upper_sw, & ! - ncontributors_lower_sw, & ! - ncontributors_upper_sw ! + ntemps_sw, npress_sw, ngpts_sw, nabsorbers_sw, nextrabsorbers_sw, & + nminorabsorbers_sw, nmixingfracs_sw, nlayers_sw, nbnds_sw, npairs_sw, & + nminor_absorber_intervals_lower_sw, nminor_absorber_intervals_upper_sw, & + ncontributors_lower_sw, ncontributors_upper_sw ! Local variables - integer :: status,ncid_sw,dimid,varID,iGas - integer,dimension(:),allocatable :: temp1,temp2,temp3,temp4 + integer :: status, ncid_sw, dimid, varID, iGas + integer,dimension(:),allocatable :: temp1, temp2, temp3, temp4 character(len=264) :: sw_gas_props_file #ifdef MPI integer :: ierr @@ -400,9 +392,6 @@ subroutine rrtmgp_sw_gas_optics_init(rrtmgp_root_dir, rrtmgp_sw_file_gas, rrtmgp scale_by_complement_upper_sw, kminor_start_lower_sw, kminor_start_upper_sw, & solar_source_sw, rayl_lower_sw, rayl_upper_sw)) - ! Set initial permutation seed for McICA, initially set to number of G-points - ipsdsw0 = sw_gas_props%get_ngpt() - end subroutine rrtmgp_sw_gas_optics_init ! ######################################################################################### @@ -417,7 +406,7 @@ subroutine rrtmgp_sw_gas_optics_run(doSWrad, nCol, nLev, nday, idxday, sw_gas_pr ! Inputs logical, intent(in) :: & - doSWrad ! Flag to calculate SW irradiances + doSWrad ! Flag to calculate SW irradiances integer,intent(in) :: & nDay, & ! Number of daylit points. nCol, & ! Number of horizontal points @@ -427,25 +416,25 @@ subroutine rrtmgp_sw_gas_optics_run(doSWrad, nCol, nLev, nday, idxday, sw_gas_pr type(ty_gas_optics_rrtmgp),intent(in) :: & sw_gas_props ! RRTMGP DDT: spectral information for RRTMGP SW radiation scheme real(kind_phys), dimension(ncol,nLev), intent(in) :: & - p_lay, & ! Pressure @ model layer-centers (hPa) - t_lay ! Temperature (K) + p_lay, & ! Pressure @ model layer-centers (hPa) + t_lay ! Temperature (K) real(kind_phys), dimension(ncol,nLev+1), intent(in) :: & - p_lev, & ! Pressure @ model layer-interfaces (hPa) + p_lev, & ! Pressure @ model layer-interfaces (hPa) t_lev ! Temperature @ model levels type(ty_gas_concs),intent(in) :: & - gas_concentrations ! RRTMGP DDT: trace gas concentrations (vmr) + gas_concentrations ! RRTMGP DDT: trace gas concentrations (vmr) real(kind_phys), intent(in) :: & solcon ! Solar constant integer, intent(in) :: & - rrtmgp_nGases ! Number of trace gases active in RRTMGP + rrtmgp_nGases ! Number of trace gases active in RRTMGP character(len=128),dimension(rrtmgp_nGases), intent(in) :: & - active_gases_array ! Character array containing trace gases to include in RRTMGP + active_gases_array ! Character array containing trace gases to include in RRTMGP ! Output character(len=*), intent(out) :: & - errmsg ! Error message + errmsg ! CCPP error message integer, intent(out) :: & - errflg ! Error code + errflg ! CCPP error code type(ty_optical_props_2str),intent(out) :: & sw_optical_props_clrsky ! RRTMGP DDT: clear-sky shortwave optical properties, spectral (tau,ssa,g) real(kind_phys), dimension(ncol,sw_gas_props%get_ngpt()), intent(out) :: & diff --git a/physics/rrtmgp_sw_gas_optics.meta b/physics/rrtmgp_sw_gas_optics.meta index 6a2b87a9a..bdcfd8cbb 100644 --- a/physics/rrtmgp_sw_gas_optics.meta +++ b/physics/rrtmgp_sw_gas_optics.meta @@ -77,14 +77,6 @@ type = integer intent = out optional = F -[ipsdsw0] - standard_name = initial_permutation_seed_sw - long_name = initial seed for McICA SW - units = none - dimensions = () - type = integer - intent = out - optional = F [sw_gas_props] standard_name = coefficients_for_sw_gas_optics long_name = DDT containing spectral information for RRTMGP SW radiation scheme From 86a24827b1a8d92b766a8fe422c401d4891ae19b Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Mon, 16 Dec 2019 11:04:06 -0700 Subject: [PATCH 095/167] Fixed MPI calls in lw cloud optics. --- physics/rrtmgp_lw_cloud_optics.F90 | 104 ++++++++++++++--------------- 1 file changed, 52 insertions(+), 52 deletions(-) diff --git a/physics/rrtmgp_lw_cloud_optics.F90 b/physics/rrtmgp_lw_cloud_optics.F90 index 38a54ca4c..56fcff2ba 100644 --- a/physics/rrtmgp_lw_cloud_optics.F90 +++ b/physics/rrtmgp_lw_cloud_optics.F90 @@ -267,33 +267,33 @@ subroutine rrtmgp_lw_cloud_optics_init(cld_optics_scheme, nrghice, rrtmgp_root_d if (mpirank==mpiroot) write (*,*) 'Broadcasting RRTMGP shortwave cloud data (LUT) ... ' call MPI_BARRIER(mpicomm, ierr) #ifndef SINGLE_PREC - call MPI_BCAST(radliq_lwr_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(radliq_upr_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(radliq_fac_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(radice_lwr_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(radice_upr_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(radice_fac_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_extliq_sw, size(lut_extliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_ssaliq_sw, size(lut_ssaliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_asyliq_sw, size(lut_asyliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_extice_sw, size(lut_extice_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_ssaice_sw, size(lut_ssaice_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_asyice_sw, size(lut_asyice_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(band_lims_cldy_sw, size(band_lims_cldy_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(radliq_lwr, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(radliq_upr, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(radliq_fac, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(radice_lwr, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(radice_upr, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(radice_fac, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_extliq, size(lut_extliq), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_ssaliq, size(lut_ssaliq), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_asyliq, size(lut_asyliq), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_extice, size(lut_extice), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_ssaice, size(lut_ssaice), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_asyice, size(lut_asyice), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(band_lims_cldy, size(band_lims_cldy), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) #else - call MPI_BCAST(radliq_lwr_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(radliq_upr_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(radliq_fac_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(radice_lwr_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(radice_upr_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(radice_fac_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_extliq_sw, size(lut_extliq_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_ssaliq_sw, size(lut_ssaliq_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_asyliq_sw, size(lut_asyliq_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_extice_sw, size(lut_extice_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_ssaice_sw, size(lut_ssaice_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_asyice_sw, size(lut_asyice_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(band_lims_cldy_sw, size(band_lims_cldy_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(radliq_lwr, 1, MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(radliq_upr, 1, MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(radliq_fac, 1, MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(radice_lwr, 1, MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(radice_upr, 1, MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(radice_fac, 1, MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_extliq, size(lut_extliq), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_ssaliq, size(lut_ssaliq), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_asyliq, size(lut_asyliq), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_extice, size(lut_extice), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_ssaice, size(lut_ssaice), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(lut_asyice, size(lut_asyice), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(band_lims_cldy, size(band_lims_cldy), MPI_REAL, mpiroot, mpicomm, ierr) #endif call MPI_BARRIER(mpicomm, ierr) endif @@ -301,33 +301,33 @@ subroutine rrtmgp_lw_cloud_optics_init(cld_optics_scheme, nrghice, rrtmgp_root_d if (mpirank==mpiroot) write (*,*) 'Broadcasting RRTMGP shortwave cloud data (PADE) ... ' call MPI_BARRIER(mpicomm, ierr) #ifndef SINGLE_PREC - call MPI_BCAST(pade_extliq_sw, size(pade_extliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_ssaliq_sw, size(pade_ssaliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_asyliq_sw, size(pade_asyliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_extice_sw, size(pade_extice_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_ssaice_sw, size(pade_ssaice_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_asyice_sw, size(pade_asyice_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_extliq_sw, size(pade_sizereg_extliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_ssaliq_sw, size(pade_sizereg_ssaliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_asyliq_sw, size(pade_sizereg_asyliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_extice_sw, size(pade_sizereg_extice_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_ssaice_sw, size(pade_sizereg_ssaice_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_asyice_sw, size(pade_sizereg_asyice_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(band_lims_cldy_sw, size(band_lims_cldy_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_extliq, size(pade_extliq), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_ssaliq, size(pade_ssaliq), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_asyliq, size(pade_asyliq), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_extice, size(pade_extice), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_ssaice, size(pade_ssaice), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_asyice, size(pade_asyice), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_extliq, size(pade_sizereg_extliq), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_ssaliq, size(pade_sizereg_ssaliq), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_asyliq, size(pade_sizereg_asyliq), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_extice, size(pade_sizereg_extice), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_ssaice, size(pade_sizereg_ssaice), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_asyice, size(pade_sizereg_asyice), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(band_lims_cldy, size(band_lims_cldy), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) #else - call MPI_BCAST(pade_extliq_sw, size(pade_extliq_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_ssaliq_sw, size(pade_ssaliq_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_asyliq_sw, size(pade_asyliq_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_extice_sw, size(pade_extice_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_ssaice_sw, size(pade_ssaice_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_asyice_sw, size(pade_asyice_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_extliq_sw, size(pade_sizereg_extliq_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_ssaliq_sw, size(pade_sizereg_ssaliq_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_asyliq_sw, size(pade_sizereg_asyliq_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_extice_sw, size(pade_sizereg_extice_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_ssaice_sw, size(pade_sizereg_ssaice_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_asyice_sw, size(pade_sizereg_asyice_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(band_lims_cldy_sw, size(band_lims_cldy_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_extliq, size(pade_extliq), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_ssaliq, size(pade_ssaliq), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_asyliq, size(pade_asyliq), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_extice, size(pade_extice), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_ssaice, size(pade_ssaice), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_asyice, size(pade_asyice), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_extliq, size(pade_sizereg_extliq), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_ssaliq, size(pade_sizereg_ssaliq), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_asyliq, size(pade_sizereg_asyliq), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_extice, size(pade_sizereg_extice), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_ssaice, size(pade_sizereg_ssaice), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(pade_sizereg_asyice, size(pade_sizereg_asyice), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(band_lims_cldy, size(band_lims_cldy), MPI_REAL, mpiroot, mpicomm, ierr) #endif call MPI_BARRIER(mpicomm, ierr) endif From 4dcb001d753b0515dd0163dc02fff271380698b2 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Mon, 16 Dec 2019 11:56:21 -0700 Subject: [PATCH 096/167] Removed MPI for testing in UFS. --- physics/rrtmgp_lw_cloud_optics.F90 | 24 ++-- physics/rrtmgp_lw_gas_optics.F90 | 170 ++++++++++++++-------------- physics/rrtmgp_sw_gas_optics.F90 | 172 ++++++++++++++--------------- 3 files changed, 183 insertions(+), 183 deletions(-) diff --git a/physics/rrtmgp_lw_cloud_optics.F90 b/physics/rrtmgp_lw_cloud_optics.F90 index 56fcff2ba..aacecd6df 100644 --- a/physics/rrtmgp_lw_cloud_optics.F90 +++ b/physics/rrtmgp_lw_cloud_optics.F90 @@ -267,12 +267,12 @@ subroutine rrtmgp_lw_cloud_optics_init(cld_optics_scheme, nrghice, rrtmgp_root_d if (mpirank==mpiroot) write (*,*) 'Broadcasting RRTMGP shortwave cloud data (LUT) ... ' call MPI_BARRIER(mpicomm, ierr) #ifndef SINGLE_PREC - call MPI_BCAST(radliq_lwr, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(radliq_upr, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(radliq_fac, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(radice_lwr, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(radice_upr, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(radice_fac, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(radliq_lwr, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(radliq_upr, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(radliq_fac, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(radice_lwr, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(radice_upr, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(radice_fac, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) call MPI_BCAST(lut_extliq, size(lut_extliq), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) call MPI_BCAST(lut_ssaliq, size(lut_ssaliq), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) call MPI_BCAST(lut_asyliq, size(lut_asyliq), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) @@ -281,12 +281,12 @@ subroutine rrtmgp_lw_cloud_optics_init(cld_optics_scheme, nrghice, rrtmgp_root_d call MPI_BCAST(lut_asyice, size(lut_asyice), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) call MPI_BCAST(band_lims_cldy, size(band_lims_cldy), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) #else - call MPI_BCAST(radliq_lwr, 1, MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(radliq_upr, 1, MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(radliq_fac, 1, MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(radice_lwr, 1, MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(radice_upr, 1, MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(radice_fac, 1, MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(radliq_lwr, 1, MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(radliq_upr, 1, MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(radliq_fac, 1, MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(radice_lwr, 1, MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(radice_upr, 1, MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(radice_fac, 1, MPI_REAL, mpiroot, mpicomm, ierr) call MPI_BCAST(lut_extliq, size(lut_extliq), MPI_REAL, mpiroot, mpicomm, ierr) call MPI_BCAST(lut_ssaliq, size(lut_ssaliq), MPI_REAL, mpiroot, mpicomm, ierr) call MPI_BCAST(lut_asyliq, size(lut_asyliq), MPI_REAL, mpiroot, mpicomm, ierr) diff --git a/physics/rrtmgp_lw_gas_optics.F90 b/physics/rrtmgp_lw_gas_optics.F90 index 07c6d6231..84cdb4837 100644 --- a/physics/rrtmgp_lw_gas_optics.F90 +++ b/physics/rrtmgp_lw_gas_optics.F90 @@ -119,7 +119,7 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp lw_gas_props_file = trim(rrtmgp_root_dir)//trim(rrtmgp_lw_file_gas) ! Read dimensions for k-distribution fields (only on master processor(0)) - if (mpirank .eq. mpiroot) then +! if (mpirank .eq. mpiroot) then if(nf90_open(trim(lw_gas_props_file), NF90_WRITE, ncid_lw) .eq. NF90_NOERR) then status = nf90_inq_dimid(ncid_lw, 'temperature', dimid) status = nf90_inquire_dimension(ncid_lw, dimid, len=ntemps) @@ -153,28 +153,28 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp status = nf90_inquire_dimension(ncid_lw, dimid, len=ninternalSourcetemps) status = nf90_close(ncid_lw) endif - endif +! endif ! Broadcast dimensions to all processors -#ifdef MPI - call MPI_BARRIER(mpicomm, ierr) - call MPI_BCAST(ntemps, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(npress, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nminorabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nextrabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nmixingfracs, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nlayers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nbnds, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(ngpts_lw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(npairs, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(ncontributors_lower, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(ncontributors_upper, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nminor_absorber_intervals_lower, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nminor_absorber_intervals_upper, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(ninternalSourcetemps, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BARRIER(mpicomm, ierr) -#endif +!#ifdef MPI +! call MPI_BARRIER(mpicomm, ierr) +! call MPI_BCAST(ntemps, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(npress, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(nabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(nminorabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(nextrabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(nmixingfracs, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(nlayers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(nbnds, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(ngpts_lw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(npairs, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(ncontributors_lower, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(ncontributors_upper, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(nminor_absorber_intervals_lower, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(nminor_absorber_intervals_upper, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(ninternalSourcetemps, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BARRIER(mpicomm, ierr) +!#endif ! Allocate space for arrays allocate(gas_names(nabsorbers)) @@ -208,7 +208,7 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp allocate(totplnk(ninternalSourcetemps, nbnds)) allocate(planck_frac(ngpts_lw, nmixingfracs, npress+1, ntemps)) - if (mpirank .eq. mpiroot) then +! if (mpirank .eq. mpiroot) then write (*,*) 'Reading RRTMGP longwave k-distribution data ... ' ! Read in fields from file if(nf90_open(trim(lw_gas_props_file), NF90_WRITE, ncid_lw) .eq. NF90_NOERR) then @@ -311,72 +311,72 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp ! Close status = nf90_close(ncid_lw) endif - endif +! endif ! Broadcast arrays to all processors -#ifdef MPI - call MPI_BARRIER(mpicomm, ierr) - if (mpirank==mpiroot) write (*,*) 'Broadcasting RRTMGP longwave k-distribution data ... ' - call MPI_BCAST(minor_limits_gpt_upper, size(minor_limits_gpt_upper), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(minor_limits_gpt_lower, size(minor_limits_gpt_lower), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(kminor_start_upper, size(kminor_start_upper), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(kminor_start_lower, size(kminor_start_lower), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(key_species, size(key_species), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(band2gpt, size(band2gpt), MPI_INTEGER, mpiroot, mpicomm, ierr) -#ifndef SINGLE_PREC - call MPI_BCAST(band_lims, size(band_lims), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(press_ref, size(press_ref), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(temp_ref, size(temp_ref), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(kminor_lower, size(kminor_lower), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(kminor_upper, size(kminor_upper), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(scaling_gas_lower, size(scaling_gas_lower), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(scaling_gas_upper, size(scaling_gas_upper), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(vmr_ref, size(vmr_ref), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(kmajor, size(kmajor), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(temp_ref_p, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(temp_ref_t, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(press_ref_trop, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(totplnk, size(totplnk), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(planck_frac, size(planck_frac), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -#else - call MPI_BCAST(band_lims, size(band_lims), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(press_ref, size(press_ref), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(temp_ref, size(temp_ref), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(kminor_lower, size(kminor_lower), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(kminor_upper, size(kminor_upper), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(scaling_gas_lower, size(scaling_gas_lower), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(scaling_gas_upper, size(scaling_gas_upper), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(vmr_ref, size(vmr_ref), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(kmajor, size(kmajor), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(temp_ref_p, 1, MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(temp_ref_t, 1, MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(press_ref_trop, 1, MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(totplnk, size(totplnk), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(planck_frac, size(planck_frac), MPI_REAL, mpiroot, mpicomm, ierr) -#endif - ! Character arrays - do ij=1,nabsorbers - call MPI_BCAST(gas_names(ij), len(gas_names(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) - enddo - do ij=1,nminorabsorbers - call MPI_BCAST(gas_minor(ij), len(gas_minor(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) - call MPI_BCAST(identifier_minor(ij), len(identifier_minor(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) - enddo - do ij=1,nminor_absorber_intervals_lower - call MPI_BCAST(minor_gases_lower(ij), len(minor_gases_lower(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) - enddo - do ij=1,nminor_absorber_intervals_upper - call MPI_BCAST(minor_gases_upper(ij), len(minor_gases_upper(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) - enddo - ! Logical arrays - ! - call MPI_BCAST(minor_scales_with_density_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(scale_by_complement_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(minor_scales_with_density_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(scale_by_complement_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, ierr) - call MPI_BARRIER(mpicomm, ierr) -#endif +!#ifdef MPI +! call MPI_BARRIER(mpicomm, ierr) +! if (mpirank==mpiroot) write (*,*) 'Broadcasting RRTMGP longwave k-distribution data ... ' +! call MPI_BCAST(minor_limits_gpt_upper, size(minor_limits_gpt_upper), MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(minor_limits_gpt_lower, size(minor_limits_gpt_lower), MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(kminor_start_upper, size(kminor_start_upper), MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(kminor_start_lower, size(kminor_start_lower), MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(key_species, size(key_species), MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(band2gpt, size(band2gpt), MPI_INTEGER, mpiroot, mpicomm, ierr) +!#ifndef SINGLE_PREC +! call MPI_BCAST(band_lims, size(band_lims), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(press_ref, size(press_ref), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(temp_ref, size(temp_ref), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(kminor_lower, size(kminor_lower), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(kminor_upper, size(kminor_upper), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(scaling_gas_lower, size(scaling_gas_lower), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(scaling_gas_upper, size(scaling_gas_upper), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(vmr_ref, size(vmr_ref), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(kmajor, size(kmajor), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(temp_ref_p, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(temp_ref_t, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(press_ref_trop, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(totplnk, size(totplnk), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(planck_frac, size(planck_frac), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +!#else +! call MPI_BCAST(band_lims, size(band_lims), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(press_ref, size(press_ref), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(temp_ref, size(temp_ref), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(kminor_lower, size(kminor_lower), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(kminor_upper, size(kminor_upper), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(scaling_gas_lower, size(scaling_gas_lower), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(scaling_gas_upper, size(scaling_gas_upper), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(vmr_ref, size(vmr_ref), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(kmajor, size(kmajor), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(temp_ref_p, 1, MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(temp_ref_t, 1, MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(press_ref_trop, 1, MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(totplnk, size(totplnk), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(planck_frac, size(planck_frac), MPI_REAL, mpiroot, mpicomm, ierr) +!#endif +! ! Character arrays +! do ij=1,nabsorbers +! call MPI_BCAST(gas_names(ij), len(gas_names(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) +! enddo +! do ij=1,nminorabsorbers +! call MPI_BCAST(gas_minor(ij), len(gas_minor(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) +! call MPI_BCAST(identifier_minor(ij), len(identifier_minor(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) +! enddo +! do ij=1,nminor_absorber_intervals_lower +! call MPI_BCAST(minor_gases_lower(ij), len(minor_gases_lower(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) +! enddo +! do ij=1,nminor_absorber_intervals_upper +! call MPI_BCAST(minor_gases_upper(ij), len(minor_gases_upper(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) +! enddo +! ! Logical arrays +! ! +! call MPI_BCAST(minor_scales_with_density_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(scale_by_complement_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(minor_scales_with_density_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(scale_by_complement_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, ierr) +! call MPI_BARRIER(mpicomm, ierr) +!#endif ! Initialize gas concentrations and gas optics class with data do iGas=1,rrtmgp_nGases diff --git a/physics/rrtmgp_sw_gas_optics.F90 b/physics/rrtmgp_sw_gas_optics.F90 index c8f43d139..fc6e804cb 100644 --- a/physics/rrtmgp_sw_gas_optics.F90 +++ b/physics/rrtmgp_sw_gas_optics.F90 @@ -116,7 +116,7 @@ subroutine rrtmgp_sw_gas_optics_init(rrtmgp_root_dir, rrtmgp_sw_file_gas, rrtmgp sw_gas_props_file = trim(rrtmgp_root_dir)//trim(rrtmgp_sw_file_gas) ! Read dimensions for k-distribution fields (only on master processor(0)) - if (mpirank .eq. mpiroot) then +! if (mpirank .eq. mpiroot) then if(nf90_open(trim(sw_gas_props_file), NF90_WRITE, ncid_sw) .eq. NF90_NOERR) then status = nf90_inq_dimid(ncid_sw, 'temperature', dimid) status = nf90_inquire_dimension(ncid_sw, dimid, len=ntemps_sw) @@ -148,27 +148,27 @@ subroutine rrtmgp_sw_gas_optics_init(rrtmgp_root_dir, rrtmgp_sw_file_gas, rrtmgp status = nf90_inquire_dimension(ncid_sw, dimid, len=nminor_absorber_intervals_upper_sw) status = nf90_close(ncid_sw) endif - endif +! endif ! Broadcast dimensions to all processors -#ifdef MPI - call MPI_BARRIER(mpicomm, ierr) - call MPI_BCAST(ntemps_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(npress_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nabsorbers_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nminorabsorbers_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nextrabsorbers_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nmixingfracs_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nlayers_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nbnds_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(ngpts_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(npairs_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(ncontributors_lower_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(ncontributors_upper_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nminor_absorber_intervals_lower_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nminor_absorber_intervals_upper_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BARRIER(mpicomm, ierr) -#endif +!#ifdef MPI +! call MPI_BARRIER(mpicomm, ierr) +! call MPI_BCAST(ntemps_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(npress_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(nabsorbers_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(nminorabsorbers_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(nextrabsorbers_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(nmixingfracs_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(nlayers_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(nbnds_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(ngpts_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(npairs_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(ncontributors_lower_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(ncontributors_upper_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(nminor_absorber_intervals_lower_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(nminor_absorber_intervals_upper_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BARRIER(mpicomm, ierr) +!#endif ! Allocate space for arrays allocate(gas_names_sw(nabsorbers_sw)) @@ -204,7 +204,7 @@ subroutine rrtmgp_sw_gas_optics_init(rrtmgp_root_dir, rrtmgp_sw_file_gas, rrtmgp allocate(temp4(nminor_absorber_intervals_upper_sw)) ! On master processor, read in fields, broadcast to all processors - if (mpirank .eq. mpiroot) then +! if (mpirank .eq. mpiroot) then write (*,*) 'Reading RRTMGP shortwave k-distribution data ... ' ! Read in fields from file if(nf90_open(trim(sw_gas_props_file), NF90_WRITE, ncid_sw) .eq. NF90_NOERR) then @@ -310,73 +310,73 @@ subroutine rrtmgp_sw_gas_optics_init(rrtmgp_root_dir, rrtmgp_sw_file_gas, rrtmgp ! Close status = nf90_close(ncid_sw) endif - endif +! endif ! Broadcast arrays to all processors -#ifdef MPI - call MPI_BARRIER(mpicomm, ierr) - if (mpirank==mpiroot) write (*,*) 'Broadcasting RRTMGP shortwave k-distribution data ... ' - call MPI_BCAST(minor_limits_gpt_upper_sw, size(minor_limits_gpt_upper_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(minor_limits_gpt_lower_sw, size(minor_limits_gpt_lower_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(kminor_start_upper_sw, size(kminor_start_upper_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(kminor_start_lower_sw, size(kminor_start_lower_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(key_species_sw, size(key_species_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(band2gpt_sw, size(band2gpt_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) -#ifndef SINGLE_PREC - call MPI_BCAST(band_lims_sw, size(band_lims_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(press_ref_sw, size(press_ref_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(temp_ref_sw, size(temp_ref_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(kminor_lower_sw, size(kminor_lower_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(kminor_upper_sw, size(kminor_upper_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(scaling_gas_lower_sw, size(scaling_gas_lower_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(scaling_gas_upper_sw, size(scaling_gas_upper_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(vmr_ref_sw, size(vmr_ref_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(kmajor_sw, size(kmajor_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(temp_ref_p_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(temp_ref_t_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(press_ref_trop_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(solar_source_sw, size(solar_source_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(rayl_lower_sw, size(rayl_lower_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(rayl_upper_sw, size(rayl_upper_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -#else - call MPI_BCAST(band_lims_sw, size(band_lims_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(press_ref_sw, size(press_ref_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(temp_ref_sw, size(temp_ref_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(kminor_lower_sw, size(kminor_lower_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(kminor_upper_sw, size(kminor_upper_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(scaling_gas_lower_sw, size(scaling_gas_lower_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(scaling_gas_upper_sw, size(scaling_gas_upper_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(vmr_ref_sw, size(vmr_ref_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(kmajor_sw, size(kmajor_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(temp_ref_p_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(temp_ref_t_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(press_ref_trop_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(solar_source_sw, size(solar_source_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(rayl_lower_sw, size(rayl_lower_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(rayl_upper_sw, size(rayl_upper_sw), MPI_REAL, mpiroot, mpicomm, ierr) -#endif - ! Character arrays - do ij=1,nabsorbers_sw - call MPI_BCAST(gas_names_sw(ij), len(gas_names_sw(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) - enddo - do ij=1,nminorabsorbers_sw - call MPI_BCAST(gas_minor_sw(ij), len(gas_minor_sw(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) - call MPI_BCAST(identifier_minor_sw(ij), len(identifier_minor_sw(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) - enddo - do ij=1,nminor_absorber_intervals_lower_sw - call MPI_BCAST(minor_gases_lower_sw(ij), len(minor_gases_lower_sw(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) - enddo - do ij=1,nminor_absorber_intervals_upper_sw - call MPI_BCAST(minor_gases_upper_sw(ij), len(minor_gases_upper_sw(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) - enddo - - ! Logical arrays - call MPI_BCAST(minor_scales_with_density_lower_sw, nminor_absorber_intervals_lower_sw, MPI_LOGICAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(scale_by_complement_lower_sw, nminor_absorber_intervals_lower_sw, MPI_LOGICAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(minor_scales_with_density_upper_sw, nminor_absorber_intervals_upper_sw, MPI_LOGICAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(scale_by_complement_upper_sw, nminor_absorber_intervals_upper_sw, MPI_LOGICAL, mpiroot, mpicomm, ierr) - call MPI_BARRIER(mpicomm, ierr) -#endif +!#ifdef MPI +! call MPI_BARRIER(mpicomm, ierr) +! if (mpirank==mpiroot) write (*,*) 'Broadcasting RRTMGP shortwave k-distribution data ... ' +! call MPI_BCAST(minor_limits_gpt_upper_sw, size(minor_limits_gpt_upper_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(minor_limits_gpt_lower_sw, size(minor_limits_gpt_lower_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(kminor_start_upper_sw, size(kminor_start_upper_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(kminor_start_lower_sw, size(kminor_start_lower_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(key_species_sw, size(key_species_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(band2gpt_sw, size(band2gpt_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) +!#ifndef SINGLE_PREC +! call MPI_BCAST(band_lims_sw, size(band_lims_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(press_ref_sw, size(press_ref_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(temp_ref_sw, size(temp_ref_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(kminor_lower_sw, size(kminor_lower_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(kminor_upper_sw, size(kminor_upper_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(scaling_gas_lower_sw, size(scaling_gas_lower_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(scaling_gas_upper_sw, size(scaling_gas_upper_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(vmr_ref_sw, size(vmr_ref_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(kmajor_sw, size(kmajor_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(temp_ref_p_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(temp_ref_t_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(press_ref_trop_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(solar_source_sw, size(solar_source_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(rayl_lower_sw, size(rayl_lower_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(rayl_upper_sw, size(rayl_upper_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +!#else +! call MPI_BCAST(band_lims_sw, size(band_lims_sw), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(press_ref_sw, size(press_ref_sw), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(temp_ref_sw, size(temp_ref_sw), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(kminor_lower_sw, size(kminor_lower_sw), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(kminor_upper_sw, size(kminor_upper_sw), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(scaling_gas_lower_sw, size(scaling_gas_lower_sw), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(scaling_gas_upper_sw, size(scaling_gas_upper_sw), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(vmr_ref_sw, size(vmr_ref_sw), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(kmajor_sw, size(kmajor_sw), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(temp_ref_p_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(temp_ref_t_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(press_ref_trop_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(solar_source_sw, size(solar_source_sw), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(rayl_lower_sw, size(rayl_lower_sw), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(rayl_upper_sw, size(rayl_upper_sw), MPI_REAL, mpiroot, mpicomm, ierr) +!#endif +! ! Character arrays +! do ij=1,nabsorbers_sw +! call MPI_BCAST(gas_names_sw(ij), len(gas_names_sw(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) +! enddo +! do ij=1,nminorabsorbers_sw +! call MPI_BCAST(gas_minor_sw(ij), len(gas_minor_sw(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) +! call MPI_BCAST(identifier_minor_sw(ij), len(identifier_minor_sw(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) +! enddo +! do ij=1,nminor_absorber_intervals_lower_sw +! call MPI_BCAST(minor_gases_lower_sw(ij), len(minor_gases_lower_sw(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) +! enddo +! do ij=1,nminor_absorber_intervals_upper_sw +! call MPI_BCAST(minor_gases_upper_sw(ij), len(minor_gases_upper_sw(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) +! enddo +! +! ! Logical arrays +! call MPI_BCAST(minor_scales_with_density_lower_sw, nminor_absorber_intervals_lower_sw, MPI_LOGICAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(scale_by_complement_lower_sw, nminor_absorber_intervals_lower_sw, MPI_LOGICAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(minor_scales_with_density_upper_sw, nminor_absorber_intervals_upper_sw, MPI_LOGICAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(scale_by_complement_upper_sw, nminor_absorber_intervals_upper_sw, MPI_LOGICAL, mpiroot, mpicomm, ierr) +! call MPI_BARRIER(mpicomm, ierr) +!#endif ! Initialize gas concentrations and gas optics class with data do iGas=1,rrtmgp_nGases From 122a750b58724330e244bb9814f0f66a7b22502d Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Mon, 16 Dec 2019 12:29:31 -0700 Subject: [PATCH 097/167] Delta-scale SW before incrementing aerosol optics. --- physics/rrtmgp_sw_rte.F90 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/physics/rrtmgp_sw_rte.F90 b/physics/rrtmgp_sw_rte.F90 index 5adf04bee..c8cf4e0e8 100644 --- a/physics/rrtmgp_sw_rte.F90 +++ b/physics/rrtmgp_sw_rte.F90 @@ -165,10 +165,10 @@ subroutine rrtmgp_sw_rte_run(doSWrad, nCol, nLev, nDay, idxday, coszen, p_lay, t sfc_alb_dif = 0.5_kind_phys*(sfc_alb_nir_dif(:,idxday(1:nday)) + sfc_alb_uvvis_dif(:,idxday(1:nday))) ! Compute clear-sky fluxes (if requested) - ! Clear-sky fluxes (gas+aerosol) - call check_error_msg('rrtmgp_sw_rte_run',sw_optical_props_aerosol%increment(sw_optical_props_clrsky)) ! Delta-scale optical properties call check_error_msg('rrtmgp_sw_rte_run',sw_optical_props_clrsky%delta_scale()) + ! Clear-sky fluxes (gas+aerosol) + call check_error_msg('rrtmgp_sw_rte_run',sw_optical_props_aerosol%increment(sw_optical_props_clrsky)) if (l_ClrSky_HR) then call check_error_msg('rrtmgp_sw_rte_run',rte_sw( & sw_optical_props_clrsky, & ! IN - optical-properties From 8c5ead8cb39979350ab71e9a0b0ee22510e447eb Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Mon, 16 Dec 2019 13:48:41 -0700 Subject: [PATCH 098/167] Revert "Removed MPI for testing in UFS." This reverts commit 4dcb001d753b0515dd0163dc02fff271380698b2. --- physics/rrtmgp_lw_cloud_optics.F90 | 24 ++-- physics/rrtmgp_lw_gas_optics.F90 | 170 ++++++++++++++-------------- physics/rrtmgp_sw_gas_optics.F90 | 172 ++++++++++++++--------------- 3 files changed, 183 insertions(+), 183 deletions(-) diff --git a/physics/rrtmgp_lw_cloud_optics.F90 b/physics/rrtmgp_lw_cloud_optics.F90 index aacecd6df..56fcff2ba 100644 --- a/physics/rrtmgp_lw_cloud_optics.F90 +++ b/physics/rrtmgp_lw_cloud_optics.F90 @@ -267,12 +267,12 @@ subroutine rrtmgp_lw_cloud_optics_init(cld_optics_scheme, nrghice, rrtmgp_root_d if (mpirank==mpiroot) write (*,*) 'Broadcasting RRTMGP shortwave cloud data (LUT) ... ' call MPI_BARRIER(mpicomm, ierr) #ifndef SINGLE_PREC - call MPI_BCAST(radliq_lwr, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(radliq_upr, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(radliq_fac, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(radice_lwr, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(radice_upr, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(radice_fac, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(radliq_lwr, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(radliq_upr, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(radliq_fac, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(radice_lwr, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(radice_upr, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(radice_fac, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) call MPI_BCAST(lut_extliq, size(lut_extliq), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) call MPI_BCAST(lut_ssaliq, size(lut_ssaliq), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) call MPI_BCAST(lut_asyliq, size(lut_asyliq), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) @@ -281,12 +281,12 @@ subroutine rrtmgp_lw_cloud_optics_init(cld_optics_scheme, nrghice, rrtmgp_root_d call MPI_BCAST(lut_asyice, size(lut_asyice), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) call MPI_BCAST(band_lims_cldy, size(band_lims_cldy), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) #else - call MPI_BCAST(radliq_lwr, 1, MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(radliq_upr, 1, MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(radliq_fac, 1, MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(radice_lwr, 1, MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(radice_upr, 1, MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(radice_fac, 1, MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(radliq_lwr, 1, MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(radliq_upr, 1, MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(radliq_fac, 1, MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(radice_lwr, 1, MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(radice_upr, 1, MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(radice_fac, 1, MPI_REAL, mpiroot, mpicomm, ierr) call MPI_BCAST(lut_extliq, size(lut_extliq), MPI_REAL, mpiroot, mpicomm, ierr) call MPI_BCAST(lut_ssaliq, size(lut_ssaliq), MPI_REAL, mpiroot, mpicomm, ierr) call MPI_BCAST(lut_asyliq, size(lut_asyliq), MPI_REAL, mpiroot, mpicomm, ierr) diff --git a/physics/rrtmgp_lw_gas_optics.F90 b/physics/rrtmgp_lw_gas_optics.F90 index 84cdb4837..07c6d6231 100644 --- a/physics/rrtmgp_lw_gas_optics.F90 +++ b/physics/rrtmgp_lw_gas_optics.F90 @@ -119,7 +119,7 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp lw_gas_props_file = trim(rrtmgp_root_dir)//trim(rrtmgp_lw_file_gas) ! Read dimensions for k-distribution fields (only on master processor(0)) -! if (mpirank .eq. mpiroot) then + if (mpirank .eq. mpiroot) then if(nf90_open(trim(lw_gas_props_file), NF90_WRITE, ncid_lw) .eq. NF90_NOERR) then status = nf90_inq_dimid(ncid_lw, 'temperature', dimid) status = nf90_inquire_dimension(ncid_lw, dimid, len=ntemps) @@ -153,28 +153,28 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp status = nf90_inquire_dimension(ncid_lw, dimid, len=ninternalSourcetemps) status = nf90_close(ncid_lw) endif -! endif + endif ! Broadcast dimensions to all processors -!#ifdef MPI -! call MPI_BARRIER(mpicomm, ierr) -! call MPI_BCAST(ntemps, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(npress, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(nabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(nminorabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(nextrabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(nmixingfracs, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(nlayers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(nbnds, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(ngpts_lw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(npairs, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(ncontributors_lower, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(ncontributors_upper, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(nminor_absorber_intervals_lower, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(nminor_absorber_intervals_upper, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(ninternalSourcetemps, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BARRIER(mpicomm, ierr) -!#endif +#ifdef MPI + call MPI_BARRIER(mpicomm, ierr) + call MPI_BCAST(ntemps, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(npress, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nminorabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nextrabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nmixingfracs, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nlayers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nbnds, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(ngpts_lw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(npairs, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(ncontributors_lower, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(ncontributors_upper, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nminor_absorber_intervals_lower, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nminor_absorber_intervals_upper, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(ninternalSourcetemps, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BARRIER(mpicomm, ierr) +#endif ! Allocate space for arrays allocate(gas_names(nabsorbers)) @@ -208,7 +208,7 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp allocate(totplnk(ninternalSourcetemps, nbnds)) allocate(planck_frac(ngpts_lw, nmixingfracs, npress+1, ntemps)) -! if (mpirank .eq. mpiroot) then + if (mpirank .eq. mpiroot) then write (*,*) 'Reading RRTMGP longwave k-distribution data ... ' ! Read in fields from file if(nf90_open(trim(lw_gas_props_file), NF90_WRITE, ncid_lw) .eq. NF90_NOERR) then @@ -311,72 +311,72 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp ! Close status = nf90_close(ncid_lw) endif -! endif + endif ! Broadcast arrays to all processors -!#ifdef MPI -! call MPI_BARRIER(mpicomm, ierr) -! if (mpirank==mpiroot) write (*,*) 'Broadcasting RRTMGP longwave k-distribution data ... ' -! call MPI_BCAST(minor_limits_gpt_upper, size(minor_limits_gpt_upper), MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(minor_limits_gpt_lower, size(minor_limits_gpt_lower), MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(kminor_start_upper, size(kminor_start_upper), MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(kminor_start_lower, size(kminor_start_lower), MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(key_species, size(key_species), MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(band2gpt, size(band2gpt), MPI_INTEGER, mpiroot, mpicomm, ierr) -!#ifndef SINGLE_PREC -! call MPI_BCAST(band_lims, size(band_lims), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(press_ref, size(press_ref), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(temp_ref, size(temp_ref), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(kminor_lower, size(kminor_lower), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(kminor_upper, size(kminor_upper), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(scaling_gas_lower, size(scaling_gas_lower), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(scaling_gas_upper, size(scaling_gas_upper), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(vmr_ref, size(vmr_ref), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(kmajor, size(kmajor), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(temp_ref_p, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(temp_ref_t, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(press_ref_trop, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(totplnk, size(totplnk), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(planck_frac, size(planck_frac), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -!#else -! call MPI_BCAST(band_lims, size(band_lims), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(press_ref, size(press_ref), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(temp_ref, size(temp_ref), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(kminor_lower, size(kminor_lower), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(kminor_upper, size(kminor_upper), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(scaling_gas_lower, size(scaling_gas_lower), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(scaling_gas_upper, size(scaling_gas_upper), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(vmr_ref, size(vmr_ref), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(kmajor, size(kmajor), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(temp_ref_p, 1, MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(temp_ref_t, 1, MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(press_ref_trop, 1, MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(totplnk, size(totplnk), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(planck_frac, size(planck_frac), MPI_REAL, mpiroot, mpicomm, ierr) -!#endif -! ! Character arrays -! do ij=1,nabsorbers -! call MPI_BCAST(gas_names(ij), len(gas_names(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) -! enddo -! do ij=1,nminorabsorbers -! call MPI_BCAST(gas_minor(ij), len(gas_minor(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) -! call MPI_BCAST(identifier_minor(ij), len(identifier_minor(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) -! enddo -! do ij=1,nminor_absorber_intervals_lower -! call MPI_BCAST(minor_gases_lower(ij), len(minor_gases_lower(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) -! enddo -! do ij=1,nminor_absorber_intervals_upper -! call MPI_BCAST(minor_gases_upper(ij), len(minor_gases_upper(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) -! enddo -! ! Logical arrays -! ! -! call MPI_BCAST(minor_scales_with_density_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(scale_by_complement_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(minor_scales_with_density_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(scale_by_complement_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, ierr) -! call MPI_BARRIER(mpicomm, ierr) -!#endif +#ifdef MPI + call MPI_BARRIER(mpicomm, ierr) + if (mpirank==mpiroot) write (*,*) 'Broadcasting RRTMGP longwave k-distribution data ... ' + call MPI_BCAST(minor_limits_gpt_upper, size(minor_limits_gpt_upper), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(minor_limits_gpt_lower, size(minor_limits_gpt_lower), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(kminor_start_upper, size(kminor_start_upper), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(kminor_start_lower, size(kminor_start_lower), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(key_species, size(key_species), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(band2gpt, size(band2gpt), MPI_INTEGER, mpiroot, mpicomm, ierr) +#ifndef SINGLE_PREC + call MPI_BCAST(band_lims, size(band_lims), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(press_ref, size(press_ref), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(temp_ref, size(temp_ref), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(kminor_lower, size(kminor_lower), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(kminor_upper, size(kminor_upper), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(scaling_gas_lower, size(scaling_gas_lower), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(scaling_gas_upper, size(scaling_gas_upper), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(vmr_ref, size(vmr_ref), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(kmajor, size(kmajor), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(temp_ref_p, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(temp_ref_t, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(press_ref_trop, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(totplnk, size(totplnk), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(planck_frac, size(planck_frac), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +#else + call MPI_BCAST(band_lims, size(band_lims), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(press_ref, size(press_ref), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(temp_ref, size(temp_ref), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(kminor_lower, size(kminor_lower), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(kminor_upper, size(kminor_upper), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(scaling_gas_lower, size(scaling_gas_lower), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(scaling_gas_upper, size(scaling_gas_upper), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(vmr_ref, size(vmr_ref), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(kmajor, size(kmajor), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(temp_ref_p, 1, MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(temp_ref_t, 1, MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(press_ref_trop, 1, MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(totplnk, size(totplnk), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(planck_frac, size(planck_frac), MPI_REAL, mpiroot, mpicomm, ierr) +#endif + ! Character arrays + do ij=1,nabsorbers + call MPI_BCAST(gas_names(ij), len(gas_names(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) + enddo + do ij=1,nminorabsorbers + call MPI_BCAST(gas_minor(ij), len(gas_minor(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) + call MPI_BCAST(identifier_minor(ij), len(identifier_minor(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) + enddo + do ij=1,nminor_absorber_intervals_lower + call MPI_BCAST(minor_gases_lower(ij), len(minor_gases_lower(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) + enddo + do ij=1,nminor_absorber_intervals_upper + call MPI_BCAST(minor_gases_upper(ij), len(minor_gases_upper(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) + enddo + ! Logical arrays + ! + call MPI_BCAST(minor_scales_with_density_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(scale_by_complement_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(minor_scales_with_density_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(scale_by_complement_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, ierr) + call MPI_BARRIER(mpicomm, ierr) +#endif ! Initialize gas concentrations and gas optics class with data do iGas=1,rrtmgp_nGases diff --git a/physics/rrtmgp_sw_gas_optics.F90 b/physics/rrtmgp_sw_gas_optics.F90 index fc6e804cb..c8f43d139 100644 --- a/physics/rrtmgp_sw_gas_optics.F90 +++ b/physics/rrtmgp_sw_gas_optics.F90 @@ -116,7 +116,7 @@ subroutine rrtmgp_sw_gas_optics_init(rrtmgp_root_dir, rrtmgp_sw_file_gas, rrtmgp sw_gas_props_file = trim(rrtmgp_root_dir)//trim(rrtmgp_sw_file_gas) ! Read dimensions for k-distribution fields (only on master processor(0)) -! if (mpirank .eq. mpiroot) then + if (mpirank .eq. mpiroot) then if(nf90_open(trim(sw_gas_props_file), NF90_WRITE, ncid_sw) .eq. NF90_NOERR) then status = nf90_inq_dimid(ncid_sw, 'temperature', dimid) status = nf90_inquire_dimension(ncid_sw, dimid, len=ntemps_sw) @@ -148,27 +148,27 @@ subroutine rrtmgp_sw_gas_optics_init(rrtmgp_root_dir, rrtmgp_sw_file_gas, rrtmgp status = nf90_inquire_dimension(ncid_sw, dimid, len=nminor_absorber_intervals_upper_sw) status = nf90_close(ncid_sw) endif -! endif + endif ! Broadcast dimensions to all processors -!#ifdef MPI -! call MPI_BARRIER(mpicomm, ierr) -! call MPI_BCAST(ntemps_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(npress_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(nabsorbers_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(nminorabsorbers_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(nextrabsorbers_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(nmixingfracs_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(nlayers_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(nbnds_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(ngpts_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(npairs_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(ncontributors_lower_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(ncontributors_upper_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(nminor_absorber_intervals_lower_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(nminor_absorber_intervals_upper_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BARRIER(mpicomm, ierr) -!#endif +#ifdef MPI + call MPI_BARRIER(mpicomm, ierr) + call MPI_BCAST(ntemps_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(npress_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nabsorbers_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nminorabsorbers_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nextrabsorbers_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nmixingfracs_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nlayers_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nbnds_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(ngpts_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(npairs_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(ncontributors_lower_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(ncontributors_upper_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nminor_absorber_intervals_lower_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(nminor_absorber_intervals_upper_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BARRIER(mpicomm, ierr) +#endif ! Allocate space for arrays allocate(gas_names_sw(nabsorbers_sw)) @@ -204,7 +204,7 @@ subroutine rrtmgp_sw_gas_optics_init(rrtmgp_root_dir, rrtmgp_sw_file_gas, rrtmgp allocate(temp4(nminor_absorber_intervals_upper_sw)) ! On master processor, read in fields, broadcast to all processors -! if (mpirank .eq. mpiroot) then + if (mpirank .eq. mpiroot) then write (*,*) 'Reading RRTMGP shortwave k-distribution data ... ' ! Read in fields from file if(nf90_open(trim(sw_gas_props_file), NF90_WRITE, ncid_sw) .eq. NF90_NOERR) then @@ -310,73 +310,73 @@ subroutine rrtmgp_sw_gas_optics_init(rrtmgp_root_dir, rrtmgp_sw_file_gas, rrtmgp ! Close status = nf90_close(ncid_sw) endif -! endif + endif ! Broadcast arrays to all processors -!#ifdef MPI -! call MPI_BARRIER(mpicomm, ierr) -! if (mpirank==mpiroot) write (*,*) 'Broadcasting RRTMGP shortwave k-distribution data ... ' -! call MPI_BCAST(minor_limits_gpt_upper_sw, size(minor_limits_gpt_upper_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(minor_limits_gpt_lower_sw, size(minor_limits_gpt_lower_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(kminor_start_upper_sw, size(kminor_start_upper_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(kminor_start_lower_sw, size(kminor_start_lower_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(key_species_sw, size(key_species_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(band2gpt_sw, size(band2gpt_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) -!#ifndef SINGLE_PREC -! call MPI_BCAST(band_lims_sw, size(band_lims_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(press_ref_sw, size(press_ref_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(temp_ref_sw, size(temp_ref_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(kminor_lower_sw, size(kminor_lower_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(kminor_upper_sw, size(kminor_upper_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(scaling_gas_lower_sw, size(scaling_gas_lower_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(scaling_gas_upper_sw, size(scaling_gas_upper_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(vmr_ref_sw, size(vmr_ref_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(kmajor_sw, size(kmajor_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(temp_ref_p_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(temp_ref_t_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(press_ref_trop_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(solar_source_sw, size(solar_source_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(rayl_lower_sw, size(rayl_lower_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(rayl_upper_sw, size(rayl_upper_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -!#else -! call MPI_BCAST(band_lims_sw, size(band_lims_sw), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(press_ref_sw, size(press_ref_sw), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(temp_ref_sw, size(temp_ref_sw), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(kminor_lower_sw, size(kminor_lower_sw), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(kminor_upper_sw, size(kminor_upper_sw), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(scaling_gas_lower_sw, size(scaling_gas_lower_sw), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(scaling_gas_upper_sw, size(scaling_gas_upper_sw), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(vmr_ref_sw, size(vmr_ref_sw), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(kmajor_sw, size(kmajor_sw), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(temp_ref_p_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(temp_ref_t_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(press_ref_trop_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(solar_source_sw, size(solar_source_sw), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(rayl_lower_sw, size(rayl_lower_sw), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(rayl_upper_sw, size(rayl_upper_sw), MPI_REAL, mpiroot, mpicomm, ierr) -!#endif -! ! Character arrays -! do ij=1,nabsorbers_sw -! call MPI_BCAST(gas_names_sw(ij), len(gas_names_sw(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) -! enddo -! do ij=1,nminorabsorbers_sw -! call MPI_BCAST(gas_minor_sw(ij), len(gas_minor_sw(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) -! call MPI_BCAST(identifier_minor_sw(ij), len(identifier_minor_sw(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) -! enddo -! do ij=1,nminor_absorber_intervals_lower_sw -! call MPI_BCAST(minor_gases_lower_sw(ij), len(minor_gases_lower_sw(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) -! enddo -! do ij=1,nminor_absorber_intervals_upper_sw -! call MPI_BCAST(minor_gases_upper_sw(ij), len(minor_gases_upper_sw(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) -! enddo -! -! ! Logical arrays -! call MPI_BCAST(minor_scales_with_density_lower_sw, nminor_absorber_intervals_lower_sw, MPI_LOGICAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(scale_by_complement_lower_sw, nminor_absorber_intervals_lower_sw, MPI_LOGICAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(minor_scales_with_density_upper_sw, nminor_absorber_intervals_upper_sw, MPI_LOGICAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(scale_by_complement_upper_sw, nminor_absorber_intervals_upper_sw, MPI_LOGICAL, mpiroot, mpicomm, ierr) -! call MPI_BARRIER(mpicomm, ierr) -!#endif +#ifdef MPI + call MPI_BARRIER(mpicomm, ierr) + if (mpirank==mpiroot) write (*,*) 'Broadcasting RRTMGP shortwave k-distribution data ... ' + call MPI_BCAST(minor_limits_gpt_upper_sw, size(minor_limits_gpt_upper_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(minor_limits_gpt_lower_sw, size(minor_limits_gpt_lower_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(kminor_start_upper_sw, size(kminor_start_upper_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(kminor_start_lower_sw, size(kminor_start_lower_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(key_species_sw, size(key_species_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) + call MPI_BCAST(band2gpt_sw, size(band2gpt_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) +#ifndef SINGLE_PREC + call MPI_BCAST(band_lims_sw, size(band_lims_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(press_ref_sw, size(press_ref_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(temp_ref_sw, size(temp_ref_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(kminor_lower_sw, size(kminor_lower_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(kminor_upper_sw, size(kminor_upper_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(scaling_gas_lower_sw, size(scaling_gas_lower_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(scaling_gas_upper_sw, size(scaling_gas_upper_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(vmr_ref_sw, size(vmr_ref_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(kmajor_sw, size(kmajor_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(temp_ref_p_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(temp_ref_t_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(press_ref_trop_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(solar_source_sw, size(solar_source_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(rayl_lower_sw, size(rayl_lower_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(rayl_upper_sw, size(rayl_upper_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +#else + call MPI_BCAST(band_lims_sw, size(band_lims_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(press_ref_sw, size(press_ref_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(temp_ref_sw, size(temp_ref_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(kminor_lower_sw, size(kminor_lower_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(kminor_upper_sw, size(kminor_upper_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(scaling_gas_lower_sw, size(scaling_gas_lower_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(scaling_gas_upper_sw, size(scaling_gas_upper_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(vmr_ref_sw, size(vmr_ref_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(kmajor_sw, size(kmajor_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(temp_ref_p_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(temp_ref_t_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(press_ref_trop_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(solar_source_sw, size(solar_source_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(rayl_lower_sw, size(rayl_lower_sw), MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(rayl_upper_sw, size(rayl_upper_sw), MPI_REAL, mpiroot, mpicomm, ierr) +#endif + ! Character arrays + do ij=1,nabsorbers_sw + call MPI_BCAST(gas_names_sw(ij), len(gas_names_sw(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) + enddo + do ij=1,nminorabsorbers_sw + call MPI_BCAST(gas_minor_sw(ij), len(gas_minor_sw(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) + call MPI_BCAST(identifier_minor_sw(ij), len(identifier_minor_sw(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) + enddo + do ij=1,nminor_absorber_intervals_lower_sw + call MPI_BCAST(minor_gases_lower_sw(ij), len(minor_gases_lower_sw(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) + enddo + do ij=1,nminor_absorber_intervals_upper_sw + call MPI_BCAST(minor_gases_upper_sw(ij), len(minor_gases_upper_sw(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) + enddo + + ! Logical arrays + call MPI_BCAST(minor_scales_with_density_lower_sw, nminor_absorber_intervals_lower_sw, MPI_LOGICAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(scale_by_complement_lower_sw, nminor_absorber_intervals_lower_sw, MPI_LOGICAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(minor_scales_with_density_upper_sw, nminor_absorber_intervals_upper_sw, MPI_LOGICAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(scale_by_complement_upper_sw, nminor_absorber_intervals_upper_sw, MPI_LOGICAL, mpiroot, mpicomm, ierr) + call MPI_BARRIER(mpicomm, ierr) +#endif ! Initialize gas concentrations and gas optics class with data do iGas=1,rrtmgp_nGases From 81abe37aba9e22ba3fae072b045dab715b7e8851 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Mon, 16 Dec 2019 13:50:10 -0700 Subject: [PATCH 099/167] Revert "Revert "Removed MPI for testing in UFS."" This reverts commit 8c5ead8cb39979350ab71e9a0b0ee22510e447eb. --- physics/rrtmgp_lw_cloud_optics.F90 | 24 ++-- physics/rrtmgp_lw_gas_optics.F90 | 170 ++++++++++++++-------------- physics/rrtmgp_sw_gas_optics.F90 | 172 ++++++++++++++--------------- 3 files changed, 183 insertions(+), 183 deletions(-) diff --git a/physics/rrtmgp_lw_cloud_optics.F90 b/physics/rrtmgp_lw_cloud_optics.F90 index 56fcff2ba..aacecd6df 100644 --- a/physics/rrtmgp_lw_cloud_optics.F90 +++ b/physics/rrtmgp_lw_cloud_optics.F90 @@ -267,12 +267,12 @@ subroutine rrtmgp_lw_cloud_optics_init(cld_optics_scheme, nrghice, rrtmgp_root_d if (mpirank==mpiroot) write (*,*) 'Broadcasting RRTMGP shortwave cloud data (LUT) ... ' call MPI_BARRIER(mpicomm, ierr) #ifndef SINGLE_PREC - call MPI_BCAST(radliq_lwr, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(radliq_upr, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(radliq_fac, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(radice_lwr, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(radice_upr, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(radice_fac, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(radliq_lwr, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(radliq_upr, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(radliq_fac, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(radice_lwr, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(radice_upr, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) + call MPI_BCAST(radice_fac, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) call MPI_BCAST(lut_extliq, size(lut_extliq), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) call MPI_BCAST(lut_ssaliq, size(lut_ssaliq), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) call MPI_BCAST(lut_asyliq, size(lut_asyliq), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) @@ -281,12 +281,12 @@ subroutine rrtmgp_lw_cloud_optics_init(cld_optics_scheme, nrghice, rrtmgp_root_d call MPI_BCAST(lut_asyice, size(lut_asyice), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) call MPI_BCAST(band_lims_cldy, size(band_lims_cldy), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) #else - call MPI_BCAST(radliq_lwr, 1, MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(radliq_upr, 1, MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(radliq_fac, 1, MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(radice_lwr, 1, MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(radice_upr, 1, MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(radice_fac, 1, MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(radliq_lwr, 1, MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(radliq_upr, 1, MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(radliq_fac, 1, MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(radice_lwr, 1, MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(radice_upr, 1, MPI_REAL, mpiroot, mpicomm, ierr) + call MPI_BCAST(radice_fac, 1, MPI_REAL, mpiroot, mpicomm, ierr) call MPI_BCAST(lut_extliq, size(lut_extliq), MPI_REAL, mpiroot, mpicomm, ierr) call MPI_BCAST(lut_ssaliq, size(lut_ssaliq), MPI_REAL, mpiroot, mpicomm, ierr) call MPI_BCAST(lut_asyliq, size(lut_asyliq), MPI_REAL, mpiroot, mpicomm, ierr) diff --git a/physics/rrtmgp_lw_gas_optics.F90 b/physics/rrtmgp_lw_gas_optics.F90 index 07c6d6231..84cdb4837 100644 --- a/physics/rrtmgp_lw_gas_optics.F90 +++ b/physics/rrtmgp_lw_gas_optics.F90 @@ -119,7 +119,7 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp lw_gas_props_file = trim(rrtmgp_root_dir)//trim(rrtmgp_lw_file_gas) ! Read dimensions for k-distribution fields (only on master processor(0)) - if (mpirank .eq. mpiroot) then +! if (mpirank .eq. mpiroot) then if(nf90_open(trim(lw_gas_props_file), NF90_WRITE, ncid_lw) .eq. NF90_NOERR) then status = nf90_inq_dimid(ncid_lw, 'temperature', dimid) status = nf90_inquire_dimension(ncid_lw, dimid, len=ntemps) @@ -153,28 +153,28 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp status = nf90_inquire_dimension(ncid_lw, dimid, len=ninternalSourcetemps) status = nf90_close(ncid_lw) endif - endif +! endif ! Broadcast dimensions to all processors -#ifdef MPI - call MPI_BARRIER(mpicomm, ierr) - call MPI_BCAST(ntemps, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(npress, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nminorabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nextrabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nmixingfracs, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nlayers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nbnds, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(ngpts_lw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(npairs, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(ncontributors_lower, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(ncontributors_upper, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nminor_absorber_intervals_lower, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nminor_absorber_intervals_upper, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(ninternalSourcetemps, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BARRIER(mpicomm, ierr) -#endif +!#ifdef MPI +! call MPI_BARRIER(mpicomm, ierr) +! call MPI_BCAST(ntemps, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(npress, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(nabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(nminorabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(nextrabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(nmixingfracs, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(nlayers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(nbnds, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(ngpts_lw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(npairs, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(ncontributors_lower, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(ncontributors_upper, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(nminor_absorber_intervals_lower, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(nminor_absorber_intervals_upper, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(ninternalSourcetemps, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BARRIER(mpicomm, ierr) +!#endif ! Allocate space for arrays allocate(gas_names(nabsorbers)) @@ -208,7 +208,7 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp allocate(totplnk(ninternalSourcetemps, nbnds)) allocate(planck_frac(ngpts_lw, nmixingfracs, npress+1, ntemps)) - if (mpirank .eq. mpiroot) then +! if (mpirank .eq. mpiroot) then write (*,*) 'Reading RRTMGP longwave k-distribution data ... ' ! Read in fields from file if(nf90_open(trim(lw_gas_props_file), NF90_WRITE, ncid_lw) .eq. NF90_NOERR) then @@ -311,72 +311,72 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp ! Close status = nf90_close(ncid_lw) endif - endif +! endif ! Broadcast arrays to all processors -#ifdef MPI - call MPI_BARRIER(mpicomm, ierr) - if (mpirank==mpiroot) write (*,*) 'Broadcasting RRTMGP longwave k-distribution data ... ' - call MPI_BCAST(minor_limits_gpt_upper, size(minor_limits_gpt_upper), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(minor_limits_gpt_lower, size(minor_limits_gpt_lower), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(kminor_start_upper, size(kminor_start_upper), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(kminor_start_lower, size(kminor_start_lower), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(key_species, size(key_species), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(band2gpt, size(band2gpt), MPI_INTEGER, mpiroot, mpicomm, ierr) -#ifndef SINGLE_PREC - call MPI_BCAST(band_lims, size(band_lims), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(press_ref, size(press_ref), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(temp_ref, size(temp_ref), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(kminor_lower, size(kminor_lower), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(kminor_upper, size(kminor_upper), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(scaling_gas_lower, size(scaling_gas_lower), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(scaling_gas_upper, size(scaling_gas_upper), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(vmr_ref, size(vmr_ref), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(kmajor, size(kmajor), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(temp_ref_p, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(temp_ref_t, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(press_ref_trop, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(totplnk, size(totplnk), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(planck_frac, size(planck_frac), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -#else - call MPI_BCAST(band_lims, size(band_lims), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(press_ref, size(press_ref), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(temp_ref, size(temp_ref), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(kminor_lower, size(kminor_lower), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(kminor_upper, size(kminor_upper), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(scaling_gas_lower, size(scaling_gas_lower), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(scaling_gas_upper, size(scaling_gas_upper), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(vmr_ref, size(vmr_ref), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(kmajor, size(kmajor), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(temp_ref_p, 1, MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(temp_ref_t, 1, MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(press_ref_trop, 1, MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(totplnk, size(totplnk), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(planck_frac, size(planck_frac), MPI_REAL, mpiroot, mpicomm, ierr) -#endif - ! Character arrays - do ij=1,nabsorbers - call MPI_BCAST(gas_names(ij), len(gas_names(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) - enddo - do ij=1,nminorabsorbers - call MPI_BCAST(gas_minor(ij), len(gas_minor(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) - call MPI_BCAST(identifier_minor(ij), len(identifier_minor(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) - enddo - do ij=1,nminor_absorber_intervals_lower - call MPI_BCAST(minor_gases_lower(ij), len(minor_gases_lower(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) - enddo - do ij=1,nminor_absorber_intervals_upper - call MPI_BCAST(minor_gases_upper(ij), len(minor_gases_upper(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) - enddo - ! Logical arrays - ! - call MPI_BCAST(minor_scales_with_density_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(scale_by_complement_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(minor_scales_with_density_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(scale_by_complement_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, ierr) - call MPI_BARRIER(mpicomm, ierr) -#endif +!#ifdef MPI +! call MPI_BARRIER(mpicomm, ierr) +! if (mpirank==mpiroot) write (*,*) 'Broadcasting RRTMGP longwave k-distribution data ... ' +! call MPI_BCAST(minor_limits_gpt_upper, size(minor_limits_gpt_upper), MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(minor_limits_gpt_lower, size(minor_limits_gpt_lower), MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(kminor_start_upper, size(kminor_start_upper), MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(kminor_start_lower, size(kminor_start_lower), MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(key_species, size(key_species), MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(band2gpt, size(band2gpt), MPI_INTEGER, mpiroot, mpicomm, ierr) +!#ifndef SINGLE_PREC +! call MPI_BCAST(band_lims, size(band_lims), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(press_ref, size(press_ref), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(temp_ref, size(temp_ref), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(kminor_lower, size(kminor_lower), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(kminor_upper, size(kminor_upper), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(scaling_gas_lower, size(scaling_gas_lower), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(scaling_gas_upper, size(scaling_gas_upper), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(vmr_ref, size(vmr_ref), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(kmajor, size(kmajor), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(temp_ref_p, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(temp_ref_t, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(press_ref_trop, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(totplnk, size(totplnk), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(planck_frac, size(planck_frac), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +!#else +! call MPI_BCAST(band_lims, size(band_lims), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(press_ref, size(press_ref), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(temp_ref, size(temp_ref), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(kminor_lower, size(kminor_lower), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(kminor_upper, size(kminor_upper), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(scaling_gas_lower, size(scaling_gas_lower), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(scaling_gas_upper, size(scaling_gas_upper), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(vmr_ref, size(vmr_ref), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(kmajor, size(kmajor), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(temp_ref_p, 1, MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(temp_ref_t, 1, MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(press_ref_trop, 1, MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(totplnk, size(totplnk), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(planck_frac, size(planck_frac), MPI_REAL, mpiroot, mpicomm, ierr) +!#endif +! ! Character arrays +! do ij=1,nabsorbers +! call MPI_BCAST(gas_names(ij), len(gas_names(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) +! enddo +! do ij=1,nminorabsorbers +! call MPI_BCAST(gas_minor(ij), len(gas_minor(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) +! call MPI_BCAST(identifier_minor(ij), len(identifier_minor(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) +! enddo +! do ij=1,nminor_absorber_intervals_lower +! call MPI_BCAST(minor_gases_lower(ij), len(minor_gases_lower(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) +! enddo +! do ij=1,nminor_absorber_intervals_upper +! call MPI_BCAST(minor_gases_upper(ij), len(minor_gases_upper(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) +! enddo +! ! Logical arrays +! ! +! call MPI_BCAST(minor_scales_with_density_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(scale_by_complement_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(minor_scales_with_density_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(scale_by_complement_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, ierr) +! call MPI_BARRIER(mpicomm, ierr) +!#endif ! Initialize gas concentrations and gas optics class with data do iGas=1,rrtmgp_nGases diff --git a/physics/rrtmgp_sw_gas_optics.F90 b/physics/rrtmgp_sw_gas_optics.F90 index c8f43d139..fc6e804cb 100644 --- a/physics/rrtmgp_sw_gas_optics.F90 +++ b/physics/rrtmgp_sw_gas_optics.F90 @@ -116,7 +116,7 @@ subroutine rrtmgp_sw_gas_optics_init(rrtmgp_root_dir, rrtmgp_sw_file_gas, rrtmgp sw_gas_props_file = trim(rrtmgp_root_dir)//trim(rrtmgp_sw_file_gas) ! Read dimensions for k-distribution fields (only on master processor(0)) - if (mpirank .eq. mpiroot) then +! if (mpirank .eq. mpiroot) then if(nf90_open(trim(sw_gas_props_file), NF90_WRITE, ncid_sw) .eq. NF90_NOERR) then status = nf90_inq_dimid(ncid_sw, 'temperature', dimid) status = nf90_inquire_dimension(ncid_sw, dimid, len=ntemps_sw) @@ -148,27 +148,27 @@ subroutine rrtmgp_sw_gas_optics_init(rrtmgp_root_dir, rrtmgp_sw_file_gas, rrtmgp status = nf90_inquire_dimension(ncid_sw, dimid, len=nminor_absorber_intervals_upper_sw) status = nf90_close(ncid_sw) endif - endif +! endif ! Broadcast dimensions to all processors -#ifdef MPI - call MPI_BARRIER(mpicomm, ierr) - call MPI_BCAST(ntemps_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(npress_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nabsorbers_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nminorabsorbers_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nextrabsorbers_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nmixingfracs_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nlayers_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nbnds_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(ngpts_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(npairs_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(ncontributors_lower_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(ncontributors_upper_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nminor_absorber_intervals_lower_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nminor_absorber_intervals_upper_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BARRIER(mpicomm, ierr) -#endif +!#ifdef MPI +! call MPI_BARRIER(mpicomm, ierr) +! call MPI_BCAST(ntemps_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(npress_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(nabsorbers_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(nminorabsorbers_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(nextrabsorbers_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(nmixingfracs_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(nlayers_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(nbnds_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(ngpts_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(npairs_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(ncontributors_lower_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(ncontributors_upper_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(nminor_absorber_intervals_lower_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(nminor_absorber_intervals_upper_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BARRIER(mpicomm, ierr) +!#endif ! Allocate space for arrays allocate(gas_names_sw(nabsorbers_sw)) @@ -204,7 +204,7 @@ subroutine rrtmgp_sw_gas_optics_init(rrtmgp_root_dir, rrtmgp_sw_file_gas, rrtmgp allocate(temp4(nminor_absorber_intervals_upper_sw)) ! On master processor, read in fields, broadcast to all processors - if (mpirank .eq. mpiroot) then +! if (mpirank .eq. mpiroot) then write (*,*) 'Reading RRTMGP shortwave k-distribution data ... ' ! Read in fields from file if(nf90_open(trim(sw_gas_props_file), NF90_WRITE, ncid_sw) .eq. NF90_NOERR) then @@ -310,73 +310,73 @@ subroutine rrtmgp_sw_gas_optics_init(rrtmgp_root_dir, rrtmgp_sw_file_gas, rrtmgp ! Close status = nf90_close(ncid_sw) endif - endif +! endif ! Broadcast arrays to all processors -#ifdef MPI - call MPI_BARRIER(mpicomm, ierr) - if (mpirank==mpiroot) write (*,*) 'Broadcasting RRTMGP shortwave k-distribution data ... ' - call MPI_BCAST(minor_limits_gpt_upper_sw, size(minor_limits_gpt_upper_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(minor_limits_gpt_lower_sw, size(minor_limits_gpt_lower_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(kminor_start_upper_sw, size(kminor_start_upper_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(kminor_start_lower_sw, size(kminor_start_lower_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(key_species_sw, size(key_species_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(band2gpt_sw, size(band2gpt_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) -#ifndef SINGLE_PREC - call MPI_BCAST(band_lims_sw, size(band_lims_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(press_ref_sw, size(press_ref_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(temp_ref_sw, size(temp_ref_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(kminor_lower_sw, size(kminor_lower_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(kminor_upper_sw, size(kminor_upper_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(scaling_gas_lower_sw, size(scaling_gas_lower_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(scaling_gas_upper_sw, size(scaling_gas_upper_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(vmr_ref_sw, size(vmr_ref_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(kmajor_sw, size(kmajor_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(temp_ref_p_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(temp_ref_t_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(press_ref_trop_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(solar_source_sw, size(solar_source_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(rayl_lower_sw, size(rayl_lower_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(rayl_upper_sw, size(rayl_upper_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -#else - call MPI_BCAST(band_lims_sw, size(band_lims_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(press_ref_sw, size(press_ref_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(temp_ref_sw, size(temp_ref_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(kminor_lower_sw, size(kminor_lower_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(kminor_upper_sw, size(kminor_upper_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(scaling_gas_lower_sw, size(scaling_gas_lower_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(scaling_gas_upper_sw, size(scaling_gas_upper_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(vmr_ref_sw, size(vmr_ref_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(kmajor_sw, size(kmajor_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(temp_ref_p_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(temp_ref_t_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(press_ref_trop_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(solar_source_sw, size(solar_source_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(rayl_lower_sw, size(rayl_lower_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(rayl_upper_sw, size(rayl_upper_sw), MPI_REAL, mpiroot, mpicomm, ierr) -#endif - ! Character arrays - do ij=1,nabsorbers_sw - call MPI_BCAST(gas_names_sw(ij), len(gas_names_sw(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) - enddo - do ij=1,nminorabsorbers_sw - call MPI_BCAST(gas_minor_sw(ij), len(gas_minor_sw(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) - call MPI_BCAST(identifier_minor_sw(ij), len(identifier_minor_sw(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) - enddo - do ij=1,nminor_absorber_intervals_lower_sw - call MPI_BCAST(minor_gases_lower_sw(ij), len(minor_gases_lower_sw(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) - enddo - do ij=1,nminor_absorber_intervals_upper_sw - call MPI_BCAST(minor_gases_upper_sw(ij), len(minor_gases_upper_sw(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) - enddo - - ! Logical arrays - call MPI_BCAST(minor_scales_with_density_lower_sw, nminor_absorber_intervals_lower_sw, MPI_LOGICAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(scale_by_complement_lower_sw, nminor_absorber_intervals_lower_sw, MPI_LOGICAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(minor_scales_with_density_upper_sw, nminor_absorber_intervals_upper_sw, MPI_LOGICAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(scale_by_complement_upper_sw, nminor_absorber_intervals_upper_sw, MPI_LOGICAL, mpiroot, mpicomm, ierr) - call MPI_BARRIER(mpicomm, ierr) -#endif +!#ifdef MPI +! call MPI_BARRIER(mpicomm, ierr) +! if (mpirank==mpiroot) write (*,*) 'Broadcasting RRTMGP shortwave k-distribution data ... ' +! call MPI_BCAST(minor_limits_gpt_upper_sw, size(minor_limits_gpt_upper_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(minor_limits_gpt_lower_sw, size(minor_limits_gpt_lower_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(kminor_start_upper_sw, size(kminor_start_upper_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(kminor_start_lower_sw, size(kminor_start_lower_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(key_species_sw, size(key_species_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(band2gpt_sw, size(band2gpt_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) +!#ifndef SINGLE_PREC +! call MPI_BCAST(band_lims_sw, size(band_lims_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(press_ref_sw, size(press_ref_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(temp_ref_sw, size(temp_ref_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(kminor_lower_sw, size(kminor_lower_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(kminor_upper_sw, size(kminor_upper_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(scaling_gas_lower_sw, size(scaling_gas_lower_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(scaling_gas_upper_sw, size(scaling_gas_upper_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(vmr_ref_sw, size(vmr_ref_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(kmajor_sw, size(kmajor_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(temp_ref_p_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(temp_ref_t_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(press_ref_trop_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(solar_source_sw, size(solar_source_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(rayl_lower_sw, size(rayl_lower_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(rayl_upper_sw, size(rayl_upper_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +!#else +! call MPI_BCAST(band_lims_sw, size(band_lims_sw), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(press_ref_sw, size(press_ref_sw), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(temp_ref_sw, size(temp_ref_sw), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(kminor_lower_sw, size(kminor_lower_sw), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(kminor_upper_sw, size(kminor_upper_sw), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(scaling_gas_lower_sw, size(scaling_gas_lower_sw), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(scaling_gas_upper_sw, size(scaling_gas_upper_sw), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(vmr_ref_sw, size(vmr_ref_sw), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(kmajor_sw, size(kmajor_sw), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(temp_ref_p_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(temp_ref_t_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(press_ref_trop_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(solar_source_sw, size(solar_source_sw), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(rayl_lower_sw, size(rayl_lower_sw), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(rayl_upper_sw, size(rayl_upper_sw), MPI_REAL, mpiroot, mpicomm, ierr) +!#endif +! ! Character arrays +! do ij=1,nabsorbers_sw +! call MPI_BCAST(gas_names_sw(ij), len(gas_names_sw(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) +! enddo +! do ij=1,nminorabsorbers_sw +! call MPI_BCAST(gas_minor_sw(ij), len(gas_minor_sw(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) +! call MPI_BCAST(identifier_minor_sw(ij), len(identifier_minor_sw(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) +! enddo +! do ij=1,nminor_absorber_intervals_lower_sw +! call MPI_BCAST(minor_gases_lower_sw(ij), len(minor_gases_lower_sw(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) +! enddo +! do ij=1,nminor_absorber_intervals_upper_sw +! call MPI_BCAST(minor_gases_upper_sw(ij), len(minor_gases_upper_sw(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) +! enddo +! +! ! Logical arrays +! call MPI_BCAST(minor_scales_with_density_lower_sw, nminor_absorber_intervals_lower_sw, MPI_LOGICAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(scale_by_complement_lower_sw, nminor_absorber_intervals_lower_sw, MPI_LOGICAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(minor_scales_with_density_upper_sw, nminor_absorber_intervals_upper_sw, MPI_LOGICAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(scale_by_complement_upper_sw, nminor_absorber_intervals_upper_sw, MPI_LOGICAL, mpiroot, mpicomm, ierr) +! call MPI_BARRIER(mpicomm, ierr) +!#endif ! Initialize gas concentrations and gas optics class with data do iGas=1,rrtmgp_nGases From e105f48a986fdca2cc6b55e57d3c0dda4ae8bfbc Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Mon, 16 Dec 2019 13:50:35 -0700 Subject: [PATCH 100/167] Revert "Delta-scale SW before incrementing aerosol optics." This reverts commit 122a750b58724330e244bb9814f0f66a7b22502d. --- physics/rrtmgp_sw_rte.F90 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/physics/rrtmgp_sw_rte.F90 b/physics/rrtmgp_sw_rte.F90 index c8cf4e0e8..5adf04bee 100644 --- a/physics/rrtmgp_sw_rte.F90 +++ b/physics/rrtmgp_sw_rte.F90 @@ -165,10 +165,10 @@ subroutine rrtmgp_sw_rte_run(doSWrad, nCol, nLev, nDay, idxday, coszen, p_lay, t sfc_alb_dif = 0.5_kind_phys*(sfc_alb_nir_dif(:,idxday(1:nday)) + sfc_alb_uvvis_dif(:,idxday(1:nday))) ! Compute clear-sky fluxes (if requested) - ! Delta-scale optical properties - call check_error_msg('rrtmgp_sw_rte_run',sw_optical_props_clrsky%delta_scale()) ! Clear-sky fluxes (gas+aerosol) call check_error_msg('rrtmgp_sw_rte_run',sw_optical_props_aerosol%increment(sw_optical_props_clrsky)) + ! Delta-scale optical properties + call check_error_msg('rrtmgp_sw_rte_run',sw_optical_props_clrsky%delta_scale()) if (l_ClrSky_HR) then call check_error_msg('rrtmgp_sw_rte_run',rte_sw( & sw_optical_props_clrsky, & ! IN - optical-properties From 1526e7dcb457d05adc789c2f7a7c3a135f853d9f Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Mon, 16 Dec 2019 14:10:54 -0700 Subject: [PATCH 101/167] Treat surface albedo exactly as in RRTMG. For SW bands 1-9, use nIR; For band 10, use average of nIR and uvVIS; For bands 11-24, use uvVIS. --- physics/rrtmgp_sw_rte.F90 | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/physics/rrtmgp_sw_rte.F90 b/physics/rrtmgp_sw_rte.F90 index 5adf04bee..30ecb309e 100644 --- a/physics/rrtmgp_sw_rte.F90 +++ b/physics/rrtmgp_sw_rte.F90 @@ -106,7 +106,7 @@ subroutine rrtmgp_sw_rte_run(doSWrad, nCol, nLev, nDay, idxday, coszen, p_lay, t fluxSW_up_allsky, fluxSW_up_clrsky, fluxSW_dn_allsky, fluxSW_dn_clrsky, fluxSW_dn_dir_allsky real(kind_phys), dimension(ncol,NLev) :: vmrTemp logical :: l_ClrSky_HR=.false., l_AllSky_HR_byband=.false., l_scmpsw=.false., top_at_1 - integer :: iGas,iSFC,iTOA + integer :: iGas,iSFC,iTOA,iBand type(ty_optical_props_2str) :: & sw_optical_props_clouds_daylit, & ! RRTMGP DDT: longwave cloud radiative properties sw_optical_props_clrsky_daylit, & ! RRTMGP DDT: longwave clear-sky radiative properties @@ -160,9 +160,21 @@ subroutine rrtmgp_sw_rte_run(doSWrad, nCol, nLev, nDay, idxday, coszen, p_lay, t flux_clrsky%bnd_flux_up => fluxSW_up_clrsky flux_clrsky%bnd_flux_dn => fluxSW_dn_clrsky - ! In RRTMG, the near-IR and uv-visible surface albedos are averaged. - sfc_alb_dir = 0.5_kind_phys*(sfc_alb_nir_dir(:,idxday(1:nday)) + sfc_alb_uvvis_dir(:,idxday(1:nday))) - sfc_alb_dif = 0.5_kind_phys*(sfc_alb_nir_dif(:,idxday(1:nday)) + sfc_alb_uvvis_dif(:,idxday(1:nday))) + ! *Note* Legacy RRTMG code. May need to revisit + do iBand=1,sw_gas_props%get_nband() + if (iBand .lt. 10) then + sfc_alb_dir(iBand,:) = sfc_alb_nir_dir(iBand,idxday(1:nday)) + sfc_alb_dif(iBand,:) = sfc_alb_nir_dif(iBand,idxday(1:nday)) + endif + if (iBand .eq. 10) then + sfc_alb_dir(iBand,:) = 0.5_kind_phys*(sfc_alb_nir_dir(iBand,idxday(1:nday)) + sfc_alb_uvvis_dir(iBand,idxday(1:nday))) + sfc_alb_dif(iBand,:) = 0.5_kind_phys*(sfc_alb_nir_dif(iBand,idxday(1:nday)) + sfc_alb_uvvis_dif(iBand,idxday(1:nday))) + endif + if (iBand .gt. 10) then + sfc_alb_dir(iBand,:) = sfc_alb_uvvis_dir(iBand,idxday(1:nday)) + sfc_alb_dif(iBand,:) = sfc_alb_uvvis_dif(iBand,idxday(1:nday)) + endif + enddo ! Compute clear-sky fluxes (if requested) ! Clear-sky fluxes (gas+aerosol) From e30305d8b7d87d4193c3a7049e4709aa5f97b744 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Mon, 16 Dec 2019 15:53:19 -0700 Subject: [PATCH 102/167] Fixed error in .meta file. --- physics/rrtmgp_lw_cloud_sampling.meta | 2 +- physics/rrtmgp_sw_cloud_sampling.meta | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/physics/rrtmgp_lw_cloud_sampling.meta b/physics/rrtmgp_lw_cloud_sampling.meta index 299a0fd09..547c6177c 100644 --- a/physics/rrtmgp_lw_cloud_sampling.meta +++ b/physics/rrtmgp_lw_cloud_sampling.meta @@ -55,7 +55,7 @@ intent = in optional = F [icseed_lw] - standard_name = seed_random_numbers_lw_for_RRTMGP + standard_name = seed_random_numbers_lw long_name = seed for random number generation for longwave radiation units = none dimensions = (horizontal_dimension) diff --git a/physics/rrtmgp_sw_cloud_sampling.meta b/physics/rrtmgp_sw_cloud_sampling.meta index 1243743a9..3ad9073d5 100644 --- a/physics/rrtmgp_sw_cloud_sampling.meta +++ b/physics/rrtmgp_sw_cloud_sampling.meta @@ -71,7 +71,7 @@ intent = in optional = F [icseed_sw] - standard_name = seed_random_numbers_sw_for_RRTMGP + standard_name = seed_random_numbers_sw long_name = seed for random number generation for shortwave radiation units = none dimensions = (horizontal_dimension) From 5b02c9eb3fd929be59e1ca65451e1a1a74292dda Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Tue, 17 Dec 2019 10:18:24 -0700 Subject: [PATCH 103/167] Round cloud-fractions to avoid McICA sampling error. --- physics/rrtmgp_lw_cloud_sampling.F90 | 8 ++++++-- physics/rrtmgp_sw_cloud_sampling.F90 | 7 ++++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/physics/rrtmgp_lw_cloud_sampling.F90 b/physics/rrtmgp_lw_cloud_sampling.F90 index 6bdf6b4ae..2172bb374 100644 --- a/physics/rrtmgp_lw_cloud_sampling.F90 +++ b/physics/rrtmgp_lw_cloud_sampling.F90 @@ -72,6 +72,7 @@ subroutine rrtmgp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, icseed_lw, real(kind_phys), dimension(lw_gas_props%get_ngpt(),nLev,ncol) :: rng3D real(kind_phys), dimension(lw_gas_props%get_ngpt()*nLev) :: rng1D logical, dimension(ncol,nLev,lw_gas_props%get_ngpt()) :: cldfracMCICA + real(kind_phys), dimension(ncol,nLev) :: cld_frac_noSamp ! Initialize CCPP error handling variables errmsg = '' @@ -102,12 +103,15 @@ subroutine rrtmgp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, icseed_lw, call random_number(rng1D,rng_stat) rng3D(:,:,iCol) = reshape(source = rng1D,shape=[lw_gas_props%get_ngpt(),nLev]) enddo - + + ! Test: Remove McICA sampling error by setting cloud-fraction to one. + cld_frac_noSamp = ceiling(cld_frac) + ! Call McICA select case ( iovrlw ) ! Maximumn-random case(1) - call check_error_msg('rrtmgp_lw_cloud_sampling_run',sampled_mask_max_ran(rng3D,cld_frac,cldfracMCICA)) + call check_error_msg('rrtmgp_lw_cloud_sampling_run',sampled_mask_max_ran(rng3D,cld_frac_noSamp,cldfracMCICA)) end select ! Map band optical depth to each g-point using McICA diff --git a/physics/rrtmgp_sw_cloud_sampling.F90 b/physics/rrtmgp_sw_cloud_sampling.F90 index b290594ea..60f46d0db 100644 --- a/physics/rrtmgp_sw_cloud_sampling.F90 +++ b/physics/rrtmgp_sw_cloud_sampling.F90 @@ -76,6 +76,7 @@ subroutine rrtmgp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw0, idxd real(kind_phys), dimension(sw_gas_props%get_ngpt(),nLev,ncol) :: rng3D real(kind_phys), dimension(sw_gas_props%get_ngpt()*nLev) :: rng1D logical, dimension(ncol,nLev,sw_gas_props%get_ngpt()) :: cldfracMCICA + real(kind_phys), dimension(ncol,nLev) :: cld_frac_noSamp ! Initialize CCPP error handling variables errmsg = '' @@ -108,11 +109,15 @@ subroutine rrtmgp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw0, idxd rng3D(:,:,iCol) = reshape(source = rng1D,shape=[sw_gas_props%get_ngpt(),nLev]) enddo + + ! Test: Remove McICA sampling error by setting cloud-fraction to one. + cld_frac_noSamp = ceiling(cld_frac) + ! Call McICA select case ( iovrsw ) ! Maximumn-random case(1) - call check_error_msg('rrtmgp_sw_cloud_sampling_run',sampled_mask_max_ran(rng3D,cld_frac,cldfracMCICA)) + call check_error_msg('rrtmgp_sw_cloud_sampling_run',sampled_mask_max_ran(rng3D,cld_frac_noSamp,cldfracMCICA)) end select ! Map band optical depth to each g-point using McICA From 4d3515dcda2f0b16c0ef7528e6760fa29bbbb343 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Tue, 17 Dec 2019 11:08:09 -0700 Subject: [PATCH 104/167] Round cloud-fractions to avoid McICA sampling error. In RRTMG as well. --- physics/radlw_main.f | 2 ++ physics/radsw_main.f | 2 ++ 2 files changed, 4 insertions(+) diff --git a/physics/radlw_main.f b/physics/radlw_main.f index 7b029f8b0..b13016a41 100644 --- a/physics/radlw_main.f +++ b/physics/radlw_main.f @@ -1022,6 +1022,8 @@ subroutine rrtmg_lw_run & & cldfmc, taucld & & ) + cldfmc = ceiling(cldfmc) + ! --- ... save computed layer cloud optical depth for output ! rrtm band-7 is apprx 10mu channel (or use spectral mean of bands 6-8) diff --git a/physics/radsw_main.f b/physics/radsw_main.f index b10541fb7..c12a34171 100644 --- a/physics/radsw_main.f +++ b/physics/radsw_main.f @@ -1084,6 +1084,8 @@ subroutine rrtmg_sw_run & ! --- outputs: & taucw, ssacw, asycw, cldfrc, cldfmc & & ) + + cldfmc = ceiling(cldfmc) ! --- ... save computed layer cloud optical depth for output ! rrtm band 10 is approx to the 0.55 mu spectrum From b2d42f39cd3a6e5564219ca68be7604c2ad81f46 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Thu, 19 Dec 2019 14:20:35 -0700 Subject: [PATCH 105/167] Fix rounding error in G cloud-sampling test. Add diagnostics for cloud microphysics --- physics/GFS_rrtmg_pre.F90 | 54 ++++++++++++++++++++++++++++++++++++ physics/GFS_rrtmgp_pre.F90 | 57 +++++++++++++++++++++++++++++++++++++- physics/radlw_main.f | 3 +- physics/radsw_main.f | 3 +- 4 files changed, 112 insertions(+), 5 deletions(-) diff --git a/physics/GFS_rrtmg_pre.F90 b/physics/GFS_rrtmg_pre.F90 index 6098abefb..e33d4c4b2 100644 --- a/physics/GFS_rrtmg_pre.F90 +++ b/physics/GFS_rrtmg_pre.F90 @@ -10,6 +10,7 @@ module GFS_rrtmg_pre !! \section arg_table_GFS_rrtmg_pre_init Argument Table !! subroutine GFS_rrtmg_pre_init () + open(77,file='dump.rrtmg.cloudprops.txt',status='unknown') end subroutine GFS_rrtmg_pre_init !> \section arg_table_GFS_rrtmg_pre_run Argument Table @@ -820,6 +821,58 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input enddo enddo + write(77,*) "####################" + write(77,*) im,Model%levs + do i=1,im + write(77,*) i, grid%xlon(i), grid%xlat(i) + ! + write(77,*) "p_lay" + write(77,*) plyr(i,:) + ! + write(77,*) "t_lay" + write(77,*) tlyr(i,:) + ! + write(77,*) "tv_lay" + write(77,*) tvly(i,:) + ! + write(77,*) "relhum" + write(77,*) rhly(i,:) + ! + write(77,*) "qs_lay" + write(77,*) qstl(i,:) + ! + write(77,*) "q_lay" + write(77,*) qlyr(i,:) + ! + write(77,*) "cld_frac" + write(77,*) clouds1(i,:) + ! + write(77,*) "cld_lwp" + write(77,*) clouds2(i,:) + ! + write(77,*) "cld_reliq" + write(77,*) clouds3(i,:) + ! + write(77,*) "cld_iwp" + write(77,*) clouds4(i,:) + ! + write(77,*) "cld_reice" + write(77,*) clouds5(i,:) + ! + write(77,*) "cld_rwp" + write(77,*) clouds6(i,:) + ! + write(77,*) "cld_rerain" + write(77,*) clouds7(i,:) + ! + write(77,*) "cld_swp" + write(77,*) clouds8(i,:) + ! + write(77,*) "cld_resnow" + write(77,*) clouds9(i,:) + enddo + + ! mg, sfc-perts ! --- scale random patterns for surface perturbations with @@ -840,6 +893,7 @@ end subroutine GFS_rrtmg_pre_run !> \section arg_table_GFS_rrtmg_pre_finalize Argument Table !! subroutine GFS_rrtmg_pre_finalize () + close(77) end subroutine GFS_rrtmg_pre_finalize !! @} diff --git a/physics/GFS_rrtmgp_pre.F90 b/physics/GFS_rrtmgp_pre.F90 index efc4312ae..52f46102a 100644 --- a/physics/GFS_rrtmgp_pre.F90 +++ b/physics/GFS_rrtmgp_pre.F90 @@ -112,6 +112,9 @@ subroutine GFS_rrtmgp_pre_init(Model, Radtend, active_gases_array, errmsg, errfl active_gases_array(ij) = Model%active_gases(gasIndices(ij,1):gasIndices(ij,2)) enddo endif + + open(77,file='dump.rrtmgp.cloudprops.txt',status='unknown') + end subroutine GFS_rrtmgp_pre_init ! ######################################################################################### @@ -322,7 +325,58 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, cld_rwp = clouds(:,:,6) cld_rerain = clouds(:,:,7) cld_swp = clouds(:,:,8) - cld_resnow = clouds(:,:,9) + cld_resnow = clouds(:,:,9) + + write(77,*) "####################" + write(77,*) ncol,Model%levs + do iCol=1,NCOL + write(77,*) iCol, grid%xlon(iCol), grid%xlat(iCol) + ! + write(77,*) "p_lay" + write(77,*) p_lay(iCol,:)/100. + ! + write(77,*) "t_lay" + write(77,*) t_lay(iCol,:) + ! + write(77,*) "tv_lay" + write(77,*) tv_lay(iCol,:) + ! + write(77,*) "relhum" + write(77,*) relhum(iCol,:) + ! + write(77,*) "qs_lay" + write(77,*) qs_lay(iCol,:) + ! + write(77,*) "q_lay" + write(77,*) q_lay(iCol,:) + ! + write(77,*) "cld_frac" + write(77,*) cld_frac(iCol,:) + ! + write(77,*) "cld_lwp" + write(77,*) cld_lwp(iCol,:) + ! + write(77,*) "cld_reliq" + write(77,*) cld_reliq(iCol,:) + ! + write(77,*) "cld_iwp" + write(77,*) cld_iwp(iCol,:) + ! + write(77,*) "cld_reice" + write(77,*) cld_reice(iCol,:) + ! + write(77,*) "cld_rwp" + write(77,*) cld_rwp(iCol,:) + ! + write(77,*) "cld_rerain" + write(77,*) cld_rerain(iCol,:) + ! + write(77,*) "cld_swp" + write(77,*) cld_swp(iCol,:) + ! + write(77,*) "cld_resnow" + write(77,*) cld_resnow(iCol,:) + enddo end subroutine GFS_rrtmgp_pre_run @@ -330,6 +384,7 @@ end subroutine GFS_rrtmgp_pre_run ! SUBROUTINE GFS_rrtmgp_pre_finalize ! ######################################################################################### subroutine GFS_rrtmgp_pre_finalize () + close(77) end subroutine GFS_rrtmgp_pre_finalize ! ######################################################################################### diff --git a/physics/radlw_main.f b/physics/radlw_main.f index b13016a41..5d4e1b959 100644 --- a/physics/radlw_main.f +++ b/physics/radlw_main.f @@ -1014,6 +1014,7 @@ subroutine rrtmg_lw_run & if ( lcf1 ) then + cldfrc = ceiling(cldfrc) call cldprop & ! --- inputs: & ( cldfrc,clwp,relw,ciwp,reiw,cda1,cda2,cda3,cda4, & @@ -1022,8 +1023,6 @@ subroutine rrtmg_lw_run & & cldfmc, taucld & & ) - cldfmc = ceiling(cldfmc) - ! --- ... save computed layer cloud optical depth for output ! rrtm band-7 is apprx 10mu channel (or use spectral mean of bands 6-8) diff --git a/physics/radsw_main.f b/physics/radsw_main.f index c12a34171..710904f5a 100644 --- a/physics/radsw_main.f +++ b/physics/radsw_main.f @@ -1077,6 +1077,7 @@ subroutine rrtmg_sw_run & if (zcf1 > f_zero) then ! cloudy sky column + cfrac = ceiling(cfrac) call cldprop & ! --- inputs: & ( cfrac,cliqp,reliq,cicep,reice,cdat1,cdat2,cdat3,cdat4, & @@ -1085,8 +1086,6 @@ subroutine rrtmg_sw_run & & taucw, ssacw, asycw, cldfrc, cldfmc & & ) - cldfmc = ceiling(cldfmc) - ! --- ... save computed layer cloud optical depth for output ! rrtm band 10 is approx to the 0.55 mu spectrum From 28bea10e6c892d020c19604973de5203d9658fb4 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Thu, 19 Dec 2019 16:00:00 -0700 Subject: [PATCH 106/167] Removed diagnostic cloud outputs. --- physics/GFS_rrtmg_pre.F90 | 92 +---------------------------- physics/GFS_rrtmgp_pre.F90 | 118 ++++++++++--------------------------- 2 files changed, 31 insertions(+), 179 deletions(-) diff --git a/physics/GFS_rrtmg_pre.F90 b/physics/GFS_rrtmg_pre.F90 index e33d4c4b2..49b7acb69 100644 --- a/physics/GFS_rrtmg_pre.F90 +++ b/physics/GFS_rrtmg_pre.F90 @@ -10,7 +10,6 @@ module GFS_rrtmg_pre !! \section arg_table_GFS_rrtmg_pre_init Argument Table !! subroutine GFS_rrtmg_pre_init () - open(77,file='dump.rrtmg.cloudprops.txt',status='unknown') end subroutine GFS_rrtmg_pre_init !> \section arg_table_GFS_rrtmg_pre_run Argument Table @@ -691,47 +690,12 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input effrs(i,lyb) = effrs(i,lya) enddo endif - endif + endif if (Model%imp_physics == 99) then ccnd(1:IM,1:LMK,1) = ccnd(1:IM,1:LMK,1) + cnvw(1:IM,1:LMK) endif - if (Model%imp_physics == 10) then - ccnd(1:IM,1:LMK,1) = ccnd(1:IM,1:LMK,1) + cnvw(1:IM,1:LMK) + ccnd(1:IM,1:LMK,2) - endif - - if (Model%uni_cld) then - if (Model%effr_in) then - do k=1,lm - k1 = k + kd - do i=1,im - cldcov(i,k1) = Tbd%phy_f3d(i,k,Model%indcld) - effrl(i,k1) = Tbd%phy_f3d(i,k,2) - effri(i,k1) = Tbd%phy_f3d(i,k,3) - effrr(i,k1) = Tbd%phy_f3d(i,k,4) - effrs(i,k1) = Tbd%phy_f3d(i,k,5) - enddo - enddo - else - do k=1,lm - k1 = k + kd - do i=1,im - cldcov(i,k1) = Tbd%phy_f3d(i,k,Model%indcld) - if (tracer1(i,k,ntcw) .gt. 0 .or. tracer1(i,k,ntiw) .gt. 0) then - cldcov(i,k1) = 0.1 - else - cldcov(i,k1) = 0.0 - endif - enddo - enddo - endif - elseif (Model%imp_physics == Model%imp_physics_gfdl) then ! GFDL MP - cldcov(1:IM,1+kd:LM+kd) = tracer1(1:IM,1:LM,Model%ntclamt) - else ! neither of the other two cases - cldcov = 0.0 - endif - if (Model%imp_physics == 99 .or. Model%imp_physics == 10) then ! zhao/moorthi's prognostic cloud scheme ! or unified cloud and/or with MG microphysics @@ -821,59 +785,6 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input enddo enddo - write(77,*) "####################" - write(77,*) im,Model%levs - do i=1,im - write(77,*) i, grid%xlon(i), grid%xlat(i) - ! - write(77,*) "p_lay" - write(77,*) plyr(i,:) - ! - write(77,*) "t_lay" - write(77,*) tlyr(i,:) - ! - write(77,*) "tv_lay" - write(77,*) tvly(i,:) - ! - write(77,*) "relhum" - write(77,*) rhly(i,:) - ! - write(77,*) "qs_lay" - write(77,*) qstl(i,:) - ! - write(77,*) "q_lay" - write(77,*) qlyr(i,:) - ! - write(77,*) "cld_frac" - write(77,*) clouds1(i,:) - ! - write(77,*) "cld_lwp" - write(77,*) clouds2(i,:) - ! - write(77,*) "cld_reliq" - write(77,*) clouds3(i,:) - ! - write(77,*) "cld_iwp" - write(77,*) clouds4(i,:) - ! - write(77,*) "cld_reice" - write(77,*) clouds5(i,:) - ! - write(77,*) "cld_rwp" - write(77,*) clouds6(i,:) - ! - write(77,*) "cld_rerain" - write(77,*) clouds7(i,:) - ! - write(77,*) "cld_swp" - write(77,*) clouds8(i,:) - ! - write(77,*) "cld_resnow" - write(77,*) clouds9(i,:) - enddo - - - ! mg, sfc-perts ! --- scale random patterns for surface perturbations with ! perturbation size @@ -893,7 +804,6 @@ end subroutine GFS_rrtmg_pre_run !> \section arg_table_GFS_rrtmg_pre_finalize Argument Table !! subroutine GFS_rrtmg_pre_finalize () - close(77) end subroutine GFS_rrtmg_pre_finalize !! @} diff --git a/physics/GFS_rrtmgp_pre.F90 b/physics/GFS_rrtmgp_pre.F90 index 52f46102a..a15158b86 100644 --- a/physics/GFS_rrtmgp_pre.F90 +++ b/physics/GFS_rrtmgp_pre.F90 @@ -113,8 +113,6 @@ subroutine GFS_rrtmgp_pre_init(Model, Radtend, active_gases_array, errmsg, errfl enddo endif - open(77,file='dump.rrtmgp.cloudprops.txt',status='unknown') - end subroutine GFS_rrtmgp_pre_init ! ######################################################################################### @@ -327,64 +325,12 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, cld_swp = clouds(:,:,8) cld_resnow = clouds(:,:,9) - write(77,*) "####################" - write(77,*) ncol,Model%levs - do iCol=1,NCOL - write(77,*) iCol, grid%xlon(iCol), grid%xlat(iCol) - ! - write(77,*) "p_lay" - write(77,*) p_lay(iCol,:)/100. - ! - write(77,*) "t_lay" - write(77,*) t_lay(iCol,:) - ! - write(77,*) "tv_lay" - write(77,*) tv_lay(iCol,:) - ! - write(77,*) "relhum" - write(77,*) relhum(iCol,:) - ! - write(77,*) "qs_lay" - write(77,*) qs_lay(iCol,:) - ! - write(77,*) "q_lay" - write(77,*) q_lay(iCol,:) - ! - write(77,*) "cld_frac" - write(77,*) cld_frac(iCol,:) - ! - write(77,*) "cld_lwp" - write(77,*) cld_lwp(iCol,:) - ! - write(77,*) "cld_reliq" - write(77,*) cld_reliq(iCol,:) - ! - write(77,*) "cld_iwp" - write(77,*) cld_iwp(iCol,:) - ! - write(77,*) "cld_reice" - write(77,*) cld_reice(iCol,:) - ! - write(77,*) "cld_rwp" - write(77,*) cld_rwp(iCol,:) - ! - write(77,*) "cld_rerain" - write(77,*) cld_rerain(iCol,:) - ! - write(77,*) "cld_swp" - write(77,*) cld_swp(iCol,:) - ! - write(77,*) "cld_resnow" - write(77,*) cld_resnow(iCol,:) - enddo - end subroutine GFS_rrtmgp_pre_run ! ######################################################################################### ! SUBROUTINE GFS_rrtmgp_pre_finalize ! ######################################################################################### subroutine GFS_rrtmgp_pre_finalize () - close(77) end subroutine GFS_rrtmgp_pre_finalize ! ######################################################################################### @@ -482,14 +428,41 @@ subroutine cloud_microphysics(Model, Tbd, Grid, Sfcprop, ncol, tracer, p_lay, t_ enddo endif + if (Model%uni_cld) then + if (Model%effr_in) then + cldcov(:,:) = Tbd%phy_f3d(:,:,Model%indcld) + effr_l(:,:) = Tbd%phy_f3d(:,:,2) + effr_i(:,:) = Tbd%phy_f3d(:,:,3) + effr_r(:,:) = Tbd%phy_f3d(:,:,4) + effr_s(:,:) = Tbd%phy_f3d(:,:,5) + else + do k=1,model%levs + do i=1,ncol + cldcov(i,k) = Tbd%phy_f3d(i,k,Model%indcld) + enddo + enddo + endif + elseif (Model%imp_physics == Model%imp_physics_gfdl) then ! GFDL MP + cldcov(1:NCOL,1:Model%levs) = tracer(1:NCOL,1:Model%levs,Model%ntclamt) + if (Model%effr_in) then + effr_l(:,:) = Tbd%phy_f3d(:,:,1) + effr_i(:,:) = Tbd%phy_f3d(:,:,2) + effr_r(:,:) = Tbd%phy_f3d(:,:,3) + effr_s(:,:) = Tbd%phy_f3d(:,:,4) + endif + else ! neither of the other two cases + cldcov = 0.0 + endif + + ! Add suspended convective cloud water to grid-scale cloud water ! only for cloud fraction & radiation computation it is to enhance ! cloudiness due to suspended convec cloud water for zhao/moorthi's ! (imp_phys=99) & ferrier's (imp_phys=5) microphysics schemes if ((Model%num_p3d == 4) .and. (Model%npdf3d == 3)) then ! same as Model%imp_physics = 99 - delta_q(1:ncol,1:Model%levs) = Tbd%phy_f3d(1:ncol,1:Model%levs,5) - cnv_w (1:ncol,1:Model%levs) = Tbd%phy_f3d(1:ncol,1:Model%levs,6) - cnv_c (1:ncol,1:Model%levs) = Tbd%phy_f3d(1:ncol,1:Model%levs,7) + delta_q(1:ncol,1:Model%levs) = Tbd%phy_f3d(1:ncol,Model%levs:1:-1,5) + cnv_w (1:ncol,1:Model%levs) = Tbd%phy_f3d(1:ncol,Model%levs:1:-1,6) + cnv_c (1:ncol,1:Model%levs) = Tbd%phy_f3d(1:ncol,Model%levs:1:-1,7) elseif ((Model%npdf3d == 0) .and. (Model%ncnvcld3d == 1)) then ! same as MOdel%imp_physics=98 delta_q(1:ncol,1:Model%levs) = 0.0 cnv_w (1:ncol,1:Model%levs) = Tbd%phy_f3d(1:ncol,1:Model%levs,Model%num_p3d+1) @@ -510,37 +483,6 @@ subroutine cloud_microphysics(Model, Tbd, Grid, Sfcprop, ncol, tracer, p_lay, t_ cld_condensate(1:NCOL,1:Model%levs,1) = cld_condensate(1:NCOL,1:Model%levs,1) + cnv_w(1:NCOL,1:Model%levs) + cld_condensate(1:NCOL,1:Model%levs,2) endif - if (Model%uni_cld) then - if (Model%effr_in) then - cldcov(1:ncol,1:Model%levs) = Tbd%phy_f3d(1:ncol,1:Model%levs,Model%indcld) - effr_l(1:ncol,1:Model%levs) = Tbd%phy_f3d(1:ncol,1:Model%levs,2) - effr_i(1:ncol,1:Model%levs) = Tbd%phy_f3d(1:ncol,1:Model%levs,3) - effr_r(1:ncol,1:Model%levs) = Tbd%phy_f3d(1:ncol,1:Model%levs,4) - effr_s(1:ncol,1:Model%levs) = Tbd%phy_f3d(1:ncol,1:Model%levs,5) - else - do k=1,model%levs - do i=1,ncol - cldcov(i,k) = Tbd%phy_f3d(i,k,Model%indcld) - if (tracer(i,k,model%ntcw) .gt. 0 .or. tracer(i,k,model%ntiw) .gt. 0) then - cldcov(i,k) = 0.1 - else - cldcov(i,k) = 0.0 - endif - enddo - enddo - endif - elseif (Model%imp_physics == Model%imp_physics_gfdl) then ! GFDL MP - cldcov(1:NCOL,1:Model%levs) = tracer(1:NCOL,1:Model%levs,Model%ntclamt) - if (Model%effr_in) then - effr_l(1:ncol,1:Model%levs) = Tbd%phy_f3d(1:ncol,1:Model%levs,1) - effr_i(1:ncol,1:Model%levs) = Tbd%phy_f3d(1:ncol,1:Model%levs,2) - effr_r(1:ncol,1:Model%levs) = Tbd%phy_f3d(1:ncol,1:Model%levs,3) - effr_s(1:ncol,1:Model%levs) = Tbd%phy_f3d(1:ncol,1:Model%levs,4) - endif - else ! neither of the other two cases - cldcov = 0.0 - endif - ! ####################################################################################### ! MICROPHYSICS ! ####################################################################################### From edcb6726a9e223fd55f472f0e3d7649331c266d0 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Tue, 31 Dec 2019 08:47:37 -0700 Subject: [PATCH 107/167] Added diffusivity angle adjustment to LW. --- physics/GFS_rrtmgp_pre.F90 | 47 +++++++++++++++++++++++++++++-- physics/GFS_rrtmgp_pre.meta | 17 +++++++++++ physics/rrtmg_lw_cloud_optics.F90 | 21 +++++++++++++- physics/rrtmgp_lw_rte.F90 | 35 +++++++++++++++++++---- physics/rrtmgp_lw_rte.meta | 9 ++++++ 5 files changed, 120 insertions(+), 9 deletions(-) diff --git a/physics/GFS_rrtmgp_pre.F90 b/physics/GFS_rrtmgp_pre.F90 index a15158b86..4d076706c 100644 --- a/physics/GFS_rrtmgp_pre.F90 +++ b/physics/GFS_rrtmgp_pre.F90 @@ -49,6 +49,8 @@ module GFS_rrtmgp_pre use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp use mo_gas_concentrations, only: ty_gas_concs use rrtmgp_aux, only: check_error_msg!, rrtmgp_minP, rrtmgp_minT + use mo_rrtmgp_constants, only: grav, avogad + use mo_rrtmg_lw_cloud_optics real(kind_phys), parameter :: & amd = 28.9644_kind_phys, & ! Molecular weight of dry-air (g/mol) @@ -122,7 +124,7 @@ end subroutine GFS_rrtmgp_pre_init !! \htmlinclude GFS_rrtmgp_pre.html !! subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, Tbd, & ! IN - ncol, & ! IN + ncol, lw_gas_props, sec_diff_byband, & ! IN raddt, p_lay, t_lay, p_lev, t_lev, tsfg, tsfa, cld_frac, cld_lwp, & ! OUT cld_reliq, cld_iwp, cld_reice, cld_swp, cld_resnow, cld_rwp, cld_rerain, & ! OUT tv_lay, relhum, tracer, cldsa, mtopa, mbota, de_lgth, gas_concentrations, & ! OUT @@ -145,6 +147,8 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, Tbd ! DDT: FV3-GFS data not yet assigned to a defined container integer, intent(in) :: & ncol ! Number of horizontal grid points + type(ty_gas_optics_rrtmgp),intent(in) :: & + lw_gas_props ! RRTMGP DDT: longwave spectral information ! Outputs real(kind_phys), dimension(ncol,Model%levs), intent(out) :: & @@ -186,16 +190,19 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, cldsa ! Fraction of clouds for low, middle, high, total and BL real(kind_phys), dimension(ncol), intent(out) :: & de_lgth ! Decorrelation length + real(kind_phys), dimension(lw_gas_props%get_nband(),ncol),intent(out) :: & + sec_diff_byband ! Local variables integer :: i, j, iCol, iBand, iSFC, iTOA, iLay logical :: top_at_1 - real(kind_phys),dimension(NCOL,Model%levs) :: vmr_o3, vmr_h2o - real(kind_phys) :: es, qs + real(kind_phys),dimension(NCOL,Model%levs) :: vmr_o3, vmr_h2o, coldry, tem0, colamt + real(kind_phys) :: es, qs, tem1, tem2 real(kind_phys), dimension(ncol, NF_ALBD) :: sfcalb real(kind_phys), dimension(ncol, Model%levs) :: qs_lay, q_lay, deltaZ, deltaP, o3_lay real(kind_phys), dimension(ncol, Model%levs, NF_VGAS) :: gas_vmr real(kind_phys), dimension(ncol, Model%levs, NF_CLDS) :: clouds + real(kind_phys), dimension(ncol) :: precipitableH2o ! Initialize CCPP error handling variables errmsg = '' @@ -297,6 +304,40 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations%set_vmr('h2o', vmr_h2o)) call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations%set_vmr('o3', vmr_o3)) + ! ####################################################################################### + ! Compute diffusivity angle adjustments for each longwave band + ! *NOTE* Legacy RRTMGP code + ! ####################################################################################### + ! Conpute diffusivity angle adjustments. + ! First need to compute precipitable water in each column + tem0 = (1._kind_phys - vmr_h2o)*amd + vmr_h2o*amw + coldry = ( 1.0e-20 * 1.0e3 *avogad)*(deltap*.01) / (100.*grav*tem0*(1._kind_phys + vmr_h2o)) + colamt = max(0._kind_phys, coldry*vmr_h2o) + do iCol=1,nCol + tem1 = 0._kind_phys + tem2 = 0._kind_phys + do iLay=1,Model%levs + tem1 = tem1 + coldry(iCol,iLay)+colamt(iCol,iLay) + tem2 = tem2 + colamt(iCol,iLay) + enddo + precipitableH2o(iCol) = p_lev(iCol,iSFC)*0.01*(10._kind_phys*tem2 / (amdw*tem1*grav)) + enddo + + ! Reset diffusivity angle for Bands 2-3 and 5-9 to vary (between 1.50 + ! and 1.80) as a function of total column water vapor. the function + ! has been defined to minimize flux and cooling rate errors in these bands + ! over a wide range of precipitable water values. + do iCol=1,nCol + do iBand = 1, lw_gas_props%get_nband() + if (iBand==1 .or. iBand==4 .or. iBand==10) then + sec_diff_byband(iBand,iCol) = diffusivityB1410 + else + sec_diff_byband(iBand,iCol) = min( diffusivityHigh, max(diffusivityLow, & + a0(iBand)+a1(iBand)*exp(a2(iBand)*precipitableH2o(iCol)))) + endif + enddo + enddo + ! ####################################################################################### ! Radiation time step (output) (Is this really needed?) (Used by some diangostics) ! ####################################################################################### diff --git a/physics/GFS_rrtmgp_pre.meta b/physics/GFS_rrtmgp_pre.meta index 87934aa24..35f455447 100644 --- a/physics/GFS_rrtmgp_pre.meta +++ b/physics/GFS_rrtmgp_pre.meta @@ -112,6 +112,14 @@ type = integer intent = in optional = F +[lw_gas_props] + standard_name = coefficients_for_lw_gas_optics + long_name = DDT containing spectral information for RRTMGP LW radiation scheme + units = DDT + dimensions = () + type = ty_gas_optics_rrtmgp + intent = in + optional = F [raddt] standard_name = time_step_for_radiation long_name = radiation time step @@ -121,6 +129,15 @@ kind = kind_phys intent = out optional = F +[sec_diff_byband] + standard_name = secant_of_diffusivity_angle_each_RRTMGP_LW_band + long_name = secant of diffusivity angle in each RRTMGP LW band + units = none + dimensions = (number_of_lw_bands_rrtmgp,horizontal_dimension) + type = real + kind = kind_phys + intent = out + optional = F [p_lay] standard_name = air_pressure_at_layer_for_RRTMGP_in_hPa long_name = air pressure at vertical layer for radiation calculation diff --git a/physics/rrtmg_lw_cloud_optics.F90 b/physics/rrtmg_lw_cloud_optics.F90 index 217b3fa4d..31551d797 100644 --- a/physics/rrtmg_lw_cloud_optics.F90 +++ b/physics/rrtmg_lw_cloud_optics.F90 @@ -15,7 +15,24 @@ module mo_rrtmg_lw_cloud_optics absrain = 0.33e-3, & ! Rain drop absorption coefficient \f$(m^{2}/g)\f$ . abssnow0 = 1.5, & ! Snow flake absorption coefficient (micron), fu coeff abssnow1 = 2.34e-3 ! Snow flake absorption coefficient \f$(m^{2}/g)\f$, ncar coef - + + ! Reset diffusivity angle for Bands 2-3 and 5-9 to vary (between 1.50 + ! and 1.80) as a function of total column water vapor. the function + ! has been defined to minimize flux and cooling rate errors in these bands + ! over a wide range of precipitable water values. + ! *NOTE* This is done in GFS_rrtmgp_lw_pre.F90:_run() + real (kind_phys), dimension(nbandsLW_RRTMG) :: & + a0 = (/ 1.66, 1.55, 1.58, 1.66, 1.54, 1.454, 1.89, 1.33, & + 1.668, 1.66, 1.66, 1.66, 1.66, 1.66, 1.66, 1.66 /), & + a1 = (/ 0.00, 0.25, 0.22, 0.00, 0.13, 0.446, -0.10, 0.40, & + -0.006, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 /), & + a2 = (/ 0.00, -12.0, -11.7, 0.00, -0.72, -0.243, 0.19, -0.062, & + 0.414, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 /) + real(kind_phys),parameter :: & + diffusivityLow = 1.50, & ! Minimum diffusivity angle for bands 2-3 and 5-9 + diffusivityHigh = 1.80, & ! Maximum diffusivity angle for bands 2-3 and 5-9 + diffusivityB1410 = 1.66 ! Diffusivity for bands 1, 4, and 10 + ! RRTMG LW cloud property coefficients real(kind_phys) , dimension(58,nBandsLW_RRTMG),parameter :: & absliq1 = reshape(source=(/ & @@ -563,6 +580,8 @@ subroutine rrtmg_lw_cloud_optics(ncol, nlay, nBandsLW, cld_lwp, cld_ref_liq, cld real(kind_phys) :: factor,fint,cld_ref_iceTemp,tau_snow, tau_rain real(kind_phys),dimension(nBandsLW) :: tau_liq, tau_ice + tau_cld(:,:,:) = 0._kind_phys + if (ilwcliq .gt. 0) then do ij=1,ncol do ik=1,nlay diff --git a/physics/rrtmgp_lw_rte.F90 b/physics/rrtmgp_lw_rte.F90 index 9a300df4f..6d5b1f6ef 100644 --- a/physics/rrtmgp_lw_rte.F90 +++ b/physics/rrtmgp_lw_rte.F90 @@ -28,8 +28,8 @@ end subroutine rrtmgp_lw_rte_init !! subroutine rrtmgp_lw_rte_run(doLWrad, nCol, nLev, p_lay, t_lay, p_lev, skt, lw_gas_props, & sfc_emiss_byband, sources, lw_optical_props_clrsky, lw_optical_props_clouds, & - lw_optical_props_aerosol, fluxlwUP_allsky, fluxlwDOWN_allsky, fluxlwUP_clrsky, & - fluxlwDOWN_clrsky, hlw0, hlwb, errmsg, errflg) + lw_optical_props_aerosol, secdiff, fluxlwUP_allsky, fluxlwDOWN_allsky, & + fluxlwUP_clrsky, fluxlwDOWN_clrsky, hlw0, hlwb, errmsg, errflg) ! Inputs logical, intent(in) :: & @@ -55,7 +55,8 @@ subroutine rrtmgp_lw_rte_run(doLWrad, nCol, nLev, p_lay, t_lay, p_lev, skt, lw_g type(ty_optical_props_1scl),intent(in) :: & lw_optical_props_clouds, & ! RRTMGP DDT: longwave cloud radiative properties lw_optical_props_aerosol ! RRTMGP DDT: longwave aerosol radiative properties - + real(kind_phys), dimension(lw_gas_props%get_nband(),ncol),intent(in) :: & + secdiff ! Outputs real(kind_phys), dimension(ncol,nLev+1), intent(out) :: & fluxlwUP_allsky, & ! All-sky flux (W/m2) @@ -74,6 +75,8 @@ subroutine rrtmgp_lw_rte_run(doLWrad, nCol, nLev, p_lay, t_lay, p_lev, skt, lw_g hlw0 ! Clear-sky heating rate (K/sec) ! Local variables + integer :: & + iCol, iBand type(ty_fluxes_byband) :: & flux_allsky, flux_clrsky real(kind_phys), dimension(ncol,nLev+1,lw_gas_props%get_nband()),target :: & @@ -100,9 +103,20 @@ subroutine rrtmgp_lw_rte_run(doLWrad, nCol, nLev, p_lay, t_lay, p_lev, skt, lw_g flux_clrsky%bnd_flux_up => fluxLW_up_clrsky flux_clrsky%bnd_flux_dn => fluxLW_dn_clrsky + ! ! Compute clear-sky fluxes (if requested) - ! Clear-sky fluxes are gas+aerosol + ! + ! Add aerosol optics to gas optics call check_error_msg('rrtmgp_lw_rte_run',lw_optical_props_aerosol%increment(lw_optical_props_clrsky)) + + ! Apply diffusivity angle adjustment (RRTMG legacy) + do iCol=1,nCol + do iBand=1,lw_gas_props%get_nband() + lw_optical_props_clrsky%tau(iCol,1:nLev,iBand) = lw_optical_props_clrsky%tau(iCol,1:nLev,iBand)*secdiff(iBand,iCol) + enddo + enddo + + ! Call RTE solver if (l_ClrSky_HR) then call check_error_msg('rrtmgp_lw_rte_run',rte_lw( & lw_optical_props_clrsky, & ! IN - optical-properties @@ -115,9 +129,20 @@ subroutine rrtmgp_lw_rte_run(doLWrad, nCol, nLev, p_lay, t_lay, p_lev, skt, lw_g fluxlwDOWN_clrsky = sum(flux_clrsky%bnd_flux_dn,dim=3) endif + ! ! All-sky fluxes - ! Clear-sky fluxes are (gas+aerosol)+clouds + ! + + ! Apply diffusivity angle adjustment (RRTMG legacy) + do iCol=1,nCol + do iBand=1,lw_gas_props%get_nband() + lw_optical_props_clrsky%tau(iCol,1:nLev,iBand) = lw_optical_props_clrsky%tau(iCol,1:nLev,iBand)*secdiff(iBand,iCol) + enddo + enddo + ! Add cloud optics to clear-sky optics call check_error_msg('rrtmgp_lw_rte_run',lw_optical_props_clouds%increment(lw_optical_props_clrsky)) + + ! Call RTE solver call check_error_msg('rrtmgp_lw_rte_run',rte_lw( & lw_optical_props_clrsky, & ! IN - optical-properties top_at_1, & ! IN - veritcal ordering flag diff --git a/physics/rrtmgp_lw_rte.meta b/physics/rrtmgp_lw_rte.meta index 47168c75b..7083586cf 100644 --- a/physics/rrtmgp_lw_rte.meta +++ b/physics/rrtmgp_lw_rte.meta @@ -128,6 +128,15 @@ kind = kind_phys intent = in optional = T +[secdiff] + standard_name = secant_of_diffusivity_angle_each_RRTMGP_LW_band + long_name = secant of diffusivity angle in each RRTMGP LW band + units = none + dimensions = (number_of_lw_bands_rrtmgp,horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F [fluxlwUP_allsky] standard_name = RRTMGP_lw_flux_profile_upward_allsky long_name = RRTMGP upward longwave all-sky flux profile From 2e161eba6e74476729385177e4ebb02ae2491a8c Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Tue, 31 Dec 2019 11:34:47 -0700 Subject: [PATCH 108/167] Moved GFS_rrtmgp_lw_pre.F90 to rrtmgp_lw_pre.F90 --- physics/rrtmgp_lw_pre.F90 | 90 +++++++++++++++++++++++++ physics/rrtmgp_lw_pre.meta | 133 +++++++++++++++++++++++++++++++++++++ 2 files changed, 223 insertions(+) create mode 100644 physics/rrtmgp_lw_pre.F90 create mode 100644 physics/rrtmgp_lw_pre.meta diff --git a/physics/rrtmgp_lw_pre.F90 b/physics/rrtmgp_lw_pre.F90 new file mode 100644 index 000000000..a55a6657e --- /dev/null +++ b/physics/rrtmgp_lw_pre.F90 @@ -0,0 +1,90 @@ +module rrtmgp_lw_pre + use physparam + use machine, only: & + kind_phys ! Working type + use GFS_typedefs, only: & + GFS_control_type, & ! + GFS_sfcprop_type, & ! Surface fields + GFS_grid_type, & ! Grid and interpolation related data + GFS_statein_type, & ! + GFS_radtend_type ! Radiation tendencies needed in physics + use module_radiation_surface, only: & + setemis ! Routine to compute surface-emissivity + use mo_gas_optics_rrtmgp, only: & + ty_gas_optics_rrtmgp + + public rrtmgp_lw_pre_run,rrtmgp_lw_pre_init,rrtmgp_lw_pre_finalize + +contains + + ! ######################################################################################### + ! SUBROUTINE rrtmgp_lw_pre_init + ! ######################################################################################### + subroutine rrtmgp_lw_pre_init () + end subroutine rrtmgp_lw_pre_init + + ! ######################################################################################### + ! SUBROUTINE rrtmgp_lw_pre_run + ! ######################################################################################### +!> \section arg_table_rrtmgp_lw_pre_run +!! \htmlinclude rrtmgp_lw_pre.html +!! + subroutine rrtmgp_lw_pre_run (doLWrad, nCol, lon, lat, lsmask, zorl, snowd, sncovr, tsfc, & + nmtvr, hprime, lw_gas_props, sfc_emiss_byband, errmsg, errflg) + + ! Inputs + logical, intent(in) :: & + doLWrad ! Logical flag for longwave radiation call + integer, intent(in) :: & + nCol, & ! Number of horizontal grid points + nmtvr ! number of topographic variables in GWD + real(kind_phys), dimension(nCol), intent(in) :: & + lon, & ! Longitude + lat, & ! Latitude + lsmask, & ! Land/sea/sea-ice mask + zorl, & ! Surface roughness length (cm) + snowd, & ! water equivalent snow depth (mm) + sncovr, & ! Surface snow are fraction (1) + tsfc ! Surface skin temperature (K) + real(kind_phys), dimension(nCol,nmtvr), intent(in) :: & + hprime ! Standard deviation of subgrid orography + + type(ty_gas_optics_rrtmgp),intent(in) :: & + lw_gas_props ! RRTMGP DDT: spectral information for LW calculation + + ! Outputs + real(kind_phys), dimension(lw_gas_props%get_nband(),ncol), intent(out) :: & + sfc_emiss_byband ! Surface emissivity in each band + character(len=*), intent(out) :: & + errmsg ! Error message + integer, intent(out) :: & + errflg ! Error flag + + ! Local fields + real(kind_phys), dimension(nCol) :: sfc_emiss + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + + if (.not. doLWrad) return + + ! ####################################################################################### + ! Call module_radiation_surface::setemis(),to setup surface emissivity for LW radiation. + ! ####################################################################################### + call setemis (lon, lat, lsmask, snowd, sncovr, zorl, tsfc, tsfc, hprime(:,1), nCol, sfc_emiss) + + ! Assign same emissivity to all bands + do iBand=1,lw_gas_props%get_nband() + sfc_emiss_byband(iBand,1:NCOL) = sfc_emiss(1:NCOL) + enddo + + end subroutine rrtmgp_lw_pre_run + + ! ######################################################################################### + ! SUBROUTINE rrtmgp_lw_pre_finalize + ! ######################################################################################### + subroutine rrtmgp_lw_pre_finalize () + end subroutine rrtmgp_lw_pre_finalize + +end module rrtmgp_lw_pre diff --git a/physics/rrtmgp_lw_pre.meta b/physics/rrtmgp_lw_pre.meta new file mode 100644 index 000000000..86b4d3e36 --- /dev/null +++ b/physics/rrtmgp_lw_pre.meta @@ -0,0 +1,133 @@ +[ccpp-arg-table] + name = rrtmgp_lw_pre_run + type = scheme +[doLWrad] + standard_name = flag_to_calc_lw + long_name = logical flags for lw radiation calls + units = flag + dimensions = () + type = logical + intent = in + optional = F +[nCol] + standard_name = horizontal_loop_extent + long_name = horizontal loop extent + units = count + dimensions = () + type = integer + intent = in + optional = F +[nmtvr] + standard_name = number_of_statistical_measures_of_subgrid_orography + long_name = number of topographic variables in GWD + units = count + dimensions = () + type = integer + intent = in + optional = F +[lon] + standard_name = longitude + long_name = longitude + units = radians + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[lat] + standard_name = latitude + long_name = latitude + units = radians + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[lsmask] + standard_name = sea_land_ice_mask_real + long_name = landmask: sea/land/ice=0/1/2 + units = flag + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[zorl] + standard_name = surface_roughness_length + long_name = surface roughness length + units = cm + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[snowd] + standard_name = surface_snow_thickness_water_equivalent + long_name = water equivalent snow depth + units = mm + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[sncovr] + standard_name = surface_snow_area_fraction_over_land + long_name = surface snow area fraction + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[tsfc] + standard_name = surface_skin_temperature + long_name = surface skin temperature + units = K + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[hprime] + standard_name = statistical_measures_of_subgrid_orography + long_name = orographic metrics + units = various + dimensions = (horizontal_dimension,number_of_statistical_measures_of_subgrid_orography) + type = real + kind = kind_phys + intent = in + optional = F +[lw_gas_props] + standard_name = coefficients_for_lw_gas_optics + long_name = DDT containing spectral information for RRTMGP LW radiation scheme + units = DDT + dimensions = () + type = ty_gas_optics_rrtmgp + intent = in + optional = F +[sfc_emiss_byband] + standard_name = surface_emissivity_in_each_RRTMGP_LW_band + long_name = surface emissivity in each RRTMGP LW band + units = none + dimensions = (number_of_lw_bands_rrtmgp,horizontal_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out + optional = F +[errflg] + standard_name = ccpp_error_flag + long_name = error flag for error handling in CCPP + units = flag + dimensions = () + type = integer + intent = out + optional = F From a564c8b379708caa55a7484038574fc5b1245838 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Thu, 2 Jan 2020 12:02:56 -0700 Subject: [PATCH 109/167] Moved aggregation into conditional loop. LW only. --- physics/rrtmg_lw_cloud_optics.F90 | 23 ++++++++++------------- physics/rrtmgp_lw_cloud_optics.F90 | 7 +++---- 2 files changed, 13 insertions(+), 17 deletions(-) diff --git a/physics/rrtmg_lw_cloud_optics.F90 b/physics/rrtmg_lw_cloud_optics.F90 index 31551d797..0447caea5 100644 --- a/physics/rrtmg_lw_cloud_optics.F90 +++ b/physics/rrtmg_lw_cloud_optics.F90 @@ -646,19 +646,16 @@ subroutine rrtmg_lw_cloud_optics(ncol, nlay, nBandsLW, cld_lwp, cld_ref_liq, cld fint*(absice3(index+1,ib) - absice3(index,ib)) )) enddo endif - endif - else - tau_rain = 0. - tau_snow = 0. - tau_liq(:) = 0. - tau_ice(:) = 0. - endif - ! Cloud optical depth - do ib = 1, nBandsLW - tau_cld(ij,ik,ib) = tau_ice(ib) + tau_liq(ib) + tau_rain + tau_snow - enddo - end do - end do + endif + + ! Cloud optical depth + do ib = 1, nBandsLW + tau_cld(ij,ik,ib) = tau_ice(ib) + tau_liq(ib) + tau_rain + tau_snow + enddo + + endif ! Cloud layer? + end do ! Layer + end do ! Column endif end subroutine rrtmg_lw_cloud_optics ! ####################################################################################### diff --git a/physics/rrtmgp_lw_cloud_optics.F90 b/physics/rrtmgp_lw_cloud_optics.F90 index aacecd6df..1ba051768 100644 --- a/physics/rrtmgp_lw_cloud_optics.F90 +++ b/physics/rrtmgp_lw_cloud_optics.F90 @@ -395,8 +395,7 @@ subroutine rrtmgp_lw_cloud_optics_run(doLWrad, nCol, nLev, cld_optics_scheme, nr ! Local variables logical,dimension(ncol,nLev) :: liqmask, icemask - real(kind_phys), dimension(ncol,nLev,lw_gas_props%get_nband()) :: & - tau_cld + integer :: k ! Initialize CCPP error handling variables errmsg = '' @@ -412,6 +411,7 @@ subroutine rrtmgp_lw_cloud_optics_run(doLWrad, nCol, nLev, cld_optics_scheme, nr ! Cloud optics [nCol,nLev,nBands] call check_error_msg('rrtmgp_lw_cloud_optics_run',lw_optical_props_cloudsByBand%alloc_1scl(& ncol, nLev, lw_gas_props%get_band_lims_wavenumber())) + lw_optical_props_cloudsByBand%tau(:,:,:) = 0._kind_phys ! Compute cloud-optics for RTE. if (rrtmgp_cld_optics .gt. 0) then @@ -434,8 +434,7 @@ subroutine rrtmgp_lw_cloud_optics_run(doLWrad, nCol, nLev, cld_optics_scheme, nr if (any(cld_frac .gt. 0)) then call rrtmg_lw_cloud_optics(ncol, nLev, lw_gas_props%get_nband(), cld_lwp, & cld_reliq, cld_iwp, cld_reice, cld_rwp, cld_rerain, cld_swp, cld_resnow, & - cld_frac, tau_cld) - lw_optical_props_cloudsByBand%tau = tau_cld + cld_frac, lw_optical_props_cloudsByBand%tau) endif endif From 323e6f992c3ccb750b6fea1762d0a2e0a270fcc7 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Fri, 3 Jan 2020 14:17:52 -0700 Subject: [PATCH 110/167] Added number_of_gaussian angles to LW calculation. --- physics/GFS_rrtmgp_pre.F90 | 29 +++++++++++++++++++++++++---- physics/rrtmgp_lw_rte.F90 | 4 ++-- 2 files changed, 27 insertions(+), 6 deletions(-) diff --git a/physics/GFS_rrtmgp_pre.F90 b/physics/GFS_rrtmgp_pre.F90 index 4d076706c..b5fd3ed14 100644 --- a/physics/GFS_rrtmgp_pre.F90 +++ b/physics/GFS_rrtmgp_pre.F90 @@ -199,7 +199,8 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, real(kind_phys),dimension(NCOL,Model%levs) :: vmr_o3, vmr_h2o, coldry, tem0, colamt real(kind_phys) :: es, qs, tem1, tem2 real(kind_phys), dimension(ncol, NF_ALBD) :: sfcalb - real(kind_phys), dimension(ncol, Model%levs) :: qs_lay, q_lay, deltaZ, deltaP, o3_lay + real(kind_phys), dimension(ncol, Model%levs) :: qs_lay, q_lay, deltaZ, deltaP, o3_lay, p_lay_log + real(kind_phys), dimension(ncol, Model%levs+1) :: p_lev_log real(kind_phys), dimension(ncol, Model%levs, NF_VGAS) :: gas_vmr real(kind_phys), dimension(ncol, Model%levs, NF_CLDS) :: clouds real(kind_phys), dimension(ncol) :: precipitableH2o @@ -241,15 +242,35 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, ! Temperature at layer-interfaces if (top_at_1) then + ! Log of pressure (used for temperature level interpolation) + p_lay_log = log(p_lay) + p_lev_log(:,1) = log(max(1.0e-6,p_lev(:,1))) + p_lev_log(:,2:iSFC+1) = log(p_lev(:,2:iSFC+1)) + ! t_lev(1:NCOL,1) = t_lay(1:NCOL,iTOA) - t_lev(1:NCOL,2:iSFC) = (t_lay(1:NCOL,2:iSFC)+t_lay(1:NCOL,1:iSFC-1))/2._kind_phys + do iLay=2,iSFC + t_lev(1:nCol,iLay) = t_lay(1:nCol,iLay) + (t_lay(1:nCol,iLay-1)-t_lay(1:nCol,iLay)) * & + (p_lev_log(1:nCol,iLay) - p_lay_log(1:nCol,iLay)) / & + (p_lay_log(1:nCol,iLay-1) - p_lay_log(1:nCol,iLay)) + enddo + !t_lev(1:NCOL,2:iSFC) = (t_lay(1:NCOL,2:iSFC)+t_lay(1:NCOL,1:iSFC-1))/2._kind_phys t_lev(1:NCOL,iSFC+1) = Sfcprop%tsfc(1:NCOL) else + ! Log of pressure (used for temperature level interpolation) + p_lay_log = log(p_lay) + p_lev_log(:,1) = log(max(1.0e-6,p_lev(:,1))) + p_lev_log(:,2:iTOA+1) = log(p_lev(:,2:iTOA+1)) + ! t_lev(1:NCOL,1) = Sfcprop%tsfc(1:NCOL) - t_lev(1:NCOL,2:iTOA) = (t_lay(1:NCOL,2:iTOA)+t_lay(1:NCOL,1:iTOA-1))/2._kind_phys + do iLay=2,iTOA + t_lev(1:nCol,iLay) = t_lay(1:nCol,iLay-1) + (t_lay(1:nCol,iLay)-t_lay(1:nCol,iLay-1)) * & + (p_lev_log(1:nCol,iLay)-p_lay_log(1:nCol,iLay-1)) / & + (p_lay_log(1:nCol,iLay)-p_lay_log(1:nCol,iLay-1)) + enddo + !t_lev(1:NCOL,2:iTOA) = (t_lay(1:NCOL,2:iTOA)+t_lay(1:NCOL,1:iTOA-1))/2._kind_phys t_lev(1:NCOL,iTOA+1) = t_lay(1:NCOL,iTOA) endif - + ! Compute layer pressure thicknes deltaP = abs(p_lev(:,2:model%levs+1)-p_lev(:,1:model%levs)) diff --git a/physics/rrtmgp_lw_rte.F90 b/physics/rrtmgp_lw_rte.F90 index 6d5b1f6ef..a4989237e 100644 --- a/physics/rrtmgp_lw_rte.F90 +++ b/physics/rrtmgp_lw_rte.F90 @@ -123,7 +123,7 @@ subroutine rrtmgp_lw_rte_run(doLWrad, nCol, nLev, p_lay, t_lay, p_lev, skt, lw_g top_at_1, & ! IN - veritcal ordering flag sources, & ! IN - source function sfc_emiss_byband, & ! IN - surface emissivity in each LW band - flux_clrsky)) + flux_clrsky,n_gauss_angles=3)) ! Store fluxes fluxlwUP_clrsky = sum(flux_clrsky%bnd_flux_up,dim=3) fluxlwDOWN_clrsky = sum(flux_clrsky%bnd_flux_dn,dim=3) @@ -148,7 +148,7 @@ subroutine rrtmgp_lw_rte_run(doLWrad, nCol, nLev, p_lay, t_lay, p_lev, skt, lw_g top_at_1, & ! IN - veritcal ordering flag sources, & ! IN - source function sfc_emiss_byband, & ! IN - surface emissivity in each LW band - flux_allsky)) + flux_allsky,n_gauss_angles=3)) ! Store fluxes fluxlwUP_allsky = sum(flux_allsky%bnd_flux_up,dim=3) fluxlwDOWN_allsky = sum(flux_allsky%bnd_flux_dn,dim=3) From ec093b215fa3f60f0032f3b2bb311e0b75a83b29 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Fri, 3 Jan 2020 14:58:39 -0700 Subject: [PATCH 111/167] Reverted some recent changes. --- physics/GFS_rrtmgp_pre.F90 | 29 ++++------------------------- physics/rrtmg_lw_cloud_optics.F90 | 23 +++++++++++++---------- physics/rrtmgp_lw_cloud_optics.F90 | 7 ++++--- 3 files changed, 21 insertions(+), 38 deletions(-) diff --git a/physics/GFS_rrtmgp_pre.F90 b/physics/GFS_rrtmgp_pre.F90 index b5fd3ed14..4d076706c 100644 --- a/physics/GFS_rrtmgp_pre.F90 +++ b/physics/GFS_rrtmgp_pre.F90 @@ -199,8 +199,7 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, real(kind_phys),dimension(NCOL,Model%levs) :: vmr_o3, vmr_h2o, coldry, tem0, colamt real(kind_phys) :: es, qs, tem1, tem2 real(kind_phys), dimension(ncol, NF_ALBD) :: sfcalb - real(kind_phys), dimension(ncol, Model%levs) :: qs_lay, q_lay, deltaZ, deltaP, o3_lay, p_lay_log - real(kind_phys), dimension(ncol, Model%levs+1) :: p_lev_log + real(kind_phys), dimension(ncol, Model%levs) :: qs_lay, q_lay, deltaZ, deltaP, o3_lay real(kind_phys), dimension(ncol, Model%levs, NF_VGAS) :: gas_vmr real(kind_phys), dimension(ncol, Model%levs, NF_CLDS) :: clouds real(kind_phys), dimension(ncol) :: precipitableH2o @@ -242,35 +241,15 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, ! Temperature at layer-interfaces if (top_at_1) then - ! Log of pressure (used for temperature level interpolation) - p_lay_log = log(p_lay) - p_lev_log(:,1) = log(max(1.0e-6,p_lev(:,1))) - p_lev_log(:,2:iSFC+1) = log(p_lev(:,2:iSFC+1)) - ! t_lev(1:NCOL,1) = t_lay(1:NCOL,iTOA) - do iLay=2,iSFC - t_lev(1:nCol,iLay) = t_lay(1:nCol,iLay) + (t_lay(1:nCol,iLay-1)-t_lay(1:nCol,iLay)) * & - (p_lev_log(1:nCol,iLay) - p_lay_log(1:nCol,iLay)) / & - (p_lay_log(1:nCol,iLay-1) - p_lay_log(1:nCol,iLay)) - enddo - !t_lev(1:NCOL,2:iSFC) = (t_lay(1:NCOL,2:iSFC)+t_lay(1:NCOL,1:iSFC-1))/2._kind_phys + t_lev(1:NCOL,2:iSFC) = (t_lay(1:NCOL,2:iSFC)+t_lay(1:NCOL,1:iSFC-1))/2._kind_phys t_lev(1:NCOL,iSFC+1) = Sfcprop%tsfc(1:NCOL) else - ! Log of pressure (used for temperature level interpolation) - p_lay_log = log(p_lay) - p_lev_log(:,1) = log(max(1.0e-6,p_lev(:,1))) - p_lev_log(:,2:iTOA+1) = log(p_lev(:,2:iTOA+1)) - ! t_lev(1:NCOL,1) = Sfcprop%tsfc(1:NCOL) - do iLay=2,iTOA - t_lev(1:nCol,iLay) = t_lay(1:nCol,iLay-1) + (t_lay(1:nCol,iLay)-t_lay(1:nCol,iLay-1)) * & - (p_lev_log(1:nCol,iLay)-p_lay_log(1:nCol,iLay-1)) / & - (p_lay_log(1:nCol,iLay)-p_lay_log(1:nCol,iLay-1)) - enddo - !t_lev(1:NCOL,2:iTOA) = (t_lay(1:NCOL,2:iTOA)+t_lay(1:NCOL,1:iTOA-1))/2._kind_phys + t_lev(1:NCOL,2:iTOA) = (t_lay(1:NCOL,2:iTOA)+t_lay(1:NCOL,1:iTOA-1))/2._kind_phys t_lev(1:NCOL,iTOA+1) = t_lay(1:NCOL,iTOA) endif - + ! Compute layer pressure thicknes deltaP = abs(p_lev(:,2:model%levs+1)-p_lev(:,1:model%levs)) diff --git a/physics/rrtmg_lw_cloud_optics.F90 b/physics/rrtmg_lw_cloud_optics.F90 index 0447caea5..31551d797 100644 --- a/physics/rrtmg_lw_cloud_optics.F90 +++ b/physics/rrtmg_lw_cloud_optics.F90 @@ -646,16 +646,19 @@ subroutine rrtmg_lw_cloud_optics(ncol, nlay, nBandsLW, cld_lwp, cld_ref_liq, cld fint*(absice3(index+1,ib) - absice3(index,ib)) )) enddo endif - endif - - ! Cloud optical depth - do ib = 1, nBandsLW - tau_cld(ij,ik,ib) = tau_ice(ib) + tau_liq(ib) + tau_rain + tau_snow - enddo - - endif ! Cloud layer? - end do ! Layer - end do ! Column + endif + else + tau_rain = 0. + tau_snow = 0. + tau_liq(:) = 0. + tau_ice(:) = 0. + endif + ! Cloud optical depth + do ib = 1, nBandsLW + tau_cld(ij,ik,ib) = tau_ice(ib) + tau_liq(ib) + tau_rain + tau_snow + enddo + end do + end do endif end subroutine rrtmg_lw_cloud_optics ! ####################################################################################### diff --git a/physics/rrtmgp_lw_cloud_optics.F90 b/physics/rrtmgp_lw_cloud_optics.F90 index 1ba051768..aacecd6df 100644 --- a/physics/rrtmgp_lw_cloud_optics.F90 +++ b/physics/rrtmgp_lw_cloud_optics.F90 @@ -395,7 +395,8 @@ subroutine rrtmgp_lw_cloud_optics_run(doLWrad, nCol, nLev, cld_optics_scheme, nr ! Local variables logical,dimension(ncol,nLev) :: liqmask, icemask - integer :: k + real(kind_phys), dimension(ncol,nLev,lw_gas_props%get_nband()) :: & + tau_cld ! Initialize CCPP error handling variables errmsg = '' @@ -411,7 +412,6 @@ subroutine rrtmgp_lw_cloud_optics_run(doLWrad, nCol, nLev, cld_optics_scheme, nr ! Cloud optics [nCol,nLev,nBands] call check_error_msg('rrtmgp_lw_cloud_optics_run',lw_optical_props_cloudsByBand%alloc_1scl(& ncol, nLev, lw_gas_props%get_band_lims_wavenumber())) - lw_optical_props_cloudsByBand%tau(:,:,:) = 0._kind_phys ! Compute cloud-optics for RTE. if (rrtmgp_cld_optics .gt. 0) then @@ -434,7 +434,8 @@ subroutine rrtmgp_lw_cloud_optics_run(doLWrad, nCol, nLev, cld_optics_scheme, nr if (any(cld_frac .gt. 0)) then call rrtmg_lw_cloud_optics(ncol, nLev, lw_gas_props%get_nband(), cld_lwp, & cld_reliq, cld_iwp, cld_reice, cld_rwp, cld_rerain, cld_swp, cld_resnow, & - cld_frac, lw_optical_props_cloudsByBand%tau) + cld_frac, tau_cld) + lw_optical_props_cloudsByBand%tau = tau_cld endif endif From 5542acaf51a9460fab4723c20622bb6f97853656 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Mon, 6 Jan 2020 11:22:38 -0700 Subject: [PATCH 112/167] Added diagnostics for LW clouds. --- physics/radlw_main.f | 16 ++++++++++++++-- physics/rrtmgp_lw_cloud_optics.F90 | 20 ++++++++++++++++++-- physics/rrtmgp_lw_cloud_optics.meta | 9 +++++++++ 3 files changed, 41 insertions(+), 4 deletions(-) diff --git a/physics/radlw_main.f b/physics/radlw_main.f index 5d4e1b959..ca953c1c3 100644 --- a/physics/radlw_main.f +++ b/physics/radlw_main.f @@ -353,8 +353,9 @@ module rrtmg_lw contains ! ================ - subroutine rrtmg_lw_init () - end subroutine rrtmg_lw_init + subroutine rrtmg_lw_init () + open(47,file='rrtmg_clds.txt',status='unknown') + end subroutine rrtmg_lw_init !> \defgroup module_radlw_main GFS RRTMG Longwave Module !! \brief This module includes NCEP's modifications of the RRTMG-LW radiation @@ -717,6 +718,9 @@ subroutine rrtmg_lw_run & ! endif ! --- ... loop over horizontal npts profiles + write(47,*) "In radlw_main: " + write(47,*),"nCol: ",npts + write(47,*),"nLay: ",nLay lab_do_iplon : do iplon = 1, npts @@ -1162,6 +1166,13 @@ subroutine rrtmg_lw_run & !> -# Save outputs. + + do k=1,nlay + write(47,"(21f8.2)") plyr(iplon,k),clwp(k),relw(k),ciwp(k), & + & reiw(k),taucld(:,k) + enddo + + topflx(iplon)%upfxc = totuflux(nlay) topflx(iplon)%upfx0 = totuclfl(nlay) @@ -1247,6 +1258,7 @@ end subroutine rrtmg_lw_run !----------------------------------- !> @} subroutine rrtmg_lw_finalize () + close(47) end subroutine rrtmg_lw_finalize diff --git a/physics/rrtmgp_lw_cloud_optics.F90 b/physics/rrtmgp_lw_cloud_optics.F90 index aacecd6df..c7f5ee24c 100644 --- a/physics/rrtmgp_lw_cloud_optics.F90 +++ b/physics/rrtmgp_lw_cloud_optics.F90 @@ -99,6 +99,8 @@ subroutine rrtmgp_lw_cloud_optics_init(cld_optics_scheme, nrghice, rrtmgp_root_d errmsg = '' errflg = 0 + open(47,file='rrtmgp_clds.txt',status='unknown') + if (cld_optics_scheme .eq. 0) return ! Filenames are set in the physics_nml @@ -357,8 +359,8 @@ end subroutine rrtmgp_lw_cloud_optics_init !! subroutine rrtmgp_lw_cloud_optics_run(doLWrad, nCol, nLev, cld_optics_scheme, nrghice, & cld_frac, cld_lwp, cld_reliq, cld_iwp, cld_reice, cld_swp, cld_resnow, cld_rwp, & - cld_rerain, lw_cloud_props, lw_gas_props, cldtaulw, lw_optical_props_cloudsByBand, & - errmsg, errflg) + cld_rerain, p_lay, lw_cloud_props, lw_gas_props, & + cldtaulw, lw_optical_props_cloudsByBand, errmsg, errflg) ! Inputs logical, intent(in) :: & @@ -369,6 +371,7 @@ subroutine rrtmgp_lw_cloud_optics_run(doLWrad, nCol, nLev, cld_optics_scheme, nr nrghice, & ! Number of ice-roughness categories cld_optics_scheme ! Cloud-optics scheme real(kind_phys), dimension(ncol,nLev),intent(in) :: & + p_lay, & ! Layer pressure (Pa) cld_frac, & ! Total cloud fraction by layer cld_lwp, & ! Cloud liquid water path cld_reliq, & ! Cloud liquid effective radius @@ -397,10 +400,12 @@ subroutine rrtmgp_lw_cloud_optics_run(doLWrad, nCol, nLev, cld_optics_scheme, nr logical,dimension(ncol,nLev) :: liqmask, icemask real(kind_phys), dimension(ncol,nLev,lw_gas_props%get_nband()) :: & tau_cld + integer :: iCol, iLay ! Initialize CCPP error handling variables errmsg = '' errflg = 0 + tau_cld = 0. if (.not. doLWrad) return @@ -438,6 +443,16 @@ subroutine rrtmgp_lw_cloud_optics_run(doLWrad, nCol, nLev, cld_optics_scheme, nr lw_optical_props_cloudsByBand%tau = tau_cld endif endif + + write(47,*) "In rrtmgp_lw_cloud_optics: " + write(47,*),"nCol: ",nCol + write(47,*),"nLay: ",nLev + do iCol=1,nCol + do iLay=1,nLev + write(47,"(21f8.2)") p_lay(iCol,iLay)/100.,cld_lwp(iCol,iLay),cld_reliq(iCol,iLay),& + cld_iwp(iCol,iLay),cld_reice(iCol,iLay),tau_cld(iCol,iLay,:) + enddo + enddo ! All-sky LW optical depth ~10microns cldtaulw = lw_optical_props_cloudsByBand%tau(:,:,7) @@ -448,5 +463,6 @@ end subroutine rrtmgp_lw_cloud_optics_run ! SUBROUTINE rrtmgp_lw_cloud_optics_finalize() ! ######################################################################################### subroutine rrtmgp_lw_cloud_optics_finalize() + close(47) end subroutine rrtmgp_lw_cloud_optics_finalize end module rrtmgp_lw_cloud_optics diff --git a/physics/rrtmgp_lw_cloud_optics.meta b/physics/rrtmgp_lw_cloud_optics.meta index 81602c552..2582362d1 100644 --- a/physics/rrtmgp_lw_cloud_optics.meta +++ b/physics/rrtmgp_lw_cloud_optics.meta @@ -201,6 +201,15 @@ type = real intent = in kind = kind_phys +[p_lay] + standard_name = air_pressure_at_layer_for_RRTMGP_in_hPa + long_name = air pressure layer + units = hPa + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F [lw_gas_props] standard_name = coefficients_for_lw_gas_optics long_name = DDT containing spectral information for RRTMGP LW radiation scheme From 04ad9ed3a5f08f9f9b8c3888a73184a5b11c1e60 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Mon, 6 Jan 2020 13:40:06 -0700 Subject: [PATCH 113/167] Added longitude/latitude to output stream. Needed to sort through MPI output. --- physics/radlw_main.f | 8 ++++---- physics/radlw_main.meta | 18 ++++++++++++++++++ physics/rrtmgp_lw_cloud_optics.F90 | 9 ++++++--- physics/rrtmgp_lw_cloud_optics.meta | 18 ++++++++++++++++++ 4 files changed, 46 insertions(+), 7 deletions(-) diff --git a/physics/radlw_main.f b/physics/radlw_main.f index ca953c1c3..34cc389cb 100644 --- a/physics/radlw_main.f +++ b/physics/radlw_main.f @@ -390,7 +390,7 @@ subroutine rrtmg_lw_run & & gasvmr_ch4, gasvmr_o2, gasvmr_co, gasvmr_cfc11, & & gasvmr_cfc12, gasvmr_cfc22, gasvmr_ccl4, & & icseed,aeraod,aerssa,sfemis,sfgtmp, & - & dzlyr,delpin,de_lgth, & + & dzlyr,delpin,de_lgth,xlon,xlat, & & npts, nlay, nlp1, lprnt, cld_cf, lslwr, & & hlwc,topflx,sfcflx,cldtau, & ! --- outputs & HLW0,HLWB,FLXPRF, & ! --- optional @@ -589,7 +589,7 @@ subroutine rrtmg_lw_run & & cld_od real (kind=kind_phys), dimension(npts), intent(in) :: sfemis, & - & sfgtmp, de_lgth + & sfgtmp, de_lgth, xlon, xlat real (kind=kind_phys), dimension(npts,nlay,nbands),intent(in):: & & aeraod, aerssa @@ -1168,8 +1168,8 @@ subroutine rrtmg_lw_run & do k=1,nlay - write(47,"(21f8.2)") plyr(iplon,k),clwp(k),relw(k),ciwp(k), & - & reiw(k),taucld(:,k) + write(47,"(23f8.2)") plyr(iplon,k),clwp(k),relw(k),ciwp(k), & + & reiw(k),taucld(:,k),xlon(k),xlat(k) enddo diff --git a/physics/radlw_main.meta b/physics/radlw_main.meta index 73977e5cb..1d8a08fb3 100644 --- a/physics/radlw_main.meta +++ b/physics/radlw_main.meta @@ -207,6 +207,24 @@ kind = kind_phys intent = in optional = F +[xlon] + standard_name = longitude + long_name = longitude + units = radians + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[xlat] + standard_name = latitude + long_name = latitude + units = radians + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F [npts] standard_name = horizontal_loop_extent long_name = horizontal dimension diff --git a/physics/rrtmgp_lw_cloud_optics.F90 b/physics/rrtmgp_lw_cloud_optics.F90 index c7f5ee24c..1961066bc 100644 --- a/physics/rrtmgp_lw_cloud_optics.F90 +++ b/physics/rrtmgp_lw_cloud_optics.F90 @@ -359,7 +359,7 @@ end subroutine rrtmgp_lw_cloud_optics_init !! subroutine rrtmgp_lw_cloud_optics_run(doLWrad, nCol, nLev, cld_optics_scheme, nrghice, & cld_frac, cld_lwp, cld_reliq, cld_iwp, cld_reice, cld_swp, cld_resnow, cld_rwp, & - cld_rerain, p_lay, lw_cloud_props, lw_gas_props, & + cld_rerain, p_lay, lw_cloud_props, lw_gas_props, lon, lat, & cldtaulw, lw_optical_props_cloudsByBand, errmsg, errflg) ! Inputs @@ -370,6 +370,9 @@ subroutine rrtmgp_lw_cloud_optics_run(doLWrad, nCol, nLev, cld_optics_scheme, nr nLev, & ! Number of vertical levels nrghice, & ! Number of ice-roughness categories cld_optics_scheme ! Cloud-optics scheme + real(kind_phys), dimension(nCol), intent(in) :: & + lon, & ! Longitude + lat ! Latitude real(kind_phys), dimension(ncol,nLev),intent(in) :: & p_lay, & ! Layer pressure (Pa) cld_frac, & ! Total cloud fraction by layer @@ -449,8 +452,8 @@ subroutine rrtmgp_lw_cloud_optics_run(doLWrad, nCol, nLev, cld_optics_scheme, nr write(47,*),"nLay: ",nLev do iCol=1,nCol do iLay=1,nLev - write(47,"(21f8.2)") p_lay(iCol,iLay)/100.,cld_lwp(iCol,iLay),cld_reliq(iCol,iLay),& - cld_iwp(iCol,iLay),cld_reice(iCol,iLay),tau_cld(iCol,iLay,:) + write(47,"(23f8.2)") p_lay(iCol,iLay)/100.,cld_lwp(iCol,iLay),cld_reliq(iCol,iLay),& + cld_iwp(iCol,iLay),cld_reice(iCol,iLay),tau_cld(iCol,iLay,:),lon(iCol), lat(iCol) enddo enddo diff --git a/physics/rrtmgp_lw_cloud_optics.meta b/physics/rrtmgp_lw_cloud_optics.meta index 2582362d1..850602d64 100644 --- a/physics/rrtmgp_lw_cloud_optics.meta +++ b/physics/rrtmgp_lw_cloud_optics.meta @@ -226,6 +226,24 @@ intent = in type = ty_cloud_optics optional = F +[lon] + standard_name = longitude + long_name = longitude + units = radians + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[lat] + standard_name = latitude + long_name = latitude + units = radians + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F [cldtaulw] standard_name = RRTMGP_cloud_optical_depth_layers_at_10mu_band long_name = approx 10mu band layer cloud optical depth From b6792036ac56e939121e049a8c11e3658a3e4492 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Mon, 6 Jan 2020 14:40:49 -0700 Subject: [PATCH 114/167] Fixed error in previous commit. --- physics/radlw_main.f | 6 +++--- physics/radlw_main.meta | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/physics/radlw_main.f b/physics/radlw_main.f index 34cc389cb..bc3c56091 100644 --- a/physics/radlw_main.f +++ b/physics/radlw_main.f @@ -390,7 +390,7 @@ subroutine rrtmg_lw_run & & gasvmr_ch4, gasvmr_o2, gasvmr_co, gasvmr_cfc11, & & gasvmr_cfc12, gasvmr_cfc22, gasvmr_ccl4, & & icseed,aeraod,aerssa,sfemis,sfgtmp, & - & dzlyr,delpin,de_lgth,xlon,xlat, & + & dzlyr,delpin,de_lgth, lon, lat, & & npts, nlay, nlp1, lprnt, cld_cf, lslwr, & & hlwc,topflx,sfcflx,cldtau, & ! --- outputs & HLW0,HLWB,FLXPRF, & ! --- optional @@ -589,7 +589,7 @@ subroutine rrtmg_lw_run & & cld_od real (kind=kind_phys), dimension(npts), intent(in) :: sfemis, & - & sfgtmp, de_lgth, xlon, xlat + & sfgtmp, de_lgth, lon, lat real (kind=kind_phys), dimension(npts,nlay,nbands),intent(in):: & & aeraod, aerssa @@ -1169,7 +1169,7 @@ subroutine rrtmg_lw_run & do k=1,nlay write(47,"(23f8.2)") plyr(iplon,k),clwp(k),relw(k),ciwp(k), & - & reiw(k),taucld(:,k),xlon(k),xlat(k) + & reiw(k),taucld(:,k),lon(iplon),lat(iplon) enddo diff --git a/physics/radlw_main.meta b/physics/radlw_main.meta index 1d8a08fb3..91dabd663 100644 --- a/physics/radlw_main.meta +++ b/physics/radlw_main.meta @@ -207,7 +207,7 @@ kind = kind_phys intent = in optional = F -[xlon] +[lon] standard_name = longitude long_name = longitude units = radians @@ -216,7 +216,7 @@ kind = kind_phys intent = in optional = F -[xlat] +[lat] standard_name = latitude long_name = latitude units = radians From 203cd4ac6d3d4b0d92e9f558bd13611a3e2ccbf4 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Tue, 7 Jan 2020 10:08:21 -0700 Subject: [PATCH 115/167] Needed to add MPI commands to open diagnostic output file. --- physics/radlw_main.f | 37 ++++++++++++++---- physics/radlw_main.meta | 58 +++++++++++++++++++++++++++++ physics/rrtmgp_lw_cloud_optics.F90 | 30 ++++++++++++--- physics/rrtmgp_lw_cloud_optics.meta | 29 +++++++++++++++ physics/rrtmgp_lw_gas_optics.F90 | 2 + physics/rrtmgp_sw_rte.F90 | 17 ++++++--- 6 files changed, 154 insertions(+), 19 deletions(-) diff --git a/physics/radlw_main.f b/physics/radlw_main.f index bc3c56091..d5c7eb460 100644 --- a/physics/radlw_main.f +++ b/physics/radlw_main.f @@ -255,6 +255,9 @@ module rrtmg_lw use module_radlw_avplank, only : totplnk use module_radlw_ref, only : preflog, tref, chi_mls ! +#ifdef MPI + use mpi +#endif implicit none ! private @@ -352,10 +355,19 @@ module rrtmg_lw ! ================ contains ! ================ +!! \section arg_table_rrtmg_lw_init +!! \htmlinclude rrtmg_lw.html +!! + subroutine rrtmg_lw_init (mpicomm, mpirank, mpiroot) + ! Inputs + integer, intent(in) :: mpicomm,mpirank,mpiroot + + if (mpirank .eq. mpiroot) then + print*,'DJS+ Opening file containing RRTMG LW cloud fields' + open(47,file='rrtmg_clds.txt',status='unknown') + endif - subroutine rrtmg_lw_init () - open(47,file='rrtmg_clds.txt',status='unknown') - end subroutine rrtmg_lw_init + end subroutine rrtmg_lw_init !> \defgroup module_radlw_main GFS RRTMG Longwave Module !! \brief This module includes NCEP's modifications of the RRTMG-LW radiation @@ -381,7 +393,7 @@ end subroutine rrtmg_lw_init !! This model is provided as is without any express or implied warranties. !! (http://www.rtweb.aer.com/) !! \section arg_table_rrtmg_lw_run Argument Table -!! \htmlinclude rrtmg_lw_run.html +!! \htmlinclude rrtmg_lw.html !! !> \section gen_lwrad RRTMG Longwave Radiation Scheme General Algorithm !> @{ @@ -1257,9 +1269,20 @@ subroutine rrtmg_lw_run & end subroutine rrtmg_lw_run !----------------------------------- !> @} - subroutine rrtmg_lw_finalize () - close(47) - end subroutine rrtmg_lw_finalize +!! \section arg_table_rrtmg_lw_finalize Argument Table +!! \htmlinclude rrtmg_lw.html +!! + subroutine rrtmg_lw_finalize (mpicomm, mpirank, mpiroot) + ! Inputs + integer, intent(in) :: mpicomm,mpirank,mpiroot + ! Local variables + integer :: ierr + +#ifdef MPI + call MPI_BARRIER(mpicomm, ierr) +#endif + close(47) + end subroutine rrtmg_lw_finalize diff --git a/physics/radlw_main.meta b/physics/radlw_main.meta index 91dabd663..d2f97e6fd 100644 --- a/physics/radlw_main.meta +++ b/physics/radlw_main.meta @@ -1,3 +1,32 @@ +[ccpp-arg-table] + name = rrtmg_lw_init + type = scheme +[mpirank] + standard_name = mpi_rank + long_name = current MPI rank + units = index + dimensions = () + type = integer + intent = in + optional = F +[mpiroot] + standard_name = mpi_root + long_name = master MPI rank + units = index + dimensions = () + type = integer + intent = in + optional = F +[mpicomm] + standard_name = mpi_comm + long_name = MPI communicator + units = index + dimensions = () + type = integer + intent = in + optional = F + +######################################################################## [ccpp-arg-table] name = rrtmg_lw_run type = scheme @@ -406,3 +435,32 @@ type = integer intent = out optional = F + +######################################################################## +[ccpp-arg-table] + name = rrtmg_lw_finalize + type = scheme +[mpirank] + standard_name = mpi_rank + long_name = current MPI rank + units = index + dimensions = () + type = integer + intent = in + optional = F +[mpiroot] + standard_name = mpi_root + long_name = master MPI rank + units = index + dimensions = () + type = integer + intent = in + optional = F +[mpicomm] + standard_name = mpi_comm + long_name = MPI communicator + units = index + dimensions = () + type = integer + intent = in + optional = F \ No newline at end of file diff --git a/physics/rrtmgp_lw_cloud_optics.F90 b/physics/rrtmgp_lw_cloud_optics.F90 index 1961066bc..e6cff091b 100644 --- a/physics/rrtmgp_lw_cloud_optics.F90 +++ b/physics/rrtmgp_lw_cloud_optics.F90 @@ -7,6 +7,9 @@ module rrtmgp_lw_cloud_optics use mo_rrtmg_lw_cloud_optics, only: rrtmg_lw_cloud_optics use rrtmgp_aux, only: check_error_msg use netcdf +#ifdef MPI + use mpi +#endif public rrtmgp_lw_cloud_optics_init, rrtmgp_lw_cloud_optics_run, rrtmgp_lw_cloud_optics_finalize contains @@ -19,9 +22,6 @@ module rrtmgp_lw_cloud_optics !! subroutine rrtmgp_lw_cloud_optics_init(cld_optics_scheme, nrghice, rrtmgp_root_dir, & rrtmgp_lw_file_clouds, mpicomm, mpirank, mpiroot, lw_cloud_props, errmsg, errflg) -#ifdef MPI - use mpi -#endif ! Inputs integer, intent(in) :: & @@ -99,7 +99,10 @@ subroutine rrtmgp_lw_cloud_optics_init(cld_optics_scheme, nrghice, rrtmgp_root_d errmsg = '' errflg = 0 - open(47,file='rrtmgp_clds.txt',status='unknown') + if (mpirank .eq. mpiroot) then + print*,'DJS+ Opening file containing RRTMGP LW cloud fields' + open(47,file='rrtmgp_clds.txt',status='unknown') + endif if (cld_optics_scheme .eq. 0) return @@ -443,8 +446,8 @@ subroutine rrtmgp_lw_cloud_optics_run(doLWrad, nCol, nLev, cld_optics_scheme, nr call rrtmg_lw_cloud_optics(ncol, nLev, lw_gas_props%get_nband(), cld_lwp, & cld_reliq, cld_iwp, cld_reice, cld_rwp, cld_rerain, cld_swp, cld_resnow, & cld_frac, tau_cld) - lw_optical_props_cloudsByBand%tau = tau_cld endif + lw_optical_props_cloudsByBand%tau = tau_cld endif write(47,*) "In rrtmgp_lw_cloud_optics: " @@ -465,7 +468,22 @@ end subroutine rrtmgp_lw_cloud_optics_run ! ######################################################################################### ! SUBROUTINE rrtmgp_lw_cloud_optics_finalize() ! ######################################################################################### - subroutine rrtmgp_lw_cloud_optics_finalize() +!! \section arg_table_rrtmgp_lw_cloud_optics_finalize +!! \htmlinclude rrtmgp_lw_cloud_optics.html +!! + subroutine rrtmgp_lw_cloud_optics_finalize(mpicomm, mpirank, mpiroot) + ! Inputs + integer, intent(in) :: & + mpicomm, & ! MPI communicator + mpirank, & ! Current MPI rank + mpiroot ! Master MPI rank + ! Local variables + integer :: ierr + +#ifdef MPI + call MPI_BARRIER(mpicomm, ierr) +#endif close(47) + end subroutine rrtmgp_lw_cloud_optics_finalize end module rrtmgp_lw_cloud_optics diff --git a/physics/rrtmgp_lw_cloud_optics.meta b/physics/rrtmgp_lw_cloud_optics.meta index 850602d64..47fb602c0 100644 --- a/physics/rrtmgp_lw_cloud_optics.meta +++ b/physics/rrtmgp_lw_cloud_optics.meta @@ -278,3 +278,32 @@ type = integer intent = out optional = F + +######################################################################## +[ccpp-arg-table] + name = rrtmgp_lw_cloud_optics_finalize + type = scheme +[mpirank] + standard_name = mpi_rank + long_name = current MPI rank + units = index + dimensions = () + type = integer + intent = in + optional = F +[mpiroot] + standard_name = mpi_root + long_name = master MPI rank + units = index + dimensions = () + type = integer + intent = in + optional = F +[mpicomm] + standard_name = mpi_comm + long_name = MPI communicator + units = index + dimensions = () + type = integer + intent = in + optional = F \ No newline at end of file diff --git a/physics/rrtmgp_lw_gas_optics.F90 b/physics/rrtmgp_lw_gas_optics.F90 index 84cdb4837..ebf875951 100644 --- a/physics/rrtmgp_lw_gas_optics.F90 +++ b/physics/rrtmgp_lw_gas_optics.F90 @@ -115,6 +115,8 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp errmsg = '' errflg = 0 + write(*,"(a12,3i10)") 'MPI ranks: ',mpirank,mpiroot,mpicomm + ! Filenames are set in the physics_nml lw_gas_props_file = trim(rrtmgp_root_dir)//trim(rrtmgp_lw_file_gas) diff --git a/physics/rrtmgp_sw_rte.F90 b/physics/rrtmgp_sw_rte.F90 index 30ecb309e..6543df9d0 100644 --- a/physics/rrtmgp_sw_rte.F90 +++ b/physics/rrtmgp_sw_rte.F90 @@ -118,6 +118,12 @@ subroutine rrtmgp_sw_rte_run(doSWrad, nCol, nLev, nDay, idxday, coszen, p_lay, t errmsg = '' errflg = 0 + ! Initialize output fluxes + fluxswUP_allsky(:,:) = 0._kind_phys + fluxswDOWN_allsky(:,:) = 0._kind_phys + fluxswUP_clrsky(:,:) = 0._kind_phys + fluxswDOWN_clrsky(:,:) = 0._kind_phys + if (.not. doSWrad) return if (nDay .gt. 0) then @@ -138,12 +144,6 @@ subroutine rrtmgp_sw_rte_run(doSWrad, nCol, nLev, nDay, idxday, coszen, p_lay, t if ( l_scmpsw ) then scmpsw = cmpfsw_type (0., 0., 0., 0., 0., 0.) endif - - ! Initialize fluxes - fluxswUP_allsky(:,:) = 0._kind_phys - fluxswDOWN_allsky(:,:) = 0._kind_phys - fluxswUP_clrsky(:,:) = 0._kind_phys - fluxswDOWN_clrsky(:,:) = 0._kind_phys ! Subset the gas concentrations, only need daylit points. do iGas=1,rrtmgp_nGases @@ -154,6 +154,11 @@ subroutine rrtmgp_sw_rte_run(doSWrad, nCol, nLev, nDay, idxday, coszen, p_lay, t enddo ! Initialize RRTMGP DDT containing 2D(3D) fluxes + fluxSW_up_allsky(:,:,:) = 0._kind_phys + fluxSW_dn_allsky(:,:,:) = 0._kind_phys + fluxSW_dn_dir_allsky(:,:,:) = 0._kind_phys + fluxSW_up_clrsky(:,:,:) = 0._kind_phys + fluxSW_dn_clrsky(:,:,:) = 0._kind_phys flux_allsky%bnd_flux_up => fluxSW_up_allsky flux_allsky%bnd_flux_dn => fluxSW_dn_allsky flux_allsky%bnd_flux_dn_dir => fluxSW_dn_dir_allsky From 5812151340d1263f1a7e0372dc5fb3b1c816e35c Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Tue, 7 Jan 2020 11:21:44 -0700 Subject: [PATCH 116/167] Added some more diagnostics. --- physics/radlw_main.f | 4 ++++ physics/rrtmgp_lw_cloud_optics.F90 | 2 +- physics/rrtmgp_lw_rte.F90 | 10 +++++++++- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/physics/radlw_main.f b/physics/radlw_main.f index d5c7eb460..963372526 100644 --- a/physics/radlw_main.f +++ b/physics/radlw_main.f @@ -1183,6 +1183,10 @@ subroutine rrtmg_lw_run & write(47,"(23f8.2)") plyr(iplon,k),clwp(k),relw(k),ciwp(k), & & reiw(k),taucld(:,k),lon(iplon),lat(iplon) enddo + do k=1,nlay+1 + write(47,"(5f8.2)") plvl(iplon,k),totuflux(k-1),totdflux(k-1)& + & ,totuclfl(k-1),totdclfl(k-1) + enddo topflx(iplon)%upfxc = totuflux(nlay) diff --git a/physics/rrtmgp_lw_cloud_optics.F90 b/physics/rrtmgp_lw_cloud_optics.F90 index e6cff091b..58f3eb9dd 100644 --- a/physics/rrtmgp_lw_cloud_optics.F90 +++ b/physics/rrtmgp_lw_cloud_optics.F90 @@ -447,8 +447,8 @@ subroutine rrtmgp_lw_cloud_optics_run(doLWrad, nCol, nLev, cld_optics_scheme, nr cld_reliq, cld_iwp, cld_reice, cld_rwp, cld_rerain, cld_swp, cld_resnow, & cld_frac, tau_cld) endif - lw_optical_props_cloudsByBand%tau = tau_cld endif + lw_optical_props_cloudsByBand%tau = tau_cld write(47,*) "In rrtmgp_lw_cloud_optics: " write(47,*),"nCol: ",nCol diff --git a/physics/rrtmgp_lw_rte.F90 b/physics/rrtmgp_lw_rte.F90 index a4989237e..568b48ad7 100644 --- a/physics/rrtmgp_lw_rte.F90 +++ b/physics/rrtmgp_lw_rte.F90 @@ -76,7 +76,7 @@ subroutine rrtmgp_lw_rte_run(doLWrad, nCol, nLev, p_lay, t_lay, p_lev, skt, lw_g ! Local variables integer :: & - iCol, iBand + iCol, iBand, iLay type(ty_fluxes_byband) :: & flux_allsky, flux_clrsky real(kind_phys), dimension(ncol,nLev+1,lw_gas_props%get_nband()),target :: & @@ -157,6 +157,14 @@ subroutine rrtmgp_lw_rte_run(doLWrad, nCol, nLev, p_lay, t_lay, p_lev, skt, lw_g !if (l_AllSky_HR_byband) then !endif + write(47,*) "In rrtmgp_lw_rte: " + do iCol=1,nCol + do iLay=1,nLev+1 + write(47,"(5f8.2)") p_lev(iCol,iLay)/100.,fluxlwUP_allsky(iCol,iLay),fluxlwDOWN_allsky(iCol,iLay),& + fluxlwUP_clrsky(iCol,iLay),fluxlwDOWN_clrsky(iCol,iLay) + enddo + enddo + end subroutine rrtmgp_lw_rte_run ! ######################################################################################### From 6c8ecdd910d935a526ac430405ec914b1491aa0a Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Mon, 13 Jan 2020 12:49:13 -0700 Subject: [PATCH 117/167] Try overwriting cloud optical depth in bands1-2. --- physics/radlw_main.f | 2 + physics/rrtmgp_lw_cloud_optics.F90 | 193 ++++++++++++++-------------- physics/rrtmgp_sw_cloud_optics.F90 | 194 ++++++++++++++--------------- 3 files changed, 197 insertions(+), 192 deletions(-) diff --git a/physics/radlw_main.f b/physics/radlw_main.f index 963372526..9cc7c0a28 100644 --- a/physics/radlw_main.f +++ b/physics/radlw_main.f @@ -1039,6 +1039,8 @@ subroutine rrtmg_lw_run & & cldfmc, taucld & & ) + taucld(2,:) = taucld(1,:) + ! --- ... save computed layer cloud optical depth for output ! rrtm band-7 is apprx 10mu channel (or use spectral mean of bands 6-8) diff --git a/physics/rrtmgp_lw_cloud_optics.F90 b/physics/rrtmgp_lw_cloud_optics.F90 index 58f3eb9dd..7a86c2918 100644 --- a/physics/rrtmgp_lw_cloud_optics.F90 +++ b/physics/rrtmgp_lw_cloud_optics.F90 @@ -110,7 +110,7 @@ subroutine rrtmgp_lw_cloud_optics_init(cld_optics_scheme, nrghice, rrtmgp_root_d lw_cloud_props_file = trim(rrtmgp_root_dir)//trim(rrtmgp_lw_file_clouds) ! Read dimensions for k-distribution fields (only on master processor(0)) - if (mpirank .eq. mpiroot) then +! if (mpirank .eq. mpiroot) then if(nf90_open(trim(lw_cloud_props_file), NF90_WRITE, ncid_lw_clds) == NF90_NOERR) then status = nf90_inq_dimid(ncid_lw_clds, 'nband', dimid) status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=nbandLWcldy) @@ -137,28 +137,28 @@ subroutine rrtmgp_lw_cloud_optics_init(cld_optics_scheme, nrghice, rrtmgp_root_d if (nrghice .gt. nrghice_lw) then errmsg = 'Number of RRTMGP ice-roughness categories requested in namelist file is not allowed' endif - endif +! endif ! Broadcast dimensions to all processors -#ifdef MPI - call MPI_BCAST(nbandSWcldy_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - if (cld_optics_scheme .eq. 1) then - call MPI_BARRIER(mpicomm, ierr) - call MPI_BCAST(nrghice_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nsize_liq_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nsize_ice_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BARRIER(mpicomm, ierr) - endif - if (cld_optics_scheme .eq. 2) then - call MPI_BARRIER(mpicomm, ierr) - call MPI_BCAST(nrghice_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nsizereg_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(ncoeff_ext_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(ncoeff_ssa_g_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nbound_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BARRIER(mpicomm, ierr) - endif -#endif +!#ifdef MPI +! call MPI_BCAST(nbandSWcldy_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! if (cld_optics_scheme .eq. 1) then +! call MPI_BARRIER(mpicomm, ierr) +! call MPI_BCAST(nrghice_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(nsize_liq_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(nsize_ice_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BARRIER(mpicomm, ierr) +! endif +! if (cld_optics_scheme .eq. 2) then +! call MPI_BARRIER(mpicomm, ierr) +! call MPI_BCAST(nrghice_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(nsizereg_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(ncoeff_ext_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(ncoeff_ssa_g_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(nbound_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BARRIER(mpicomm, ierr) +! endif +!#endif if (Cld_optics_scheme .eq. 1) then allocate(lut_extliq(nsize_liq, nBandLWcldy)) @@ -186,7 +186,7 @@ subroutine rrtmgp_lw_cloud_optics_init(cld_optics_scheme, nrghice, rrtmgp_root_d endif ! On master processor, allocate space, read in fields, broadcast to all processors - if (mpirank .eq. mpiroot) then +! if (mpirank .eq. mpiroot) then if (Cld_optics_scheme .eq. 1) then write (*,*) 'Reading RRTMGP longwave cloud data (LUT) ... ' if(nf90_open(trim(lw_cloud_props_file), NF90_WRITE, ncid_lw_clds) == NF90_NOERR) then @@ -264,79 +264,79 @@ subroutine rrtmgp_lw_cloud_optics_init(cld_optics_scheme, nrghice, rrtmgp_root_d status = nf90_close(ncid_lw_clds) endif endif - endif +! endif ! Broadcast arrays to all processors -#ifdef MPI - if (cld_optics_scheme .eq. 1) then - if (mpirank==mpiroot) write (*,*) 'Broadcasting RRTMGP shortwave cloud data (LUT) ... ' - call MPI_BARRIER(mpicomm, ierr) -#ifndef SINGLE_PREC - call MPI_BCAST(radliq_lwr, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(radliq_upr, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(radliq_fac, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(radice_lwr, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(radice_upr, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(radice_fac, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_extliq, size(lut_extliq), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_ssaliq, size(lut_ssaliq), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_asyliq, size(lut_asyliq), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_extice, size(lut_extice), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_ssaice, size(lut_ssaice), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_asyice, size(lut_asyice), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(band_lims_cldy, size(band_lims_cldy), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -#else - call MPI_BCAST(radliq_lwr, 1, MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(radliq_upr, 1, MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(radliq_fac, 1, MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(radice_lwr, 1, MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(radice_upr, 1, MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(radice_fac, 1, MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_extliq, size(lut_extliq), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_ssaliq, size(lut_ssaliq), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_asyliq, size(lut_asyliq), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_extice, size(lut_extice), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_ssaice, size(lut_ssaice), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_asyice, size(lut_asyice), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(band_lims_cldy, size(band_lims_cldy), MPI_REAL, mpiroot, mpicomm, ierr) -#endif - call MPI_BARRIER(mpicomm, ierr) - endif - if (cld_optics_scheme .eq. 2) then - if (mpirank==mpiroot) write (*,*) 'Broadcasting RRTMGP shortwave cloud data (PADE) ... ' - call MPI_BARRIER(mpicomm, ierr) -#ifndef SINGLE_PREC - call MPI_BCAST(pade_extliq, size(pade_extliq), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_ssaliq, size(pade_ssaliq), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_asyliq, size(pade_asyliq), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_extice, size(pade_extice), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_ssaice, size(pade_ssaice), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_asyice, size(pade_asyice), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_extliq, size(pade_sizereg_extliq), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_ssaliq, size(pade_sizereg_ssaliq), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_asyliq, size(pade_sizereg_asyliq), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_extice, size(pade_sizereg_extice), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_ssaice, size(pade_sizereg_ssaice), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_asyice, size(pade_sizereg_asyice), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(band_lims_cldy, size(band_lims_cldy), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -#else - call MPI_BCAST(pade_extliq, size(pade_extliq), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_ssaliq, size(pade_ssaliq), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_asyliq, size(pade_asyliq), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_extice, size(pade_extice), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_ssaice, size(pade_ssaice), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_asyice, size(pade_asyice), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_extliq, size(pade_sizereg_extliq), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_ssaliq, size(pade_sizereg_ssaliq), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_asyliq, size(pade_sizereg_asyliq), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_extice, size(pade_sizereg_extice), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_ssaice, size(pade_sizereg_ssaice), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_asyice, size(pade_sizereg_asyice), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(band_lims_cldy, size(band_lims_cldy), MPI_REAL, mpiroot, mpicomm, ierr) -#endif - call MPI_BARRIER(mpicomm, ierr) - endif -#endif +!#ifdef MPI +! if (cld_optics_scheme .eq. 1) then +! if (mpirank==mpiroot) write (*,*) 'Broadcasting RRTMGP shortwave cloud data (LUT) ... ' +! call MPI_BARRIER(mpicomm, ierr) +!#ifndef SINGLE_PREC +! call MPI_BCAST(radliq_lwr, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(radliq_upr, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(radliq_fac, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(radice_lwr, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(radice_upr, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(radice_fac, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(lut_extliq, size(lut_extliq), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(lut_ssaliq, size(lut_ssaliq), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(lut_asyliq, size(lut_asyliq), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(lut_extice, size(lut_extice), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(lut_ssaice, size(lut_ssaice), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(lut_asyice, size(lut_asyice), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(band_lims_cldy, size(band_lims_cldy), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +!#else +! call MPI_BCAST(radliq_lwr, 1, MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(radliq_upr, 1, MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(radliq_fac, 1, MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(radice_lwr, 1, MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(radice_upr, 1, MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(radice_fac, 1, MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(lut_extliq, size(lut_extliq), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(lut_ssaliq, size(lut_ssaliq), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(lut_asyliq, size(lut_asyliq), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(lut_extice, size(lut_extice), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(lut_ssaice, size(lut_ssaice), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(lut_asyice, size(lut_asyice), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(band_lims_cldy, size(band_lims_cldy), MPI_REAL, mpiroot, mpicomm, ierr) +!#endif +! call MPI_BARRIER(mpicomm, ierr) +! endif +! if (cld_optics_scheme .eq. 2) then +! if (mpirank==mpiroot) write (*,*) 'Broadcasting RRTMGP shortwave cloud data (PADE) ... ' +! call MPI_BARRIER(mpicomm, ierr) +!#ifndef SINGLE_PREC +! call MPI_BCAST(pade_extliq, size(pade_extliq), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(pade_ssaliq, size(pade_ssaliq), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(pade_asyliq, size(pade_asyliq), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(pade_extice, size(pade_extice), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(pade_ssaice, size(pade_ssaice), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(pade_asyice, size(pade_asyice), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(pade_sizereg_extliq, size(pade_sizereg_extliq), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(pade_sizereg_ssaliq, size(pade_sizereg_ssaliq), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(pade_sizereg_asyliq, size(pade_sizereg_asyliq), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(pade_sizereg_extice, size(pade_sizereg_extice), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(pade_sizereg_ssaice, size(pade_sizereg_ssaice), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(pade_sizereg_asyice, size(pade_sizereg_asyice), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(band_lims_cldy, size(band_lims_cldy), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +!#else +! call MPI_BCAST(pade_extliq, size(pade_extliq), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(pade_ssaliq, size(pade_ssaliq), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(pade_asyliq, size(pade_asyliq), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(pade_extice, size(pade_extice), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(pade_ssaice, size(pade_ssaice), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(pade_asyice, size(pade_asyice), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(pade_sizereg_extliq, size(pade_sizereg_extliq), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(pade_sizereg_ssaliq, size(pade_sizereg_ssaliq), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(pade_sizereg_asyliq, size(pade_sizereg_asyliq), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(pade_sizereg_extice, size(pade_sizereg_extice), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(pade_sizereg_ssaice, size(pade_sizereg_ssaice), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(pade_sizereg_asyice, size(pade_sizereg_asyice), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(band_lims_cldy, size(band_lims_cldy), MPI_REAL, mpiroot, mpicomm, ierr) +!#endif +! call MPI_BARRIER(mpicomm, ierr) +! endif +!#endif ! Load tables data for RRTMGP cloud-optics if (cld_optics_scheme .eq. 1) then @@ -423,6 +423,7 @@ subroutine rrtmgp_lw_cloud_optics_run(doLWrad, nCol, nLev, cld_optics_scheme, nr ! Cloud optics [nCol,nLev,nBands] call check_error_msg('rrtmgp_lw_cloud_optics_run',lw_optical_props_cloudsByBand%alloc_1scl(& ncol, nLev, lw_gas_props%get_band_lims_wavenumber())) + lw_optical_props_cloudsByBand%tau(:,:,:) = 0._kind_phys ! Compute cloud-optics for RTE. if (rrtmgp_cld_optics .gt. 0) then @@ -447,8 +448,8 @@ subroutine rrtmgp_lw_cloud_optics_run(doLWrad, nCol, nLev, cld_optics_scheme, nr cld_reliq, cld_iwp, cld_reice, cld_rwp, cld_rerain, cld_swp, cld_resnow, & cld_frac, tau_cld) endif - endif - lw_optical_props_cloudsByBand%tau = tau_cld + lw_optical_props_cloudsByBand%tau = tau_cld + endif write(47,*) "In rrtmgp_lw_cloud_optics: " write(47,*),"nCol: ",nCol @@ -460,6 +461,8 @@ subroutine rrtmgp_lw_cloud_optics_run(doLWrad, nCol, nLev, cld_optics_scheme, nr enddo enddo + lw_optical_props_cloudsByBand%tau(:,:,2) = lw_optical_props_cloudsByBand%tau(:,:,1) + ! All-sky LW optical depth ~10microns cldtaulw = lw_optical_props_cloudsByBand%tau(:,:,7) diff --git a/physics/rrtmgp_sw_cloud_optics.F90 b/physics/rrtmgp_sw_cloud_optics.F90 index 377425a48..ab0ad497b 100644 --- a/physics/rrtmgp_sw_cloud_optics.F90 +++ b/physics/rrtmgp_sw_cloud_optics.F90 @@ -104,7 +104,7 @@ subroutine rrtmgp_sw_cloud_optics_init(cld_optics_scheme, nrghice, rrtmgp_root_d sw_cloud_props_file = trim(rrtmgp_root_dir)//trim(rrtmgp_sw_file_clouds) ! Read dimensions for k-distribution fields (only on master processor(0)) - if (mpirank .eq. mpiroot) then +! if (mpirank .eq. mpiroot) then if(nf90_open(trim(sw_cloud_props_file), NF90_WRITE, ncid_sw_clds) == NF90_NOERR) then status = nf90_inq_dimid(ncid_sw_clds, 'nband', dimid) status = nf90_inquire_dimension(ncid_sw_clds, dimid, len=nbandSWcldy_sw) @@ -130,28 +130,28 @@ subroutine rrtmgp_sw_cloud_optics_init(cld_optics_scheme, nrghice, rrtmgp_root_d if (nrghice .gt. nrghice_sw) then errmsg = 'Number of RRTMGP ice-roughness categories requested in namelist file is not allowed' endif - endif +! endif ! Broadcast dimensions to all processors -#ifdef MPI - call MPI_BCAST(nbandSWcldy_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - if (cld_optics_scheme .eq. 1) then - call MPI_BARRIER(mpicomm, ierr) - call MPI_BCAST(nrghice_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nsize_liq_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nsize_ice_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BARRIER(mpicomm, ierr) - endif - if (cld_optics_scheme .eq. 2) then - call MPI_BARRIER(mpicomm, ierr) - call MPI_BCAST(nrghice_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nsizereg_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(ncoeff_ext_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(ncoeff_ssa_g_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BCAST(nbound_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) - call MPI_BARRIER(mpicomm, ierr) - endif -#endif +!#ifdef MPI +! call MPI_BCAST(nbandSWcldy_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! if (cld_optics_scheme .eq. 1) then +! call MPI_BARRIER(mpicomm, ierr) +! call MPI_BCAST(nrghice_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(nsize_liq_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(nsize_ice_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BARRIER(mpicomm, ierr) +! endif +! if (cld_optics_scheme .eq. 2) then +! call MPI_BARRIER(mpicomm, ierr) +! call MPI_BCAST(nrghice_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(nsizereg_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(ncoeff_ext_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(ncoeff_ssa_g_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BCAST(nbound_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) +! call MPI_BARRIER(mpicomm, ierr) +! endif +!#endif if (cld_optics_scheme .eq. 1) then allocate(lut_extliq_sw(nsize_liq_sw, nBandSWcldy_sw)) @@ -178,7 +178,7 @@ subroutine rrtmgp_sw_cloud_optics_init(cld_optics_scheme, nrghice, rrtmgp_root_d allocate(band_lims_cldy_sw(2,nbandSWcldy_sw)) ! On master processor, allocate space, read in fields, broadcast to all processors - if (mpirank .eq. mpiroot) then +! if (mpirank .eq. mpiroot) then if (cld_optics_scheme .eq. 1) then write (*,*) 'Reading RRTMGP shortwave cloud data (LUT) ... ' if(nf90_open(trim(sw_cloud_props_file), NF90_WRITE, ncid_sw_clds) == NF90_NOERR) then @@ -256,79 +256,79 @@ subroutine rrtmgp_sw_cloud_optics_init(cld_optics_scheme, nrghice, rrtmgp_root_d status = nf90_close(ncid_sw_clds) endif endif - endif +! endif ! Broadcast arrays to all processors -#ifdef MPI - if (cld_optics_scheme .eq. 1) then - if (mpirank==mpiroot) write (*,*) 'Broadcasting RRTMGP shortwave cloud data (LUT) ... ' - call MPI_BARRIER(mpicomm, ierr) -#ifndef SINGLE_PREC - call MPI_BCAST(radliq_lwr_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(radliq_upr_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(radliq_fac_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(radice_lwr_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(radice_upr_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(radice_fac_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_extliq_sw, size(lut_extliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_ssaliq_sw, size(lut_ssaliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_asyliq_sw, size(lut_asyliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_extice_sw, size(lut_extice_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_ssaice_sw, size(lut_ssaice_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_asyice_sw, size(lut_asyice_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(band_lims_cldy_sw, size(band_lims_cldy_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -#else - call MPI_BCAST(radliq_lwr_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(radliq_upr_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(radliq_fac_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(radice_lwr_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(radice_upr_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(radice_fac_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_extliq_sw, size(lut_extliq_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_ssaliq_sw, size(lut_ssaliq_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_asyliq_sw, size(lut_asyliq_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_extice_sw, size(lut_extice_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_ssaice_sw, size(lut_ssaice_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(lut_asyice_sw, size(lut_asyice_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(band_lims_cldy_sw, size(band_lims_cldy_sw), MPI_REAL, mpiroot, mpicomm, ierr) -#endif - call MPI_BARRIER(mpicomm, ierr) - endif - if (cld_optics_scheme .eq. 2) then - if (mpirank==mpiroot) write (*,*) 'Broadcasting RRTMGP shortwave cloud data (PADE) ... ' - call MPI_BARRIER(mpicomm, ierr) -#ifndef SINGLE_PREC - call MPI_BCAST(pade_extliq_sw, size(pade_extliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_ssaliq_sw, size(pade_ssaliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_asyliq_sw, size(pade_asyliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_extice_sw, size(pade_extice_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_ssaice_sw, size(pade_ssaice_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_asyice_sw, size(pade_asyice_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_extliq_sw, size(pade_sizereg_extliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_ssaliq_sw, size(pade_sizereg_ssaliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_asyliq_sw, size(pade_sizereg_asyliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_extice_sw, size(pade_sizereg_extice_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_ssaice_sw, size(pade_sizereg_ssaice_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_asyice_sw, size(pade_sizereg_asyice_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) - call MPI_BCAST(band_lims_cldy_sw, size(band_lims_cldy_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -#else - call MPI_BCAST(pade_extliq_sw, size(pade_extliq_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_ssaliq_sw, size(pade_ssaliq_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_asyliq_sw, size(pade_asyliq_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_extice_sw, size(pade_extice_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_ssaice_sw, size(pade_ssaice_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_asyice_sw, size(pade_asyice_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_extliq_sw, size(pade_sizereg_extliq_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_ssaliq_sw, size(pade_sizereg_ssaliq_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_asyliq_sw, size(pade_sizereg_asyliq_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_extice_sw, size(pade_sizereg_extice_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_ssaice_sw, size(pade_sizereg_ssaice_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(pade_sizereg_asyice_sw, size(pade_sizereg_asyice_sw), MPI_REAL, mpiroot, mpicomm, ierr) - call MPI_BCAST(band_lims_cldy_sw, size(band_lims_cldy_sw), MPI_REAL, mpiroot, mpicomm, ierr) -#endif - call MPI_BARRIER(mpicomm, ierr) - endif -#endif +!#ifdef MPI +! if (cld_optics_scheme .eq. 1) then +! if (mpirank==mpiroot) write (*,*) 'Broadcasting RRTMGP shortwave cloud data (LUT) ... ' +! call MPI_BARRIER(mpicomm, ierr) +!#ifndef SINGLE_PREC +! call MPI_BCAST(radliq_lwr_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(radliq_upr_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(radliq_fac_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(radice_lwr_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(radice_upr_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(radice_fac_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(lut_extliq_sw, size(lut_extliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(lut_ssaliq_sw, size(lut_ssaliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(lut_asyliq_sw, size(lut_asyliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(lut_extice_sw, size(lut_extice_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(lut_ssaice_sw, size(lut_ssaice_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(lut_asyice_sw, size(lut_asyice_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(band_lims_cldy_sw, size(band_lims_cldy_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +!#else +! call MPI_BCAST(radliq_lwr_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(radliq_upr_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(radliq_fac_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(radice_lwr_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(radice_upr_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(radice_fac_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(lut_extliq_sw, size(lut_extliq_sw), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(lut_ssaliq_sw, size(lut_ssaliq_sw), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(lut_asyliq_sw, size(lut_asyliq_sw), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(lut_extice_sw, size(lut_extice_sw), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(lut_ssaice_sw, size(lut_ssaice_sw), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(lut_asyice_sw, size(lut_asyice_sw), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(band_lims_cldy_sw, size(band_lims_cldy_sw), MPI_REAL, mpiroot, mpicomm, ierr) +!#endif +! call MPI_BARRIER(mpicomm, ierr) +! endif +! if (cld_optics_scheme .eq. 2) then +! if (mpirank==mpiroot) write (*,*) 'Broadcasting RRTMGP shortwave cloud data (PADE) ... ' +! call MPI_BARRIER(mpicomm, ierr) +!#ifndef SINGLE_PREC +! call MPI_BCAST(pade_extliq_sw, size(pade_extliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(pade_ssaliq_sw, size(pade_ssaliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(pade_asyliq_sw, size(pade_asyliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(pade_extice_sw, size(pade_extice_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(pade_ssaice_sw, size(pade_ssaice_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(pade_asyice_sw, size(pade_asyice_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(pade_sizereg_extliq_sw, size(pade_sizereg_extliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(pade_sizereg_ssaliq_sw, size(pade_sizereg_ssaliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(pade_sizereg_asyliq_sw, size(pade_sizereg_asyliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(pade_sizereg_extice_sw, size(pade_sizereg_extice_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(pade_sizereg_ssaice_sw, size(pade_sizereg_ssaice_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(pade_sizereg_asyice_sw, size(pade_sizereg_asyice_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +! call MPI_BCAST(band_lims_cldy_sw, size(band_lims_cldy_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) +!#else +! call MPI_BCAST(pade_extliq_sw, size(pade_extliq_sw), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(pade_ssaliq_sw, size(pade_ssaliq_sw), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(pade_asyliq_sw, size(pade_asyliq_sw), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(pade_extice_sw, size(pade_extice_sw), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(pade_ssaice_sw, size(pade_ssaice_sw), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(pade_asyice_sw, size(pade_asyice_sw), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(pade_sizereg_extliq_sw, size(pade_sizereg_extliq_sw), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(pade_sizereg_ssaliq_sw, size(pade_sizereg_ssaliq_sw), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(pade_sizereg_asyliq_sw, size(pade_sizereg_asyliq_sw), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(pade_sizereg_extice_sw, size(pade_sizereg_extice_sw), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(pade_sizereg_ssaice_sw, size(pade_sizereg_ssaice_sw), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(pade_sizereg_asyice_sw, size(pade_sizereg_asyice_sw), MPI_REAL, mpiroot, mpicomm, ierr) +! call MPI_BCAST(band_lims_cldy_sw, size(band_lims_cldy_sw), MPI_REAL, mpiroot, mpicomm, ierr) +!#endif +! call MPI_BARRIER(mpicomm, ierr) +! endif +!#endif ! Load tables data for RRTMGP cloud-optics if (cld_optics_scheme .eq. 1) then @@ -415,7 +415,10 @@ subroutine rrtmgp_sw_cloud_optics_run(doSWrad, nCol, nLev, nDay, idxday, nrghice ! Cloud optics [nday,nLev,nBands] call check_error_msg('rrtmgp_sw_cloud_optics_run',sw_optical_props_cloudsByBand%alloc_2str(& nday, nLev, sw_gas_props%get_band_lims_wavenumber())) - + sw_optical_props_cloudsByBand%tau(:,:,:) = 0._kind_phys + sw_optical_props_cloudsByBand%ssa(:,:,:) = 0._kind_phys + sw_optical_props_cloudsByBand%g(:,:,:) = 0._kind_phys + ! Compute cloud-optics for RTE. if (cld_optics_scheme .gt. 0) then ! RRTMGP cloud-optics. @@ -435,9 +438,6 @@ subroutine rrtmgp_sw_cloud_optics_run(doSWrad, nCol, nLev, nDay, idxday, nrghice else ! RRTMG cloud-optics if (any(cld_frac .gt. 0)) then - sw_optical_props_cloudsByBand%tau(:,:,:) = 0._kind_phys - sw_optical_props_cloudsByBand%ssa(:,:,:) = 0._kind_phys - sw_optical_props_cloudsByBand%g(:,:,:) = 0._kind_phys call rrtmg_sw_cloud_optics(nday, nLev, sw_gas_props%get_nband(), & cld_lwp(idxday(1:nday),:), cld_reliq(idxday(1:nday),:), & cld_iwp(idxday(1:nday),:), cld_reice(idxday(1:nday),:), & From 64691a6e755b3286f6b49518e99a64831f2459bd Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Tue, 14 Jan 2020 10:54:02 -0700 Subject: [PATCH 118/167] Added by-band lw fluxes to diagnostic output. New namelist parameter for RRTMGP: number of gaussian angles for quadrature calculation. --- physics/radlw_main.f | 9 ++++++-- physics/rrtmgp_lw_cloud_optics.F90 | 14 ++++++------- physics/rrtmgp_lw_rte.F90 | 33 ++++++++++++++++-------------- physics/rrtmgp_lw_rte.meta | 10 ++++++++- 4 files changed, 41 insertions(+), 25 deletions(-) diff --git a/physics/radlw_main.f b/physics/radlw_main.f index 9cc7c0a28..c34a1f77d 100644 --- a/physics/radlw_main.f +++ b/physics/radlw_main.f @@ -1039,7 +1039,7 @@ subroutine rrtmg_lw_run & & cldfmc, taucld & & ) - taucld(2,:) = taucld(1,:) +!djs taucld(2,:) = taucld(1,:) ! --- ... save computed layer cloud optical depth for output ! rrtm band-7 is apprx 10mu channel (or use spectral mean of bands 6-8) @@ -3690,7 +3690,6 @@ subroutine rtrnmc & !> -# Process longwave output from band for total and clear streams. !! Calculate upward, downward, and net flux. - flxfac = wtdiff * fluxfac do k = 0, nlay @@ -3707,6 +3706,12 @@ subroutine rtrnmc & totdclfl(k) = totdclfl(k) * flxfac enddo + + do k=0,nlay + write(47,"(32f8.2)") toturad(k,:)*flxfac, & + & totdrad(k,:)*flxfac + enddo + !> -# Calculate net fluxes and heating rates. fnet(0) = totuflux(0) - totdflux(0) diff --git a/physics/rrtmgp_lw_cloud_optics.F90 b/physics/rrtmgp_lw_cloud_optics.F90 index 7a86c2918..7e546acd0 100644 --- a/physics/rrtmgp_lw_cloud_optics.F90 +++ b/physics/rrtmgp_lw_cloud_optics.F90 @@ -433,12 +433,12 @@ subroutine rrtmgp_lw_cloud_optics_run(doLWrad, nCol, nLev, cld_optics_scheme, nr nLev, & ! IN - Number of vertical layers lw_cloud_props%get_nband(), & ! IN - Number of LW bands nrghice, & ! IN - Number of ice-roughness categories - liqmask, & ! IN - Liquid-cloud mask - icemask, & ! IN - Ice-cloud mask - cld_lwp, & ! IN - Cloud liquid water path - cld_iwp, & ! IN - Cloud ice water path - cld_reliq, & ! IN - Cloud liquid effective radius - cld_reice, & ! IN - Cloud ice effective radius + liqmask, & ! IN - Liquid-cloud mask (1) + icemask, & ! IN - Ice-cloud mask (1) + cld_lwp, & ! IN - Cloud liquid water path (g/m2) + cld_iwp, & ! IN - Cloud ice water path (g/m2) + cld_reliq, & ! IN - Cloud liquid effective radius (microns) + cld_reice, & ! IN - Cloud ice effective radius (microns) lw_optical_props_cloudsByBand)) ! OUT - RRTMGP DDT containing cloud radiative properties ! in each band else @@ -461,7 +461,7 @@ subroutine rrtmgp_lw_cloud_optics_run(doLWrad, nCol, nLev, cld_optics_scheme, nr enddo enddo - lw_optical_props_cloudsByBand%tau(:,:,2) = lw_optical_props_cloudsByBand%tau(:,:,1) + !lw_optical_props_cloudsByBand%tau(:,:,2) = lw_optical_props_cloudsByBand%tau(:,:,1) ! All-sky LW optical depth ~10microns cldtaulw = lw_optical_props_cloudsByBand%tau(:,:,7) diff --git a/physics/rrtmgp_lw_rte.F90 b/physics/rrtmgp_lw_rte.F90 index 568b48ad7..3f2651e79 100644 --- a/physics/rrtmgp_lw_rte.F90 +++ b/physics/rrtmgp_lw_rte.F90 @@ -28,7 +28,7 @@ end subroutine rrtmgp_lw_rte_init !! subroutine rrtmgp_lw_rte_run(doLWrad, nCol, nLev, p_lay, t_lay, p_lev, skt, lw_gas_props, & sfc_emiss_byband, sources, lw_optical_props_clrsky, lw_optical_props_clouds, & - lw_optical_props_aerosol, secdiff, fluxlwUP_allsky, fluxlwDOWN_allsky, & + lw_optical_props_aerosol, secdiff, nGauss_angles, fluxlwUP_allsky, fluxlwDOWN_allsky,& fluxlwUP_clrsky, fluxlwDOWN_clrsky, hlw0, hlwb, errmsg, errflg) ! Inputs @@ -36,7 +36,8 @@ subroutine rrtmgp_lw_rte_run(doLWrad, nCol, nLev, p_lay, t_lay, p_lev, skt, lw_g doLWrad ! Logical flag for longwave radiation call integer, intent(in) :: & nCol, & ! Number of horizontal gridpoints - nLev ! Number of vertical levels + nLev, & ! Number of vertical levels + nGauss_angles ! Number of angles used in Gaussian quadrature real(kind_phys), dimension(ncol,nLev), intent(in) :: & p_lay, & ! Pressure @ model layer-centers (hPa) t_lay ! Temperature (K) @@ -51,9 +52,9 @@ subroutine rrtmgp_lw_rte_run(doLWrad, nCol, nLev, p_lay, t_lay, p_lev, skt, lw_g type(ty_source_func_lw),intent(in) :: & sources ! RRTMGP DDT: longwave source functions type(ty_optical_props_1scl),intent(inout) :: & + lw_optical_props_clouds, & ! RRTMGP DDT: longwave cloud radiative properties lw_optical_props_clrsky ! RRTMGP DDT: longwave clear-sky radiative properties type(ty_optical_props_1scl),intent(in) :: & - lw_optical_props_clouds, & ! RRTMGP DDT: longwave cloud radiative properties lw_optical_props_aerosol ! RRTMGP DDT: longwave aerosol radiative properties real(kind_phys), dimension(lw_gas_props%get_nband(),ncol),intent(in) :: & secdiff @@ -119,11 +120,12 @@ subroutine rrtmgp_lw_rte_run(doLWrad, nCol, nLev, p_lay, t_lay, p_lev, skt, lw_g ! Call RTE solver if (l_ClrSky_HR) then call check_error_msg('rrtmgp_lw_rte_run',rte_lw( & - lw_optical_props_clrsky, & ! IN - optical-properties - top_at_1, & ! IN - veritcal ordering flag - sources, & ! IN - source function - sfc_emiss_byband, & ! IN - surface emissivity in each LW band - flux_clrsky,n_gauss_angles=3)) + lw_optical_props_clrsky, & ! IN - optical-properties + top_at_1, & ! IN - veritcal ordering flag + sources, & ! IN - source function + sfc_emiss_byband, & ! IN - surface emissivity in each LW band + flux_clrsky, & ! OUT - Fluxes + n_gauss_angles = nGauss_angles)) ! Store fluxes fluxlwUP_clrsky = sum(flux_clrsky%bnd_flux_up,dim=3) fluxlwDOWN_clrsky = sum(flux_clrsky%bnd_flux_dn,dim=3) @@ -136,7 +138,7 @@ subroutine rrtmgp_lw_rte_run(doLWrad, nCol, nLev, p_lay, t_lay, p_lev, skt, lw_g ! Apply diffusivity angle adjustment (RRTMG legacy) do iCol=1,nCol do iBand=1,lw_gas_props%get_nband() - lw_optical_props_clrsky%tau(iCol,1:nLev,iBand) = lw_optical_props_clrsky%tau(iCol,1:nLev,iBand)*secdiff(iBand,iCol) + lw_optical_props_clouds%tau(iCol,1:nLev,iBand) = lw_optical_props_clouds%tau(iCol,1:nLev,iBand)*secdiff(iBand,iCol) enddo enddo ! Add cloud optics to clear-sky optics @@ -144,11 +146,12 @@ subroutine rrtmgp_lw_rte_run(doLWrad, nCol, nLev, p_lay, t_lay, p_lev, skt, lw_g ! Call RTE solver call check_error_msg('rrtmgp_lw_rte_run',rte_lw( & - lw_optical_props_clrsky, & ! IN - optical-properties - top_at_1, & ! IN - veritcal ordering flag - sources, & ! IN - source function - sfc_emiss_byband, & ! IN - surface emissivity in each LW band - flux_allsky,n_gauss_angles=3)) + lw_optical_props_clrsky, & ! IN - optical-properties + top_at_1, & ! IN - veritcal ordering flag + sources, & ! IN - source function + sfc_emiss_byband, & ! IN - surface emissivity in each LW band + flux_allsky, & ! OUT - Flxues + n_gauss_angles = nGauss_angles)) ! Store fluxes fluxlwUP_allsky = sum(flux_allsky%bnd_flux_up,dim=3) fluxlwDOWN_allsky = sum(flux_allsky%bnd_flux_dn,dim=3) @@ -160,7 +163,7 @@ subroutine rrtmgp_lw_rte_run(doLWrad, nCol, nLev, p_lay, t_lay, p_lev, skt, lw_g write(47,*) "In rrtmgp_lw_rte: " do iCol=1,nCol do iLay=1,nLev+1 - write(47,"(5f8.2)") p_lev(iCol,iLay)/100.,fluxlwUP_allsky(iCol,iLay),fluxlwDOWN_allsky(iCol,iLay),& + write(47,"(35f8.2)") p_lev(iCol,iLay)/100.,flux_allsky%bnd_flux_up(iCol,iLay,:),flux_allsky%bnd_flux_dn(iCol,iLay,:),& fluxlwUP_clrsky(iCol,iLay),fluxlwDOWN_clrsky(iCol,iLay) enddo enddo diff --git a/physics/rrtmgp_lw_rte.meta b/physics/rrtmgp_lw_rte.meta index 7083586cf..c0aaee09f 100644 --- a/physics/rrtmgp_lw_rte.meta +++ b/physics/rrtmgp_lw_rte.meta @@ -25,6 +25,14 @@ type = integer intent = in optional = F +[nGauss_angles] + standard_name = number_of_angles_used_in_gaussian_quadrature + long_name = Number of angles used in Gaussian quadrature + units = count + dimensions = () + type = integer + intent = in + optional = F [p_lay] standard_name = air_pressure_at_layer_for_RRTMGP_in_hPa long_name = air pressure layer @@ -92,7 +100,7 @@ units = DDT dimensions = () type = ty_optical_props_1scl - intent = in + intent = inout optional = F [lw_optical_props_aerosol] standard_name = longwave_optical_properties_for_aerosols From 320907ff03f5545a3825fb50efbfff803d1eb14b Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Tue, 21 Jan 2020 15:43:21 -0700 Subject: [PATCH 119/167] Bug fix. --- physics/rrtmgp_lw_cloud_sampling.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/physics/rrtmgp_lw_cloud_sampling.F90 b/physics/rrtmgp_lw_cloud_sampling.F90 index 2172bb374..45a1811f1 100644 --- a/physics/rrtmgp_lw_cloud_sampling.F90 +++ b/physics/rrtmgp_lw_cloud_sampling.F90 @@ -1,7 +1,7 @@ module rrtmgp_lw_cloud_sampling use machine, only: kind_phys use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp - use physparam, only: isubcsw, iovrsw + use physparam, only: isubclw, iovrlw use mo_optical_props, only: ty_optical_props_1scl use mo_cloud_sampling, only: sampled_mask_max_ran, sampled_mask_exp_ran, draw_samples use mersenne_twister, only: random_setseed, random_number, random_stat From dd9d5ce39a82abd336f1b2a27bce06dc949cbb9f Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Tue, 21 Jan 2020 15:54:36 -0700 Subject: [PATCH 120/167] Removed diagnostic print statements. --- physics/radlw_main.f | 27 +-------------------------- physics/rrtmgp_lw_cloud_optics.F90 | 20 +------------------- physics/rrtmgp_lw_cloud_sampling.F90 | 1 + physics/rrtmgp_lw_rte.F90 | 8 -------- 4 files changed, 3 insertions(+), 53 deletions(-) diff --git a/physics/radlw_main.f b/physics/radlw_main.f index c34a1f77d..32dafd7e4 100644 --- a/physics/radlw_main.f +++ b/physics/radlw_main.f @@ -362,11 +362,7 @@ subroutine rrtmg_lw_init (mpicomm, mpirank, mpiroot) ! Inputs integer, intent(in) :: mpicomm,mpirank,mpiroot - if (mpirank .eq. mpiroot) then - print*,'DJS+ Opening file containing RRTMG LW cloud fields' - open(47,file='rrtmg_clds.txt',status='unknown') - endif - + end subroutine rrtmg_lw_init !> \defgroup module_radlw_main GFS RRTMG Longwave Module @@ -730,10 +726,6 @@ subroutine rrtmg_lw_run & ! endif ! --- ... loop over horizontal npts profiles - write(47,*) "In radlw_main: " - write(47,*),"nCol: ",npts - write(47,*),"nLay: ",nLay - lab_do_iplon : do iplon = 1, npts !> -# Read surface emissivity. @@ -1179,16 +1171,6 @@ subroutine rrtmg_lw_run & endif ! end if_isubclw_block !> -# Save outputs. - - - do k=1,nlay - write(47,"(23f8.2)") plyr(iplon,k),clwp(k),relw(k),ciwp(k), & - & reiw(k),taucld(:,k),lon(iplon),lat(iplon) - enddo - do k=1,nlay+1 - write(47,"(5f8.2)") plvl(iplon,k),totuflux(k-1),totdflux(k-1)& - & ,totuclfl(k-1),totdclfl(k-1) - enddo topflx(iplon)%upfxc = totuflux(nlay) @@ -1287,7 +1269,6 @@ subroutine rrtmg_lw_finalize (mpicomm, mpirank, mpiroot) #ifdef MPI call MPI_BARRIER(mpicomm, ierr) #endif - close(47) end subroutine rrtmg_lw_finalize @@ -3706,12 +3687,6 @@ subroutine rtrnmc & totdclfl(k) = totdclfl(k) * flxfac enddo - - do k=0,nlay - write(47,"(32f8.2)") toturad(k,:)*flxfac, & - & totdrad(k,:)*flxfac - enddo - !> -# Calculate net fluxes and heating rates. fnet(0) = totuflux(0) - totdflux(0) diff --git a/physics/rrtmgp_lw_cloud_optics.F90 b/physics/rrtmgp_lw_cloud_optics.F90 index 7e546acd0..7e50f2a81 100644 --- a/physics/rrtmgp_lw_cloud_optics.F90 +++ b/physics/rrtmgp_lw_cloud_optics.F90 @@ -99,11 +99,6 @@ subroutine rrtmgp_lw_cloud_optics_init(cld_optics_scheme, nrghice, rrtmgp_root_d errmsg = '' errflg = 0 - if (mpirank .eq. mpiroot) then - print*,'DJS+ Opening file containing RRTMGP LW cloud fields' - open(47,file='rrtmgp_clds.txt',status='unknown') - endif - if (cld_optics_scheme .eq. 0) return ! Filenames are set in the physics_nml @@ -450,19 +445,7 @@ subroutine rrtmgp_lw_cloud_optics_run(doLWrad, nCol, nLev, cld_optics_scheme, nr endif lw_optical_props_cloudsByBand%tau = tau_cld endif - - write(47,*) "In rrtmgp_lw_cloud_optics: " - write(47,*),"nCol: ",nCol - write(47,*),"nLay: ",nLev - do iCol=1,nCol - do iLay=1,nLev - write(47,"(23f8.2)") p_lay(iCol,iLay)/100.,cld_lwp(iCol,iLay),cld_reliq(iCol,iLay),& - cld_iwp(iCol,iLay),cld_reice(iCol,iLay),tau_cld(iCol,iLay,:),lon(iCol), lat(iCol) - enddo - enddo - - !lw_optical_props_cloudsByBand%tau(:,:,2) = lw_optical_props_cloudsByBand%tau(:,:,1) - + ! All-sky LW optical depth ~10microns cldtaulw = lw_optical_props_cloudsByBand%tau(:,:,7) @@ -486,7 +469,6 @@ subroutine rrtmgp_lw_cloud_optics_finalize(mpicomm, mpirank, mpiroot) #ifdef MPI call MPI_BARRIER(mpicomm, ierr) #endif - close(47) end subroutine rrtmgp_lw_cloud_optics_finalize end module rrtmgp_lw_cloud_optics diff --git a/physics/rrtmgp_lw_cloud_sampling.F90 b/physics/rrtmgp_lw_cloud_sampling.F90 index 45a1811f1..af5f77210 100644 --- a/physics/rrtmgp_lw_cloud_sampling.F90 +++ b/physics/rrtmgp_lw_cloud_sampling.F90 @@ -109,6 +109,7 @@ subroutine rrtmgp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, icseed_lw, ! Call McICA select case ( iovrlw ) + case(0) ! Maximumn-random case(1) call check_error_msg('rrtmgp_lw_cloud_sampling_run',sampled_mask_max_ran(rng3D,cld_frac_noSamp,cldfracMCICA)) diff --git a/physics/rrtmgp_lw_rte.F90 b/physics/rrtmgp_lw_rte.F90 index 3f2651e79..cf0d0ea42 100644 --- a/physics/rrtmgp_lw_rte.F90 +++ b/physics/rrtmgp_lw_rte.F90 @@ -160,14 +160,6 @@ subroutine rrtmgp_lw_rte_run(doLWrad, nCol, nLev, p_lay, t_lay, p_lev, skt, lw_g !if (l_AllSky_HR_byband) then !endif - write(47,*) "In rrtmgp_lw_rte: " - do iCol=1,nCol - do iLay=1,nLev+1 - write(47,"(35f8.2)") p_lev(iCol,iLay)/100.,flux_allsky%bnd_flux_up(iCol,iLay,:),flux_allsky%bnd_flux_dn(iCol,iLay,:),& - fluxlwUP_clrsky(iCol,iLay),fluxlwDOWN_clrsky(iCol,iLay) - enddo - enddo - end subroutine rrtmgp_lw_rte_run ! ######################################################################################### From 0992def87d74fa13c41e6bf2e28335e021451129 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Mon, 27 Jan 2020 10:21:38 -0700 Subject: [PATCH 121/167] Some changes to MPI calls in inti() routines. --- physics/rrtmgp_lw_gas_optics.F90 | 180 ++++++++++++++++--------------- 1 file changed, 93 insertions(+), 87 deletions(-) diff --git a/physics/rrtmgp_lw_gas_optics.F90 b/physics/rrtmgp_lw_gas_optics.F90 index ebf875951..df61bc46a 100644 --- a/physics/rrtmgp_lw_gas_optics.F90 +++ b/physics/rrtmgp_lw_gas_optics.F90 @@ -103,25 +103,29 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp ncontributors_lower, ncontributors_upper ! Local variables - integer :: ncid_lw, dimID, varID, status, iGas + integer :: ncid_lw, dimID, varID, status, iGas, ierr integer,dimension(:),allocatable :: temp1, temp2, temp3, temp4, & temp_log_array1, temp_log_array2, temp_log_array3, temp_log_array4 character(len=264) :: lw_gas_props_file #ifdef MPI - integer :: ierr + integer :: mpierr #endif ! Initialize errmsg = '' errflg = 0 +#ifdef MPI + call MPI_BARRIER(mpicomm, mpierr) +#endif + write(*,"(a12,3i10)") 'MPI ranks: ',mpirank,mpiroot,mpicomm ! Filenames are set in the physics_nml lw_gas_props_file = trim(rrtmgp_root_dir)//trim(rrtmgp_lw_file_gas) ! Read dimensions for k-distribution fields (only on master processor(0)) -! if (mpirank .eq. mpiroot) then + if (mpirank .eq. mpiroot) then if(nf90_open(trim(lw_gas_props_file), NF90_WRITE, ncid_lw) .eq. NF90_NOERR) then status = nf90_inq_dimid(ncid_lw, 'temperature', dimid) status = nf90_inquire_dimension(ncid_lw, dimid, len=ntemps) @@ -155,28 +159,32 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp status = nf90_inquire_dimension(ncid_lw, dimid, len=ninternalSourcetemps) status = nf90_close(ncid_lw) endif -! endif + ierr = 1 + else + ierr = 0 + endif ! Broadcast dimensions to all processors -!#ifdef MPI -! call MPI_BARRIER(mpicomm, ierr) -! call MPI_BCAST(ntemps, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(npress, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(nabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(nminorabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(nextrabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(nmixingfracs, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(nlayers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(nbnds, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(ngpts_lw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(npairs, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(ncontributors_lower, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(ncontributors_upper, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(nminor_absorber_intervals_lower, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(nminor_absorber_intervals_upper, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(ninternalSourcetemps, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BARRIER(mpicomm, ierr) -!#endif +#ifdef MPI + ! Broadcast the current error code from MPI master (0 = success) + call MPI_BCAST(ierr, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + if (ierr/=0) return + call MPI_BCAST(ntemps, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(npress, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nminorabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nextrabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nmixingfracs, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nlayers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nbnds, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(ngpts_lw, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(npairs, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(ncontributors_lower, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(ncontributors_upper, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nminor_absorber_intervals_lower, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nminor_absorber_intervals_upper, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(ninternalSourcetemps, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) +#endif ! Allocate space for arrays allocate(gas_names(nabsorbers)) @@ -210,7 +218,7 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp allocate(totplnk(ninternalSourcetemps, nbnds)) allocate(planck_frac(ngpts_lw, nmixingfracs, npress+1, ntemps)) -! if (mpirank .eq. mpiroot) then + if (ierr .eq. 1) then write (*,*) 'Reading RRTMGP longwave k-distribution data ... ' ! Read in fields from file if(nf90_open(trim(lw_gas_props_file), NF90_WRITE, ncid_lw) .eq. NF90_NOERR) then @@ -313,72 +321,70 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp ! Close status = nf90_close(ncid_lw) endif -! endif + endif ! Broadcast arrays to all processors -!#ifdef MPI -! call MPI_BARRIER(mpicomm, ierr) -! if (mpirank==mpiroot) write (*,*) 'Broadcasting RRTMGP longwave k-distribution data ... ' -! call MPI_BCAST(minor_limits_gpt_upper, size(minor_limits_gpt_upper), MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(minor_limits_gpt_lower, size(minor_limits_gpt_lower), MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(kminor_start_upper, size(kminor_start_upper), MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(kminor_start_lower, size(kminor_start_lower), MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(key_species, size(key_species), MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(band2gpt, size(band2gpt), MPI_INTEGER, mpiroot, mpicomm, ierr) -!#ifndef SINGLE_PREC -! call MPI_BCAST(band_lims, size(band_lims), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(press_ref, size(press_ref), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(temp_ref, size(temp_ref), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(kminor_lower, size(kminor_lower), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(kminor_upper, size(kminor_upper), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(scaling_gas_lower, size(scaling_gas_lower), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(scaling_gas_upper, size(scaling_gas_upper), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(vmr_ref, size(vmr_ref), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(kmajor, size(kmajor), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(temp_ref_p, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(temp_ref_t, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(press_ref_trop, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(totplnk, size(totplnk), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(planck_frac, size(planck_frac), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -!#else -! call MPI_BCAST(band_lims, size(band_lims), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(press_ref, size(press_ref), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(temp_ref, size(temp_ref), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(kminor_lower, size(kminor_lower), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(kminor_upper, size(kminor_upper), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(scaling_gas_lower, size(scaling_gas_lower), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(scaling_gas_upper, size(scaling_gas_upper), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(vmr_ref, size(vmr_ref), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(kmajor, size(kmajor), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(temp_ref_p, 1, MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(temp_ref_t, 1, MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(press_ref_trop, 1, MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(totplnk, size(totplnk), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(planck_frac, size(planck_frac), MPI_REAL, mpiroot, mpicomm, ierr) -!#endif -! ! Character arrays -! do ij=1,nabsorbers -! call MPI_BCAST(gas_names(ij), len(gas_names(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) -! enddo -! do ij=1,nminorabsorbers -! call MPI_BCAST(gas_minor(ij), len(gas_minor(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) -! call MPI_BCAST(identifier_minor(ij), len(identifier_minor(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) -! enddo -! do ij=1,nminor_absorber_intervals_lower -! call MPI_BCAST(minor_gases_lower(ij), len(minor_gases_lower(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) -! enddo -! do ij=1,nminor_absorber_intervals_upper -! call MPI_BCAST(minor_gases_upper(ij), len(minor_gases_upper(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) -! enddo -! ! Logical arrays -! ! -! call MPI_BCAST(minor_scales_with_density_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(scale_by_complement_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(minor_scales_with_density_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(scale_by_complement_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, ierr) -! call MPI_BARRIER(mpicomm, ierr) -!#endif +#ifdef MPI + if (ierr .eq. 0) write (*,*) 'Broadcasting RRTMGP longwave k-distribution data ... ' + call MPI_BCAST(minor_limits_gpt_upper, size(minor_limits_gpt_upper), MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(minor_limits_gpt_lower, size(minor_limits_gpt_lower), MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(kminor_start_upper, size(kminor_start_upper), MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(kminor_start_lower, size(kminor_start_lower), MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(key_species, size(key_species), MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(band2gpt, size(band2gpt), MPI_INTEGER, mpiroot, mpicomm, mpierr) +#ifndef SINGLE_PREC + call MPI_BCAST(band_lims, size(band_lims), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call MPI_BCAST(press_ref, size(press_ref), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call MPI_BCAST(temp_ref, size(temp_ref), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call MPI_BCAST(kminor_lower, size(kminor_lower), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call MPI_BCAST(kminor_upper, size(kminor_upper), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call MPI_BCAST(scaling_gas_lower, size(scaling_gas_lower), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call MPI_BCAST(scaling_gas_upper, size(scaling_gas_upper), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call MPI_BCAST(vmr_ref, size(vmr_ref), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call MPI_BCAST(kmajor, size(kmajor), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call MPI_BCAST(temp_ref_p, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call MPI_BCAST(temp_ref_t, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call MPI_BCAST(press_ref_trop, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call MPI_BCAST(totplnk, size(totplnk), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call MPI_BCAST(planck_frac, size(planck_frac), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) +#else + call MPI_BCAST(band_lims, size(band_lims), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(press_ref, size(press_ref), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(temp_ref, size(temp_ref), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(kminor_lower, size(kminor_lower), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(kminor_upper, size(kminor_upper), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(scaling_gas_lower, size(scaling_gas_lower), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(scaling_gas_upper, size(scaling_gas_upper), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(vmr_ref, size(vmr_ref), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(kmajor, size(kmajor), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(temp_ref_p, 1, MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(temp_ref_t, 1, MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(press_ref_trop, 1, MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(totplnk, size(totplnk), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(planck_frac, size(planck_frac), MPI_REAL, mpiroot, mpicomm, mpierr) +#endif + ! Character arrays + do ij=1,nabsorbers + call MPI_BCAST(gas_names(ij), len(gas_names(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) + enddo + do ij=1,nminorabsorbers + call MPI_BCAST(gas_minor(ij), len(gas_minor(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) + call MPI_BCAST(identifier_minor(ij), len(identifier_minor(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) + enddo + do ij=1,nminor_absorber_intervals_lower + call MPI_BCAST(minor_gases_lower(ij), len(minor_gases_lower(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) + enddo + do ij=1,nminor_absorber_intervals_upper + call MPI_BCAST(minor_gases_upper(ij), len(minor_gases_upper(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) + enddo + ! Logical arrays + ! + call MPI_BCAST(minor_scales_with_density_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(scale_by_complement_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(minor_scales_with_density_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(scale_by_complement_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, mpierr) +#endif ! Initialize gas concentrations and gas optics class with data do iGas=1,rrtmgp_nGases From 6e0c346cbe12c682b6273843d72ecc4081240088 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Mon, 27 Jan 2020 11:01:50 -0700 Subject: [PATCH 122/167] Some changes to MPI calls in inti() routines. Again... --- physics/rrtmgp_lw_gas_optics.F90 | 151 ++++++++++++++++--------------- 1 file changed, 78 insertions(+), 73 deletions(-) diff --git a/physics/rrtmgp_lw_gas_optics.F90 b/physics/rrtmgp_lw_gas_optics.F90 index df61bc46a..510a1f3bd 100644 --- a/physics/rrtmgp_lw_gas_optics.F90 +++ b/physics/rrtmgp_lw_gas_optics.F90 @@ -166,24 +166,26 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp ! Broadcast dimensions to all processors #ifdef MPI - ! Broadcast the current error code from MPI master (0 = success) - call MPI_BCAST(ierr, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - if (ierr/=0) return - call MPI_BCAST(ntemps, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(npress, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nminorabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nextrabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nmixingfracs, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nlayers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nbnds, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(ngpts_lw, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(npairs, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(ncontributors_lower, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(ncontributors_upper, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nminor_absorber_intervals_lower, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nminor_absorber_intervals_upper, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(ninternalSourcetemps, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + ! Hold up until data is read in on master processor + call MPI_BARRIER(mpicomm, mpierr) + + if (ierr .eq. 0) then + call MPI_BCAST(ntemps, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(npress, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nminorabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nextrabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nmixingfracs, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nlayers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nbnds, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(ngpts_lw, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(npairs, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(ncontributors_lower, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(ncontributors_upper, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nminor_absorber_intervals_lower, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nminor_absorber_intervals_upper, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(ninternalSourcetemps, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + endif #endif ! Allocate space for arrays @@ -326,64 +328,67 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp ! Broadcast arrays to all processors #ifdef MPI - if (ierr .eq. 0) write (*,*) 'Broadcasting RRTMGP longwave k-distribution data ... ' - call MPI_BCAST(minor_limits_gpt_upper, size(minor_limits_gpt_upper), MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(minor_limits_gpt_lower, size(minor_limits_gpt_lower), MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(kminor_start_upper, size(kminor_start_upper), MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(kminor_start_lower, size(kminor_start_lower), MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(key_species, size(key_species), MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(band2gpt, size(band2gpt), MPI_INTEGER, mpiroot, mpicomm, mpierr) + if (ierr .eq. 0) write (*,*) 'Broadcasting RRTMGP longwave k-distribution data ... ' + call MPI_BARRIER(mpicomm, mpierr) + if (ierr .eq. 0) then + call MPI_BCAST(minor_limits_gpt_upper, size(minor_limits_gpt_upper), MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(minor_limits_gpt_lower, size(minor_limits_gpt_lower), MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(kminor_start_upper, size(kminor_start_upper), MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(kminor_start_lower, size(kminor_start_lower), MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(key_species, size(key_species), MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(band2gpt, size(band2gpt), MPI_INTEGER, mpiroot, mpicomm, mpierr) #ifndef SINGLE_PREC - call MPI_BCAST(band_lims, size(band_lims), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(press_ref, size(press_ref), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(temp_ref, size(temp_ref), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(kminor_lower, size(kminor_lower), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(kminor_upper, size(kminor_upper), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(scaling_gas_lower, size(scaling_gas_lower), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(scaling_gas_upper, size(scaling_gas_upper), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(vmr_ref, size(vmr_ref), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(kmajor, size(kmajor), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(temp_ref_p, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(temp_ref_t, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(press_ref_trop, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(totplnk, size(totplnk), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(planck_frac, size(planck_frac), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call MPI_BCAST(band_lims, size(band_lims), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call MPI_BCAST(press_ref, size(press_ref), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call MPI_BCAST(temp_ref, size(temp_ref), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call MPI_BCAST(kminor_lower, size(kminor_lower), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call MPI_BCAST(kminor_upper, size(kminor_upper), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call MPI_BCAST(scaling_gas_lower, size(scaling_gas_lower), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call MPI_BCAST(scaling_gas_upper, size(scaling_gas_upper), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call MPI_BCAST(vmr_ref, size(vmr_ref), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call MPI_BCAST(kmajor, size(kmajor), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call MPI_BCAST(temp_ref_p, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call MPI_BCAST(temp_ref_t, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call MPI_BCAST(press_ref_trop, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call MPI_BCAST(totplnk, size(totplnk), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call MPI_BCAST(planck_frac, size(planck_frac), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) #else - call MPI_BCAST(band_lims, size(band_lims), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(press_ref, size(press_ref), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(temp_ref, size(temp_ref), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(kminor_lower, size(kminor_lower), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(kminor_upper, size(kminor_upper), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(scaling_gas_lower, size(scaling_gas_lower), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(scaling_gas_upper, size(scaling_gas_upper), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(vmr_ref, size(vmr_ref), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(kmajor, size(kmajor), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(temp_ref_p, 1, MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(temp_ref_t, 1, MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(press_ref_trop, 1, MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(totplnk, size(totplnk), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(planck_frac, size(planck_frac), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(band_lims, size(band_lims), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(press_ref, size(press_ref), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(temp_ref, size(temp_ref), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(kminor_lower, size(kminor_lower), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(kminor_upper, size(kminor_upper), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(scaling_gas_lower, size(scaling_gas_lower), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(scaling_gas_upper, size(scaling_gas_upper), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(vmr_ref, size(vmr_ref), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(kmajor, size(kmajor), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(temp_ref_p, 1, MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(temp_ref_t, 1, MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(press_ref_trop, 1, MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(totplnk, size(totplnk), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(planck_frac, size(planck_frac), MPI_REAL, mpiroot, mpicomm, mpierr) #endif - ! Character arrays - do ij=1,nabsorbers - call MPI_BCAST(gas_names(ij), len(gas_names(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) - enddo - do ij=1,nminorabsorbers - call MPI_BCAST(gas_minor(ij), len(gas_minor(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) - call MPI_BCAST(identifier_minor(ij), len(identifier_minor(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) - enddo - do ij=1,nminor_absorber_intervals_lower - call MPI_BCAST(minor_gases_lower(ij), len(minor_gases_lower(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) - enddo - do ij=1,nminor_absorber_intervals_upper - call MPI_BCAST(minor_gases_upper(ij), len(minor_gases_upper(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) - enddo - ! Logical arrays - ! - call MPI_BCAST(minor_scales_with_density_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(scale_by_complement_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(minor_scales_with_density_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(scale_by_complement_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, mpierr) + ! Character arrays + do ij=1,nabsorbers + call MPI_BCAST(gas_names(ij), len(gas_names(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) + enddo + do ij=1,nminorabsorbers + call MPI_BCAST(gas_minor(ij), len(gas_minor(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) + call MPI_BCAST(identifier_minor(ij), len(identifier_minor(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) + enddo + do ij=1,nminor_absorber_intervals_lower + call MPI_BCAST(minor_gases_lower(ij), len(minor_gases_lower(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) + enddo + do ij=1,nminor_absorber_intervals_upper + call MPI_BCAST(minor_gases_upper(ij), len(minor_gases_upper(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) + enddo + ! Logical arrays + ! + call MPI_BCAST(minor_scales_with_density_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(scale_by_complement_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(minor_scales_with_density_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(scale_by_complement_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, mpierr) + endif #endif ! Initialize gas concentrations and gas optics class with data From fbb009f595f3a686523ed19af6daae868b9c9322 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Mon, 27 Jan 2020 12:36:55 -0700 Subject: [PATCH 123/167] Some changes to MPI calls in inti() routines. Again and again... --- physics/rrtmgp_lw_gas_optics.F90 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/physics/rrtmgp_lw_gas_optics.F90 b/physics/rrtmgp_lw_gas_optics.F90 index 510a1f3bd..0cff3caa0 100644 --- a/physics/rrtmgp_lw_gas_optics.F90 +++ b/physics/rrtmgp_lw_gas_optics.F90 @@ -116,7 +116,7 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp errflg = 0 #ifdef MPI - call MPI_BARRIER(mpicomm, mpierr) + !call MPI_BARRIER(mpicomm, mpierr) #endif write(*,"(a12,3i10)") 'MPI ranks: ',mpirank,mpiroot,mpicomm @@ -167,7 +167,7 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp ! Broadcast dimensions to all processors #ifdef MPI ! Hold up until data is read in on master processor - call MPI_BARRIER(mpicomm, mpierr) + !call MPI_BARRIER(mpicomm, mpierr) if (ierr .eq. 0) then call MPI_BCAST(ntemps, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) From c0aab421b1c50f0d9de5a05c2653977b732d38d1 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Mon, 27 Jan 2020 14:18:20 -0700 Subject: [PATCH 124/167] Some changes to MPI calls in inti() routines. New grouping. --- physics/rrtmgp_lw_gas_optics.F90 | 225 +++++++++++++------------------ 1 file changed, 93 insertions(+), 132 deletions(-) diff --git a/physics/rrtmgp_lw_gas_optics.F90 b/physics/rrtmgp_lw_gas_optics.F90 index 0cff3caa0..e058eb490 100644 --- a/physics/rrtmgp_lw_gas_optics.F90 +++ b/physics/rrtmgp_lw_gas_optics.F90 @@ -116,7 +116,7 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp errflg = 0 #ifdef MPI - !call MPI_BARRIER(mpicomm, mpierr) + call MPI_BARRIER(mpicomm, mpierr) #endif write(*,"(a12,3i10)") 'MPI ranks: ',mpirank,mpiroot,mpicomm @@ -124,8 +124,9 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp ! Filenames are set in the physics_nml lw_gas_props_file = trim(rrtmgp_root_dir)//trim(rrtmgp_lw_file_gas) - ! Read dimensions for k-distribution fields (only on master processor(0)) + ! On master processor... if (mpirank .eq. mpiroot) then + ! Read dimensions for k-distribution fields (only on master processor(0)) if(nf90_open(trim(lw_gas_props_file), NF90_WRITE, ncid_lw) .eq. NF90_NOERR) then status = nf90_inq_dimid(ncid_lw, 'temperature', dimid) status = nf90_inquire_dimension(ncid_lw, dimid, len=ntemps) @@ -159,143 +160,89 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp status = nf90_inquire_dimension(ncid_lw, dimid, len=ninternalSourcetemps) status = nf90_close(ncid_lw) endif - ierr = 1 - else - ierr = 0 - endif + ! Allocate space for arrays + allocate(gas_names(nabsorbers)) + allocate(scaling_gas_lower(nminor_absorber_intervals_lower)) + allocate(scaling_gas_upper(nminor_absorber_intervals_upper)) + allocate(gas_minor(nminorabsorbers)) + allocate(identifier_minor(nminorabsorbers)) + allocate(minor_gases_lower(nminor_absorber_intervals_lower)) + allocate(minor_gases_upper(nminor_absorber_intervals_upper)) + allocate(minor_limits_gpt_lower(npairs,nminor_absorber_intervals_lower)) + allocate(minor_limits_gpt_upper(npairs,nminor_absorber_intervals_upper)) + allocate(band2gpt(2,nbnds)) + allocate(key_species(2,nlayers,nbnds)) + allocate(band_lims(2,nbnds)) + allocate(press_ref(npress)) + allocate(temp_ref(ntemps)) + allocate(vmr_ref(nlayers, nextrabsorbers, ntemps)) + allocate(kminor_lower(ncontributors_lower, nmixingfracs, ntemps)) + allocate(kmajor(ngpts_lw, nmixingfracs, npress+1, ntemps)) + allocate(kminor_start_lower(nminor_absorber_intervals_lower)) + allocate(kminor_upper(ncontributors_upper, nmixingfracs, ntemps)) + allocate(kminor_start_upper(nminor_absorber_intervals_upper)) + allocate(minor_scales_with_density_lower(nminor_absorber_intervals_lower)) + allocate(minor_scales_with_density_upper(nminor_absorber_intervals_upper)) + allocate(scale_by_complement_lower(nminor_absorber_intervals_lower)) + allocate(scale_by_complement_upper(nminor_absorber_intervals_upper)) + allocate(temp1(nminor_absorber_intervals_lower)) + allocate(temp2(nminor_absorber_intervals_upper)) + allocate(temp3(nminor_absorber_intervals_lower)) + allocate(temp4(nminor_absorber_intervals_upper)) + allocate(totplnk(ninternalSourcetemps, nbnds)) + allocate(planck_frac(ngpts_lw, nmixingfracs, npress+1, ntemps)) - ! Broadcast dimensions to all processors -#ifdef MPI - ! Hold up until data is read in on master processor - !call MPI_BARRIER(mpicomm, mpierr) - - if (ierr .eq. 0) then - call MPI_BCAST(ntemps, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(npress, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nminorabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nextrabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nmixingfracs, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nlayers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nbnds, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(ngpts_lw, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(npairs, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(ncontributors_lower, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(ncontributors_upper, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nminor_absorber_intervals_lower, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nminor_absorber_intervals_upper, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(ninternalSourcetemps, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - endif -#endif - - ! Allocate space for arrays - allocate(gas_names(nabsorbers)) - allocate(scaling_gas_lower(nminor_absorber_intervals_lower)) - allocate(scaling_gas_upper(nminor_absorber_intervals_upper)) - allocate(gas_minor(nminorabsorbers)) - allocate(identifier_minor(nminorabsorbers)) - allocate(minor_gases_lower(nminor_absorber_intervals_lower)) - allocate(minor_gases_upper(nminor_absorber_intervals_upper)) - allocate(minor_limits_gpt_lower(npairs,nminor_absorber_intervals_lower)) - allocate(minor_limits_gpt_upper(npairs,nminor_absorber_intervals_upper)) - allocate(band2gpt(2,nbnds)) - allocate(key_species(2,nlayers,nbnds)) - allocate(band_lims(2,nbnds)) - allocate(press_ref(npress)) - allocate(temp_ref(ntemps)) - allocate(vmr_ref(nlayers, nextrabsorbers, ntemps)) - allocate(kminor_lower(ncontributors_lower, nmixingfracs, ntemps)) - allocate(kmajor(ngpts_lw, nmixingfracs, npress+1, ntemps)) - allocate(kminor_start_lower(nminor_absorber_intervals_lower)) - allocate(kminor_upper(ncontributors_upper, nmixingfracs, ntemps)) - allocate(kminor_start_upper(nminor_absorber_intervals_upper)) - allocate(minor_scales_with_density_lower(nminor_absorber_intervals_lower)) - allocate(minor_scales_with_density_upper(nminor_absorber_intervals_upper)) - allocate(scale_by_complement_lower(nminor_absorber_intervals_lower)) - allocate(scale_by_complement_upper(nminor_absorber_intervals_upper)) - allocate(temp1(nminor_absorber_intervals_lower)) - allocate(temp2(nminor_absorber_intervals_upper)) - allocate(temp3(nminor_absorber_intervals_lower)) - allocate(temp4(nminor_absorber_intervals_upper)) - allocate(totplnk(ninternalSourcetemps, nbnds)) - allocate(planck_frac(ngpts_lw, nmixingfracs, npress+1, ntemps)) - - if (ierr .eq. 1) then - write (*,*) 'Reading RRTMGP longwave k-distribution data ... ' ! Read in fields from file + write (*,*) 'Reading RRTMGP longwave k-distribution data ... ' if(nf90_open(trim(lw_gas_props_file), NF90_WRITE, ncid_lw) .eq. NF90_NOERR) then status = nf90_inq_varid(ncid_lw,'gas_names',varID) status = nf90_get_var(ncid_lw,varID,gas_names) - ! status = nf90_inq_varid(ncid_lw,'scaling_gas_lower',varID) status = nf90_get_var(ncid_lw,varID,scaling_gas_lower) - ! status = nf90_inq_varid(ncid_lw,'scaling_gas_upper',varID) status = nf90_get_var(ncid_lw,varID,scaling_gas_upper) - ! status = nf90_inq_varid(ncid_lw,'gas_minor',varID) status = nf90_get_var(ncid_lw,varID,gas_minor) - ! status = nf90_inq_varid(ncid_lw,'identifier_minor',varID) status = nf90_get_var(ncid_lw,varID,identifier_minor) - ! status = nf90_inq_varid(ncid_lw,'minor_gases_lower',varID) status = nf90_get_var(ncid_lw,varID,minor_gases_lower) - ! status = nf90_inq_varid(ncid_lw,'minor_gases_upper',varID) status = nf90_get_var(ncid_lw,varID,minor_gases_upper) - ! status = nf90_inq_varid(ncid_lw,'minor_limits_gpt_lower',varID) status = nf90_get_var(ncid_lw,varID,minor_limits_gpt_lower) - ! status = nf90_inq_varid(ncid_lw,'minor_limits_gpt_upper',varID) status = nf90_get_var(ncid_lw,varID,minor_limits_gpt_upper) - ! status = nf90_inq_varid(ncid_lw,'bnd_limits_gpt',varID) status = nf90_get_var(ncid_lw,varID,band2gpt) - ! status = nf90_inq_varid(ncid_lw,'key_species',varID) status = nf90_get_var(ncid_lw,varID,key_species) - ! status = nf90_inq_varid(ncid_lw,'bnd_limits_wavenumber',varID) status = nf90_get_var(ncid_lw,varID,band_lims) - ! status = nf90_inq_varid(ncid_lw,'press_ref',varID) status = nf90_get_var(ncid_lw,varID,press_ref) - ! status = nf90_inq_varid(ncid_lw,'temp_ref',varID) status = nf90_get_var(ncid_lw,varID,temp_ref) - ! status = nf90_inq_varid(ncid_lw,'absorption_coefficient_ref_P',varID) status = nf90_get_var(ncid_lw,varID,temp_ref_p) - ! status = nf90_inq_varid(ncid_lw,'absorption_coefficient_ref_T',varID) status = nf90_get_var(ncid_lw,varID,temp_ref_t) - ! status = nf90_inq_varid(ncid_lw,'press_ref_trop',varID) status = nf90_get_var(ncid_lw,varID,press_ref_trop) - ! status = nf90_inq_varid(ncid_lw,'kminor_lower',varID) status = nf90_get_var(ncid_lw,varID,kminor_lower) - ! status = nf90_inq_varid(ncid_lw,'kminor_upper',varID) status = nf90_get_var(ncid_lw,varID,kminor_upper) - ! status = nf90_inq_varid(ncid_lw,'vmr_ref',varID) status = nf90_get_var(ncid_lw,varID,vmr_ref) - ! status = nf90_inq_varid(ncid_lw,'kmajor',varID) status = nf90_get_var(ncid_lw,varID,kmajor) - ! status = nf90_inq_varid(ncid_lw,'kminor_start_lower',varID) status = nf90_get_var(ncid_lw,varID,kminor_start_lower) - ! status = nf90_inq_varid(ncid_lw,'kminor_start_upper',varID) status = nf90_get_var(ncid_lw,varID,kminor_start_upper) - ! status = nf90_inq_varid(ncid_lw,'totplnk',varID) status = nf90_get_var(ncid_lw,varID,totplnk) - ! status = nf90_inq_varid(ncid_lw,'plank_fraction',varID) status = nf90_get_var(ncid_lw,varID,planck_frac) @@ -304,17 +251,14 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp status = nf90_get_var(ncid_lw,varID,temp1) minor_scales_with_density_lower(:) = .false. where(temp1 .eq. 1) minor_scales_with_density_lower(:) = .true. - ! status = nf90_inq_varid(ncid_lw,'minor_scales_with_density_upper',varID) status = nf90_get_var(ncid_lw,varID,temp2) minor_scales_with_density_upper(:) = .false. where(temp2 .eq. 1) minor_scales_with_density_upper(:) = .true. - ! status = nf90_inq_varid(ncid_lw,'scale_by_complement_lower',varID) status = nf90_get_var(ncid_lw,varID,temp3) scale_by_complement_lower(:) = .false. where(temp3 .eq. 1) scale_by_complement_lower(:) = .true. - ! status = nf90_inq_varid(ncid_lw,'scale_by_complement_upper',varID) status = nf90_get_var(ncid_lw,varID,temp4) scale_by_complement_upper(:) = .false. @@ -323,64 +267,81 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp ! Close status = nf90_close(ncid_lw) endif + ierr = 1 + else + ierr = 0 endif ! Broadcast arrays to all processors #ifdef MPI - if (ierr .eq. 0) write (*,*) 'Broadcasting RRTMGP longwave k-distribution data ... ' - call MPI_BARRIER(mpicomm, mpierr) if (ierr .eq. 0) then - call MPI_BCAST(minor_limits_gpt_upper, size(minor_limits_gpt_upper), MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(minor_limits_gpt_lower, size(minor_limits_gpt_lower), MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(kminor_start_upper, size(kminor_start_upper), MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(kminor_start_lower, size(kminor_start_lower), MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(key_species, size(key_species), MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(band2gpt, size(band2gpt), MPI_INTEGER, mpiroot, mpicomm, mpierr) + write (*,*) 'Broadcasting RRTMGP longwave k-distribution data ... ' + call MPI_BCAST(ntemps, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(npress, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nminorabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nextrabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nmixingfracs, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nlayers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nbnds, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(ngpts_lw, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(npairs, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(ncontributors_lower, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(ncontributors_upper, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nminor_absorber_intervals_lower, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nminor_absorber_intervals_upper, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(ninternalSourcetemps, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(minor_limits_gpt_upper, size(minor_limits_gpt_upper), MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(minor_limits_gpt_lower, size(minor_limits_gpt_lower), MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(kminor_start_upper, size(kminor_start_upper), MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(kminor_start_lower, size(kminor_start_lower), MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(key_species, size(key_species), MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(band2gpt, size(band2gpt), MPI_INTEGER, mpiroot, mpicomm, mpierr) #ifndef SINGLE_PREC - call MPI_BCAST(band_lims, size(band_lims), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(press_ref, size(press_ref), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(temp_ref, size(temp_ref), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(kminor_lower, size(kminor_lower), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(kminor_upper, size(kminor_upper), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(scaling_gas_lower, size(scaling_gas_lower), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(scaling_gas_upper, size(scaling_gas_upper), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(vmr_ref, size(vmr_ref), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(kmajor, size(kmajor), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(temp_ref_p, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(temp_ref_t, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(press_ref_trop, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(totplnk, size(totplnk), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(planck_frac, size(planck_frac), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call MPI_BCAST(band_lims, size(band_lims), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call MPI_BCAST(press_ref, size(press_ref), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call MPI_BCAST(temp_ref, size(temp_ref), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call MPI_BCAST(kminor_lower, size(kminor_lower), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call MPI_BCAST(kminor_upper, size(kminor_upper), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call MPI_BCAST(scaling_gas_lower, size(scaling_gas_lower), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call MPI_BCAST(scaling_gas_upper, size(scaling_gas_upper), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call MPI_BCAST(vmr_ref, size(vmr_ref), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call MPI_BCAST(kmajor, size(kmajor), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call MPI_BCAST(temp_ref_p, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call MPI_BCAST(temp_ref_t, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call MPI_BCAST(press_ref_trop, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call MPI_BCAST(totplnk, size(totplnk), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call MPI_BCAST(planck_frac, size(planck_frac), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) #else - call MPI_BCAST(band_lims, size(band_lims), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(press_ref, size(press_ref), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(temp_ref, size(temp_ref), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(kminor_lower, size(kminor_lower), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(kminor_upper, size(kminor_upper), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(scaling_gas_lower, size(scaling_gas_lower), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(scaling_gas_upper, size(scaling_gas_upper), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(vmr_ref, size(vmr_ref), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(kmajor, size(kmajor), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(temp_ref_p, 1, MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(temp_ref_t, 1, MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(press_ref_trop, 1, MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(totplnk, size(totplnk), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(planck_frac, size(planck_frac), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(band_lims, size(band_lims), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(press_ref, size(press_ref), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(temp_ref, size(temp_ref), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(kminor_lower, size(kminor_lower), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(kminor_upper, size(kminor_upper), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(scaling_gas_lower, size(scaling_gas_lower), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(scaling_gas_upper, size(scaling_gas_upper), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(vmr_ref, size(vmr_ref), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(kmajor, size(kmajor), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(temp_ref_p, 1, MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(temp_ref_t, 1, MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(press_ref_trop, 1, MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(totplnk, size(totplnk), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(planck_frac, size(planck_frac), MPI_REAL, mpiroot, mpicomm, mpierr) #endif ! Character arrays do ij=1,nabsorbers - call MPI_BCAST(gas_names(ij), len(gas_names(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) + call MPI_BCAST(gas_names(ij), len(gas_names(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) enddo do ij=1,nminorabsorbers - call MPI_BCAST(gas_minor(ij), len(gas_minor(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) - call MPI_BCAST(identifier_minor(ij), len(identifier_minor(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) + call MPI_BCAST(gas_minor(ij), len(gas_minor(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) + call MPI_BCAST(identifier_minor(ij), len(identifier_minor(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) enddo do ij=1,nminor_absorber_intervals_lower - call MPI_BCAST(minor_gases_lower(ij), len(minor_gases_lower(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) + call MPI_BCAST(minor_gases_lower(ij), len(minor_gases_lower(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) enddo do ij=1,nminor_absorber_intervals_upper - call MPI_BCAST(minor_gases_upper(ij), len(minor_gases_upper(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) + call MPI_BCAST(minor_gases_upper(ij), len(minor_gases_upper(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) enddo ! Logical arrays ! From 01725b47395eff38951691d621ea49ec825f21b8 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Mon, 27 Jan 2020 14:48:48 -0700 Subject: [PATCH 125/167] Omission from previous commit. --- physics/rrtmgp_lw_gas_optics.F90 | 145 +++++++++++++++---------------- 1 file changed, 70 insertions(+), 75 deletions(-) diff --git a/physics/rrtmgp_lw_gas_optics.F90 b/physics/rrtmgp_lw_gas_optics.F90 index e058eb490..73e753bf1 100644 --- a/physics/rrtmgp_lw_gas_optics.F90 +++ b/physics/rrtmgp_lw_gas_optics.F90 @@ -267,89 +267,84 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp ! Close status = nf90_close(ncid_lw) endif - ierr = 1 - else - ierr = 0 endif ! Broadcast arrays to all processors #ifdef MPI - if (ierr .eq. 0) then - write (*,*) 'Broadcasting RRTMGP longwave k-distribution data ... ' - call MPI_BCAST(ntemps, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(npress, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nminorabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nextrabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nmixingfracs, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nlayers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nbnds, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(ngpts_lw, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(npairs, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(ncontributors_lower, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(ncontributors_upper, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nminor_absorber_intervals_lower, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nminor_absorber_intervals_upper, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(ninternalSourcetemps, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(minor_limits_gpt_upper, size(minor_limits_gpt_upper), MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(minor_limits_gpt_lower, size(minor_limits_gpt_lower), MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(kminor_start_upper, size(kminor_start_upper), MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(kminor_start_lower, size(kminor_start_lower), MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(key_species, size(key_species), MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(band2gpt, size(band2gpt), MPI_INTEGER, mpiroot, mpicomm, mpierr) + write (*,*) 'Broadcasting RRTMGP longwave k-distribution data ... ' + call MPI_BCAST(ntemps, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(npress, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nminorabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nextrabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nmixingfracs, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nlayers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nbnds, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(ngpts_lw, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(npairs, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(ncontributors_lower, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(ncontributors_upper, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nminor_absorber_intervals_lower, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nminor_absorber_intervals_upper, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(ninternalSourcetemps, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(minor_limits_gpt_upper, size(minor_limits_gpt_upper), MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(minor_limits_gpt_lower, size(minor_limits_gpt_lower), MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(kminor_start_upper, size(kminor_start_upper), MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(kminor_start_lower, size(kminor_start_lower), MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(key_species, size(key_species), MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(band2gpt, size(band2gpt), MPI_INTEGER, mpiroot, mpicomm, mpierr) #ifndef SINGLE_PREC - call MPI_BCAST(band_lims, size(band_lims), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(press_ref, size(press_ref), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(temp_ref, size(temp_ref), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(kminor_lower, size(kminor_lower), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(kminor_upper, size(kminor_upper), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(scaling_gas_lower, size(scaling_gas_lower), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(scaling_gas_upper, size(scaling_gas_upper), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(vmr_ref, size(vmr_ref), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(kmajor, size(kmajor), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(temp_ref_p, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(temp_ref_t, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(press_ref_trop, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(totplnk, size(totplnk), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(planck_frac, size(planck_frac), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call MPI_BCAST(band_lims, size(band_lims), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call MPI_BCAST(press_ref, size(press_ref), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call MPI_BCAST(temp_ref, size(temp_ref), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call MPI_BCAST(kminor_lower, size(kminor_lower), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call MPI_BCAST(kminor_upper, size(kminor_upper), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call MPI_BCAST(scaling_gas_lower, size(scaling_gas_lower), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call MPI_BCAST(scaling_gas_upper, size(scaling_gas_upper), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call MPI_BCAST(vmr_ref, size(vmr_ref), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call MPI_BCAST(kmajor, size(kmajor), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call MPI_BCAST(temp_ref_p, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call MPI_BCAST(temp_ref_t, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call MPI_BCAST(press_ref_trop, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call MPI_BCAST(totplnk, size(totplnk), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call MPI_BCAST(planck_frac, size(planck_frac), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) #else - call MPI_BCAST(band_lims, size(band_lims), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(press_ref, size(press_ref), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(temp_ref, size(temp_ref), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(kminor_lower, size(kminor_lower), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(kminor_upper, size(kminor_upper), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(scaling_gas_lower, size(scaling_gas_lower), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(scaling_gas_upper, size(scaling_gas_upper), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(vmr_ref, size(vmr_ref), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(kmajor, size(kmajor), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(temp_ref_p, 1, MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(temp_ref_t, 1, MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(press_ref_trop, 1, MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(totplnk, size(totplnk), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(planck_frac, size(planck_frac), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(band_lims, size(band_lims), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(press_ref, size(press_ref), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(temp_ref, size(temp_ref), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(kminor_lower, size(kminor_lower), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(kminor_upper, size(kminor_upper), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(scaling_gas_lower, size(scaling_gas_lower), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(scaling_gas_upper, size(scaling_gas_upper), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(vmr_ref, size(vmr_ref), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(kmajor, size(kmajor), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(temp_ref_p, 1, MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(temp_ref_t, 1, MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(press_ref_trop, 1, MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(totplnk, size(totplnk), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(planck_frac, size(planck_frac), MPI_REAL, mpiroot, mpicomm, mpierr) #endif - ! Character arrays - do ij=1,nabsorbers - call MPI_BCAST(gas_names(ij), len(gas_names(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) - enddo - do ij=1,nminorabsorbers - call MPI_BCAST(gas_minor(ij), len(gas_minor(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) - call MPI_BCAST(identifier_minor(ij), len(identifier_minor(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) - enddo - do ij=1,nminor_absorber_intervals_lower - call MPI_BCAST(minor_gases_lower(ij), len(minor_gases_lower(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) - enddo - do ij=1,nminor_absorber_intervals_upper - call MPI_BCAST(minor_gases_upper(ij), len(minor_gases_upper(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) - enddo - ! Logical arrays - ! - call MPI_BCAST(minor_scales_with_density_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(scale_by_complement_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(minor_scales_with_density_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(scale_by_complement_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, mpierr) - endif + ! Character arrays + do ij=1,nabsorbers + call MPI_BCAST(gas_names(ij), len(gas_names(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) + enddo + do ij=1,nminorabsorbers + call MPI_BCAST(gas_minor(ij), len(gas_minor(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) + call MPI_BCAST(identifier_minor(ij), len(identifier_minor(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) + enddo + do ij=1,nminor_absorber_intervals_lower + call MPI_BCAST(minor_gases_lower(ij), len(minor_gases_lower(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) + enddo + do ij=1,nminor_absorber_intervals_upper + call MPI_BCAST(minor_gases_upper(ij), len(minor_gases_upper(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) + enddo + ! Logical arrays + ! + call MPI_BCAST(minor_scales_with_density_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(scale_by_complement_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(minor_scales_with_density_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(scale_by_complement_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, mpierr) #endif ! Initialize gas concentrations and gas optics class with data From 28243f13ba5d9766a0b2c01d2de08de47502bbb3 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Mon, 27 Jan 2020 15:25:20 -0700 Subject: [PATCH 126/167] Remove bcast condition on precision. --- physics/rrtmgp_lw_gas_optics.F90 | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/physics/rrtmgp_lw_gas_optics.F90 b/physics/rrtmgp_lw_gas_optics.F90 index 73e753bf1..c4be69a13 100644 --- a/physics/rrtmgp_lw_gas_optics.F90 +++ b/physics/rrtmgp_lw_gas_optics.F90 @@ -294,22 +294,6 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp call MPI_BCAST(kminor_start_lower, size(kminor_start_lower), MPI_INTEGER, mpiroot, mpicomm, mpierr) call MPI_BCAST(key_species, size(key_species), MPI_INTEGER, mpiroot, mpicomm, mpierr) call MPI_BCAST(band2gpt, size(band2gpt), MPI_INTEGER, mpiroot, mpicomm, mpierr) -#ifndef SINGLE_PREC - call MPI_BCAST(band_lims, size(band_lims), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(press_ref, size(press_ref), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(temp_ref, size(temp_ref), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(kminor_lower, size(kminor_lower), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(kminor_upper, size(kminor_upper), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(scaling_gas_lower, size(scaling_gas_lower), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(scaling_gas_upper, size(scaling_gas_upper), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(vmr_ref, size(vmr_ref), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(kmajor, size(kmajor), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(temp_ref_p, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(temp_ref_t, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(press_ref_trop, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(totplnk, size(totplnk), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(planck_frac, size(planck_frac), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) -#else call MPI_BCAST(band_lims, size(band_lims), MPI_REAL, mpiroot, mpicomm, mpierr) call MPI_BCAST(press_ref, size(press_ref), MPI_REAL, mpiroot, mpicomm, mpierr) call MPI_BCAST(temp_ref, size(temp_ref), MPI_REAL, mpiroot, mpicomm, mpierr) From bb03ad3fed2fb904d517d8f13f8d9989f8dab879 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Mon, 27 Jan 2020 15:47:19 -0700 Subject: [PATCH 127/167] Omission from previous commit. --- physics/rrtmgp_lw_gas_optics.F90 | 1 - 1 file changed, 1 deletion(-) diff --git a/physics/rrtmgp_lw_gas_optics.F90 b/physics/rrtmgp_lw_gas_optics.F90 index c4be69a13..5bb966d85 100644 --- a/physics/rrtmgp_lw_gas_optics.F90 +++ b/physics/rrtmgp_lw_gas_optics.F90 @@ -308,7 +308,6 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp call MPI_BCAST(press_ref_trop, 1, MPI_REAL, mpiroot, mpicomm, mpierr) call MPI_BCAST(totplnk, size(totplnk), MPI_REAL, mpiroot, mpicomm, mpierr) call MPI_BCAST(planck_frac, size(planck_frac), MPI_REAL, mpiroot, mpicomm, mpierr) -#endif ! Character arrays do ij=1,nabsorbers call MPI_BCAST(gas_names(ij), len(gas_names(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) From f38ef59b00f4b18504bbf9ef68542d1074027cff Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Mon, 27 Jan 2020 16:26:39 -0700 Subject: [PATCH 128/167] Some changes to MPI calls in inti() routines. --- physics/rrtmgp_lw_gas_optics.F90 | 112 ++++++++++++++++--------------- 1 file changed, 57 insertions(+), 55 deletions(-) diff --git a/physics/rrtmgp_lw_gas_optics.F90 b/physics/rrtmgp_lw_gas_optics.F90 index 5bb966d85..4b0cfa629 100644 --- a/physics/rrtmgp_lw_gas_optics.F90 +++ b/physics/rrtmgp_lw_gas_optics.F90 @@ -272,62 +272,64 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp ! Broadcast arrays to all processors #ifdef MPI - write (*,*) 'Broadcasting RRTMGP longwave k-distribution data ... ' - call MPI_BCAST(ntemps, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(npress, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nminorabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nextrabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nmixingfracs, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nlayers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nbnds, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(ngpts_lw, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(npairs, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(ncontributors_lower, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(ncontributors_upper, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nminor_absorber_intervals_lower, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nminor_absorber_intervals_upper, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(ninternalSourcetemps, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(minor_limits_gpt_upper, size(minor_limits_gpt_upper), MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(minor_limits_gpt_lower, size(minor_limits_gpt_lower), MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(kminor_start_upper, size(kminor_start_upper), MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(kminor_start_lower, size(kminor_start_lower), MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(key_species, size(key_species), MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(band2gpt, size(band2gpt), MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(band_lims, size(band_lims), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(press_ref, size(press_ref), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(temp_ref, size(temp_ref), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(kminor_lower, size(kminor_lower), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(kminor_upper, size(kminor_upper), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(scaling_gas_lower, size(scaling_gas_lower), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(scaling_gas_upper, size(scaling_gas_upper), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(vmr_ref, size(vmr_ref), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(kmajor, size(kmajor), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(temp_ref_p, 1, MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(temp_ref_t, 1, MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(press_ref_trop, 1, MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(totplnk, size(totplnk), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(planck_frac, size(planck_frac), MPI_REAL, mpiroot, mpicomm, mpierr) - ! Character arrays - do ij=1,nabsorbers - call MPI_BCAST(gas_names(ij), len(gas_names(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) - enddo - do ij=1,nminorabsorbers - call MPI_BCAST(gas_minor(ij), len(gas_minor(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) - call MPI_BCAST(identifier_minor(ij), len(identifier_minor(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) - enddo - do ij=1,nminor_absorber_intervals_lower - call MPI_BCAST(minor_gases_lower(ij), len(minor_gases_lower(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) - enddo - do ij=1,nminor_absorber_intervals_upper - call MPI_BCAST(minor_gases_upper(ij), len(minor_gases_upper(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) - enddo - ! Logical arrays + if (mpirank .ne. mpiroot) then + write (*,*) 'Broadcasting RRTMGP longwave k-distribution data ... ' + call MPI_BCAST(ntemps, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(npress, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nminorabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nextrabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nmixingfracs, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nlayers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nbnds, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(ngpts_lw, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(npairs, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(ncontributors_lower, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(ncontributors_upper, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nminor_absorber_intervals_lower, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nminor_absorber_intervals_upper, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(ninternalSourcetemps, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(minor_limits_gpt_upper, size(minor_limits_gpt_upper), MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(minor_limits_gpt_lower, size(minor_limits_gpt_lower), MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(kminor_start_upper, size(kminor_start_upper), MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(kminor_start_lower, size(kminor_start_lower), MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(key_species, size(key_species), MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(band2gpt, size(band2gpt), MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(band_lims, size(band_lims), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(press_ref, size(press_ref), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(temp_ref, size(temp_ref), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(kminor_lower, size(kminor_lower), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(kminor_upper, size(kminor_upper), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(scaling_gas_lower, size(scaling_gas_lower), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(scaling_gas_upper, size(scaling_gas_upper), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(vmr_ref, size(vmr_ref), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(kmajor, size(kmajor), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(temp_ref_p, 1, MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(temp_ref_t, 1, MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(press_ref_trop, 1, MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(totplnk, size(totplnk), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(planck_frac, size(planck_frac), MPI_REAL, mpiroot, mpicomm, mpierr) + ! Character arrays + do ij=1,nabsorbers + call MPI_BCAST(gas_names(ij), len(gas_names(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) + enddo + do ij=1,nminorabsorbers + call MPI_BCAST(gas_minor(ij), len(gas_minor(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) + call MPI_BCAST(identifier_minor(ij), len(identifier_minor(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) + enddo + do ij=1,nminor_absorber_intervals_lower + call MPI_BCAST(minor_gases_lower(ij), len(minor_gases_lower(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) + enddo + do ij=1,nminor_absorber_intervals_upper + call MPI_BCAST(minor_gases_upper(ij), len(minor_gases_upper(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) + enddo + ! Logical arrays ! - call MPI_BCAST(minor_scales_with_density_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(scale_by_complement_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(minor_scales_with_density_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(scale_by_complement_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(minor_scales_with_density_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(scale_by_complement_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(minor_scales_with_density_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(scale_by_complement_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, mpierr) + endif #endif ! Initialize gas concentrations and gas optics class with data From f6c4e82fea3adb58eb843b3fa502f44a7734e19c Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Tue, 28 Jan 2020 09:33:50 -0700 Subject: [PATCH 129/167] Modification to LW gas optics init(). --- physics/rrtmgp_lw_gas_optics.F90 | 132 ++++++++++++++++--------------- 1 file changed, 67 insertions(+), 65 deletions(-) diff --git a/physics/rrtmgp_lw_gas_optics.F90 b/physics/rrtmgp_lw_gas_optics.F90 index 4b0cfa629..eab4683fc 100644 --- a/physics/rrtmgp_lw_gas_optics.F90 +++ b/physics/rrtmgp_lw_gas_optics.F90 @@ -111,22 +111,23 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp integer :: mpierr #endif + ! Sync up before data read and broadcast +#ifdef MPI + call MPI_BARRIER(mpicomm, mpierr) +#endif + ! Initialize errmsg = '' errflg = 0 -#ifdef MPI - call MPI_BARRIER(mpicomm, mpierr) -#endif - write(*,"(a12,3i10)") 'MPI ranks: ',mpirank,mpiroot,mpicomm ! Filenames are set in the physics_nml lw_gas_props_file = trim(rrtmgp_root_dir)//trim(rrtmgp_lw_file_gas) - ! On master processor... + ! On master processor only... if (mpirank .eq. mpiroot) then - ! Read dimensions for k-distribution fields (only on master processor(0)) + ! Read dimensions for k-distribution fields if(nf90_open(trim(lw_gas_props_file), NF90_WRITE, ncid_lw) .eq. NF90_NOERR) then status = nf90_inq_dimid(ncid_lw, 'temperature', dimid) status = nf90_inquire_dimension(ncid_lw, dimid, len=ntemps) @@ -270,66 +271,67 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp endif - ! Broadcast arrays to all processors + ! Broadcast data to all processors #ifdef MPI - if (mpirank .ne. mpiroot) then - write (*,*) 'Broadcasting RRTMGP longwave k-distribution data ... ' - call MPI_BCAST(ntemps, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(npress, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nminorabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nextrabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nmixingfracs, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nlayers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nbnds, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(ngpts_lw, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(npairs, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(ncontributors_lower, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(ncontributors_upper, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nminor_absorber_intervals_lower, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nminor_absorber_intervals_upper, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(ninternalSourcetemps, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(minor_limits_gpt_upper, size(minor_limits_gpt_upper), MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(minor_limits_gpt_lower, size(minor_limits_gpt_lower), MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(kminor_start_upper, size(kminor_start_upper), MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(kminor_start_lower, size(kminor_start_lower), MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(key_species, size(key_species), MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(band2gpt, size(band2gpt), MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(band_lims, size(band_lims), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(press_ref, size(press_ref), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(temp_ref, size(temp_ref), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(kminor_lower, size(kminor_lower), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(kminor_upper, size(kminor_upper), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(scaling_gas_lower, size(scaling_gas_lower), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(scaling_gas_upper, size(scaling_gas_upper), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(vmr_ref, size(vmr_ref), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(kmajor, size(kmajor), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(temp_ref_p, 1, MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(temp_ref_t, 1, MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(press_ref_trop, 1, MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(totplnk, size(totplnk), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(planck_frac, size(planck_frac), MPI_REAL, mpiroot, mpicomm, mpierr) - ! Character arrays - do ij=1,nabsorbers - call MPI_BCAST(gas_names(ij), len(gas_names(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) - enddo - do ij=1,nminorabsorbers - call MPI_BCAST(gas_minor(ij), len(gas_minor(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) - call MPI_BCAST(identifier_minor(ij), len(identifier_minor(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) - enddo - do ij=1,nminor_absorber_intervals_lower - call MPI_BCAST(minor_gases_lower(ij), len(minor_gases_lower(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) - enddo - do ij=1,nminor_absorber_intervals_upper - call MPI_BCAST(minor_gases_upper(ij), len(minor_gases_upper(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) - enddo - ! Logical arrays - ! - call MPI_BCAST(minor_scales_with_density_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(scale_by_complement_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(minor_scales_with_density_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(scale_by_complement_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, mpierr) - endif + ! Wait for processor 0 to catch up... + call MPI_BARRIER(mpicomm, mpierr) + ! + !if (mpirank .ne. mpiroot) then + write (*,*) 'Broadcasting RRTMGP longwave k-distribution data ... ' + call MPI_BCAST(ntemps, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(npress, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nminorabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nextrabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nmixingfracs, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nlayers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nbnds, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(ngpts_lw, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(npairs, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(ncontributors_lower, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(ncontributors_upper, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nminor_absorber_intervals_lower, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nminor_absorber_intervals_upper, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(ninternalSourcetemps, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(minor_limits_gpt_upper, size(minor_limits_gpt_upper), MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(minor_limits_gpt_lower, size(minor_limits_gpt_lower), MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(kminor_start_upper, size(kminor_start_upper), MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(kminor_start_lower, size(kminor_start_lower), MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(key_species, size(key_species), MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(band2gpt, size(band2gpt), MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(band_lims, size(band_lims), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(press_ref, size(press_ref), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(temp_ref, size(temp_ref), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(kminor_lower, size(kminor_lower), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(kminor_upper, size(kminor_upper), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(scaling_gas_lower, size(scaling_gas_lower), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(scaling_gas_upper, size(scaling_gas_upper), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(vmr_ref, size(vmr_ref), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(kmajor, size(kmajor), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(temp_ref_p, 1, MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(temp_ref_t, 1, MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(press_ref_trop, 1, MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(totplnk, size(totplnk), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(planck_frac, size(planck_frac), MPI_REAL, mpiroot, mpicomm, mpierr) + ! Character arrays + do ij=1,nabsorbers + call MPI_BCAST(gas_names(ij), len(gas_names(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) + enddo + do ij=1,nminorabsorbers + call MPI_BCAST(gas_minor(ij), len(gas_minor(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) + call MPI_BCAST(identifier_minor(ij), len(identifier_minor(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) + enddo + do ij=1,nminor_absorber_intervals_lower + call MPI_BCAST(minor_gases_lower(ij), len(minor_gases_lower(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) + enddo + do ij=1,nminor_absorber_intervals_upper + call MPI_BCAST(minor_gases_upper(ij), len(minor_gases_upper(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) + enddo + ! Logical arrays + call MPI_BCAST(minor_scales_with_density_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(scale_by_complement_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(minor_scales_with_density_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(scale_by_complement_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, mpierr) #endif ! Initialize gas concentrations and gas optics class with data From c5ce144525abb51605c204b125db1496c5ef983d Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Tue, 28 Jan 2020 10:05:25 -0700 Subject: [PATCH 130/167] Modification to LW gas optics init(). Add mpi_barrier --- physics/rrtmgp_lw_gas_optics.F90 | 334 +++++++++++++++---------------- 1 file changed, 167 insertions(+), 167 deletions(-) diff --git a/physics/rrtmgp_lw_gas_optics.F90 b/physics/rrtmgp_lw_gas_optics.F90 index eab4683fc..7557fcbae 100644 --- a/physics/rrtmgp_lw_gas_optics.F90 +++ b/physics/rrtmgp_lw_gas_optics.F90 @@ -103,7 +103,7 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp ncontributors_lower, ncontributors_upper ! Local variables - integer :: ncid_lw, dimID, varID, status, iGas, ierr + integer :: ncid, dimID, varID, status, iGas, ierr integer,dimension(:),allocatable :: temp1, temp2, temp3, temp4, & temp_log_array1, temp_log_array2, temp_log_array3, temp_log_array4 character(len=264) :: lw_gas_props_file @@ -127,40 +127,41 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp ! On master processor only... if (mpirank .eq. mpiroot) then + ! Opne file + status = nf90_open(trim(lw_gas_props_file), NF90_WRITE, ncid) + ! Read dimensions for k-distribution fields - if(nf90_open(trim(lw_gas_props_file), NF90_WRITE, ncid_lw) .eq. NF90_NOERR) then - status = nf90_inq_dimid(ncid_lw, 'temperature', dimid) - status = nf90_inquire_dimension(ncid_lw, dimid, len=ntemps) - status = nf90_inq_dimid(ncid_lw, 'pressure', dimid) - status = nf90_inquire_dimension(ncid_lw, dimid, len=npress) - status = nf90_inq_dimid(ncid_lw, 'absorber', dimid) - status = nf90_inquire_dimension(ncid_lw, dimid, len=nabsorbers) - status = nf90_inq_dimid(ncid_lw, 'minor_absorber', dimid) - status = nf90_inquire_dimension(ncid_lw, dimid, len=nminorabsorbers) - status = nf90_inq_dimid(ncid_lw, 'absorber_ext', dimid) - status = nf90_inquire_dimension(ncid_lw, dimid, len=nextrabsorbers) - status = nf90_inq_dimid(ncid_lw, 'mixing_fraction', dimid) - status = nf90_inquire_dimension(ncid_lw, dimid, len=nmixingfracs) - status = nf90_inq_dimid(ncid_lw, 'atmos_layer', dimid) - status = nf90_inquire_dimension(ncid_lw, dimid, len=nlayers) - status = nf90_inq_dimid(ncid_lw, 'bnd', dimid) - status = nf90_inquire_dimension(ncid_lw, dimid, len=nbnds) - status = nf90_inq_dimid(ncid_lw, 'gpt', dimid) - status = nf90_inquire_dimension(ncid_lw, dimid, len=ngpts_lw) - status = nf90_inq_dimid(ncid_lw, 'pair', dimid) - status = nf90_inquire_dimension(ncid_lw, dimid, len=npairs) - status = nf90_inq_dimid(ncid_lw, 'contributors_lower', dimid) - status = nf90_inquire_dimension(ncid_lw, dimid, len=ncontributors_lower) - status = nf90_inq_dimid(ncid_lw, 'contributors_upper', dimid) - status = nf90_inquire_dimension(ncid_lw, dimid, len=ncontributors_upper) - status = nf90_inq_dimid(ncid_lw, 'minor_absorber_intervals_lower', dimid) - status = nf90_inquire_dimension(ncid_lw, dimid, len=nminor_absorber_intervals_lower) - status = nf90_inq_dimid(ncid_lw, 'minor_absorber_intervals_upper', dimid) - status = nf90_inquire_dimension(ncid_lw, dimid, len=nminor_absorber_intervals_upper) - status = nf90_inq_dimid(ncid_lw, 'temperature_Planck', dimid) - status = nf90_inquire_dimension(ncid_lw, dimid, len=ninternalSourcetemps) - status = nf90_close(ncid_lw) - endif + status = nf90_inq_dimid( ncid, 'temperature', dimid) + status = nf90_inquire_dimension(ncid, dimid, len = ntemps) + status = nf90_inq_dimid( ncid, 'pressure', dimid) + status = nf90_inquire_dimension(ncid, dimid, len = npress) + status = nf90_inq_dimid( ncid, 'absorber', dimid) + status = nf90_inquire_dimension(ncid, dimid, len = nabsorbers) + status = nf90_inq_dimid( ncid, 'minor_absorber', dimid) + status = nf90_inquire_dimension(ncid, dimid, len = nminorabsorbers) + status = nf90_inq_dimid( ncid, 'absorber_ext', dimid) + status = nf90_inquire_dimension(ncid, dimid, len = nextrabsorbers) + status = nf90_inq_dimid( ncid, 'mixing_fraction', dimid) + status = nf90_inquire_dimension(ncid, dimid, len = nmixingfracs) + status = nf90_inq_dimid( ncid, 'atmos_layer', dimid) + status = nf90_inquire_dimension(ncid, dimid, len = nlayers) + status = nf90_inq_dimid( ncid, 'bnd', dimid) + status = nf90_inquire_dimension(ncid, dimid, len = nbnds) + status = nf90_inq_dimid( ncid, 'gpt', dimid) + status = nf90_inquire_dimension(ncid, dimid, len = ngpts_lw) + status = nf90_inq_dimid( ncid, 'pair', dimid) + status = nf90_inquire_dimension(ncid, dimid, len = npairs) + status = nf90_inq_dimid( ncid, 'contributors_lower', dimid) + status = nf90_inquire_dimension(ncid, dimid, len = ncontributors_lower) + status = nf90_inq_dimid( ncid, 'contributors_upper', dimid) + status = nf90_inquire_dimension(ncid, dimid, len = ncontributors_upper) + status = nf90_inq_dimid( ncid, 'minor_absorber_intervals_lower', dimid) + status = nf90_inquire_dimension(ncid, dimid, len = nminor_absorber_intervals_lower) + status = nf90_inq_dimid( ncid, 'minor_absorber_intervals_upper', dimid) + status = nf90_inquire_dimension(ncid, dimid, len = nminor_absorber_intervals_upper) + status = nf90_inq_dimid( ncid, 'temperature_Planck', dimid) + status = nf90_inquire_dimension(ncid, dimid, len = ninternalSourcetemps) + ! Allocate space for arrays allocate(gas_names(nabsorbers)) allocate(scaling_gas_lower(nminor_absorber_intervals_lower)) @@ -195,143 +196,142 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp ! Read in fields from file write (*,*) 'Reading RRTMGP longwave k-distribution data ... ' - if(nf90_open(trim(lw_gas_props_file), NF90_WRITE, ncid_lw) .eq. NF90_NOERR) then - status = nf90_inq_varid(ncid_lw,'gas_names',varID) - status = nf90_get_var(ncid_lw,varID,gas_names) - status = nf90_inq_varid(ncid_lw,'scaling_gas_lower',varID) - status = nf90_get_var(ncid_lw,varID,scaling_gas_lower) - status = nf90_inq_varid(ncid_lw,'scaling_gas_upper',varID) - status = nf90_get_var(ncid_lw,varID,scaling_gas_upper) - status = nf90_inq_varid(ncid_lw,'gas_minor',varID) - status = nf90_get_var(ncid_lw,varID,gas_minor) - status = nf90_inq_varid(ncid_lw,'identifier_minor',varID) - status = nf90_get_var(ncid_lw,varID,identifier_minor) - status = nf90_inq_varid(ncid_lw,'minor_gases_lower',varID) - status = nf90_get_var(ncid_lw,varID,minor_gases_lower) - status = nf90_inq_varid(ncid_lw,'minor_gases_upper',varID) - status = nf90_get_var(ncid_lw,varID,minor_gases_upper) - status = nf90_inq_varid(ncid_lw,'minor_limits_gpt_lower',varID) - status = nf90_get_var(ncid_lw,varID,minor_limits_gpt_lower) - status = nf90_inq_varid(ncid_lw,'minor_limits_gpt_upper',varID) - status = nf90_get_var(ncid_lw,varID,minor_limits_gpt_upper) - status = nf90_inq_varid(ncid_lw,'bnd_limits_gpt',varID) - status = nf90_get_var(ncid_lw,varID,band2gpt) - status = nf90_inq_varid(ncid_lw,'key_species',varID) - status = nf90_get_var(ncid_lw,varID,key_species) - status = nf90_inq_varid(ncid_lw,'bnd_limits_wavenumber',varID) - status = nf90_get_var(ncid_lw,varID,band_lims) - status = nf90_inq_varid(ncid_lw,'press_ref',varID) - status = nf90_get_var(ncid_lw,varID,press_ref) - status = nf90_inq_varid(ncid_lw,'temp_ref',varID) - status = nf90_get_var(ncid_lw,varID,temp_ref) - status = nf90_inq_varid(ncid_lw,'absorption_coefficient_ref_P',varID) - status = nf90_get_var(ncid_lw,varID,temp_ref_p) - status = nf90_inq_varid(ncid_lw,'absorption_coefficient_ref_T',varID) - status = nf90_get_var(ncid_lw,varID,temp_ref_t) - status = nf90_inq_varid(ncid_lw,'press_ref_trop',varID) - status = nf90_get_var(ncid_lw,varID,press_ref_trop) - status = nf90_inq_varid(ncid_lw,'kminor_lower',varID) - status = nf90_get_var(ncid_lw,varID,kminor_lower) - status = nf90_inq_varid(ncid_lw,'kminor_upper',varID) - status = nf90_get_var(ncid_lw,varID,kminor_upper) - status = nf90_inq_varid(ncid_lw,'vmr_ref',varID) - status = nf90_get_var(ncid_lw,varID,vmr_ref) - status = nf90_inq_varid(ncid_lw,'kmajor',varID) - status = nf90_get_var(ncid_lw,varID,kmajor) - status = nf90_inq_varid(ncid_lw,'kminor_start_lower',varID) - status = nf90_get_var(ncid_lw,varID,kminor_start_lower) - status = nf90_inq_varid(ncid_lw,'kminor_start_upper',varID) - status = nf90_get_var(ncid_lw,varID,kminor_start_upper) - status = nf90_inq_varid(ncid_lw,'totplnk',varID) - status = nf90_get_var(ncid_lw,varID,totplnk) - status = nf90_inq_varid(ncid_lw,'plank_fraction',varID) - status = nf90_get_var(ncid_lw,varID,planck_frac) - - ! Logical fields are read in as integers and then converted to logicals. - status = nf90_inq_varid(ncid_lw,'minor_scales_with_density_lower',varID) - status = nf90_get_var(ncid_lw,varID,temp1) - minor_scales_with_density_lower(:) = .false. - where(temp1 .eq. 1) minor_scales_with_density_lower(:) = .true. - status = nf90_inq_varid(ncid_lw,'minor_scales_with_density_upper',varID) - status = nf90_get_var(ncid_lw,varID,temp2) - minor_scales_with_density_upper(:) = .false. - where(temp2 .eq. 1) minor_scales_with_density_upper(:) = .true. - status = nf90_inq_varid(ncid_lw,'scale_by_complement_lower',varID) - status = nf90_get_var(ncid_lw,varID,temp3) - scale_by_complement_lower(:) = .false. - where(temp3 .eq. 1) scale_by_complement_lower(:) = .true. - status = nf90_inq_varid(ncid_lw,'scale_by_complement_upper',varID) - status = nf90_get_var(ncid_lw,varID,temp4) - scale_by_complement_upper(:) = .false. - where(temp4 .eq. 1) scale_by_complement_upper(:) = .true. + status = nf90_inq_varid(ncid, 'gas_names', varID) + status = nf90_get_var( ncid, varID, gas_names) + status = nf90_inq_varid(ncid, 'scaling_gas_lower', varID) + status = nf90_get_var( ncid, varID, scaling_gas_lower) + status = nf90_inq_varid(ncid, 'scaling_gas_upper', varID) + status = nf90_get_var( ncid, varID, scaling_gas_upper) + status = nf90_inq_varid(ncid, 'gas_minor', varID) + status = nf90_get_var( ncid, varID, gas_minor) + status = nf90_inq_varid(ncid, 'identifier_minor', varID) + status = nf90_get_var( ncid, varID, identifier_minor) + status = nf90_inq_varid(ncid, 'minor_gases_lower', varID) + status = nf90_get_var( ncid, varID, minor_gases_lower) + status = nf90_inq_varid(ncid, 'minor_gases_upper', varID) + status = nf90_get_var( ncid, varID, minor_gases_upper) + status = nf90_inq_varid(ncid, 'minor_limits_gpt_lower', varID) + status = nf90_get_var( ncid, varID, minor_limits_gpt_lower) + status = nf90_inq_varid(ncid, 'minor_limits_gpt_upper', varID) + status = nf90_get_var( ncid, varID, minor_limits_gpt_upper) + status = nf90_inq_varid(ncid, 'bnd_limits_gpt', varID) + status = nf90_get_var( ncid, varID, band2gpt) + status = nf90_inq_varid(ncid, 'key_species', varID) + status = nf90_get_var( ncid, varID, key_species) + status = nf90_inq_varid(ncid, 'bnd_limits_wavenumber', varID) + status = nf90_get_var( ncid, varID, band_lims) + status = nf90_inq_varid(ncid, 'press_ref', varID) + status = nf90_get_var( ncid, varID, press_ref) + status = nf90_inq_varid(ncid, 'temp_ref', varID) + status = nf90_get_var( ncid, varID, temp_ref) + status = nf90_inq_varid(ncid, 'absorption_coefficient_ref_P',varID) + status = nf90_get_var( ncid, varID, temp_ref_p) + status = nf90_inq_varid(ncid, 'absorption_coefficient_ref_T',varID) + status = nf90_get_var( ncid, varID, temp_ref_t) + status = nf90_inq_varid(ncid, 'press_ref_trop', varID) + status = nf90_get_var( ncid, varID, press_ref_trop) + status = nf90_inq_varid(ncid, 'kminor_lower', varID) + status = nf90_get_var( ncid, varID, kminor_lower) + status = nf90_inq_varid(ncid, 'kminor_upper', varID) + status = nf90_get_var( ncid, varID, kminor_upper) + status = nf90_inq_varid(ncid, 'vmr_ref', varID) + status = nf90_get_var( ncid, varID, vmr_ref) + status = nf90_inq_varid(ncid, 'kmajor', varID) + status = nf90_get_var( ncid, varID, kmajor) + status = nf90_inq_varid(ncid, 'kminor_start_lower', varID) + status = nf90_get_var( ncid, varID, kminor_start_lower) + status = nf90_inq_varid(ncid, 'kminor_start_upper', varID) + status = nf90_get_var( ncid, varID, kminor_start_upper) + status = nf90_inq_varid(ncid, 'totplnk', varID) + status = nf90_get_var( ncid, varID, totplnk) + status = nf90_inq_varid(ncid, 'plank_fraction', varID) + status = nf90_get_var( ncid, varID, planck_frac) + + ! Logical fields are read in as integers and then converted to logicals. + status = nf90_inq_varid(ncid, 'minor_scales_with_density_lower',varID) + status = nf90_get_var( ncid, varID,temp1) + minor_scales_with_density_lower(:) = .false. + where(temp1 .eq. 1) minor_scales_with_density_lower(:) = .true. + status = nf90_inq_varid(ncid, 'minor_scales_with_density_upper',varID) + status = nf90_get_var( ncid, varID,temp2) + minor_scales_with_density_upper(:) = .false. + where(temp2 .eq. 1) minor_scales_with_density_upper(:) = .true. + status = nf90_inq_varid(ncid, 'scale_by_complement_lower', varID) + status = nf90_get_var( ncid, varID,temp3) + scale_by_complement_lower(:) = .false. + where(temp3 .eq. 1) scale_by_complement_lower(:) = .true. + status = nf90_inq_varid(ncid, 'scale_by_complement_upper', varID) + status = nf90_get_var( ncid, varID,temp4) + scale_by_complement_upper(:) = .false. + where(temp4 .eq. 1) scale_by_complement_upper(:) = .true. - ! Close - status = nf90_close(ncid_lw) - endif + ! Close file + status = nf90_close(ncid) endif - - ! Broadcast data to all processors #ifdef MPI - ! Wait for processor 0 to catch up... - call MPI_BARRIER(mpicomm, mpierr) - ! - !if (mpirank .ne. mpiroot) then - write (*,*) 'Broadcasting RRTMGP longwave k-distribution data ... ' - call MPI_BCAST(ntemps, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(npress, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nminorabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nextrabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nmixingfracs, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nlayers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nbnds, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(ngpts_lw, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(npairs, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(ncontributors_lower, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(ncontributors_upper, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nminor_absorber_intervals_lower, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nminor_absorber_intervals_upper, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(ninternalSourcetemps, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(minor_limits_gpt_upper, size(minor_limits_gpt_upper), MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(minor_limits_gpt_lower, size(minor_limits_gpt_lower), MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(kminor_start_upper, size(kminor_start_upper), MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(kminor_start_lower, size(kminor_start_lower), MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(key_species, size(key_species), MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(band2gpt, size(band2gpt), MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(band_lims, size(band_lims), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(press_ref, size(press_ref), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(temp_ref, size(temp_ref), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(kminor_lower, size(kminor_lower), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(kminor_upper, size(kminor_upper), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(scaling_gas_lower, size(scaling_gas_lower), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(scaling_gas_upper, size(scaling_gas_upper), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(vmr_ref, size(vmr_ref), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(kmajor, size(kmajor), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(temp_ref_p, 1, MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(temp_ref_t, 1, MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(press_ref_trop, 1, MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(totplnk, size(totplnk), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(planck_frac, size(planck_frac), MPI_REAL, mpiroot, mpicomm, mpierr) - ! Character arrays - do ij=1,nabsorbers - call MPI_BCAST(gas_names(ij), len(gas_names(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) - enddo - do ij=1,nminorabsorbers - call MPI_BCAST(gas_minor(ij), len(gas_minor(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) - call MPI_BCAST(identifier_minor(ij), len(identifier_minor(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) - enddo - do ij=1,nminor_absorber_intervals_lower - call MPI_BCAST(minor_gases_lower(ij), len(minor_gases_lower(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) - enddo - do ij=1,nminor_absorber_intervals_upper - call MPI_BCAST(minor_gases_upper(ij), len(minor_gases_upper(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) - enddo - ! Logical arrays - call MPI_BCAST(minor_scales_with_density_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(scale_by_complement_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(minor_scales_with_density_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(scale_by_complement_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, mpierr) + if (mpirank .ne. mpiroot) then + ! Wait for processor 0 to catch up... + call MPI_BARRIER(mpicomm, mpierr) + ! Broadcast data + write (*,*) 'Broadcasting RRTMGP longwave k-distribution data ... ' + call MPI_BCAST(ntemps, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(npress, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nminorabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nextrabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nmixingfracs, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nlayers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nbnds, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(ngpts_lw, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(npairs, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(ncontributors_lower, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(ncontributors_upper, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nminor_absorber_intervals_lower, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nminor_absorber_intervals_upper, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(ninternalSourcetemps, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(minor_limits_gpt_upper, size(minor_limits_gpt_upper), MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(minor_limits_gpt_lower, size(minor_limits_gpt_lower), MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(kminor_start_upper, size(kminor_start_upper), MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(kminor_start_lower, size(kminor_start_lower), MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(key_species, size(key_species), MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(band2gpt, size(band2gpt), MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(band_lims, size(band_lims), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(press_ref, size(press_ref), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(temp_ref, size(temp_ref), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(kminor_lower, size(kminor_lower), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(kminor_upper, size(kminor_upper), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(scaling_gas_lower, size(scaling_gas_lower), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(scaling_gas_upper, size(scaling_gas_upper), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(vmr_ref, size(vmr_ref), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(kmajor, size(kmajor), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(temp_ref_p, 1, MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(temp_ref_t, 1, MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(press_ref_trop, 1, MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(totplnk, size(totplnk), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(planck_frac, size(planck_frac), MPI_REAL, mpiroot, mpicomm, mpierr) + ! Character arrays + do ij=1,nabsorbers + call MPI_BCAST(gas_names(ij), len(gas_names(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) + enddo + do ij=1,nminorabsorbers + call MPI_BCAST(gas_minor(ij), len(gas_minor(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) + call MPI_BCAST(identifier_minor(ij), len(identifier_minor(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) + enddo + do ij=1,nminor_absorber_intervals_lower + call MPI_BCAST(minor_gases_lower(ij), len(minor_gases_lower(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) + enddo + do ij=1,nminor_absorber_intervals_upper + call MPI_BCAST(minor_gases_upper(ij), len(minor_gases_upper(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) + enddo + ! Logical arrays + call MPI_BCAST(minor_scales_with_density_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(scale_by_complement_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(minor_scales_with_density_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(scale_by_complement_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, mpierr) + else + call MPI_BARRIER(mpicomm, mpierr) + endif #endif ! Initialize gas concentrations and gas optics class with data From 28269a94fcb85ebbfc1c9678b7b93c69642a4ed8 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Tue, 28 Jan 2020 10:35:04 -0700 Subject: [PATCH 131/167] Modification to LW gas optics init(). One more time. --- physics/rrtmgp_lw_gas_optics.F90 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/physics/rrtmgp_lw_gas_optics.F90 b/physics/rrtmgp_lw_gas_optics.F90 index 7557fcbae..47f0d014f 100644 --- a/physics/rrtmgp_lw_gas_optics.F90 +++ b/physics/rrtmgp_lw_gas_optics.F90 @@ -270,7 +270,7 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp endif #ifdef MPI - if (mpirank .ne. mpiroot) then +! if (mpirank .ne. mpiroot) then ! Wait for processor 0 to catch up... call MPI_BARRIER(mpicomm, mpierr) ! Broadcast data @@ -329,9 +329,9 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp call MPI_BCAST(scale_by_complement_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, mpierr) call MPI_BCAST(minor_scales_with_density_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, mpierr) call MPI_BCAST(scale_by_complement_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, mpierr) - else +! else call MPI_BARRIER(mpicomm, mpierr) - endif +! endif #endif ! Initialize gas concentrations and gas optics class with data From d42469b35632eed39692f1132c874dab6468ab1e Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Tue, 28 Jan 2020 11:12:32 -0700 Subject: [PATCH 132/167] Change data type to double-precision. --- physics/rrtmgp_lw_gas_optics.F90 | 131 +++++++++++++++---------------- 1 file changed, 64 insertions(+), 67 deletions(-) diff --git a/physics/rrtmgp_lw_gas_optics.F90 b/physics/rrtmgp_lw_gas_optics.F90 index 47f0d014f..fadecf34a 100644 --- a/physics/rrtmgp_lw_gas_optics.F90 +++ b/physics/rrtmgp_lw_gas_optics.F90 @@ -60,17 +60,17 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp minor_limits_gpt_upper ! Beginning and ending gpoint for each minor interval in upper atmosphere integer, dimension(:,:,:), allocatable :: & key_species ! Key species pair for each band - real(kind_phys) :: & + real(kind=8) :: & press_ref_trop, & ! Reference pressure separating the lower and upper atmosphere [Pa] temp_ref_p, & ! Standard spectroscopic reference pressure [Pa] temp_ref_t ! Standard spectroscopic reference temperature [K] - real(kind_phys), dimension(:), allocatable :: & + real(kind=8), dimension(:), allocatable :: & press_ref, & ! Pressures for reference atmosphere; press_ref(# reference layers) [Pa] temp_ref ! Temperatures for reference atmosphere; temp_ref(# reference layers) [K] - real(kind_phys), dimension(:,:), allocatable :: & + real(kind=8), dimension(:,:), allocatable :: & band_lims, & ! Beginning and ending wavenumber [cm -1] for each band totplnk ! Integrated Planck function by band - real(kind_phys), dimension(:,:,:), allocatable :: & + real(kind=8), dimension(:,:,:), allocatable :: & vmr_ref, & ! volume mixing ratios for reference atmosphere kminor_lower, & ! (transformed from [nTemp x nEta x nGpt x nAbsorbers] array to ! [nTemp x nEta x nContributors] array) @@ -78,7 +78,7 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp ! [nTemp x nEta x nContributors] array) rayl_lower, & ! Not used in LW, rather allocated(rayl_lower) is used rayl_upper ! Not used in LW, rather allocated(rayl_upper) is used - real(kind_phys), dimension(:,:,:,:), allocatable :: & + real(kind=8), dimension(:,:,:,:), allocatable :: & kmajor, & ! Stored absorption coefficients due to major absorbing gases planck_frac ! Planck fractions character(len=32), dimension(:), allocatable :: & @@ -270,68 +270,65 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp endif #ifdef MPI -! if (mpirank .ne. mpiroot) then - ! Wait for processor 0 to catch up... - call MPI_BARRIER(mpicomm, mpierr) - ! Broadcast data - write (*,*) 'Broadcasting RRTMGP longwave k-distribution data ... ' - call MPI_BCAST(ntemps, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(npress, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nminorabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nextrabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nmixingfracs, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nlayers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nbnds, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(ngpts_lw, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(npairs, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(ncontributors_lower, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(ncontributors_upper, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nminor_absorber_intervals_lower, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nminor_absorber_intervals_upper, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(ninternalSourcetemps, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(minor_limits_gpt_upper, size(minor_limits_gpt_upper), MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(minor_limits_gpt_lower, size(minor_limits_gpt_lower), MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(kminor_start_upper, size(kminor_start_upper), MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(kminor_start_lower, size(kminor_start_lower), MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(key_species, size(key_species), MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(band2gpt, size(band2gpt), MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(band_lims, size(band_lims), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(press_ref, size(press_ref), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(temp_ref, size(temp_ref), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(kminor_lower, size(kminor_lower), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(kminor_upper, size(kminor_upper), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(scaling_gas_lower, size(scaling_gas_lower), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(scaling_gas_upper, size(scaling_gas_upper), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(vmr_ref, size(vmr_ref), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(kmajor, size(kmajor), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(temp_ref_p, 1, MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(temp_ref_t, 1, MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(press_ref_trop, 1, MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(totplnk, size(totplnk), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(planck_frac, size(planck_frac), MPI_REAL, mpiroot, mpicomm, mpierr) - ! Character arrays - do ij=1,nabsorbers - call MPI_BCAST(gas_names(ij), len(gas_names(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) - enddo - do ij=1,nminorabsorbers - call MPI_BCAST(gas_minor(ij), len(gas_minor(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) - call MPI_BCAST(identifier_minor(ij), len(identifier_minor(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) - enddo - do ij=1,nminor_absorber_intervals_lower - call MPI_BCAST(minor_gases_lower(ij), len(minor_gases_lower(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) - enddo - do ij=1,nminor_absorber_intervals_upper - call MPI_BCAST(minor_gases_upper(ij), len(minor_gases_upper(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) - enddo - ! Logical arrays - call MPI_BCAST(minor_scales_with_density_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(scale_by_complement_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(minor_scales_with_density_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(scale_by_complement_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, mpierr) -! else - call MPI_BARRIER(mpicomm, mpierr) -! endif + ! Wait for processor 0 to catch up... + call MPI_BARRIER(mpicomm, mpierr) + ! Broadcast data + write (*,*) 'Broadcasting RRTMGP longwave k-distribution data ... ' + call MPI_BCAST(ntemps, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(npress, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nminorabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nextrabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nmixingfracs, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nlayers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nbnds, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(ngpts_lw, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(npairs, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(ncontributors_lower, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(ncontributors_upper, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nminor_absorber_intervals_lower, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nminor_absorber_intervals_upper, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(ninternalSourcetemps, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(minor_limits_gpt_upper, size(minor_limits_gpt_upper), MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(minor_limits_gpt_lower, size(minor_limits_gpt_lower), MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(kminor_start_upper, size(kminor_start_upper), MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(kminor_start_lower, size(kminor_start_lower), MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(key_species, size(key_species), MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(band2gpt, size(band2gpt), MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(band_lims, size(band_lims), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call MPI_BCAST(press_ref, size(press_ref), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call MPI_BCAST(temp_ref, size(temp_ref), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call MPI_BCAST(kminor_lower, size(kminor_lower), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call MPI_BCAST(kminor_upper, size(kminor_upper), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call MPI_BCAST(scaling_gas_lower, size(scaling_gas_lower), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call MPI_BCAST(scaling_gas_upper, size(scaling_gas_upper), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call MPI_BCAST(vmr_ref, size(vmr_ref), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call MPI_BCAST(kmajor, size(kmajor), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call MPI_BCAST(temp_ref_p, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call MPI_BCAST(temp_ref_t, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call MPI_BCAST(press_ref_trop, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call MPI_BCAST(totplnk, size(totplnk), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + call MPI_BCAST(planck_frac, size(planck_frac), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) + ! Character arrays + do ij=1,nabsorbers + call MPI_BCAST(gas_names(ij), len(gas_names(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) + enddo + do ij=1,nminorabsorbers + call MPI_BCAST(gas_minor(ij), len(gas_minor(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) + call MPI_BCAST(identifier_minor(ij), len(identifier_minor(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) + enddo + do ij=1,nminor_absorber_intervals_lower + call MPI_BCAST(minor_gases_lower(ij), len(minor_gases_lower(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) + enddo + do ij=1,nminor_absorber_intervals_upper + call MPI_BCAST(minor_gases_upper(ij), len(minor_gases_upper(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) + enddo + ! Logical arrays + call MPI_BCAST(minor_scales_with_density_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(scale_by_complement_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(minor_scales_with_density_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(scale_by_complement_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, mpierr) + #endif ! Initialize gas concentrations and gas optics class with data From e40e0f500db5e63cd458acb9333c72a98f7645ad Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Tue, 28 Jan 2020 11:40:53 -0700 Subject: [PATCH 133/167] Added some diagnostic print statements. --- physics/rrtmgp_lw_gas_optics.F90 | 166 +++++++++++++++++++------------ 1 file changed, 102 insertions(+), 64 deletions(-) diff --git a/physics/rrtmgp_lw_gas_optics.F90 b/physics/rrtmgp_lw_gas_optics.F90 index fadecf34a..60900e649 100644 --- a/physics/rrtmgp_lw_gas_optics.F90 +++ b/physics/rrtmgp_lw_gas_optics.F90 @@ -60,17 +60,17 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp minor_limits_gpt_upper ! Beginning and ending gpoint for each minor interval in upper atmosphere integer, dimension(:,:,:), allocatable :: & key_species ! Key species pair for each band - real(kind=8) :: & + real(kind_phys) :: & press_ref_trop, & ! Reference pressure separating the lower and upper atmosphere [Pa] temp_ref_p, & ! Standard spectroscopic reference pressure [Pa] temp_ref_t ! Standard spectroscopic reference temperature [K] - real(kind=8), dimension(:), allocatable :: & + real(kind_phys), dimension(:), allocatable :: & press_ref, & ! Pressures for reference atmosphere; press_ref(# reference layers) [Pa] temp_ref ! Temperatures for reference atmosphere; temp_ref(# reference layers) [K] - real(kind=8), dimension(:,:), allocatable :: & + real(kind_phys), dimension(:,:), allocatable :: & band_lims, & ! Beginning and ending wavenumber [cm -1] for each band totplnk ! Integrated Planck function by band - real(kind=8), dimension(:,:,:), allocatable :: & + real(kind_phys), dimension(:,:,:), allocatable :: & vmr_ref, & ! volume mixing ratios for reference atmosphere kminor_lower, & ! (transformed from [nTemp x nEta x nGpt x nAbsorbers] array to ! [nTemp x nEta x nContributors] array) @@ -78,7 +78,7 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp ! [nTemp x nEta x nContributors] array) rayl_lower, & ! Not used in LW, rather allocated(rayl_lower) is used rayl_upper ! Not used in LW, rather allocated(rayl_upper) is used - real(kind=8), dimension(:,:,:,:), allocatable :: & + real(kind_phys), dimension(:,:,:,:), allocatable :: & kmajor, & ! Stored absorption coefficients due to major absorbing gases planck_frac ! Planck fractions character(len=32), dimension(:), allocatable :: & @@ -270,65 +270,103 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp endif #ifdef MPI - ! Wait for processor 0 to catch up... - call MPI_BARRIER(mpicomm, mpierr) - ! Broadcast data - write (*,*) 'Broadcasting RRTMGP longwave k-distribution data ... ' - call MPI_BCAST(ntemps, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(npress, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nminorabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nextrabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nmixingfracs, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nlayers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nbnds, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(ngpts_lw, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(npairs, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(ncontributors_lower, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(ncontributors_upper, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nminor_absorber_intervals_lower, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nminor_absorber_intervals_upper, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(ninternalSourcetemps, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(minor_limits_gpt_upper, size(minor_limits_gpt_upper), MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(minor_limits_gpt_lower, size(minor_limits_gpt_lower), MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(kminor_start_upper, size(kminor_start_upper), MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(kminor_start_lower, size(kminor_start_lower), MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(key_species, size(key_species), MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(band2gpt, size(band2gpt), MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(band_lims, size(band_lims), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(press_ref, size(press_ref), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(temp_ref, size(temp_ref), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(kminor_lower, size(kminor_lower), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(kminor_upper, size(kminor_upper), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(scaling_gas_lower, size(scaling_gas_lower), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(scaling_gas_upper, size(scaling_gas_upper), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(vmr_ref, size(vmr_ref), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(kmajor, size(kmajor), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(temp_ref_p, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(temp_ref_t, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(press_ref_trop, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(totplnk, size(totplnk), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - call MPI_BCAST(planck_frac, size(planck_frac), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, mpierr) - ! Character arrays - do ij=1,nabsorbers - call MPI_BCAST(gas_names(ij), len(gas_names(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) - enddo - do ij=1,nminorabsorbers - call MPI_BCAST(gas_minor(ij), len(gas_minor(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) - call MPI_BCAST(identifier_minor(ij), len(identifier_minor(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) - enddo - do ij=1,nminor_absorber_intervals_lower - call MPI_BCAST(minor_gases_lower(ij), len(minor_gases_lower(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) - enddo - do ij=1,nminor_absorber_intervals_upper - call MPI_BCAST(minor_gases_upper(ij), len(minor_gases_upper(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) - enddo - ! Logical arrays - call MPI_BCAST(minor_scales_with_density_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(scale_by_complement_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(minor_scales_with_density_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(scale_by_complement_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, mpierr) - + if (mpirank .ne. mpiroot) then + ! Wait for processor 0 to catch up... + call MPI_BARRIER(mpicomm, mpierr) + ! Broadcast data + write (*,*) 'Broadcasting RRTMGP longwave k-distribution data ... ' + call MPI_BCAST(ntemps, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + write(*,*) 'Broadcasting 1 ',mpierr + call MPI_BCAST(npress, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + write(*,*) 'Broadcasting 2 ',mpierr + call MPI_BCAST(nabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + write(*,*) 'Broadcasting 3 ',mpierr + call MPI_BCAST(nminorabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + write(*,*) 'Broadcasting 4 ',mpierr + call MPI_BCAST(nextrabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + write(*,*) 'Broadcasting 5 ',mpierr + call MPI_BCAST(nmixingfracs, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + write(*,*) 'Broadcasting 6 ',mpierr + call MPI_BCAST(nlayers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + write(*,*) 'Broadcasting 7 ',mpierr + call MPI_BCAST(nbnds, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + write(*,*) 'Broadcasting 8 ',mpierr + call MPI_BCAST(ngpts_lw, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + write(*,*) 'Broadcasting 9 ',mpierr + call MPI_BCAST(npairs, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + write(*,*) 'Broadcasting 10 ',mpierr + call MPI_BCAST(ncontributors_lower, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + write(*,*) 'Broadcasting 11 ',mpierr + call MPI_BCAST(ncontributors_upper, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + write(*,*) 'Broadcasting 12 ',mpierr + call MPI_BCAST(nminor_absorber_intervals_lower, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + write(*,*) 'Broadcasting 13 ',mpierr + call MPI_BCAST(nminor_absorber_intervals_upper, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + write(*,*) 'Broadcasting 14 ',mpierr + call MPI_BCAST(ninternalSourcetemps, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + write(*,*) 'Broadcasting 15 ',mpierr + call MPI_BCAST(minor_limits_gpt_upper, size(minor_limits_gpt_upper), MPI_INTEGER, mpiroot, mpicomm, mpierr) + write(*,*) 'Broadcasting 16 ',mpierr + call MPI_BCAST(minor_limits_gpt_lower, size(minor_limits_gpt_lower), MPI_INTEGER, mpiroot, mpicomm, mpierr) + write(*,*) 'Broadcasting 17 ',mpierr + call MPI_BCAST(kminor_start_upper, size(kminor_start_upper), MPI_INTEGER, mpiroot, mpicomm, mpierr) + write(*,*) 'Broadcasting 18 ',mpierr + call MPI_BCAST(kminor_start_lower, size(kminor_start_lower), MPI_INTEGER, mpiroot, mpicomm, mpierr) + write(*,*) 'Broadcasting 19 ',mpierr + call MPI_BCAST(key_species, size(key_species), MPI_INTEGER, mpiroot, mpicomm, mpierr) + write(*,*) 'Broadcasting 20 ',mpierr + call MPI_BCAST(band2gpt, size(band2gpt), MPI_INTEGER, mpiroot, mpicomm, mpierr) + write(*,*) 'Broadcasting 21 ',mpierr + call MPI_BCAST(band_lims, size(band_lims), MPI_REAL, mpiroot, mpicomm, mpierr) + write(*,*) 'Broadcasting 22 ',mpierr + call MPI_BCAST(press_ref, size(press_ref), MPI_REAL, mpiroot, mpicomm, mpierr) + write(*,*) 'Broadcasting 23 ',mpierr + call MPI_BCAST(temp_ref, size(temp_ref), MPI_REAL, mpiroot, mpicomm, mpierr) + write(*,*) 'Broadcasting 24 ',mpierr + call MPI_BCAST(kminor_lower, size(kminor_lower), MPI_REAL, mpiroot, mpicomm, mpierr) + write(*,*) 'Broadcasting 25 ',mpierr + call MPI_BCAST(kminor_upper, size(kminor_upper), MPI_REAL, mpiroot, mpicomm, mpierr) + write(*,*) 'Broadcasting 26 ',mpierr + call MPI_BCAST(scaling_gas_lower, size(scaling_gas_lower), MPI_REAL, mpiroot, mpicomm, mpierr) + write(*,*) 'Broadcasting 27 ',mpierr + call MPI_BCAST(scaling_gas_upper, size(scaling_gas_upper), MPI_REAL, mpiroot, mpicomm, mpierr) + write(*,*) 'Broadcasting 28 ',mpierr + call MPI_BCAST(vmr_ref, size(vmr_ref), MPI_REAL, mpiroot, mpicomm, mpierr) + write(*,*) 'Broadcasting 29 ',mpierr + call MPI_BCAST(kmajor, size(kmajor), MPI_REAL, mpiroot, mpicomm, mpierr) + write(*,*) 'Broadcasting 30 ',mpierr + call MPI_BCAST(temp_ref_p, 1, MPI_REAL, mpiroot, mpicomm, mpierr) + write(*,*) 'Broadcasting 31 ',mpierr + call MPI_BCAST(temp_ref_t, 1, MPI_REAL, mpiroot, mpicomm, mpierr) + write(*,*) 'Broadcasting 32 ',mpierr + call MPI_BCAST(press_ref_trop, 1, MPI_REAL, mpiroot, mpicomm, mpierr) + write(*,*) 'Broadcasting 33 ',mpierr + call MPI_BCAST(totplnk, size(totplnk), MPI_REAL, mpiroot, mpicomm, mpierr) + write(*,*) 'Broadcasting 34 ',mpierr + call MPI_BCAST(planck_frac, size(planck_frac), MPI_REAL, mpiroot, mpicomm, mpierr) + write(*,*) 'Broadcasting 35 ',mpierr + ! Character arrays + do ij=1,nabsorbers + call MPI_BCAST(gas_names(ij), len(gas_names(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) + enddo + do ij=1,nminorabsorbers + call MPI_BCAST(gas_minor(ij), len(gas_minor(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) + call MPI_BCAST(identifier_minor(ij), len(identifier_minor(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) + enddo + do ij=1,nminor_absorber_intervals_lower + call MPI_BCAST(minor_gases_lower(ij), len(minor_gases_lower(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) + enddo + do ij=1,nminor_absorber_intervals_upper + call MPI_BCAST(minor_gases_upper(ij), len(minor_gases_upper(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) + enddo + ! Logical arrays + call MPI_BCAST(minor_scales_with_density_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(scale_by_complement_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(minor_scales_with_density_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(scale_by_complement_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, mpierr) + else + call MPI_BARRIER(mpicomm, mpierr) + endif #endif ! Initialize gas concentrations and gas optics class with data From af24b718d61526ce5a3836d835a9b953ed979d89 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Tue, 28 Jan 2020 12:03:10 -0700 Subject: [PATCH 134/167] Added some diagnostic print statements. Remvoe barrier commands. --- physics/rrtmgp_lw_gas_optics.F90 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/physics/rrtmgp_lw_gas_optics.F90 b/physics/rrtmgp_lw_gas_optics.F90 index 60900e649..0ac495d0a 100644 --- a/physics/rrtmgp_lw_gas_optics.F90 +++ b/physics/rrtmgp_lw_gas_optics.F90 @@ -270,9 +270,9 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp endif #ifdef MPI - if (mpirank .ne. mpiroot) then - ! Wait for processor 0 to catch up... - call MPI_BARRIER(mpicomm, mpierr) +! if (mpirank .ne. mpiroot) then +! ! Wait for processor 0 to catch up... +! call MPI_BARRIER(mpicomm, mpierr) ! Broadcast data write (*,*) 'Broadcasting RRTMGP longwave k-distribution data ... ' call MPI_BCAST(ntemps, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) @@ -364,9 +364,9 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp call MPI_BCAST(scale_by_complement_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, mpierr) call MPI_BCAST(minor_scales_with_density_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, mpierr) call MPI_BCAST(scale_by_complement_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, mpierr) - else - call MPI_BARRIER(mpicomm, mpierr) - endif +! else +! call MPI_BARRIER(mpicomm, mpierr) +! endif #endif ! Initialize gas concentrations and gas optics class with data From ab612f4b312c830de0b5abdc9d63d49b2f9f3f8d Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Tue, 28 Jan 2020 12:44:25 -0700 Subject: [PATCH 135/167] More diagnostic print statements. --- physics/rrtmgp_lw_gas_optics.F90 | 70 ++++++++++++++++---------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/physics/rrtmgp_lw_gas_optics.F90 b/physics/rrtmgp_lw_gas_optics.F90 index 0ac495d0a..be52717c1 100644 --- a/physics/rrtmgp_lw_gas_optics.F90 +++ b/physics/rrtmgp_lw_gas_optics.F90 @@ -276,75 +276,75 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp ! Broadcast data write (*,*) 'Broadcasting RRTMGP longwave k-distribution data ... ' call MPI_BCAST(ntemps, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 1 ',mpierr + write(*,*) 'Broadcasting 1 ',mpierr, mpicomm call MPI_BCAST(npress, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 2 ',mpierr + write(*,*) 'Broadcasting 2 ',mpierr, mpicomm call MPI_BCAST(nabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 3 ',mpierr + write(*,*) 'Broadcasting 3 ',mpierr, mpicomm call MPI_BCAST(nminorabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 4 ',mpierr + write(*,*) 'Broadcasting 4 ',mpierr, mpicomm call MPI_BCAST(nextrabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 5 ',mpierr + write(*,*) 'Broadcasting 5 ',mpierr, mpicomm call MPI_BCAST(nmixingfracs, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 6 ',mpierr + write(*,*) 'Broadcasting 6 ',mpierr, mpicomm call MPI_BCAST(nlayers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 7 ',mpierr + write(*,*) 'Broadcasting 7 ',mpierr, mpicomm call MPI_BCAST(nbnds, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 8 ',mpierr + write(*,*) 'Broadcasting 8 ',mpierr, mpicomm call MPI_BCAST(ngpts_lw, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 9 ',mpierr + write(*,*) 'Broadcasting 9 ',mpierr, mpicomm call MPI_BCAST(npairs, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 10 ',mpierr + write(*,*) 'Broadcasting 10 ',mpierr, mpicomm call MPI_BCAST(ncontributors_lower, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 11 ',mpierr + write(*,*) 'Broadcasting 11 ',mpierr, mpicomm call MPI_BCAST(ncontributors_upper, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 12 ',mpierr + write(*,*) 'Broadcasting 12 ',mpierr, mpicomm call MPI_BCAST(nminor_absorber_intervals_lower, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 13 ',mpierr + write(*,*) 'Broadcasting 13 ',mpierr, mpicomm call MPI_BCAST(nminor_absorber_intervals_upper, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 14 ',mpierr + write(*,*) 'Broadcasting 14 ',mpierr, mpicomm call MPI_BCAST(ninternalSourcetemps, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 15 ',mpierr + write(*,*) 'Broadcasting 15 ',mpierr, mpicomm call MPI_BCAST(minor_limits_gpt_upper, size(minor_limits_gpt_upper), MPI_INTEGER, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 16 ',mpierr + write(*,*) 'Broadcasting 16 ',mpierr, mpicomm call MPI_BCAST(minor_limits_gpt_lower, size(minor_limits_gpt_lower), MPI_INTEGER, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 17 ',mpierr + write(*,*) 'Broadcasting 17 ',mpierr, mpicomm call MPI_BCAST(kminor_start_upper, size(kminor_start_upper), MPI_INTEGER, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 18 ',mpierr + write(*,*) 'Broadcasting 18 ',mpierr, mpicomm call MPI_BCAST(kminor_start_lower, size(kminor_start_lower), MPI_INTEGER, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 19 ',mpierr + write(*,*) 'Broadcasting 19 ',mpierr, mpicomm call MPI_BCAST(key_species, size(key_species), MPI_INTEGER, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 20 ',mpierr + write(*,*) 'Broadcasting 20 ',mpierr, mpicomm call MPI_BCAST(band2gpt, size(band2gpt), MPI_INTEGER, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 21 ',mpierr + write(*,*) 'Broadcasting 21 ',mpierr, mpicomm call MPI_BCAST(band_lims, size(band_lims), MPI_REAL, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 22 ',mpierr + write(*,*) 'Broadcasting 22 ',mpierr, mpicomm call MPI_BCAST(press_ref, size(press_ref), MPI_REAL, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 23 ',mpierr + write(*,*) 'Broadcasting 23 ',mpierr, mpicomm call MPI_BCAST(temp_ref, size(temp_ref), MPI_REAL, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 24 ',mpierr + write(*,*) 'Broadcasting 24 ',mpierr, mpicomm call MPI_BCAST(kminor_lower, size(kminor_lower), MPI_REAL, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 25 ',mpierr + write(*,*) 'Broadcasting 25 ',mpierr, mpicomm call MPI_BCAST(kminor_upper, size(kminor_upper), MPI_REAL, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 26 ',mpierr + write(*,*) 'Broadcasting 26 ',mpierr, mpicomm call MPI_BCAST(scaling_gas_lower, size(scaling_gas_lower), MPI_REAL, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 27 ',mpierr + write(*,*) 'Broadcasting 27 ',mpierr, mpicomm call MPI_BCAST(scaling_gas_upper, size(scaling_gas_upper), MPI_REAL, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 28 ',mpierr + write(*,*) 'Broadcasting 28 ',mpierr, mpicomm call MPI_BCAST(vmr_ref, size(vmr_ref), MPI_REAL, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 29 ',mpierr + write(*,*) 'Broadcasting 29 ',mpierr, mpicomm call MPI_BCAST(kmajor, size(kmajor), MPI_REAL, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 30 ',mpierr + write(*,*) 'Broadcasting 30 ',mpierr, mpicomm call MPI_BCAST(temp_ref_p, 1, MPI_REAL, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 31 ',mpierr + write(*,*) 'Broadcasting 31 ',mpierr, mpicomm call MPI_BCAST(temp_ref_t, 1, MPI_REAL, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 32 ',mpierr + write(*,*) 'Broadcasting 32 ',mpierr, mpicomm call MPI_BCAST(press_ref_trop, 1, MPI_REAL, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 33 ',mpierr + write(*,*) 'Broadcasting 33 ',mpierr, mpicomm call MPI_BCAST(totplnk, size(totplnk), MPI_REAL, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 34 ',mpierr + write(*,*) 'Broadcasting 34 ',mpierr, mpicomm call MPI_BCAST(planck_frac, size(planck_frac), MPI_REAL, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 35 ',mpierr + write(*,*) 'Broadcasting 35 ',mpierr, mpicomm ! Character arrays do ij=1,nabsorbers call MPI_BCAST(gas_names(ij), len(gas_names(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) From 09b3c3b78a6f492934f91b504366a8167d5df44a Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Tue, 28 Jan 2020 14:09:37 -0700 Subject: [PATCH 136/167] Added print statements to Thompson init routines. --- physics/module_mp_thompson.F90 | 4 + physics/rrtmgp_lw_gas_optics.F90 | 207 +++++++++++++++---------------- 2 files changed, 103 insertions(+), 108 deletions(-) diff --git a/physics/module_mp_thompson.F90 b/physics/module_mp_thompson.F90 index b1ca6ba07..af6645f7b 100644 --- a/physics/module_mp_thompson.F90 +++ b/physics/module_mp_thompson.F90 @@ -444,6 +444,9 @@ SUBROUTINE thompson_init(nwfa2d, nifa2d, nwfa, nifa, & LOGICAL, PARAMETER :: precomputed_tables = .FALSE. #endif + write(*,"(a45,3i20)") 'MODULE_MP_THOMPSON(thompson_init): MPI ranks: ',mpirank,mpiroot,mpicomm + + is_aerosol_aware = .FALSE. micro_init = .FALSE. @@ -5583,6 +5586,7 @@ subroutine readwrite_tables(mode, mpicomm, mpirank, mpiroot, ierr) continue ierr = 0 + write(*,"(a45,3i20)") 'MODULE_MP_THOMPSON(readwrite_tables): MPI ranks: ',mpirank,mpiroot,mpicomm ! Test if SIONlib file containing pre-computed tables exists inquire(file=trim(filename), exist=exists) diff --git a/physics/rrtmgp_lw_gas_optics.F90 b/physics/rrtmgp_lw_gas_optics.F90 index be52717c1..1a3fce722 100644 --- a/physics/rrtmgp_lw_gas_optics.F90 +++ b/physics/rrtmgp_lw_gas_optics.F90 @@ -8,6 +8,9 @@ module rrtmgp_lw_gas_optics use mo_compute_bc, only: compute_bc use rrtmgp_aux, only: check_error_msg use netcdf +#ifdef MPI + use mpi +#endif contains @@ -17,13 +20,8 @@ module rrtmgp_lw_gas_optics !! \section arg_table_rrtmgp_lw_gas_optics_init !! \htmlinclude rrtmgp_lw_gas_optics.html !! - subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp_nGases, & + subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp_nGases, & active_gases_array, mpicomm, mpirank, mpiroot, lw_gas_props, errmsg, errflg) - use netcdf - -#ifdef MPI - use mpi -#endif ! Inputs character(len=128),intent(in) :: & @@ -111,16 +109,11 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp integer :: mpierr #endif - ! Sync up before data read and broadcast -#ifdef MPI - call MPI_BARRIER(mpicomm, mpierr) -#endif - ! Initialize errmsg = '' errflg = 0 - write(*,"(a12,3i10)") 'MPI ranks: ',mpirank,mpiroot,mpicomm + write(*,"(a19,3i20)") 'RRTMGP MPI ranks: ',mpirank,mpiroot,mpicomm ! Filenames are set in the physics_nml lw_gas_props_file = trim(rrtmgp_root_dir)//trim(rrtmgp_lw_file_gas) @@ -271,102 +264,100 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp #ifdef MPI ! if (mpirank .ne. mpiroot) then -! ! Wait for processor 0 to catch up... -! call MPI_BARRIER(mpicomm, mpierr) - ! Broadcast data - write (*,*) 'Broadcasting RRTMGP longwave k-distribution data ... ' - call MPI_BCAST(ntemps, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 1 ',mpierr, mpicomm - call MPI_BCAST(npress, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 2 ',mpierr, mpicomm - call MPI_BCAST(nabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 3 ',mpierr, mpicomm - call MPI_BCAST(nminorabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 4 ',mpierr, mpicomm - call MPI_BCAST(nextrabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 5 ',mpierr, mpicomm - call MPI_BCAST(nmixingfracs, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 6 ',mpierr, mpicomm - call MPI_BCAST(nlayers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 7 ',mpierr, mpicomm - call MPI_BCAST(nbnds, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 8 ',mpierr, mpicomm - call MPI_BCAST(ngpts_lw, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 9 ',mpierr, mpicomm - call MPI_BCAST(npairs, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 10 ',mpierr, mpicomm - call MPI_BCAST(ncontributors_lower, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 11 ',mpierr, mpicomm - call MPI_BCAST(ncontributors_upper, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 12 ',mpierr, mpicomm - call MPI_BCAST(nminor_absorber_intervals_lower, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 13 ',mpierr, mpicomm - call MPI_BCAST(nminor_absorber_intervals_upper, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 14 ',mpierr, mpicomm - call MPI_BCAST(ninternalSourcetemps, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 15 ',mpierr, mpicomm - call MPI_BCAST(minor_limits_gpt_upper, size(minor_limits_gpt_upper), MPI_INTEGER, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 16 ',mpierr, mpicomm - call MPI_BCAST(minor_limits_gpt_lower, size(minor_limits_gpt_lower), MPI_INTEGER, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 17 ',mpierr, mpicomm - call MPI_BCAST(kminor_start_upper, size(kminor_start_upper), MPI_INTEGER, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 18 ',mpierr, mpicomm - call MPI_BCAST(kminor_start_lower, size(kminor_start_lower), MPI_INTEGER, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 19 ',mpierr, mpicomm - call MPI_BCAST(key_species, size(key_species), MPI_INTEGER, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 20 ',mpierr, mpicomm - call MPI_BCAST(band2gpt, size(band2gpt), MPI_INTEGER, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 21 ',mpierr, mpicomm - call MPI_BCAST(band_lims, size(band_lims), MPI_REAL, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 22 ',mpierr, mpicomm - call MPI_BCAST(press_ref, size(press_ref), MPI_REAL, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 23 ',mpierr, mpicomm - call MPI_BCAST(temp_ref, size(temp_ref), MPI_REAL, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 24 ',mpierr, mpicomm - call MPI_BCAST(kminor_lower, size(kminor_lower), MPI_REAL, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 25 ',mpierr, mpicomm - call MPI_BCAST(kminor_upper, size(kminor_upper), MPI_REAL, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 26 ',mpierr, mpicomm - call MPI_BCAST(scaling_gas_lower, size(scaling_gas_lower), MPI_REAL, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 27 ',mpierr, mpicomm - call MPI_BCAST(scaling_gas_upper, size(scaling_gas_upper), MPI_REAL, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 28 ',mpierr, mpicomm - call MPI_BCAST(vmr_ref, size(vmr_ref), MPI_REAL, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 29 ',mpierr, mpicomm - call MPI_BCAST(kmajor, size(kmajor), MPI_REAL, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 30 ',mpierr, mpicomm - call MPI_BCAST(temp_ref_p, 1, MPI_REAL, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 31 ',mpierr, mpicomm - call MPI_BCAST(temp_ref_t, 1, MPI_REAL, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 32 ',mpierr, mpicomm - call MPI_BCAST(press_ref_trop, 1, MPI_REAL, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 33 ',mpierr, mpicomm - call MPI_BCAST(totplnk, size(totplnk), MPI_REAL, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 34 ',mpierr, mpicomm - call MPI_BCAST(planck_frac, size(planck_frac), MPI_REAL, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 35 ',mpierr, mpicomm - ! Character arrays - do ij=1,nabsorbers - call MPI_BCAST(gas_names(ij), len(gas_names(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) - enddo - do ij=1,nminorabsorbers - call MPI_BCAST(gas_minor(ij), len(gas_minor(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) - call MPI_BCAST(identifier_minor(ij), len(identifier_minor(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) - enddo - do ij=1,nminor_absorber_intervals_lower - call MPI_BCAST(minor_gases_lower(ij), len(minor_gases_lower(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) - enddo - do ij=1,nminor_absorber_intervals_upper - call MPI_BCAST(minor_gases_upper(ij), len(minor_gases_upper(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) - enddo - ! Logical arrays - call MPI_BCAST(minor_scales_with_density_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(scale_by_complement_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(minor_scales_with_density_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(scale_by_complement_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, mpierr) -! else -! call MPI_BARRIER(mpicomm, mpierr) -! endif + ! Wait for processor 0 to catch up... + call MPI_BARRIER(mpicomm, mpierr) + + ! Broadcast data + write (*,*) 'Broadcasting RRTMGP longwave k-distribution data ... ' + call MPI_BCAST(ntemps, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + write(*,*) 'Broadcasting 1 ',mpierr, mpicomm + call MPI_BCAST(npress, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + write(*,*) 'Broadcasting 2 ',mpierr, mpicomm + call MPI_BCAST(nabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + write(*,*) 'Broadcasting 3 ',mpierr, mpicomm + call MPI_BCAST(nminorabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + write(*,*) 'Broadcasting 4 ',mpierr, mpicomm + call MPI_BCAST(nextrabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + write(*,*) 'Broadcasting 5 ',mpierr, mpicomm + call MPI_BCAST(nmixingfracs, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + write(*,*) 'Broadcasting 6 ',mpierr, mpicomm + call MPI_BCAST(nlayers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + write(*,*) 'Broadcasting 7 ',mpierr, mpicomm + call MPI_BCAST(nbnds, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + write(*,*) 'Broadcasting 8 ',mpierr, mpicomm + call MPI_BCAST(ngpts_lw, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + write(*,*) 'Broadcasting 9 ',mpierr, mpicomm + call MPI_BCAST(npairs, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + write(*,*) 'Broadcasting 10 ',mpierr, mpicomm + call MPI_BCAST(ncontributors_lower, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + write(*,*) 'Broadcasting 11 ',mpierr, mpicomm + call MPI_BCAST(ncontributors_upper, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + write(*,*) 'Broadcasting 12 ',mpierr, mpicomm + call MPI_BCAST(nminor_absorber_intervals_lower, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + write(*,*) 'Broadcasting 13 ',mpierr, mpicomm + call MPI_BCAST(nminor_absorber_intervals_upper, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + write(*,*) 'Broadcasting 14 ',mpierr, mpicomm + call MPI_BCAST(ninternalSourcetemps, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + write(*,*) 'Broadcasting 15 ',mpierr, mpicomm + call MPI_BCAST(minor_limits_gpt_upper, size(minor_limits_gpt_upper), MPI_INTEGER, mpiroot, mpicomm, mpierr) + write(*,*) 'Broadcasting 16 ',mpierr, mpicomm + call MPI_BCAST(minor_limits_gpt_lower, size(minor_limits_gpt_lower), MPI_INTEGER, mpiroot, mpicomm, mpierr) + write(*,*) 'Broadcasting 17 ',mpierr, mpicomm + call MPI_BCAST(kminor_start_upper, size(kminor_start_upper), MPI_INTEGER, mpiroot, mpicomm, mpierr) + write(*,*) 'Broadcasting 18 ',mpierr, mpicomm + call MPI_BCAST(kminor_start_lower, size(kminor_start_lower), MPI_INTEGER, mpiroot, mpicomm, mpierr) + write(*,*) 'Broadcasting 19 ',mpierr, mpicomm + call MPI_BCAST(key_species, size(key_species), MPI_INTEGER, mpiroot, mpicomm, mpierr) + write(*,*) 'Broadcasting 20 ',mpierr, mpicomm + call MPI_BCAST(band2gpt, size(band2gpt), MPI_INTEGER, mpiroot, mpicomm, mpierr) + write(*,*) 'Broadcasting 21 ',mpierr, mpicomm + call MPI_BCAST(band_lims, size(band_lims), MPI_REAL, mpiroot, mpicomm, mpierr) + write(*,*) 'Broadcasting 22 ',mpierr, mpicomm + call MPI_BCAST(press_ref, size(press_ref), MPI_REAL, mpiroot, mpicomm, mpierr) + write(*,*) 'Broadcasting 23 ',mpierr, mpicomm + call MPI_BCAST(temp_ref, size(temp_ref), MPI_REAL, mpiroot, mpicomm, mpierr) + write(*,*) 'Broadcasting 24 ',mpierr, mpicomm + call MPI_BCAST(kminor_lower, size(kminor_lower), MPI_REAL, mpiroot, mpicomm, mpierr) + write(*,*) 'Broadcasting 25 ',mpierr, mpicomm + call MPI_BCAST(kminor_upper, size(kminor_upper), MPI_REAL, mpiroot, mpicomm, mpierr) + write(*,*) 'Broadcasting 26 ',mpierr, mpicomm + call MPI_BCAST(scaling_gas_lower, size(scaling_gas_lower), MPI_REAL, mpiroot, mpicomm, mpierr) + write(*,*) 'Broadcasting 27 ',mpierr, mpicomm + call MPI_BCAST(scaling_gas_upper, size(scaling_gas_upper), MPI_REAL, mpiroot, mpicomm, mpierr) + write(*,*) 'Broadcasting 28 ',mpierr, mpicomm + call MPI_BCAST(vmr_ref, size(vmr_ref), MPI_REAL, mpiroot, mpicomm, mpierr) + write(*,*) 'Broadcasting 29 ',mpierr, mpicomm + call MPI_BCAST(kmajor, size(kmajor), MPI_REAL, mpiroot, mpicomm, mpierr) + write(*,*) 'Broadcasting 30 ',mpierr, mpicomm + call MPI_BCAST(temp_ref_p, 1, MPI_REAL, mpiroot, mpicomm, mpierr) + write(*,*) 'Broadcasting 31 ',mpierr, mpicomm + call MPI_BCAST(temp_ref_t, 1, MPI_REAL, mpiroot, mpicomm, mpierr) + write(*,*) 'Broadcasting 32 ',mpierr, mpicomm + call MPI_BCAST(press_ref_trop, 1, MPI_REAL, mpiroot, mpicomm, mpierr) + write(*,*) 'Broadcasting 33 ',mpierr, mpicomm + call MPI_BCAST(totplnk, size(totplnk), MPI_REAL, mpiroot, mpicomm, mpierr) + write(*,*) 'Broadcasting 34 ',mpierr, mpicomm + call MPI_BCAST(planck_frac, size(planck_frac), MPI_REAL, mpiroot, mpicomm, mpierr) + write(*,*) 'Broadcasting 35 ',mpierr, mpicomm + ! Character arrays + do ij=1,nabsorbers + call MPI_BCAST(gas_names(ij), len(gas_names(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) + enddo + do ij=1,nminorabsorbers + call MPI_BCAST(gas_minor(ij), len(gas_minor(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) + call MPI_BCAST(identifier_minor(ij), len(identifier_minor(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) + enddo + do ij=1,nminor_absorber_intervals_lower + call MPI_BCAST(minor_gases_lower(ij), len(minor_gases_lower(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) + enddo + do ij=1,nminor_absorber_intervals_upper + call MPI_BCAST(minor_gases_upper(ij), len(minor_gases_upper(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) + enddo + ! Logical arrays + call MPI_BCAST(minor_scales_with_density_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(scale_by_complement_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(minor_scales_with_density_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(scale_by_complement_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, mpierr) #endif ! Initialize gas concentrations and gas optics class with data From 3e79d0279453ef0c007461c13dfe7cc8690c6379 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Thu, 30 Jan 2020 13:27:36 -0700 Subject: [PATCH 137/167] Move allocation statements. --- physics/rrtmgp_lw_gas_optics.F90 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/physics/rrtmgp_lw_gas_optics.F90 b/physics/rrtmgp_lw_gas_optics.F90 index 1a3fce722..0a2c81e3a 100644 --- a/physics/rrtmgp_lw_gas_optics.F90 +++ b/physics/rrtmgp_lw_gas_optics.F90 @@ -154,7 +154,7 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp status = nf90_inquire_dimension(ncid, dimid, len = nminor_absorber_intervals_upper) status = nf90_inq_dimid( ncid, 'temperature_Planck', dimid) status = nf90_inquire_dimension(ncid, dimid, len = ninternalSourcetemps) - + endif ! Allocate space for arrays allocate(gas_names(nabsorbers)) allocate(scaling_gas_lower(nminor_absorber_intervals_lower)) @@ -186,7 +186,7 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp allocate(temp4(nminor_absorber_intervals_upper)) allocate(totplnk(ninternalSourcetemps, nbnds)) allocate(planck_frac(ngpts_lw, nmixingfracs, npress+1, ntemps)) - + if (mpirank .eq. mpiroot) then ! Read in fields from file write (*,*) 'Reading RRTMGP longwave k-distribution data ... ' status = nf90_inq_varid(ncid, 'gas_names', varID) @@ -265,7 +265,7 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp #ifdef MPI ! if (mpirank .ne. mpiroot) then ! Wait for processor 0 to catch up... - call MPI_BARRIER(mpicomm, mpierr) + !call MPI_BARRIER(mpicomm, mpierr) ! Broadcast data write (*,*) 'Broadcasting RRTMGP longwave k-distribution data ... ' From 33158c7f80cec30c72d6cc169ce39550500de278 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Thu, 30 Jan 2020 14:09:54 -0700 Subject: [PATCH 138/167] Added mpi barrier. communicator working, i think. --- physics/rrtmgp_lw_gas_optics.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/physics/rrtmgp_lw_gas_optics.F90 b/physics/rrtmgp_lw_gas_optics.F90 index 0a2c81e3a..6ad48304b 100644 --- a/physics/rrtmgp_lw_gas_optics.F90 +++ b/physics/rrtmgp_lw_gas_optics.F90 @@ -265,7 +265,7 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp #ifdef MPI ! if (mpirank .ne. mpiroot) then ! Wait for processor 0 to catch up... - !call MPI_BARRIER(mpicomm, mpierr) + call MPI_BARRIER(mpicomm, mpierr) ! Broadcast data write (*,*) 'Broadcasting RRTMGP longwave k-distribution data ... ' From be43ed8319d25de7f9146bfde679a7c32250df8c Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Thu, 30 Jan 2020 14:46:01 -0700 Subject: [PATCH 139/167] Added a second mpi barrier. --- physics/rrtmgp_lw_gas_optics.F90 | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/physics/rrtmgp_lw_gas_optics.F90 b/physics/rrtmgp_lw_gas_optics.F90 index 6ad48304b..9ba7415d8 100644 --- a/physics/rrtmgp_lw_gas_optics.F90 +++ b/physics/rrtmgp_lw_gas_optics.F90 @@ -343,21 +343,34 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp do ij=1,nabsorbers call MPI_BCAST(gas_names(ij), len(gas_names(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) enddo + write(*,*) 'Broadcasting 36 ',mpierr, mpicomm do ij=1,nminorabsorbers call MPI_BCAST(gas_minor(ij), len(gas_minor(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) + enddo + write(*,*) 'Broadcasting 37 ',mpierr, mpicomm + do ij=1,nminorabsorbers call MPI_BCAST(identifier_minor(ij), len(identifier_minor(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) enddo + write(*,*) 'Broadcasting 38 ',mpierr, mpicomm do ij=1,nminor_absorber_intervals_lower call MPI_BCAST(minor_gases_lower(ij), len(minor_gases_lower(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) enddo + write(*,*) 'Broadcasting 39 ',mpierr, mpicomm do ij=1,nminor_absorber_intervals_upper call MPI_BCAST(minor_gases_upper(ij), len(minor_gases_upper(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) enddo + write(*,*) 'Broadcasting 40 ',mpierr, mpicomm ! Logical arrays call MPI_BCAST(minor_scales_with_density_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, mpierr) + write(*,*) 'Broadcasting 41 ',mpierr, mpicomm call MPI_BCAST(scale_by_complement_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, mpierr) + write(*,*) 'Broadcasting 42 ',mpierr, mpicomm call MPI_BCAST(minor_scales_with_density_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, mpierr) + write(*,*) 'Broadcasting 43 ',mpierr, mpicomm call MPI_BCAST(scale_by_complement_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, mpierr) + write(*,*) 'Broadcasting 44 ',mpierr, mpicomm + call MPI_BARRIER(mpicomm, mpierr) + write(*,*) 'Broadcasting 45 ',mpierr, mpicomm #endif ! Initialize gas concentrations and gas optics class with data From e7c6c8ec9b84b9b773463333f711f867cfe22c27 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Thu, 30 Jan 2020 15:24:37 -0700 Subject: [PATCH 140/167] Try different broadcast call for character arrays. --- physics/rrtmgp_lw_gas_optics.F90 | 35 ++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/physics/rrtmgp_lw_gas_optics.F90 b/physics/rrtmgp_lw_gas_optics.F90 index 9ba7415d8..a4d11207a 100644 --- a/physics/rrtmgp_lw_gas_optics.F90 +++ b/physics/rrtmgp_lw_gas_optics.F90 @@ -340,25 +340,30 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp call MPI_BCAST(planck_frac, size(planck_frac), MPI_REAL, mpiroot, mpicomm, mpierr) write(*,*) 'Broadcasting 35 ',mpierr, mpicomm ! Character arrays - do ij=1,nabsorbers - call MPI_BCAST(gas_names(ij), len(gas_names(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) - enddo + !do ij=1,nabsorbers + ! call MPI_BCAST(gas_names(ij), len(gas_names(ij)), MPI_CHARACTER, mpiroot, mpicomm, mpierr) + !enddo + call MPI_BCAST(gas_names, size(gas_names), MPI_CHARACTER, mpiroot, mpicomm, mpierr) write(*,*) 'Broadcasting 36 ',mpierr, mpicomm - do ij=1,nminorabsorbers - call MPI_BCAST(gas_minor(ij), len(gas_minor(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) - enddo + !do ij=1,nminorabsorbers + ! call MPI_BCAST(gas_minor(ij), len(gas_minor(ij)), MPI_CHARACTER, mpiroot, mpicomm, mpierr) + !enddo + call MPI_BCAST(gas_minor, size(gas_minor), MPI_CHARACTER, mpiroot, mpicomm, mpierr) write(*,*) 'Broadcasting 37 ',mpierr, mpicomm - do ij=1,nminorabsorbers - call MPI_BCAST(identifier_minor(ij), len(identifier_minor(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) - enddo + !do ij=1,nminorabsorbers + ! call MPI_BCAST(identifier_minor(ij), len(identifier_minor(ij)), MPI_CHARACTER, mpiroot, mpicomm, mpierr) + !enddo + call MPI_BCAST(identifier_minor, size(identifier_minor), MPI_CHARACTER, mpiroot, mpicomm, mpierr) write(*,*) 'Broadcasting 38 ',mpierr, mpicomm - do ij=1,nminor_absorber_intervals_lower - call MPI_BCAST(minor_gases_lower(ij), len(minor_gases_lower(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) - enddo + !do ij=1,nminor_absorber_intervals_lower + ! call MPI_BCAST(minor_gases_lower(ij), len(minor_gases_lower(ij)), MPI_CHARACTER, mpiroot, mpicomm, mpierr) + !enddo + call MPI_BCAST(minor_gases_lower, size(minor_gases_lower), MPI_CHARACTER, mpiroot, mpicomm, mpierr) write(*,*) 'Broadcasting 39 ',mpierr, mpicomm - do ij=1,nminor_absorber_intervals_upper - call MPI_BCAST(minor_gases_upper(ij), len(minor_gases_upper(ij)), MPI_CHAR, mpiroot, mpicomm, mpierr) - enddo + !do ij=1,nminor_absorber_intervals_upper + ! call MPI_BCAST(minor_gases_upper(ij), len(minor_gases_upper(ij)), MPI_CHARACTER, mpiroot, mpicomm, mpierr) + !enddo + call MPI_BCAST(minor_gases_upper, size(minor_gases_upper), MPI_CHARACTER, mpiroot, mpicomm, mpierr) write(*,*) 'Broadcasting 40 ',mpierr, mpicomm ! Logical arrays call MPI_BCAST(minor_scales_with_density_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, mpierr) From d3517899d5f0684c2c15f039c439cb5a31b4657e Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Thu, 30 Jan 2020 15:47:43 -0700 Subject: [PATCH 141/167] Move allocation statement into master processor only. --- physics/rrtmgp_lw_gas_optics.F90 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/physics/rrtmgp_lw_gas_optics.F90 b/physics/rrtmgp_lw_gas_optics.F90 index a4d11207a..3a528ef25 100644 --- a/physics/rrtmgp_lw_gas_optics.F90 +++ b/physics/rrtmgp_lw_gas_optics.F90 @@ -154,7 +154,7 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp status = nf90_inquire_dimension(ncid, dimid, len = nminor_absorber_intervals_upper) status = nf90_inq_dimid( ncid, 'temperature_Planck', dimid) status = nf90_inquire_dimension(ncid, dimid, len = ninternalSourcetemps) - endif + ! Allocate space for arrays allocate(gas_names(nabsorbers)) allocate(scaling_gas_lower(nminor_absorber_intervals_lower)) @@ -186,7 +186,7 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp allocate(temp4(nminor_absorber_intervals_upper)) allocate(totplnk(ninternalSourcetemps, nbnds)) allocate(planck_frac(ngpts_lw, nmixingfracs, npress+1, ntemps)) - if (mpirank .eq. mpiroot) then + ! Read in fields from file write (*,*) 'Reading RRTMGP longwave k-distribution data ... ' status = nf90_inq_varid(ncid, 'gas_names', varID) From 3dfb4c9b21a9ac44e304ef8a593d1fa88846d49a Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Mon, 10 Feb 2020 16:27:32 -0700 Subject: [PATCH 142/167] Cleaned up _init routines. --- physics/rrtmgp_lw_cloud_optics.F90 | 453 +++++++++++------------ physics/rrtmgp_lw_cloud_optics.meta | 2 +- physics/rrtmgp_lw_gas_optics.F90 | 261 +++++-------- physics/rrtmgp_sw_cloud_optics.F90 | 495 ++++++++++++------------- physics/rrtmgp_sw_cloud_optics.meta | 2 +- physics/rrtmgp_sw_gas_optics.F90 | 555 ++++++++++++---------------- 6 files changed, 785 insertions(+), 983 deletions(-) diff --git a/physics/rrtmgp_lw_cloud_optics.F90 b/physics/rrtmgp_lw_cloud_optics.F90 index 7e50f2a81..d12ccaa23 100644 --- a/physics/rrtmgp_lw_cloud_optics.F90 +++ b/physics/rrtmgp_lw_cloud_optics.F90 @@ -8,7 +8,7 @@ module rrtmgp_lw_cloud_optics use rrtmgp_aux, only: check_error_msg use netcdf #ifdef MPI - use mpi + use mpi #endif public rrtmgp_lw_cloud_optics_init, rrtmgp_lw_cloud_optics_run, rrtmgp_lw_cloud_optics_finalize @@ -24,8 +24,9 @@ subroutine rrtmgp_lw_cloud_optics_init(cld_optics_scheme, nrghice, rrtmgp_root_d rrtmgp_lw_file_clouds, mpicomm, mpirank, mpiroot, lw_cloud_props, errmsg, errflg) ! Inputs - integer, intent(in) :: & - nrghice, & ! Number of ice-roughness categories + integer, intent(inout) :: & + nrghice ! Number of ice-roughness categories + integer, intent(in) :: & cld_optics_scheme, & ! Cloud-optics scheme mpicomm, & ! MPI communicator mpirank, & ! Current MPI rank @@ -55,7 +56,7 @@ subroutine rrtmgp_lw_cloud_optics_init(cld_optics_scheme, nrghice, rrtmgp_root_d lut_extliq, & ! LUT shortwave liquid extinction coefficient lut_ssaliq, & ! LUT shortwave liquid single scattering albedo lut_asyliq, & ! LUT shortwave liquid asymmetry parameter - band_lims_cldy ! Beginning and ending wavenumber [cm -1] for each band + band_lims ! Beginning and ending wavenumber [cm -1] for each band real(kind_phys), dimension(:,:,:), allocatable :: & lut_extice, & ! LUT shortwave ice extinction coefficient lut_ssaice, & ! LUT shortwave ice single scattering albedo @@ -63,17 +64,17 @@ subroutine rrtmgp_lw_cloud_optics_init(cld_optics_scheme, nrghice, rrtmgp_root_d ! cld_optics_scheme = 2 real(kind_phys), dimension(:), allocatable :: & pade_sizereg_extliq, & ! Particle size regime boundaries for shortwave liquid extinction - ! coefficient for Pade interpolation + ! coefficient for Pade interpolation pade_sizereg_ssaliq, & ! Particle size regime boundaries for shortwave liquid single - ! scattering albedo for Pade interpolation + ! scattering albedo for Pade interpolation pade_sizereg_asyliq, & ! Particle size regime boundaries for shortwave liquid asymmetry - ! parameter for Pade interpolation + ! parameter for Pade interpolation pade_sizereg_extice, & ! Particle size regime boundaries for shortwave ice extinction - ! coefficient for Pade interpolation + ! coefficient for Pade interpolation pade_sizereg_ssaice, & ! Particle size regime boundaries for shortwave ice single - ! scattering albedo for Pade interpolation + ! scattering albedo for Pade interpolation pade_sizereg_asyice ! Particle size regime boundaries for shortwave ice asymmetry - ! parameter for Pade interpolation + ! parameter for Pade interpolation real(kind_phys), dimension(:,:,:), allocatable :: & pade_extliq, & ! PADE coefficients for shortwave liquid extinction pade_ssaliq, & ! PADE coefficients for shortwave liquid single scattering albedo @@ -84,15 +85,15 @@ subroutine rrtmgp_lw_cloud_optics_init(cld_optics_scheme, nrghice, rrtmgp_root_d pade_asyice ! PADE coefficients for shortwave ice asymmetry parameter ! Dimensions integer :: & - nrghice_lw, nbandLWcldy, nsize_liq, nsize_ice, nsizereg,& - ncoeff_ext, ncoeff_ssa_g, nbound, npairsLWcldy + nrghice_fromfile, nBand, nSize_liq, nSize_ice, nSizeReg,& + nCoeff_ext, nCoeff_ssa_g, nBound, npairs ! Local variables - integer :: dimID,varID,status,ncid_lw_clds + integer :: dimID,varID,status,ncid character(len=264) :: lw_cloud_props_file integer,parameter :: max_strlen=256 #ifdef MPI - integer :: ierr + integer :: mpierr #endif ! Initialize @@ -104,247 +105,215 @@ subroutine rrtmgp_lw_cloud_optics_init(cld_optics_scheme, nrghice, rrtmgp_root_d ! Filenames are set in the physics_nml lw_cloud_props_file = trim(rrtmgp_root_dir)//trim(rrtmgp_lw_file_clouds) - ! Read dimensions for k-distribution fields (only on master processor(0)) -! if (mpirank .eq. mpiroot) then - if(nf90_open(trim(lw_cloud_props_file), NF90_WRITE, ncid_lw_clds) == NF90_NOERR) then - status = nf90_inq_dimid(ncid_lw_clds, 'nband', dimid) - status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=nbandLWcldy) - status = nf90_inq_dimid(ncid_lw_clds, 'nrghice', dimid) - status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=nrghice_lw) - status = nf90_inq_dimid(ncid_lw_clds, 'nsize_liq', dimid) - status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=nsize_liq) - status = nf90_inq_dimid(ncid_lw_clds, 'nsize_ice', dimid) - status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=nsize_ice) - status = nf90_inq_dimid(ncid_lw_clds, 'nsizereg', dimid) - status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=nsizereg) - status = nf90_inq_dimid(ncid_lw_clds, 'ncoeff_ext', dimid) - status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=ncoeff_ext) - status = nf90_inq_dimid(ncid_lw_clds, 'ncoeff_ssa_g', dimid) - status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=ncoeff_ssa_g) - status = nf90_inq_dimid(ncid_lw_clds, 'nbound', dimid) - status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=nbound) - status = nf90_inq_dimid(ncid_lw_clds, 'pair', dimid) - status = nf90_inquire_dimension(ncid_lw_clds, dimid, len=npairsLWcldy) - status = nf90_close(ncid_lw_clds) - endif - - ! Check to ensure that number of ice-roughness categories is feasible. - if (nrghice .gt. nrghice_lw) then - errmsg = 'Number of RRTMGP ice-roughness categories requested in namelist file is not allowed' - endif -! endif + ! On master processor only... + if (mpirank .eq. mpiroot) then + ! Open file + status = nf90_open(trim(lw_cloud_props_file), NF90_WRITE, ncid) - ! Broadcast dimensions to all processors -!#ifdef MPI -! call MPI_BCAST(nbandSWcldy_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! if (cld_optics_scheme .eq. 1) then -! call MPI_BARRIER(mpicomm, ierr) -! call MPI_BCAST(nrghice_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(nsize_liq_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(nsize_ice_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BARRIER(mpicomm, ierr) -! endif -! if (cld_optics_scheme .eq. 2) then -! call MPI_BARRIER(mpicomm, ierr) -! call MPI_BCAST(nrghice_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(nsizereg_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(ncoeff_ext_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(ncoeff_ssa_g_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(nbound_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BARRIER(mpicomm, ierr) -! endif -!#endif + ! Read dimensions + status = nf90_inq_dimid(ncid, 'nband', dimid) + status = nf90_inquire_dimension(ncid, dimid, len=nBand) + status = nf90_inq_dimid(ncid, 'nrghice', dimid) + status = nf90_inquire_dimension(ncid, dimid, len=nrghice_fromfile) + status = nf90_inq_dimid(ncid, 'nsize_liq', dimid) + status = nf90_inquire_dimension(ncid, dimid, len=nSize_liq) + status = nf90_inq_dimid(ncid, 'nsize_ice', dimid) + status = nf90_inquire_dimension(ncid, dimid, len=nSize_ice) + status = nf90_inq_dimid(ncid, 'nsizereg', dimid) + status = nf90_inquire_dimension(ncid, dimid, len=nSizeReg) + status = nf90_inq_dimid(ncid, 'ncoeff_ext', dimid) + status = nf90_inquire_dimension(ncid, dimid, len=nCoeff_ext) + status = nf90_inq_dimid(ncid, 'ncoeff_ssa_g', dimid) + status = nf90_inquire_dimension(ncid, dimid, len=nCoeff_ssa_g) + status = nf90_inq_dimid(ncid, 'nbound', dimid) + status = nf90_inquire_dimension(ncid, dimid, len=nBound) + status = nf90_inq_dimid(ncid, 'pair', dimid) + status = nf90_inquire_dimension(ncid, dimid, len=npairs) + status = nf90_close(ncid) - if (Cld_optics_scheme .eq. 1) then - allocate(lut_extliq(nsize_liq, nBandLWcldy)) - allocate(lut_ssaliq(nsize_liq, nBandLWcldy)) - allocate(lut_asyliq(nsize_liq, nBandLWcldy)) - allocate(lut_extice(nsize_ice, nBandLWcldy, nrghice_lw)) - allocate(lut_ssaice(nsize_ice, nBandLWcldy, nrghice_lw)) - allocate(lut_asyice(nsize_ice, nBandLWcldy, nrghice_lw)) - allocate(band_lims_cldy(2, nBandLWcldy)) - endif - if (Cld_optics_scheme .eq. 2) then - allocate(pade_extliq(nbandLWcldy, nsizereg, ncoeff_ext )) - allocate(pade_ssaliq(nbandLWcldy, nsizereg, ncoeff_ssa_g)) - allocate(pade_asyliq(nbandLWcldy, nsizereg, ncoeff_ssa_g)) - allocate(pade_extice(nbandLWcldy, nsizereg, ncoeff_ext, nrghice_lw)) - allocate(pade_ssaice(nbandLWcldy, nsizereg, ncoeff_ssa_g, nrghice_lw)) - allocate(pade_asyice(nbandLWcldy, nsizereg, ncoeff_ssa_g, nrghice_lw)) - allocate(pade_sizereg_extliq(nbound)) - allocate(pade_sizereg_ssaliq(nbound)) - allocate(pade_sizereg_asyliq(nbound)) - allocate(pade_sizereg_extice(nbound)) - allocate(pade_sizereg_ssaice(nbound)) - allocate(pade_sizereg_asyice(nbound)) - allocate(band_lims_cldy(2,nbandLWcldy)) - endif + ! Has the number of ice-roughnesses been provided from the namelist? + ! If not provided, use all categories in file (default) + if (nrghice .eq. 0) then + nrghice = nrghice_fromfile + endif + ! If provided in the namelist, check to ensure that number of ice-roughness categories is feasible. + if (nrghice .gt. nrghice_fromfile) then + errmsg = 'Number of RRTMGP ice-roughness categories requested in namelist file is not allowed. Using nrghice from file...' + nrghice = nrghice_fromfile + endif - ! On master processor, allocate space, read in fields, broadcast to all processors -! if (mpirank .eq. mpiroot) then - if (Cld_optics_scheme .eq. 1) then + ! Allocate space for arrays + if (cld_optics_scheme .eq. 1) then + allocate(lut_extliq(nSize_liq, nBand)) + allocate(lut_ssaliq(nSize_liq, nBand)) + allocate(lut_asyliq(nSize_liq, nBand)) + allocate(lut_extice(nSize_ice, nBand, nrghice)) + allocate(lut_ssaice(nSize_ice, nBand, nrghice)) + allocate(lut_asyice(nSize_ice, nBand, nrghice)) + endif + if (cld_optics_scheme .eq. 2) then + allocate(pade_extliq(nBand, nSizeReg, nCoeff_ext )) + allocate(pade_ssaliq(nBand, nSizeReg, nCoeff_ssa_g)) + allocate(pade_asyliq(nBand, nSizeReg, nCoeff_ssa_g)) + allocate(pade_extice(nBand, nSizeReg, nCoeff_ext, nrghice)) + allocate(pade_ssaice(nBand, nSizeReg, nCoeff_ssa_g, nrghice)) + allocate(pade_asyice(nBand, nSizeReg, nCoeff_ssa_g, nrghice)) + allocate(pade_sizereg_extliq(nBound)) + allocate(pade_sizereg_ssaliq(nBound)) + allocate(pade_sizereg_asyliq(nBound)) + allocate(pade_sizereg_extice(nBound)) + allocate(pade_sizereg_ssaice(nBound)) + allocate(pade_sizereg_asyice(nBound)) + endif + allocate(band_lims(2,nBand)) + + ! Read in fields from file + if (cld_optics_scheme .eq. 1) then write (*,*) 'Reading RRTMGP longwave cloud data (LUT) ... ' - if(nf90_open(trim(lw_cloud_props_file), NF90_WRITE, ncid_lw_clds) == NF90_NOERR) then - status = nf90_inq_varid(ncid_lw_clds,'radliq_lwr',varID) - status = nf90_get_var(ncid_lw_clds,varID,radliq_lwr) - status = nf90_inq_varid(ncid_lw_clds,'radliq_upr',varID) - status = nf90_get_var(ncid_lw_clds,varID,radliq_upr) - status = nf90_inq_varid(ncid_lw_clds,'radliq_fac',varID) - status = nf90_get_var(ncid_lw_clds,varID,radliq_fac) - status = nf90_inq_varid(ncid_lw_clds,'radice_lwr',varID) - status = nf90_get_var(ncid_lw_clds,varID,radice_lwr) - status = nf90_inq_varid(ncid_lw_clds,'radice_upr',varID) - status = nf90_get_var(ncid_lw_clds,varID,radice_upr) - status = nf90_inq_varid(ncid_lw_clds,'radice_fac',varID) - status = nf90_get_var(ncid_lw_clds,varID,radice_fac) - status = nf90_inq_varid(ncid_lw_clds,'lut_extliq',varID) - status = nf90_get_var(ncid_lw_clds,varID,lut_extliq) - status = nf90_inq_varid(ncid_lw_clds,'lut_ssaliq',varID) - status = nf90_get_var(ncid_lw_clds,varID,lut_ssaliq) - status = nf90_inq_varid(ncid_lw_clds,'lut_asyliq',varID) - status = nf90_get_var(ncid_lw_clds,varID,lut_asyliq) - status = nf90_inq_varid(ncid_lw_clds,'lut_extice',varID) - status = nf90_get_var(ncid_lw_clds,varID,lut_extice) - status = nf90_inq_varid(ncid_lw_clds,'lut_ssaice',varID) - status = nf90_get_var(ncid_lw_clds,varID,lut_ssaice) - status = nf90_inq_varid(ncid_lw_clds,'lut_asyice',varID) - status = nf90_get_var(ncid_lw_clds,varID,lut_asyice) - status = nf90_inq_varid(ncid_lw_clds,'bnd_limits_wavenumber',varID) - status = nf90_get_var(ncid_lw_clds,varID,band_lims_cldy) - status = nf90_close(ncid_lw_clds) - endif + status = nf90_inq_varid(ncid,'radliq_lwr',varID) + status = nf90_get_var(ncid,varID,radliq_lwr) + status = nf90_inq_varid(ncid,'radliq_upr',varID) + status = nf90_get_var(ncid,varID,radliq_upr) + status = nf90_inq_varid(ncid,'radliq_fac',varID) + status = nf90_get_var(ncid,varID,radliq_fac) + status = nf90_inq_varid(ncid,'radice_lwr',varID) + status = nf90_get_var(ncid,varID,radice_lwr) + status = nf90_inq_varid(ncid,'radice_upr',varID) + status = nf90_get_var(ncid,varID,radice_upr) + status = nf90_inq_varid(ncid,'radice_fac',varID) + status = nf90_get_var(ncid,varID,radice_fac) + status = nf90_inq_varid(ncid,'lut_extliq',varID) + status = nf90_get_var(ncid,varID,lut_extliq) + status = nf90_inq_varid(ncid,'lut_ssaliq',varID) + status = nf90_get_var(ncid,varID,lut_ssaliq) + status = nf90_inq_varid(ncid,'lut_asyliq',varID) + status = nf90_get_var(ncid,varID,lut_asyliq) + status = nf90_inq_varid(ncid,'lut_extice',varID) + status = nf90_get_var(ncid,varID,lut_extice) + status = nf90_inq_varid(ncid,'lut_ssaice',varID) + status = nf90_get_var(ncid,varID,lut_ssaice) + status = nf90_inq_varid(ncid,'lut_asyice',varID) + status = nf90_get_var(ncid,varID,lut_asyice) + status = nf90_inq_varid(ncid,'bnd_limits_wavenumber',varID) + status = nf90_get_var(ncid,varID,band_lims) endif - ! - if (Cld_optics_scheme .eq. 2) then + if (cld_optics_scheme .eq. 2) then write (*,*) 'Reading RRTMGP longwave cloud data (PADE) ... ' - if(nf90_open(trim(lw_cloud_props_file), NF90_WRITE, ncid_lw_clds) == NF90_NOERR) then - status = nf90_inq_varid(ncid_lw_clds,'radliq_lwr',varID) - status = nf90_get_var(ncid_lw_clds,varID,radliq_lwr) - status = nf90_inq_varid(ncid_lw_clds,'radliq_upr',varID) - status = nf90_get_var(ncid_lw_clds,varID,radliq_upr) - status = nf90_inq_varid(ncid_lw_clds,'radliq_fac',varID) - status = nf90_get_var(ncid_lw_clds,varID,radliq_fac) - status = nf90_inq_varid(ncid_lw_clds,'radice_lwr',varID) - status = nf90_get_var(ncid_lw_clds,varID,radice_lwr) - status = nf90_inq_varid(ncid_lw_clds,'radice_upr',varID) - status = nf90_get_var(ncid_lw_clds,varID,radice_upr) - status = nf90_inq_varid(ncid_lw_clds,'radice_fac',varID) - status = nf90_get_var(ncid_lw_clds,varID,radice_fac) - status = nf90_inq_varid(ncid_lw_clds,'pade_extliq',varID) - status = nf90_get_var(ncid_lw_clds,varID,pade_extliq) - status = nf90_inq_varid(ncid_lw_clds,'pade_ssaliq',varID) - status = nf90_get_var(ncid_lw_clds,varID,pade_ssaliq) - status = nf90_inq_varid(ncid_lw_clds,'pade_asyliq',varID) - status = nf90_get_var(ncid_lw_clds,varID,pade_asyliq) - status = nf90_inq_varid(ncid_lw_clds,'pade_extice',varID) - status = nf90_get_var(ncid_lw_clds,varID,pade_extice) - status = nf90_inq_varid(ncid_lw_clds,'pade_ssaice',varID) - status = nf90_get_var(ncid_lw_clds,varID,pade_ssaice) - status = nf90_inq_varid(ncid_lw_clds,'pade_asyice',varID) - status = nf90_get_var(ncid_lw_clds,varID,pade_asyice) - status = nf90_inq_varid(ncid_lw_clds,'pade_sizreg_extliq',varID) - status = nf90_get_var(ncid_lw_clds,varID,pade_sizereg_extliq) - status = nf90_inq_varid(ncid_lw_clds,'pade_sizreg_ssaliq',varID) - status = nf90_get_var(ncid_lw_clds,varID,pade_sizereg_ssaliq) - status = nf90_inq_varid(ncid_lw_clds,'pade_sizreg_asyliq',varID) - status = nf90_get_var(ncid_lw_clds,varID,pade_sizereg_asyliq) - status = nf90_inq_varid(ncid_lw_clds,'pade_sizreg_extice',varID) - status = nf90_get_var(ncid_lw_clds,varID,pade_sizereg_extice) - status = nf90_inq_varid(ncid_lw_clds,'pade_sizreg_ssaice',varID) - status = nf90_get_var(ncid_lw_clds,varID,pade_sizereg_ssaice) - status = nf90_inq_varid(ncid_lw_clds,'pade_sizreg_asyice',varID) - status = nf90_get_var(ncid_lw_clds,varID,pade_sizereg_asyice) - status = nf90_inq_varid(ncid_lw_clds,'bnd_limits_wavenumber',varID) - status = nf90_get_var(ncid_lw_clds,varID,band_lims_cldy) - status = nf90_close(ncid_lw_clds) - endif + status = nf90_inq_varid(ncid,'radliq_lwr',varID) + status = nf90_get_var(ncid,varID,radliq_lwr) + status = nf90_inq_varid(ncid,'radliq_upr',varID) + status = nf90_get_var(ncid,varID,radliq_upr) + status = nf90_inq_varid(ncid,'radliq_fac',varID) + status = nf90_get_var(ncid,varID,radliq_fac) + status = nf90_inq_varid(ncid,'radice_lwr',varID) + status = nf90_get_var(ncid,varID,radice_lwr) + status = nf90_inq_varid(ncid,'radice_upr',varID) + status = nf90_get_var(ncid,varID,radice_upr) + status = nf90_inq_varid(ncid,'radice_fac',varID) + status = nf90_get_var(ncid,varID,radice_fac) + status = nf90_inq_varid(ncid,'pade_extliq',varID) + status = nf90_get_var(ncid,varID,pade_extliq) + status = nf90_inq_varid(ncid,'pade_ssaliq',varID) + status = nf90_get_var(ncid,varID,pade_ssaliq) + status = nf90_inq_varid(ncid,'pade_asyliq',varID) + status = nf90_get_var(ncid,varID,pade_asyliq) + status = nf90_inq_varid(ncid,'pade_extice',varID) + status = nf90_get_var(ncid,varID,pade_extice) + status = nf90_inq_varid(ncid,'pade_ssaice',varID) + status = nf90_get_var(ncid,varID,pade_ssaice) + status = nf90_inq_varid(ncid,'pade_asyice',varID) + status = nf90_get_var(ncid,varID,pade_asyice) + status = nf90_inq_varid(ncid,'pade_sizreg_extliq',varID) + status = nf90_get_var(ncid,varID,pade_sizereg_extliq) + status = nf90_inq_varid(ncid,'pade_sizreg_ssaliq',varID) + status = nf90_get_var(ncid,varID,pade_sizereg_ssaliq) + status = nf90_inq_varid(ncid,'pade_sizreg_asyliq',varID) + status = nf90_get_var(ncid,varID,pade_sizereg_asyliq) + status = nf90_inq_varid(ncid,'pade_sizreg_extice',varID) + status = nf90_get_var(ncid,varID,pade_sizereg_extice) + status = nf90_inq_varid(ncid,'pade_sizreg_ssaice',varID) + status = nf90_get_var(ncid,varID,pade_sizereg_ssaice) + status = nf90_inq_varid(ncid,'pade_sizreg_asyice',varID) + status = nf90_get_var(ncid,varID,pade_sizereg_asyice) + status = nf90_inq_varid(ncid,'bnd_limits_wavenumber',varID) + status = nf90_get_var(ncid,varID,band_lims) endif -! endif + + ! Close file + status = nf90_close(ncid) + endif + +#ifdef MPI + if (cld_optics_scheme .eq. 1) then + ! Wait for processor 0 to catch up... + call MPI_BARRIER(mpicomm, mpierr) + + ! Broadcast data + write (*,*) 'Broadcasting RRTMGP longwave cloud-optics data ... ' + call MPI_BCAST(nBand, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nrghice, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nSize_liq, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nSize_ice, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(radliq_lwr, 1, MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(radliq_upr, 1, MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(radliq_fac, 1, MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(radice_lwr, 1, MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(radice_upr, 1, MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(radice_fac, 1, MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(lut_extliq, size(lut_extliq), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(lut_ssaliq, size(lut_ssaliq), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(lut_asyliq, size(lut_asyliq), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(lut_extice, size(lut_extice), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(lut_ssaice, size(lut_ssaice), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(lut_asyice, size(lut_asyice), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(band_lims, size(band_lims), MPI_REAL, mpiroot, mpicomm, mpierr) - ! Broadcast arrays to all processors -!#ifdef MPI -! if (cld_optics_scheme .eq. 1) then -! if (mpirank==mpiroot) write (*,*) 'Broadcasting RRTMGP shortwave cloud data (LUT) ... ' -! call MPI_BARRIER(mpicomm, ierr) -!#ifndef SINGLE_PREC -! call MPI_BCAST(radliq_lwr, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(radliq_upr, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(radliq_fac, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(radice_lwr, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(radice_upr, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(radice_fac, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(lut_extliq, size(lut_extliq), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(lut_ssaliq, size(lut_ssaliq), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(lut_asyliq, size(lut_asyliq), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(lut_extice, size(lut_extice), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(lut_ssaice, size(lut_ssaice), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(lut_asyice, size(lut_asyice), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(band_lims_cldy, size(band_lims_cldy), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -!#else -! call MPI_BCAST(radliq_lwr, 1, MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(radliq_upr, 1, MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(radliq_fac, 1, MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(radice_lwr, 1, MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(radice_upr, 1, MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(radice_fac, 1, MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(lut_extliq, size(lut_extliq), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(lut_ssaliq, size(lut_ssaliq), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(lut_asyliq, size(lut_asyliq), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(lut_extice, size(lut_extice), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(lut_ssaice, size(lut_ssaice), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(lut_asyice, size(lut_asyice), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(band_lims_cldy, size(band_lims_cldy), MPI_REAL, mpiroot, mpicomm, ierr) -!#endif -! call MPI_BARRIER(mpicomm, ierr) -! endif -! if (cld_optics_scheme .eq. 2) then -! if (mpirank==mpiroot) write (*,*) 'Broadcasting RRTMGP shortwave cloud data (PADE) ... ' -! call MPI_BARRIER(mpicomm, ierr) -!#ifndef SINGLE_PREC -! call MPI_BCAST(pade_extliq, size(pade_extliq), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(pade_ssaliq, size(pade_ssaliq), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(pade_asyliq, size(pade_asyliq), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(pade_extice, size(pade_extice), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(pade_ssaice, size(pade_ssaice), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(pade_asyice, size(pade_asyice), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(pade_sizereg_extliq, size(pade_sizereg_extliq), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(pade_sizereg_ssaliq, size(pade_sizereg_ssaliq), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(pade_sizereg_asyliq, size(pade_sizereg_asyliq), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(pade_sizereg_extice, size(pade_sizereg_extice), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(pade_sizereg_ssaice, size(pade_sizereg_ssaice), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(pade_sizereg_asyice, size(pade_sizereg_asyice), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(band_lims_cldy, size(band_lims_cldy), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -!#else -! call MPI_BCAST(pade_extliq, size(pade_extliq), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(pade_ssaliq, size(pade_ssaliq), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(pade_asyliq, size(pade_asyliq), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(pade_extice, size(pade_extice), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(pade_ssaice, size(pade_ssaice), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(pade_asyice, size(pade_asyice), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(pade_sizereg_extliq, size(pade_sizereg_extliq), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(pade_sizereg_ssaliq, size(pade_sizereg_ssaliq), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(pade_sizereg_asyliq, size(pade_sizereg_asyliq), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(pade_sizereg_extice, size(pade_sizereg_extice), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(pade_sizereg_ssaice, size(pade_sizereg_ssaice), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(pade_sizereg_asyice, size(pade_sizereg_asyice), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(band_lims_cldy, size(band_lims_cldy), MPI_REAL, mpiroot, mpicomm, ierr) -!#endif -! call MPI_BARRIER(mpicomm, ierr) -! endif -!#endif + ! Don't advance until data broadcast complete on all processors + call MPI_BARRIER(mpicomm, mpierr) + endif + if (cld_optics_scheme .eq. 2) then + ! Wait for processor 0 to catch up... + call MPI_BARRIER(mpicomm, mpierr) + + ! Broadcast data + write (*,*) 'Broadcasting RRTMGP longwave cloud-optics data ... ' + call MPI_BCAST(nBand, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nrghice, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nSizeReg, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nCoeff_ext, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nCoeff_ssa_g, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nBound, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(pade_extliq, size(pade_extliq), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(pade_ssaliq, size(pade_ssaliq), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(pade_asyliq, size(pade_asyliq), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(pade_extice, size(pade_extice), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(pade_ssaice, size(pade_ssaice), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(pade_asyice, size(pade_asyice), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(pade_sizereg_extliq, size(pade_sizereg_extliq), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(pade_sizereg_ssaliq, size(pade_sizereg_ssaliq), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(pade_sizereg_asyliq, size(pade_sizereg_asyliq), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(pade_sizereg_extice, size(pade_sizereg_extice), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(pade_sizereg_ssaice, size(pade_sizereg_ssaice), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(pade_sizereg_asyice, size(pade_sizereg_asyice), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(band_lims, size(band_lims), MPI_REAL, mpiroot, mpicomm, mpierr) + + ! Don't advance until data broadcast complete on all processors + call MPI_BARRIER(mpicomm, mpierr) + endif +#endif ! Load tables data for RRTMGP cloud-optics if (cld_optics_scheme .eq. 1) then call check_error_msg('lw_cloud_optics_init',lw_cloud_props%set_ice_roughness(nrghice)) - call check_error_msg('lw_cloud_optics_init',lw_cloud_props%load(band_lims_cldy, & + call check_error_msg('lw_cloud_optics_init',lw_cloud_props%load(band_lims, & radliq_lwr, radliq_upr, radliq_fac, radice_lwr, radice_upr, radice_fac, & lut_extliq, lut_ssaliq, lut_asyliq, lut_extice, lut_ssaice, lut_asyice)) endif if (cld_optics_scheme .eq. 2) then - call check_error_msg('lw_cloud_optics_init',lw_cloud_props%set_ice_roughness(nrghice)) - call check_error_msg('lw_cloud_optics_init',lw_cloud_props%load(band_lims_cldy, & - pade_extliq, pade_ssaliq, pade_asyliq, pade_extice, pade_ssaice, & - pade_asyice, pade_sizereg_extliq, pade_sizereg_ssaliq, pade_sizereg_asyliq,& + call check_error_msg('lw_cloud_optics_init', lw_cloud_props%set_ice_roughness(nrghice)) + call check_error_msg('lw_cloud_optics_init', lw_cloud_props%load(band_lims, & + pade_extliq, pade_ssaliq, pade_asyliq, pade_extice, pade_ssaice, pade_asyice,& + pade_sizereg_extliq, pade_sizereg_ssaliq, pade_sizereg_asyliq, & pade_sizereg_extice, pade_sizereg_ssaice, pade_sizereg_asyice)) endif end subroutine rrtmgp_lw_cloud_optics_init @@ -463,12 +432,6 @@ subroutine rrtmgp_lw_cloud_optics_finalize(mpicomm, mpirank, mpiroot) mpicomm, & ! MPI communicator mpirank, & ! Current MPI rank mpiroot ! Master MPI rank - ! Local variables - integer :: ierr - -#ifdef MPI - call MPI_BARRIER(mpicomm, ierr) -#endif end subroutine rrtmgp_lw_cloud_optics_finalize end module rrtmgp_lw_cloud_optics diff --git a/physics/rrtmgp_lw_cloud_optics.meta b/physics/rrtmgp_lw_cloud_optics.meta index 47fb602c0..bae5ef74f 100644 --- a/physics/rrtmgp_lw_cloud_optics.meta +++ b/physics/rrtmgp_lw_cloud_optics.meta @@ -15,7 +15,7 @@ units = count dimensions = () type = integer - intent = in + intent = inout optional = F [rrtmgp_root_dir] standard_name = directory_for_rte_rrtmgp_source_code diff --git a/physics/rrtmgp_lw_gas_optics.F90 b/physics/rrtmgp_lw_gas_optics.F90 index 3a528ef25..440b40242 100644 --- a/physics/rrtmgp_lw_gas_optics.F90 +++ b/physics/rrtmgp_lw_gas_optics.F90 @@ -95,7 +95,7 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp ! Dimensions integer :: & - ntemps, npress, ngpts_lw, nabsorbers, nextrabsorbers, nminorabsorbers,& + ntemps, npress, ngpts, nabsorbers, nextrabsorbers, nminorabsorbers,& nmixingfracs, nlayers, nbnds, npairs, ninternalSourcetemps, & nminor_absorber_intervals_lower, nminor_absorber_intervals_upper, & ncontributors_lower, ncontributors_upper @@ -113,46 +113,46 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp errmsg = '' errflg = 0 - write(*,"(a19,3i20)") 'RRTMGP MPI ranks: ',mpirank,mpiroot,mpicomm + write(*,"(a52,3i20)") 'rrtmgp_lw_gas_optics.F90:_init(): RRTMGP MPI ranks: ',mpirank,mpiroot,mpicomm ! Filenames are set in the physics_nml lw_gas_props_file = trim(rrtmgp_root_dir)//trim(rrtmgp_lw_file_gas) ! On master processor only... if (mpirank .eq. mpiroot) then - ! Opne file + ! Open file status = nf90_open(trim(lw_gas_props_file), NF90_WRITE, ncid) ! Read dimensions for k-distribution fields - status = nf90_inq_dimid( ncid, 'temperature', dimid) + status = nf90_inq_dimid(ncid, 'temperature', dimid) status = nf90_inquire_dimension(ncid, dimid, len = ntemps) - status = nf90_inq_dimid( ncid, 'pressure', dimid) + status = nf90_inq_dimid(ncid, 'pressure', dimid) status = nf90_inquire_dimension(ncid, dimid, len = npress) - status = nf90_inq_dimid( ncid, 'absorber', dimid) + status = nf90_inq_dimid(ncid, 'absorber', dimid) status = nf90_inquire_dimension(ncid, dimid, len = nabsorbers) - status = nf90_inq_dimid( ncid, 'minor_absorber', dimid) + status = nf90_inq_dimid(ncid, 'minor_absorber', dimid) status = nf90_inquire_dimension(ncid, dimid, len = nminorabsorbers) - status = nf90_inq_dimid( ncid, 'absorber_ext', dimid) + status = nf90_inq_dimid(ncid, 'absorber_ext', dimid) status = nf90_inquire_dimension(ncid, dimid, len = nextrabsorbers) - status = nf90_inq_dimid( ncid, 'mixing_fraction', dimid) + status = nf90_inq_dimid(ncid, 'mixing_fraction', dimid) status = nf90_inquire_dimension(ncid, dimid, len = nmixingfracs) - status = nf90_inq_dimid( ncid, 'atmos_layer', dimid) + status = nf90_inq_dimid(ncid, 'atmos_layer', dimid) status = nf90_inquire_dimension(ncid, dimid, len = nlayers) - status = nf90_inq_dimid( ncid, 'bnd', dimid) + status = nf90_inq_dimid(ncid, 'bnd', dimid) status = nf90_inquire_dimension(ncid, dimid, len = nbnds) - status = nf90_inq_dimid( ncid, 'gpt', dimid) - status = nf90_inquire_dimension(ncid, dimid, len = ngpts_lw) - status = nf90_inq_dimid( ncid, 'pair', dimid) + status = nf90_inq_dimid(ncid, 'gpt', dimid) + status = nf90_inquire_dimension(ncid, dimid, len = ngpts) + status = nf90_inq_dimid(ncid, 'pair', dimid) status = nf90_inquire_dimension(ncid, dimid, len = npairs) - status = nf90_inq_dimid( ncid, 'contributors_lower', dimid) + status = nf90_inq_dimid(ncid, 'contributors_lower', dimid) status = nf90_inquire_dimension(ncid, dimid, len = ncontributors_lower) - status = nf90_inq_dimid( ncid, 'contributors_upper', dimid) + status = nf90_inq_dimid(ncid, 'contributors_upper', dimid) status = nf90_inquire_dimension(ncid, dimid, len = ncontributors_upper) - status = nf90_inq_dimid( ncid, 'minor_absorber_intervals_lower', dimid) + status = nf90_inq_dimid(ncid, 'minor_absorber_intervals_lower', dimid) status = nf90_inquire_dimension(ncid, dimid, len = nminor_absorber_intervals_lower) - status = nf90_inq_dimid( ncid, 'minor_absorber_intervals_upper', dimid) + status = nf90_inq_dimid(ncid, 'minor_absorber_intervals_upper', dimid) status = nf90_inquire_dimension(ncid, dimid, len = nminor_absorber_intervals_upper) - status = nf90_inq_dimid( ncid, 'temperature_Planck', dimid) + status = nf90_inq_dimid(ncid, 'temperature_Planck', dimid) status = nf90_inquire_dimension(ncid, dimid, len = ninternalSourcetemps) ! Allocate space for arrays @@ -172,7 +172,7 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp allocate(temp_ref(ntemps)) allocate(vmr_ref(nlayers, nextrabsorbers, ntemps)) allocate(kminor_lower(ncontributors_lower, nmixingfracs, ntemps)) - allocate(kmajor(ngpts_lw, nmixingfracs, npress+1, ntemps)) + allocate(kmajor(ngpts, nmixingfracs, npress+1, ntemps)) allocate(kminor_start_lower(nminor_absorber_intervals_lower)) allocate(kminor_upper(ncontributors_upper, nmixingfracs, ntemps)) allocate(kminor_start_upper(nminor_absorber_intervals_upper)) @@ -185,75 +185,75 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp allocate(temp3(nminor_absorber_intervals_lower)) allocate(temp4(nminor_absorber_intervals_upper)) allocate(totplnk(ninternalSourcetemps, nbnds)) - allocate(planck_frac(ngpts_lw, nmixingfracs, npress+1, ntemps)) + allocate(planck_frac(ngpts, nmixingfracs, npress+1, ntemps)) ! Read in fields from file write (*,*) 'Reading RRTMGP longwave k-distribution data ... ' - status = nf90_inq_varid(ncid, 'gas_names', varID) + status = nf90_inq_varid(ncid, 'gas_names', varID) status = nf90_get_var( ncid, varID, gas_names) - status = nf90_inq_varid(ncid, 'scaling_gas_lower', varID) + status = nf90_inq_varid(ncid, 'scaling_gas_lower', varID) status = nf90_get_var( ncid, varID, scaling_gas_lower) - status = nf90_inq_varid(ncid, 'scaling_gas_upper', varID) + status = nf90_inq_varid(ncid, 'scaling_gas_upper', varID) status = nf90_get_var( ncid, varID, scaling_gas_upper) - status = nf90_inq_varid(ncid, 'gas_minor', varID) + status = nf90_inq_varid(ncid, 'gas_minor', varID) status = nf90_get_var( ncid, varID, gas_minor) - status = nf90_inq_varid(ncid, 'identifier_minor', varID) + status = nf90_inq_varid(ncid, 'identifier_minor', varID) status = nf90_get_var( ncid, varID, identifier_minor) - status = nf90_inq_varid(ncid, 'minor_gases_lower', varID) + status = nf90_inq_varid(ncid, 'minor_gases_lower', varID) status = nf90_get_var( ncid, varID, minor_gases_lower) - status = nf90_inq_varid(ncid, 'minor_gases_upper', varID) + status = nf90_inq_varid(ncid, 'minor_gases_upper', varID) status = nf90_get_var( ncid, varID, minor_gases_upper) - status = nf90_inq_varid(ncid, 'minor_limits_gpt_lower', varID) + status = nf90_inq_varid(ncid, 'minor_limits_gpt_lower', varID) status = nf90_get_var( ncid, varID, minor_limits_gpt_lower) - status = nf90_inq_varid(ncid, 'minor_limits_gpt_upper', varID) + status = nf90_inq_varid(ncid, 'minor_limits_gpt_upper', varID) status = nf90_get_var( ncid, varID, minor_limits_gpt_upper) - status = nf90_inq_varid(ncid, 'bnd_limits_gpt', varID) + status = nf90_inq_varid(ncid, 'bnd_limits_gpt', varID) status = nf90_get_var( ncid, varID, band2gpt) - status = nf90_inq_varid(ncid, 'key_species', varID) + status = nf90_inq_varid(ncid, 'key_species', varID) status = nf90_get_var( ncid, varID, key_species) - status = nf90_inq_varid(ncid, 'bnd_limits_wavenumber', varID) + status = nf90_inq_varid(ncid, 'bnd_limits_wavenumber', varID) status = nf90_get_var( ncid, varID, band_lims) - status = nf90_inq_varid(ncid, 'press_ref', varID) + status = nf90_inq_varid(ncid, 'press_ref', varID) status = nf90_get_var( ncid, varID, press_ref) - status = nf90_inq_varid(ncid, 'temp_ref', varID) + status = nf90_inq_varid(ncid, 'temp_ref', varID) status = nf90_get_var( ncid, varID, temp_ref) - status = nf90_inq_varid(ncid, 'absorption_coefficient_ref_P',varID) + status = nf90_inq_varid(ncid, 'absorption_coefficient_ref_P', varID) status = nf90_get_var( ncid, varID, temp_ref_p) - status = nf90_inq_varid(ncid, 'absorption_coefficient_ref_T',varID) + status = nf90_inq_varid(ncid, 'absorption_coefficient_ref_T', varID) status = nf90_get_var( ncid, varID, temp_ref_t) - status = nf90_inq_varid(ncid, 'press_ref_trop', varID) + status = nf90_inq_varid(ncid, 'press_ref_trop', varID) status = nf90_get_var( ncid, varID, press_ref_trop) - status = nf90_inq_varid(ncid, 'kminor_lower', varID) + status = nf90_inq_varid(ncid, 'kminor_lower', varID) status = nf90_get_var( ncid, varID, kminor_lower) - status = nf90_inq_varid(ncid, 'kminor_upper', varID) + status = nf90_inq_varid(ncid, 'kminor_upper', varID) status = nf90_get_var( ncid, varID, kminor_upper) - status = nf90_inq_varid(ncid, 'vmr_ref', varID) + status = nf90_inq_varid(ncid, 'vmr_ref', varID) status = nf90_get_var( ncid, varID, vmr_ref) - status = nf90_inq_varid(ncid, 'kmajor', varID) + status = nf90_inq_varid(ncid, 'kmajor', varID) status = nf90_get_var( ncid, varID, kmajor) - status = nf90_inq_varid(ncid, 'kminor_start_lower', varID) + status = nf90_inq_varid(ncid, 'kminor_start_lower', varID) status = nf90_get_var( ncid, varID, kminor_start_lower) - status = nf90_inq_varid(ncid, 'kminor_start_upper', varID) + status = nf90_inq_varid(ncid, 'kminor_start_upper', varID) status = nf90_get_var( ncid, varID, kminor_start_upper) - status = nf90_inq_varid(ncid, 'totplnk', varID) + status = nf90_inq_varid(ncid, 'totplnk', varID) status = nf90_get_var( ncid, varID, totplnk) - status = nf90_inq_varid(ncid, 'plank_fraction', varID) + status = nf90_inq_varid(ncid, 'plank_fraction', varID) status = nf90_get_var( ncid, varID, planck_frac) ! Logical fields are read in as integers and then converted to logicals. - status = nf90_inq_varid(ncid, 'minor_scales_with_density_lower',varID) + status = nf90_inq_varid(ncid, 'minor_scales_with_density_lower', varID) status = nf90_get_var( ncid, varID,temp1) minor_scales_with_density_lower(:) = .false. where(temp1 .eq. 1) minor_scales_with_density_lower(:) = .true. - status = nf90_inq_varid(ncid, 'minor_scales_with_density_upper',varID) + status = nf90_inq_varid(ncid, 'minor_scales_with_density_upper', varID) status = nf90_get_var( ncid, varID,temp2) minor_scales_with_density_upper(:) = .false. where(temp2 .eq. 1) minor_scales_with_density_upper(:) = .true. - status = nf90_inq_varid(ncid, 'scale_by_complement_lower', varID) + status = nf90_inq_varid(ncid, 'scale_by_complement_lower', varID) status = nf90_get_var( ncid, varID,temp3) scale_by_complement_lower(:) = .false. where(temp3 .eq. 1) scale_by_complement_lower(:) = .true. - status = nf90_inq_varid(ncid, 'scale_by_complement_upper', varID) + status = nf90_inq_varid(ncid, 'scale_by_complement_upper', varID) status = nf90_get_var( ncid, varID,temp4) scale_by_complement_upper(:) = .false. where(temp4 .eq. 1) scale_by_complement_upper(:) = .true. @@ -263,128 +263,66 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp endif #ifdef MPI -! if (mpirank .ne. mpiroot) then ! Wait for processor 0 to catch up... call MPI_BARRIER(mpicomm, mpierr) ! Broadcast data write (*,*) 'Broadcasting RRTMGP longwave k-distribution data ... ' - call MPI_BCAST(ntemps, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 1 ',mpierr, mpicomm - call MPI_BCAST(npress, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 2 ',mpierr, mpicomm - call MPI_BCAST(nabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 3 ',mpierr, mpicomm - call MPI_BCAST(nminorabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 4 ',mpierr, mpicomm - call MPI_BCAST(nextrabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 5 ',mpierr, mpicomm - call MPI_BCAST(nmixingfracs, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 6 ',mpierr, mpicomm - call MPI_BCAST(nlayers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 7 ',mpierr, mpicomm - call MPI_BCAST(nbnds, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 8 ',mpierr, mpicomm - call MPI_BCAST(ngpts_lw, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 9 ',mpierr, mpicomm - call MPI_BCAST(npairs, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 10 ',mpierr, mpicomm - call MPI_BCAST(ncontributors_lower, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 11 ',mpierr, mpicomm - call MPI_BCAST(ncontributors_upper, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 12 ',mpierr, mpicomm - call MPI_BCAST(nminor_absorber_intervals_lower, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 13 ',mpierr, mpicomm - call MPI_BCAST(nminor_absorber_intervals_upper, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 14 ',mpierr, mpicomm - call MPI_BCAST(ninternalSourcetemps, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 15 ',mpierr, mpicomm - call MPI_BCAST(minor_limits_gpt_upper, size(minor_limits_gpt_upper), MPI_INTEGER, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 16 ',mpierr, mpicomm - call MPI_BCAST(minor_limits_gpt_lower, size(minor_limits_gpt_lower), MPI_INTEGER, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 17 ',mpierr, mpicomm - call MPI_BCAST(kminor_start_upper, size(kminor_start_upper), MPI_INTEGER, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 18 ',mpierr, mpicomm - call MPI_BCAST(kminor_start_lower, size(kminor_start_lower), MPI_INTEGER, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 19 ',mpierr, mpicomm - call MPI_BCAST(key_species, size(key_species), MPI_INTEGER, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 20 ',mpierr, mpicomm - call MPI_BCAST(band2gpt, size(band2gpt), MPI_INTEGER, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 21 ',mpierr, mpicomm - call MPI_BCAST(band_lims, size(band_lims), MPI_REAL, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 22 ',mpierr, mpicomm - call MPI_BCAST(press_ref, size(press_ref), MPI_REAL, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 23 ',mpierr, mpicomm - call MPI_BCAST(temp_ref, size(temp_ref), MPI_REAL, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 24 ',mpierr, mpicomm - call MPI_BCAST(kminor_lower, size(kminor_lower), MPI_REAL, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 25 ',mpierr, mpicomm - call MPI_BCAST(kminor_upper, size(kminor_upper), MPI_REAL, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 26 ',mpierr, mpicomm - call MPI_BCAST(scaling_gas_lower, size(scaling_gas_lower), MPI_REAL, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 27 ',mpierr, mpicomm - call MPI_BCAST(scaling_gas_upper, size(scaling_gas_upper), MPI_REAL, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 28 ',mpierr, mpicomm - call MPI_BCAST(vmr_ref, size(vmr_ref), MPI_REAL, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 29 ',mpierr, mpicomm - call MPI_BCAST(kmajor, size(kmajor), MPI_REAL, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 30 ',mpierr, mpicomm - call MPI_BCAST(temp_ref_p, 1, MPI_REAL, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 31 ',mpierr, mpicomm - call MPI_BCAST(temp_ref_t, 1, MPI_REAL, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 32 ',mpierr, mpicomm - call MPI_BCAST(press_ref_trop, 1, MPI_REAL, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 33 ',mpierr, mpicomm - call MPI_BCAST(totplnk, size(totplnk), MPI_REAL, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 34 ',mpierr, mpicomm - call MPI_BCAST(planck_frac, size(planck_frac), MPI_REAL, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 35 ',mpierr, mpicomm - ! Character arrays - !do ij=1,nabsorbers - ! call MPI_BCAST(gas_names(ij), len(gas_names(ij)), MPI_CHARACTER, mpiroot, mpicomm, mpierr) - !enddo - call MPI_BCAST(gas_names, size(gas_names), MPI_CHARACTER, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 36 ',mpierr, mpicomm - !do ij=1,nminorabsorbers - ! call MPI_BCAST(gas_minor(ij), len(gas_minor(ij)), MPI_CHARACTER, mpiroot, mpicomm, mpierr) - !enddo - call MPI_BCAST(gas_minor, size(gas_minor), MPI_CHARACTER, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 37 ',mpierr, mpicomm - !do ij=1,nminorabsorbers - ! call MPI_BCAST(identifier_minor(ij), len(identifier_minor(ij)), MPI_CHARACTER, mpiroot, mpicomm, mpierr) - !enddo - call MPI_BCAST(identifier_minor, size(identifier_minor), MPI_CHARACTER, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 38 ',mpierr, mpicomm - !do ij=1,nminor_absorber_intervals_lower - ! call MPI_BCAST(minor_gases_lower(ij), len(minor_gases_lower(ij)), MPI_CHARACTER, mpiroot, mpicomm, mpierr) - !enddo - call MPI_BCAST(minor_gases_lower, size(minor_gases_lower), MPI_CHARACTER, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 39 ',mpierr, mpicomm - !do ij=1,nminor_absorber_intervals_upper - ! call MPI_BCAST(minor_gases_upper(ij), len(minor_gases_upper(ij)), MPI_CHARACTER, mpiroot, mpicomm, mpierr) - !enddo - call MPI_BCAST(minor_gases_upper, size(minor_gases_upper), MPI_CHARACTER, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 40 ',mpierr, mpicomm - ! Logical arrays - call MPI_BCAST(minor_scales_with_density_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 41 ',mpierr, mpicomm - call MPI_BCAST(scale_by_complement_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 42 ',mpierr, mpicomm - call MPI_BCAST(minor_scales_with_density_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 43 ',mpierr, mpicomm - call MPI_BCAST(scale_by_complement_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, mpierr) - write(*,*) 'Broadcasting 44 ',mpierr, mpicomm + call MPI_BCAST(ntemps, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(npress, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nminorabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nextrabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nmixingfracs, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nlayers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nbnds, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(ngpts, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(npairs, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(ncontributors_lower, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(ncontributors_upper, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nminor_absorber_intervals_lower, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nminor_absorber_intervals_upper, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(ninternalSourcetemps, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(minor_limits_gpt_upper, size(minor_limits_gpt_upper), MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(minor_limits_gpt_lower, size(minor_limits_gpt_lower), MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(kminor_start_upper, size(kminor_start_upper), MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(kminor_start_lower, size(kminor_start_lower), MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(key_species, size(key_species), MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(band2gpt, size(band2gpt), MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(band_lims, size(band_lims), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(press_ref, size(press_ref), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(temp_ref, size(temp_ref), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(kminor_lower, size(kminor_lower), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(kminor_upper, size(kminor_upper), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(scaling_gas_lower, size(scaling_gas_lower), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(scaling_gas_upper, size(scaling_gas_upper), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(vmr_ref, size(vmr_ref), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(kmajor, size(kmajor), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(temp_ref_p, 1, MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(temp_ref_t, 1, MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(press_ref_trop, 1, MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(totplnk, size(totplnk), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(planck_frac, size(planck_frac), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(gas_names, size(gas_names), MPI_CHARACTER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(gas_minor, size(gas_minor), MPI_CHARACTER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(identifier_minor, size(identifier_minor), MPI_CHARACTER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(minor_gases_lower, size(minor_gases_lower), MPI_CHARACTER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(minor_gases_upper, size(minor_gases_upper), MPI_CHARACTER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(minor_scales_with_density_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(scale_by_complement_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(minor_scales_with_density_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(scale_by_complement_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, mpierr) + ! Don't advance until data broadcast complete on all processors call MPI_BARRIER(mpicomm, mpierr) - write(*,*) 'Broadcasting 45 ',mpierr, mpicomm #endif - ! Initialize gas concentrations and gas optics class with data + ! Initialize gas concentrations and gas optics class do iGas=1,rrtmgp_nGases call check_error_msg('lw_gas_optics_init',gas_concentrations%set_vmr(active_gases_array(iGas), 0._kind_phys)) enddo call check_error_msg('lw_gas_optics_init',lw_gas_props%load(gas_concentrations, gas_names, & key_species, band2gpt, band_lims, press_ref, press_ref_trop, temp_ref, temp_ref_p, & - temp_ref_t, vmr_ref, kmajor, kminor_lower, kminor_upper, gas_minor,identifier_minor, & + temp_ref_t, vmr_ref, kmajor, kminor_lower, kminor_upper, gas_minor, identifier_minor, & minor_gases_lower, minor_gases_upper, minor_limits_gpt_lower, minor_limits_gpt_upper, & minor_scales_with_density_lower, minor_scales_with_density_upper, scaling_gas_lower, & scaling_gas_upper, scale_by_complement_lower, scale_by_complement_upper, & @@ -436,10 +374,9 @@ subroutine rrtmgp_lw_gas_optics_run(doLWrad, nCol, nLev, lw_gas_props, p_lay, p_ if (.not. doLWrad) return - ! Allocate space + ! Allocate and initialize call check_error_msg('rrtmgp_lw_gas_optics_run',lw_optical_props_clrsky%alloc_1scl(ncol, nLev, lw_gas_props)) - call check_error_msg('rrtmgp_lw_gas_optics_run',sources%init(lw_gas_props)) - call check_error_msg('rrtmgp_lw_gas_optics_run',sources%alloc(ncol, nLev)) + call check_error_msg('rrtmgp_lw_gas_optics_run',sources%alloc(ncol, nLev, lw_gas_props)) ! Gas-optics call check_error_msg('rrtmgp_lw_gas_optics_run',lw_gas_props%gas_optics(& diff --git a/physics/rrtmgp_sw_cloud_optics.F90 b/physics/rrtmgp_sw_cloud_optics.F90 index ab0ad497b..87aa27df9 100644 --- a/physics/rrtmgp_sw_cloud_optics.F90 +++ b/physics/rrtmgp_sw_cloud_optics.F90 @@ -8,9 +8,12 @@ module rrtmgp_sw_cloud_optics use mo_rrtmg_sw_cloud_optics, only: rrtmg_sw_cloud_optics use rrtmgp_aux, only: check_error_msg use netcdf +#ifdef MPI + use mpi +#endif + public rrtmgp_sw_cloud_optics_init, rrtmgp_sw_cloud_optics_run, rrtmgp_sw_cloud_optics_finalize contains - ! ######################################################################################### ! SUBROUTINE sw_cloud_optics_init ! ######################################################################################### @@ -19,14 +22,11 @@ module rrtmgp_sw_cloud_optics !! subroutine rrtmgp_sw_cloud_optics_init(cld_optics_scheme, nrghice, rrtmgp_root_dir, & rrtmgp_sw_file_clouds, mpicomm, mpirank, mpiroot, sw_cloud_props, errmsg, errflg) - use netcdf -!#ifdef MPI -! use mpi -!#endif ! Inputs + integer, intent(inout) :: & + nrghice ! Number of ice-roughness categories integer, intent(in) :: & - nrghice, & ! Number of ice-roughness categories cld_optics_scheme, & ! Cloud-optics scheme mpicomm, & ! MPI communicator mpirank, & ! Current MPI rank @@ -46,53 +46,53 @@ subroutine rrtmgp_sw_cloud_optics_init(cld_optics_scheme, nrghice, rrtmgp_root_d ! Variables that will be passed to cloud_optics%load() ! cld_optics_scheme = 1 real(kind_phys) :: & - radliq_lwr_sw, & ! Liquid particle size lower bound for LUT interpolation - radliq_upr_sw, & ! Liquid particle size upper bound for LUT interpolation - radliq_fac_sw, & ! Factor for calculating LUT interpolation indices for liquid - radice_lwr_sw, & ! Ice particle size upper bound for LUT interpolation - radice_upr_sw, & ! Ice particle size lower bound for LUT interpolation - radice_fac_sw ! Factor for calculating LUT interpolation indices for ice + radliq_lwr, & ! Liquid particle size lower bound for LUT interpolation + radliq_upr, & ! Liquid particle size upper bound for LUT interpolation + radliq_fac, & ! Factor for calculating LUT interpolation indices for liquid + radice_lwr, & ! Ice particle size upper bound for LUT interpolation + radice_upr, & ! Ice particle size lower bound for LUT interpolation + radice_fac ! Factor for calculating LUT interpolation indices for ice real(kind_phys), dimension(:,:), allocatable :: & - lut_extliq_sw, & ! LUT shortwave liquid extinction coefficient - lut_ssaliq_sw, & ! LUT shortwave liquid single scattering albedo - lut_asyliq_sw, & ! LUT shortwave liquid asymmetry parameter - band_lims_cldy_sw ! Beginning and ending wavenumber [cm -1] for each band + lut_extliq, & ! LUT shortwave liquid extinction coefficient + lut_ssaliq, & ! LUT shortwave liquid single scattering albedo + lut_asyliq, & ! LUT shortwave liquid asymmetry parameter + band_lims ! Beginning and ending wavenumber [cm -1] for each band real(kind_phys), dimension(:,:,:), allocatable :: & - lut_extice_sw, & ! LUT shortwave ice extinction coefficient - lut_ssaice_sw, & ! LUT shortwave ice single scattering albedo - lut_asyice_sw ! LUT shortwave ice asymmetry parameter + lut_extice, & ! LUT shortwave ice extinction coefficient + lut_ssaice, & ! LUT shortwave ice single scattering albedo + lut_asyice ! LUT shortwave ice asymmetry parameter ! cld_optics_scheme = 2 real(kind_phys), dimension(:), allocatable :: & - pade_sizereg_extliq_sw, & ! Particle size regime boundaries for shortwave liquid extinction - ! coefficient for Pade interpolation - pade_sizereg_ssaliq_sw, & ! Particle size regime boundaries for shortwave liquid single - ! scattering albedo for Pade interpolation - pade_sizereg_asyliq_sw, & ! Particle size regime boundaries for shortwave liquid asymmetry - ! parameter for Pade interpolation - pade_sizereg_extice_sw, & ! Particle size regime boundaries for shortwave ice extinction - ! coefficient for Pade interpolation - pade_sizereg_ssaice_sw, & ! Particle size regime boundaries for shortwave ice single - ! scattering albedo for Pade interpolation - pade_sizereg_asyice_sw ! Particle size regime boundaries for shortwave ice asymmetry - ! parameter for Pade interpolation + pade_sizereg_extliq, & ! Particle size regime boundaries for shortwave liquid extinction + ! coefficient for Pade interpolation + pade_sizereg_ssaliq, & ! Particle size regime boundaries for shortwave liquid single + ! scattering albedo for Pade interpolation + pade_sizereg_asyliq, & ! Particle size regime boundaries for shortwave liquid asymmetry + ! parameter for Pade interpolation + pade_sizereg_extice, & ! Particle size regime boundaries for shortwave ice extinction + ! coefficient for Pade interpolation + pade_sizereg_ssaice, & ! Particle size regime boundaries for shortwave ice single + ! scattering albedo for Pade interpolation + pade_sizereg_asyice ! Particle size regime boundaries for shortwave ice asymmetry + ! parameter for Pade interpolation real(kind_phys), dimension(:,:,:), allocatable :: & - pade_extliq_sw, & ! PADE coefficients for shortwave liquid extinction - pade_ssaliq_sw, & ! PADE coefficients for shortwave liquid single scattering albedo - pade_asyliq_sw ! PADE coefficients for shortwave liquid asymmetry parameter + pade_extliq, & ! PADE coefficients for shortwave liquid extinction + pade_ssaliq, & ! PADE coefficients for shortwave liquid single scattering albedo + pade_asyliq ! PADE coefficients for shortwave liquid asymmetry parameter real(kind_phys), dimension(:,:,:,:), allocatable :: & - pade_extice_sw, & ! PADE coefficients for shortwave ice extinction - pade_ssaice_sw, & ! PADE coefficients for shortwave ice single scattering albedo - pade_asyice_sw ! PADE coefficients for shortwave ice asymmetry parameter + pade_extice, & ! PADE coefficients for shortwave ice extinction + pade_ssaice, & ! PADE coefficients for shortwave ice single scattering albedo + pade_asyice ! PADE coefficients for shortwave ice asymmetry parameter ! Dimensions integer :: & - nrghice_sw, nbandSWcldy_sw, nsize_liq_sw, nsize_ice_sw, nsizereg_sw,& - ncoeff_ext_sw, ncoeff_ssa_g_sw, nbound_sw, npairsSWcldy_sw + nrghice_fromfile, nBand, nSize_liq, nSize_ice, nSizereg,& + nCoeff_ext, nCoeff_ssa_g, nBound, nPairs ! Local variables - integer :: status,ncid_sw_clds,dimid,varID + integer :: status,ncid,dimid,varID character(len=264) :: sw_cloud_props_file #ifdef MPI - integer :: ierr + integer :: mpierr #endif ! Initialize errmsg = '' @@ -103,248 +103,215 @@ subroutine rrtmgp_sw_cloud_optics_init(cld_optics_scheme, nrghice, rrtmgp_root_d ! Filenames are set in the physics_nml sw_cloud_props_file = trim(rrtmgp_root_dir)//trim(rrtmgp_sw_file_clouds) - ! Read dimensions for k-distribution fields (only on master processor(0)) -! if (mpirank .eq. mpiroot) then - if(nf90_open(trim(sw_cloud_props_file), NF90_WRITE, ncid_sw_clds) == NF90_NOERR) then - status = nf90_inq_dimid(ncid_sw_clds, 'nband', dimid) - status = nf90_inquire_dimension(ncid_sw_clds, dimid, len=nbandSWcldy_sw) - status = nf90_inq_dimid(ncid_sw_clds, 'nrghice', dimid) - status = nf90_inquire_dimension(ncid_sw_clds, dimid, len=nrghice_sw) - status = nf90_inq_dimid(ncid_sw_clds, 'nsize_liq', dimid) - status = nf90_inquire_dimension(ncid_sw_clds, dimid, len=nsize_liq_sw) - status = nf90_inq_dimid(ncid_sw_clds, 'nsize_ice', dimid) - status = nf90_inquire_dimension(ncid_sw_clds, dimid, len=nsize_ice_sw) - status = nf90_inq_dimid(ncid_sw_clds, 'nsizereg', dimid) - status = nf90_inquire_dimension(ncid_sw_clds, dimid, len=nsizereg_sw) - status = nf90_inq_dimid(ncid_sw_clds, 'ncoeff_ext', dimid) - status = nf90_inquire_dimension(ncid_sw_clds, dimid, len=ncoeff_ext_sw) - status = nf90_inq_dimid(ncid_sw_clds, 'ncoeff_ssa_g', dimid) - status = nf90_inquire_dimension(ncid_sw_clds, dimid, len=ncoeff_ssa_g_sw) - status = nf90_inq_dimid(ncid_sw_clds, 'nbound', dimid) - status = nf90_inquire_dimension(ncid_sw_clds, dimid, len=nbound_sw) - status = nf90_inq_dimid(ncid_sw_clds, 'pair', dimid) + ! On master processor only... + if (mpirank .eq. mpiroot) then + ! Open file + status = nf90_open(trim(sw_cloud_props_file), NF90_WRITE, ncid) - endif + ! Read dimensions + status = nf90_inq_dimid(ncid, 'nband', dimid) + status = nf90_inquire_dimension(ncid, dimid, len=nBand) + status = nf90_inq_dimid(ncid, 'nrghice', dimid) + status = nf90_inquire_dimension(ncid, dimid, len=nrghice_fromfile) + status = nf90_inq_dimid(ncid, 'nsize_liq', dimid) + status = nf90_inquire_dimension(ncid, dimid, len=nSize_liq) + status = nf90_inq_dimid(ncid, 'nsize_ice', dimid) + status = nf90_inquire_dimension(ncid, dimid, len=nSize_ice) + status = nf90_inq_dimid(ncid, 'nsizereg', dimid) + status = nf90_inquire_dimension(ncid, dimid, len=nSizereg) + status = nf90_inq_dimid(ncid, 'ncoeff_ext', dimid) + status = nf90_inquire_dimension(ncid, dimid, len=nCoeff_ext) + status = nf90_inq_dimid(ncid, 'ncoeff_ssa_g', dimid) + status = nf90_inquire_dimension(ncid, dimid, len=nCoeff_ssa_g) + status = nf90_inq_dimid(ncid, 'nbound', dimid) + status = nf90_inquire_dimension(ncid, dimid, len=nBound) + status = nf90_inq_dimid(ncid, 'pair', dimid) + status = nf90_inquire_dimension(ncid, dimid, len=nPairs) - ! Check to ensure that number of ice-roughness categories is feasible. - if (nrghice .gt. nrghice_sw) then - errmsg = 'Number of RRTMGP ice-roughness categories requested in namelist file is not allowed' + ! Has the number of ice-roughnesses been provided from the namelist? + ! If not provided, use all categories in file (default) + if (nrghice .eq. 0) then + nrghice = nrghice_fromfile + endif + ! If provided in the namelist, check to ensure that number of ice-roughness categories is feasible. + if (nrghice .gt. nrghice_fromfile) then + errmsg = 'Number of RRTMGP ice-roughness categories requested in namelist file is not allowed. Using nrghice from file...' + nrghice = nrghice_fromfile endif -! endif - - ! Broadcast dimensions to all processors -!#ifdef MPI -! call MPI_BCAST(nbandSWcldy_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! if (cld_optics_scheme .eq. 1) then -! call MPI_BARRIER(mpicomm, ierr) -! call MPI_BCAST(nrghice_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(nsize_liq_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(nsize_ice_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BARRIER(mpicomm, ierr) -! endif -! if (cld_optics_scheme .eq. 2) then -! call MPI_BARRIER(mpicomm, ierr) -! call MPI_BCAST(nrghice_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(nsizereg_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(ncoeff_ext_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(ncoeff_ssa_g_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(nbound_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BARRIER(mpicomm, ierr) -! endif -!#endif - if (cld_optics_scheme .eq. 1) then - allocate(lut_extliq_sw(nsize_liq_sw, nBandSWcldy_sw)) - allocate(lut_ssaliq_sw(nsize_liq_sw, nBandSWcldy_sw)) - allocate(lut_asyliq_sw(nsize_liq_sw, nBandSWcldy_sw)) - allocate(lut_extice_sw(nsize_ice_sw, nBandSWcldy_sw, nrghice_sw)) - allocate(lut_ssaice_sw(nsize_ice_sw, nBandSWcldy_sw, nrghice_sw)) - allocate(lut_asyice_sw(nsize_ice_sw, nBandSWcldy_sw, nrghice_sw)) - endif - if (cld_optics_scheme .eq. 2) then - allocate(pade_extliq_sw(nbandSWcldy_sw, nsizereg_sw, ncoeff_ext_sw )) - allocate(pade_ssaliq_sw(nbandSWcldy_sw, nsizereg_sw, ncoeff_ssa_g_sw)) - allocate(pade_asyliq_sw(nbandSWcldy_sw, nsizereg_sw, ncoeff_ssa_g_sw)) - allocate(pade_extice_sw(nbandSWcldy_sw, nsizereg_sw, ncoeff_ext_sw, nrghice_sw)) - allocate(pade_ssaice_sw(nbandSWcldy_sw, nsizereg_sw, ncoeff_ssa_g_sw, nrghice_sw)) - allocate(pade_asyice_sw(nbandSWcldy_sw, nsizereg_sw, ncoeff_ssa_g_sw, nrghice_sw)) - allocate(pade_sizereg_extliq_sw(nbound_sw)) - allocate(pade_sizereg_ssaliq_sw(nbound_sw)) - allocate(pade_sizereg_asyliq_sw(nbound_sw)) - allocate(pade_sizereg_extice_sw(nbound_sw)) - allocate(pade_sizereg_ssaice_sw(nbound_sw)) - allocate(pade_sizereg_asyice_sw(nbound_sw)) - endif - allocate(band_lims_cldy_sw(2,nbandSWcldy_sw)) + ! Allocate space for arrays + if (cld_optics_scheme .eq. 1) then + allocate(lut_extliq(nSize_liq, nBand)) + allocate(lut_ssaliq(nSize_liq, nBand)) + allocate(lut_asyliq(nSize_liq, nBand)) + allocate(lut_extice(nSize_ice, nBand, nrghice)) + allocate(lut_ssaice(nSize_ice, nBand, nrghice)) + allocate(lut_asyice(nSize_ice, nBand, nrghice)) + endif + if (cld_optics_scheme .eq. 2) then + allocate(pade_extliq(nBand, nSizeReg, nCoeff_ext )) + allocate(pade_ssaliq(nBand, nSizeReg, nCoeff_ssa_g)) + allocate(pade_asyliq(nBand, nSizeReg, nCoeff_ssa_g)) + allocate(pade_extice(nBand, nSizeReg, nCoeff_ext, nrghice)) + allocate(pade_ssaice(nBand, nSizeReg, nCoeff_ssa_g, nrghice)) + allocate(pade_asyice(nBand, nSizeReg, nCoeff_ssa_g, nrghice)) + allocate(pade_sizereg_extliq(nBound)) + allocate(pade_sizereg_ssaliq(nBound)) + allocate(pade_sizereg_asyliq(nBound)) + allocate(pade_sizereg_extice(nBound)) + allocate(pade_sizereg_ssaice(nBound)) + allocate(pade_sizereg_asyice(nBound)) + endif + allocate(band_lims(2,nBand)) - ! On master processor, allocate space, read in fields, broadcast to all processors -! if (mpirank .eq. mpiroot) then + ! Read in fields from file if (cld_optics_scheme .eq. 1) then write (*,*) 'Reading RRTMGP shortwave cloud data (LUT) ... ' - if(nf90_open(trim(sw_cloud_props_file), NF90_WRITE, ncid_sw_clds) == NF90_NOERR) then - status = nf90_inq_varid(ncid_sw_clds,'radliq_lwr',varID) - status = nf90_get_var(ncid_sw_clds,varID,radliq_lwr_sw) - status = nf90_inq_varid(ncid_sw_clds,'radliq_upr',varID) - status = nf90_get_var(ncid_sw_clds,varID,radliq_upr_sw) - status = nf90_inq_varid(ncid_sw_clds,'radliq_fac',varID) - status = nf90_get_var(ncid_sw_clds,varID,radliq_fac_sw) - status = nf90_inq_varid(ncid_sw_clds,'radice_lwr',varID) - status = nf90_get_var(ncid_sw_clds,varID,radice_lwr_sw) - status = nf90_inq_varid(ncid_sw_clds,'radice_upr',varID) - status = nf90_get_var(ncid_sw_clds,varID,radice_upr_sw) - status = nf90_inq_varid(ncid_sw_clds,'radice_fac',varID) - status = nf90_get_var(ncid_sw_clds,varID,radice_fac_sw) - status = nf90_inq_varid(ncid_sw_clds,'lut_extliq',varID) - status = nf90_get_var(ncid_sw_clds,varID,lut_extliq_sw) - status = nf90_inq_varid(ncid_sw_clds,'lut_ssaliq',varID) - status = nf90_get_var(ncid_sw_clds,varID,lut_ssaliq_sw) - status = nf90_inq_varid(ncid_sw_clds,'lut_asyliq',varID) - status = nf90_get_var(ncid_sw_clds,varID,lut_asyliq_sw) - status = nf90_inq_varid(ncid_sw_clds,'lut_extice',varID) - status = nf90_get_var(ncid_sw_clds,varID,lut_extice_sw) - status = nf90_inq_varid(ncid_sw_clds,'lut_ssaice',varID) - status = nf90_get_var(ncid_sw_clds,varID,lut_ssaice_sw) - status = nf90_inq_varid(ncid_sw_clds,'lut_asyice',varID) - status = nf90_get_var(ncid_sw_clds,varID,lut_asyice_sw) - status = nf90_inq_varid(ncid_sw_clds,'bnd_limits_wavenumber',varID) - status = nf90_get_var(ncid_sw_clds,varID,band_lims_cldy_sw) - status = nf90_close(ncid_sw_clds) - endif + status = nf90_inq_varid(ncid,'radliq_lwr',varID) + status = nf90_get_var(ncid,varID,radliq_lwr) + status = nf90_inq_varid(ncid,'radliq_upr',varID) + status = nf90_get_var(ncid,varID,radliq_upr) + status = nf90_inq_varid(ncid,'radliq_fac',varID) + status = nf90_get_var(ncid,varID,radliq_fac) + status = nf90_inq_varid(ncid,'radice_lwr',varID) + status = nf90_get_var(ncid,varID,radice_lwr) + status = nf90_inq_varid(ncid,'radice_upr',varID) + status = nf90_get_var(ncid,varID,radice_upr) + status = nf90_inq_varid(ncid,'radice_fac',varID) + status = nf90_get_var(ncid,varID,radice_fac) + status = nf90_inq_varid(ncid,'lut_extliq',varID) + status = nf90_get_var(ncid,varID,lut_extliq) + status = nf90_inq_varid(ncid,'lut_ssaliq',varID) + status = nf90_get_var(ncid,varID,lut_ssaliq) + status = nf90_inq_varid(ncid,'lut_asyliq',varID) + status = nf90_get_var(ncid,varID,lut_asyliq) + status = nf90_inq_varid(ncid,'lut_extice',varID) + status = nf90_get_var(ncid,varID,lut_extice) + status = nf90_inq_varid(ncid,'lut_ssaice',varID) + status = nf90_get_var(ncid,varID,lut_ssaice) + status = nf90_inq_varid(ncid,'lut_asyice',varID) + status = nf90_get_var(ncid,varID,lut_asyice) + status = nf90_inq_varid(ncid,'bnd_limits_wavenumber',varID) + status = nf90_get_var(ncid,varID,band_lims) endif - ! if (cld_optics_scheme .eq. 2) then write (*,*) 'Reading RRTMGP shortwave cloud data (PADE) ... ' - if(nf90_open(trim(sw_cloud_props_file), NF90_WRITE, ncid_sw_clds) == NF90_NOERR) then - status = nf90_inq_varid(ncid_sw_clds,'radliq_lwr',varID) - status = nf90_get_var(ncid_sw_clds,varID,radliq_lwr_sw) - status = nf90_inq_varid(ncid_sw_clds,'radliq_upr',varID) - status = nf90_get_var(ncid_sw_clds,varID,radliq_upr_sw) - status = nf90_inq_varid(ncid_sw_clds,'radliq_fac',varID) - status = nf90_get_var(ncid_sw_clds,varID,radliq_fac_sw) - status = nf90_inq_varid(ncid_sw_clds,'radice_lwr',varID) - status = nf90_get_var(ncid_sw_clds,varID,radice_lwr_sw) - status = nf90_inq_varid(ncid_sw_clds,'radice_upr',varID) - status = nf90_get_var(ncid_sw_clds,varID,radice_upr_sw) - status = nf90_inq_varid(ncid_sw_clds,'radice_fac',varID) - status = nf90_get_var(ncid_sw_clds,varID,radice_fac_sw) - status = nf90_inq_varid(ncid_sw_clds,'pade_extliq',varID) - status = nf90_get_var(ncid_sw_clds,varID,pade_extliq_sw) - status = nf90_inq_varid(ncid_sw_clds,'pade_ssaliq',varID) - status = nf90_get_var(ncid_sw_clds,varID,pade_ssaliq_sw) - status = nf90_inq_varid(ncid_sw_clds,'pade_asyliq',varID) - status = nf90_get_var(ncid_sw_clds,varID,pade_asyliq_sw) - status = nf90_inq_varid(ncid_sw_clds,'pade_extice',varID) - status = nf90_get_var(ncid_sw_clds,varID,pade_extice_sw) - status = nf90_inq_varid(ncid_sw_clds,'pade_ssaice',varID) - status = nf90_get_var(ncid_sw_clds,varID,pade_ssaice_sw) - status = nf90_inq_varid(ncid_sw_clds,'pade_asyice',varID) - status = nf90_get_var(ncid_sw_clds,varID,pade_asyice_sw) - status = nf90_inq_varid(ncid_sw_clds,'pade_sizreg_extliq',varID) - status = nf90_get_var(ncid_sw_clds,varID,pade_sizereg_extliq_sw) - status = nf90_inq_varid(ncid_sw_clds,'pade_sizreg_ssaliq',varID) - status = nf90_get_var(ncid_sw_clds,varID,pade_sizereg_ssaliq_sw) - status = nf90_inq_varid(ncid_sw_clds,'pade_sizreg_asyliq',varID) - status = nf90_get_var(ncid_sw_clds,varID,pade_sizereg_asyliq_sw) - status = nf90_inq_varid(ncid_sw_clds,'pade_sizreg_extice',varID) - status = nf90_get_var(ncid_sw_clds,varID,pade_sizereg_extice_sw) - status = nf90_inq_varid(ncid_sw_clds,'pade_sizreg_ssaice',varID) - status = nf90_get_var(ncid_sw_clds,varID,pade_sizereg_ssaice_sw) - status = nf90_inq_varid(ncid_sw_clds,'pade_sizreg_asyice',varID) - status = nf90_get_var(ncid_sw_clds,varID,pade_sizereg_asyice_sw) - status = nf90_inq_varid(ncid_sw_clds,'bnd_limits_wavenumber',varID) - status = nf90_get_var(ncid_sw_clds,varID,band_lims_cldy_sw) - status = nf90_close(ncid_sw_clds) - endif + status = nf90_inq_varid(ncid,'radliq_lwr',varID) + status = nf90_get_var(ncid,varID,radliq_lwr) + status = nf90_inq_varid(ncid,'radliq_upr',varID) + status = nf90_get_var(ncid,varID,radliq_upr) + status = nf90_inq_varid(ncid,'radliq_fac',varID) + status = nf90_get_var(ncid,varID,radliq_fac) + status = nf90_inq_varid(ncid,'radice_lwr',varID) + status = nf90_get_var(ncid,varID,radice_lwr) + status = nf90_inq_varid(ncid,'radice_upr',varID) + status = nf90_get_var(ncid,varID,radice_upr) + status = nf90_inq_varid(ncid,'radice_fac',varID) + status = nf90_get_var(ncid,varID,radice_fac) + status = nf90_inq_varid(ncid,'pade_extliq',varID) + status = nf90_get_var(ncid,varID,pade_extliq) + status = nf90_inq_varid(ncid,'pade_ssaliq',varID) + status = nf90_get_var(ncid,varID,pade_ssaliq) + status = nf90_inq_varid(ncid,'pade_asyliq',varID) + status = nf90_get_var(ncid,varID,pade_asyliq) + status = nf90_inq_varid(ncid,'pade_extice',varID) + status = nf90_get_var(ncid,varID,pade_extice) + status = nf90_inq_varid(ncid,'pade_ssaice',varID) + status = nf90_get_var(ncid,varID,pade_ssaice) + status = nf90_inq_varid(ncid,'pade_asyice',varID) + status = nf90_get_var(ncid,varID,pade_asyice) + status = nf90_inq_varid(ncid,'pade_sizreg_extliq',varID) + status = nf90_get_var(ncid,varID,pade_sizereg_extliq) + status = nf90_inq_varid(ncid,'pade_sizreg_ssaliq',varID) + status = nf90_get_var(ncid,varID,pade_sizereg_ssaliq) + status = nf90_inq_varid(ncid,'pade_sizreg_asyliq',varID) + status = nf90_get_var(ncid,varID,pade_sizereg_asyliq) + status = nf90_inq_varid(ncid,'pade_sizreg_extice',varID) + status = nf90_get_var(ncid,varID,pade_sizereg_extice) + status = nf90_inq_varid(ncid,'pade_sizreg_ssaice',varID) + status = nf90_get_var(ncid,varID,pade_sizereg_ssaice) + status = nf90_inq_varid(ncid,'pade_sizreg_asyice',varID) + status = nf90_get_var(ncid,varID,pade_sizereg_asyice) + status = nf90_inq_varid(ncid,'bnd_limits_wavenumber',varID) + status = nf90_get_var(ncid,varID,band_lims) endif -! endif - ! Broadcast arrays to all processors -!#ifdef MPI -! if (cld_optics_scheme .eq. 1) then -! if (mpirank==mpiroot) write (*,*) 'Broadcasting RRTMGP shortwave cloud data (LUT) ... ' -! call MPI_BARRIER(mpicomm, ierr) -!#ifndef SINGLE_PREC -! call MPI_BCAST(radliq_lwr_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(radliq_upr_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(radliq_fac_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(radice_lwr_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(radice_upr_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(radice_fac_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(lut_extliq_sw, size(lut_extliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(lut_ssaliq_sw, size(lut_ssaliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(lut_asyliq_sw, size(lut_asyliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(lut_extice_sw, size(lut_extice_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(lut_ssaice_sw, size(lut_ssaice_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(lut_asyice_sw, size(lut_asyice_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(band_lims_cldy_sw, size(band_lims_cldy_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -!#else -! call MPI_BCAST(radliq_lwr_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(radliq_upr_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(radliq_fac_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(radice_lwr_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(radice_upr_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(radice_fac_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(lut_extliq_sw, size(lut_extliq_sw), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(lut_ssaliq_sw, size(lut_ssaliq_sw), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(lut_asyliq_sw, size(lut_asyliq_sw), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(lut_extice_sw, size(lut_extice_sw), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(lut_ssaice_sw, size(lut_ssaice_sw), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(lut_asyice_sw, size(lut_asyice_sw), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(band_lims_cldy_sw, size(band_lims_cldy_sw), MPI_REAL, mpiroot, mpicomm, ierr) -!#endif -! call MPI_BARRIER(mpicomm, ierr) -! endif -! if (cld_optics_scheme .eq. 2) then -! if (mpirank==mpiroot) write (*,*) 'Broadcasting RRTMGP shortwave cloud data (PADE) ... ' -! call MPI_BARRIER(mpicomm, ierr) -!#ifndef SINGLE_PREC -! call MPI_BCAST(pade_extliq_sw, size(pade_extliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(pade_ssaliq_sw, size(pade_ssaliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(pade_asyliq_sw, size(pade_asyliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(pade_extice_sw, size(pade_extice_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(pade_ssaice_sw, size(pade_ssaice_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(pade_asyice_sw, size(pade_asyice_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(pade_sizereg_extliq_sw, size(pade_sizereg_extliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(pade_sizereg_ssaliq_sw, size(pade_sizereg_ssaliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(pade_sizereg_asyliq_sw, size(pade_sizereg_asyliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(pade_sizereg_extice_sw, size(pade_sizereg_extice_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(pade_sizereg_ssaice_sw, size(pade_sizereg_ssaice_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(pade_sizereg_asyice_sw, size(pade_sizereg_asyice_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(band_lims_cldy_sw, size(band_lims_cldy_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -!#else -! call MPI_BCAST(pade_extliq_sw, size(pade_extliq_sw), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(pade_ssaliq_sw, size(pade_ssaliq_sw), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(pade_asyliq_sw, size(pade_asyliq_sw), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(pade_extice_sw, size(pade_extice_sw), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(pade_ssaice_sw, size(pade_ssaice_sw), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(pade_asyice_sw, size(pade_asyice_sw), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(pade_sizereg_extliq_sw, size(pade_sizereg_extliq_sw), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(pade_sizereg_ssaliq_sw, size(pade_sizereg_ssaliq_sw), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(pade_sizereg_asyliq_sw, size(pade_sizereg_asyliq_sw), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(pade_sizereg_extice_sw, size(pade_sizereg_extice_sw), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(pade_sizereg_ssaice_sw, size(pade_sizereg_ssaice_sw), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(pade_sizereg_asyice_sw, size(pade_sizereg_asyice_sw), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(band_lims_cldy_sw, size(band_lims_cldy_sw), MPI_REAL, mpiroot, mpicomm, ierr) -!#endif -! call MPI_BARRIER(mpicomm, ierr) -! endif -!#endif + ! Close file + status = nf90_close(ncid) + endif + +#ifdef MPI + if (cld_optics_scheme .eq. 1) then + ! Wait for processor 0 to catch up... + call MPI_BARRIER(mpicomm, mpierr) + + ! Broadcast data + write (*,*) 'Broadcasting RRTMGP shortwave cloud-optics data ... ' + call MPI_BCAST(nBand, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nrghice, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nSize_liq, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nSize_ice, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(radliq_lwr, 1, MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(radliq_upr, 1, MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(radliq_fac, 1, MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(radice_lwr, 1, MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(radice_upr, 1, MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(radice_fac, 1, MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(lut_extliq, size(lut_extliq), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(lut_ssaliq, size(lut_ssaliq), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(lut_asyliq, size(lut_asyliq), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(lut_extice, size(lut_extice), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(lut_ssaice, size(lut_ssaice), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(lut_asyice, size(lut_asyice), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(band_lims, size(band_lims), MPI_REAL, mpiroot, mpicomm, mpierr) + + ! Don't advance until data broadcast complete on all processors + call MPI_BARRIER(mpicomm, mpierr) + endif + if (cld_optics_scheme .eq. 2) then + ! Wait for processor 0 to catch up... + call MPI_BARRIER(mpicomm, mpierr) + + ! Broadcast data + write (*,*) 'Broadcasting RRTMGP shortwave cloud-optics data ... ' + call MPI_BCAST(nBand, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nrghice, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nSizeReg, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nCoeff_ext, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nCoeff_ssa_g, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nBound, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(pade_extliq, size(pade_extliq), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(pade_ssaliq, size(pade_ssaliq), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(pade_asyliq, size(pade_asyliq), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(pade_extice, size(pade_extice), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(pade_ssaice, size(pade_ssaice), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(pade_asyice, size(pade_asyice), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(pade_sizereg_extliq, size(pade_sizereg_extliq), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(pade_sizereg_ssaliq, size(pade_sizereg_ssaliq), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(pade_sizereg_asyliq, size(pade_sizereg_asyliq), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(pade_sizereg_extice, size(pade_sizereg_extice), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(pade_sizereg_ssaice, size(pade_sizereg_ssaice), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(pade_sizereg_asyice, size(pade_sizereg_asyice), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(band_lims, size(band_lims), MPI_REAL, mpiroot, mpicomm, mpierr) + + ! Don't advance until data broadcast complete on all processors + call MPI_BARRIER(mpicomm, mpierr) + endif +#endif ! Load tables data for RRTMGP cloud-optics if (cld_optics_scheme .eq. 1) then call check_error_msg('sw_cloud_optics_init',sw_cloud_props%set_ice_roughness(nrghice)) - call check_error_msg('sw_cloud_optics_init',sw_cloud_props%load(band_lims_cldy_sw, & - radliq_lwr_sw, radliq_upr_sw, radliq_fac_sw, radice_lwr_sw, radice_upr_sw, & - radice_fac_sw, lut_extliq_sw, lut_ssaliq_sw, lut_asyliq_sw, lut_extice_sw, & - lut_ssaice_sw, lut_asyice_sw)) + call check_error_msg('sw_cloud_optics_init',sw_cloud_props%load(band_lims, & + radliq_lwr, radliq_upr, radliq_fac, radice_lwr, radice_upr, radice_fac, & + lut_extliq, lut_ssaliq, lut_asyliq, lut_extice, lut_ssaice, lut_asyice)) endif if (cld_optics_scheme .eq. 2) then call check_error_msg('sw_cloud_optics_init',sw_cloud_props%set_ice_roughness(nrghice)) - call check_error_msg('sw_cloud_optics_init', sw_cloud_props%load(band_lims_cldy_sw, & - pade_extliq_sw, pade_ssaliq_sw, pade_asyliq_sw, pade_extice_sw, pade_ssaice_sw, & - pade_asyice_sw, pade_sizereg_extliq_sw, pade_sizereg_ssaliq_sw, & - pade_sizereg_asyliq_sw, pade_sizereg_extice_sw, pade_sizereg_ssaice_sw, & - pade_sizereg_asyice_sw)) + call check_error_msg('sw_cloud_optics_init', sw_cloud_props%load(band_lims, & + pade_extliq, pade_ssaliq, pade_asyliq, pade_extice, pade_ssaice, pade_asyice,& + pade_sizereg_extliq, pade_sizereg_ssaliq, pade_sizereg_asyliq, & + pade_sizereg_extice, pade_sizereg_ssaice, pade_sizereg_asyice)) endif end subroutine rrtmgp_sw_cloud_optics_init diff --git a/physics/rrtmgp_sw_cloud_optics.meta b/physics/rrtmgp_sw_cloud_optics.meta index e9450eb77..c60ae90d6 100644 --- a/physics/rrtmgp_sw_cloud_optics.meta +++ b/physics/rrtmgp_sw_cloud_optics.meta @@ -15,7 +15,7 @@ units = count dimensions = () type = integer - intent = in + intent = inout optional = F [rrtmgp_root_dir] standard_name = directory_for_rte_rrtmgp_source_code diff --git a/physics/rrtmgp_sw_gas_optics.F90 b/physics/rrtmgp_sw_gas_optics.F90 index fc6e804cb..1b1ca8409 100644 --- a/physics/rrtmgp_sw_gas_optics.F90 +++ b/physics/rrtmgp_sw_gas_optics.F90 @@ -8,6 +8,9 @@ module rrtmgp_sw_gas_optics use mo_optical_props, only: ty_optical_props_2str use mo_compute_bc, only: compute_bc use netcdf +#ifdef MPI + use mpi +#endif contains @@ -19,10 +22,6 @@ module rrtmgp_sw_gas_optics !! subroutine rrtmgp_sw_gas_optics_init(rrtmgp_root_dir, rrtmgp_sw_file_gas, rrtmgp_nGases, & active_gases_array, mpicomm, mpirank, mpiroot, sw_gas_props, errmsg, errflg) - use netcdf -#ifdef MPI - use mpi -#endif ! Inputs character(len=128),intent(in) :: & @@ -49,348 +48,284 @@ subroutine rrtmgp_sw_gas_optics_init(rrtmgp_root_dir, rrtmgp_sw_file_gas, rrtmgp type(ty_gas_concs) :: & gas_concentrations integer, dimension(:), allocatable :: & - kminor_start_lower_sw, & ! Starting index in the [1, nContributors] vector for a contributor - ! given by \"minor_gases_lower\" (lower atmosphere) - kminor_start_upper_sw ! Starting index in the [1, nContributors] vector for a contributor - ! given by \"minor_gases_upper\" (upper atmosphere) + kminor_start_lower, & ! Starting index in the [1, nContributors] vector for a contributor + ! given by \"minor_gases_lower\" (lower atmosphere) + kminor_start_upper ! Starting index in the [1, nContributors] vector for a contributor + ! given by \"minor_gases_upper\" (upper atmosphere) integer, dimension(:,:), allocatable :: & - band2gpt_sw, & ! Beginning and ending gpoint for each band - minor_limits_gpt_lower_sw, & ! Beginning and ending gpoint for each minor interval in lower atmosphere - minor_limits_gpt_upper_sw ! Beginning and ending gpoint for each minor interval in upper atmosphere + band2gpt, & ! Beginning and ending gpoint for each band + minor_limits_gpt_lower, & ! Beginning and ending gpoint for each minor interval in lower atmosphere + minor_limits_gpt_upper ! Beginning and ending gpoint for each minor interval in upper atmosphere integer, dimension(:,:,:), allocatable :: & - key_species_sw ! Key species pair for each band + key_species ! Key species pair for each band real(kind_phys) :: & - press_ref_trop_sw, & ! Reference pressure separating the lower and upper atmosphere [Pa] - temp_ref_p_sw, & ! Standard spectroscopic reference pressure [Pa] - temp_ref_t_sw ! Standard spectroscopic reference temperature [K] + press_ref_trop, & ! Reference pressure separating the lower and upper atmosphere [Pa] + temp_ref_p, & ! Standard spectroscopic reference pressure [Pa] + temp_ref_t ! Standard spectroscopic reference temperature [K] real(kind_phys), dimension(:), allocatable :: & - press_ref_sw, & ! Pressures for reference atmosphere; press_ref(# reference layers) [Pa] - temp_ref_sw, & ! Temperatures for reference atmosphere; temp_ref(# reference layers) [K] - solar_source_sw ! Stored solar source function from original RRTM + press_ref, & ! Pressures for reference atmosphere; press_ref(# reference layers) [Pa] + temp_ref, & ! Temperatures for reference atmosphere; temp_ref(# reference layers) [K] + solar_source ! Stored solar source function from original RRTM real(kind_phys), dimension(:,:), allocatable :: & - band_lims_sw ! Beginning and ending wavenumber [cm -1] for each band + band_lims ! Beginning and ending wavenumber [cm -1] for each band real(kind_phys), dimension(:,:,:), allocatable :: & - vmr_ref_sw, & ! Volume mixing ratios for reference atmosphere - kminor_lower_sw, & ! (transformed from [nTemp x nEta x nGpt x nAbsorbers] array to - ! [nTemp x nEta x nContributors] array) - kminor_upper_sw, & ! (transformed from [nTemp x nEta x nGpt x nAbsorbers] array to - ! [nTemp x nEta x nContributors] array) - rayl_lower_sw, & ! Stored coefficients due to rayleigh scattering contribution - rayl_upper_sw ! Stored coefficients due to rayleigh scattering contribution + vmr_ref, & ! Volume mixing ratios for reference atmosphere + kminor_lower, & ! (transformed from [nTemp x nEta x nGpt x nAbsorbers] array to + ! [nTemp x nEta x nContributors] array) + kminor_upper, & ! (transformed from [nTemp x nEta x nGpt x nAbsorbers] array to + ! [nTemp x nEta x nContributors] array) + rayl_lower, & ! Stored coefficients due to rayleigh scattering contribution + rayl_upper ! Stored coefficients due to rayleigh scattering contribution real(kind_phys), dimension(:,:,:,:), allocatable :: & - kmajor_sw ! Stored absorption coefficients due to major absorbing gases + kmajor ! Stored absorption coefficients due to major absorbing gases character(len=32), dimension(:), allocatable :: & - gas_names_sw, & ! Names of absorbing gases - gas_minor_sw, & ! Name of absorbing minor gas - identifier_minor_sw, & ! Unique string identifying minor gas - minor_gases_lower_sw, & ! Names of minor absorbing gases in lower atmosphere - minor_gases_upper_sw, & ! Names of minor absorbing gases in upper atmosphere - scaling_gas_lower_sw, & ! Absorption also depends on the concentration of this gas - scaling_gas_upper_sw ! Absorption also depends on the concentration of this gas + gas_names, & ! Names of absorbing gases + gas_minor, & ! Name of absorbing minor gas + identifier_minor, & ! Unique string identifying minor gas + minor_gases_lower, & ! Names of minor absorbing gases in lower atmosphere + minor_gases_upper, & ! Names of minor absorbing gases in upper atmosphere + scaling_gas_lower, & ! Absorption also depends on the concentration of this gas + scaling_gas_upper ! Absorption also depends on the concentration of this gas logical(wl), dimension(:), allocatable :: & - minor_scales_with_density_lower_sw, & ! Density scaling is applied to minor absorption coefficients - minor_scales_with_density_upper_sw, & ! Density scaling is applied to minor absorption coefficients - scale_by_complement_lower_sw, & ! Absorption is scaled by concentration of scaling_gas (F) or its complement (T) - scale_by_complement_upper_sw ! Absorption is scaled by concentration of scaling_gas (F) or its complement (T) + minor_scales_with_density_lower, & ! Density scaling is applied to minor absorption coefficients + minor_scales_with_density_upper, & ! Density scaling is applied to minor absorption coefficients + scale_by_complement_lower, & ! Absorption is scaled by concentration of scaling_gas (F) or its complement (T) + scale_by_complement_upper ! Absorption is scaled by concentration of scaling_gas (F) or its complement (T) ! Dimensions integer :: & - ntemps_sw, npress_sw, ngpts_sw, nabsorbers_sw, nextrabsorbers_sw, & - nminorabsorbers_sw, nmixingfracs_sw, nlayers_sw, nbnds_sw, npairs_sw, & - nminor_absorber_intervals_lower_sw, nminor_absorber_intervals_upper_sw, & - ncontributors_lower_sw, ncontributors_upper_sw + ntemps, npress, ngpts, nabsorbers, nextrabsorbers, & + nminorabsorbers, nmixingfracs, nlayers, nbnds, npairs, & + nminor_absorber_intervals_lower, nminor_absorber_intervals_upper, & + ncontributors_lower, ncontributors_upper ! Local variables - integer :: status, ncid_sw, dimid, varID, iGas + integer :: status, ncid, dimid, varID, iGas integer,dimension(:),allocatable :: temp1, temp2, temp3, temp4 character(len=264) :: sw_gas_props_file #ifdef MPI - integer :: ierr + integer :: mpierr #endif ! Initialize errmsg = '' errflg = 0 + write(*,"(a52,3i20)") 'rrtmgp_sw_gas_optics.F90:_init(): RRTMGP MPI ranks: ',mpirank,mpiroot,mpicomm + ! Filenames are set in the gphysics_nml sw_gas_props_file = trim(rrtmgp_root_dir)//trim(rrtmgp_sw_file_gas) ! Read dimensions for k-distribution fields (only on master processor(0)) -! if (mpirank .eq. mpiroot) then - if(nf90_open(trim(sw_gas_props_file), NF90_WRITE, ncid_sw) .eq. NF90_NOERR) then - status = nf90_inq_dimid(ncid_sw, 'temperature', dimid) - status = nf90_inquire_dimension(ncid_sw, dimid, len=ntemps_sw) - status = nf90_inq_dimid(ncid_sw, 'pressure', dimid) - status = nf90_inquire_dimension(ncid_sw, dimid, len=npress_sw) - status = nf90_inq_dimid(ncid_sw, 'absorber', dimid) - status = nf90_inquire_dimension(ncid_sw, dimid, len=nabsorbers_sw) - status = nf90_inq_dimid(ncid_sw, 'minor_absorber', dimid) - status = nf90_inquire_dimension(ncid_sw, dimid, len=nminorabsorbers_sw) - status = nf90_inq_dimid(ncid_sw, 'absorber_ext', dimid) - status = nf90_inquire_dimension(ncid_sw, dimid, len=nextrabsorbers_sw) - status = nf90_inq_dimid(ncid_sw, 'mixing_fraction', dimid) - status = nf90_inquire_dimension(ncid_sw, dimid, len=nmixingfracs_sw) - status = nf90_inq_dimid(ncid_sw, 'atmos_layer', dimid) - status = nf90_inquire_dimension(ncid_sw, dimid, len=nlayers_sw) - status = nf90_inq_dimid(ncid_sw, 'bnd', dimid) - status = nf90_inquire_dimension(ncid_sw, dimid, len=nbnds_sw) - status = nf90_inq_dimid(ncid_sw, 'gpt', dimid) - status = nf90_inquire_dimension(ncid_sw, dimid, len=ngpts_sw) - status = nf90_inq_dimid(ncid_sw, 'pair', dimid) - status = nf90_inquire_dimension(ncid_sw, dimid, len=npairs_sw) - status = nf90_inq_dimid(ncid_sw, 'contributors_lower', dimid) - status = nf90_inquire_dimension(ncid_sw, dimid, len=ncontributors_lower_sw) - status = nf90_inq_dimid(ncid_sw, 'contributors_upper', dimid) - status = nf90_inquire_dimension(ncid_sw, dimid, len=ncontributors_upper_sw) - status = nf90_inq_dimid(ncid_sw, 'minor_absorber_intervals_lower', dimid) - status = nf90_inquire_dimension(ncid_sw, dimid, len=nminor_absorber_intervals_lower_sw) - status = nf90_inq_dimid(ncid_sw, 'minor_absorber_intervals_upper', dimid) - status = nf90_inquire_dimension(ncid_sw, dimid, len=nminor_absorber_intervals_upper_sw) - status = nf90_close(ncid_sw) - endif -! endif - - ! Broadcast dimensions to all processors -!#ifdef MPI -! call MPI_BARRIER(mpicomm, ierr) -! call MPI_BCAST(ntemps_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(npress_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(nabsorbers_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(nminorabsorbers_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(nextrabsorbers_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(nmixingfracs_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(nlayers_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(nbnds_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(ngpts_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(npairs_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(ncontributors_lower_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(ncontributors_upper_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(nminor_absorber_intervals_lower_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(nminor_absorber_intervals_upper_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BARRIER(mpicomm, ierr) -!#endif + if (mpirank .eq. mpiroot) then + ! Open file + status = nf90_open(trim(sw_gas_props_file), NF90_WRITE, ncid) - ! Allocate space for arrays - allocate(gas_names_sw(nabsorbers_sw)) - allocate(scaling_gas_lower_sw(nminor_absorber_intervals_lower_sw)) - allocate(scaling_gas_upper_sw(nminor_absorber_intervals_upper_sw)) - allocate(gas_minor_sw(nminorabsorbers_sw)) - allocate(identifier_minor_sw(nminorabsorbers_sw)) - allocate(minor_gases_lower_sw(nminor_absorber_intervals_lower_sw)) - allocate(minor_gases_upper_sw(nminor_absorber_intervals_upper_sw)) - allocate(minor_limits_gpt_lower_sw(npairs_sw,nminor_absorber_intervals_lower_sw)) - allocate(minor_limits_gpt_upper_sw(npairs_sw,nminor_absorber_intervals_upper_sw)) - allocate(band2gpt_sw(2,nbnds_sw)) - allocate(key_species_sw(2,nlayers_sw,nbnds_sw)) - allocate(band_lims_sw(2,nbnds_sw)) - allocate(press_ref_sw(npress_sw)) - allocate(temp_ref_sw(ntemps_sw)) - allocate(vmr_ref_sw(nlayers_sw, nextrabsorbers_sw, ntemps_sw)) - allocate(kminor_lower_sw(ncontributors_lower_sw, nmixingfracs_sw, ntemps_sw)) - allocate(kmajor_sw(ngpts_sw, nmixingfracs_sw, npress_sw+1, ntemps_sw)) - allocate(kminor_start_lower_sw(nminor_absorber_intervals_lower_sw)) - allocate(kminor_upper_sw(ncontributors_upper_sw, nmixingfracs_sw, ntemps_sw)) - allocate(kminor_start_upper_sw(nminor_absorber_intervals_upper_sw)) - allocate(minor_scales_with_density_lower_sw(nminor_absorber_intervals_lower_sw)) - allocate(minor_scales_with_density_upper_sw(nminor_absorber_intervals_upper_sw)) - allocate(scale_by_complement_lower_sw(nminor_absorber_intervals_lower_sw)) - allocate(scale_by_complement_upper_sw(nminor_absorber_intervals_upper_sw)) - allocate(rayl_upper_sw(ngpts_sw, nmixingfracs_sw, ntemps_sw)) - allocate(rayl_lower_sw(ngpts_sw, nmixingfracs_sw, ntemps_sw)) - allocate(solar_source_sw(ngpts_sw)) - allocate(temp1(nminor_absorber_intervals_lower_sw)) - allocate(temp2(nminor_absorber_intervals_upper_sw)) - allocate(temp3(nminor_absorber_intervals_lower_sw)) - allocate(temp4(nminor_absorber_intervals_upper_sw)) + ! Read dimensions for k-distribution fields + status = nf90_inq_dimid(ncid, 'temperature', dimid) + status = nf90_inquire_dimension(ncid, dimid, len=ntemps) + status = nf90_inq_dimid(ncid, 'pressure', dimid) + status = nf90_inquire_dimension(ncid, dimid, len=npress) + status = nf90_inq_dimid(ncid, 'absorber', dimid) + status = nf90_inquire_dimension(ncid, dimid, len=nabsorbers) + status = nf90_inq_dimid(ncid, 'minor_absorber',dimid) + status = nf90_inquire_dimension(ncid, dimid, len=nminorabsorbers) + status = nf90_inq_dimid(ncid, 'absorber_ext', dimid) + status = nf90_inquire_dimension(ncid, dimid, len=nextrabsorbers) + status = nf90_inq_dimid(ncid, 'mixing_fraction', dimid) + status = nf90_inquire_dimension(ncid, dimid, len=nmixingfracs) + status = nf90_inq_dimid(ncid, 'atmos_layer', dimid) + status = nf90_inquire_dimension(ncid, dimid, len=nlayers) + status = nf90_inq_dimid(ncid, 'bnd', dimid) + status = nf90_inquire_dimension(ncid, dimid, len=nbnds) + status = nf90_inq_dimid(ncid, 'gpt', dimid) + status = nf90_inquire_dimension(ncid, dimid, len=ngpts) + status = nf90_inq_dimid(ncid, 'pair', dimid) + status = nf90_inquire_dimension(ncid, dimid, len=npairs) + status = nf90_inq_dimid(ncid, 'contributors_lower',dimid) + status = nf90_inquire_dimension(ncid, dimid, len=ncontributors_lower) + status = nf90_inq_dimid(ncid, 'contributors_upper', dimid) + status = nf90_inquire_dimension(ncid, dimid, len=ncontributors_upper) + status = nf90_inq_dimid(ncid, 'minor_absorber_intervals_lower', dimid) + status = nf90_inquire_dimension(ncid, dimid, len=nminor_absorber_intervals_lower) + status = nf90_inq_dimid(ncid, 'minor_absorber_intervals_upper', dimid) + status = nf90_inquire_dimension(ncid, dimid, len=nminor_absorber_intervals_upper) + + ! Allocate space for arrays + allocate(gas_names(nabsorbers)) + allocate(scaling_gas_lower(nminor_absorber_intervals_lower)) + allocate(scaling_gas_upper(nminor_absorber_intervals_upper)) + allocate(gas_minor(nminorabsorbers)) + allocate(identifier_minor(nminorabsorbers)) + allocate(minor_gases_lower(nminor_absorber_intervals_lower)) + allocate(minor_gases_upper(nminor_absorber_intervals_upper)) + allocate(minor_limits_gpt_lower(npairs,nminor_absorber_intervals_lower)) + allocate(minor_limits_gpt_upper(npairs,nminor_absorber_intervals_upper)) + allocate(band2gpt(2,nbnds)) + allocate(key_species(2,nlayers,nbnds)) + allocate(band_lims(2,nbnds)) + allocate(press_ref(npress)) + allocate(temp_ref(ntemps)) + allocate(vmr_ref(nlayers, nextrabsorbers, ntemps)) + allocate(kminor_lower(ncontributors_lower, nmixingfracs, ntemps)) + allocate(kmajor(ngpts, nmixingfracs, npress+1, ntemps)) + allocate(kminor_start_lower(nminor_absorber_intervals_lower)) + allocate(kminor_upper(ncontributors_upper, nmixingfracs, ntemps)) + allocate(kminor_start_upper(nminor_absorber_intervals_upper)) + allocate(minor_scales_with_density_lower(nminor_absorber_intervals_lower)) + allocate(minor_scales_with_density_upper(nminor_absorber_intervals_upper)) + allocate(scale_by_complement_lower(nminor_absorber_intervals_lower)) + allocate(scale_by_complement_upper(nminor_absorber_intervals_upper)) + allocate(rayl_upper(ngpts, nmixingfracs, ntemps)) + allocate(rayl_lower(ngpts, nmixingfracs, ntemps)) + allocate(solar_source(ngpts)) + allocate(temp1(nminor_absorber_intervals_lower)) + allocate(temp2(nminor_absorber_intervals_upper)) + allocate(temp3(nminor_absorber_intervals_lower)) + allocate(temp4(nminor_absorber_intervals_upper)) - ! On master processor, read in fields, broadcast to all processors -! if (mpirank .eq. mpiroot) then - write (*,*) 'Reading RRTMGP shortwave k-distribution data ... ' ! Read in fields from file - if(nf90_open(trim(sw_gas_props_file), NF90_WRITE, ncid_sw) .eq. NF90_NOERR) then - status = nf90_inq_varid(ncid_sw,'gas_names',varID) - status = nf90_get_var(ncid_sw,varID,gas_names_sw) - ! - status = nf90_inq_varid(ncid_sw,'scaling_gas_lower',varID) - status = nf90_get_var(ncid_sw,varID,scaling_gas_lower_sw) - ! - status = nf90_inq_varid(ncid_sw,'scaling_gas_upper',varID) - status = nf90_get_var(ncid_sw,varID,scaling_gas_upper_sw) - ! - status = nf90_inq_varid(ncid_sw,'gas_minor',varID) - status = nf90_get_var(ncid_sw,varID,gas_minor_sw) - ! - status = nf90_inq_varid(ncid_sw,'identifier_minor',varID) - status = nf90_get_var(ncid_sw,varID,identifier_minor_sw) - ! - status = nf90_inq_varid(ncid_sw,'minor_gases_lower',varID) - status = nf90_get_var(ncid_sw,varID,minor_gases_lower_sw) - ! - status = nf90_inq_varid(ncid_sw,'minor_gases_upper',varID) - status = nf90_get_var(ncid_sw,varID,minor_gases_upper_sw) - ! - status = nf90_inq_varid(ncid_sw,'minor_limits_gpt_lower',varID) - status = nf90_get_var(ncid_sw,varID,minor_limits_gpt_lower_sw) - ! - status = nf90_inq_varid(ncid_sw,'minor_limits_gpt_upper',varID) - status = nf90_get_var(ncid_sw,varID,minor_limits_gpt_upper_sw) - ! - status = nf90_inq_varid(ncid_sw,'bnd_limits_gpt',varID) - status = nf90_get_var(ncid_sw,varID,band2gpt_sw) - ! - status = nf90_inq_varid(ncid_sw,'key_species',varID) - status = nf90_get_var(ncid_sw,varID,key_species_sw) - ! - status = nf90_inq_varid(ncid_sw,'bnd_limits_wavenumber',varID) - status = nf90_get_var(ncid_sw,varID,band_lims_sw) - ! - status = nf90_inq_varid(ncid_sw,'press_ref',varID) - status = nf90_get_var(ncid_sw,varID,press_ref_sw) - ! - status = nf90_inq_varid(ncid_sw,'temp_ref',varID) - status = nf90_get_var(ncid_sw,varID,temp_ref_sw) - ! - status = nf90_inq_varid(ncid_sw,'absorption_coefficient_ref_P',varID) - status = nf90_get_var(ncid_sw,varID,temp_ref_p_sw) - ! - status = nf90_inq_varid(ncid_sw,'absorption_coefficient_ref_T',varID) - status = nf90_get_var(ncid_sw,varID,temp_ref_t_sw) - ! - status = nf90_inq_varid(ncid_sw,'press_ref_trop',varID) - status = nf90_get_var(ncid_sw,varID,press_ref_trop_sw) - ! - status = nf90_inq_varid(ncid_sw,'kminor_lower',varID) - status = nf90_get_var(ncid_sw,varID,kminor_lower_sw) - ! - status = nf90_inq_varid(ncid_sw,'kminor_upper',varID) - status = nf90_get_var(ncid_sw,varID,kminor_upper_sw) - ! - status = nf90_inq_varid(ncid_sw,'vmr_ref',varID) - status = nf90_get_var(ncid_sw,varID,vmr_ref_sw) - ! - status = nf90_inq_varid(ncid_sw,'kmajor',varID) - status = nf90_get_var(ncid_sw,varID,kmajor_sw) - ! - status = nf90_inq_varid(ncid_sw,'kminor_start_lower',varID) - status = nf90_get_var(ncid_sw,varID,kminor_start_lower_sw) - ! - status = nf90_inq_varid(ncid_sw,'kminor_start_upper',varID) - status = nf90_get_var(ncid_sw,varID,kminor_start_upper_sw) - ! - status = nf90_inq_varid(ncid_sw,'solar_source',varID) - status = nf90_get_var(ncid_sw,varID,solar_source_sw) - ! - status = nf90_inq_varid(ncid_sw,'rayl_lower',varID) - status = nf90_get_var(ncid_sw,varID,rayl_lower_sw) - - status = nf90_inq_varid(ncid_sw,'rayl_upper',varID) - status = nf90_get_var(ncid_sw,varID,rayl_upper_sw) + write (*,*) 'Reading RRTMGP shortwave k-distribution data ... ' + status = nf90_inq_varid(ncid, 'gas_names', varID) + status = nf90_get_var( ncid, varID, gas_names) + status = nf90_inq_varid(ncid, 'scaling_gas_lower', varID) + status = nf90_get_var( ncid, varID, scaling_gas_lower) + status = nf90_inq_varid(ncid, 'scaling_gas_upper', varID) + status = nf90_get_var( ncid, varID, scaling_gas_upper) + status = nf90_inq_varid(ncid, 'gas_minor', varID) + status = nf90_get_var( ncid, varID, gas_minor) + status = nf90_inq_varid(ncid, 'identifier_minor', varID) + status = nf90_get_var( ncid, varID, identifier_minor) + status = nf90_inq_varid(ncid, 'minor_gases_lower', varID) + status = nf90_get_var( ncid, varID, minor_gases_lower) + status = nf90_inq_varid(ncid, 'minor_gases_upper', varID) + status = nf90_get_var( ncid, varID, minor_gases_upper) + status = nf90_inq_varid(ncid, 'minor_limits_gpt_lower', varID) + status = nf90_get_var( ncid, varID, minor_limits_gpt_lower) + status = nf90_inq_varid(ncid, 'minor_limits_gpt_upper', varID) + status = nf90_get_var( ncid, varID, minor_limits_gpt_upper) + status = nf90_inq_varid(ncid, 'bnd_limits_gpt', varID) + status = nf90_get_var( ncid, varID, band2gpt) + status = nf90_inq_varid(ncid, 'key_species', varID) + status = nf90_get_var( ncid, varID, key_species) + status = nf90_inq_varid(ncid,'bnd_limits_wavenumber', varID) + status = nf90_get_var( ncid, varID, band_lims) + status = nf90_inq_varid(ncid, 'press_ref', varID) + status = nf90_get_var( ncid, varID, press_ref) + status = nf90_inq_varid(ncid, 'temp_ref', varID) + status = nf90_get_var( ncid, varID, temp_ref) + status = nf90_inq_varid(ncid, 'absorption_coefficient_ref_P', varID) + status = nf90_get_var( ncid, varID, temp_ref_p) + status = nf90_inq_varid(ncid, 'absorption_coefficient_ref_T', varID) + status = nf90_get_var( ncid, varID, temp_ref_t) + status = nf90_inq_varid(ncid, 'press_ref_trop', varID) + status = nf90_get_var( ncid, varID, press_ref_trop) + status = nf90_inq_varid(ncid, 'kminor_lower', varID) + status = nf90_get_var( ncid, varID, kminor_lower) + status = nf90_inq_varid(ncid, 'kminor_upper', varID) + status = nf90_get_var( ncid, varID, kminor_upper) + status = nf90_inq_varid(ncid, 'vmr_ref', varID) + status = nf90_get_var( ncid, varID, vmr_ref) + status = nf90_inq_varid(ncid, 'kmajor', varID) + status = nf90_get_var( ncid, varID, kmajor) + status = nf90_inq_varid(ncid, 'kminor_start_lower', varID) + status = nf90_get_var( ncid, varID, kminor_start_lower) + status = nf90_inq_varid(ncid, 'kminor_start_upper', varID) + status = nf90_get_var( ncid, varID, kminor_start_upper) + status = nf90_inq_varid(ncid, 'solar_source', varID) + status = nf90_get_var( ncid, varID, solar_source) + status = nf90_inq_varid(ncid, 'rayl_lower', varID) + status = nf90_get_var( ncid, varID, rayl_lower) + status = nf90_inq_varid(ncid, 'rayl_upper', varID) + status = nf90_get_var( ncid, varID, rayl_upper) - ! Logical fields are read in as integers and then converted to logicals. - status = nf90_inq_varid(ncid_sw,'minor_scales_with_density_lower',varID) - status = nf90_get_var(ncid_sw,varID,temp1) - minor_scales_with_density_lower_sw(:) = .false. - where(temp1 .eq. 1) minor_scales_with_density_lower_sw(:) = .true. - ! - status = nf90_inq_varid(ncid_sw,'minor_scales_with_density_upper',varID) - status = nf90_get_var(ncid_sw,varID,temp2) - minor_scales_with_density_upper_sw(:) = .false. - where(temp2 .eq. 1) minor_scales_with_density_upper_sw(:) = .true. - ! - status = nf90_inq_varid(ncid_sw,'scale_by_complement_lower',varID) - status = nf90_get_var(ncid_sw,varID,temp3) - scale_by_complement_lower_sw(:) = .false. - where(temp3 .eq. 1) scale_by_complement_lower_sw(:) = .true. - ! - status = nf90_inq_varid(ncid_sw,'scale_by_complement_upper',varID) - status = nf90_get_var(ncid_sw,varID,temp4) - scale_by_complement_upper_sw(:) = .false. - where(temp4 .eq. 1) scale_by_complement_upper_sw(:) = .true. - - ! Close - status = nf90_close(ncid_sw) - endif -! endif + ! Logical fields are read in as integers and then converted to logicals. + status = nf90_inq_varid(ncid,'minor_scales_with_density_lower', varID) + status = nf90_get_var( ncid, varID,temp1) + minor_scales_with_density_lower(:) = .false. + where(temp1 .eq. 1) minor_scales_with_density_lower(:) = .true. + status = nf90_inq_varid(ncid,'minor_scales_with_density_upper', varID) + status = nf90_get_var( ncid, varID,temp2) + minor_scales_with_density_upper(:) = .false. + where(temp2 .eq. 1) minor_scales_with_density_upper(:) = .true. + status = nf90_inq_varid(ncid,'scale_by_complement_lower', varID) + status = nf90_get_var( ncid, varID,temp3) + scale_by_complement_lower(:) = .false. + where(temp3 .eq. 1) scale_by_complement_lower(:) = .true. + status = nf90_inq_varid(ncid,'scale_by_complement_upper', varID) + status = nf90_get_var( ncid, varID,temp4) + scale_by_complement_upper(:) = .false. + where(temp4 .eq. 1) scale_by_complement_upper(:) = .true. + + ! Close + status = nf90_close(ncid) + endif - ! Broadcast arrays to all processors -!#ifdef MPI -! call MPI_BARRIER(mpicomm, ierr) -! if (mpirank==mpiroot) write (*,*) 'Broadcasting RRTMGP shortwave k-distribution data ... ' -! call MPI_BCAST(minor_limits_gpt_upper_sw, size(minor_limits_gpt_upper_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(minor_limits_gpt_lower_sw, size(minor_limits_gpt_lower_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(kminor_start_upper_sw, size(kminor_start_upper_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(kminor_start_lower_sw, size(kminor_start_lower_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(key_species_sw, size(key_species_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) -! call MPI_BCAST(band2gpt_sw, size(band2gpt_sw), MPI_INTEGER, mpiroot, mpicomm, ierr) -!#ifndef SINGLE_PREC -! call MPI_BCAST(band_lims_sw, size(band_lims_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(press_ref_sw, size(press_ref_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(temp_ref_sw, size(temp_ref_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(kminor_lower_sw, size(kminor_lower_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(kminor_upper_sw, size(kminor_upper_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(scaling_gas_lower_sw, size(scaling_gas_lower_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(scaling_gas_upper_sw, size(scaling_gas_upper_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(vmr_ref_sw, size(vmr_ref_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(kmajor_sw, size(kmajor_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(temp_ref_p_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(temp_ref_t_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(press_ref_trop_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(solar_source_sw, size(solar_source_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(rayl_lower_sw, size(rayl_lower_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -! call MPI_BCAST(rayl_upper_sw, size(rayl_upper_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) -!#else -! call MPI_BCAST(band_lims_sw, size(band_lims_sw), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(press_ref_sw, size(press_ref_sw), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(temp_ref_sw, size(temp_ref_sw), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(kminor_lower_sw, size(kminor_lower_sw), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(kminor_upper_sw, size(kminor_upper_sw), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(scaling_gas_lower_sw, size(scaling_gas_lower_sw), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(scaling_gas_upper_sw, size(scaling_gas_upper_sw), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(vmr_ref_sw, size(vmr_ref_sw), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(kmajor_sw, size(kmajor_sw), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(temp_ref_p_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(temp_ref_t_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(press_ref_trop_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(solar_source_sw, size(solar_source_sw), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(rayl_lower_sw, size(rayl_lower_sw), MPI_REAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(rayl_upper_sw, size(rayl_upper_sw), MPI_REAL, mpiroot, mpicomm, ierr) -!#endif -! ! Character arrays -! do ij=1,nabsorbers_sw -! call MPI_BCAST(gas_names_sw(ij), len(gas_names_sw(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) -! enddo -! do ij=1,nminorabsorbers_sw -! call MPI_BCAST(gas_minor_sw(ij), len(gas_minor_sw(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) -! call MPI_BCAST(identifier_minor_sw(ij), len(identifier_minor_sw(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) -! enddo -! do ij=1,nminor_absorber_intervals_lower_sw -! call MPI_BCAST(minor_gases_lower_sw(ij), len(minor_gases_lower_sw(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) -! enddo -! do ij=1,nminor_absorber_intervals_upper_sw -! call MPI_BCAST(minor_gases_upper_sw(ij), len(minor_gases_upper_sw(ij)), MPI_CHAR, mpiroot, mpicomm, ierr) -! enddo -! -! ! Logical arrays -! call MPI_BCAST(minor_scales_with_density_lower_sw, nminor_absorber_intervals_lower_sw, MPI_LOGICAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(scale_by_complement_lower_sw, nminor_absorber_intervals_lower_sw, MPI_LOGICAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(minor_scales_with_density_upper_sw, nminor_absorber_intervals_upper_sw, MPI_LOGICAL, mpiroot, mpicomm, ierr) -! call MPI_BCAST(scale_by_complement_upper_sw, nminor_absorber_intervals_upper_sw, MPI_LOGICAL, mpiroot, mpicomm, ierr) -! call MPI_BARRIER(mpicomm, ierr) -!#endif +#ifdef MPI + ! Wait for processor 0 to catch up... + call MPI_BARRIER(mpicomm, mpierr) + + ! Broadcast data + write (*,*) 'Broadcasting RRTMGP shortwave k-distribution data ... ' + call MPI_BCAST(ntemps, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(npress, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nminorabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nextrabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nmixingfracs, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nlayers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nbnds, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(ngpts, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(npairs, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(ncontributors_lower, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(ncontributors_upper, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nminor_absorber_intervals_lower, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nminor_absorber_intervals_upper, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(minor_limits_gpt_upper, size(minor_limits_gpt_upper), MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(minor_limits_gpt_lower, size(minor_limits_gpt_lower), MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(kminor_start_upper, size(kminor_start_upper), MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(kminor_start_lower, size(kminor_start_lower), MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(key_species, size(key_species), MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(band2gpt, size(band2gpt), MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(band_lims, size(band_lims), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(press_ref, size(press_ref), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(temp_ref, size(temp_ref), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(kminor_lower, size(kminor_lower), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(kminor_upper, size(kminor_upper), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(scaling_gas_lower, size(scaling_gas_lower), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(scaling_gas_upper, size(scaling_gas_upper), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(vmr_ref, size(vmr_ref), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(kmajor, size(kmajor), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(temp_ref_p, 1, MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(temp_ref_t, 1, MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(press_ref_trop, 1, MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(solar_source, size(solar_source), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(rayl_lower, size(rayl_lower), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(rayl_upper, size(rayl_upper), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(gas_names, size(gas_names), MPI_CHARACTER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(gas_minor, size(gas_minor), MPI_CHARACTER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(identifier_minor, size(identifier_minor), MPI_CHARACTER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(minor_gases_lower, size(minor_gases_lower), MPI_CHARACTER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(minor_gases_upper, size(minor_gases_upper), MPI_CHARACTER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(minor_scales_with_density_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(scale_by_complement_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(minor_scales_with_density_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(scale_by_complement_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, mpierr) + ! Don't advance until data broadcast complete on all processors + call MPI_BARRIER(mpicomm, mpierr) +#endif - ! Initialize gas concentrations and gas optics class with data + ! Initialize gas concentrations and gas optics class do iGas=1,rrtmgp_nGases call check_error_msg('sw_gas_optics_init',gas_concentrations%set_vmr(active_gases_array(iGas), 0._kind_phys)) enddo - call check_error_msg('sw_gas_optics_init',sw_gas_props%load(gas_concentrations, gas_names_sw, & - key_species_sw, band2gpt_sw, band_lims_sw, press_ref_sw, press_ref_trop_sw, temp_ref_sw, & - temp_ref_p_sw, temp_ref_t_sw, vmr_ref_sw, kmajor_sw, kminor_lower_sw, kminor_upper_sw, & - gas_minor_sw,identifier_minor_sw, minor_gases_lower_sw, minor_gases_upper_sw, & - minor_limits_gpt_lower_sw,minor_limits_gpt_upper_sw, minor_scales_with_density_lower_sw, & - minor_scales_with_density_upper_sw, scaling_gas_lower_sw, & - scaling_gas_upper_sw, scale_by_complement_lower_sw, & - scale_by_complement_upper_sw, kminor_start_lower_sw, kminor_start_upper_sw, & - solar_source_sw, rayl_lower_sw, rayl_upper_sw)) + call check_error_msg('sw_gas_optics_init',sw_gas_props%load(gas_concentrations, gas_names, & + key_species, band2gpt, band_lims, press_ref, press_ref_trop, temp_ref, temp_ref_p, & + temp_ref_t, vmr_ref, kmajor, kminor_lower, kminor_upper, gas_minor, identifier_minor, & + minor_gases_lower, minor_gases_upper, minor_limits_gpt_lower,minor_limits_gpt_upper, & + minor_scales_with_density_lower, minor_scales_with_density_upper, scaling_gas_lower, & + scaling_gas_upper, scale_by_complement_lower, scale_by_complement_upper, & + kminor_start_lower, kminor_start_upper, solar_source, rayl_lower, rayl_upper)) end subroutine rrtmgp_sw_gas_optics_init From b67bc2db8adb1e7252d0c2b3ad14ef5bc242b790 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Mon, 10 Feb 2020 16:34:52 -0700 Subject: [PATCH 143/167] Removed mpi calls during initialization. Reading data ona ll processors. Started from 3dfb4c9b21a9ac44e304ef8a593d1fa88846d49a --- physics/rrtmgp_lw_cloud_optics.F90 | 71 ++---------------------------- physics/rrtmgp_lw_gas_optics.F90 | 64 +-------------------------- physics/rrtmgp_sw_cloud_optics.F90 | 70 ++--------------------------- physics/rrtmgp_sw_gas_optics.F90 | 63 +------------------------- 4 files changed, 10 insertions(+), 258 deletions(-) diff --git a/physics/rrtmgp_lw_cloud_optics.F90 b/physics/rrtmgp_lw_cloud_optics.F90 index d12ccaa23..65408dd9e 100644 --- a/physics/rrtmgp_lw_cloud_optics.F90 +++ b/physics/rrtmgp_lw_cloud_optics.F90 @@ -7,9 +7,6 @@ module rrtmgp_lw_cloud_optics use mo_rrtmg_lw_cloud_optics, only: rrtmg_lw_cloud_optics use rrtmgp_aux, only: check_error_msg use netcdf -#ifdef MPI - use mpi -#endif public rrtmgp_lw_cloud_optics_init, rrtmgp_lw_cloud_optics_run, rrtmgp_lw_cloud_optics_finalize contains @@ -92,9 +89,6 @@ subroutine rrtmgp_lw_cloud_optics_init(cld_optics_scheme, nrghice, rrtmgp_root_d integer :: dimID,varID,status,ncid character(len=264) :: lw_cloud_props_file integer,parameter :: max_strlen=256 -#ifdef MPI - integer :: mpierr -#endif ! Initialize errmsg = '' @@ -106,7 +100,7 @@ subroutine rrtmgp_lw_cloud_optics_init(cld_optics_scheme, nrghice, rrtmgp_root_d lw_cloud_props_file = trim(rrtmgp_root_dir)//trim(rrtmgp_lw_file_clouds) ! On master processor only... - if (mpirank .eq. mpiroot) then +! if (mpirank .eq. mpiroot) then ! Open file status = nf90_open(trim(lw_cloud_props_file), NF90_WRITE, ncid) @@ -241,67 +235,8 @@ subroutine rrtmgp_lw_cloud_optics_init(cld_optics_scheme, nrghice, rrtmgp_root_d ! Close file status = nf90_close(ncid) - endif - -#ifdef MPI - if (cld_optics_scheme .eq. 1) then - ! Wait for processor 0 to catch up... - call MPI_BARRIER(mpicomm, mpierr) - - ! Broadcast data - write (*,*) 'Broadcasting RRTMGP longwave cloud-optics data ... ' - call MPI_BCAST(nBand, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nrghice, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nSize_liq, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nSize_ice, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(radliq_lwr, 1, MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(radliq_upr, 1, MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(radliq_fac, 1, MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(radice_lwr, 1, MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(radice_upr, 1, MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(radice_fac, 1, MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(lut_extliq, size(lut_extliq), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(lut_ssaliq, size(lut_ssaliq), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(lut_asyliq, size(lut_asyliq), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(lut_extice, size(lut_extice), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(lut_ssaice, size(lut_ssaice), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(lut_asyice, size(lut_asyice), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(band_lims, size(band_lims), MPI_REAL, mpiroot, mpicomm, mpierr) - - ! Don't advance until data broadcast complete on all processors - call MPI_BARRIER(mpicomm, mpierr) - endif - if (cld_optics_scheme .eq. 2) then - ! Wait for processor 0 to catch up... - call MPI_BARRIER(mpicomm, mpierr) - - ! Broadcast data - write (*,*) 'Broadcasting RRTMGP longwave cloud-optics data ... ' - call MPI_BCAST(nBand, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nrghice, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nSizeReg, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nCoeff_ext, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nCoeff_ssa_g, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nBound, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(pade_extliq, size(pade_extliq), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(pade_ssaliq, size(pade_ssaliq), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(pade_asyliq, size(pade_asyliq), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(pade_extice, size(pade_extice), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(pade_ssaice, size(pade_ssaice), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(pade_asyice, size(pade_asyice), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(pade_sizereg_extliq, size(pade_sizereg_extliq), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(pade_sizereg_ssaliq, size(pade_sizereg_ssaliq), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(pade_sizereg_asyliq, size(pade_sizereg_asyliq), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(pade_sizereg_extice, size(pade_sizereg_extice), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(pade_sizereg_ssaice, size(pade_sizereg_ssaice), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(pade_sizereg_asyice, size(pade_sizereg_asyice), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(band_lims, size(band_lims), MPI_REAL, mpiroot, mpicomm, mpierr) - - ! Don't advance until data broadcast complete on all processors - call MPI_BARRIER(mpicomm, mpierr) - endif -#endif - +! endif + ! Load tables data for RRTMGP cloud-optics if (cld_optics_scheme .eq. 1) then call check_error_msg('lw_cloud_optics_init',lw_cloud_props%set_ice_roughness(nrghice)) diff --git a/physics/rrtmgp_lw_gas_optics.F90 b/physics/rrtmgp_lw_gas_optics.F90 index 440b40242..d8b19cb57 100644 --- a/physics/rrtmgp_lw_gas_optics.F90 +++ b/physics/rrtmgp_lw_gas_optics.F90 @@ -8,9 +8,6 @@ module rrtmgp_lw_gas_optics use mo_compute_bc, only: compute_bc use rrtmgp_aux, only: check_error_msg use netcdf -#ifdef MPI - use mpi -#endif contains @@ -105,9 +102,6 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp integer,dimension(:),allocatable :: temp1, temp2, temp3, temp4, & temp_log_array1, temp_log_array2, temp_log_array3, temp_log_array4 character(len=264) :: lw_gas_props_file -#ifdef MPI - integer :: mpierr -#endif ! Initialize errmsg = '' @@ -119,7 +113,7 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp lw_gas_props_file = trim(rrtmgp_root_dir)//trim(rrtmgp_lw_file_gas) ! On master processor only... - if (mpirank .eq. mpiroot) then +! if (mpirank .eq. mpiroot) then ! Open file status = nf90_open(trim(lw_gas_props_file), NF90_WRITE, ncid) @@ -260,61 +254,7 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp ! Close file status = nf90_close(ncid) - endif - -#ifdef MPI - ! Wait for processor 0 to catch up... - call MPI_BARRIER(mpicomm, mpierr) - - ! Broadcast data - write (*,*) 'Broadcasting RRTMGP longwave k-distribution data ... ' - call MPI_BCAST(ntemps, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(npress, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nminorabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nextrabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nmixingfracs, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nlayers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nbnds, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(ngpts, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(npairs, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(ncontributors_lower, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(ncontributors_upper, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nminor_absorber_intervals_lower, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nminor_absorber_intervals_upper, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(ninternalSourcetemps, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(minor_limits_gpt_upper, size(minor_limits_gpt_upper), MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(minor_limits_gpt_lower, size(minor_limits_gpt_lower), MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(kminor_start_upper, size(kminor_start_upper), MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(kminor_start_lower, size(kminor_start_lower), MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(key_species, size(key_species), MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(band2gpt, size(band2gpt), MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(band_lims, size(band_lims), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(press_ref, size(press_ref), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(temp_ref, size(temp_ref), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(kminor_lower, size(kminor_lower), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(kminor_upper, size(kminor_upper), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(scaling_gas_lower, size(scaling_gas_lower), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(scaling_gas_upper, size(scaling_gas_upper), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(vmr_ref, size(vmr_ref), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(kmajor, size(kmajor), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(temp_ref_p, 1, MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(temp_ref_t, 1, MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(press_ref_trop, 1, MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(totplnk, size(totplnk), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(planck_frac, size(planck_frac), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(gas_names, size(gas_names), MPI_CHARACTER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(gas_minor, size(gas_minor), MPI_CHARACTER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(identifier_minor, size(identifier_minor), MPI_CHARACTER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(minor_gases_lower, size(minor_gases_lower), MPI_CHARACTER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(minor_gases_upper, size(minor_gases_upper), MPI_CHARACTER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(minor_scales_with_density_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(scale_by_complement_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(minor_scales_with_density_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(scale_by_complement_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, mpierr) - ! Don't advance until data broadcast complete on all processors - call MPI_BARRIER(mpicomm, mpierr) -#endif +! endif ! Initialize gas concentrations and gas optics class do iGas=1,rrtmgp_nGases diff --git a/physics/rrtmgp_sw_cloud_optics.F90 b/physics/rrtmgp_sw_cloud_optics.F90 index 87aa27df9..de9ecc74a 100644 --- a/physics/rrtmgp_sw_cloud_optics.F90 +++ b/physics/rrtmgp_sw_cloud_optics.F90 @@ -8,9 +8,6 @@ module rrtmgp_sw_cloud_optics use mo_rrtmg_sw_cloud_optics, only: rrtmg_sw_cloud_optics use rrtmgp_aux, only: check_error_msg use netcdf -#ifdef MPI - use mpi -#endif public rrtmgp_sw_cloud_optics_init, rrtmgp_sw_cloud_optics_run, rrtmgp_sw_cloud_optics_finalize contains @@ -91,9 +88,7 @@ subroutine rrtmgp_sw_cloud_optics_init(cld_optics_scheme, nrghice, rrtmgp_root_d ! Local variables integer :: status,ncid,dimid,varID character(len=264) :: sw_cloud_props_file -#ifdef MPI - integer :: mpierr -#endif + ! Initialize errmsg = '' errflg = 0 @@ -104,7 +99,7 @@ subroutine rrtmgp_sw_cloud_optics_init(cld_optics_scheme, nrghice, rrtmgp_root_d sw_cloud_props_file = trim(rrtmgp_root_dir)//trim(rrtmgp_sw_file_clouds) ! On master processor only... - if (mpirank .eq. mpiroot) then +! if (mpirank .eq. mpiroot) then ! Open file status = nf90_open(trim(sw_cloud_props_file), NF90_WRITE, ncid) @@ -238,66 +233,7 @@ subroutine rrtmgp_sw_cloud_optics_init(cld_optics_scheme, nrghice, rrtmgp_root_d ! Close file status = nf90_close(ncid) - endif - -#ifdef MPI - if (cld_optics_scheme .eq. 1) then - ! Wait for processor 0 to catch up... - call MPI_BARRIER(mpicomm, mpierr) - - ! Broadcast data - write (*,*) 'Broadcasting RRTMGP shortwave cloud-optics data ... ' - call MPI_BCAST(nBand, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nrghice, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nSize_liq, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nSize_ice, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(radliq_lwr, 1, MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(radliq_upr, 1, MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(radliq_fac, 1, MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(radice_lwr, 1, MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(radice_upr, 1, MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(radice_fac, 1, MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(lut_extliq, size(lut_extliq), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(lut_ssaliq, size(lut_ssaliq), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(lut_asyliq, size(lut_asyliq), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(lut_extice, size(lut_extice), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(lut_ssaice, size(lut_ssaice), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(lut_asyice, size(lut_asyice), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(band_lims, size(band_lims), MPI_REAL, mpiroot, mpicomm, mpierr) - - ! Don't advance until data broadcast complete on all processors - call MPI_BARRIER(mpicomm, mpierr) - endif - if (cld_optics_scheme .eq. 2) then - ! Wait for processor 0 to catch up... - call MPI_BARRIER(mpicomm, mpierr) - - ! Broadcast data - write (*,*) 'Broadcasting RRTMGP shortwave cloud-optics data ... ' - call MPI_BCAST(nBand, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nrghice, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nSizeReg, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nCoeff_ext, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nCoeff_ssa_g, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nBound, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(pade_extliq, size(pade_extliq), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(pade_ssaliq, size(pade_ssaliq), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(pade_asyliq, size(pade_asyliq), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(pade_extice, size(pade_extice), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(pade_ssaice, size(pade_ssaice), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(pade_asyice, size(pade_asyice), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(pade_sizereg_extliq, size(pade_sizereg_extliq), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(pade_sizereg_ssaliq, size(pade_sizereg_ssaliq), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(pade_sizereg_asyliq, size(pade_sizereg_asyliq), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(pade_sizereg_extice, size(pade_sizereg_extice), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(pade_sizereg_ssaice, size(pade_sizereg_ssaice), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(pade_sizereg_asyice, size(pade_sizereg_asyice), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(band_lims, size(band_lims), MPI_REAL, mpiroot, mpicomm, mpierr) - - ! Don't advance until data broadcast complete on all processors - call MPI_BARRIER(mpicomm, mpierr) - endif -#endif +! endif ! Load tables data for RRTMGP cloud-optics if (cld_optics_scheme .eq. 1) then diff --git a/physics/rrtmgp_sw_gas_optics.F90 b/physics/rrtmgp_sw_gas_optics.F90 index 1b1ca8409..b91aed7ad 100644 --- a/physics/rrtmgp_sw_gas_optics.F90 +++ b/physics/rrtmgp_sw_gas_optics.F90 @@ -8,9 +8,6 @@ module rrtmgp_sw_gas_optics use mo_optical_props, only: ty_optical_props_2str use mo_compute_bc, only: compute_bc use netcdf -#ifdef MPI - use mpi -#endif contains @@ -103,9 +100,6 @@ subroutine rrtmgp_sw_gas_optics_init(rrtmgp_root_dir, rrtmgp_sw_file_gas, rrtmgp integer :: status, ncid, dimid, varID, iGas integer,dimension(:),allocatable :: temp1, temp2, temp3, temp4 character(len=264) :: sw_gas_props_file -#ifdef MPI - integer :: mpierr -#endif ! Initialize errmsg = '' @@ -117,7 +111,7 @@ subroutine rrtmgp_sw_gas_optics_init(rrtmgp_root_dir, rrtmgp_sw_file_gas, rrtmgp sw_gas_props_file = trim(rrtmgp_root_dir)//trim(rrtmgp_sw_file_gas) ! Read dimensions for k-distribution fields (only on master processor(0)) - if (mpirank .eq. mpiroot) then +! if (mpirank .eq. mpiroot) then ! Open file status = nf90_open(trim(sw_gas_props_file), NF90_WRITE, ncid) @@ -259,61 +253,8 @@ subroutine rrtmgp_sw_gas_optics_init(rrtmgp_root_dir, rrtmgp_sw_file_gas, rrtmgp ! Close status = nf90_close(ncid) - endif +! endif -#ifdef MPI - ! Wait for processor 0 to catch up... - call MPI_BARRIER(mpicomm, mpierr) - - ! Broadcast data - write (*,*) 'Broadcasting RRTMGP shortwave k-distribution data ... ' - call MPI_BCAST(ntemps, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(npress, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nminorabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nextrabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nmixingfracs, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nlayers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nbnds, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(ngpts, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(npairs, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(ncontributors_lower, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(ncontributors_upper, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nminor_absorber_intervals_lower, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(nminor_absorber_intervals_upper, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(minor_limits_gpt_upper, size(minor_limits_gpt_upper), MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(minor_limits_gpt_lower, size(minor_limits_gpt_lower), MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(kminor_start_upper, size(kminor_start_upper), MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(kminor_start_lower, size(kminor_start_lower), MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(key_species, size(key_species), MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(band2gpt, size(band2gpt), MPI_INTEGER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(band_lims, size(band_lims), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(press_ref, size(press_ref), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(temp_ref, size(temp_ref), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(kminor_lower, size(kminor_lower), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(kminor_upper, size(kminor_upper), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(scaling_gas_lower, size(scaling_gas_lower), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(scaling_gas_upper, size(scaling_gas_upper), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(vmr_ref, size(vmr_ref), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(kmajor, size(kmajor), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(temp_ref_p, 1, MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(temp_ref_t, 1, MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(press_ref_trop, 1, MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(solar_source, size(solar_source), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(rayl_lower, size(rayl_lower), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(rayl_upper, size(rayl_upper), MPI_REAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(gas_names, size(gas_names), MPI_CHARACTER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(gas_minor, size(gas_minor), MPI_CHARACTER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(identifier_minor, size(identifier_minor), MPI_CHARACTER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(minor_gases_lower, size(minor_gases_lower), MPI_CHARACTER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(minor_gases_upper, size(minor_gases_upper), MPI_CHARACTER, mpiroot, mpicomm, mpierr) - call MPI_BCAST(minor_scales_with_density_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(scale_by_complement_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(minor_scales_with_density_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, mpierr) - call MPI_BCAST(scale_by_complement_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, mpierr) - ! Don't advance until data broadcast complete on all processors - call MPI_BARRIER(mpicomm, mpierr) -#endif ! Initialize gas concentrations and gas optics class do iGas=1,rrtmgp_nGases From 3491dcdf52b32dd066a2d17bf145630a26bdf994 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Tue, 11 Feb 2020 10:55:46 -0700 Subject: [PATCH 144/167] Switched to rte-rrtmgp dtc/branch. --- .gitmodules | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index 19b855a70..45475032d 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,4 +1,4 @@ [submodule "physics/rte-rrtmgp"] path = physics/rte-rrtmgp - url = https://dustinswales@github.com/dustinswales/rte-rrtmgp - branch = rrtmgp-CCPP \ No newline at end of file + url = https://dustinswales@github.com/RobertPincus/rte-rrtmgp + branch = dtc/ccpp \ No newline at end of file From c1cec1142babd2d549858346df9fccd7ff13320e Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Tue, 11 Feb 2020 10:57:40 -0700 Subject: [PATCH 145/167] Switched to rte-rrtmgp dtc/branch. --- .gitmodules | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index 19b855a70..45475032d 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,4 +1,4 @@ [submodule "physics/rte-rrtmgp"] path = physics/rte-rrtmgp - url = https://dustinswales@github.com/dustinswales/rte-rrtmgp - branch = rrtmgp-CCPP \ No newline at end of file + url = https://dustinswales@github.com/RobertPincus/rte-rrtmgp + branch = dtc/ccpp \ No newline at end of file From 3aa8cd4f38897c95f2fef5bff1fbc930ce0bba41 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Tue, 11 Feb 2020 11:08:25 -0700 Subject: [PATCH 146/167] Updated submodule --- physics/rte-rrtmgp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/physics/rte-rrtmgp b/physics/rte-rrtmgp index a2566ac81..7dfff2025 160000 --- a/physics/rte-rrtmgp +++ b/physics/rte-rrtmgp @@ -1 +1 @@ -Subproject commit a2566ac81f6d7f63bc01be92388702c95f0a3703 +Subproject commit 7dfff2025cae02c84b12df2402a39d77065f0e62 From 30b523724d8339de8c4ef2a98e778e0c878b494e Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Tue, 11 Feb 2020 11:09:46 -0700 Subject: [PATCH 147/167] Updated submodule --- physics/rte-rrtmgp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/physics/rte-rrtmgp b/physics/rte-rrtmgp index a2566ac81..7dfff2025 160000 --- a/physics/rte-rrtmgp +++ b/physics/rte-rrtmgp @@ -1 +1 @@ -Subproject commit a2566ac81f6d7f63bc01be92388702c95f0a3703 +Subproject commit 7dfff2025cae02c84b12df2402a39d77065f0e62 From 75c479d4f3c8e99649ed8ab8e8d83892eaf72592 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Tue, 11 Feb 2020 15:13:34 -0700 Subject: [PATCH 148/167] Updated interface to rte-rrtmgp routines. --- physics/GFS_rrtmgp_pre.F90 | 140 +++++++++++++++++++++-------- physics/GFS_rrtmgp_pre.meta | 11 ++- physics/rrtmgp_lw_cloud_optics.F90 | 46 +++++----- physics/rrtmgp_lw_gas_optics.F90 | 6 +- physics/rrtmgp_lw_gas_optics.meta | 2 +- physics/rrtmgp_sw_cloud_optics.F90 | 48 +++++----- physics/rrtmgp_sw_gas_optics.F90 | 11 +-- physics/rrtmgp_sw_gas_optics.meta | 4 +- physics/rrtmgp_sw_rte.F90 | 1 + physics/rrtmgp_sw_rte.meta | 2 +- 10 files changed, 174 insertions(+), 97 deletions(-) diff --git a/physics/GFS_rrtmgp_pre.F90 b/physics/GFS_rrtmgp_pre.F90 index 4d076706c..29f1ac37e 100644 --- a/physics/GFS_rrtmgp_pre.F90 +++ b/physics/GFS_rrtmgp_pre.F90 @@ -58,9 +58,25 @@ module GFS_rrtmgp_pre amo3 = 47.9982_kind_phys, & ! Modelular weight of ozone (g/mol) amdw = amd/amw, & ! Molecular weight of dry air / water vapor amdo3 = amd/amo3 ! Molecular weight of dry air / ozone - - public GFS_rrtmgp_pre_run,GFS_rrtmgp_pre_init,GFS_rrtmgp_pre_finalize - + + ! Some common trace gas on/off flags. + ! This allows for control over which trace gases are used in RRTMGP radiation scheme via + ! namelist. + logical :: & + isActive_h2o = .false., & ! + isActive_co2 = .false., & ! + isActive_o3 = .false., & ! + isActive_n2o = .false., & ! + isActive_ch4 = .false., & ! + isActive_o2 = .false., & ! + isActive_ccl4 = .false., & ! + isActive_cfc11 = .false., & ! + isActive_cfc12 = .false., & ! + isActive_cfc22 = .false. ! + integer :: iStr_h2o, iStr_co2, iStr_o3, iStr_n2o, iStr_ch4, iStr_o2, iStr_ccl4, & + iStr_cfc11, iStr_cfc12, iStr_cfc22 + + public GFS_rrtmgp_pre_run,GFS_rrtmgp_pre_init,GFS_rrtmgp_pre_finalize contains ! ######################################################################################### @@ -77,7 +93,7 @@ subroutine GFS_rrtmgp_pre_init(Model, Radtend, active_gases_array, errmsg, errfl Radtend ! DDT: FV3-GFS radiation tendencies ! Outputs - character(len=128),dimension(Model%ngases), intent(out) :: & + character(len=*),dimension(Model%ngases), intent(out) :: & active_gases_array ! Character array containing trace gases to include in RRTMGP character(len=*), intent(out) :: & errmsg ! Error message @@ -93,27 +109,72 @@ subroutine GFS_rrtmgp_pre_init(Model, Radtend, active_gases_array, errmsg, errfl errmsg = '' errflg = 0 + if (len(Model%active_gases) .eq. 0) return + ! Which gases are active? Provided via physics namelist. - if (len(Model%active_gases) .gt. 0) then - - ! Pull out gas names from list... - ! First grab indices in character array corresponding to start:end of gas name. - gasIndices(1,1)=1 - count=1 - do ij=1,len(Model%active_gases) - tempstr=trim(Model%active_gases(ij:ij)) - if (tempstr .eq. '_') then - gasIndices(count,2)=ij-1 - gasIndices(count+1,1)=ij+1 - count=count+1 - endif - enddo - gasIndices(Model%ngases,2)=len(trim(Model%active_gases)) - ! Now extract the gas names - do ij=1,Model%ngases - active_gases_array(ij) = Model%active_gases(gasIndices(ij,1):gasIndices(ij,2)) - enddo - endif + + ! Pull out gas names from list... + ! First grab indices in character array corresponding to start:end of gas name. + gasIndices(1,1)=1 + count=1 + do ij=1,len(Model%active_gases) + tempstr=trim(Model%active_gases(ij:ij)) + if (tempstr .eq. '_') then + gasIndices(count,2)=ij-1 + gasIndices(count+1,1)=ij+1 + count=count+1 + endif + enddo + gasIndices(Model%ngases,2)=len(trim(Model%active_gases)) + + ! Now extract the gas names + do ij=1,Model%ngases + active_gases_array(ij) = Model%active_gases(gasIndices(ij,1):gasIndices(ij,2)) + enddo + + ! Which gases are active? (This is purely for flexibility) + do ij=1,Model%ngases + if(trim(active_gases_array(ij)) .eq. 'h2o') then + isActive_h2o = .true. + istr_h2o = ij + endif + if(trim(active_gases_array(ij)) .eq. 'co2') then + isActive_co2 = .true. + istr_co2 = ij + endif + if(trim(active_gases_array(ij)) .eq. 'o3') then + isActive_o3 = .true. + istr_o3 = ij + endif + if(trim(active_gases_array(ij)) .eq. 'n2o') then + isActive_n2o = .true. + istr_n2o = ij + endif + if(trim(active_gases_array(ij)) .eq. 'ch4') then + isActive_ch4 = .true. + istr_ch4 = ij + endif + if(trim(active_gases_array(ij)) .eq. 'o2') then + isActive_o2 = .true. + istr_o2 = ij + endif + if(trim(active_gases_array(ij)) .eq. 'ccl4') then + isActive_ccl4 = .true. + istr_ccl4 = ij + endif + if(trim(active_gases_array(ij)) .eq. 'cfc11') then + isActive_cfc11 = .true. + istr_cfc11 = ij + endif + if(trim(active_gases_array(ij)) .eq. 'cfc12') then + isActive_cfc12 = .true. + istr_cfc12 = ij + endif + if(trim(active_gases_array(ij)) .eq. 'cfc22') then + isActive_cfc22 = .true. + istr_cfc22 = ij + endif + enddo end subroutine GFS_rrtmgp_pre_init @@ -123,11 +184,11 @@ end subroutine GFS_rrtmgp_pre_init !> \section arg_table_GFS_rrtmgp_pre_run !! \htmlinclude GFS_rrtmgp_pre.html !! - subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, Tbd, & ! IN - ncol, lw_gas_props, sec_diff_byband, & ! IN - raddt, p_lay, t_lay, p_lev, t_lev, tsfg, tsfa, cld_frac, cld_lwp, & ! OUT - cld_reliq, cld_iwp, cld_reice, cld_swp, cld_resnow, cld_rwp, cld_rerain, & ! OUT - tv_lay, relhum, tracer, cldsa, mtopa, mbota, de_lgth, gas_concentrations, & ! OUT + subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, Tbd, & ! IN + ncol, lw_gas_props, active_gases_array, & ! IN + sec_diff_byband, raddt, p_lay, t_lay, p_lev, t_lev, tsfg, tsfa, cld_frac, cld_lwp,& ! OUT + cld_reliq, cld_iwp, cld_reice, cld_swp, cld_resnow, cld_rwp, cld_rerain, & ! OUT + tv_lay, relhum, tracer, cldsa, mtopa, mbota, de_lgth, gas_concentrations, & ! OUT errmsg, errflg) ! Inputs @@ -147,8 +208,10 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, Tbd ! DDT: FV3-GFS data not yet assigned to a defined container integer, intent(in) :: & ncol ! Number of horizontal grid points - type(ty_gas_optics_rrtmgp),intent(in) :: & - lw_gas_props ! RRTMGP DDT: longwave spectral information + type(ty_gas_optics_rrtmgp),intent(in) :: & + lw_gas_props ! RRTMGP DDT: longwave spectral information + character(len=*),dimension(Model%ngases), intent(in) :: & + active_gases_array ! Character array containing trace gases to include in RRTMGP ! Outputs real(kind_phys), dimension(ncol,Model%levs), intent(out) :: & @@ -296,13 +359,14 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, vmr_h2o = merge((q_lay/(1-q_lay))*amdw, 0., q_lay .ne. 1.) vmr_o3 = merge(o3_lay*amdo3, 0., o3_lay .gt. 0.) - ! Populate RRTMGP DDT w/ gas-concentrations - call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations%set_vmr('o2', gas_vmr(:,:,4))) - call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations%set_vmr('co2', gas_vmr(:,:,1))) - call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations%set_vmr('ch4', gas_vmr(:,:,3))) - call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations%set_vmr('n2o', gas_vmr(:,:,2))) - call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations%set_vmr('h2o', vmr_h2o)) - call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations%set_vmr('o3', vmr_o3)) + ! Initialize and opulate RRTMGP DDT w/ gas-concentrations + call check_error_msg('sw_gas_optics_init',gas_concentrations%init(active_gases_array)) + if (isActive_o2) call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations%set_vmr(active_gases_array(iStr_o2), gas_vmr(:,:,4))) + if (isActive_co2) call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations%set_vmr(active_gases_array(iStr_co2), gas_vmr(:,:,1))) + if (isActive_ch4) call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations%set_vmr(active_gases_array(iStr_ch4), gas_vmr(:,:,3))) + if (isActive_n2o) call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations%set_vmr(active_gases_array(iStr_n2o), gas_vmr(:,:,2))) + if (isActive_h2o) call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations%set_vmr(active_gases_array(iStr_h2o), vmr_h2o)) + if (isActive_o3) call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations%set_vmr(active_gases_array(iStr_o3), vmr_o3)) ! ####################################################################################### ! Compute diffusivity angle adjustments for each longwave band diff --git a/physics/GFS_rrtmgp_pre.meta b/physics/GFS_rrtmgp_pre.meta index 35f455447..c80098709 100644 --- a/physics/GFS_rrtmgp_pre.meta +++ b/physics/GFS_rrtmgp_pre.meta @@ -23,7 +23,7 @@ units = none dimensions = (number_of_active_gases_used_by_RRTMGP) type = character - kind = len=128 + kind = len=* intent = out optional = F [errmsg] @@ -120,6 +120,15 @@ type = ty_gas_optics_rrtmgp intent = in optional = F +[active_gases_array] + standard_name = list_of_active_gases_used_by_RRTMGP + long_name = list of active gases used by RRTMGP + units = none + dimensions = (number_of_active_gases_used_by_RRTMGP) + type = character + kind = len=* + intent = in + optional = F [raddt] standard_name = time_step_for_radiation long_name = radiation time step diff --git a/physics/rrtmgp_lw_cloud_optics.F90 b/physics/rrtmgp_lw_cloud_optics.F90 index d12ccaa23..ab811128c 100644 --- a/physics/rrtmgp_lw_cloud_optics.F90 +++ b/physics/rrtmgp_lw_cloud_optics.F90 @@ -91,7 +91,7 @@ subroutine rrtmgp_lw_cloud_optics_init(cld_optics_scheme, nrghice, rrtmgp_root_d ! Local variables integer :: dimID,varID,status,ncid character(len=264) :: lw_cloud_props_file - integer,parameter :: max_strlen=256 + integer,parameter :: max_strlen=256, nrghice_default=2 #ifdef MPI integer :: mpierr #endif @@ -131,15 +131,17 @@ subroutine rrtmgp_lw_cloud_optics_init(cld_optics_scheme, nrghice, rrtmgp_root_d status = nf90_inquire_dimension(ncid, dimid, len=npairs) status = nf90_close(ncid) - ! Has the number of ice-roughnesses been provided from the namelist? - ! If not provided, use all categories in file (default) + ! Has the number of ice-roughnesses to use been provided from the namelist? + ! If not provided, use default number of ice-roughness categories if (nrghice .eq. 0) then + nrghice = nrghice_default + else nrghice = nrghice_fromfile - endif - ! If provided in the namelist, check to ensure that number of ice-roughness categories is feasible. - if (nrghice .gt. nrghice_fromfile) then - errmsg = 'Number of RRTMGP ice-roughness categories requested in namelist file is not allowed. Using nrghice from file...' - nrghice = nrghice_fromfile + ! If provided in the namelist, check to ensure that number of ice-roughness categories is feasible. + if (nrghice .gt. nrghice_fromfile) then + errmsg = 'Number of RRTMGP ice-roughness categories requested in namelist file is not allowed. Using default number of categories.' + nrghice = nrghice_default + endif endif ! Allocate space for arrays @@ -147,17 +149,17 @@ subroutine rrtmgp_lw_cloud_optics_init(cld_optics_scheme, nrghice, rrtmgp_root_d allocate(lut_extliq(nSize_liq, nBand)) allocate(lut_ssaliq(nSize_liq, nBand)) allocate(lut_asyliq(nSize_liq, nBand)) - allocate(lut_extice(nSize_ice, nBand, nrghice)) - allocate(lut_ssaice(nSize_ice, nBand, nrghice)) - allocate(lut_asyice(nSize_ice, nBand, nrghice)) + allocate(lut_extice(nSize_ice, nBand, nrghice_fromfile)) + allocate(lut_ssaice(nSize_ice, nBand, nrghice_fromfile)) + allocate(lut_asyice(nSize_ice, nBand, nrghice_fromfile)) endif if (cld_optics_scheme .eq. 2) then allocate(pade_extliq(nBand, nSizeReg, nCoeff_ext )) allocate(pade_ssaliq(nBand, nSizeReg, nCoeff_ssa_g)) allocate(pade_asyliq(nBand, nSizeReg, nCoeff_ssa_g)) - allocate(pade_extice(nBand, nSizeReg, nCoeff_ext, nrghice)) - allocate(pade_ssaice(nBand, nSizeReg, nCoeff_ssa_g, nrghice)) - allocate(pade_asyice(nBand, nSizeReg, nCoeff_ssa_g, nrghice)) + allocate(pade_extice(nBand, nSizeReg, nCoeff_ext, nrghice_fromfile)) + allocate(pade_ssaice(nBand, nSizeReg, nCoeff_ssa_g, nrghice_fromfile)) + allocate(pade_asyice(nBand, nSizeReg, nCoeff_ssa_g, nrghice_fromfile)) allocate(pade_sizereg_extliq(nBound)) allocate(pade_sizereg_ssaliq(nBound)) allocate(pade_sizereg_asyliq(nBound)) @@ -304,18 +306,18 @@ subroutine rrtmgp_lw_cloud_optics_init(cld_optics_scheme, nrghice, rrtmgp_root_d ! Load tables data for RRTMGP cloud-optics if (cld_optics_scheme .eq. 1) then - call check_error_msg('lw_cloud_optics_init',lw_cloud_props%set_ice_roughness(nrghice)) call check_error_msg('lw_cloud_optics_init',lw_cloud_props%load(band_lims, & radliq_lwr, radliq_upr, radliq_fac, radice_lwr, radice_upr, radice_fac, & lut_extliq, lut_ssaliq, lut_asyliq, lut_extice, lut_ssaice, lut_asyice)) endif if (cld_optics_scheme .eq. 2) then - call check_error_msg('lw_cloud_optics_init', lw_cloud_props%set_ice_roughness(nrghice)) call check_error_msg('lw_cloud_optics_init', lw_cloud_props%load(band_lims, & pade_extliq, pade_ssaliq, pade_asyliq, pade_extice, pade_ssaice, pade_asyice,& pade_sizereg_extliq, pade_sizereg_ssaliq, pade_sizereg_asyliq, & pade_sizereg_extice, pade_sizereg_ssaice, pade_sizereg_asyice)) endif + call check_error_msg('lw_cloud_optics_init', lw_cloud_props%set_ice_roughness(nrghice)) + end subroutine rrtmgp_lw_cloud_optics_init ! ######################################################################################### @@ -393,12 +395,12 @@ subroutine rrtmgp_lw_cloud_optics_run(doLWrad, nCol, nLev, cld_optics_scheme, nr if (rrtmgp_cld_optics .gt. 0) then ! i) RRTMGP cloud-optics. call check_error_msg('rrtmgp_lw_cloud_optics_run',lw_cloud_props%cloud_optics(& - ncol, & ! IN - Number of horizontal gridpoints - nLev, & ! IN - Number of vertical layers - lw_cloud_props%get_nband(), & ! IN - Number of LW bands - nrghice, & ! IN - Number of ice-roughness categories - liqmask, & ! IN - Liquid-cloud mask (1) - icemask, & ! IN - Ice-cloud mask (1) + !ncol, & ! IN - Number of horizontal gridpoints + !nLev, & ! IN - Number of vertical layers + !lw_cloud_props%get_nband(), & ! IN - Number of LW bands + !nrghice, & ! IN - Number of ice-roughness categories + !liqmask, & ! IN - Liquid-cloud mask (1) + !icemask, & ! IN - Ice-cloud mask (1) cld_lwp, & ! IN - Cloud liquid water path (g/m2) cld_iwp, & ! IN - Cloud ice water path (g/m2) cld_reliq, & ! IN - Cloud liquid effective radius (microns) diff --git a/physics/rrtmgp_lw_gas_optics.F90 b/physics/rrtmgp_lw_gas_optics.F90 index 440b40242..bc27db93f 100644 --- a/physics/rrtmgp_lw_gas_optics.F90 +++ b/physics/rrtmgp_lw_gas_optics.F90 @@ -29,7 +29,7 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp rrtmgp_lw_file_gas ! RRTMGP file containing coefficients used to compute gaseous optical properties integer, intent(in) :: & rrtmgp_nGases ! Number of trace gases active in RRTMGP - character(len=128),dimension(rrtmgp_nGases), intent(in) :: & + character(len=*),dimension(rrtmgp_nGases), intent(in) :: & active_gases_array ! Character array containing trace gases to include in RRTMGP integer,intent(in) :: & mpicomm, & ! MPI communicator @@ -317,9 +317,7 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp #endif ! Initialize gas concentrations and gas optics class - do iGas=1,rrtmgp_nGases - call check_error_msg('lw_gas_optics_init',gas_concentrations%set_vmr(active_gases_array(iGas), 0._kind_phys)) - enddo + call check_error_msg('lw_gas_optics_init',gas_concentrations%init(active_gases_array)) call check_error_msg('lw_gas_optics_init',lw_gas_props%load(gas_concentrations, gas_names, & key_species, band2gpt, band_lims, press_ref, press_ref_trop, temp_ref, temp_ref_p, & temp_ref_t, vmr_ref, kmajor, kminor_lower, kminor_upper, gas_minor, identifier_minor, & diff --git a/physics/rrtmgp_lw_gas_optics.meta b/physics/rrtmgp_lw_gas_optics.meta index cacda8c1c..36b8067dd 100644 --- a/physics/rrtmgp_lw_gas_optics.meta +++ b/physics/rrtmgp_lw_gas_optics.meta @@ -33,7 +33,7 @@ units = none dimensions = (number_of_active_gases_used_by_RRTMGP) type = character - kind = len=128 + kind = len=* intent = in optional = F [mpirank] diff --git a/physics/rrtmgp_sw_cloud_optics.F90 b/physics/rrtmgp_sw_cloud_optics.F90 index 87aa27df9..c0f8134e8 100644 --- a/physics/rrtmgp_sw_cloud_optics.F90 +++ b/physics/rrtmgp_sw_cloud_optics.F90 @@ -91,6 +91,7 @@ subroutine rrtmgp_sw_cloud_optics_init(cld_optics_scheme, nrghice, rrtmgp_root_d ! Local variables integer :: status,ncid,dimid,varID character(len=264) :: sw_cloud_props_file + integer,parameter :: nrghice_default=2 #ifdef MPI integer :: mpierr #endif @@ -128,15 +129,17 @@ subroutine rrtmgp_sw_cloud_optics_init(cld_optics_scheme, nrghice, rrtmgp_root_d status = nf90_inq_dimid(ncid, 'pair', dimid) status = nf90_inquire_dimension(ncid, dimid, len=nPairs) - ! Has the number of ice-roughnesses been provided from the namelist? - ! If not provided, use all categories in file (default) + ! Has the number of ice-roughnesses to use been provided from the namelist? + ! If not provided, use default number of ice-roughness categories if (nrghice .eq. 0) then + nrghice = nrghice_default + else nrghice = nrghice_fromfile - endif - ! If provided in the namelist, check to ensure that number of ice-roughness categories is feasible. - if (nrghice .gt. nrghice_fromfile) then - errmsg = 'Number of RRTMGP ice-roughness categories requested in namelist file is not allowed. Using nrghice from file...' - nrghice = nrghice_fromfile + ! If provided in the namelist, check to ensure that number of ice-roughness categories is feasible. + if (nrghice .gt. nrghice_fromfile) then + errmsg = 'Number of RRTMGP ice-roughness categories requested in namelist file is not allowed. Using default number of categories.' + nrghice = nrghice_default + endif endif ! Allocate space for arrays @@ -144,17 +147,17 @@ subroutine rrtmgp_sw_cloud_optics_init(cld_optics_scheme, nrghice, rrtmgp_root_d allocate(lut_extliq(nSize_liq, nBand)) allocate(lut_ssaliq(nSize_liq, nBand)) allocate(lut_asyliq(nSize_liq, nBand)) - allocate(lut_extice(nSize_ice, nBand, nrghice)) - allocate(lut_ssaice(nSize_ice, nBand, nrghice)) - allocate(lut_asyice(nSize_ice, nBand, nrghice)) + allocate(lut_extice(nSize_ice, nBand, nrghice_fromfile)) + allocate(lut_ssaice(nSize_ice, nBand, nrghice_fromfile)) + allocate(lut_asyice(nSize_ice, nBand, nrghice_fromfile)) endif if (cld_optics_scheme .eq. 2) then allocate(pade_extliq(nBand, nSizeReg, nCoeff_ext )) allocate(pade_ssaliq(nBand, nSizeReg, nCoeff_ssa_g)) allocate(pade_asyliq(nBand, nSizeReg, nCoeff_ssa_g)) - allocate(pade_extice(nBand, nSizeReg, nCoeff_ext, nrghice)) - allocate(pade_ssaice(nBand, nSizeReg, nCoeff_ssa_g, nrghice)) - allocate(pade_asyice(nBand, nSizeReg, nCoeff_ssa_g, nrghice)) + allocate(pade_extice(nBand, nSizeReg, nCoeff_ext, nrghice_fromfile)) + allocate(pade_ssaice(nBand, nSizeReg, nCoeff_ssa_g, nrghice_fromfile)) + allocate(pade_asyice(nBand, nSizeReg, nCoeff_ssa_g, nrghice_fromfile)) allocate(pade_sizereg_extliq(nBound)) allocate(pade_sizereg_ssaliq(nBound)) allocate(pade_sizereg_asyliq(nBound)) @@ -301,18 +304,17 @@ subroutine rrtmgp_sw_cloud_optics_init(cld_optics_scheme, nrghice, rrtmgp_root_d ! Load tables data for RRTMGP cloud-optics if (cld_optics_scheme .eq. 1) then - call check_error_msg('sw_cloud_optics_init',sw_cloud_props%set_ice_roughness(nrghice)) - call check_error_msg('sw_cloud_optics_init',sw_cloud_props%load(band_lims, & + call check_error_msg('sw_cloud_optics_init',sw_cloud_props%load(band_lims, & radliq_lwr, radliq_upr, radliq_fac, radice_lwr, radice_upr, radice_fac, & lut_extliq, lut_ssaliq, lut_asyliq, lut_extice, lut_ssaice, lut_asyice)) endif if (cld_optics_scheme .eq. 2) then - call check_error_msg('sw_cloud_optics_init',sw_cloud_props%set_ice_roughness(nrghice)) - call check_error_msg('sw_cloud_optics_init', sw_cloud_props%load(band_lims, & + call check_error_msg('sw_cloud_optics_init', sw_cloud_props%load(band_lims, & pade_extliq, pade_ssaliq, pade_asyliq, pade_extice, pade_ssaice, pade_asyice,& pade_sizereg_extliq, pade_sizereg_ssaliq, pade_sizereg_asyliq, & pade_sizereg_extice, pade_sizereg_ssaice, pade_sizereg_asyice)) endif + call check_error_msg('sw_cloud_optics_init',sw_cloud_props%set_ice_roughness(nrghice)) end subroutine rrtmgp_sw_cloud_optics_init ! ######################################################################################### @@ -390,12 +392,12 @@ subroutine rrtmgp_sw_cloud_optics_run(doSWrad, nCol, nLev, nDay, idxday, nrghice if (cld_optics_scheme .gt. 0) then ! RRTMGP cloud-optics. call check_error_msg('rrtmgp_sw_cloud_optics_run',sw_cloud_props%cloud_optics(& - nday, & ! IN - Number of daylit gridpoints - nLev, & ! IN - Number of vertical layers - sw_cloud_props%get_nband(), & ! IN - Number of SW bands - nrghice, & ! IN - Number of ice-roughness categories - liqmask, & ! IN - Liquid-cloud mask - icemask, & ! IN - Ice-cloud mask + !nday, & ! IN - Number of daylit gridpoints + !nLev, & ! IN - Number of vertical layers + !sw_cloud_props%get_nband(), & ! IN - Number of SW bands + !nrghice, & ! IN - Number of ice-roughness categories + !liqmask, & ! IN - Liquid-cloud mask + !icemask, & ! IN - Ice-cloud mask cld_lwp(idxday(1:nday),:), & ! IN - Cloud liquid water path cld_iwp(idxday(1:nday),:), & ! IN - Cloud ice water path cld_reliq(idxday(1:nday),:), & ! IN - Cloud liquid effective radius diff --git a/physics/rrtmgp_sw_gas_optics.F90 b/physics/rrtmgp_sw_gas_optics.F90 index 1b1ca8409..e9a2b64bc 100644 --- a/physics/rrtmgp_sw_gas_optics.F90 +++ b/physics/rrtmgp_sw_gas_optics.F90 @@ -29,7 +29,7 @@ subroutine rrtmgp_sw_gas_optics_init(rrtmgp_root_dir, rrtmgp_sw_file_gas, rrtmgp rrtmgp_sw_file_gas ! RRTMGP file containing coefficients used to compute gaseous optical properties integer, intent(in) :: & rrtmgp_nGases ! Number of trace gases active in RRTMGP - character(len=128),dimension(rrtmgp_nGases), intent(in) :: & + character(len=*),dimension(rrtmgp_nGases), intent(in) :: & active_gases_array ! Character array containing trace gases to include in RRTMGP integer,intent(in) :: & mpicomm, & ! MPI communicator @@ -316,9 +316,7 @@ subroutine rrtmgp_sw_gas_optics_init(rrtmgp_root_dir, rrtmgp_sw_file_gas, rrtmgp #endif ! Initialize gas concentrations and gas optics class - do iGas=1,rrtmgp_nGases - call check_error_msg('sw_gas_optics_init',gas_concentrations%set_vmr(active_gases_array(iGas), 0._kind_phys)) - enddo + call check_error_msg('sw_gas_optics_init',gas_concentrations%init(active_gases_array)) call check_error_msg('sw_gas_optics_init',sw_gas_props%load(gas_concentrations, gas_names, & key_species, band2gpt, band_lims, press_ref, press_ref_trop, temp_ref, temp_ref_p, & temp_ref_t, vmr_ref, kmajor, kminor_lower, kminor_upper, gas_minor, identifier_minor, & @@ -362,7 +360,7 @@ subroutine rrtmgp_sw_gas_optics_run(doSWrad, nCol, nLev, nday, idxday, sw_gas_pr solcon ! Solar constant integer, intent(in) :: & rrtmgp_nGases ! Number of trace gases active in RRTMGP - character(len=128),dimension(rrtmgp_nGases), intent(in) :: & + character(len=*),dimension(rrtmgp_nGases), intent(in) :: & active_gases_array ! Character array containing trace gases to include in RRTMGP ! Output @@ -392,6 +390,9 @@ subroutine rrtmgp_sw_gas_optics_run(doSWrad, nCol, nLev, nday, idxday, sw_gas_pr ! Allocate space call check_error_msg('rrtmgp_sw_gas_optics_run',sw_optical_props_clrsky%alloc_2str(nday, nLev, sw_gas_props)) + ! Initialize gas concentrations and gas optics class + call check_error_msg('rrtmgp_sw_rte_run',gas_concentrations_daylit%init(active_gases_array)) + ! Subset the gas concentrations, only need daylit points. do iGas=1,rrtmgp_nGases call check_error_msg('rrtmgp_sw_rte_run',& diff --git a/physics/rrtmgp_sw_gas_optics.meta b/physics/rrtmgp_sw_gas_optics.meta index bdcfd8cbb..fc8e72a9a 100644 --- a/physics/rrtmgp_sw_gas_optics.meta +++ b/physics/rrtmgp_sw_gas_optics.meta @@ -33,7 +33,7 @@ units = none dimensions = (number_of_active_gases_used_by_RRTMGP) type = character - kind = len=128 + kind = len=* intent = in optional = F [mpirank] @@ -214,7 +214,7 @@ units = none dimensions = (number_of_active_gases_used_by_RRTMGP) type = character - kind = len=128 + kind = len=* intent = in optional = F [errmsg] diff --git a/physics/rrtmgp_sw_rte.F90 b/physics/rrtmgp_sw_rte.F90 index 6543df9d0..de31a10f9 100644 --- a/physics/rrtmgp_sw_rte.F90 +++ b/physics/rrtmgp_sw_rte.F90 @@ -146,6 +146,7 @@ subroutine rrtmgp_sw_rte_run(doSWrad, nCol, nLev, nDay, idxday, coszen, p_lay, t endif ! Subset the gas concentrations, only need daylit points. + call check_error_msg('rrtmgp_sw_rte_run',gas_concentrations_daylit%init(active_gases_array)) do iGas=1,rrtmgp_nGases call check_error_msg('rrtmgp_sw_rte_run',& gas_concentrations%get_vmr(trim(active_gases_array(iGas)),vmrTemp)) diff --git a/physics/rrtmgp_sw_rte.meta b/physics/rrtmgp_sw_rte.meta index 4722a70f8..eaf4eab11 100644 --- a/physics/rrtmgp_sw_rte.meta +++ b/physics/rrtmgp_sw_rte.meta @@ -176,7 +176,7 @@ units = none dimensions = (number_of_active_gases_used_by_RRTMGP) type = character - kind = len=128 + kind = len=* intent = in optional = F [scmpsw] From 6473891e32fa5aca404c61e1fec6ca9d4744bb52 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Wed, 12 Feb 2020 09:48:51 -0700 Subject: [PATCH 149/167] Reverted some local changes. --- physics/radiation_clouds.f | 6 +-- physics/radlw_main.f | 40 +++++--------------- physics/radlw_main.meta | 76 -------------------------------------- physics/radlw_param.meta | 6 --- physics/radsw_main.f | 3 +- physics/radsw_param.meta | 6 --- 6 files changed, 13 insertions(+), 124 deletions(-) diff --git a/physics/radiation_clouds.f b/physics/radiation_clouds.f index 189b28c4c..49b394fe1 100644 --- a/physics/radiation_clouds.f +++ b/physics/radiation_clouds.f @@ -2485,10 +2485,10 @@ subroutine progcld5 & cip (i,k) = 0.0 crp (i,k) = 0.0 csp (i,k) = 0.0 - rew (i,k) = reliq_def ! default liq radius to 10 micron - rei (i,k) = reice_def ! default ice radius to 50 micron + rew (i,k) = re_cloud(i,k) + rei (i,k) = re_ice(i,k) rer (i,k) = rrain_def ! default rain radius to 1000 micron - res (i,k) = rsnow_def + res (i,k) = re_snow(i,K) ! tem2d (i,k) = min( 1.0, max( 0.0, (con_ttp-tlyr(i,k))*0.05 ) ) clwf(i,k) = 0.0 enddo diff --git a/physics/radlw_main.f b/physics/radlw_main.f index 32dafd7e4..7b029f8b0 100644 --- a/physics/radlw_main.f +++ b/physics/radlw_main.f @@ -255,9 +255,6 @@ module rrtmg_lw use module_radlw_avplank, only : totplnk use module_radlw_ref, only : preflog, tref, chi_mls ! -#ifdef MPI - use mpi -#endif implicit none ! private @@ -355,15 +352,9 @@ module rrtmg_lw ! ================ contains ! ================ -!! \section arg_table_rrtmg_lw_init -!! \htmlinclude rrtmg_lw.html -!! - subroutine rrtmg_lw_init (mpicomm, mpirank, mpiroot) - ! Inputs - integer, intent(in) :: mpicomm,mpirank,mpiroot - - end subroutine rrtmg_lw_init + subroutine rrtmg_lw_init () + end subroutine rrtmg_lw_init !> \defgroup module_radlw_main GFS RRTMG Longwave Module !! \brief This module includes NCEP's modifications of the RRTMG-LW radiation @@ -389,7 +380,7 @@ end subroutine rrtmg_lw_init !! This model is provided as is without any express or implied warranties. !! (http://www.rtweb.aer.com/) !! \section arg_table_rrtmg_lw_run Argument Table -!! \htmlinclude rrtmg_lw.html +!! \htmlinclude rrtmg_lw_run.html !! !> \section gen_lwrad RRTMG Longwave Radiation Scheme General Algorithm !> @{ @@ -398,7 +389,7 @@ subroutine rrtmg_lw_run & & gasvmr_ch4, gasvmr_o2, gasvmr_co, gasvmr_cfc11, & & gasvmr_cfc12, gasvmr_cfc22, gasvmr_ccl4, & & icseed,aeraod,aerssa,sfemis,sfgtmp, & - & dzlyr,delpin,de_lgth, lon, lat, & + & dzlyr,delpin,de_lgth, & & npts, nlay, nlp1, lprnt, cld_cf, lslwr, & & hlwc,topflx,sfcflx,cldtau, & ! --- outputs & HLW0,HLWB,FLXPRF, & ! --- optional @@ -597,7 +588,7 @@ subroutine rrtmg_lw_run & & cld_od real (kind=kind_phys), dimension(npts), intent(in) :: sfemis, & - & sfgtmp, de_lgth, lon, lat + & sfgtmp, de_lgth real (kind=kind_phys), dimension(npts,nlay,nbands),intent(in):: & & aeraod, aerssa @@ -726,6 +717,7 @@ subroutine rrtmg_lw_run & ! endif ! --- ... loop over horizontal npts profiles + lab_do_iplon : do iplon = 1, npts !> -# Read surface emissivity. @@ -1022,7 +1014,6 @@ subroutine rrtmg_lw_run & if ( lcf1 ) then - cldfrc = ceiling(cldfrc) call cldprop & ! --- inputs: & ( cldfrc,clwp,relw,ciwp,reiw,cda1,cda2,cda3,cda4, & @@ -1031,8 +1022,6 @@ subroutine rrtmg_lw_run & & cldfmc, taucld & & ) -!djs taucld(2,:) = taucld(1,:) - ! --- ... save computed layer cloud optical depth for output ! rrtm band-7 is apprx 10mu channel (or use spectral mean of bands 6-8) @@ -1171,7 +1160,6 @@ subroutine rrtmg_lw_run & endif ! end if_isubclw_block !> -# Save outputs. - topflx(iplon)%upfxc = totuflux(nlay) topflx(iplon)%upfx0 = totuclfl(nlay) @@ -1257,19 +1245,8 @@ subroutine rrtmg_lw_run & end subroutine rrtmg_lw_run !----------------------------------- !> @} -!! \section arg_table_rrtmg_lw_finalize Argument Table -!! \htmlinclude rrtmg_lw.html -!! - subroutine rrtmg_lw_finalize (mpicomm, mpirank, mpiroot) - ! Inputs - integer, intent(in) :: mpicomm,mpirank,mpiroot - ! Local variables - integer :: ierr - -#ifdef MPI - call MPI_BARRIER(mpicomm, ierr) -#endif - end subroutine rrtmg_lw_finalize + subroutine rrtmg_lw_finalize () + end subroutine rrtmg_lw_finalize @@ -3671,6 +3648,7 @@ subroutine rtrnmc & !> -# Process longwave output from band for total and clear streams. !! Calculate upward, downward, and net flux. + flxfac = wtdiff * fluxfac do k = 0, nlay diff --git a/physics/radlw_main.meta b/physics/radlw_main.meta index d2f97e6fd..73977e5cb 100644 --- a/physics/radlw_main.meta +++ b/physics/radlw_main.meta @@ -1,32 +1,3 @@ -[ccpp-arg-table] - name = rrtmg_lw_init - type = scheme -[mpirank] - standard_name = mpi_rank - long_name = current MPI rank - units = index - dimensions = () - type = integer - intent = in - optional = F -[mpiroot] - standard_name = mpi_root - long_name = master MPI rank - units = index - dimensions = () - type = integer - intent = in - optional = F -[mpicomm] - standard_name = mpi_comm - long_name = MPI communicator - units = index - dimensions = () - type = integer - intent = in - optional = F - -######################################################################## [ccpp-arg-table] name = rrtmg_lw_run type = scheme @@ -236,24 +207,6 @@ kind = kind_phys intent = in optional = F -[lon] - standard_name = longitude - long_name = longitude - units = radians - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[lat] - standard_name = latitude - long_name = latitude - units = radians - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = in - optional = F [npts] standard_name = horizontal_loop_extent long_name = horizontal dimension @@ -435,32 +388,3 @@ type = integer intent = out optional = F - -######################################################################## -[ccpp-arg-table] - name = rrtmg_lw_finalize - type = scheme -[mpirank] - standard_name = mpi_rank - long_name = current MPI rank - units = index - dimensions = () - type = integer - intent = in - optional = F -[mpiroot] - standard_name = mpi_root - long_name = master MPI rank - units = index - dimensions = () - type = integer - intent = in - optional = F -[mpicomm] - standard_name = mpi_comm - long_name = MPI communicator - units = index - dimensions = () - type = integer - intent = in - optional = F \ No newline at end of file diff --git a/physics/radlw_param.meta b/physics/radlw_param.meta index 61aee1d37..a06a89512 100644 --- a/physics/radlw_param.meta +++ b/physics/radlw_param.meta @@ -23,9 +23,3 @@ units = DDT dimensions = () type = sfcflw_type -[proflw_type] - standard_name = proflw_type - long_name = definition of type proflw_type - units = DDT - dimensions = () - type = proflw_type diff --git a/physics/radsw_main.f b/physics/radsw_main.f index 710904f5a..b10541fb7 100644 --- a/physics/radsw_main.f +++ b/physics/radsw_main.f @@ -1077,7 +1077,6 @@ subroutine rrtmg_sw_run & if (zcf1 > f_zero) then ! cloudy sky column - cfrac = ceiling(cfrac) call cldprop & ! --- inputs: & ( cfrac,cliqp,reliq,cicep,reice,cdat1,cdat2,cdat3,cdat4, & @@ -1085,7 +1084,7 @@ subroutine rrtmg_sw_run & ! --- outputs: & taucw, ssacw, asycw, cldfrc, cldfmc & & ) - + ! --- ... save computed layer cloud optical depth for output ! rrtm band 10 is approx to the 0.55 mu spectrum diff --git a/physics/radsw_param.meta b/physics/radsw_param.meta index 4f4f320f6..9f7c8a35a 100644 --- a/physics/radsw_param.meta +++ b/physics/radsw_param.meta @@ -34,9 +34,3 @@ units = DDT dimensions = () type = cmpfsw_type -[profsw_type] - standard_name = profsw_type - long_name = definition of type profsw_type - units = DDT - dimensions = () - type = profsw_type \ No newline at end of file From b1e111fc0fe4ecb7c854dd538ae36f15c67af44a Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Wed, 12 Feb 2020 10:39:01 -0700 Subject: [PATCH 150/167] Reverted recent change. --- physics/radlw_param.meta | 6 ++++++ physics/radsw_param.meta | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/physics/radlw_param.meta b/physics/radlw_param.meta index a06a89512..61aee1d37 100644 --- a/physics/radlw_param.meta +++ b/physics/radlw_param.meta @@ -23,3 +23,9 @@ units = DDT dimensions = () type = sfcflw_type +[proflw_type] + standard_name = proflw_type + long_name = definition of type proflw_type + units = DDT + dimensions = () + type = proflw_type diff --git a/physics/radsw_param.meta b/physics/radsw_param.meta index 9f7c8a35a..e0eb5ece8 100644 --- a/physics/radsw_param.meta +++ b/physics/radsw_param.meta @@ -34,3 +34,9 @@ units = DDT dimensions = () type = cmpfsw_type +[profsw_type] + standard_name = profsw_type + long_name = definition of type profsw_type + units = DDT + dimensions = () + type = profsw_type From 54a38d99cc46599bac0df04478865c1a287b48b2 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Wed, 12 Feb 2020 10:43:24 -0700 Subject: [PATCH 151/167] Removed cloud-fraction rounding. Was using for debugging purposes. --- physics/rrtmgp_lw_cloud_sampling.F90 | 5 +---- physics/rrtmgp_sw_cloud_sampling.F90 | 6 +----- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/physics/rrtmgp_lw_cloud_sampling.F90 b/physics/rrtmgp_lw_cloud_sampling.F90 index af5f77210..c0c319449 100644 --- a/physics/rrtmgp_lw_cloud_sampling.F90 +++ b/physics/rrtmgp_lw_cloud_sampling.F90 @@ -104,15 +104,12 @@ subroutine rrtmgp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, icseed_lw, rng3D(:,:,iCol) = reshape(source = rng1D,shape=[lw_gas_props%get_ngpt(),nLev]) enddo - ! Test: Remove McICA sampling error by setting cloud-fraction to one. - cld_frac_noSamp = ceiling(cld_frac) - ! Call McICA select case ( iovrlw ) case(0) ! Maximumn-random case(1) - call check_error_msg('rrtmgp_lw_cloud_sampling_run',sampled_mask_max_ran(rng3D,cld_frac_noSamp,cldfracMCICA)) + call check_error_msg('rrtmgp_lw_cloud_sampling_run',sampled_mask_max_ran(rng3D,cld_frac,cldfracMCICA)) end select ! Map band optical depth to each g-point using McICA diff --git a/physics/rrtmgp_sw_cloud_sampling.F90 b/physics/rrtmgp_sw_cloud_sampling.F90 index 60f46d0db..cc998b755 100644 --- a/physics/rrtmgp_sw_cloud_sampling.F90 +++ b/physics/rrtmgp_sw_cloud_sampling.F90 @@ -109,15 +109,11 @@ subroutine rrtmgp_sw_cloud_sampling_run(doSWrad, nCol, nDay, nLev, ipsdsw0, idxd rng3D(:,:,iCol) = reshape(source = rng1D,shape=[sw_gas_props%get_ngpt(),nLev]) enddo - - ! Test: Remove McICA sampling error by setting cloud-fraction to one. - cld_frac_noSamp = ceiling(cld_frac) - ! Call McICA select case ( iovrsw ) ! Maximumn-random case(1) - call check_error_msg('rrtmgp_sw_cloud_sampling_run',sampled_mask_max_ran(rng3D,cld_frac_noSamp,cldfracMCICA)) + call check_error_msg('rrtmgp_sw_cloud_sampling_run',sampled_mask_max_ran(rng3D,cld_frac,cldfracMCICA)) end select ! Map band optical depth to each g-point using McICA From c984e907306502fa109d514b64031102102ae512 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Fri, 14 Feb 2020 16:54:38 -0700 Subject: [PATCH 152/167] Cleaned up a tad. --- physics/GFS_rrtmgp_lw_pre.F90 | 92 --------- physics/GFS_rrtmgp_lw_pre.meta | 135 ------------- physics/GFS_rrtmgp_sw_pre.F90 | 101 ++++++---- physics/GFS_rrtmgp_sw_pre.meta | 296 +++++++++++++++++++++++++---- physics/rrtmgp_sw_cloud_optics.F90 | 15 +- physics/rrtmgp_sw_rte.F90 | 34 +--- physics/rrtmgp_sw_rte.meta | 8 - 7 files changed, 334 insertions(+), 347 deletions(-) delete mode 100644 physics/GFS_rrtmgp_lw_pre.F90 delete mode 100644 physics/GFS_rrtmgp_lw_pre.meta diff --git a/physics/GFS_rrtmgp_lw_pre.F90 b/physics/GFS_rrtmgp_lw_pre.F90 deleted file mode 100644 index 34f9e5b53..000000000 --- a/physics/GFS_rrtmgp_lw_pre.F90 +++ /dev/null @@ -1,92 +0,0 @@ -module GFS_rrtmgp_lw_pre - use physparam - use machine, only: & - kind_phys ! Working type - use GFS_typedefs, only: & - GFS_control_type, & ! - GFS_sfcprop_type, & ! Surface fields - GFS_grid_type, & ! Grid and interpolation related data - GFS_statein_type, & ! - GFS_radtend_type ! Radiation tendencies needed in physics - use module_radiation_surface, only: & - setemis ! Routine to compute surface-emissivity - use mo_gas_optics_rrtmgp, only: & - ty_gas_optics_rrtmgp - - public GFS_rrtmgp_lw_pre_run,GFS_rrtmgp_lw_pre_init,GFS_rrtmgp_lw_pre_finalize - -contains - - ! ######################################################################################### - ! SUBROUTINE GFS_rrtmgp_lw_pre_init - ! ######################################################################################### - subroutine GFS_rrtmgp_lw_pre_init () - end subroutine GFS_rrtmgp_lw_pre_init - - ! ######################################################################################### - ! SUBROUTINE GFS_rrtmgp_lw_pre_run - ! ######################################################################################### -!> \section arg_table_GFS_rrtmgp_lw_pre_run -!! \htmlinclude GFS_rrtmgp_lw_pre.html -!! - subroutine GFS_rrtmgp_lw_pre_run (Model, Grid, Sfcprop, Statein, ncol, p_lay, p_lev, & - tv_lay, relhum, tracer, lw_gas_props, Radtend, sfc_emiss_byband, errmsg, errflg) - - ! Inputs - type(GFS_control_type), intent(in) :: & - Model ! DDT: FV3-GFS model control parameters - type(GFS_grid_type), intent(in) :: & - Grid ! DDT: FV3-GFS grid and interpolation related data - type(GFS_sfcprop_type), intent(in) :: & - Sfcprop ! DDT: FV3-GFS surface fields - type(GFS_statein_type), intent(in) :: & - Statein ! DDT: FV3-GFS prognostic state data in from dycore - integer, intent(in) :: & - ncol ! Number of horizontal grid points - real(kind_phys), dimension(ncol,Model%levs),intent(in) :: & - p_lay, & ! Layer pressure - tv_lay, & ! Layer virtual-temperature - relhum ! Layer relative-humidity - real(kind_phys), dimension(ncol, Model%levs, 2:Model%ntrac),intent(in) :: & - tracer ! trace gas concentrations - real(kind_phys), dimension(ncol,Model%levs+1),intent(in) :: & - p_lev ! Interface (level) pressure - type(ty_gas_optics_rrtmgp),intent(in) :: & - lw_gas_props ! RRTMGP DDT: spectral information for LW calculation - - ! Outputs - type(GFS_radtend_type), intent(inout) :: & - Radtend ! DDT: FV3-GFS radiation tendencies - real(kind_phys), dimension(lw_gas_props%get_nband(),ncol), intent(out) :: & - sfc_emiss_byband ! Surface emissivity in each band - character(len=*), intent(out) :: & - errmsg ! Error message - integer, intent(out) :: & - errflg ! Error flag - - ! Initialize CCPP error handling variables - errmsg = '' - errflg = 0 - - if (.not. Model%lslwr) return - - ! ####################################################################################### - ! Call module_radiation_surface::setemis(),to setup surface emissivity for LW radiation. - ! ####################################################################################### - call setemis (Grid%xlon, Grid%xlat, Sfcprop%slmsk, Sfcprop%snowd, Sfcprop%sncovr, & - Sfcprop%zorl, Sfcprop%tsfc,Sfcprop%tsfc, Sfcprop%hprime(:,1), NCOL, Radtend%semis) - - ! Assign same emissivity to all bands - do iBand=1,lw_gas_props%get_nband() - sfc_emiss_byband(iBand,1:NCOL) = Radtend%semis(1:NCOL) - enddo - - end subroutine GFS_rrtmgp_lw_pre_run - - ! ######################################################################################### - ! SUBROUTINE GFS_rrtmgp_lw_pre_finalize - ! ######################################################################################### - subroutine GFS_rrtmgp_lw_pre_finalize () - end subroutine GFS_rrtmgp_lw_pre_finalize - -end module GFS_rrtmgp_lw_pre diff --git a/physics/GFS_rrtmgp_lw_pre.meta b/physics/GFS_rrtmgp_lw_pre.meta deleted file mode 100644 index 78cdfa2d4..000000000 --- a/physics/GFS_rrtmgp_lw_pre.meta +++ /dev/null @@ -1,135 +0,0 @@ -[ccpp-arg-table] - name = GFS_rrtmgp_lw_pre_run - type = scheme -[Model] - standard_name = GFS_control_type_instance - long_name = instance of derived type GFS_control_type - units = DDT - dimensions = () - type = GFS_control_type - intent = in - optional = F -[Grid] - standard_name = GFS_grid_type_instance - long_name = instance of derived type GFS_grid_type - units = DDT - dimensions = () - type = GFS_grid_type - intent = in - optional = F -[Sfcprop] - standard_name = GFS_sfcprop_type_instance - long_name = instance of derived type GFS_sfcprop_type - units = DDT - dimensions = () - type = GFS_sfcprop_type - intent = in - optional = F -[Statein] - standard_name = GFS_statein_type_instance - long_name = instance of derived type GFS_statein_type - units = DDT - dimensions = () - type = GFS_statein_type - intent = in - optional = F -[Radtend] - standard_name = GFS_radtend_type_instance - long_name = instance of derived type GFS_radtend_type - units = DDT - dimensions = () - type = GFS_radtend_type - intent = inout - optional = F -[ncol] - standard_name = horizontal_loop_extent - long_name = horizontal loop extent - units = count - dimensions = () - type = integer - intent = in - optional = F -[tv_lay] - standard_name = virtual_temperature - long_name = layer virtual temperature - units = K - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[relhum] - standard_name = relative_humidity - long_name = layer relative humidity - units = frac - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[p_lay] - standard_name = air_pressure_at_layer_for_RRTMGP_in_hPa - long_name = air pressure at vertical layer for radiation calculation - units = hPa - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[p_lev] - standard_name = air_pressure_at_interface_for_RRTMGP_in_hPa - long_name = air pressure at vertical interface for radiation calculation - units = hPa - dimensions = (horizontal_dimension,vertical_dimension_plus_one) - type = real - kind = kind_phys - intent = in - optional = F -[tracer] - standard_name = chemical_tracers - long_name = chemical tracers - units = g g-1 - dimensions = (horizontal_dimension,vertical_dimension,number_of_tracers) - type = real - kind = kind_phys - intent = in - optional = F -[lw_gas_props] - standard_name = coefficients_for_lw_gas_optics - long_name = DDT containing spectral information for RRTMGP LW radiation scheme - units = DDT - dimensions = () - type = ty_gas_optics_rrtmgp - intent = in - optional = F -[sfc_emiss_byband] - standard_name = surface_emissivity_in_each_RRTMGP_LW_band - long_name = surface emissivity in each RRTMGP LW band - units = none - dimensions = (number_of_lw_bands_rrtmgp,horizontal_dimension) - type = real - kind = kind_phys - intent = out - optional = F -[errmsg] - standard_name = ccpp_error_message - long_name = error message for error handling in CCPP - units = none - dimensions = () - type = character - kind = len=* - intent = out - optional = F -[errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag - dimensions = () - type = integer - intent = out - optional = F - -######################################################################## -[ccpp-arg-table] - name = GFS_rrtmgp_pre_lw_finalize - type = scheme diff --git a/physics/GFS_rrtmgp_sw_pre.F90 b/physics/GFS_rrtmgp_sw_pre.F90 index 6987c3e4a..0900b0004 100644 --- a/physics/GFS_rrtmgp_sw_pre.F90 +++ b/physics/GFS_rrtmgp_sw_pre.F90 @@ -2,14 +2,6 @@ module GFS_rrtmgp_sw_pre use physparam use machine, only: & kind_phys ! Working type - use GFS_typedefs, only: & - GFS_sfcprop_type, & ! Surface fields - GFS_control_type, & ! Model control parameters - GFS_grid_type, & ! Grid and interpolation related data - GFS_coupling_type, & ! - GFS_statein_type, & ! - GFS_radtend_type, & ! Radiation tendencies needed in physics - GFS_interstitial_type use module_radiation_astronomy,only: & coszmn ! Function to compute cos(SZA) use module_radiation_surface, only: & @@ -35,29 +27,57 @@ end subroutine GFS_rrtmgp_sw_pre_init !> \section arg_table_GFS_rrtmgp_sw_pre_run !! \htmlinclude GFS_rrtmgp_sw_pre.html !! - subroutine GFS_rrtmgp_sw_pre_run(Model, Grid, Sfcprop, Statein, ncol, p_lay, p_lev, & - tv_lay, relhum, tracer, sw_gas_props, nday, idxday, alb1d, sfc_alb_nir_dir, & - sfc_alb_nir_dif, sfc_alb_uvvis_dir, sfc_alb_uvvis_dif, RadTend, Coupling, & - errmsg, errflg) + subroutine GFS_rrtmgp_sw_pre_run(doLWrad, do_sfcperts, ncol, nlev, ntrac, nsfcpert, nmtvr,mpi_rank, solhr, & + pertalb, sfc_wts, xlon, coslat, sinlat, slmsk, snowd, sncovr, snoalb, zorl, coszen, coszdg, tsfc,& + hprime, alvsf, alnsf, alvwf, alnwf, facsf, facwf, fice, tisfc, p_lay, p_lev, tv_lay, & + relhum, tracer, sw_gas_props, nday, idxday, alb1d, sfalb, sfc_alb_nir_dir, sfc_alb_nir_dif, & + sfc_alb_uvvis_dir, sfc_alb_uvvis_dif, errmsg, errflg) ! Inputs - type(GFS_control_type), intent(in) :: & - Model ! DDT: FV3-GFS model control parameters - type(GFS_grid_type), intent(in) :: & - Grid ! DDT: FV3-GFS grid and interpolation related data - type(GFS_sfcprop_type), intent(in) :: & - Sfcprop ! DDT: FV3-GFS surface fields - type(GFS_statein_type), intent(in) :: & - Statein ! DDT: FV3-GFS prognostic state data in from dycore + logical, intent(in) :: & + doLWrad , & ! Flag for longwave radiation call + do_sfcperts ! Flag for stochastic surface perturbations option + integer, intent(in) :: & - ncol ! Number of horizontal grid points - real(kind_phys), dimension(ncol,Model%levs),intent(in) :: & + ncol, & ! Number of horizontal grid points + nlev, & ! Number of vertical levels + ntrac, & ! Number of tracers + nsfcpert, & ! number of surface perturbations + nmtvr, & ! number of topographic variables in GWD + mpi_rank ! Current MPI-rank + real(kind_phys), intent(in) :: & + solhr ! Time after 00z at the current timestep (hours) + real(kind_phys), dimension(nsfcpert), intent(in) :: & + pertalb ! Magnitude of surface albedo perturbation + real(kind_phys), dimension(ncol,nsfcpert), intent(in) :: & + sfc_wts ! Magnitude of surface albedo perturbation + real(kind_phys), dimension(ncol), intent(in) :: & + xlon, & ! Longitude + coslat, & ! Cosine of latitude + sinlat, & ! Sine of latitude + slmsk, & ! Lank/sea mask + snowd, & ! Water equivalent snow depth (mm) + sncovr, & ! Surface snow area fraction + snoalb, & ! Maximum snow albedo + zorl, & ! Surface roughness length + tsfc, & ! Surface skin temperature (K) + alvsf, & ! Mean vis albedo with strong cosz dependency + alnsf, & ! Mean nIR albedo with strong cosz dependency + alvwf, & ! Mean vis albedo with weak cosz dependency + alnwf, & ! Mean nIR albedo with weak cosz dependency + facsf, & ! Fractional coverage with strong cosz dependency + facwf, & ! Fractional coverage with weak cosz dependency + fice, & ! Ice fraction over open water + tisfc ! Sea ice surface skin temperature + real(kind_phys), dimension(ncol,nmtvr), intent(in) :: & + hprime ! orographic metrics + real(kind_phys), dimension(ncol,nlev),intent(in) :: & p_lay, & ! Layer pressure tv_lay, & ! Layer virtual-temperature relhum ! Layer relative-humidity - real(kind_phys), dimension(ncol, Model%levs, 2:Model%ntrac),intent(in) :: & - tracer - real(kind_phys), dimension(ncol,Model%levs+1),intent(in) :: & + real(kind_phys), dimension(ncol, nlev, 2:ntrac),intent(in) :: & + tracer ! Chemical tracers (g/g) + real(kind_phys), dimension(ncol,nlev+1),intent(in) :: & p_lev ! Pressure @ layer interfaces (Pa) type(ty_gas_optics_rrtmgp),intent(in) :: & sw_gas_props ! RRTMGP DDT: spectral information for SW calculation @@ -68,16 +88,15 @@ subroutine GFS_rrtmgp_sw_pre_run(Model, Grid, Sfcprop, Statein, ncol, p_lay, p_ integer, dimension(ncol), intent(out) :: & idxday ! Indices for daylit points real(kind_phys), dimension(ncol), intent(out) :: & - alb1d ! Surface albedo pertubation + coszen, & ! mean cos of zenith angle over rad call period + coszdg, & ! daytime mean cosz over rad call period + sfalb, & ! mean surface diffused SW albedo + alb1d ! Surface albedo pertubation real(kind_phys), dimension(sw_gas_props%get_nband(),ncol), intent(out) :: & sfc_alb_nir_dir, & ! Surface albedo (direct) sfc_alb_nir_dif, & ! Surface albedo (diffuse) sfc_alb_uvvis_dir, & ! Surface albedo (direct) sfc_alb_uvvis_dif ! Surface albedo (diffuse) - type(GFS_radtend_type), intent(inout) :: & - Radtend ! DDT: FV3-GFS radiation tendencies - type(GFS_coupling_type), intent(inout) :: & - Coupling ! DDT: FV3-GFS coupling arrays character(len=*), intent(out) :: & errmsg ! Error message integer, intent(out) :: & @@ -91,13 +110,13 @@ subroutine GFS_rrtmgp_sw_pre_run(Model, Grid, Sfcprop, Statein, ncol, p_lay, p_ errmsg = '' errflg = 0 - if (.not. Model%lsswr) return + if (.not. doLWrad) return ! ####################################################################################### ! Compute cosine of zenith angle (only when SW is called) ! ####################################################################################### - call coszmn (Grid%xlon, Grid%sinlat, Grid%coslat, Model%solhr, NCOL, Model%me, & - Radtend%coszen, Radtend%coszdg) + call coszmn (xlon, sinlat, coslat, solhr, NCOL, mpi_rank, & + coszen, coszdg) ! ####################################################################################### ! For SW gather daylit points @@ -105,7 +124,7 @@ subroutine GFS_rrtmgp_sw_pre_run(Model, Grid, Sfcprop, Statein, ncol, p_lay, p_ nday = 0 idxday = 0 do i = 1, NCOL - if (Radtend%coszen(i) >= 0.0001) then + if (coszen(i) >= 0.0001) then nday = nday + 1 idxday(nday) = i endif @@ -117,10 +136,10 @@ subroutine GFS_rrtmgp_sw_pre_run(Model, Grid, Sfcprop, Statein, ncol, p_lay, p_ ! --- turn vegetation fraction pattern into percentile pattern ! ####################################################################################### alb1d(:) = 0. - if (Model%do_sfcperts) then - if (Model%pertalb(1) > 0.) then + if (do_sfcperts) then + if (pertalb(1) > 0.) then do i=1,ncol - call cdfnor(Coupling%sfc_wts(i,5),alb1d(i)) + call cdfnor(sfc_wts(i,5),alb1d(i)) enddo endif endif @@ -128,13 +147,11 @@ subroutine GFS_rrtmgp_sw_pre_run(Model, Grid, Sfcprop, Statein, ncol, p_lay, p_ ! ####################################################################################### ! Call module_radiation_surface::setalb() to setup surface albedo. ! ####################################################################################### - call setalb (Sfcprop%slmsk, Sfcprop%snowd, Sfcprop%sncovr, Sfcprop%snoalb, Sfcprop%zorl, & - Radtend%coszen, Sfcprop%tsfc, Sfcprop%tsfc, Sfcprop%hprime(:,1), Sfcprop%alvsf, & - Sfcprop%alnsf, Sfcprop%alvwf, Sfcprop%alnwf, Sfcprop%facsf, Sfcprop%facwf, & - Sfcprop%fice, Sfcprop%tisfc, NCOL, alb1d, Model%pertalb, sfcalb) + call setalb (slmsk, snowd, sncovr, snoalb, zorl, coszen, tsfc, tsfc, hprime(:,1), alvsf, & + alnsf, alvwf, alnwf, facsf, facwf, fice, tisfc, NCOL, alb1d, pertalb, sfcalb) ! Approximate mean surface albedo from vis- and nir- diffuse values. - Radtend%sfalb(:) = max(0.01, 0.5 * (sfcalb(:,2) + sfcalb(:,4))) + sfalb(:) = max(0.01, 0.5 * (sfcalb(:,2) + sfcalb(:,4))) ! Spread across all SW bands do iBand=1,sw_gas_props%get_nband() diff --git a/physics/GFS_rrtmgp_sw_pre.meta b/physics/GFS_rrtmgp_sw_pre.meta index 73df740e1..e4b1944d1 100644 --- a/physics/GFS_rrtmgp_sw_pre.meta +++ b/physics/GFS_rrtmgp_sw_pre.meta @@ -1,62 +1,259 @@ [ccpp-arg-table] name = GFS_rrtmgp_sw_pre_run type = scheme -[Model] - standard_name = GFS_control_type_instance - long_name = instance of derived type GFS_control_type - units = DDT +[xlon] + standard_name = longitude + long_name = longitude + units = radians + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[coslat] + standard_name = cosine_of_latitude + long_name = cosine of latitude + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[sinlat] + standard_name = sine_of_latitude + long_name = sine of latitude + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[ntrac] + standard_name = number_of_tracers + long_name = number of tracers + units = count dimensions = () - type = GFS_control_type + type = integer intent = in optional = F -[Grid] - standard_name = GFS_grid_type_instance - long_name = instance of derived type GFS_grid_type - units = DDT +[nlev] + standard_name = vertical_dimension + long_name = number of vertical levels + units = count dimensions = () - type = GFS_grid_type + type = integer intent = in optional = F -[Sfcprop] - standard_name = GFS_sfcprop_type_instance - long_name = instance of derived type GFS_sfcprop_type - units = DDT +[ncol] + standard_name = horizontal_loop_extent + long_name = horizontal loop extent + units = count dimensions = () - type = GFS_sfcprop_type + type = integer intent = in optional = F -[Statein] - standard_name = GFS_statein_type_instance - long_name = instance of derived type GFS_statein_type - units = DDT +[nsfcpert] + standard_name = number_of_surface_perturbations + long_name = number of surface perturbations + units = count dimensions = () - type = GFS_statein_type + type = integer intent = in optional = F -[Radtend] - standard_name = GFS_radtend_type_instance - long_name = instance of derived type GFS_radtend_type - units = DDT +[nmtvr] + standard_name = number_of_statistical_measures_of_subgrid_orography + long_name = number of topographic variables in GWD + units = count dimensions = () - type = GFS_radtend_type - intent = inout + type = integer + intent = in optional = F -[Coupling] - standard_name = GFS_coupling_type_instance - long_name = Fortran DDT containing FV3-GFS fields to/from coupling with other components - units = DDT +[doLWrad] + standard_name = flag_to_calc_sw + long_name = logical flags for sw radiation calls + units = flag dimensions = () - type = GFS_coupling_type - intent = inout + type = logical + intent = in optional = F -[ncol] - standard_name = horizontal_loop_extent - long_name = horizontal loop extent - units = count +[solhr] + standard_name = forecast_hour_of_the_day + long_name = time in hours after 00z at the current timestep + units = h + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[mpi_rank] + standard_name = mpi_rank + long_name = current MPI-rank + units = index dimensions = () type = integer intent = in optional = F +[do_sfcperts] + standard_name = flag_for_stochastic_surface_perturbations + long_name = flag for stochastic surface perturbations option + units = flag + dimensions = () + type = logical + intent = in + optional = F +[pertalb] + standard_name = magnitude_of_surface_albedo_perturbation + long_name = magnitude of surface albedo perturbation + units = frac + dimensions = (5) + type = real + kind = kind_phys + intent = in + optional = F +[slmsk] + standard_name = sea_land_ice_mask_real + long_name = landmask: sea/land/ice=0/1/2 + units = flag + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[snowd] + standard_name = surface_snow_thickness_water_equivalent + long_name = water equivalent snow depth + units = mm + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[sncovr] + standard_name = surface_snow_area_fraction_over_land + long_name = surface snow area fraction + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[snoalb] + standard_name = upper_bound_on_max_albedo_over_deep_snow + long_name = maximum snow albedo + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[zorl] + standard_name = surface_roughness_length + long_name = surface roughness length + units = cm + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[tsfc] + standard_name = surface_skin_temperature + long_name = surface skin temperature + units = K + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[hprime] + standard_name = statistical_measures_of_subgrid_orography + long_name = orographic metrics + units = various + dimensions = (horizontal_dimension,number_of_statistical_measures_of_subgrid_orography) + type = real + kind = kind_phys + intent = in + optional = F +[alvwf] + standard_name = mean_vis_albedo_with_weak_cosz_dependency + long_name = mean vis albedo with weak cosz dependency + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[alnwf] + standard_name = mean_nir_albedo_with_weak_cosz_dependency + long_name = mean nir albedo with weak cosz dependency + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[alvsf] + standard_name = mean_vis_albedo_with_strong_cosz_dependency + long_name = mean vis albedo with strong cosz dependency + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[alnsf] + standard_name = mean_nir_albedo_with_strong_cosz_dependency + long_name = mean nir albedo with strong cosz dependency + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[facsf] + standard_name =fractional_coverage_with_strong_cosz_dependency + long_name = fractional coverage with strong cosz dependency + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[facwf] + standard_name = fractional_coverage_with_weak_cosz_dependency + long_name = fractional coverage with weak cosz dependency + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[fice] + standard_name = sea_ice_concentration + long_name = ice fraction over open water + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[tisfc] + standard_name = sea_ice_temperature + long_name = sea ice surface skin temperature + units = K + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[sfc_wts] + standard_name = weights_for_stochastic_surface_physics_perturbation + long_name = weights for stochastic surface physics perturbation + units = none + dimensions = (horizontal_dimension,number_of_surface_perturbations) + type = real + kind = kind_phys + intent = in + optional = F [tv_lay] standard_name = virtual_temperature long_name = layer virtual temperature @@ -119,6 +316,15 @@ kind = kind_phys intent = out optional = F +[sfalb] + standard_name = surface_diffused_shortwave_albedo + long_name = mean surface diffused sw albedo + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = out + optional = F [sfc_alb_nir_dir] standard_name = surface_albedo_nearIR_direct long_name = near-IR (direct) surface albedo (sfc_alb_nir_dir) @@ -155,6 +361,24 @@ kind = kind_phys intent = out optional = F +[coszen] + standard_name = cosine_of_zenith_angle + long_name = mean cos of zenith angle over rad call period + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[coszdg] + standard_name = daytime_mean_cosz_over_rad_call_period + long_name = daytime mean cosz over rad call period + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = out + optional = F [nday] standard_name = daytime_points_dimension long_name = daytime points dimension diff --git a/physics/rrtmgp_sw_cloud_optics.F90 b/physics/rrtmgp_sw_cloud_optics.F90 index c0f8134e8..b23819680 100644 --- a/physics/rrtmgp_sw_cloud_optics.F90 +++ b/physics/rrtmgp_sw_cloud_optics.F90 @@ -392,12 +392,6 @@ subroutine rrtmgp_sw_cloud_optics_run(doSWrad, nCol, nLev, nDay, idxday, nrghice if (cld_optics_scheme .gt. 0) then ! RRTMGP cloud-optics. call check_error_msg('rrtmgp_sw_cloud_optics_run',sw_cloud_props%cloud_optics(& - !nday, & ! IN - Number of daylit gridpoints - !nLev, & ! IN - Number of vertical layers - !sw_cloud_props%get_nband(), & ! IN - Number of SW bands - !nrghice, & ! IN - Number of ice-roughness categories - !liqmask, & ! IN - Liquid-cloud mask - !icemask, & ! IN - Ice-cloud mask cld_lwp(idxday(1:nday),:), & ! IN - Cloud liquid water path cld_iwp(idxday(1:nday),:), & ! IN - Cloud ice water path cld_reliq(idxday(1:nday),:), & ! IN - Cloud liquid effective radius @@ -406,6 +400,9 @@ subroutine rrtmgp_sw_cloud_optics_run(doSWrad, nCol, nLev, nDay, idxday, nrghice ! in each band (tau,ssa,g) else ! RRTMG cloud-optics + tau_cld(:,:,:) = 0._kind_phys + ssa_cld(:,:,:) = 0._kind_phys + asy_cld(:,:,:) = 0._kind_phys if (any(cld_frac .gt. 0)) then call rrtmg_sw_cloud_optics(nday, nLev, sw_gas_props%get_nband(), & cld_lwp(idxday(1:nday),:), cld_reliq(idxday(1:nday),:), & @@ -413,10 +410,10 @@ subroutine rrtmgp_sw_cloud_optics_run(doSWrad, nCol, nLev, nDay, idxday, nrghice cld_rwp(idxday(1:nday),:), cld_rerain(idxday(1:nday),:), & cld_swp(idxday(1:nday),:), cld_resnow(idxday(1:nday),:), & cld_frac(idxday(1:nday),:), tau_cld, ssa_cld, asy_cld) - sw_optical_props_cloudsByBand%tau(:,:,:) = tau_cld - sw_optical_props_cloudsByBand%ssa(:,:,:) = ssa_cld - sw_optical_props_cloudsByBand%g(:,:,:) = asy_cld endif + sw_optical_props_cloudsByBand%tau(:,:,:) = tau_cld + sw_optical_props_cloudsByBand%ssa(:,:,:) = ssa_cld + sw_optical_props_cloudsByBand%g(:,:,:) = asy_cld endif ! All-sky SW optical depth ~0.55microns diff --git a/physics/rrtmgp_sw_rte.F90 b/physics/rrtmgp_sw_rte.F90 index de31a10f9..96bfa94ea 100644 --- a/physics/rrtmgp_sw_rte.F90 +++ b/physics/rrtmgp_sw_rte.F90 @@ -27,11 +27,10 @@ end subroutine rrtmgp_sw_rte_init !! \htmlinclude rrtmgp_sw_rte.html !! subroutine rrtmgp_sw_rte_run(doSWrad, nCol, nLev, nDay, idxday, coszen, p_lay, t_lay, & - p_lev, sw_gas_props, gas_concentrations, sw_optical_props_clrsky, sfc_alb_nir_dir, & - sfc_alb_nir_dif, sfc_alb_uvvis_dir, sfc_alb_uvvis_dif, toa_src_sw, & - sw_optical_props_clouds, sw_optical_props_aerosol, rrtmgp_nGases, active_gases_array, & - scmpsw, fluxswUP_allsky, fluxswDOWN_allsky, fluxswUP_clrsky, fluxswDOWN_clrsky, & - hsw0, hswb, errmsg, errflg) + p_lev, sw_gas_props, sw_optical_props_clrsky, sfc_alb_nir_dir, sfc_alb_nir_dif, & + sfc_alb_uvvis_dir, sfc_alb_uvvis_dif, toa_src_sw, sw_optical_props_clouds, & + sw_optical_props_aerosol, rrtmgp_nGases, active_gases_array, scmpsw, fluxswUP_allsky, & + fluxswDOWN_allsky, fluxswUP_clrsky, fluxswDOWN_clrsky, hsw0, hswb, errmsg, errflg) ! Inputs logical, intent(in) :: & @@ -51,10 +50,9 @@ subroutine rrtmgp_sw_rte_run(doSWrad, nCol, nLev, nDay, idxday, coszen, p_lay, t p_lev ! Pressure @ model layer-interfaces (Pa) type(ty_gas_optics_rrtmgp),intent(in) :: & sw_gas_props ! RRTMGP DDT: SW spectral information - type(ty_gas_concs),intent(in) :: & - gas_concentrations ! RRTMGP DDT: trace gas concentrations (vmr) type(ty_optical_props_2str),intent(inout) :: & - sw_optical_props_clrsky, & ! RRTMGP DDT: shortwave clear-sky radiative properties + sw_optical_props_clrsky ! RRTMGP DDT: shortwave clear-sky radiative properties + type(ty_optical_props_2str),intent(in) :: & sw_optical_props_clouds, & ! RRTMGP DDT: shortwave cloud radiative properties sw_optical_props_aerosol ! RRTMGP DDT: shortwave aerosol radiative properties real(kind_phys), dimension(sw_gas_props%get_nband(),ncol), intent(in) :: & @@ -107,24 +105,19 @@ subroutine rrtmgp_sw_rte_run(doSWrad, nCol, nLev, nDay, idxday, coszen, p_lay, t real(kind_phys), dimension(ncol,NLev) :: vmrTemp logical :: l_ClrSky_HR=.false., l_AllSky_HR_byband=.false., l_scmpsw=.false., top_at_1 integer :: iGas,iSFC,iTOA,iBand - type(ty_optical_props_2str) :: & - sw_optical_props_clouds_daylit, & ! RRTMGP DDT: longwave cloud radiative properties - sw_optical_props_clrsky_daylit, & ! RRTMGP DDT: longwave clear-sky radiative properties - sw_optical_props_aerosol_daylit ! RRTMGP DDT: longwave aerosol radiative properties - type(ty_gas_concs) :: & - gas_concentrations_daylit ! RRTMGP DDT: trace gas concentrations (vmr) ! Initialize CCPP error handling variables errmsg = '' errflg = 0 + if (.not. doSWrad) return + ! Initialize output fluxes fluxswUP_allsky(:,:) = 0._kind_phys fluxswDOWN_allsky(:,:) = 0._kind_phys fluxswUP_clrsky(:,:) = 0._kind_phys fluxswDOWN_clrsky(:,:) = 0._kind_phys - if (.not. doSWrad) return if (nDay .gt. 0) then ! Vertical ordering? @@ -145,15 +138,6 @@ subroutine rrtmgp_sw_rte_run(doSWrad, nCol, nLev, nDay, idxday, coszen, p_lay, t scmpsw = cmpfsw_type (0., 0., 0., 0., 0., 0.) endif - ! Subset the gas concentrations, only need daylit points. - call check_error_msg('rrtmgp_sw_rte_run',gas_concentrations_daylit%init(active_gases_array)) - do iGas=1,rrtmgp_nGases - call check_error_msg('rrtmgp_sw_rte_run',& - gas_concentrations%get_vmr(trim(active_gases_array(iGas)),vmrTemp)) - call check_error_msg('rrtmgp_sw_rte_run',& - gas_concentrations_daylit%set_vmr(trim(active_gases_array(iGas)),vmrTemp(idxday(1:nday),:))) - enddo - ! Initialize RRTMGP DDT containing 2D(3D) fluxes fluxSW_up_allsky(:,:,:) = 0._kind_phys fluxSW_dn_allsky(:,:,:) = 0._kind_phys @@ -205,7 +189,7 @@ subroutine rrtmgp_sw_rte_run(doSWrad, nCol, nLev, nDay, idxday, coszen, p_lay, t ! All-sky fluxes (clear-sky + clouds) call check_error_msg('rrtmgp_sw_rte_run',sw_optical_props_clouds%increment(sw_optical_props_clrsky)) ! Delta-scale optical properties - call check_error_msg('rrtmgp_sw_rte_run',sw_optical_props_clouds%delta_scale()) + call check_error_msg('rrtmgp_sw_rte_run',sw_optical_props_clrsky%delta_scale()) call check_error_msg('rrtmgp_sw_rte_run',rte_sw( & sw_optical_props_clrsky, & ! IN - optical-properties top_at_1, & ! IN - veritcal ordering flag diff --git a/physics/rrtmgp_sw_rte.meta b/physics/rrtmgp_sw_rte.meta index eaf4eab11..8ae7421c3 100644 --- a/physics/rrtmgp_sw_rte.meta +++ b/physics/rrtmgp_sw_rte.meta @@ -109,14 +109,6 @@ type = ty_optical_props_2str intent = in optional = F -[gas_concentrations] - standard_name = Gas_concentrations_for_RRTMGP_suite - long_name = DDT containing gas concentrations for RRTMGP radiation scheme - units = DDT - dimensions = () - type = ty_gas_concs - intent = in - optional = F [sfc_alb_nir_dir] standard_name = surface_albedo_nearIR_direct long_name = near-IR (direct) surface albedo (sfc_alb_nir_dir) From c1bf1ae02bde5a0462dc0b5614f8acb1d88fefaf Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Tue, 18 Feb 2020 11:57:44 -0700 Subject: [PATCH 153/167] Try using 1D hprime --- physics/GFS_rrtmgp_sw_pre.F90 | 4 ++-- physics/GFS_rrtmgp_sw_pre.meta | 8 ++++---- physics/rrtmgp_lw_pre.F90 | 4 ++-- physics/rrtmgp_lw_pre.meta | 8 ++++---- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/physics/GFS_rrtmgp_sw_pre.F90 b/physics/GFS_rrtmgp_sw_pre.F90 index 0900b0004..8fc126392 100644 --- a/physics/GFS_rrtmgp_sw_pre.F90 +++ b/physics/GFS_rrtmgp_sw_pre.F90 @@ -69,7 +69,7 @@ subroutine GFS_rrtmgp_sw_pre_run(doLWrad, do_sfcperts, ncol, nlev, ntrac, nsfcpe facwf, & ! Fractional coverage with weak cosz dependency fice, & ! Ice fraction over open water tisfc ! Sea ice surface skin temperature - real(kind_phys), dimension(ncol,nmtvr), intent(in) :: & + real(kind_phys), dimension(ncol), intent(in) :: & hprime ! orographic metrics real(kind_phys), dimension(ncol,nlev),intent(in) :: & p_lay, & ! Layer pressure @@ -147,7 +147,7 @@ subroutine GFS_rrtmgp_sw_pre_run(doLWrad, do_sfcperts, ncol, nlev, ntrac, nsfcpe ! ####################################################################################### ! Call module_radiation_surface::setalb() to setup surface albedo. ! ####################################################################################### - call setalb (slmsk, snowd, sncovr, snoalb, zorl, coszen, tsfc, tsfc, hprime(:,1), alvsf, & + call setalb (slmsk, snowd, sncovr, snoalb, zorl, coszen, tsfc, tsfc, hprime, alvsf, & alnsf, alvwf, alnwf, facsf, facwf, fice, tisfc, NCOL, alb1d, pertalb, sfcalb) ! Approximate mean surface albedo from vis- and nir- diffuse values. diff --git a/physics/GFS_rrtmgp_sw_pre.meta b/physics/GFS_rrtmgp_sw_pre.meta index e4b1944d1..453c12de2 100644 --- a/physics/GFS_rrtmgp_sw_pre.meta +++ b/physics/GFS_rrtmgp_sw_pre.meta @@ -165,10 +165,10 @@ intent = in optional = F [hprime] - standard_name = statistical_measures_of_subgrid_orography - long_name = orographic metrics - units = various - dimensions = (horizontal_dimension,number_of_statistical_measures_of_subgrid_orography) + standard_name = standard_deviation_of_subgrid_orography + long_name = standard deviation of subgrid orography + units = m + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = in diff --git a/physics/rrtmgp_lw_pre.F90 b/physics/rrtmgp_lw_pre.F90 index a55a6657e..9cb84dc0d 100644 --- a/physics/rrtmgp_lw_pre.F90 +++ b/physics/rrtmgp_lw_pre.F90 @@ -46,7 +46,7 @@ subroutine rrtmgp_lw_pre_run (doLWrad, nCol, lon, lat, lsmask, zorl, snowd, snco snowd, & ! water equivalent snow depth (mm) sncovr, & ! Surface snow are fraction (1) tsfc ! Surface skin temperature (K) - real(kind_phys), dimension(nCol,nmtvr), intent(in) :: & + real(kind_phys), dimension(nCol), intent(in) :: & hprime ! Standard deviation of subgrid orography type(ty_gas_optics_rrtmgp),intent(in) :: & @@ -72,7 +72,7 @@ subroutine rrtmgp_lw_pre_run (doLWrad, nCol, lon, lat, lsmask, zorl, snowd, snco ! ####################################################################################### ! Call module_radiation_surface::setemis(),to setup surface emissivity for LW radiation. ! ####################################################################################### - call setemis (lon, lat, lsmask, snowd, sncovr, zorl, tsfc, tsfc, hprime(:,1), nCol, sfc_emiss) + call setemis (lon, lat, lsmask, snowd, sncovr, zorl, tsfc, tsfc, hprime, nCol, sfc_emiss) ! Assign same emissivity to all bands do iBand=1,lw_gas_props%get_nband() diff --git a/physics/rrtmgp_lw_pre.meta b/physics/rrtmgp_lw_pre.meta index 86b4d3e36..cc3369f3b 100644 --- a/physics/rrtmgp_lw_pre.meta +++ b/physics/rrtmgp_lw_pre.meta @@ -89,10 +89,10 @@ intent = in optional = F [hprime] - standard_name = statistical_measures_of_subgrid_orography - long_name = orographic metrics - units = various - dimensions = (horizontal_dimension,number_of_statistical_measures_of_subgrid_orography) + standard_name = standard_deviation_of_subgrid_orography + long_name = standard deviation of subgrid orography + units = m + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = in From c47706ba033e72f20c97d482e91a80856367f587 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Tue, 18 Feb 2020 12:25:32 -0700 Subject: [PATCH 154/167] changed variable name. --- physics/rrtmgp_lw_pre.F90 | 6 +++--- physics/rrtmgp_lw_pre.meta | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/physics/rrtmgp_lw_pre.F90 b/physics/rrtmgp_lw_pre.F90 index 9cb84dc0d..6508e4a10 100644 --- a/physics/rrtmgp_lw_pre.F90 +++ b/physics/rrtmgp_lw_pre.F90 @@ -29,7 +29,7 @@ end subroutine rrtmgp_lw_pre_init !> \section arg_table_rrtmgp_lw_pre_run !! \htmlinclude rrtmgp_lw_pre.html !! - subroutine rrtmgp_lw_pre_run (doLWrad, nCol, lon, lat, lsmask, zorl, snowd, sncovr, tsfc, & + subroutine rrtmgp_lw_pre_run (doLWrad, nCol, lon, lat, slmsk, zorl, snowd, sncovr, tsfc, & nmtvr, hprime, lw_gas_props, sfc_emiss_byband, errmsg, errflg) ! Inputs @@ -41,7 +41,7 @@ subroutine rrtmgp_lw_pre_run (doLWrad, nCol, lon, lat, lsmask, zorl, snowd, snco real(kind_phys), dimension(nCol), intent(in) :: & lon, & ! Longitude lat, & ! Latitude - lsmask, & ! Land/sea/sea-ice mask + slmsk, & ! Land/sea/sea-ice mask zorl, & ! Surface roughness length (cm) snowd, & ! water equivalent snow depth (mm) sncovr, & ! Surface snow are fraction (1) @@ -72,7 +72,7 @@ subroutine rrtmgp_lw_pre_run (doLWrad, nCol, lon, lat, lsmask, zorl, snowd, snco ! ####################################################################################### ! Call module_radiation_surface::setemis(),to setup surface emissivity for LW radiation. ! ####################################################################################### - call setemis (lon, lat, lsmask, snowd, sncovr, zorl, tsfc, tsfc, hprime, nCol, sfc_emiss) + call setemis (lon, lat, slmsk, snowd, sncovr, zorl, tsfc, tsfc, hprime, nCol, sfc_emiss) ! Assign same emissivity to all bands do iBand=1,lw_gas_props%get_nband() diff --git a/physics/rrtmgp_lw_pre.meta b/physics/rrtmgp_lw_pre.meta index cc3369f3b..23036653a 100644 --- a/physics/rrtmgp_lw_pre.meta +++ b/physics/rrtmgp_lw_pre.meta @@ -43,7 +43,7 @@ kind = kind_phys intent = in optional = F -[lsmask] +[slmsk] standard_name = sea_land_ice_mask_real long_name = landmask: sea/land/ice=0/1/2 units = flag From c5ba6f942f01088f8b2a9d822b7b2163563bd558 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Tue, 18 Feb 2020 13:31:15 -0700 Subject: [PATCH 155/167] Remove using gas switches. --- physics/GFS_rrtmgp_pre.F90 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/physics/GFS_rrtmgp_pre.F90 b/physics/GFS_rrtmgp_pre.F90 index 29f1ac37e..cb2b79410 100644 --- a/physics/GFS_rrtmgp_pre.F90 +++ b/physics/GFS_rrtmgp_pre.F90 @@ -361,12 +361,12 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, ! Initialize and opulate RRTMGP DDT w/ gas-concentrations call check_error_msg('sw_gas_optics_init',gas_concentrations%init(active_gases_array)) - if (isActive_o2) call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations%set_vmr(active_gases_array(iStr_o2), gas_vmr(:,:,4))) - if (isActive_co2) call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations%set_vmr(active_gases_array(iStr_co2), gas_vmr(:,:,1))) - if (isActive_ch4) call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations%set_vmr(active_gases_array(iStr_ch4), gas_vmr(:,:,3))) - if (isActive_n2o) call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations%set_vmr(active_gases_array(iStr_n2o), gas_vmr(:,:,2))) - if (isActive_h2o) call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations%set_vmr(active_gases_array(iStr_h2o), vmr_h2o)) - if (isActive_o3) call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations%set_vmr(active_gases_array(iStr_o3), vmr_o3)) + call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations%set_vmr(active_gases_array(iStr_o2), gas_vmr(:,:,4))) + call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations%set_vmr(active_gases_array(iStr_co2), gas_vmr(:,:,1))) + call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations%set_vmr(active_gases_array(iStr_ch4), gas_vmr(:,:,3))) + call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations%set_vmr(active_gases_array(iStr_n2o), gas_vmr(:,:,2))) + call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations%set_vmr(active_gases_array(iStr_h2o), vmr_h2o)) + call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations%set_vmr(active_gases_array(iStr_o3), vmr_o3)) ! ####################################################################################### ! Compute diffusivity angle adjustments for each longwave band From a3cd7db3a278d2ab0ad787a608ad3d4cc73e5c76 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Tue, 18 Feb 2020 13:32:51 -0700 Subject: [PATCH 156/167] Remove using gas switches. --- physics/GFS_rrtmgp_pre.F90 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/physics/GFS_rrtmgp_pre.F90 b/physics/GFS_rrtmgp_pre.F90 index 29f1ac37e..cb2b79410 100644 --- a/physics/GFS_rrtmgp_pre.F90 +++ b/physics/GFS_rrtmgp_pre.F90 @@ -361,12 +361,12 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Statein, Coupling, Radtend, Sfcprop, ! Initialize and opulate RRTMGP DDT w/ gas-concentrations call check_error_msg('sw_gas_optics_init',gas_concentrations%init(active_gases_array)) - if (isActive_o2) call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations%set_vmr(active_gases_array(iStr_o2), gas_vmr(:,:,4))) - if (isActive_co2) call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations%set_vmr(active_gases_array(iStr_co2), gas_vmr(:,:,1))) - if (isActive_ch4) call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations%set_vmr(active_gases_array(iStr_ch4), gas_vmr(:,:,3))) - if (isActive_n2o) call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations%set_vmr(active_gases_array(iStr_n2o), gas_vmr(:,:,2))) - if (isActive_h2o) call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations%set_vmr(active_gases_array(iStr_h2o), vmr_h2o)) - if (isActive_o3) call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations%set_vmr(active_gases_array(iStr_o3), vmr_o3)) + call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations%set_vmr(active_gases_array(iStr_o2), gas_vmr(:,:,4))) + call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations%set_vmr(active_gases_array(iStr_co2), gas_vmr(:,:,1))) + call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations%set_vmr(active_gases_array(iStr_ch4), gas_vmr(:,:,3))) + call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations%set_vmr(active_gases_array(iStr_n2o), gas_vmr(:,:,2))) + call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations%set_vmr(active_gases_array(iStr_h2o), vmr_h2o)) + call check_error_msg('GFS_rrtmgp_pre_run',gas_concentrations%set_vmr(active_gases_array(iStr_o3), vmr_o3)) ! ####################################################################################### ! Compute diffusivity angle adjustments for each longwave band From 6d552308db8258e843f56ff33339b57c2a94efab Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Tue, 18 Feb 2020 14:04:49 -0700 Subject: [PATCH 157/167] Chnaged intent of lw_cloud_optical_props --- physics/rrtmgp_lw_rte.F90 | 2 +- physics/rrtmgp_lw_rte.meta | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/physics/rrtmgp_lw_rte.F90 b/physics/rrtmgp_lw_rte.F90 index cf0d0ea42..66371f06b 100644 --- a/physics/rrtmgp_lw_rte.F90 +++ b/physics/rrtmgp_lw_rte.F90 @@ -52,9 +52,9 @@ subroutine rrtmgp_lw_rte_run(doLWrad, nCol, nLev, p_lay, t_lay, p_lev, skt, lw_g type(ty_source_func_lw),intent(in) :: & sources ! RRTMGP DDT: longwave source functions type(ty_optical_props_1scl),intent(inout) :: & - lw_optical_props_clouds, & ! RRTMGP DDT: longwave cloud radiative properties lw_optical_props_clrsky ! RRTMGP DDT: longwave clear-sky radiative properties type(ty_optical_props_1scl),intent(in) :: & + lw_optical_props_clouds, & ! RRTMGP DDT: longwave cloud radiative properties lw_optical_props_aerosol ! RRTMGP DDT: longwave aerosol radiative properties real(kind_phys), dimension(lw_gas_props%get_nband(),ncol),intent(in) :: & secdiff diff --git a/physics/rrtmgp_lw_rte.meta b/physics/rrtmgp_lw_rte.meta index c0aaee09f..e85a607fa 100644 --- a/physics/rrtmgp_lw_rte.meta +++ b/physics/rrtmgp_lw_rte.meta @@ -100,7 +100,7 @@ units = DDT dimensions = () type = ty_optical_props_1scl - intent = inout + intent = in optional = F [lw_optical_props_aerosol] standard_name = longwave_optical_properties_for_aerosols From ab6c12eb92075fbaa7bb0babee68b1326385ed23 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Tue, 18 Feb 2020 14:23:43 -0700 Subject: [PATCH 158/167] Switch back hprime to hprime(:,1) --- physics/rrtmgp_lw_pre.F90 | 4 ++-- physics/rrtmgp_lw_pre.meta | 8 ++++---- physics/rrtmgp_lw_rte.F90 | 10 +++++----- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/physics/rrtmgp_lw_pre.F90 b/physics/rrtmgp_lw_pre.F90 index 6508e4a10..dfc07ff2b 100644 --- a/physics/rrtmgp_lw_pre.F90 +++ b/physics/rrtmgp_lw_pre.F90 @@ -46,7 +46,7 @@ subroutine rrtmgp_lw_pre_run (doLWrad, nCol, lon, lat, slmsk, zorl, snowd, sncov snowd, & ! water equivalent snow depth (mm) sncovr, & ! Surface snow are fraction (1) tsfc ! Surface skin temperature (K) - real(kind_phys), dimension(nCol), intent(in) :: & + real(kind_phys), dimension(nCol,nmtvr), intent(in) :: & hprime ! Standard deviation of subgrid orography type(ty_gas_optics_rrtmgp),intent(in) :: & @@ -72,7 +72,7 @@ subroutine rrtmgp_lw_pre_run (doLWrad, nCol, lon, lat, slmsk, zorl, snowd, sncov ! ####################################################################################### ! Call module_radiation_surface::setemis(),to setup surface emissivity for LW radiation. ! ####################################################################################### - call setemis (lon, lat, slmsk, snowd, sncovr, zorl, tsfc, tsfc, hprime, nCol, sfc_emiss) + call setemis (lon, lat, slmsk, snowd, sncovr, zorl, tsfc, tsfc, hprime(:,1), nCol, sfc_emiss) ! Assign same emissivity to all bands do iBand=1,lw_gas_props%get_nband() diff --git a/physics/rrtmgp_lw_pre.meta b/physics/rrtmgp_lw_pre.meta index 23036653a..667020d59 100644 --- a/physics/rrtmgp_lw_pre.meta +++ b/physics/rrtmgp_lw_pre.meta @@ -89,10 +89,10 @@ intent = in optional = F [hprime] - standard_name = standard_deviation_of_subgrid_orography - long_name = standard deviation of subgrid orography - units = m - dimensions = (horizontal_dimension) + standard_name = statistical_measures_of_subgrid_orography + long_name = orographic metrics + units = various + dimensions = (horizontal_dimension,number_of_statistical_measures_of_subgrid_orography) type = real kind = kind_phys intent = in diff --git a/physics/rrtmgp_lw_rte.F90 b/physics/rrtmgp_lw_rte.F90 index 66371f06b..94c9b741e 100644 --- a/physics/rrtmgp_lw_rte.F90 +++ b/physics/rrtmgp_lw_rte.F90 @@ -136,11 +136,11 @@ subroutine rrtmgp_lw_rte_run(doLWrad, nCol, nLev, p_lay, t_lay, p_lev, skt, lw_g ! ! Apply diffusivity angle adjustment (RRTMG legacy) - do iCol=1,nCol - do iBand=1,lw_gas_props%get_nband() - lw_optical_props_clouds%tau(iCol,1:nLev,iBand) = lw_optical_props_clouds%tau(iCol,1:nLev,iBand)*secdiff(iBand,iCol) - enddo - enddo + !do iCol=1,nCol + ! do iBand=1,lw_gas_props%get_nband() + ! lw_optical_props_clouds%tau(iCol,1:nLev,iBand) = lw_optical_props_clouds%tau(iCol,1:nLev,iBand)*secdiff(iBand,iCol) + ! enddo + !enddo ! Add cloud optics to clear-sky optics call check_error_msg('rrtmgp_lw_rte_run',lw_optical_props_clouds%increment(lw_optical_props_clrsky)) From b57ebfd04e71bd5edcfe2b5cccda4f28b8f0d6eb Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Tue, 18 Feb 2020 14:49:30 -0700 Subject: [PATCH 159/167] Revert earleir change. --- physics/rrtmgp_lw_cloud_sampling.F90 | 1 - 1 file changed, 1 deletion(-) diff --git a/physics/rrtmgp_lw_cloud_sampling.F90 b/physics/rrtmgp_lw_cloud_sampling.F90 index c0c319449..51f512853 100644 --- a/physics/rrtmgp_lw_cloud_sampling.F90 +++ b/physics/rrtmgp_lw_cloud_sampling.F90 @@ -106,7 +106,6 @@ subroutine rrtmgp_lw_cloud_sampling_run(doLWrad, nCol, nLev, ipsdlw0, icseed_lw, ! Call McICA select case ( iovrlw ) - case(0) ! Maximumn-random case(1) call check_error_msg('rrtmgp_lw_cloud_sampling_run',sampled_mask_max_ran(rng3D,cld_frac,cldfracMCICA)) From 1d92cfaff0dba748ad8005dcd4c579111035a2e9 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Tue, 18 Feb 2020 15:54:04 -0700 Subject: [PATCH 160/167] Reverted changes to GFS_rrtmgp_sw_pre.F90 --- physics/GFS_rrtmgp_sw_pre.F90 | 101 +++++------ physics/GFS_rrtmgp_sw_pre.meta | 296 ++++----------------------------- 2 files changed, 78 insertions(+), 319 deletions(-) diff --git a/physics/GFS_rrtmgp_sw_pre.F90 b/physics/GFS_rrtmgp_sw_pre.F90 index 8fc126392..6987c3e4a 100644 --- a/physics/GFS_rrtmgp_sw_pre.F90 +++ b/physics/GFS_rrtmgp_sw_pre.F90 @@ -2,6 +2,14 @@ module GFS_rrtmgp_sw_pre use physparam use machine, only: & kind_phys ! Working type + use GFS_typedefs, only: & + GFS_sfcprop_type, & ! Surface fields + GFS_control_type, & ! Model control parameters + GFS_grid_type, & ! Grid and interpolation related data + GFS_coupling_type, & ! + GFS_statein_type, & ! + GFS_radtend_type, & ! Radiation tendencies needed in physics + GFS_interstitial_type use module_radiation_astronomy,only: & coszmn ! Function to compute cos(SZA) use module_radiation_surface, only: & @@ -27,57 +35,29 @@ end subroutine GFS_rrtmgp_sw_pre_init !> \section arg_table_GFS_rrtmgp_sw_pre_run !! \htmlinclude GFS_rrtmgp_sw_pre.html !! - subroutine GFS_rrtmgp_sw_pre_run(doLWrad, do_sfcperts, ncol, nlev, ntrac, nsfcpert, nmtvr,mpi_rank, solhr, & - pertalb, sfc_wts, xlon, coslat, sinlat, slmsk, snowd, sncovr, snoalb, zorl, coszen, coszdg, tsfc,& - hprime, alvsf, alnsf, alvwf, alnwf, facsf, facwf, fice, tisfc, p_lay, p_lev, tv_lay, & - relhum, tracer, sw_gas_props, nday, idxday, alb1d, sfalb, sfc_alb_nir_dir, sfc_alb_nir_dif, & - sfc_alb_uvvis_dir, sfc_alb_uvvis_dif, errmsg, errflg) + subroutine GFS_rrtmgp_sw_pre_run(Model, Grid, Sfcprop, Statein, ncol, p_lay, p_lev, & + tv_lay, relhum, tracer, sw_gas_props, nday, idxday, alb1d, sfc_alb_nir_dir, & + sfc_alb_nir_dif, sfc_alb_uvvis_dir, sfc_alb_uvvis_dif, RadTend, Coupling, & + errmsg, errflg) ! Inputs - logical, intent(in) :: & - doLWrad , & ! Flag for longwave radiation call - do_sfcperts ! Flag for stochastic surface perturbations option - + type(GFS_control_type), intent(in) :: & + Model ! DDT: FV3-GFS model control parameters + type(GFS_grid_type), intent(in) :: & + Grid ! DDT: FV3-GFS grid and interpolation related data + type(GFS_sfcprop_type), intent(in) :: & + Sfcprop ! DDT: FV3-GFS surface fields + type(GFS_statein_type), intent(in) :: & + Statein ! DDT: FV3-GFS prognostic state data in from dycore integer, intent(in) :: & - ncol, & ! Number of horizontal grid points - nlev, & ! Number of vertical levels - ntrac, & ! Number of tracers - nsfcpert, & ! number of surface perturbations - nmtvr, & ! number of topographic variables in GWD - mpi_rank ! Current MPI-rank - real(kind_phys), intent(in) :: & - solhr ! Time after 00z at the current timestep (hours) - real(kind_phys), dimension(nsfcpert), intent(in) :: & - pertalb ! Magnitude of surface albedo perturbation - real(kind_phys), dimension(ncol,nsfcpert), intent(in) :: & - sfc_wts ! Magnitude of surface albedo perturbation - real(kind_phys), dimension(ncol), intent(in) :: & - xlon, & ! Longitude - coslat, & ! Cosine of latitude - sinlat, & ! Sine of latitude - slmsk, & ! Lank/sea mask - snowd, & ! Water equivalent snow depth (mm) - sncovr, & ! Surface snow area fraction - snoalb, & ! Maximum snow albedo - zorl, & ! Surface roughness length - tsfc, & ! Surface skin temperature (K) - alvsf, & ! Mean vis albedo with strong cosz dependency - alnsf, & ! Mean nIR albedo with strong cosz dependency - alvwf, & ! Mean vis albedo with weak cosz dependency - alnwf, & ! Mean nIR albedo with weak cosz dependency - facsf, & ! Fractional coverage with strong cosz dependency - facwf, & ! Fractional coverage with weak cosz dependency - fice, & ! Ice fraction over open water - tisfc ! Sea ice surface skin temperature - real(kind_phys), dimension(ncol), intent(in) :: & - hprime ! orographic metrics - real(kind_phys), dimension(ncol,nlev),intent(in) :: & + ncol ! Number of horizontal grid points + real(kind_phys), dimension(ncol,Model%levs),intent(in) :: & p_lay, & ! Layer pressure tv_lay, & ! Layer virtual-temperature relhum ! Layer relative-humidity - real(kind_phys), dimension(ncol, nlev, 2:ntrac),intent(in) :: & - tracer ! Chemical tracers (g/g) - real(kind_phys), dimension(ncol,nlev+1),intent(in) :: & + real(kind_phys), dimension(ncol, Model%levs, 2:Model%ntrac),intent(in) :: & + tracer + real(kind_phys), dimension(ncol,Model%levs+1),intent(in) :: & p_lev ! Pressure @ layer interfaces (Pa) type(ty_gas_optics_rrtmgp),intent(in) :: & sw_gas_props ! RRTMGP DDT: spectral information for SW calculation @@ -88,15 +68,16 @@ subroutine GFS_rrtmgp_sw_pre_run(doLWrad, do_sfcperts, ncol, nlev, ntrac, nsfcpe integer, dimension(ncol), intent(out) :: & idxday ! Indices for daylit points real(kind_phys), dimension(ncol), intent(out) :: & - coszen, & ! mean cos of zenith angle over rad call period - coszdg, & ! daytime mean cosz over rad call period - sfalb, & ! mean surface diffused SW albedo - alb1d ! Surface albedo pertubation + alb1d ! Surface albedo pertubation real(kind_phys), dimension(sw_gas_props%get_nband(),ncol), intent(out) :: & sfc_alb_nir_dir, & ! Surface albedo (direct) sfc_alb_nir_dif, & ! Surface albedo (diffuse) sfc_alb_uvvis_dir, & ! Surface albedo (direct) sfc_alb_uvvis_dif ! Surface albedo (diffuse) + type(GFS_radtend_type), intent(inout) :: & + Radtend ! DDT: FV3-GFS radiation tendencies + type(GFS_coupling_type), intent(inout) :: & + Coupling ! DDT: FV3-GFS coupling arrays character(len=*), intent(out) :: & errmsg ! Error message integer, intent(out) :: & @@ -110,13 +91,13 @@ subroutine GFS_rrtmgp_sw_pre_run(doLWrad, do_sfcperts, ncol, nlev, ntrac, nsfcpe errmsg = '' errflg = 0 - if (.not. doLWrad) return + if (.not. Model%lsswr) return ! ####################################################################################### ! Compute cosine of zenith angle (only when SW is called) ! ####################################################################################### - call coszmn (xlon, sinlat, coslat, solhr, NCOL, mpi_rank, & - coszen, coszdg) + call coszmn (Grid%xlon, Grid%sinlat, Grid%coslat, Model%solhr, NCOL, Model%me, & + Radtend%coszen, Radtend%coszdg) ! ####################################################################################### ! For SW gather daylit points @@ -124,7 +105,7 @@ subroutine GFS_rrtmgp_sw_pre_run(doLWrad, do_sfcperts, ncol, nlev, ntrac, nsfcpe nday = 0 idxday = 0 do i = 1, NCOL - if (coszen(i) >= 0.0001) then + if (Radtend%coszen(i) >= 0.0001) then nday = nday + 1 idxday(nday) = i endif @@ -136,10 +117,10 @@ subroutine GFS_rrtmgp_sw_pre_run(doLWrad, do_sfcperts, ncol, nlev, ntrac, nsfcpe ! --- turn vegetation fraction pattern into percentile pattern ! ####################################################################################### alb1d(:) = 0. - if (do_sfcperts) then - if (pertalb(1) > 0.) then + if (Model%do_sfcperts) then + if (Model%pertalb(1) > 0.) then do i=1,ncol - call cdfnor(sfc_wts(i,5),alb1d(i)) + call cdfnor(Coupling%sfc_wts(i,5),alb1d(i)) enddo endif endif @@ -147,11 +128,13 @@ subroutine GFS_rrtmgp_sw_pre_run(doLWrad, do_sfcperts, ncol, nlev, ntrac, nsfcpe ! ####################################################################################### ! Call module_radiation_surface::setalb() to setup surface albedo. ! ####################################################################################### - call setalb (slmsk, snowd, sncovr, snoalb, zorl, coszen, tsfc, tsfc, hprime, alvsf, & - alnsf, alvwf, alnwf, facsf, facwf, fice, tisfc, NCOL, alb1d, pertalb, sfcalb) + call setalb (Sfcprop%slmsk, Sfcprop%snowd, Sfcprop%sncovr, Sfcprop%snoalb, Sfcprop%zorl, & + Radtend%coszen, Sfcprop%tsfc, Sfcprop%tsfc, Sfcprop%hprime(:,1), Sfcprop%alvsf, & + Sfcprop%alnsf, Sfcprop%alvwf, Sfcprop%alnwf, Sfcprop%facsf, Sfcprop%facwf, & + Sfcprop%fice, Sfcprop%tisfc, NCOL, alb1d, Model%pertalb, sfcalb) ! Approximate mean surface albedo from vis- and nir- diffuse values. - sfalb(:) = max(0.01, 0.5 * (sfcalb(:,2) + sfcalb(:,4))) + Radtend%sfalb(:) = max(0.01, 0.5 * (sfcalb(:,2) + sfcalb(:,4))) ! Spread across all SW bands do iBand=1,sw_gas_props%get_nband() diff --git a/physics/GFS_rrtmgp_sw_pre.meta b/physics/GFS_rrtmgp_sw_pre.meta index 453c12de2..73df740e1 100644 --- a/physics/GFS_rrtmgp_sw_pre.meta +++ b/physics/GFS_rrtmgp_sw_pre.meta @@ -1,259 +1,62 @@ [ccpp-arg-table] name = GFS_rrtmgp_sw_pre_run type = scheme -[xlon] - standard_name = longitude - long_name = longitude - units = radians - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[coslat] - standard_name = cosine_of_latitude - long_name = cosine of latitude - units = none - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[sinlat] - standard_name = sine_of_latitude - long_name = sine of latitude - units = none - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[ntrac] - standard_name = number_of_tracers - long_name = number of tracers - units = count - dimensions = () - type = integer - intent = in - optional = F -[nlev] - standard_name = vertical_dimension - long_name = number of vertical levels - units = count +[Model] + standard_name = GFS_control_type_instance + long_name = instance of derived type GFS_control_type + units = DDT dimensions = () - type = integer + type = GFS_control_type intent = in optional = F -[ncol] - standard_name = horizontal_loop_extent - long_name = horizontal loop extent - units = count +[Grid] + standard_name = GFS_grid_type_instance + long_name = instance of derived type GFS_grid_type + units = DDT dimensions = () - type = integer + type = GFS_grid_type intent = in optional = F -[nsfcpert] - standard_name = number_of_surface_perturbations - long_name = number of surface perturbations - units = count +[Sfcprop] + standard_name = GFS_sfcprop_type_instance + long_name = instance of derived type GFS_sfcprop_type + units = DDT dimensions = () - type = integer + type = GFS_sfcprop_type intent = in optional = F -[nmtvr] - standard_name = number_of_statistical_measures_of_subgrid_orography - long_name = number of topographic variables in GWD - units = count +[Statein] + standard_name = GFS_statein_type_instance + long_name = instance of derived type GFS_statein_type + units = DDT dimensions = () - type = integer + type = GFS_statein_type intent = in optional = F -[doLWrad] - standard_name = flag_to_calc_sw - long_name = logical flags for sw radiation calls - units = flag +[Radtend] + standard_name = GFS_radtend_type_instance + long_name = instance of derived type GFS_radtend_type + units = DDT dimensions = () - type = logical - intent = in + type = GFS_radtend_type + intent = inout optional = F -[solhr] - standard_name = forecast_hour_of_the_day - long_name = time in hours after 00z at the current timestep - units = h +[Coupling] + standard_name = GFS_coupling_type_instance + long_name = Fortran DDT containing FV3-GFS fields to/from coupling with other components + units = DDT dimensions = () - type = real - kind = kind_phys - intent = in + type = GFS_coupling_type + intent = inout optional = F -[mpi_rank] - standard_name = mpi_rank - long_name = current MPI-rank - units = index +[ncol] + standard_name = horizontal_loop_extent + long_name = horizontal loop extent + units = count dimensions = () type = integer intent = in optional = F -[do_sfcperts] - standard_name = flag_for_stochastic_surface_perturbations - long_name = flag for stochastic surface perturbations option - units = flag - dimensions = () - type = logical - intent = in - optional = F -[pertalb] - standard_name = magnitude_of_surface_albedo_perturbation - long_name = magnitude of surface albedo perturbation - units = frac - dimensions = (5) - type = real - kind = kind_phys - intent = in - optional = F -[slmsk] - standard_name = sea_land_ice_mask_real - long_name = landmask: sea/land/ice=0/1/2 - units = flag - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[snowd] - standard_name = surface_snow_thickness_water_equivalent - long_name = water equivalent snow depth - units = mm - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[sncovr] - standard_name = surface_snow_area_fraction_over_land - long_name = surface snow area fraction - units = frac - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[snoalb] - standard_name = upper_bound_on_max_albedo_over_deep_snow - long_name = maximum snow albedo - units = frac - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[zorl] - standard_name = surface_roughness_length - long_name = surface roughness length - units = cm - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[tsfc] - standard_name = surface_skin_temperature - long_name = surface skin temperature - units = K - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[hprime] - standard_name = standard_deviation_of_subgrid_orography - long_name = standard deviation of subgrid orography - units = m - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[alvwf] - standard_name = mean_vis_albedo_with_weak_cosz_dependency - long_name = mean vis albedo with weak cosz dependency - units = frac - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[alnwf] - standard_name = mean_nir_albedo_with_weak_cosz_dependency - long_name = mean nir albedo with weak cosz dependency - units = frac - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[alvsf] - standard_name = mean_vis_albedo_with_strong_cosz_dependency - long_name = mean vis albedo with strong cosz dependency - units = frac - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[alnsf] - standard_name = mean_nir_albedo_with_strong_cosz_dependency - long_name = mean nir albedo with strong cosz dependency - units = frac - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[facsf] - standard_name =fractional_coverage_with_strong_cosz_dependency - long_name = fractional coverage with strong cosz dependency - units = frac - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[facwf] - standard_name = fractional_coverage_with_weak_cosz_dependency - long_name = fractional coverage with weak cosz dependency - units = frac - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[fice] - standard_name = sea_ice_concentration - long_name = ice fraction over open water - units = frac - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[tisfc] - standard_name = sea_ice_temperature - long_name = sea ice surface skin temperature - units = K - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[sfc_wts] - standard_name = weights_for_stochastic_surface_physics_perturbation - long_name = weights for stochastic surface physics perturbation - units = none - dimensions = (horizontal_dimension,number_of_surface_perturbations) - type = real - kind = kind_phys - intent = in - optional = F [tv_lay] standard_name = virtual_temperature long_name = layer virtual temperature @@ -316,15 +119,6 @@ kind = kind_phys intent = out optional = F -[sfalb] - standard_name = surface_diffused_shortwave_albedo - long_name = mean surface diffused sw albedo - units = frac - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = out - optional = F [sfc_alb_nir_dir] standard_name = surface_albedo_nearIR_direct long_name = near-IR (direct) surface albedo (sfc_alb_nir_dir) @@ -361,24 +155,6 @@ kind = kind_phys intent = out optional = F -[coszen] - standard_name = cosine_of_zenith_angle - long_name = mean cos of zenith angle over rad call period - units = none - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = out - optional = F -[coszdg] - standard_name = daytime_mean_cosz_over_rad_call_period - long_name = daytime mean cosz over rad call period - units = none - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = out - optional = F [nday] standard_name = daytime_points_dimension long_name = daytime points dimension From e201f0846c163420136ff90114a53079dda1d00f Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Wed, 19 Feb 2020 10:25:45 -0700 Subject: [PATCH 161/167] Cleaned up rrtmgp_lw_pre.F90 --- physics/rrtmgp_lw_pre.F90 | 44 +++++++++++++++++--------------------- physics/rrtmgp_lw_pre.meta | 29 +++++++++++++------------ 2 files changed, 35 insertions(+), 38 deletions(-) diff --git a/physics/rrtmgp_lw_pre.F90 b/physics/rrtmgp_lw_pre.F90 index dfc07ff2b..0be239671 100644 --- a/physics/rrtmgp_lw_pre.F90 +++ b/physics/rrtmgp_lw_pre.F90 @@ -29,39 +29,35 @@ end subroutine rrtmgp_lw_pre_init !> \section arg_table_rrtmgp_lw_pre_run !! \htmlinclude rrtmgp_lw_pre.html !! - subroutine rrtmgp_lw_pre_run (doLWrad, nCol, lon, lat, slmsk, zorl, snowd, sncovr, tsfc, & - nmtvr, hprime, lw_gas_props, sfc_emiss_byband, errmsg, errflg) + subroutine rrtmgp_lw_pre_run (doLWrad, nCol, xlon, xlat, slmsk, zorl, snowd, sncovr, tsfc, & + hprime, lw_gas_props, sfc_emiss_byband, semis, errmsg, errflg) ! Inputs logical, intent(in) :: & - doLWrad ! Logical flag for longwave radiation call + doLWrad ! Logical flag for longwave radiation call integer, intent(in) :: & - nCol, & ! Number of horizontal grid points - nmtvr ! number of topographic variables in GWD + nCol ! Number of horizontal grid points real(kind_phys), dimension(nCol), intent(in) :: & - lon, & ! Longitude - lat, & ! Latitude - slmsk, & ! Land/sea/sea-ice mask - zorl, & ! Surface roughness length (cm) - snowd, & ! water equivalent snow depth (mm) - sncovr, & ! Surface snow are fraction (1) - tsfc ! Surface skin temperature (K) - real(kind_phys), dimension(nCol,nmtvr), intent(in) :: & - hprime ! Standard deviation of subgrid orography - + xlon, & ! Longitude + xlat, & ! Latitude + slmsk, & ! Land/sea/sea-ice mask + zorl, & ! Surface roughness length (cm) + snowd, & ! water equivalent snow depth (mm) + sncovr, & ! Surface snow are fraction (1) + tsfc, & ! Surface skin temperature (K) + hprime ! Standard deviation of subgrid orography type(ty_gas_optics_rrtmgp),intent(in) :: & - lw_gas_props ! RRTMGP DDT: spectral information for LW calculation + lw_gas_props ! RRTMGP DDT: spectral information for LW calculation ! Outputs real(kind_phys), dimension(lw_gas_props%get_nband(),ncol), intent(out) :: & - sfc_emiss_byband ! Surface emissivity in each band + sfc_emiss_byband ! Surface emissivity in each band character(len=*), intent(out) :: & - errmsg ! Error message + errmsg ! Error message integer, intent(out) :: & - errflg ! Error flag - - ! Local fields - real(kind_phys), dimension(nCol) :: sfc_emiss + errflg ! Error flag + real(kind_phys), dimension(nCol), intent(out) :: & + semis ! Initialize CCPP error handling variables errmsg = '' @@ -72,11 +68,11 @@ subroutine rrtmgp_lw_pre_run (doLWrad, nCol, lon, lat, slmsk, zorl, snowd, sncov ! ####################################################################################### ! Call module_radiation_surface::setemis(),to setup surface emissivity for LW radiation. ! ####################################################################################### - call setemis (lon, lat, slmsk, snowd, sncovr, zorl, tsfc, tsfc, hprime(:,1), nCol, sfc_emiss) + call setemis (xlon, xlat, slmsk, snowd, sncovr, zorl, tsfc, tsfc, hprime, nCol, semis) ! Assign same emissivity to all bands do iBand=1,lw_gas_props%get_nband() - sfc_emiss_byband(iBand,1:NCOL) = sfc_emiss(1:NCOL) + sfc_emiss_byband(iBand,:) = semis enddo end subroutine rrtmgp_lw_pre_run diff --git a/physics/rrtmgp_lw_pre.meta b/physics/rrtmgp_lw_pre.meta index 667020d59..5d1c518b6 100644 --- a/physics/rrtmgp_lw_pre.meta +++ b/physics/rrtmgp_lw_pre.meta @@ -17,15 +17,7 @@ type = integer intent = in optional = F -[nmtvr] - standard_name = number_of_statistical_measures_of_subgrid_orography - long_name = number of topographic variables in GWD - units = count - dimensions = () - type = integer - intent = in - optional = F -[lon] +[xlon] standard_name = longitude long_name = longitude units = radians @@ -34,7 +26,7 @@ kind = kind_phys intent = in optional = F -[lat] +[xlat] standard_name = latitude long_name = latitude units = radians @@ -89,10 +81,10 @@ intent = in optional = F [hprime] - standard_name = statistical_measures_of_subgrid_orography - long_name = orographic metrics - units = various - dimensions = (horizontal_dimension,number_of_statistical_measures_of_subgrid_orography) + standard_name = standard_deviation_of_subgrid_orography + long_name = standard deviation of subgrid orography + units = m + dimensions = (horizontal_dimension) type = real kind = kind_phys intent = in @@ -105,6 +97,15 @@ type = ty_gas_optics_rrtmgp intent = in optional = F +[semis] + standard_name = surface_longwave_emissivity + long_name = surface lw emissivity in fraction + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = out + optional = F [sfc_emiss_byband] standard_name = surface_emissivity_in_each_RRTMGP_LW_band long_name = surface emissivity in each RRTMGP LW band From 244d3efadedf9aee74787ea4374069c96ddb43e5 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Wed, 19 Feb 2020 14:54:07 -0700 Subject: [PATCH 162/167] Reverted some changes. --- .gitignore | 8 -------- physics/GFS_rrtmg_pre.F90 | 7 ++++--- physics/module_mp_thompson.F90 | 2 -- 3 files changed, 4 insertions(+), 13 deletions(-) delete mode 100644 .gitignore diff --git a/.gitignore b/.gitignore deleted file mode 100644 index c7b16950f..000000000 --- a/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -# Auto-generated include files in Fortran code -*.inc -physics/*cap.F90 -physics/*.xml -*.cmake -*.mk -*.html -physics/rte-rrtmgp \ No newline at end of file diff --git a/physics/GFS_rrtmg_pre.F90 b/physics/GFS_rrtmg_pre.F90 index 49b7acb69..61fb05879 100644 --- a/physics/GFS_rrtmg_pre.F90 +++ b/physics/GFS_rrtmg_pre.F90 @@ -3,6 +3,7 @@ module GFS_rrtmg_pre public GFS_rrtmg_pre_run + contains !> \defgroup GFS_rrtmg_pre GFS RRTMG Scheme Pre @@ -274,7 +275,7 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input tracer1(:,k1,j) = max(0.0, Statein%qgrs(:,k2,j)) enddo enddo - +! if (ivflip == 0) then ! input data from toa to sfc do i = 1, IM plvl(i,1+kd) = 0.01 * Statein%prsi(i,1) ! pa to mb (hpa) @@ -592,7 +593,6 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input enddo endif ! - if (Model%uni_cld) then if (Model%effr_in) then do k=1,lm @@ -690,12 +690,13 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input effrs(i,lyb) = effrs(i,lya) enddo endif - endif + endif if (Model%imp_physics == 99) then ccnd(1:IM,1:LMK,1) = ccnd(1:IM,1:LMK,1) + cnvw(1:IM,1:LMK) endif + if (Model%imp_physics == 99 .or. Model%imp_physics == 10) then ! zhao/moorthi's prognostic cloud scheme ! or unified cloud and/or with MG microphysics diff --git a/physics/module_mp_thompson.F90 b/physics/module_mp_thompson.F90 index af6645f7b..c1c0c201c 100644 --- a/physics/module_mp_thompson.F90 +++ b/physics/module_mp_thompson.F90 @@ -444,7 +444,6 @@ SUBROUTINE thompson_init(nwfa2d, nifa2d, nwfa, nifa, & LOGICAL, PARAMETER :: precomputed_tables = .FALSE. #endif - write(*,"(a45,3i20)") 'MODULE_MP_THOMPSON(thompson_init): MPI ranks: ',mpirank,mpiroot,mpicomm is_aerosol_aware = .FALSE. @@ -5586,7 +5585,6 @@ subroutine readwrite_tables(mode, mpicomm, mpirank, mpiroot, ierr) continue ierr = 0 - write(*,"(a45,3i20)") 'MODULE_MP_THOMPSON(readwrite_tables): MPI ranks: ',mpirank,mpiroot,mpicomm ! Test if SIONlib file containing pre-computed tables exists inquire(file=trim(filename), exist=exists) From 0e954b799ca362b748093b2a601a2c090ca98269 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Wed, 19 Feb 2020 14:57:25 -0700 Subject: [PATCH 163/167] Removed my login credential from .gitmodules. --- .gitmodules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitmodules b/.gitmodules index 45475032d..5fb7362ac 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,4 +1,4 @@ [submodule "physics/rte-rrtmgp"] path = physics/rte-rrtmgp - url = https://dustinswales@github.com/RobertPincus/rte-rrtmgp + url = https://github.com/RobertPincus/rte-rrtmgp branch = dtc/ccpp \ No newline at end of file From 93ae6cba0133ca8b990ff8314aa40e70f708ac55 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Wed, 19 Feb 2020 14:59:09 -0700 Subject: [PATCH 164/167] Removed deprecated files. --- physics/GFS_rrtmgp_gas_optics.F90 | 70 ------------------------------ physics/GFS_rrtmgp_gas_optics.meta | 46 -------------------- 2 files changed, 116 deletions(-) delete mode 100644 physics/GFS_rrtmgp_gas_optics.F90 delete mode 100644 physics/GFS_rrtmgp_gas_optics.meta diff --git a/physics/GFS_rrtmgp_gas_optics.F90 b/physics/GFS_rrtmgp_gas_optics.F90 deleted file mode 100644 index 9eff6567c..000000000 --- a/physics/GFS_rrtmgp_gas_optics.F90 +++ /dev/null @@ -1,70 +0,0 @@ -module GFS_rrtmgp_gas_optics - use machine, only: kind_phys - use GFS_typedefs, only: GFS_control_type,GFS_radtend_type - - public GFS_rrtmgp_gas_optics_init,GFS_rrtmgp_gas_optics_run,GFS_rrtmgp_gas_optics_finalize -contains - - ! ######################################################################################### - ! SUBROUTINE GFS_rrtmgp_gas_optics_init() - ! ######################################################################################### -!! \section arg_table_GFS_rrtmgp_gas_optics_init -!! \htmlinclude GFS_rrtmgp_gas_optics.html -!! - subroutine GFS_rrtmgp_gas_optics_init(Model, Radtend, errmsg, errflg) - ! Inputs - type(GFS_control_type), intent(in) :: & - Model ! DDT containing model control parameters - type(GFS_radtend_type), intent(inout) :: & - Radtend ! Fortran DDT containing FV3-GFS radiation tendencies - ! Outputs - character(len=*), intent(out) :: & - errmsg ! Error message - integer, intent(out) :: & - errflg ! Error flag - - ! Local variables - character(len=1) :: tempstr - integer :: ij, count - integer,dimension(Model%ngases,2) :: gasIndices - - ! Initialize - errmsg = '' - errflg = 0 - - ! Which gases are active? Provided via physics namelist. - if (len(Model%active_gases) .gt. 0) then - - ! Pull out gas names from list... - ! First grab indices in character array corresponding to start:end of gas name. - gasIndices(1,1)=1 - count=1 - do ij=1,len(Model%active_gases) - tempstr=trim(Model%active_gases(ij:ij)) - if (tempstr .eq. '_') then - gasIndices(count,2)=ij-1 - gasIndices(count+1,1)=ij+1 - count=count+1 - endif - enddo - gasIndices(Model%ngases,2)=len(trim(Model%active_gases)) - ! Now extract the gas names - do ij=1,Model%ngases - Radtend%active_gases(ij) = Model%active_gases(gasIndices(ij,1):gasIndices(ij,2)) - enddo - endif - end subroutine GFS_rrtmgp_gas_optics_init - - ! ######################################################################################### - ! SUBROUTINE GFS_rrtmgp_gas_optics_run - ! ######################################################################################### - subroutine GFS_rrtmgp_gas_optics_run() - end subroutine GFS_rrtmgp_gas_optics_run - - ! ######################################################################################### - ! SUBROUTINE GFS_rrtmgp_gas_optics_finalize - ! ######################################################################################### - subroutine GFS_rrtmgp_gas_optics_finalize() - end subroutine GFS_rrtmgp_gas_optics_finalize - -end module GFS_rrtmgp_gas_optics diff --git a/physics/GFS_rrtmgp_gas_optics.meta b/physics/GFS_rrtmgp_gas_optics.meta deleted file mode 100644 index 3179ce484..000000000 --- a/physics/GFS_rrtmgp_gas_optics.meta +++ /dev/null @@ -1,46 +0,0 @@ -[ccpp-arg-table] - name = GFS_rrtmgp_gas_optics_init - type = scheme -[Model] - standard_name = GFS_control_type_instance - long_name = instance of derived type GFS_control_type - units = DDT - dimensions = () - type = GFS_control_type - intent = in - optional = F -[Radtend] - standard_name = GFS_radtend_type_instance - long_name = instance of derived type GFS_radtend_type - units = DDT - dimensions = () - type = GFS_radtend_type - intent = inout - optional = F -[errmsg] - standard_name = ccpp_error_message - long_name = error message for error handling in CCPP - units = none - dimensions = () - type = character - kind = len=* - intent = out - optional = F -[errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag - dimensions = () - type = integer - intent = out - optional = F - -######################################################################## -[ccpp-arg-table] - name = GFS_rrtmgp_gas_optics_run - type = scheme - -######################################################################## -[ccpp-arg-table] - name = GFS_rrtmgp_gas_optics_finalize - type = scheme \ No newline at end of file From 75fdb61479ae836bb81795438436a6a58f9fbd6f Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Wed, 19 Feb 2020 15:16:15 -0700 Subject: [PATCH 165/167] Reverted some changes --- physics/GFS_rrtmg_pre.F90 | 2 +- physics/module_mp_thompson.F90 | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/physics/GFS_rrtmg_pre.F90 b/physics/GFS_rrtmg_pre.F90 index 61fb05879..775dc66f4 100644 --- a/physics/GFS_rrtmg_pre.F90 +++ b/physics/GFS_rrtmg_pre.F90 @@ -690,7 +690,7 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input effrs(i,lyb) = effrs(i,lya) enddo endif - endif + endif if (Model%imp_physics == 99) then ccnd(1:IM,1:LMK,1) = ccnd(1:IM,1:LMK,1) + cnvw(1:IM,1:LMK) diff --git a/physics/module_mp_thompson.F90 b/physics/module_mp_thompson.F90 index c1c0c201c..b1ca6ba07 100644 --- a/physics/module_mp_thompson.F90 +++ b/physics/module_mp_thompson.F90 @@ -444,8 +444,6 @@ SUBROUTINE thompson_init(nwfa2d, nifa2d, nwfa, nifa, & LOGICAL, PARAMETER :: precomputed_tables = .FALSE. #endif - - is_aerosol_aware = .FALSE. micro_init = .FALSE. From 36de8f56671b03217d14853745219ef611732384 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Thu, 27 Feb 2020 13:55:27 -0700 Subject: [PATCH 166/167] Added mpi_bast commands back in --- physics/rrtmgp_lw_gas_optics.F90 | 63 +++++++++++++++++++++++++++++++- 1 file changed, 61 insertions(+), 2 deletions(-) diff --git a/physics/rrtmgp_lw_gas_optics.F90 b/physics/rrtmgp_lw_gas_optics.F90 index 8797973f3..d9ff2c572 100644 --- a/physics/rrtmgp_lw_gas_optics.F90 +++ b/physics/rrtmgp_lw_gas_optics.F90 @@ -8,6 +8,9 @@ module rrtmgp_lw_gas_optics use mo_compute_bc, only: compute_bc use rrtmgp_aux, only: check_error_msg use netcdf +#ifdef MPI + use mpi +#endif contains @@ -102,6 +105,9 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp integer,dimension(:),allocatable :: temp1, temp2, temp3, temp4, & temp_log_array1, temp_log_array2, temp_log_array3, temp_log_array4 character(len=264) :: lw_gas_props_file +#ifdef MPI + integer :: mpierr +#endif ! Initialize errmsg = '' @@ -113,7 +119,7 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp lw_gas_props_file = trim(rrtmgp_root_dir)//trim(rrtmgp_lw_file_gas) ! On master processor only... -! if (mpirank .eq. mpiroot) then + if (mpirank .eq. mpiroot) then ! Open file status = nf90_open(trim(lw_gas_props_file), NF90_WRITE, ncid) @@ -254,7 +260,60 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp ! Close file status = nf90_close(ncid) -! endif + endif + +#ifdef MPI + ! Wait for processor 0 to catch up... + call MPI_BARRIER(mpicomm, mpierr) + ! Broadcast data + write (*,*) 'Broadcasting RRTMGP longwave k-distribution data ... ' + call MPI_BCAST(ntemps, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(npress, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nminorabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nextrabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nmixingfracs, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nlayers, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nbnds, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(ngpts, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(npairs, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(ncontributors_lower, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(ncontributors_upper, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nminor_absorber_intervals_lower, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(nminor_absorber_intervals_upper, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(ninternalSourcetemps, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(minor_limits_gpt_upper, size(minor_limits_gpt_upper), MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(minor_limits_gpt_lower, size(minor_limits_gpt_lower), MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(kminor_start_upper, size(kminor_start_upper), MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(kminor_start_lower, size(kminor_start_lower), MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(key_species, size(key_species), MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(band2gpt, size(band2gpt), MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(band_lims, size(band_lims), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(press_ref, size(press_ref), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(temp_ref, size(temp_ref), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(kminor_lower, size(kminor_lower), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(kminor_upper, size(kminor_upper), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(scaling_gas_lower, size(scaling_gas_lower), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(scaling_gas_upper, size(scaling_gas_upper), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(vmr_ref, size(vmr_ref), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(kmajor, size(kmajor), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(temp_ref_p, 1, MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(temp_ref_t, 1, MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(press_ref_trop, 1, MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(totplnk, size(totplnk), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(planck_frac, size(planck_frac), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(gas_names, size(gas_names), MPI_CHARACTER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(gas_minor, size(gas_minor), MPI_CHARACTER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(identifier_minor, size(identifier_minor), MPI_CHARACTER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(minor_gases_lower, size(minor_gases_lower), MPI_CHARACTER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(minor_gases_upper, size(minor_gases_upper), MPI_CHARACTER, mpiroot, mpicomm, mpierr) + call MPI_BCAST(minor_scales_with_density_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(scale_by_complement_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(minor_scales_with_density_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, mpierr) + call MPI_BCAST(scale_by_complement_upper, nminor_absorber_intervals_upper, MPI_LOGICAL, mpiroot, mpicomm, mpierr) + ! Don't advance until data broadcast complete on all processors + call MPI_BARRIER(mpicomm, mpierr) +#endif ! Initialize gas concentrations and gas optics class call check_error_msg('lw_gas_optics_init',gas_concentrations%init(active_gases_array)) From 43e0e38d9553742aa681e34213cc2cdfbd3bca4e Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Thu, 27 Feb 2020 15:49:56 -0700 Subject: [PATCH 167/167] Try adding many mpi_barrier commands --- physics/rrtmgp_lw_gas_optics.F90 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/physics/rrtmgp_lw_gas_optics.F90 b/physics/rrtmgp_lw_gas_optics.F90 index d9ff2c572..b6300089f 100644 --- a/physics/rrtmgp_lw_gas_optics.F90 +++ b/physics/rrtmgp_lw_gas_optics.F90 @@ -282,17 +282,20 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp call MPI_BCAST(nminor_absorber_intervals_lower, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) call MPI_BCAST(nminor_absorber_intervals_upper, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) call MPI_BCAST(ninternalSourcetemps, 1, MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BARRIER(mpicomm, mpierr) call MPI_BCAST(minor_limits_gpt_upper, size(minor_limits_gpt_upper), MPI_INTEGER, mpiroot, mpicomm, mpierr) call MPI_BCAST(minor_limits_gpt_lower, size(minor_limits_gpt_lower), MPI_INTEGER, mpiroot, mpicomm, mpierr) call MPI_BCAST(kminor_start_upper, size(kminor_start_upper), MPI_INTEGER, mpiroot, mpicomm, mpierr) call MPI_BCAST(kminor_start_lower, size(kminor_start_lower), MPI_INTEGER, mpiroot, mpicomm, mpierr) call MPI_BCAST(key_species, size(key_species), MPI_INTEGER, mpiroot, mpicomm, mpierr) + call MPI_BARRIER(mpicomm, mpierr) call MPI_BCAST(band2gpt, size(band2gpt), MPI_INTEGER, mpiroot, mpicomm, mpierr) call MPI_BCAST(band_lims, size(band_lims), MPI_REAL, mpiroot, mpicomm, mpierr) call MPI_BCAST(press_ref, size(press_ref), MPI_REAL, mpiroot, mpicomm, mpierr) call MPI_BCAST(temp_ref, size(temp_ref), MPI_REAL, mpiroot, mpicomm, mpierr) call MPI_BCAST(kminor_lower, size(kminor_lower), MPI_REAL, mpiroot, mpicomm, mpierr) call MPI_BCAST(kminor_upper, size(kminor_upper), MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BARRIER(mpicomm, mpierr) call MPI_BCAST(scaling_gas_lower, size(scaling_gas_lower), MPI_REAL, mpiroot, mpicomm, mpierr) call MPI_BCAST(scaling_gas_upper, size(scaling_gas_upper), MPI_REAL, mpiroot, mpicomm, mpierr) call MPI_BCAST(vmr_ref, size(vmr_ref), MPI_REAL, mpiroot, mpicomm, mpierr) @@ -300,12 +303,14 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp call MPI_BCAST(temp_ref_p, 1, MPI_REAL, mpiroot, mpicomm, mpierr) call MPI_BCAST(temp_ref_t, 1, MPI_REAL, mpiroot, mpicomm, mpierr) call MPI_BCAST(press_ref_trop, 1, MPI_REAL, mpiroot, mpicomm, mpierr) + call MPI_BARRIER(mpicomm, mpierr) call MPI_BCAST(totplnk, size(totplnk), MPI_REAL, mpiroot, mpicomm, mpierr) call MPI_BCAST(planck_frac, size(planck_frac), MPI_REAL, mpiroot, mpicomm, mpierr) call MPI_BCAST(gas_names, size(gas_names), MPI_CHARACTER, mpiroot, mpicomm, mpierr) call MPI_BCAST(gas_minor, size(gas_minor), MPI_CHARACTER, mpiroot, mpicomm, mpierr) call MPI_BCAST(identifier_minor, size(identifier_minor), MPI_CHARACTER, mpiroot, mpicomm, mpierr) call MPI_BCAST(minor_gases_lower, size(minor_gases_lower), MPI_CHARACTER, mpiroot, mpicomm, mpierr) + call MPI_BARRIER(mpicomm, mpierr) call MPI_BCAST(minor_gases_upper, size(minor_gases_upper), MPI_CHARACTER, mpiroot, mpicomm, mpierr) call MPI_BCAST(minor_scales_with_density_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, mpierr) call MPI_BCAST(scale_by_complement_lower, nminor_absorber_intervals_lower, MPI_LOGICAL, mpiroot, mpicomm, mpierr)