Skip to content

Commit 0d033db

Browse files
committed
Add lat_lon_native diagnostic set for native grid visualization
1 parent 38bb489 commit 0d033db

File tree

192 files changed

+1670
-983
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

192 files changed

+1670
-983
lines changed

analysis_data_preprocess/create_AOD550_climo.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,15 +209,15 @@
209209
ncatted -O -h -a cell_methods,AOD_550,o,c,"time: mean within years time: mean over years" $OBSFILE $OBSFILE
210210
ncatted -O -h -a cell_methods,AOD_550_ann,o,c,"time: mean over years" $OBSFILE $OBSFILE
211211
# Climatology files should contain a "season" attribute, which should
212-
# be either a three-letter season (e.g., ANN, DJF, MAR) or a two-digit
212+
# be either a three-letter season (e.g., ANN, DJF, MAR) or a two-digi
213213
# month (e.g. 01, 02, ... 12)/mo
214214
ncatted -O -h -a season,global,o,c,$SEASON $OBSFILE
215215

216216
# Variable cleanup
217217
ncatted -O -a standard_name,lat,o,c,"latitude" $OBSFILE $OBSFILE
218218
ncatted -O -a standard_name,lon,o,c,"longitude" $OBSFILE $OBSFILE
219219
ncatted -O -a long_name,time,o,c,"time" -a standard_name,time,o,c,"time" $OBSFILE $OBSFILE
220-
# Flip FLNS/FLNSC signs to match model output
220+
# Flip FLNS/FLNSC signs to match model outpu
221221
#
222222
# Note: Simply reversing valid_min/valid_max was
223223
# throwing an error in ncview. By doing the below

analysis_data_preprocess/create_GPCP_climo.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# flake8: noqa
2-
#!/usr/bin/env cdat
2+
#!/usr/bin/env cda
33
"""
44
This script takes an observational dataset that contains monthly data
55
and creates the appropriate climo files. Aspects of this code have been taken
@@ -24,13 +24,13 @@
2424
Modified by Jill Zhang ([email protected]) 08-15-2018
2525
"""
2626

27-
# Upload the following libraries to call in this script
27+
# Upload the following libraries to call in this scrip
2828
import argparse
2929
import code
3030
import datetime
3131
import gc
3232
import glob
33-
import inspect
33+
import inspec
3434
import os
3535
import re
3636
import string
@@ -67,16 +67,16 @@
6767
output_hostpath="/p/user_pub/e3sm/zhang40/analysis_data_e3sm_diags/"+data_name+"/climatology/" #location to save climatology files
6868
if data_name =='GPCP':
6969
rootname='GPCP_v2.3' #name of the climo files
70-
startyear='1979' #start year of the dataset
70+
startyear='1979' #start year of the datase
7171
startmonth='01' #start month of the dataset, typically 01
72-
endyear='2017' #end year of the dataset
72+
endyear='2017' #end year of the datase
7373
endmonth='12' #end month of the dataset, typically 12
7474

7575
if data_name =='GPCP_v2.2':
7676
rootname='GPCP_v2.2' #name of the climo files
77-
startyear='1979' #start year of the dataset
77+
startyear='1979' #start year of the datase
7878
startmonth='01' #start month of the dataset, typically 01
79-
endyear='2014' #end year of the dataset
79+
endyear='2014' #end year of the datase
8080
endmonth='12' #end month of the dataset, typically 12
8181

8282
#^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^
@@ -150,7 +150,7 @@
150150
f_in=cdm.open(input_hostANDfilename)
151151
varlist=f_in.listvariables()
152152

153-
print varlist
153+
print varlis
154154
print f_in.listdimension()
155155

156156
ignore_variables=['bounds_lat','bounds_time','bounds_lon','bnds_lat','bnds_time','bnds_lon','date','lon_bnds','lat_bnds','time_bnds'] #variables to ignore when making climatology means
@@ -176,7 +176,7 @@
176176
outputdattable=eval(".".join(['cdu',fi,'climatology(dattable, criteriaarg = [0.99,None])'])) #only full DJF ranges are included in the calculation
177177
outputdattable.cell_methods="time: mean over years"
178178

179-
#specify the time axis long_name and the units - uses the startyear-1-1 as the starting point
179+
#specify the time axis long_name and the units - uses the startyear-1-1 as the starting poin
180180
time_axis=outputdattable.getAxis(0)
181181
time_axis.climatology="climatology_bnds"
182182
time_axis.long_name="time"

analysis_data_preprocess/create_OAFLUX_climo.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# flake8: noqa
2-
#!/usr/bin/env cdat
2+
#!/usr/bin/env cda
33
"""
44
This script takes an observational dataset that contains monthly data
55
and creates the appropriate climo files. Aspects of this code have been taken
@@ -25,13 +25,13 @@
2525
Modified by Jill Zhang ([email protected]) 08-27-2018
2626
"""
2727

28-
# Upload the following libraries to call in this script
28+
# Upload the following libraries to call in this scrip
2929
import argparse
3030
import code
3131
import datetime
3232
import gc
3333
import glob
34-
import inspect
34+
import inspec
3535
import os
3636
import re
3737
import string
@@ -80,9 +80,9 @@
8080
) # string of location+filename of input file
8181

8282
rootname = "OAFlux" # name of the climo files
83-
startyear = "1980" # start year of the dataset
83+
startyear = "1980" # start year of the datase
8484
startmonth = "01" # start month of the dataset, typically 01
85-
endyear = "2005" # end year of the dataset
85+
endyear = "2005" # end year of the datase
8686
endmonth = "12" # end month of the dataset, typically 12
8787
# ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^
8888

@@ -250,7 +250,7 @@
250250
) # only full DJF ranges are included in the calculation
251251
outputdattable.cell_methods = "time: mean over years"
252252

253-
# specify the time axis long_name and the units - uses the startyear-1-1 as the starting point
253+
# specify the time axis long_name and the units - uses the startyear-1-1 as the starting poin
254254
time_axis = outputdattable.getAxis(0)
255255
time_axis.climatology = "climatology_bnds"
256256
time_axis.long_name = "time"

analysis_data_preprocess/create_PminusE_GPCP-OAFlux_timeseries.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
fin1 = cdms2.open(input_path1 + filename1)
2222
fin2 = cdms2.open(input_path2 + filename2)
2323

24-
startyear = "1979" # start year of the dataset
25-
endyear = "2013" # end year of the dataset
24+
startyear = "1979" # start year of the datase
25+
endyear = "2013" # end year of the datase
2626

2727
prect = fin1("PRECT", time=("1979-01-15", "2013-12-15", "ccb"))
2828
qflux = fin2("QFLX", time=("1979-01-15", "2013-12-15", "ccb"))

analysis_data_preprocess/fix_units_1.5hr_time_shift_forTRMM.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
# The shift may be due to the assumption that ncclimo makes that times are encoded using the CESM/E3SM convention where times refer to the end of the timestep
2626
print('var.time',var.getTime()[:])
2727
for ilat in range(nlat):
28-
print,'ilat= ',ilat
28+
print,'ilat= ',ila
2929
var[0,ilat,:] = var0[7,ilat,:]
3030
var[1:8,ilat,:] = var0[0:7,ilat,:]
3131
newtime=cdms2.createAxis(MV2.zeros(8))

analysis_data_preprocess/process_GPCP_dataset.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# flake8: noqa
2-
#!/usr/bin/env cdat
2+
#!/usr/bin/env cda
33
"""
44
This script takes the GPCP dataset with monthly data on it from
55
"http://www.esrl.noaa.gov/psd/data/gridded/data.gpcp.html
@@ -15,7 +15,7 @@
1515
import datetime
1616
import gc
1717
import glob
18-
import inspect
18+
import inspec
1919
import os
2020
import re
2121
import string
@@ -70,7 +70,7 @@
7070

7171

7272
filecount = 0
73-
fisc=varlist
73+
fisc=varlis
7474
f_index=0
7575
for fi in fisc:
7676
print "##########################"
@@ -129,7 +129,7 @@
129129

130130
f_out.write(dattable) ;
131131
print "".join(["** Finished processing: ",fi," **"])
132-
filecount = filecount + 1; filecount_s = '%06d' % filecount
132+
filecount = filecount + 1; filecount_s = '%06d' % filecoun
133133
f_index=f_index + 1
134134

135135
f_out.close()

analysis_data_preprocess/process_OAFLUX_dataset.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# flake8: noqa
2-
#!/usr/bin/env cdat
2+
#!/usr/bin/env cda
33
"""
44
Based on Chris Terai's original script for GPCP
55
Modified for OAFlux by Jill Zhang ([email protected]) 2018-09-15
@@ -9,7 +9,7 @@
99
import datetime
1010
import gc
1111
import glob
12-
import inspect
12+
import inspec
1313
import os
1414
import re
1515
import string

analysis_data_preprocess/split_vars.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
years = "200101_201512"
2525
datapath = (
2626
"/p/user_pub/e3sm/zhang40/analysis_data_e3sm_diags/CERES-EBAF/"
27-
+ dataset
27+
+ datase
2828
+ "/time_series/"
2929
)
3030
filename = datapath + data + "_" + years + ".nc"

auxiliary_tools/aerosol_budget.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# NOTE: This module uses the deprecated e3sm_diags.driver.utils.dataset.Dataset
1+
# NOTE: This module uses the deprecated e3sm_diags.driver.utils.dataset.Datase
22
# class, which was replaced by e3sm_diags.driver.utils.dataset_xr.Dataset.
33
import csv
44
import json
@@ -78,7 +78,7 @@ def generate_metrics_dic(data, aerosol, season):
7878
"Burden (Tg)": f"{burden_total:.3f}",
7979
"Lifetime (Days)": f"{burden_total/sink*365:.3f}",
8080
}
81-
return metrics_dict
81+
return metrics_dic
8282

8383

8484
param = CoreParameter()

auxiliary_tools/cdat_regression_testing/562-index-html/run_script.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# python -m auxiliary_tools.cdat_regression_testing.792-lat-lon-run-script.792_lat_lon_run_script
2-
from auxiliary_tools.cdat_regression_testing.base_run_script import run_set
1+
# python -m auxiliary_tools.cdat_regression_testing.792-lat-lon-run-script.792_lat_lon_run_scrip
2+
from auxiliary_tools.cdat_regression_testing.base_run_script import run_se
33

44
SET_NAME = "polar"
55
SET_DIR = "562-index-html"

0 commit comments

Comments
 (0)