@@ -2,6 +2,7 @@ module RRTMGPInterface
2
2
3
3
import .. AbstractCloudInRadiation
4
4
5
+ import NCDatasets as NC
5
6
using RRTMGP
6
7
import RRTMGP. AtmosphericStates as AS
7
8
using ClimaCore: DataLayouts, Spaces, Fields
@@ -318,8 +319,7 @@ top/bottom of the atmosphere can be specified as a scalar, or as the full 1D
318
319
array.
319
320
320
321
# Positional Arguments
321
- - `data_loader(callback::Function, file_name)`: a function for
322
- loading RRTMGP.jl artifacts, stored in `RRTMGPReferenceData/<file_name>`.
322
+ - Artifacts stored in `RRTMGPReferenceData/<file_name>`.
323
323
Should be callable with filenames:
324
324
- `lookup_tables/clearsky_lw.nc`
325
325
- `lookup_tables/cloudysky_lw.nc`
@@ -410,7 +410,6 @@ array.
410
410
"""
411
411
function RRTMGPModel (
412
412
params:: RRTMGP.Parameters.ARP ,
413
- data_loader:: Function ,
414
413
context;
415
414
ncol:: Int ,
416
415
domain_nlay:: Int ,
@@ -486,7 +485,7 @@ function RRTMGPModel(
486
485
nbnd_lw = 1
487
486
else
488
487
local lookup_lw, idx_gases
489
- data_loader (RRTMGP. ArtifactPaths. get_lookup_filename (:gas , :lw )) do ds
488
+ NC . Dataset (RRTMGP. ArtifactPaths. get_lookup_filename (:gas , :lw )) do ds
490
489
lookup_lw, idx_gases = RRTMGP. LookUpTables. LookUpLW (ds, FT, DA)
491
490
end
492
491
lookups = (; lookups... , lookup_lw, idx_gases)
@@ -496,7 +495,7 @@ function RRTMGPModel(
496
495
497
496
if ! (radiation_mode isa ClearSkyRadiation)
498
497
local lookup_lw_cld
499
- data_loader (
498
+ NC . Dataset (
500
499
RRTMGP. ArtifactPaths. get_lookup_filename (:cloud , :lw ),
501
500
) do ds
502
501
lookup_lw_cld = RRTMGP. LookUpTables. LookUpCld (ds, FT, DA)
@@ -505,7 +504,7 @@ function RRTMGPModel(
505
504
end
506
505
if radiation_mode. aerosol_radiation
507
506
local lookup_lw_aero, idx_aerosol, idx_aerosize
508
- data_loader (
507
+ NC . Dataset (
509
508
RRTMGP. ArtifactPaths. get_lookup_filename (:aerosol , :lw ),
510
509
) do ds
511
510
lookup_lw_aero, idx_aerosol, idx_aerosize =
@@ -554,7 +553,7 @@ function RRTMGPModel(
554
553
nbnd_sw = 1
555
554
else
556
555
local lookup_sw, idx_gases
557
- data_loader (RRTMGP. ArtifactPaths. get_lookup_filename (:gas , :sw )) do ds
556
+ NC . Dataset (RRTMGP. ArtifactPaths. get_lookup_filename (:gas , :sw )) do ds
558
557
lookup_sw, idx_gases = RRTMGP. LookUpTables. LookUpSW (ds, FT, DA)
559
558
end
560
559
lookups = (; lookups... , lookup_sw, idx_gases)
@@ -564,7 +563,7 @@ function RRTMGPModel(
564
563
565
564
if ! (radiation_mode isa ClearSkyRadiation)
566
565
local lookup_sw_cld
567
- data_loader (
566
+ NC . Dataset (
568
567
RRTMGP. ArtifactPaths. get_lookup_filename (:cloud , :sw ),
569
568
) do ds
570
569
lookup_sw_cld = RRTMGP. LookUpTables. LookUpCld (ds, FT, DA)
@@ -574,7 +573,7 @@ function RRTMGPModel(
574
573
575
574
if radiation_mode. aerosol_radiation
576
575
local lookup_sw_aero, idx_aerosol, idx_aerosize
577
- data_loader (
576
+ NC . Dataset (
578
577
RRTMGP. ArtifactPaths. get_lookup_filename (:aerosol , :sw ),
579
578
) do ds
580
579
lookup_sw_aero, idx_aerosol, idx_aerosize =
0 commit comments