cris_calbudget_1gran_nc_wrapper.m 3.41 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% This is a wrapper script for testing the generation of the CrIS NASA L1b for a single L1b granule
% and utilizes the netcdf4 formatted parameter files 
% The user must set the following (within USER INPUT section of script)
%
% sat_name				satellite name ('J1' or 'SNPP')
% l1b_fname				L1b granule name (including path if not in same directory as code)
% saveTotalRU_FLAG			set to 1 if you want to save the RSS RU to a mat file
%
% The primary contributors to the CrIS radiometric uncertainty are 
% 	ICT temperature uncertainty
%	ICT emissivity uncertainty 
% 	uncertainty in the the other temperatures in the ICT radiometric model (modeled and measured)
%	uncertainty in the quadratic coefficient NLC coefficient (a2)
% 	polarization correction uncertainty 
%		(sensor polarization angle alpha, and combined SSM and sensor polarization prpt)
%
% RU term 1:   e_ict			ICT rad model, emitted radiance
% RU term 2:   T_ict			ICT rad model, emitted radiance
% RU term 3:   T_SSM_scan_mirror_baffle	ICT rad model, reflected radiance (measured T)
% RU term 4:   T_ScanBaffleCorrection	ICT rad model, reflected radiance (modeled T)
% RU term 5:   T_ICT_baffle		ICT rad model, reflected radiance (measured T)
% RU term 6a:  T_OMA, T_Frame		ICT rad model, reflected radiance (measured T)
% RU term 6b:  T_BS_warm		ICT rad model, reflected radiance (measured T)
% RU term 7:   T_BS_cold		ICT rad model, reflected radiance (measured T)
% RU term 8:   T_Space			ICT rad model, reflected radiance (modeled T) 
% RU term 9:   prpt 			polarization correction
% RU term 10:  alpha			polarization correction
% RU term 11:  a2			nonlinearity correction
%
% Refer to the NASA CrIS L1b RU document and ATBD for details on the ICT radiometric model
% Each reflected term in the ICT radiometric model also has a view factor and emissivity, but the uncertainty
% in those quantities produce negligible contributions  to the CrIS radiometric uncertainty and are not perturbed for the RU estimate
% J1 has an improved ICT emissivity, and the view factors of some of the reflected terms are set to zero as a result
%
% JKT   2020-Sep-13
% University of Wisconsin-Madison Space Science and Engineering Center (UW-SSEC)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% START:  USER INPUT
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
sat_name = 'SNPP';									% set to 'J1' or 'SNPP'
l1b_fname = 'SNDR.SNPP.CRIS.20191031T0012.m06.g003.L1B.std.v03_08.G.201219125854.nc';	% set to file name of v3 L1b granule
%sat_name = 'J1';									% set to 'J1' or 'SNPP'
%l1b_fname = 'SNDR.J1.CRIS.20191031T0012.m06.g003.L1B.std.v03_08.G.201204050506.nc';	% set to file name of v3 L1b granule
l1b_pname = '/Users/joet/git/cris_l1b_user/RU/TEST_INPUT';				% set to path to v3 L1b granule
ru_code_pname = pwd;									% set to path of the RU code

saveTotalRU_FLAG = 1;							% set to 1 if you want to save the RSS RU to a mat file
pname_out = fullfile(pwd,'RU_OUT_NC');					% set to path for RU output files
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% END:  USER INPUT
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

mkdir(pname_out)
addpath(ru_code_pname);

RU = cris_gran_RU_ncparam(sat_name,fullfile(l1b_pname,l1b_fname),saveTotalRU_FLAG,pname_out);