Skip to content

Commit 67d1b1b

Browse files
authored
Merge pull request #221 from bertinia/master
update DAV modules and ncar_pylib version
2 parents 469c5da + 0433b9c commit 67d1b1b

File tree

4 files changed

+55
-22
lines changed

4 files changed

+55
-22
lines changed

Machines/dav_modules

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@
22

33
echo "Python boot-strap modules for NCAR DAV"
44

5-
module load python/2.7.15
6-
module load intel/17.0.1
5+
module load python/2.7.16
6+
module load gnu/8.3.0
77
module load ncarenv
88
module load ncarcompilers
9-
module load impi
10-
module load netcdf/4.6.1
9+
module load openmpi/3.1.4
10+
module load netcdf/4.7.1
1111
module load nco/4.7.4
12-
module load ncl/6.6.2
12+
module load ncl/6.6.2
1313

1414
# clone the ncat virtualenv first with helper script ncar_pylib
1515
# use "ncar_pylib --help" to see all options
16-
ncar_pylib -c 20190718 ${pp_dir}/cesm-env2
16+
ncar_pylib -c 20191031 ${pp_dir}/cesm-env2
1717

1818
export PYTHONPATH=${pp_dir}/cesm-env2/lib/python2.7/site-packages
1919

Machines/machine_postprocess.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,20 @@
1010
<pythonpath></pythonpath>
1111
<f2py fcompiler="intelem" f77exec="/glade/apps/opt/modulefiles/ys/cmpwrappers/ifort">f2py</f2py>
1212
<za>
13-
<compiler>ifort</compiler>
13+
<compiler>gfortran</compiler>
1414
<flags>-c -g -O2</flags>
15-
<include>-I/glade/u/apps/dav/opt/netcdf/4.6.1/intel/17.0.1/include</include>
16-
<libs>-L/glade/u/apps/dav/opt/netcdf/4.6.1/intel/17.0.1/lib -lnetcdff -lnetcdf</libs>
15+
<include>-I/glade/u/apps/dav/opt/netcdf/4.7.1/gnu/8.3.0/include</include>
16+
<libs>-L/glade/u/apps/dav/opt/netcdf/4.7.1/gnu/8.3.0/lib -lnetcdff -lnetcdf</libs>
1717
</za>
1818
<reset_modules>
1919
<module>module purge</module>
2020
</reset_modules>
2121
<modules>
22-
<module>module load intel/17.0.1</module>
22+
<module>module load gnu/8.3.0</module>
2323
<module>module load ncarenv</module>
2424
<module>module load ncarcompilers</module>
25-
<module>module load impi</module>
26-
<module>module load netcdf/4.6.1</module>
25+
<module>module load openmpi/3.1.4</module>
26+
<module>module load netcdf/4.7.1</module>
2727
<module>module load nco/4.7.4</module>
2828
<module>module load ncl/6.6.2</module>
2929
</modules>

Tools/ration_script_dav

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,14 @@
1414
#SBATCH -o ration_test.out.%J
1515

1616
module purge
17-
module load python/2.7.14
18-
module load intel/17.0.1
17+
module load python/2.7.16
18+
module load gnu/8.3.0
1919
module load ncarenv
2020
module load ncarcompilers
21-
module load impi
21+
module load openmpi/3.1.4
22+
module load netcdf/4.7.1
23+
module load nco/4.7.4
24+
module load ncl/6.6.2
2225

2326

2427
. /gpfs/fs1/work/aliceb/sandboxes/dev/postprocessing_dav/cesm-env2/bin/activate

atm_diag/regridclimo.ncl

Lines changed: 37 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ end if
223223
var_in_exclude = (/"lat", "lon", "area", "date_written", "time_written"/)
224224

225225
;--- Specify a list of variables on the source SE file that should be directly copied
226-
var_in_copy = (/"time_bnds"/)
226+
var_in_copy = (/"time_bnds","cosp_ht_bnds","cosp_sr_bnds","cosp_prs_bnds","cosp_tau_bnds"/)
227227

228228
;--- Specify a list of variables to be regridded
229229
var_out = "All_Variables" ; to be regridded
@@ -293,11 +293,34 @@ end if
293293
ib = ind(dNames.eq."ilev")
294294
klev = dSizes(ia)
295295
klevi = dSizes(ib)
296-
; standard CAM dimensions
297-
dimNames = (/"time", "lat", "lon", "lev", "ilev", "nbnd", "chars"/)
298-
dimSizes = (/ -1 , nlat , mlon , klev, klevi , 2 , 8 /)
299-
dimUnlim = (/ True , False, False, False, False , False , False /)
300-
filedimdef(dst_file,dimNames,dimSizes,dimUnlim)
296+
; cosp dimensions
297+
if (any("cosp_scol".eq.dNames))
298+
iscol = ind(dNames.eq."cosp_scol")
299+
nscol = dSizes(iscol)
300+
itau = ind(dNames.eq."cosp_tau")
301+
ntau = dSizes(itau)
302+
iprs = ind(dNames.eq."cosp_prs")
303+
nprs = dSizes(iprs)
304+
isr = ind(dNames.eq."cosp_sr")
305+
nsr = dSizes(isr)
306+
isza = ind(dNames.eq."cosp_sza")
307+
nsza = dSizes(isza)
308+
iht = ind(dNames.eq."cosp_ht")
309+
nht = dSizes(iht)
310+
; CAM dimensions plus cosp
311+
dimNames = (/"time", "lat", "lon", "lev", "ilev", "nbnd", "chars","cosp_scol","cosp_prs","cosp_sr","cosp_tau","cosp_sza","cosp_ht"/)
312+
dimSizes = (/ -1 , nlat , mlon , klev, klevi , 2 , 8 ,nscol ,nprs ,nsr ,ntau ,nsza ,nht /)
313+
dimUnlim = (/ True , False, False, False, False , False , False ,False ,False ,False ,False ,False ,False /)
314+
filedimdef(dst_file,dimNames,dimSizes,dimUnlim)
315+
else
316+
; standard CAM dimensions
317+
dimNames = (/"time", "lat", "lon", "lev", "ilev", "nbnd", "chars"/)
318+
dimSizes = (/ -1 , nlat , mlon , klev, klevi , 2 , 8 /)
319+
dimUnlim = (/ True , False, False, False, False , False , False /)
320+
filedimdef(dst_file,dimNames,dimSizes,dimUnlim)
321+
end if
322+
323+
301324

302325
;--- The following are explicitly added because they are 'special'
303326

@@ -332,6 +355,13 @@ end if
332355
vdims = getfilevardims(src_file, var_in(nv))
333356
filevardef(dst_file, var_in(nv), getfilevartypes(src_file,var_in(nv)) \
334357
, (/ "time", vdims(1), "lat", "lon" /) )
358+
delete(vdims)
359+
end if
360+
if (rank_in .eq.4.and.var_in(nv).eq."FISCCP1_COSP") then
361+
vdims = getfilevardims(src_file, var_in(nv))
362+
filevardef(dst_file, var_in(nv), getfilevartypes(src_file,var_in(nv)) \
363+
, (/ "time", "cosp_prs", "cosp_tau","lat", "lon" /) )
364+
delete(vdims)
335365
end if
336366

337367
dumAtts = new( 1, getfilevartypes(src_file,var_in(nv)))
@@ -374,13 +404,13 @@ end if
374404
any(var_in(nv).eq.var_in_copy) ) then
375405

376406
rank_in = dimsizes(getfilevardimsizes(src_file, var_in(nv)))
377-
378407
if (rank_in .eq.1 .or. any(var_in(nv).eq.var_in_copy) ) then
379408
dst_file->$var_in(nv)$ = (/ src_file->$var_in(nv)$ /)
380409
end if
381410
if (rank_in .ge.2 .and. .not.any(var_in(nv).eq.var_in_copy)) then
382411
dst_file->$var_in(nv)$ = (/ ESMF_regrid_with_weights(src_file->$var_in(nv)$,wgtFileName,Opt_RGRD) /)
383412
end if
413+
delete(rank_in)
384414
end if
385415
end if
386416
end do ; nv

0 commit comments

Comments
 (0)