[Dart-dev] DART/branches Revision: 12866
dart at ucar.edu
dart at ucar.edu
Sun Sep 30 17:51:18 MDT 2018
thoar at ucar.edu
2018-09-30 17:51:18 -0600 (Sun, 30 Sep 2018)
339
test program to remove outliers from the forcing.
Current strategy is to calculate the variance for each (member,ix,iy)
and replace the maximum with the median, recalculate.
If the new variance is ONE HUNDRED TIMES SMALLER,
the maximum was an outlier and is replaced.
I have not explored the minima ... nor most of the DATM variables.
Added: DART/branches/cesm_clm/models/clm/clean_forcing.f90
===================================================================
--- DART/branches/cesm_clm/models/clm/clean_forcing.f90 (rev 0)
+++ DART/branches/cesm_clm/models/clm/clean_forcing.f90 2018-09-30 23:51:18 UTC (rev 12866)
@@ -0,0 +1,293 @@
+! DART software - Copyright UCAR. This open source software is provided
+! by UCAR, "as is", without charge, subject to all terms of use at
+! http://www.image.ucar.edu/DAReS/DART/DART_download
+!
+! DART $Id$
+
+program clean_forcing
+
+!-------------------------------------------------------------------------------
+! /glade/p_old/image/thoar/CAM_DATM/4xdaily
+! CAM_DATM.cpl_0055.ha2x1dx6h.2008.nc
+! CAM_DATM.cpl_0055.ha2x1dx6h.2009.nc
+! CAM_DATM.cpl_0055.ha2x1dx6h.2010.nc
+! a2x6h_Faxa_rainc rainc
+! a2x6h_Faxa_rainl rainl
+! a2x6h_Faxa_snowc snowc
+! a2x6h_Faxa_snowl snowl
+! a2x6h_Faxa_lwdn lwdn
+! a2x6h_Faxa_swndr swndr
+! a2x6h_Faxa_swvdr swvdr
+! a2x6h_Faxa_swndf swndf
+! a2x6h_Faxa_swvdf swvdf
+!
+! netcdf CAM_DATM.cpl_0055.ha2x1dx6h.2008 {
+! dimensions:
+! time = UNLIMITED ; // (1460 currently)
+! doma_nx = 144 ;
+! doma_ny = 96 ;
+! a2x6h_nx = 144 ;
+! a2x6h_ny = 96 ;
+! ntb = 2 ;
+!
+! float a2x6h_Faxa_lwdn(time, a2x6h_ny, a2x6h_nx) ;
+! a2x6h_Faxa_lwdn:_FillValue = 1.e+30 ;
+! a2x6h_Faxa_lwdn:units = "W m-2" ;
+! a2x6h_Faxa_lwdn:long_name = "Downward longwave heat flux" ;
+! a2x6h_Faxa_lwdn:standard_name = "downwelling_longwave_flux" ;
+! a2x6h_Faxa_lwdn:internal_dname = "a2x6h" ;
+! a2x6h_Faxa_lwdn:cell_methods = "time: mean" ;
+!
+!-------------------------------------------------------------------------------
+
+use types_mod, only : r8,i8
+
+use sort_mod, only : index_sort
+
+use utilities_mod, only : initialize_utilities, &
+ finalize_utilities, &
+ find_namelist_in_file, &
+ check_namelist_read, &
+ nmlfileunit, &
+ do_nml_file, &
+ do_nml_term, &
+ error_handler, E_ERR, E_MSG
+
+use netcdf_utilities_mod, only : nc_check, &
+ nc_open_file_readwrite, &
+ nc_close_file, &
+ nc_synchronize_file, &
+ nc_begin_define_mode, &
+ nc_end_define_mode, &
+ nc_get_variable_num_dimensions, &
+ nc_get_variable_size, &
+ nc_get_variable, &
+ nc_put_variable
+
+use netcdf
+
+implicit none
+
+!-------------------------------------------------------------------------------
+! version controlled file description for error handling, do not edit
+!-------------------------------------------------------------------------------
+
+character(len=*), parameter :: source = '$URL$'
+character(len=*), parameter :: revision = '$Revision$'
+character(len=*), parameter :: revdate = '$Date$'
+character(len=*), parameter :: routine = 'clean_forcing'
+
+integer, parameter :: ensemble_size = 80
+character(len=*), parameter :: directory = '/glade/p_old/image/thoar/CAM_DATM/4xdaily'
+
+character(len=16) :: varname
+character(len=16) :: variables(10) = (/'a2x6h_Faxa_lwdn ', &
+ 'a2x6h_Faxa_swndr', &
+ 'a2x6h_Faxa_swvdr', &
+ 'a2x6h_Faxa_swndf', &
+ 'a2x6h_Faxa_swvdf', &
+ 'null ', &
+ 'a2x6h_Faxa_rainc', &
+ 'a2x6h_Faxa_rainl', &
+ 'a2x6h_Faxa_snowc', &
+ 'a2x6h_Faxa_snowl'/)
+
+integer :: indices(ensemble_size)
+integer :: ncid(ensemble_size)
More information about the Dart-dev
mailing list