From 3187e52a2529f8b79e742c862fd2aedc6afd0bf6 Mon Sep 17 00:00:00 2001 From: Martin Stengel Date: Tue, 23 Jan 2018 12:35:19 +0000 Subject: [PATCH 1/7] Modify snow and sea ice albedo --- pre_processing/correct_for_ice_snow.F90 | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/pre_processing/correct_for_ice_snow.F90 b/pre_processing/correct_for_ice_snow.F90 index f35040b8..87d92cb8 100644 --- a/pre_processing/correct_for_ice_snow.F90 +++ b/pre_processing/correct_for_ice_snow.F90 @@ -91,6 +91,7 @@ ! 2015/04/10, GM: Fixed the use of snow/ice albedo for the BRDF parameters. ! 2016/02/18, OS: ECMWF snow/ice mask now corrected by USGS land/sea mask ! 2016/02/23, OS: previous commit on ECMWF snow/ice mask was incomplete +! 2017/12/07, MST: reduced the sea ice albedo based on comparisons to CERES surface fluxes ! ! $Id$ ! @@ -160,8 +161,9 @@ subroutine correct_for_ice_snow(nise_path,imager_geolocation,surface,cyear, & ! lambda 0.67 0.87 1.6 3.7 snow_albedo = (/ 0.958, 0.868, 0.0364, 0.0 /) ! ice_albedo = (/ 0.497, 0.289, 0.070, 0.0 /) - ice_albedo = (/ 0.958, 0.868, 0.0364, 0.0 /) - +! ice_albedo = (/ 0.958, 0.868, 0.0364, 0.0 /) + ice_albedo = snow_albedo*0.85 + read (cyear,*) iyear read (cmonth,*) imonth @@ -501,9 +503,13 @@ subroutine correct_for_ice_snow_ecmwf(ecmwf_HR_path,imager_geolocation, & real(kind=sreal), dimension(4) :: snow_albedo, ice_albedo, tmp_albedo real(kind=sreal) :: snow_threshold, ice_threshold + !MST + real(kind=sreal) :: snow_alb_fraction + snow_albedo = (/ 0.958, 0.868, 0.0364, 0.0 /) - ice_albedo = (/ 0.958, 0.868, 0.0364, 0.0 /) - + !ice_albedo = (/ 0.958, 0.868, 0.0364, 0.0 /) + ice_albedo = snow_albedo*0.85 + snow_threshold=0.01 ! I belive this is 1cm ice_threshold=0.15 ! I believe this is 15% @@ -566,8 +572,11 @@ subroutine correct_for_ice_snow_ecmwf(ecmwf_HR_path,imager_geolocation, & else if ((preproc_prtm%sea_ice_cover(lon_i,lat_j) .lt. ice_threshold) .and. & (surface%nise_mask(i,j) .eq. YES)) then flag = .true. - surface%albedo(i,j,:) = snow_albedo - + !MST surface%albedo(i,j,:) = snow_albedo + snow_alb_fraction = min(1.,max(0.,(preproc_prtm%snow_depth(lon_i,lat_j)-0.01)/0.18)) + surface%albedo(i,j,:) = snow_albedo*snow_alb_fraction + & + tmp_albedo*(1.-snow_alb_fraction) + end if if (include_full_brdf .and. flag) then From 52dfbe7209fec2bb7672e37777fa8c54aa583b0a Mon Sep 17 00:00:00 2001 From: Martin Stengel Date: Tue, 27 Feb 2018 13:48:59 +0000 Subject: [PATCH 2/7] Introducing time dependent CO2 concentration in bugsrad --- .../broadband_fluxes/driver_for_bugsrad.f90 | 10 ++++++++-- .../process_broadband_fluxes.F90 | 17 ++++++++++------- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/derived_products/broadband_fluxes/driver_for_bugsrad.f90 b/derived_products/broadband_fluxes/driver_for_bugsrad.f90 index 1458fd9c..5691c861 100644 --- a/derived_products/broadband_fluxes/driver_for_bugsrad.f90 +++ b/derived_products/broadband_fluxes/driver_for_bugsrad.f90 @@ -37,6 +37,7 @@ ! History: ! 2015/11/15, MC: Initial development. Changed input/output quantities to ! accept satellite data changed name of the driver to driver_for_bugsrad.F90. +! 2018/02/27 MST: Using pyYEAR (now passed from parent routine) to calculate time dependent CO2 concentration ! ! $Id$ ! @@ -56,7 +57,7 @@ subroutine driver_for_bugsrad(nlm,tsi,theta, & boapar,boapardif,toapar, & fulw,fdlw,fusw,fdsw, & fulwcl,fdlwcl,fuswcl,fdswcl, & - emis,rho0d,rhodd) + emis,rho0d,rhodd,pxYEAR) use kinds, only: int_kind, dbl_kind use bugsrad_physconst, only: gravity, cp_dry_air, sol_const @@ -74,6 +75,9 @@ subroutine driver_for_bugsrad(nlm,tsi,theta, & hctopID(nlayers) ,& ! vertical level index for Hctop (-). hcbaseID(nlayers) ! vertical level index for Hcbase (-). + integer, intent(in) :: & + pxYEAR + ! Column quantities real, intent(in) :: & tsi ,& ! total solar irradiance (W/m2). @@ -210,7 +214,9 @@ subroutine driver_for_bugsrad(nlm,tsi,theta, & alndf(1)=asfcnirdf ! Read trace gas quantities - umco2(1)=380. + !umco2(1)=380. + !introducting time dependent co2 with 380 representing the year 2006 + umco2(1)=380.0+(pxYEAR-2006.)*1.7 umch4(1)=1.80 umn2o(1)=0.26 diff --git a/derived_products/broadband_fluxes/process_broadband_fluxes.F90 b/derived_products/broadband_fluxes/process_broadband_fluxes.F90 index 931c77f2..bad11447 100644 --- a/derived_products/broadband_fluxes/process_broadband_fluxes.F90 +++ b/derived_products/broadband_fluxes/process_broadband_fluxes.F90 @@ -130,6 +130,7 @@ ! gravitational acceleration to the appropriate value of 9.80665. ! 2017/07/28, MC: Modified code to accept multi-layer cloud primary output ! files. Note, you must specify 'multi_layer=1' to run in multi-layer mode. +! 2018/01/23, MST: Passing pxYEAR to driver_for_bugsrad to enable time dependent co2 concentration calculation ! ! $Id$ ! @@ -568,7 +569,7 @@ subroutine process_broadband_fluxes(Fprimary,FPRTM,FALB,FTSI,fname,& ! Read TSI file !---------------------------------------------------------------------------- call nc_open(ncid,FTSI) - + ! Allocate arrays allocate(TSI_tsi_true_earth(nTSI)) allocate(TSI_tsi_1au(nTSI)) @@ -610,7 +611,7 @@ subroutine process_broadband_fluxes(Fprimary,FPRTM,FALB,FTSI,fname,& if (lut_mode .eq. 1) then ! Open LUT file call nc_open(ncid,FToaSW) - + ! Get LUT dimensions nASFC = nc_dim_length(ncid, 'n_sfc_albedo', verbose) nSOLZ = nc_dim_length(ncid, 'n_solar_zenith', verbose) @@ -649,7 +650,7 @@ subroutine process_broadband_fluxes(Fprimary,FPRTM,FALB,FTSI,fname,& ! Open primary file call nc_open(ncid,Fprimary) - + ! Get satellite dimensions xN = nc_dim_length(ncid, 'across_track', verbose) yN = nc_dim_length(ncid, 'along_track', verbose) @@ -715,7 +716,7 @@ subroutine process_broadband_fluxes(Fprimary,FPRTM,FALB,FTSI,fname,& ! Open PRTM file call nc_open(ncid,FPRTM) - + ! Get PRTM dimensions xdim_prtm = nc_dim_length(ncid, 'nlon_rtm', verbose) ydim_prtm = nc_dim_length(ncid, 'nlat_rtm', verbose) @@ -771,7 +772,7 @@ subroutine process_broadband_fluxes(Fprimary,FPRTM,FALB,FTSI,fname,& ! Open ALB file call nc_open(ncid,FALB) - + ! Get # Channels nc_alb = nc_dim_length(ncid, 'nc_alb', verbose) nc_emis = nc_dim_length(ncid, 'nc_emis', verbose) @@ -1223,7 +1224,7 @@ subroutine process_broadband_fluxes(Fprimary,FPRTM,FALB,FTSI,fname,& bpar,bpardif,tpar,& ulwfx,dlwfx,uswfx,dswfx,& ulwfxclr,dlwfxclr,uswfxclr,dswfxclr,& - emis_bugsrad,rho_0d_bugsrad,rho_dd_bugsrad) + emis_bugsrad,rho_0d_bugsrad,rho_dd_bugsrad,pxYEAR) end if ! BUGSrad algorithm !---------------------------------------------------------------- @@ -1337,7 +1338,7 @@ subroutine process_broadband_fluxes(Fprimary,FPRTM,FALB,FTSI,fname,& ! Make output NetCDF file !---------------------------------------------------------------------------- call nc_open(ncid,Fprimary) - + ! Get common attributes from primary file call nc_get_common_attributes(ncid, global_atts, source_atts) @@ -1871,6 +1872,8 @@ subroutine process_broadband_fluxes(Fprimary,FPRTM,FALB,FTSI,fname,& !---------------------------------------------------------------------------- ! Column_Ozone !---------------------------------------------------------------------------- + write(*,*) ncid, dims_var, 'colO3', colO3_vid, verbose, deflate_lv, shuffle_flag + call nc_def_var_float_packed_float( & ncid, & dims_var, & From 47b545cabaf3c479cc20d993ee9b49da6d51b5dc Mon Sep 17 00:00:00 2001 From: Martin Stengel Date: Tue, 27 Feb 2018 13:54:52 +0000 Subject: [PATCH 3/7] Updating cloud detection --- pre_processing/cloud_typing_pavolonis.F90 | 85 ++++++++++++++++------- pre_processing/neural_net_preproc.F90 | 19 ++--- 2 files changed, 72 insertions(+), 32 deletions(-) diff --git a/pre_processing/cloud_typing_pavolonis.F90 b/pre_processing/cloud_typing_pavolonis.F90 index 9e9af9d5..b174d9cf 100644 --- a/pre_processing/cloud_typing_pavolonis.F90 +++ b/pre_processing/cloud_typing_pavolonis.F90 @@ -827,6 +827,11 @@ subroutine cloud_type_pixel(cview, i, j, ch1, ch2, ch3, ch4, ch5, ch6, & real(kind=sreal) :: mu0, esd, c_sun real(kind=sreal) :: solzen, ch1v, ch2v + ! --3x3 box stdd of BT 11µm + integer(kind=sint) :: s_i, e_i, s_j, e_j + real(kind=sreal) :: NNN, MN_BT11, SD_BT11 + !------------------------------- + ! Check if solar zenith angle is < 0 if (imager_angles%solzen(i,j,cview) .lt. 0.) return @@ -925,6 +930,15 @@ subroutine cloud_type_pixel(cview, i, j, ch1, ch2, ch3, ch4, ch5, ch6, & BTD_Ch3b_Ch4 = imager_measurements%data(i,j,ch4) - & imager_measurements%data(i,j,ch5) + ! Calculate spatial stddev of BT(11) + s_i = max(i-1,1) + e_i = min(i+1,imager_geolocation%ENDX) + s_j = max(j-1,1) + e_j = min(j+1,imager_geolocation%ENDY) + NNN = ( e_i - s_i +1) * ( e_j- s_j +1) + MN_BT11 = SUM(imager_measurements%DATA(s_i:e_i,s_j:e_j,ch5) ) / NNN + SD_BT11 = SQRT (SUM((imager_measurements%DATA(s_i:e_i,s_j:e_j,ch5) - MN_BT11)**2) / (NNN - 1)) + ! Calculate ch3b radiance and emissivity plank_inv_out = plank_inv(platform, imager_measurements%data(i,j,ch4)) rad_ch3b = plank_inv_out(1) @@ -976,6 +990,24 @@ subroutine cloud_type_pixel(cview, i, j, ch1, ch2, ch3, ch4, ch5, ch6, & bt_ch3b = imager_measurements%data(i,j,ch4) end if + !-- Determine the viewing zenith angle bin. + index1 = min(7,max(1,int(imager_angles%SATZEN(i,j,cview)/10.0) + 1)) + !-- Determine the solar zenith angle bin. + index2 = min(8,max(1,int(imager_angles%SOLZEN(i,j,cview)/10.0) + 1)) + + !-- Set 11um - 12um cirrus thresholds. + ! Absorption of radiation by water vapor and ice crystals in + ! semitransparent cirrus clouds is greater at 12 than 11 micron + + BTD1112_CIRRUS_THRES = & + A1(index1) + & + B1(index1)*imager_measurements%DATA(i,j,ch5) + & + C1(index1)*imager_measurements%DATA(i,j,ch5)**2 + & + D1(index1)*imager_measurements%DATA(i,j,ch5)**3 + & + E1(index1)*imager_measurements%DATA(i,j,ch5)**4 + + BTD1112_CIRRUS_THRES = max( 1.0,min(4.0,BTD1112_CIRRUS_THRES) ) + desertflag = .false. if (imager_pavolonis%sfctype(i,j) == DESERT_FLAG) desertflag = .true. @@ -1009,11 +1041,23 @@ subroutine cloud_type_pixel(cview, i, j, ch1, ch2, ch3, ch4, ch5, ch6, & verbose) ! Return if clear, as no need to define cloud type - if (imager_pavolonis%cldmask(i,j,cview) == CLEAR) then - imager_pavolonis%cldtype(i,j,cview) = CLEAR_TYPE - imager_pavolonis%ANN_PHASE(i,j,cview) = CLEAR_TYPE - if (trim(adjustl(sensor)) .ne. 'AATSR' .and. & - trim(adjustl(sensor)) .ne. 'ATSR2') return + if ( imager_pavolonis%cldmask(i,j,cview) == CLEAR) then + if ( ( BTD_Ch4_Ch5 > (BTD1112_CIRRUS_THRES-0.2) ) .and. & + ( imager_measurements%DATA(i,j,ch5) < 295.0 ) .and. & + ( snow_ice_mask(i,j) .eq. NO ) ) then + imager_pavolonis%CLDMASK(i,j,cview) = CLOUDY + imager_pavolonis%CLDMASK_UNCERTAINTY(i,j,cview) = 99 !100. - imager_pavolonis%CLDMASK_UNCERTAINTY(i,j,cview) +! imager_pavolonis%CLDTYPE(i,j,cview) = CIRRUS_TYPE +! imager_pavolonis%cirrus_quality(i,j,cview) = 1 +! imager_pavolonis%ANN_PHASE(i,j,cview) = ICE +! imager_pavolonis%ANN_PHASE_UNCERTAINTY(i,j,cview) = 99 +! cycle + else + imager_pavolonis%cldtype(i,j,cview) = CLEAR_TYPE + imager_pavolonis%ANN_PHASE(i,j,cview) = CLEAR_TYPE + if (trim(adjustl(sensor)) .ne. 'AATSR' .and. & + trim(adjustl(sensor)) .ne. 'ATSR2') return + end if end if ! Implement extra tests for AATSR @@ -1072,6 +1116,18 @@ subroutine cloud_type_pixel(cview, i, j, ch1, ch2, ch3, ch4, ch5, ch6, & end if end if + ! introduce 2nd glint test / also possible dust using spatial + ! variabilty in channel5 + if ( ( BTD_Ch4_Ch5 .ge. 0. ) .and. ( BTD_Ch4_Ch5 .le. 3. ) .and. & + ( ch2v/max(ch1v,0.01) .ge. 0.6 ) .and. (ch2v/max(ch1v,0.01) .le. 1. ) .and. & + ( imager_measurements%DATA(i,j,ch5) .gt. 290.0 ) .and. & + ( SD_BT11 .lt. 0.25 ) ) then + imager_pavolonis%CLDMASK(i,j,cview) = CLEAR + imager_pavolonis%CLDMASK_UNCERTAINTY(i,j,cview) = 99 !100. - imager_pavolonis%CLDMASK_UNCERTAINTY(i,j,cview) + imager_pavolonis%CLDTYPE(i,j,cview) = CLEAR_TYPE + return + end if + ! From here all sensors have their decisions made only when cloudy is allowed ! Start ANN phase @@ -1132,25 +1188,6 @@ subroutine cloud_type_pixel(cview, i, j, ch1, ch2, ch3, ch4, ch5, ch6, & end if end if - ! Determine the viewing zenith angle bin - index1 = min(7,max(1,int(imager_angles%satzen(i,j,cview)/10.0) + 1)) - - ! Determine the solar zenith angle bin - index2 = min(8,max(1,int(imager_angles%solzen(i,j,cview)/10.0) + 1)) - - ! Set 11um - 12um cirrus thresholds. - ! Absorption of radiation by water vapor and ice crystals in - ! semitransparent cirrus clouds is greater at 12 than 11 micron. - - BTD1112_CIRRUS_THRES = & - A1(index1) + & - B1(index1)*imager_measurements%data(i,j,ch5) + & - C1(index1)*imager_measurements%data(i,j,ch5)**2 + & - D1(index1)*imager_measurements%data(i,j,ch5)**3 + & - E1(index1)*imager_measurements%data(i,j,ch5)**4 - - BTD1112_CIRRUS_THRES = max(1.0, min(4.0,BTD1112_CIRRUS_THRES)) - ! Initial cirrus quality imager_pavolonis%cirrus_quality(i,j,cview) = 0 diff --git a/pre_processing/neural_net_preproc.F90 b/pre_processing/neural_net_preproc.F90 index 01f698db..fd30aeed 100644 --- a/pre_processing/neural_net_preproc.F90 +++ b/pre_processing/neural_net_preproc.F90 @@ -184,22 +184,23 @@ subroutine ann_cloud_mask(channel1, channel2, channel3a, channel3b, & ! call neural net unless solzen is negative call_neural_net = .TRUE. - if ( ( solzen .ge. 0. ) .and. (solzen .le. 80) ) then + if ( ( solzen .ge. 0. ) .and. (solzen .le. 84) ) then illum_nn = 1 ! use ANN with Ref3.7 if ( ch3a_on_avhrr_flag .eq. INEXISTENT ) illum_nn = 4 ! use ANN w/o any NIR info if ( ch3a_on_avhrr_flag .eq. YES ) illum_nn = 7 ! use ANN with Ref1.6 + elseif ( (solzen .gt. 84) .and. (solzen .le. 90) ) then + illum_nn = 2 ! use ANN with BT3.7 + if ( ch3a_on_avhrr_flag .ne. NO ) illum_nn = 5 ! use ANN w/o BT3.7 if ( correct_early_morning_noaas ) then - !Test Use Night ANN w/o BT3.7 at daytime + !Use Night ANN w/o BT3.7 at daytime !The early morning Noaa sats have very strong glint dependencies !at high viewing angles which is not captured by any ANN training. if ( (trim(adjustl(platform)) .eq. 'noaa6') .or. (trim(adjustl(platform)) .eq. 'noaa8') .or. & (trim(adjustl(platform)) .eq. 'noaa10') .or. (trim(adjustl(platform)) .eq. 'noaa12') .or. (trim(adjustl(platform)) .eq. 'noaa15') ) illum_nn = 6 endif - elseif ( (solzen .gt. 80) .and. (solzen .le. 90) ) then - illum_nn = 2 ! use ANN with BT3.7 - if ( ch3a_on_avhrr_flag .ne. NO ) illum_nn = 5 ! use ANN w/o BT3.7 elseif (solzen .gt. 90) then illum_nn = 3 ! use ANN with BT3.7 + if ( channel1 .gt. 0.02 ) illum_nn = 6 ! dont use 3.7µm if sensor detects sunlight (check on ch1 w/o albedo correction!) if ( ch3a_on_avhrr_flag .ne. NO ) illum_nn = 6 ! use ANN w/o BT3.7 else illum_nn = 0 @@ -767,15 +768,17 @@ subroutine ann_cloud_phase(channel1, channel2, channel3a, channel3b, & ch4 = channel4 ch5 = channel5 btd_ch4_ch5 = ch4 - ch5 + btd_ch4_ch5 = max(0.4, btd_ch4_ch5) ! it seems that often opaque ice clouds + ! are set to liquid by the ANN if the BTD_ch4_ch5 is negative btd_ch4_ch3b = ch4 - ch3b ! call neural net unless solzen is negative call_neural_net = .TRUE. - if ( ( solzen .ge. 0. ) .and. (solzen .le. 80) ) then + if ( ( solzen .ge. 0. ) .and. (solzen .le. 84) ) then illum_nn = 1 ! use ANN with Ref3.7 if ( ch3a_on_avhrr_flag .eq. YES ) illum_nn = 7 ! use ANN with Ref1.6 - elseif ( (solzen .gt. 80) .and. (solzen .le. 90) ) then + elseif ( (solzen .gt. 84) .and. (solzen .le. 90) ) then illum_nn = 2 elseif (solzen .gt. 90) then illum_nn = 3 @@ -1038,7 +1041,7 @@ subroutine ann_cloud_phase(channel1, channel2, channel3a, channel3b, & if (noob .eq. 1_lint) then ! give penalty; increase uncertainty because at least 1 ANN input parameter ! was not within trained range - ! phase_uncertainty = phase_uncertainty * 1.1 + phase_uncertainty = phase_uncertainty * 1.1 if (ch1 .lt. 0 .and. ch2 .lt. 0 .and. ch3b .lt. 0 .and. & ch4 .lt. 0 .and. ch5 .lt. 0) then phase_flag = byte_fill_value From 8b8146bb690baa387673123bf737b650eb9cddd7 Mon Sep 17 00:00:00 2001 From: Martin Stengel Date: Tue, 27 Feb 2018 13:55:48 +0000 Subject: [PATCH 4/7] Updating spectral adjustment factors (slope/offset) for all sensors --- ...fficients_spectral_response_correction.inc | 106 +++++++++++++++++- 1 file changed, 105 insertions(+), 1 deletion(-) diff --git a/common/coefficients_spectral_response_correction.inc b/common/coefficients_spectral_response_correction.inc index dd6f0082..b80743a3 100644 --- a/common/coefficients_spectral_response_correction.inc +++ b/common/coefficients_spectral_response_correction.inc @@ -199,7 +199,7 @@ ! b=2: slope/offset ! c=2: day/night_tw ! d=22: satellite - real, DIMENSION(6,2,2,22) :: n19mimic = reshape( & + real, DIMENSION(6,2,2,22) :: n19mimic_old = reshape( & (/ & 1.01947, 1.01667, 1.00000, 0.98555, 0.99971, 1.00000 , & ! noaa_5_avhrr (day) -0.39193,-0.16725, 0.00000, 3.63161, 0.10648, 0.00000 , & ! noaa_5_avhrr (day) @@ -290,4 +290,108 @@ 1.00000, 1.00000, 1.00000, 1.00007, 0.99918, 1.00368 , & ! envisat_1_aatsr (twilight & night) 0.00000, 0.00000, 0.00000,-0.18492, 0.23179,-0.82334 & ! envisat_1_aatsr (twilight & night) /), & + shape(n19mimic_old), order=(/1, 2, 3, 4/)) + + + ! dimensions: + ! a=6: n channels + ! b=2: slope/offset + ! c=2: day/night_tw + ! d=22: satellite + real, DIMENSION(6,2,2,22) :: n19mimic = reshape( & + (/ & + 1.00863, 1.01129, 1.00000, 0.98519, 0.99932, 1.00000 ,& ! noaa_5_avhrr (day)------------- begin new 25.09.2017 + -0.17359,-0.10159, 0.00000, 3.68068, 0.23559, 0.00000 ,& ! noaa_5_avhrr (day) + 1.00000, 1.00000, 1.00000, 0.99084, 0.99880, 1.00000 ,& ! noaa_5_avhrr (twilight & night) + 0.00000, 0.00000, 0.00000, 1.39766, 0.34478, 0.00000 ,& ! noaa_5_avhrr (twilight & night) + 1.01157, 1.00329, 1.00000, 0.97629, 0.99904, 1.00000 ,& ! noaa_6_avhrr (day) + -0.02680,-0.05198, 0.00000, 6.07805, 0.29959, 0.00000 ,& ! noaa_6_avhrr (day) + 1.00000, 1.00000, 1.00000, 0.98521, 0.99859, 1.00000 ,& ! noaa_6_avhrr (twilight & night) + 0.00000, 0.00000, 0.00000, 2.45206, 0.39441, 0.00000 ,& ! noaa_6_avhrr (twilight & night) + 1.00933, 1.00704, 1.00000, 1.00988, 1.00015, 0.99094 ,& ! noaa_7_avhrr (day) + -0.03615,-0.00695, 0.00000,-2.53120,-0.19754, 1.99137 ,& ! noaa_7_avhrr (day) + 1.00000, 1.00000, 1.00000, 1.00801, 1.00012, 0.99188 ,& ! noaa_7_avhrr (twilight & night) + 0.00000, 0.00000, 0.00000,-1.90227,-0.19402, 1.78631 ,& ! noaa_7_avhrr (twilight & night) + 1.00980, 1.00304, 1.00000, 0.98545, 0.99934, 1.00000 ,& ! noaa_8_avhrr (day) + -0.00880,-0.04845, 0.00000, 3.27709, 0.20076, 0.00000 ,& ! noaa_8_avhrr (day) + 1.00000, 1.00000, 1.00000, 0.98943, 0.99891, 1.00000 ,& ! noaa_8_avhrr (twilight & night) + 0.00000, 0.00000, 0.00000, 1.61012, 0.29218, 0.00000 ,& ! noaa_8_avhrr (twilight & night) + 1.00915, 1.00590, 1.00000, 1.01401, 1.00008, 0.98757 ,& ! noaa_9_avhrr (day) + -0.01287, 0.01144, 0.00000,-3.53502,-0.21508, 2.77003 ,& ! noaa_9_avhrr (day) + 1.00000, 1.00000, 1.00000, 1.01095, 1.00018, 0.98883 ,& ! noaa_9_avhrr (twilight & night) + 0.00000, 0.00000, 0.00000,-2.38708,-0.24295, 2.50000 ,& ! noaa_9_avhrr (twilight & night) + 1.01043, 1.00521, 1.00000, 1.00059, 0.99856, 1.00000 ,& ! noaa_10_avhrr (day) + -0.04353,-0.01992, 0.00000,-0.46165, 0.46892, 0.00000 ,& ! noaa_10_avhrr (day) + 1.00000, 1.00000, 1.00000, 1.00034, 0.99809, 1.00000 ,& ! noaa_10_avhrr (twilight & night) + 0.00000, 0.00000, 0.00000,-0.42437, 0.56506, 0.00000 ,& ! noaa_10_avhrr (twilight & night) + 1.00897, 1.00503, 1.00000, 1.00836, 0.99999, 0.98903 ,& ! noaa_11_avhrr (day) + -0.00987,-0.01211, 0.00000,-2.28597,-0.16980, 2.44290 ,& ! noaa_11_avhrr (day) + 1.00000, 1.00000, 1.00000, 1.00627, 1.00002, 0.99021 ,& ! noaa_11_avhrr (twilight & night) + 0.00000, 0.00000, 0.00000,-1.49996,-0.17850, 2.18420 ,& ! noaa_11_avhrr (twilight & night) + 1.00792, 1.00523, 1.00000, 0.98642, 1.00060, 0.99359 ,& ! noaa_12_avhrr (day) + 0.01240,-0.02886, 0.00000, 3.18954,-0.21188, 1.38279 ,& ! noaa_12_avhrr (day) + 1.00000, 1.00000, 1.00000, 0.99121, 1.00018, 0.99432 ,& ! noaa_12_avhrr (twilight & night) + 0.00000, 0.00000, 0.00000, 1.19351,-0.11055, 1.21807 ,& ! noaa_12_avhrr (twilight & night) + 1.00000, 1.00000, 1.00000, 1.00000, 1.00000, 1.00000 ,& ! noaa_13_avhrr (day) + 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000 ,& ! noaa_13_avhrr (day) + 1.00000, 1.00000, 1.00000, 1.00000, 1.00000, 1.00000 ,& ! noaa_13_avhrr (twilight & night) + 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000 ,& ! noaa_13_avhrr (twilight & night) + 1.00783, 1.01084, 1.00000, 0.99179, 1.00103, 0.99493 ,& ! noaa_14_avhrr (day) + 0.01594,-0.02593, 0.00000, 2.12215,-0.44593, 1.08124 ,& ! noaa_14_avhrr (day) + 1.00000, 1.00000, 1.00000, 0.99618, 1.00098, 0.99553 ,& ! noaa_14_avhrr (twilight & night) + 0.00000, 0.00000, 0.00000, 0.29021,-0.42729, 0.94522 ,& ! noaa_14_avhrr (twilight & night) + 1.00542, 1.00561, 1.00000, 1.01248, 0.99999, 0.99035 ,& ! noaa_15_avhrr (day) + -0.02722, 0.04747, 0.00000,-3.98429,-0.13650, 2.14467 ,& ! noaa_15_avhrr (day) + 1.00000, 1.00000, 1.00000, 1.00601, 0.99987, 0.99142 ,& ! noaa_15_avhrr (twilight & night) + 0.00000, 0.00000, 0.00000,-1.30640,-0.10899, 1.90299 ,& ! noaa_15_avhrr (twilight & night) + 1.00645, 1.00920, 1.00000, 1.01490, 1.00024, 0.99703 ,& ! noaa_16_avhrr (day) + -0.03902, 0.05657, 0.00000,-4.57169,-0.09508, 0.56112 ,& ! noaa_16_avhrr (day) + 1.00000, 1.00000, 1.00000, 1.00770, 0.99974, 0.99730 ,& ! noaa_16_avhrr (twilight & night) + 0.00000, 0.00000, 0.00000,-1.57810, 0.02201, 0.51117 ,& ! noaa_16_avhrr (twilight & night) + 1.00425, 1.00846, 1.00000, 0.99843, 1.00011, 0.99049 ,& ! noaa_17_avhrr (day) + -0.02071, 0.05342, 0.00000, 0.03672,-0.18490, 2.11172 ,& ! noaa_17_avhrr (day) + 1.00000, 1.00000, 1.00000, 0.99866, 1.00006, 0.99153 ,& ! noaa_17_avhrr (twilight & night) + 0.00000, 0.00000, 0.00000,-0.07106,-0.17253, 1.87665 ,& ! noaa_17_avhrr (twilight & night) + 1.00238, 1.01516, 1.00000, 0.99369, 1.00018, 0.99686 ,& ! noaa_18_avhrr (day) + -0.01270, 0.06648, 0.00000, 1.42173,-0.21360, 0.62588 ,& ! noaa_18_avhrr (day) + 1.00000, 1.00000, 1.00000, 0.99626, 1.00016, 0.99723 ,& ! noaa_18_avhrr (twilight & night) + 0.00000, 0.00000, 0.00000, 0.36585,-0.20915, 0.54209 ,& ! noaa_18_avhrr (twilight & night) + 1.00000, 1.00000, 1.00000, 1.00000, 1.00000, 1.00000 ,& ! noaa_19_avhrr (day) + 0.00000,-0.00000, 0.00000, 0.00000,-0.00000, 0.00000 ,& ! noaa_19_avhrr (day) + 1.00000, 1.00000, 1.00000, 1.00000, 1.00000, 1.00000 ,& ! noaa_19_avhrr (twilight & night) + 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000 ,& ! noaa_19_avhrr (twilight & night) + 1.00000, 1.00000, 1.00000, 1.00000, 1.00000, 1.00000 ,& ! noaa_20_avhrr (day) + 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000 ,& ! noaa_20_avhrr (day) + 1.00000, 1.00000, 1.00000, 1.00000, 1.00000, 1.00000 ,& ! noaa_20_avhrr (twilight & night) + 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000 ,& ! noaa_20_avhrr (twilight & night) + 1.00642, 1.01057, 1.00000, 0.99788, 1.00037, 0.99020 ,& ! metop_1_avhrr (day) + -0.03299, 0.03300, 0.00000, 0.89873,-0.16537, 2.30006 ,& ! metop_1_avhrr (day) + 1.00000, 1.00000, 1.00000, 1.00017, 1.00060, 0.99129 ,& ! metop_1_avhrr (twilight & night) + 0.00000, 0.00000, 0.00000,-0.04050,-0.21846, 2.05344 ,& ! metop_1_avhrr (twilight & night) + 1.00630, 1.00585, 1.00000, 1.01305, 1.00020, 0.99111 ,& ! metop_2_avhrr (day) + -0.03303, 0.03785, 0.00000,-3.20312,-0.19577, 1.98056 ,& ! metop_2_avhrr (day) + 1.00000, 1.00000, 1.00000, 1.01122, 1.00009, 0.99213 ,& ! metop_2_avhrr (twilight & night) + 0.00000, 0.00000, 0.00000,-2.63335,-0.17000, 1.74438 ,& ! metop_2_avhrr (twilight & night) + 0.97782, 0.89682, 1.00000, 0.97528, 0.99838, 0.98472 ,& ! eos_1_modis-terra (day) + 0.20248,-0.00408, 0.00000, 5.11309, 0.57084, 3.59604 ,& ! eos_1_modis-terra (day) + 1.00000, 1.00000, 1.00000, 0.97911, 0.99749, 0.98719 ,& ! eos_1_modis-terra (twilight & night) + 0.00000, 0.00000, 0.00000, 4.23386, 0.78210, 2.96328 ,& ! eos_1_modis-terra (twilight & night) + 0.97852, 0.89674, 1.00000, 0.97647, 0.99798, 0.98466 ,& ! eos_2_modis-aqua (day) + 0.20091,-0.00488, 0.00000, 4.41328, 0.67351, 3.61425 ,& ! eos_2_modis-aqua (day) + 1.00000, 1.00000, 1.00000, 0.97854, 0.99712, 0.98714 ,& ! eos_2_modis-aqua (twilight & night) + 0.00000, 0.00000, 0.00000, 4.27745, 0.87638, 2.97834 ,& ! eos_2_modis-aqua (twilight & night) + 0.95927, 0.89362, 1.00000, 1.04509, 0.99891, 1.00002 ,& ! ers_2_atsr (day) + 0.25914,-0.01229, 0.00000,-9.72701, 0.43453, 0.03421 ,& ! ers_2_atsr (day) + 1.00000, 1.00000, 1.00000, 1.03827, 0.99851, 1.00011 ,& ! ers_2_atsr (twilight & night) + 0.00000, 0.00000, 0.00000,-7.47003, 0.52056, 0.01765 ,& ! ers_2_atsr (twilight & night) + 0.95572, 0.89283, 1.00000, 1.00529, 0.99908, 1.00343 ,& ! envisat_1_aatsr (day) + 0.25860,-0.01339, 0.00000,-1.76380, 0.26791,-0.75256 ,& ! envisat_1_aatsr (day) + 1.00000, 1.00000, 1.00000, 1.00208, 0.99906, 1.00309 ,& ! envisat_1_aatsr (twilight & night) + 0.00000, 0.00000, 0.00000,-0.54811, 0.26531,-0.66652 & ! envisat_1_aatsr (twilight & night)------------- end new 25.09.2017 + /), & shape(n19mimic), order=(/1, 2, 3, 4/)) + + + + + From cd3412581799e207d62218a7b587013c04ff9ac4 Mon Sep 17 00:00:00 2001 From: Martin Stengel Date: Tue, 27 Feb 2018 14:18:05 +0000 Subject: [PATCH 5/7] Modifying calculation of center_time used for determination of weights for ERA files --- pre_processing/set_ecmwf.F90 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pre_processing/set_ecmwf.F90 b/pre_processing/set_ecmwf.F90 index 0f1fc102..754504b1 100644 --- a/pre_processing/set_ecmwf.F90 +++ b/pre_processing/set_ecmwf.F90 @@ -60,6 +60,11 @@ ! 2017/01/31, SP: Add ecmwf_flag=5, for reading NOAA GFS forecast (ExtWork) ! 2017/04/11, SP: Added ecmwf_flag=6, for working with GFS analysis files. ! 2017/07/05, SP: Added ecmwf_flag=7, for working with new format GFS (ExtWork) +! 2018/02/27, MST: Modified calculation of center_time, now set to start_time. +! Using the actually center time of the orbit gave wrong weights when the ERA files +! are selected based on the orbit start time and the center time of the orbit appears +! to be later than the time of the second ERA file. In these conditions nearly all +! weight was given to ERA file 1 which is much further away than file 2. ! ! $Id$ ! @@ -336,7 +341,7 @@ real(dreal) function find_center_time(imager_geolocation, imager_time) & end do end do -99 center_time = (start_time + end_time) / 2. +99 center_time = start_time !MST (start_time + end_time) / 2. end function find_center_time From 67747e895ebf6dab47b09ce5b1c6fed5d2a891c1 Mon Sep 17 00:00:00 2001 From: Martin Stengel Date: Tue, 27 Feb 2018 14:19:35 +0000 Subject: [PATCH 6/7] Setting lower limit of Tskin to 200K --- src/ReadDriver.F90 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ReadDriver.F90 b/src/ReadDriver.F90 index a0aab8cd..cef36687 100644 --- a/src/ReadDriver.F90 +++ b/src/ReadDriver.F90 @@ -141,6 +141,9 @@ ! 2017/10/04, GM: Add the option to use ANN phase to select pixels to process. ! 2017/12/13, GT: Changed SLSTR instrument name string to SLSTR-Sentinel3a ! (in preparation for Sentinel-3b) +! 2017/12/14, MST: the lower limit of tskin was set to 250.K which was too high +! in particular for Greenland and Antartica. Have set it to 200.0K. +! Comparisons of lw fluxes to CERES confirm that this was necessary. ! ! $Id$ ! @@ -562,7 +565,7 @@ subroutine Read_Driver(Ctrl, global_atts, source_atts) Ctrl%Invpar%XLLim(IRe2) = switch_cls(c2,Default=0.1) Ctrl%Invpar%XLLim(IPc2) = switch_cls(c2,Default=10.0) Ctrl%Invpar%XLLim(IFr2) = switch_cls(c2,Default=0.0) - Ctrl%Invpar%XLLim(ITs) = switch_app(a, Default=250.0) + Ctrl%Invpar%XLLim(ITs) = switch_app(a, Default=200.) Ctrl%Invpar%XLLim(IRs(:,IRho_0V)) = switch_app(a, Default=0.00001, Cld=0.) Ctrl%Invpar%XLLim(IRs(:,IRho_0D)) = switch_app(a, Default=0.00001, Cld=0.) Ctrl%Invpar%XLLim(IRs(:,IRho_DV)) = switch_app(a, Default=0.00001, Cld=0.) From cf70f10dffcc12cb7475ab5156a3ea84e1574b80 Mon Sep 17 00:00:00 2001 From: Martin Stengel Date: Tue, 27 Feb 2018 14:22:20 +0000 Subject: [PATCH 7/7] Setting phase_flag to 2 in clear-sky conditions to make clear-sky retrievals being included in post-processing --- post_processing/orac_postproc.F90 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/post_processing/orac_postproc.F90 b/post_processing/orac_postproc.F90 index ac640539..2e90f471 100644 --- a/post_processing/orac_postproc.F90 +++ b/post_processing/orac_postproc.F90 @@ -147,6 +147,7 @@ ! 2017/09/05, CP: Added logical flag at the top of the driver file to turn on ! ML post processing. ! 2017/10/05, GM: Get the value of use_ann_phase from the input files. +! 2018/02/27, MST: Setting phase_flag to 2 (some value other than 0) in clear-sky conditions to make those conditions being included in post-processing ! ! $Id$ ! @@ -615,7 +616,7 @@ subroutine orac_postproc(mytask,ntasks, lower_bound, upper_bound, & case(ICE) phase_flag = 2_byte case default - phase_flag = 0_byte + phase_flag = 2_byte !MST to include clear-sky retrievals in postprocessing files 0_byte end select end if else @@ -639,7 +640,7 @@ subroutine orac_postproc(mytask,ntasks, lower_bound, upper_bound, & phase_flag = 2_byte end if case default - phase_flag = 0_byte + phase_flag = 2_byte !MST to include clear-sky retrievals in postprocessing files 0_byte end select end if