pro construct_levitus1998_sst_ogcm_v2a ; Purpose ; ------- ; Constructs text files containing annual-mean and monthly Levitus 1998 SSTs, ; in the format read by the CSIRO OGCM ; ; History ; ------- ; 2004 Sep 14 Steve Phipps Original version ; 2004 Sep 18 Steve Phipps Modified for v2a SSTs ; Get Levitus 1998 SSTs ncid = ncdf_open("levitus1998_sst_ogcm_ann_mid_v2a.nc") annid = ncdf_varid(ncid, "sstann") monid = ncdf_varid(ncid, "sst") ncdf_varget, ncid, annid, sstann ncdf_varget, ncid, monid, sst ncdf_close, ncid ; Write annual means to output file openw, 1, "sst.dat.levitus1998_v2a_ann" for i = 0, 11 do begin header = $ ' ' strput, header, "Annual-mean Levitus 1998 v2a SSTs" printf, 1, format='(a70)', header printf, 1, format='(8e10.3)', sstann endfor close, 1 ; Write monthly values to output file openw, 1, "sst.dat.levitus1998_v2a_mid" for i = 0, 11 do begin header = $ ' ' strput, header, "Levitus 1998 v2a SSTs, month " + strtrim(string(i+1)), 0 printf, 1, format='(a70)', header printf, 1, format='(8e10.3)', sst(*, *, i) endfor close, 1 end